@elyx-code/project-logic-tree 0.0.7043 → 0.0.7044
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -69,7 +69,7 @@ Children:`,e.map(v=>`${v.type} "${ye(v,this.project)}"`).join(", ")),e.forEach(v
|
|
|
69
69
|
${m.error?`Error: ${JSON.stringify((v=m.error.value)==null?void 0:v.value,null,2)}`:`Value: ${JSON.stringify((A=(b=m.result)==null?void 0:b.value)==null?void 0:A.value,null,2)}`}`),this.removeFromExecutingList(i),this.addToAlreadyExecutedList(i),this.storeLastExecutionValues(m),await((D=e.onEntityExecuted)==null?void 0:D.call(e,i,m,f)),m.value===F.Success){const R=(i.successCalls||i.calls||[]).filter(k=>this.hasEntity(k));(i.errorCalls||[]).forEach(k=>{this.skip(k)});let $=[];const G=(await Promise.all(R.map(k=>this.schedule(k,[],e)))).filter(k=>!!k),x=G.filter(k=>!!k).find(k=>k.value===F.CaughtError||k.value===F.Return||k.value===F.Break||k.value===F.Continue);return x||($=[...$,...G],m)}else if(m.value===F.CaughtError||m.value===F.ConditionNotMet){const R=(i.errorCalls||[]).filter(k=>this.hasEntity(k));(i.successCalls||i.calls||[]).forEach(k=>{this.skip(k)});let $=[];const G=(await Promise.all(R.map(k=>this.schedule(k,[],e)))).filter(k=>!!k),x=G.filter(k=>!!k).find(k=>k.value===F.CaughtError||k.value===F.UnhandledError||k.value===F.Return||k.value===F.Break||k.value===F.Continue);return x||($=[...$,...G],m)}else{if(m.value===F.UnhandledError)return this.executing.forEach(R=>{this.skip(R)}),this.scheduled.forEach(R=>{this.skip(R)}),br.includes(m.entity.type)&&Nt(m.entity).forEach(R=>{this.skip(R)}),m;if(m.value===F.Return)return m;if(m.value===F.Break)return m;if(m.value===F.Continue)return m}return m}async execute(i={},r=[]){console.log(`%cexecute -> [Execution] initialExternalValues:
|
|
70
70
|
${r.map(e=>{var f,h,m;return`${(f=e.valueOwner)==null?void 0:f.type} (${(h=e.valueOwner)==null?void 0:h.id}) "${ye(e.valueOwner,this.project)}": ${JSON.stringify((m=e.value)==null?void 0:m.value,null,2)}`}).join(`
|
|
71
71
|
`)}
|
|
72
|
-
`,"color: #3b82f6; font-weight: bold;");const a={...Qp,...i};this.state="running";const c=this.project.activeExecution;this.project.activeExecution=this;try{const e=await this.executeBranch(this.entryPoint,a,r);return this.state="finished-success",e}finally{this.project.activeExecution=c}}getExecutionLevels(){const i=[];let r=this;for(;r;){const a=r.entryPoint,c=a?ye(a,this.project):"Unknown",e=a?a.type:"unknown";i.unshift(`${e} "${c}"`),r=r.parentExecution}return i.join(" -> ")}logBeforeExecution(i,r,a){var v,b;const c=this.getExecutionLevels(),e=pi(r,this.project),f=e?ye(e,this.project):"Project",h=e?e.type:"Project",m=ye(r,this.project);if(console.log(`%c[Execution: ${c}] %c[Scope: ${h} "${f}"]`,"color: #3b82f6; font-weight: bold;","color: #10b981; font-weight: bold;"),console.log(`%c${i} (${r.type}) -> [${m}]%c Inputs:`,"font-weight: bold; color: #224370ff;","color: #9ca3af;"),a.length?a.forEach(A=>{var R,O,$;const D=ye(A.valueOwner,this.project);console.log(` %c${(R=A.valueOwner)==null?void 0:R.type}%c (${(O=A.valueOwner)==null?void 0:O.id}) %c"${D}"%c:`,"color: #8b5cf6; font-weight: bold;","color: #9ca3af;","color: #10b981; font-weight: bold;","color: #667a9bff;",($=A.value)==null?void 0:$.value)}):console.log(" (none)"),r.type===d.VariableInstance||r.type===d.VariableDeclaration){const A=zr(r),D=Hu(A,this.valueResolutionContext);console.log(` %cExisting Value%c of [${ye(A,this.project)}]:`,"color: #ec4899; font-weight: bold;","color: #667a9bff;",(v=D==null?void 0:D.value)==null?void 0:v.value)}if(r.type===d.InternalCall){const A=r.parent;if(A){const D=Hu(A,this.valueResolutionContext);console.log(` %cParent Variable%c [${ye(A,this.project)}] Value:`,"color: #f59e0b; font-weight: bold;","color: #667a9bff;",(b=D==null?void 0:D.value)==null?void 0:b.value)}}}addEntity(i){var r;this.entities.includes(i)||(this.entities.push(i),(r=this.onAddEntityCallback)==null||r.call(this,i,{}))}async addEntityAsync(i,r={}){var a;this.entities.includes(i)||(this.entities.push(i),await((a=this.onAddEntityCallback)==null?void 0:a.call(this,i,r)))}addEntities(i){i.forEach(r=>this.addEntity(r))}async addEntitiesAsync(i,r={}){const a=X.YieldTracker.from(r),c=[];for(const e of i)c.push(this.addEntityAsync(e,r)),await a.tick();await Promise.all(c)}removeEntity(i){var r;if(i!==this.entryPoint){const a=this.entities.indexOf(i);a>-1&&(this.entities.splice(a,1),(r=this.onRemoveEntityCallback)==null||r.call(this,i,{}))}}hasEntity(i){var r;return this.entities.includes(i)?!0:i.parent&&((r=i.parent)==null?void 0:r.id)!==(i==null?void 0:i.id)?this.hasEntity(i.parent):!1}removeScheduled(i){const r=this.scheduled.indexOf(i);r>-1&&this.scheduled.splice(r,1)}hasScheduled(i){return!!this.scheduled.includes(i)}hasSkipped(i){return!!this.skipped.includes(i)}hasExecuted(i){return!!this.executed.includes(i)}hasEntityWithId(i){const r=this.project.get(i);return r?this.hasEntity(r):!1}onAddToSkippedList(i){this.onAddToSkippedListCallback=i}onAbortExecution(i){this.onAbortExecutionCallback=i}onAddEntity(i){this.onAddEntityCallback=i}onRemoveFromSkippedList(i){this.onRemoveFromSkippedListCallback=i}onRemoveEntity(i){this.onRemoveEntityCallback=i}addToExecutingList(i){this.executing.includes(i)||this.executing.push(i)}addToScheduledList(i){this.scheduled.includes(i)||this.scheduled.push(i)}removeFromScheduledList(i){const r=this.scheduled.indexOf(i);r>-1&&this.scheduled.splice(r,1)}removeFromExecutingList(i){var a;const r=this.executing.indexOf(i);r>-1&&(this.executing.splice(r,1),(a=this.onAbortExecutionCallback)==null||a.call(this,i,{}))}removeFromAlreadyExecutedList(i){const r=this.executed.indexOf(i);r>-1&&this.executed.splice(r,1)}removeFromSkippedList(i){var a;const r=this.skipped.indexOf(i);r>-1&&(this.skipped.splice(r,1),(a=this.onRemoveFromSkippedListCallback)==null||a.call(this,i,{}))}addToAlreadyExecutedList(i){this.executed.includes(i)||this.executed.push(i)}addToSkippedList(i){var r;this.skipped.includes(i)||(this.skipped.push(i),(r=this.onAddToSkippedListCallback)==null||r.call(this,i,{}))}getValueTypePreference(i){return this.parentContext.getValueTypePreference(i)||null}setValueTypePreference(i,r){this.parentContext.setValueTypePreference(i,r),this.emit(i,{})}}function mDi(s){var u,i;if(s.isList)return"list";if(((u=s.entity)==null?void 0:u.type)===d.DefinitionEntity)return"definition-entity";switch((i=s.entity)==null?void 0:i.name){case he.Number:return"number";case he.String:return"text";case he.Boolean:return"boolean";case he.UUID:return"uuid";case he.Date:return"date-time";default:return"definition-entity"}}const Js={[d.PrimitiveEntity]:{singular:"Primitive",plural:"Primitives",shortSingular:"Primitive",shortPlural:"Primitives"},[d.DefinitionEntity]:{singular:"Definition",plural:"Definitions",shortSingular:"Definition",shortPlural:"Definitions"},[d.BuiltInBaseEntity]:{singular:"Base",plural:"Bases",shortSingular:"Base definition",shortPlural:"Base definitions"},[d.Property]:{singular:"Property",plural:"Properties",shortSingular:"Property",shortPlural:"Properties"},[d.FunctionDeclaration]:{singular:"Custom trigger",plural:"Custom triggers",shortSingular:"Trigger",shortPlural:"Triggers"},[d.FunctionCall]:{singular:"Execute trigger",plural:"Execute trigger",shortSingular:"Execute",shortPlural:"Execute"},[d.GlobalEvent]:{singular:"System trigger",plural:"System triggers",shortSingular:"Trigger",shortPlural:"Triggers"},[d.Project]:{singular:"Project",plural:"Projects",shortSingular:"Project",shortPlural:"Projects"},[d.VariableDeclaration]:{singular:"Variable",plural:"Variables",shortSingular:"Variable",shortPlural:"Variables"},[d.VariableInstance]:{singular:"Variable",plural:"Variables",shortSingular:"Variable",shortPlural:"Variables"},[d.Condition]:{singular:"Condition",plural:"Conditions",shortSingular:"Condition",shortPlural:"Conditions"},[d.Operation]:{singular:"Operation",plural:"Operations",shortSingular:"Operation",shortPlural:"Operations"},[d.ReturnStatement]:{singular:"Termination",plural:"Terminations",shortSingular:"Termination",shortPlural:"Terminations"},[d.InstalledProject]:{singular:"Installed project",plural:"Installed projects",shortSingular:"Project",shortPlural:"Projects"},[d.Search]:{singular:"Search",plural:"Searches",shortSingular:"Search",shortPlural:"Searches"},[d.Loop]:{singular:"Loop",plural:"Loops",shortSingular:"Loop",shortPlural:"Loops"},[d.ActionDescriptor]:{singular:"Action descriptor",plural:"Action descriptors",shortSingular:"Action descriptor",shortPlural:"Action descriptors"},[d.InternalCall]:{singular:"Internal call",plural:"Internal calls",shortSingular:"Internal call",shortPlural:"Internal calls"},[d.BreakStatement]:{singular:"Loop exit",plural:"Loop exists",shortSingular:"Exit",shortPlural:"Exits"},[d.ContinueStatement]:{singular:"Next iteration",plural:"Next iterations",shortSingular:"Next",shortPlural:"Nexts"},[d.ArgumentDeclaration]:{singular:"Input definition",plural:"Input definitions",shortSingular:"Input",shortPlural:"Inputs"},[d.InputMap]:{singular:"Input",plural:"Inputs",shortSingular:"Input",shortPlural:"Inputs"},[d.OutputMap]:{singular:"Output",plural:"Outputs",shortSingular:"Output",shortPlural:"Outputs"},[d.ValueDescriptor]:{singular:"Value descriptor",plural:"Value descriptors",shortSingular:"Value descriptor",shortPlural:"Value descriptors"},[d.DataType]:{singular:"Data type",plural:"Data types",shortSingular:"Data type",shortPlural:"Data types"},[d.LiteralValue]:{singular:"Literal value",plural:"Literal values",shortSingular:"Value",shortPlural:"Values"}};function yL(s){const u=cD(s);if(!u){const r=Rm(s);if(r.includes(Ae.HTTP_ENDPOINT))return"HTTP endpoint";if(r.includes(Ae.PERSISTED_ENTITY))return"SQL database table";if(r.includes(Ae.CRON_JOB))return"Scheduled execution";if(r.includes(Ae.RELATIONAL_DATABASE))return"Relational database";if(r.includes(Ae.CONTAINER_COMPUTE_ENTITY))return"Container compute";if(r.includes(Ae.VOLUME_ENTITY))return"Shared files drive";if(r.includes(Ae.COMPUTE_ENTITY))return"Compute";if(r.includes(Ae.AIRTABLE_AUTH_CONNECTION))return"Airtable account connection";if(r.includes(Ae.GOOGLE_AUTH_CONNECTION))return"Google account connection";if(r.includes(Ae.SLACK_AUTH_CONNECTION))return"Slack account connection";if(r.includes(Ae.ATLASSIAN_AUTH_CONNECTION))return"Atlassian account connection";if(r.includes(Ae.JIRA_AUTH_CONNECTION))return"Jira account connection";if(r.includes(Ae.MICROSOFT_AUTH_CONNECTION))return"Microsoft account connection";if(r.includes(Ae.OPENAI_AUTH_CONNECTION))return"OpenAI account connection";if(r.includes(Ae.EXTERNAL_INTEGRATION_CONNECTION))return"External account connection"}if(u){let r="Extension of "+ye(u,u.project)+" entity",a=Xs(r);const c=Rm(s);return c.includes(Ae.HTTP_ENDPOINT)?"HTTP endpoint"+(a?", "+a:""):c.includes(Ae.PERSISTED_ENTITY)?"SQL database table"+(a?", "+a:""):c.includes(Ae.CRON_JOB)?"Scheduled execution"+(a?", "+a:""):c.includes(Ae.RELATIONAL_DATABASE)?"Relational database"+(a?", "+a:""):c.includes(Ae.CONTAINER_COMPUTE_ENTITY)?"Container compute"+(a?", "+a:""):c.includes(Ae.VOLUME_ENTITY)?"Shared files drive"+(a?", "+a:""):c.includes(Ae.COMPUTE_ENTITY)?"Compute"+(a?", "+a:""):c.includes(Ae.AIRTABLE_AUTH_CONNECTION)?"Airtable account connection"+(a?", "+a:""):c.includes(Ae.GOOGLE_AUTH_CONNECTION)?"Google account connection"+(a?", "+a:""):c.includes(Ae.SLACK_AUTH_CONNECTION)?"Slack account connection"+(a?", "+a:""):c.includes(Ae.ATLASSIAN_AUTH_CONNECTION)?"Atlassian account connection"+(a?", "+a:""):c.includes(Ae.JIRA_AUTH_CONNECTION)?"Jira account connection"+(a?", "+a:""):c.includes(Ae.MICROSOFT_AUTH_CONNECTION)?"Microsoft account connection"+(a?", "+a:""):c.includes(Ae.OPENAI_AUTH_CONNECTION)?"OpenAI account connection"+(a?", "+a:""):c.includes(Ae.EXTERNAL_INTEGRATION_CONNECTION)?"External account connection"+(a?", "+a:""):r}let i="";return s.abstract&&(i="Template "),s.static&&(i+=i?" single copy ":"Single copy "),i?i+"definition":"Definition"}function GGe(s){return s.parent.type===d.DefinitionEntity||s.parent.type===d.InstalledProject?"Internal action of "+ye(s.parent,s.project):s.parent.type===d.Loop?"Action repeated on every iteration":"Internal action of entity"}function hL(s){return LB(s)?GGe(s):"Custom trigger"}function TDi(s){var u;switch(s.type){case d.DefinitionEntity:return yL(s);case d.FunctionDeclaration:return hL(s)}return(u=Js[s.type])==null?void 0:u.singular}function vDi(s){var u;switch(s.type){case d.DefinitionEntity:return yL(s);case d.FunctionDeclaration:return hL(s)}return(u=Js[s.type])==null?void 0:u.singular}const mL=4e4,TL=280,EDi=300,vL=65,py=32,sm=39,oE=26,kGe=49,dE=44,bDi=35,TI=52,Pw=10,Cs=Pw*2,lc=38,vI=90,UI=270,UGe=mL/2+120,jGe=mL/2+180;function EL(s){let i=py+dE+lc+Pw;const r=[...s.inputs];return r.length&&(i+=Cs,r.forEach(()=>{i+=oE})),{height:i,width:280}}function uE(s){var a,c;let i=py+dE+lc+Pw;const r=[...s.inputs];return r.length&&(i+=Cs,r.forEach(()=>{i+=oE})),s.andChildrenGroup&&(i+=Cs,s.andChildrenGroup.forEach(e=>{i+=uE(e).height})),s.orChildrenGroup&&(i+=Cs,s.orChildrenGroup.forEach(e=>{i+=uE(e).height})),(((a=s.declaration)==null?void 0:a.id)===j.condition["condition-group-and"].id||((c=s.declaration)==null?void 0:c.id)===j.condition["condition-group-or"].id)&&(i+=lc),{height:i,width:280}}function FGe(s){var h,m;let i=vL;const r=[];if([d.DefinitionEntity].includes(s.type)){const v=[...s.suggestedProperties||[],...s.properties||[]];v.length&&(i+=Cs,v.forEach(b=>{i+=b.static?kGe:sm}))}if([d.DefinitionEntity,d.InstalledProject,d.Loop].includes(s.type)){const v=[...(s==null?void 0:s.suggestedMethods)||[],...s.methods||[],...s.functions||[],...s.body?[s.body]:[]];v.length&&(i+=Cs,v.forEach(b=>{const A=EL(b);i+=A.height}))}ei.includes(s.type)?(r.push(...(s.inputs||[]).flatMap(v=>[v])||[]),i+=Cs,i+=dE,s.error&&(i+=TI)):[d.ReturnStatement,d.BreakStatement,d.ContinueStatement].includes(s.type)?(r.push(...s.outputs||[]),s.throws&&(i+=TI)):s.type===d.Condition&&(r.push(s.inputs[0]),s.inputs[1]&&r.push(s.inputs[1]),(((h=s.declaration)==null?void 0:h.id)===j.condition["condition-group-and"].id||((m=s.declaration)==null?void 0:m.id)===j.condition["condition-group-or"].id)&&(i+=lc),s.andChildrenGroup&&(i+=Cs,s.andChildrenGroup.forEach(v=>{i+=uE(v).height})),s.orChildrenGroup&&(i+=Cs,s.orChildrenGroup.forEach(v=>{i+=uE(v).height})));const a=r.length;a&&(i+=a*sm,i+=Cs);const c=[];if(s.type===d.FunctionDeclaration||s.type===d.GlobalEvent?c.push(...s.inputs||[]):ei.includes(s.type)&&c.push(...s.outputs||[]),hi.includes(s.type)){i+=Cs,i+=dE,s.usedInternalCalls.length&&s.usedInternalCalls.forEach(b=>{i+=TI+Cs,i+=b.inputs.length*oE,i+=b.outputs.length*oE});const v=s.getDataType(null);(!v||v.canModifyObjectStructure())&&(i+=lc)}s.type===d.Search&&(i+=lc);const e=c.length;return e&&(i+=e*sm,i+=Cs),[d.DefinitionEntity,d.FunctionDeclaration,d.ReturnStatement,d.BreakStatement,d.ContinueStatement].includes(s.type)&&(i+=lc),{height:i,width:280}}function KGe(s){let u=0;if(s.parent.type!==d.DefinitionEntity)return{offset:u};const i=s.parent,r=i.methods.findIndex(c=>c.id===s.id);return i.methods.slice(0,r).forEach(c=>{const e=EL(c);u+=e.height}),(i.properties.length||i.suggestedProperties.length)&&(u+=Cs,i.suggestedProperties.forEach(()=>{u+=sm}),i.properties.forEach(()=>{u+=sm})),{offset:u}}function Nb(s){return`${s.split("-").map((r,a)=>a===0?r.charAt(0).toUpperCase()+r.slice(1):r.toLowerCase()).join(" ")}.`}function ADi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return"This template entity has non-template actions";case we.AbstractEntityWithNonAbstractProperties:return"This template entity has non-template properties";case we.IncorrectEntityImplementation:return"This entity incorrectly implements a template entity";case we.IncorrectMethodImplementation:return"This action incorrectly implements the template action it's based on";case we.IncorrectPropertyImplementation:return"This property incorrectly implements the template property it's based on";case we.AbstractMethodInNonAbstractEntity:return"This action is a template action in a non-template entity";case we.AbstractPropertyInNonAbstractEntity:return"This property is a template property in a non-template entity";case Pe.MethodOverwritesOtherSiblingWithSameName:return"An action in this entity overwrites an action in the template entity with the same name";case Pe.PropertyOverwritesOtherSiblingWithSameName:return"A property in this entity overwrites a property in the template entity with the same name";case we.MissingMethodImplementation:return"This entity is missing an action implementation from the template entity";case we.MissingPropertyImplementation:return"This entity is missing a property implementation from the template entity";case Pe.NameNotUniqueInScope:return"Invalid name. There is another entity with the same name in the same scope";case we.NoProperties:return"This entity has no properties, so it doesn't do anything";case we.NonStaticPropertyInStaticEntity:return"This property is not static in a static entity";case we.StaticEntityWithNonStaticProperties:return"This static entity has non-static properties";case we.ReadingFromIncompatibleType:return"This entity reads data from a value of a different data type";case we.WritingToIncompatibleType:return"This entity writes data to a value of a different data type";case we.ScopeWithoutLogic:return"This action has no logic, so it doesn't do anything";case we.NonStaticPropertyImplementsStatic:return"This property is static in a non-static entity";case we.PropertyImplementsIncompatibleType:return"This property implements a property of a different data type";case we.PropertyImplementsNonAbstact:return"This property implements a non-template property";case we.StaticPropertyImplementsNonStatic:return"This static property implements a non-static property";case we.VariableCallsOthersAndHasInternalCall:return"This variable calls other entities while being used to execute internal logic";case we.VariableHasInputsAndInternalCall:return"This variable has inputs while being used to execute internal logic";case we.VariableHasOutputsAndInternalCall:return"This variable has outputs while being used to execute internal logic";case we.VariableIsCalledAndHasInternalCall:return"This variable is called while being used to execute internal logic";case Pe.InternalCallDeclarationIsInvalidType:return"This internal call is not an action";case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return"This internal call is not found in the parent entity";case Pe.InternalCallParentDeclarationEntityInvalidType:return"This internal call parent entity is not a data type";case Pe.InternalCallParentMissingDataType:return"This internal call parent entity has no data type";case Pe.UnreachableEntity:return"This entity is unreachable";case we.DisconnectedCallableEntity:return"This entity is disconnected and won't be executed by anything after publishing";case we.AbstractEntityImplements:return"This template entity implements a non-template entity";case we.AbstractExtendingNonAbstractEntity:return"This template entity extends a non-template entity";case we.InvalidPropertiesCombination:return"This entity has an invalid combination of properties";case we.ExtendingNonInteractiveEntity:return"This entity extends a non-interactive entity";case we.ExtendsIncompatibleEntities:return"This entity extends incompatible entities";case we.ImplementingNonAbstractEntity:return"This entity implements a non-template entity";case we.ImplementsIncompatibleEntities:return"This entity implements incompatible entities";case we.LackingReturnStatementOnSomeBranches:return"This action is missing a termination on some branches";case we.LastCalledEntityMustBeReturnEntity:return"The last called entity in this action must be a termination node";case we.MissingRequiredValue:return"This action is missing a required value";case we.NoPrimaryKeyProperty:return"This entity has no primary key property";case we.NonAbstractExtendingAbstractEntity:return"This non-template entity extends a template entity";case we.NonStaticExtendingStaticEntity:return"This non-static entity extends a static entity";case we.NonStaticImplementingStaticEntity:return"This non-static entity implements a static entity";case we.StaticExtendingNonStaticEntity:return"This static entity extends a non-static entity";case we.StaticImplementingNonStaticEntity:return"This static entity implements a non-static entity";case we.VariableReadsValueAndInternalCall:return"This variable reads a value while being used to execute internal logic";case we.VariableWritesValuesAndInternalCall:return"This variable writes values while being used to execute internal logic";case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return"This internal call declaration is not in the parent entity";case Pe.EmptyName:return"This entity has no name";case Pe.InvalidObjectStructure:return"This entity has an invalid structure";case Pe.LoopBodyFunctionOverwrite:return"This loop body action overwrites an action in the template entity with the same name";case Pe.MethodOverwritesBaseMethodWithSameImplementation:return"This action overwrites a base action with the same implementation";case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return"This action overwrites an action in an extended entity with the same implementation";case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return"This action overwrites an action in an implemented entity with the same implementation";case Pe.MissingCaller:return"This action is missing a caller";case Pe.NameAsResolvedCodeNameNotUniqueInScope:return"This entity has a name that is not unique in the scope of the code it is used in";case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return"This entity name can only contain letters, numbers, underscores and spaces";case Pe.NameMustStartWithLetterOrUnderscore:return"This entity name must start with a letter or an underscore";case Pe.NoOverlapWithImplementedSignature:return"This action does not overlap with the implemented action signature";case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return"This property overwrites a base property with the same implementation";case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return"This property overwrites a property in an extended entity with the same implementation";case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return"This property overwrites a property in an implemented entity with the same implementation";case Pe.ReaderWriterIncompatibleDataType:return"This reader/writer has an incompatible data type with the value it is reading/writing";case au.StatusCodeMustBeBetween100And599:return"HTTP status code must be between 100 and 599";case au.StatusCodeMustBeNumber:return"HTTP status code must be a number, between 100 and 599";case el.UUIDMustBeString:return`UUID must be a string, eg: "${cc()}"`;case el.UUIDMustNotContainSpaces:return`UUID must not contain spaces, eg: "${cc()}"`;case el.UUIDMustBeValidFormat:return`UUID must be in a valid format. Eg: "${cc()}"`;case Ra.MustBeUniqueAmongSameEntities:return"This value must be unique among the same kind";case Ra.StringValueMustNotHaveDashes:return"This value must not contain dashes";case Ra.StringValueMustNotHaveSpaces:return"This value must not contain spaces";case Ra.ValueMustBeString:return"This value must be a string";case qv.DayOfMonthAndWeekConflict:return"Cron expression cannot have both day of month and day of week";case qv.InvalidCharacters:return"Cron expression has invalid characters";case qv.MustHaveSixFields:return"Cron expression must have six fields";case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return"Cannot call this action in a parallel branch";case we.DefaultValueOverridesConstantProperty:return"Cannot override constant property";case we.DefaultValueOverridesConstantVariable:return"Cannot override constant variable";case we.EmptyGroupCondition:return"Cannot have an empty condition group";case we.HigherScopeThanDeclaration:return"In higher scope than declaration";case we.MissingEnumOptions:return"Missing enum options";case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return"Current node catches its errors with no further calls which terminates the branch, but the parent trigger requires a returned value";case we.ValueReadingOverridesConstantProperty:return"Value reading overrides constant property";case we.ValueReadingOverridesConstantVariable:return"Value reading overrides constant variable";case Pe.GlobalVariableDeclarationCannotBeCalled:return"Global variable declaration cannot be called";case Pe.GlobalVariableDeclarationCannotCallOnError:return"Global variable declaration cannot have error calls";case Pe.GlobalVariableDeclarationCannotCatchError:return"Global variable declaration cannot catch errors";case Pe.InternalCallDeclarationNotFound:return"Internal call declaration not found";case Pe.NameIsForbiddenKeyword:return"The name given is a forbidden keyword";default:return Nb(s.code)}}function gDi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return"Non-template actions";case we.AbstractEntityWithNonAbstractProperties:return"Non-template properties";case we.IncorrectEntityImplementation:return"Incorrect implementation";case we.IncorrectMethodImplementation:return"Incorrect action implementation";case we.IncorrectPropertyImplementation:return"Incorrect property implementation";case we.AbstractMethodInNonAbstractEntity:return"Template action in non-template entity";case we.AbstractPropertyInNonAbstractEntity:return"Template property in non-template entity";case Pe.MethodOverwritesOtherSiblingWithSameName:return"Action overwrite";case Pe.PropertyOverwritesOtherSiblingWithSameName:return"Property overwrite";case we.MissingMethodImplementation:return"Missing action";case we.MissingPropertyImplementation:return"Missing property";case Pe.NameNotUniqueInScope:return"Duplicate name";case we.NoProperties:return"No properties";case we.NonStaticPropertyInStaticEntity:return"Non-static property";case we.StaticEntityWithNonStaticProperties:return"Non-static properties";case we.ReadingFromIncompatibleType:return"Read from different type";case we.WritingToIncompatibleType:return"Write to different type";case we.ScopeWithoutLogic:return"No logic";case we.NonStaticPropertyImplementsStatic:return"Invalid static property";case we.PropertyImplementsIncompatibleType:return"Incompatible data type";case we.PropertyImplementsNonAbstact:return"Non-template property";case we.StaticPropertyImplementsNonStatic:return"Non-static property";case we.VariableCallsOthersAndHasInternalCall:return"Bad internal call";case we.VariableHasInputsAndInternalCall:return"Bad internal call";case we.VariableHasOutputsAndInternalCall:return"Bad internal call";case we.VariableIsCalledAndHasInternalCall:return"Bad internal call";case Pe.InternalCallDeclarationIsInvalidType:return"Declaration not an action";case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return"Declaration not found in parent";case Pe.InternalCallParentDeclarationEntityInvalidType:return"Invalid parent declaration type";case Pe.InternalCallParentMissingDataType:return"Parent has no data type";case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return"Declaration not in parent";case Pe.UnreachableEntity:return"Unreachable entity";case we.DisconnectedCallableEntity:return"Disconnected entity";case we.AbstractEntityImplements:return"Abstract entity implements a non-template entity";case we.AbstractExtendingNonAbstractEntity:return"Abstract entity extends a non-template entity";case we.InvalidPropertiesCombination:return"Invalid properties combination";case we.ExtendingNonInteractiveEntity:return"Extending non-interactive entity";case we.ExtendsIncompatibleEntities:return"Extends incompatible entities";case we.ImplementingNonAbstractEntity:return"Implementing non-template entity";case we.ImplementsIncompatibleEntities:return"Implements incompatible entities";case we.LackingReturnStatementOnSomeBranches:return"Missing termination on some branches";case we.LastCalledEntityMustBeReturnEntity:return"Last called entity must be a termination node";case we.MissingRequiredValue:return"Missing required value";case we.NoPrimaryKeyProperty:return"No primary key property";case we.NonAbstractExtendingAbstractEntity:return"Non-template entity extending a template entity";case we.NonStaticExtendingStaticEntity:return"Non-static entity extending a static entity";case we.NonStaticImplementingStaticEntity:return"Non-static entity implementing a static entity";case we.StaticExtendingNonStaticEntity:return"Static entity extending a non-static entity";case we.StaticImplementingNonStaticEntity:return"Static entity implementing a non-static entity";case we.VariableReadsValueAndInternalCall:return"Variable reads value and has internal call";case we.VariableWritesValuesAndInternalCall:return"Variable writes values and has internal call";case Pe.EmptyName:return"Empty name";case Pe.InvalidObjectStructure:return"Invalid object structure";case Pe.LoopBodyFunctionOverwrite:return"Loop body action overwrites action with same name";case Pe.MethodOverwritesBaseMethodWithSameImplementation:return"Action overwrites base action with same implementation";case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return"Action overwrites another with same implementation";case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return"Action overwrites another with same implementation";case Pe.MissingCaller:return"Missing caller";case Pe.NameAsResolvedCodeNameNotUniqueInScope:return"Name not unique in scope";case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return"Name can only contain letters, numbers, underscores and spaces";case Pe.NameMustStartWithLetterOrUnderscore:return"Name must start with letter or underscore";case Pe.NoOverlapWithImplementedSignature:return"No overlap with implemented signature";case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return"Property overwrites base property with same implementation";case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return"Property overwrites another with same implementation";case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return"Property overwrites another with same implementation";case Pe.ReaderWriterIncompatibleDataType:return"Reader/writer incompatible data type";case au.StatusCodeMustBeBetween100And599:return"HTTP status code must be between 100 and 599";case au.StatusCodeMustBeNumber:return"HTTP status code must be a number";case el.UUIDMustBeString:return"UUID must be a string";case el.UUIDMustNotContainSpaces:return"UUID must not contain spaces";case el.UUIDMustBeValidFormat:return"UUID must be in a valid format";case Ra.MustBeUniqueAmongSameEntities:return"This value must be unique among the same kind";case Ra.StringValueMustNotHaveDashes:return"This value must not contain dashes";case Ra.StringValueMustNotHaveSpaces:return"This value must not contain spaces";case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return"Cannot call in a parallel branch";case we.DefaultValueOverridesConstantProperty:return"Cannot override constant";case we.DefaultValueOverridesConstantVariable:return"Cannot override constant";case we.EmptyGroupCondition:return"Empty condition group";case we.HigherScopeThanDeclaration:return"Higher scope than declaration";case we.MissingEnumOptions:return"Missing enum options";case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return"Catches errors with no further calls, but the parent trigger requires a returned value";case we.ValueReadingOverridesConstantProperty:return"Value reading overrides constant";case we.ValueReadingOverridesConstantVariable:return"Value reading overrides constant";case Pe.GlobalVariableDeclarationCannotBeCalled:return"Global variable declaration cannot be called";case Pe.GlobalVariableDeclarationCannotCallOnError:return"Global variable declaration cannot have error calls";case Pe.GlobalVariableDeclarationCannotCatchError:return"Global variable declaration cannot catch errors";case Pe.InternalCallDeclarationNotFound:return"Internal call declaration not found";case Pe.NameIsForbiddenKeyword:return"Name is a forbidden keyword";default:return Nb(s.code)}}function IDi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return`${ye(s.entity,s.entity.project)} has non-template actions`;case we.AbstractEntityWithNonAbstractProperties:return`${ye(s.entity,s.entity.project)} has non-template properties`;case we.IncorrectEntityImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements template`;case we.IncorrectMethodImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template`;case we.IncorrectPropertyImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template`;case we.AbstractMethodInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} can't be a template`;case we.AbstractPropertyInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} can't be a template`;case Pe.MethodOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites action`;case Pe.PropertyOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites property`;case we.MissingMethodImplementation:return`${ye(s.entity,s.entity.project)} is missing action`;case we.MissingPropertyImplementation:return`${ye(s.entity,s.entity.project)} is missing property`;case Pe.NameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} name is not unique`;case we.NoProperties:return`${ye(s.entity,s.entity.project)} has no properties`;case we.NonStaticPropertyInStaticEntity:return`${ye(s.entity,s.entity.project)} has non-static property`;case we.StaticEntityWithNonStaticProperties:return`${ye(s.entity,s.entity.project)} has non-static properties`;case we.ReadingFromIncompatibleType:return`${ye(s.entity,s.entity.project)} reads from different type`;case we.WritingToIncompatibleType:return`${ye(s.entity,s.entity.project)} writes to different type`;case we.ScopeWithoutLogic:return`${ye(s.entity,s.entity.project)} has no logic`;case we.NonStaticPropertyImplementsStatic:return`${ye(s.entity,s.entity.project)} has invalid static property`;case we.PropertyImplementsIncompatibleType:return`${ye(s.entity,s.entity.project)} has incompatible data type`;case we.PropertyImplementsNonAbstact:return`${ye(s.entity,s.entity.project)} has non-template property`;case we.StaticPropertyImplementsNonStatic:return`${ye(s.entity,s.entity.project)} has non-static property`;case we.VariableCallsOthersAndHasInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableHasInputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableHasOutputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableIsCalledAndHasInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case Pe.InternalCallDeclarationIsInvalidType:return`${ye(s.entity,s.entity.project)} has declaration that is not an action`;case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has declaration that is not found in parent`;case Pe.InternalCallParentDeclarationEntityInvalidType:return`${ye(s.entity,s.entity.project)} has invalid parent declaration type`;case Pe.InternalCallParentMissingDataType:return`${ye(s.entity,s.entity.project)}'s parent has no data type`;case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has declaration that is not in parent`;case Pe.UnreachableEntity:return`${ye(s.entity,s.entity.project)} is unreachable`;case we.DisconnectedCallableEntity:return`${ye(s.entity,s.entity.project)} is not executed by any entity`;case we.AbstractEntityImplements:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.AbstractExtendingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a non-template entity`;case we.InvalidPropertiesCombination:return`${ye(s.entity,s.entity.project)} has invalid properties combination`;case we.ExtendingNonInteractiveEntity:return`${ye(s.entity,s.entity.project)} extends a non-interactive entity`;case we.ExtendsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} extends incompatible entities`;case we.ImplementingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.ImplementsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} implements incompatible entities`;case we.LackingReturnStatementOnSomeBranches:return`${ye(s.entity,s.entity.project)} is missing termination on some branches`;case we.LastCalledEntityMustBeReturnEntity:return`${ye(s.entity,s.entity.project)}'s last called entity must be a termination node`;case we.MissingRequiredValue:return`${ye(s.entity,s.entity.project)} is missing a required value`;case we.NoPrimaryKeyProperty:return`${ye(s.entity,s.entity.project)} has no primary key property`;case we.NonAbstractExtendingAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a template entity`;case we.NonStaticExtendingStaticEntity:return`${ye(s.entity,s.entity.project)} extends a static entity`;case we.NonStaticImplementingStaticEntity:return`${ye(s.entity,s.entity.project)} implements a static entity`;case we.StaticExtendingNonStaticEntity:return`${ye(s.entity,s.entity.project)} extends a non-static entity`;case we.StaticImplementingNonStaticEntity:return`${ye(s.entity,s.entity.project)} implements a non-static entity`;case we.VariableReadsValueAndInternalCall:return`${ye(s.entity,s.entity.project)} reads a value and has internal call`;case we.VariableWritesValuesAndInternalCall:return`${ye(s.entity,s.entity.project)} writes values and has internal call`;case Pe.EmptyName:return`${Js[s.entity.type]} has no name`;case Pe.InvalidObjectStructure:return`${ye(s.entity,s.entity.project)} has invalid structure`;case Pe.LoopBodyFunctionOverwrite:return`${ye(s.entity,s.entity.project)}'s loop body action overwrites an action`;case Pe.MethodOverwritesBaseMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites base action`;case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MissingCaller:return`${ye(s.entity,s.entity.project)} is missing a caller`;case Pe.NameAsResolvedCodeNameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a name not unique in the scope`;case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return`${ye(s.entity,s.entity.project)} name can only contain letters, numbers, underscores and spaces`;case Pe.NameMustStartWithLetterOrUnderscore:return`${ye(s.entity,s.entity.project)} name must start with letter or underscore`;case Pe.NoOverlapWithImplementedSignature:return`${ye(s.entity,s.entity.project)} has no overlap with implemented signature`;case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites base property`;case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.ReaderWriterIncompatibleDataType:return`${ye(s.entity,s.entity.project)} has reader/writer with incompatible data type`;case au.StatusCodeMustBeBetween100And599:return`${ye(s.entity,s.entity.project)} HTTP status code must be between 100 and 599`;case au.StatusCodeMustBeNumber:return`${ye(s.entity,s.entity.project)} HTTP status code must be a number`;case el.UUIDMustBeString:return`${ye(s.entity,s.entity.project)} UUID must be a string`;case el.UUIDMustNotContainSpaces:return`${ye(s.entity,s.entity.project)} UUID must not contain spaces`;case el.UUIDMustBeValidFormat:return`${ye(s.entity,s.entity.project)} UUID must be in a valid format`;case Ra.MustBeUniqueAmongSameEntities:return`${ye(s.entity,s.entity.project)} value must be unique among the same kind`;case Ra.StringValueMustNotHaveDashes:return`${ye(s.entity,s.entity.project)} value must not contain dashes`;case Ra.StringValueMustNotHaveSpaces:return`${ye(s.entity,s.entity.project)} value must not contain spaces`;default:return`${ye(s.entity,s.entity.project)} Error: ${Nb(s.code)}`}}function RDi(s){var u,i,r,a;switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return`${ye(s.entity,s.entity.project)} has non-template actions`;case we.AbstractEntityWithNonAbstractProperties:return`${ye(s.entity,s.entity.project)} has non-template properties`;case we.IncorrectEntityImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template entity`;case we.IncorrectMethodImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template action it's based on`;case we.IncorrectPropertyImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template property it's based on`;case we.AbstractMethodInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} is a template action in a non-template entity`;case we.AbstractPropertyInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} is a template property in a non-template entity`;case Pe.MethodOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites an action in the template entity`;case Pe.PropertyOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites a property in the template entity`;case we.MissingMethodImplementation:return`${ye(s.entity,s.entity.project)} is missing an action implementation from the template entity`;case we.MissingPropertyImplementation:return`${ye(s.entity,s.entity.project)} is missing a property implementation from the template entity`;case Pe.NameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a duplicate name in the same scope`;case we.NoProperties:return`${ye(s.entity,s.entity.project)} has no properties, so it doesn't do anything`;case we.NonStaticPropertyInStaticEntity:return`${ye(s.entity,s.entity.project)} has a non-static property in a static entity`;case we.StaticEntityWithNonStaticProperties:return`${ye(s.entity,s.entity.project)} has non-static properties in a static entity`;case we.ReadingFromIncompatibleType:return`${ye(s.entity,s.entity.project)} reads data from a value of a different data type`;case we.WritingToIncompatibleType:return`${ye(s.entity,s.entity.project)} writes data to a value of a different data type`;case we.ScopeWithoutLogic:return`${ye(s.entity,s.entity.project)} has no logic`;case we.NonStaticPropertyImplementsStatic:return`${ye(s.entity,s.entity.project)} has a static property in a non-static entity`;case we.PropertyImplementsIncompatibleType:return`${ye(s.entity,s.entity.project)} implements a property of a different data type`;case we.PropertyImplementsNonAbstact:return`${ye(s.entity,s.entity.project)} implements a non-template property`;case we.StaticPropertyImplementsNonStatic:return`${ye(s.entity,s.entity.project)} has a static property in a non-static entity`;case we.VariableCallsOthersAndHasInternalCall:return`${ye(s.entity,s.entity.project)} calls other entities while being used to execute internal logic`;case we.VariableHasInputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has inputs while being used to execute internal logic`;case we.VariableHasOutputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has outputs while being used to execute internal logic`;case we.VariableIsCalledAndHasInternalCall:return`${ye(s.entity,s.entity.project)} is called while being used to execute internal logic`;case Pe.InternalCallDeclarationIsInvalidType:return`${ye(s.entity,s.entity.project)} has a declaration that is not an action`;case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has a declaration that is not found in ${(u=s.entity.parent.getDataType(null))!=null&&u.entity?ye((i=s.entity.parent.getDataType(null))==null?void 0:i.entity,s.entity.project):"the variable's data-type entity"}`;case Pe.InternalCallParentDeclarationEntityInvalidType:return`${ye(s.entity,s.entity.project)} is part of a variable whos data-type entity can't have actions`;case Pe.InternalCallParentMissingDataType:return`${ye(s.entity,s.entity.project)} is part of a variable with no data-type entity`;case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has a declaration doesn't belong to ${(r=s.entity.parent.getDataType(null))!=null&&r.entity?ye((a=s.entity.parent.getDataType(null))==null?void 0:a.entity,s.entity.project):"the variable's data-type entity"}`;case Pe.UnreachableEntity:return`${ye(s.entity,s.entity.project)} is unreachable`;case we.DisconnectedCallableEntity:return`${ye(s.entity,s.entity.project)} is disconnected and won't be executed by anything after publishing`;case we.AbstractEntityImplements:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.AbstractExtendingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a non-template entity`;case we.InvalidPropertiesCombination:return`${ye(s.entity,s.entity.project)} has an invalid combination of properties`;case we.ExtendingNonInteractiveEntity:return`${ye(s.entity,s.entity.project)} extends a non-interactive entity`;case we.ExtendsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} extends incompatible entities`;case we.ImplementingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.ImplementsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} implements incompatible entities`;case we.LackingReturnStatementOnSomeBranches:return`${ye(s.entity,s.entity.project)} has branches that don't terminate`;case we.LastCalledEntityMustBeReturnEntity:return`${ye(s.entity,s.entity.project)} must end with a termination node`;case we.MissingRequiredValue:return`${ye(s.entity,s.entity.project)} is missing a required value`;case we.NoPrimaryKeyProperty:return`${ye(s.entity,s.entity.project)} has no primary key property`;case we.NonAbstractExtendingAbstractEntity:return`${ye(s.entity,s.entity.project)} is a non-template entity extending a template entity`;case we.NonStaticExtendingStaticEntity:return`${ye(s.entity,s.entity.project)} is a non-static entity extending a static entity`;case we.NonStaticImplementingStaticEntity:return`${ye(s.entity,s.entity.project)} is a non-static entity implementing a static entity`;case we.StaticExtendingNonStaticEntity:return`${ye(s.entity,s.entity.project)} is a static entity extending a non-static entity`;case we.StaticImplementingNonStaticEntity:return`${ye(s.entity,s.entity.project)} is a static entity implementing a non-static entity`;case we.VariableReadsValueAndInternalCall:return`${ye(s.entity,s.entity.project)} reads a value and has an internal call`;case we.VariableWritesValuesAndInternalCall:return`${ye(s.entity,s.entity.project)} writes values and has an internal call`;case Pe.EmptyName:return`${Js[s.entity.type]} has no name`;case Pe.InvalidObjectStructure:return`${ye(s.entity,s.entity.project)} has an invalid structure`;case Pe.LoopBodyFunctionOverwrite:return`${ye(s.entity,s.entity.project)}'s loop body action overwrites`;case Pe.MethodOverwritesBaseMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites a base action with same implementation`;case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MissingCaller:return`${ye(s.entity,s.entity.project)} is missing a caller`;case Pe.NameAsResolvedCodeNameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a name that is not unique in the scope`;case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return`${ye(s.entity,s.entity.project)} name can only contain letters, numbers, underscores and spaces`;case Pe.NameMustStartWithLetterOrUnderscore:return`${ye(s.entity,s.entity.project)} name must start with letter or underscore`;case Pe.NoOverlapWithImplementedSignature:return`${ye(s.entity,s.entity.project)} has no overlap with implemented signature`;case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites a base property with same implementation`;case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.ReaderWriterIncompatibleDataType:return`${ye(s.entity,s.entity.project)} has a reader/writer with incompatible data type`;case au.StatusCodeMustBeBetween100And599:return`${ye(s.entity,s.entity.project)} HTTP status code must be between 100 and 599`;case au.StatusCodeMustBeNumber:return`${ye(s.entity,s.entity.project)} HTTP status code must be a number, between 100 and 599`;case el.UUIDMustBeString:return`${ye(s.entity,s.entity.project)} UUID must be a string, eg: "${cc()}"`;case el.UUIDMustNotContainSpaces:return`${ye(s.entity,s.entity.project)} UUID must not contain spaces, eg: "${cc()}"`;case el.UUIDMustBeValidFormat:return`${ye(s.entity,s.entity.project)} UUID must be in a valid format. Eg: "${cc()}"`;case Ra.MustBeUniqueAmongSameEntities:return`${ye(s.entity,s.entity.project)} value must be unique among the same kind`;case Ra.StringValueMustNotHaveDashes:return`${ye(s.entity,s.entity.project)} value must not contain dashes`;case Ra.StringValueMustNotHaveSpaces:return`${ye(s.entity,s.entity.project)} value must not contain spaces`;case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return`${ye(s.entity,s.entity.project)} cannot be called in a parallel branch`;case we.DefaultValueOverridesConstantProperty:return`${ye(s.entity,s.entity.project)} default value overrides constant property`;case we.DefaultValueOverridesConstantVariable:return`${ye(s.entity,s.entity.project)} default value overrides constant variable`;case we.EmptyGroupCondition:return`${ye(s.entity,s.entity.project)} contains an empty group condition`;case we.HigherScopeThanDeclaration:return`${ye(s.entity,s.entity.project)} is in a higher scope than its declaration`;case we.MissingEnumOptions:return`${ye(s.entity,s.entity.project)} is missing enum options`;case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return`${ye(s.entity,s.entity.project)} catches its errors but its parent scope requires a returned value`;case we.ValueReadingOverridesConstantProperty:return`${ye(s.entity,s.entity.project)} is reading a value, but it is a constant property`;case we.ValueReadingOverridesConstantVariable:return`${ye(s.entity,s.entity.project)} is reading a value, but it is a constant variable`;case Pe.GlobalVariableDeclarationCannotBeCalled:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot be called`;case Pe.GlobalVariableDeclarationCannotCallOnError:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot call on error`;case Pe.GlobalVariableDeclarationCannotCatchError:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot catch errors`;case Pe.InternalCallDeclarationNotFound:return`${ye(s.entity,s.entity.project)}'s declaration isn't found`;case Pe.NameIsForbiddenKeyword:return`${ye(s.entity,s.entity.project)}'s name is a forbidden keyword`;default:return`${ye(s.entity,s.entity.project)} Error: ${Nb(s.code)}`}}function Vb(s){const u=(s||"").startsWith("error-caller-only--");switch(u?s.replace("error-caller-only--",""):s){case Di.CallIsInHigherScope:return"In a higher scope";case Di.CallIsInLowerScope:return"In a lower scope";case Di.CallerIsInHigherScope:return"Caller is in a higher scope";case Di.CallerIsInLowerScope:return"Caller is in a lower scope";case Di.CannotBeCalledByChildren:return"Cannot be called by children";case Di.CannotCallAncestor:return"Cannot call ancestor";case Di.CannotConnectToItself:return"Cannot connect to itself";case Di.CannotReadMoreThanOneValue:return"Cannot read more than one value";case Di.CannotReadValueFromChildren:return"Cannot read value from entities executed after itself";case Di.CannotWriteValueToAncestor:return"Cannot write value to ancestor";case bE.Suggestion:return"Suggestion";case Di.ContinueOrBreakStatementCalledFromOutsideLoop:return"Cannot be called from outside loop";case Di.DataTypesNotCompatible:return"Data types not compatible";case Di.ElementInLoopBodyCallingOutsideLoop:return"Cannot call outside loop";case Di.ErrorOututMapCannotBeConnectedToParentSuccessBranchCallees:return"Error cannot be connected to success branch";case Di.ExecutionsAlreadyConnected:return"Executions already connected";case Di.IsNotValueReadingEntity:return"Is not a value reading entity";case Di.IsNotValueWritingEntity:return"Is not a value writing entity";case Di.NotInScope:return"Not in a compatible scope";case Di.OtherIncompatibleScopeReason:return"Incompatible scope";case Di.SiblingInternalCallAlreadyUsedInParentVariable:return"Internal call already used in parent variable";case Di.SuccessOutputMapCannotBeConnectedToParentErrorBranchCallees:return"Success cannot be connected to error branch";case Di.ValuesAlreadyConnected:return"Values already connected";case Di.CannotInteractWithInputInVariableWithInternalCalls:return"Cannot interact with input in variable with internal calls";case Di.CannotInteractWithOutputInVariableWithInternalCalls:return"Cannot interact with output in variable with internal calls";case bE.CanvasGloballyDisabled:return"Canvas is globally disabled";case Di.PropertyIsConstantItsValueCantBeReset:return"Property is constant, its value can't be reset";case Di.CannotWriteValueOfGlobalVariableDeclaration:return"Cannot write value of global variable declaration";case Di.CannotReSetValueOfConstantVariable:return"Cannot re-set value of constant variable";case Di.CannotConnectToOwnNode:return"It is part of the same node";case Di.CalledByErrorMustBePassThroughCallable:return"Called by error must be pass-through callable";case Di.CannotChangeScopeBecauseItCallsOtherEntities:return"Cannot change scope because it calls other entities in its current scope";case Di.CannotChangeScopeBecauseItIsAlreadyCalledByOtherEntitiesInDifferentScope:return"Cannot change scope because it is already called by other entities in different scope";case Di.VariableDeclarationCannotBeMovedToLowerScopeBecauseInstancesUsage:return"Variable declaration cannot be moved to lower scope because its instances are used in the current or different incompatible lower scope";case Di.CalledBySourceMustBeCallerEntity:return"Not a caller type";case Di.CalledByErrorCannotBeConnectedToEntitiesCalledByOwnSuccessBranch:return"Already connected to the success branch from a common origin caller";case Di.CalledBySuccessCannotBeConnectedToEntitiesCalledByOwnErrorBranch:return"Already connected to the error branch from a common origin caller";case Di.RedundantCall:return"Redundant call. Already connected further down the execution path";case Di.CannotBeCalledBeforeDeclaration:return"Cannot be called before declaration";case Di.CannotBeCalledInParallelBranchToDeclaration:return"Cannot be called in parallel branch to declaration";case Di.CannotBeHigherScopeThanDeclaration:return"Cannot be in a higher scope than declaration";case Di.CannotCallGlobalVariableDeclaration:return"Cannot call global variable declaration";case Di.EntityAlreadyCalledBySuccessCannotBeConnectedToUnrelatedErrorBranch:return u?"Cannot connect error: Already connected to a success branch from a common origin caller":"Already connected to a success branch from a common origin caller";case Di.CannotInteractWithInputInGlobalVariableDeclaration:return"Cannot interact with input in global variable declaration";case Di.IsNotCallableEntity:return"Is not a callable node type";case Di.IsNotCallerEntity:return"Is not a caller node type";case Di.IsNotPassThroughCallableEntity:return"Is not a pass-through callable node type that has an error branch";case Di.NotAConnectableEntityType:return"Not a connectable node type";case Di.WouldMakeAnEarlierNodeBeCalledBeforeItsDeclaration:return"Would make an earlier node be called before its declaration";default:return _f(s||"")}}function wDi(s,u){const i=[...s,...u],r=Array.from(new Set(i));return{hasChanged:r.length!==s.length,reasons:r}}function DDi(s,u){const i=s.filter(a=>!u.includes(a));return{hasChanged:i.length!==s.length,reasons:i}}function CDi(s,u){return s.find(i=>i.entity.id===u)||null}function Zj(s){return s.filter((u,i)=>s.indexOf(u)===i)}class $n{constructor(u,i,r=null,a){w(this,"ids",[]);w(this,"entity");w(this,"entityCardHeight");w(this,"entityCardWidth");w(this,"index");w(this,"childEntities",[]);w(this,"children",[]);w(this,"parents",[]);w(this,"calculationEntryPoint");w(this,"_onlyEntities",null);w(this,"_changeSet",null);if(this.index=i,this.entity=u,this.calculationEntryPoint=r||this,this._changeSet=a||null,this===this.calculationEntryPoint&&!a)throw new Error("Change-set must be provided for the calculation entry point");this.calculateCardSize(),this.getSortedChildren()}static autoGenerateLayout(u,i,r){const a=UGe-UI-TL,c=jGe-vI-vL;u.type===d.Project?(u.x=a,u.y=c):u.metaSync({x:u.x||a,y:u.y||c},i);const e=new $n(u,0,null,i);e.calculationEntryPoint=e,e._onlyEntities=r||[],e.ids=["0"];const f=[];e.next(m=>{f.push(...m)}),$n.recursivelyAssembleChildrenAreas(f),e.resolveChildrenOverlaps();const h=e.flattenChildEntities();return e._onlyEntities?h.filter(m=>{var v;return(v=e._onlyEntities)==null?void 0:v.includes(m)}):h}static recursivelyAssembleChildrenAreas(u){const i=[];u.forEach(r=>{r.next(a=>{i.push(...a)})}),i.length>0&&$n.recursivelyAssembleChildrenAreas(i)}get onlyEntities(){return this.calculationEntryPoint._onlyEntities||[]}get changeSet(){return this.calculationEntryPoint._changeSet}set changeSet(u){this.calculationEntryPoint._changeSet=u}findAreaInChildrenFromEntity(u){if(this.entity===u)return this;const i=this.children.find(a=>a.entity===u);return i||this.children.reduce((a,c)=>a||c.findAreaInChildrenFromEntity(u),null)}findAreaFromEntity(u){if(this.entity===u)return this;const i=this.calculationEntryPoint.children,r=i.find(c=>c.entity===u);return r||i.reduce((c,e)=>c||e.findAreaInChildrenFromEntity(u),null)}addParent(u){if(!this.parents.includes(u)){const i=$n.resolveIds(u,this.index);this.ids.push(...i),this.parents.push(u)}}static resolveIds(u,i){return u?u.ids.map(r=>`${r}-${i}`):[`${i}`]}getSortedChildren(){if(this.entity.collapsed){this.childEntities=[];return}const u=Jo(this.entity,!0);if(this.entity.type===d.Project){const i=[],r=[],a=[];u.forEach(e=>{if(d.DefinitionEntity===e.type){r.push(e);return}else if(mi.includes(e.type)){a.push(e);return}i.push(e)});const c=i.sort((e,f)=>{const h=!!QI(e,f).length,m=Jo(e),v=Jo(f);return h?0:m.length&&!v.length?-1:!m.length&&v.length?1:0}).filter(e=>!$f(e).length);this.childEntities=[...r,...a,...c]}else{const i=[],r=[],a=[],c=[],e=[];br.includes(this.entity.type)&&uD(this.entity).forEach(m=>{if(hi.includes(m.type)){a.push(m);return}const v=Mt(m);i.push(v)}),en.includes(this.entity.type)&&r.push(...this.entity.detachedChildren);const f=u.filter(h=>{const m=i.includes(h);return m||a.includes(h)||r.includes(h)?!1:hi.includes(h.type)?(a.push(h),!1):Ar.includes(h.type)&&!m?(c.push(h),!1):h.type===d.DefinitionEntity?(e.push(h),!1):!0});i.sort((h,m)=>Zo(h,m)?-1:0),c.sort((h,m)=>Zo(h,m)?-1:0),a.sort((h,m)=>mN(h,m)?1:mN(m,h)?-1:0),this.childEntities=[...e,...i,...c,...f,...a,...r]}}calculateCardSize(){const u=FGe(this.entity);this.entityCardWidth=u.width,this.entityCardHeight=u.height}static getBoundriesOfTwoAreas(u,i){return{top:Math.min(u.top,i.top),left:Math.min(u.left,i.left),bottom:Math.max(u.bottom,i.bottom),right:Math.max(u.right,i.right)}}static getBoundriedOfCombinedAreas(u,i){const r=u.filter(c=>!i.includes(c));return r.reduce((c,e)=>i.includes(e)?c:$n.getBoundriesOfTwoAreas(c,e.fullBranchArea),r[0].fullBranchArea)}getFullAreaUntilAny(u){const i=this.ownEntityPlusBufferArea;return this.children.filter(e=>!u.includes(e)).map(e=>e.getFullAreaUntilAny(u)).reduce((e,f)=>$n.getBoundriesOfTwoAreas(e,f),i)}getFullAreaUntilAreaOrAnyChildren(u){const i=[u,...u.flattenChildren()],r=this.ownEntityPlusBufferArea;return this.children.filter(e=>i.includes(e)).map(e=>e.getFullAreaUntil(u)).reduce((e,f)=>$n.getBoundriesOfTwoAreas(e,f),r)}getFullAreaUntil(u){const i=this.ownEntityPlusBufferArea;return this.children.filter(c=>c!==u).map(c=>c.getFullAreaUntil(u)).reduce((c,e)=>$n.getBoundriesOfTwoAreas(c,e),i)}get fullBranchArea(){const u=this.ownEntityPlusBufferArea;return this.children.map(a=>a.fullBranchArea).reduce((a,c)=>$n.getBoundriesOfTwoAreas(a,c),u)}get ownEntityArea(){return{top:this.entity.y,left:this.entity.x,bottom:this.entity.y+this.entityCardHeight,right:this.entity.x+this.entityCardWidth}}get ownEntityPlusBufferArea(){const u=this.ownEntityArea;return{top:u.top,left:u.left,bottom:u.bottom+vI,right:u.right+UI}}static filterOutRepeatedAreas(u){return u.filter((i,r)=>u.indexOf(i)===r)}getEarliestId(u,i){const r=u.split("-"),a=i.split("-");return r.length<a.length?u:r.length>a.length?i:r.reduce((e,f,h)=>f<a[h]?u:i,u)}getEarliestLevel(){return this.ids.reduce((r,a)=>this.getEarliestId(r,a),this.ids[0]).split("-").length}countColumns(){let u=0;if(this!==this.calculationEntryPoint)u++;else return u;if(!this.parents.length)return u;const r=this.parents.reduce((a,c)=>c.getEarliestLevel()>a.getEarliestLevel()?c:a,this.parents[0]).countColumns();return u+=r,u}getLatestId(u,i){if(u===i)return u;const r=u.split("-"),a=i.split("-");return r.length<a.length?i:r.length>a.length?u:r.reduce((e,f,h)=>f>a[h]?u:i,u)}getLatestLevel(){return this.ids.length===1?this.ids[0].split("-").length:this.ids.reduce((r,a)=>this.getLatestId(r,a),this.ids[0]).split("-").length}smoothPosition(){const u=this.flattenSiblings();if(!u.length&&this.parents.length<=1&&this.children.length){const i=this.centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight();this.parents.forEach(r=>{r!==this.calculationEntryPoint&&r.shiftDownAlone(i)})}else if([...mi].includes(this.entity.type)&&this.children.length)this.centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight();else if(!this.children.length&&this.parents.length>1){const i=u.filter(r=>!this.parents.includes(r));i.length?i.every(a=>{const c=this.countColumns(),e=a.countColumns();return c>e})&&this.centerHeaderVerticallyOverCombinedAllParentsHeaderHeight():i.length||this.centerHeaderVerticallyOverCombinedAllParentsHeaderHeight()}}shiftDownUntilAny(u,i){if(u.includes(this))return u;this.move(this.entity,{y:this.entity.y+i});let r=[...u,this];return this.children.forEach(a=>{if($n.getEarliestParentInChain(a)!==this)return;const e=CDi(r,a.entity.id);r=$n.filterOutRepeatedAreas([...r]),e||(r=r.filter(h=>h!==a));const f=a.shiftDownUntilAny(r,i);r.push(...f)}),r}shiftRightUntilAny(u,i){u.includes(this)||(this.move(this.entity,{x:this.entity.x+i}),this.children.forEach(r=>{const a=$n.filterOutRepeatedAreas([...this.flattenSiblings(),...u]);$n.getEarliestParentInChain(r)===this&&r.shiftRightUntilAny(a,i)}))}shiftRight(u){this.move(this.entity,{x:this.entity.x+u}),this.children.forEach(i=>{const a=i.flattenSiblings().filter(c=>c!==i);i.shiftRightUntilAny(a,u)})}shiftDownAlone(u){this.move(this.entity,{y:this.entity.y+u})}centerHeaderVerticallyOverCombinedAllParentsHeaderHeight(){const u=this.parents.reduce((a,c)=>{const e=c.ownEntityArea,f=e.top+py,h={top:f,left:e.left,bottom:f,right:e.right};return $n.getBoundriesOfTwoAreas(a,h)},{top:1/0,left:1/0,bottom:-1/0,right:-1/0}),r=(u.bottom-u.top)/2-py;this.shiftDownAlone(r)}centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight(){const u=this.children.reduce((a,c)=>{const e=c.ownEntityArea,f=e.top+py,h={top:f,left:e.left,bottom:f,right:e.right};return $n.getBoundriesOfTwoAreas(a,h)},{top:1/0,left:1/0,bottom:-1/0,right:-1/0}),r=(u.bottom-u.top)/2-py;return this.shiftDownAlone(r),r}resolveChildrenOverlaps(){const u=this.flattenChildren();let i=[];u.forEach(r=>{const a=r.adjustVerticallyToAvoidOverlaps();i.push(...a)}),u.forEach(r=>{r.smoothPosition()})}static getEarliestParentInChain(u){let i=u.parents[0];return u.parents.length&&(i=u.parents.sort((r,a)=>{if(!r.ids.length)return-1;if(!a.ids.length)return 1;const c=r.ids.sort((f,h)=>f.length<h.length?-1:0),e=a.ids.sort((f,h)=>f.length<h.length?-1:0);return c[0].length-e[0].length})[0]),i}flattenEarlierSiblings(u=new Set){return u.add(this.entity.id),this.parents.reduce((r,a)=>{if(u.has(a.entity.id))return r;u.add(a.entity.id);const e=a.children.slice(0,a.children.indexOf(this)).reduce((f,h)=>[...f,h,...h.flattenChildren(u)],[]);return[...r,...e]},[])}flattenSiblings(u=new Set){return u.add(this.entity.id),this.parents.reduce((r,a)=>{if(u.has(a.entity.id))return r;u.add(a.entity.id);const e=a.children.filter(f=>f!==this).reduce((f,h)=>[...f,h,...h.flattenChildren(u)],[]);return[...r,...e]},[])}flattenChildren(u=new Set){return this.children.reduce((i,r)=>u.has(r.entity.id)?i:(u.add(r.entity.id),[...i,r,...r.flattenChildren(u)]),[])}flattenParents(u=new Set){return this.parents.reduce((r,a)=>u.has(a.entity.id)?r:(u.add(a.entity.id),[...r,a,...a.flattenParents(u)]),[])}getAreaIfRendered(u){return this.calculationEntryPoint.flattenChildren().find(a=>a.entity.id===u.id)||null}getLowerSiblings(){const u=this.parents.reduce((i,r)=>{const a=r.children.indexOf(this),c=r.children.slice(a+1);return[...i,...c]},[]);return Zj(u)}getLowerAreas(){const u=this.getLowerSiblings(),i=this.parents.reduce((r,a)=>[...r,...a.getLowerAreas()],[]);return Zj([...u,...i])}adjustVerticallyToAvoidOverlaps(u=[]){const r=$n.getEarliestParentInChain(this).children[this.index-1];if(!r)return u;const a=this.flattenEarlierSiblings(),c=this.flattenParents(),e=[...a,...c,r],m=P(e.flatMap(D=>QI(this.entity,D.entity))).filter(D=>D.id!==this.entity.id).map(D=>this.findAreaFromEntity(D)).filter(D=>!!D),v=this.getFullAreaUntilAny(m),b=r.getFullAreaUntilAny(m),A=e.reduce((D,R)=>R===this||R.fullBranchArea.left!==v.left?D:Math.max(D,R.fullBranchArea.bottom),b.bottom);if(v.top<A){const D=A-v.top+vI;return this.shiftDownUntilAny(u,D)}return u}move(u,i){if(this.onlyEntities.includes(u)){if(!this.changeSet)throw new Error("Change set is not defined for this area, cannot move entity");u.metaSync(i,this.changeSet)}}addChild(u){const i=this.childEntities[u];let r=null;i.x&&i.y?r=this.getAreaIfRendered(i):!i.x&&!i.y&&this.move(i,{x:this.entity.x,y:this.entity.y}),r||(r=new $n(i,u,this.calculationEntryPoint));const a=this.ownEntityPlusBufferArea;this.children.includes(r)||(this.children.push(r),r.addParent(this));const c=r.fullBranchArea;if(c.left<a.right){const e=a.right-c.left;r.shiftRight(e)}return r}flattenChildEntities(u=new Set){return this.children.reduce((i,r)=>u.has(r.entity.id)?i:(u.add(r.entity.id),[...i,r.entity,...r.flattenChildEntities(u)]),[])}next(u){const i=[];this.childEntities.forEach((r,a)=>{const c=this.addChild(a);c&&i.push(c)}),u(i)}}async function ODi(s,u,i={}){var c;const r=X.YieldTracker.from(i),a=[];console.log("Generating layout for project...");for(const e of s.instancesList){if(s.diggestedBuiltInBaseEntitiesIds.has(e.id)||!Ry.includes(e.type)||((c=Mt(e))==null?void 0:c.id)!==e.id)continue;let f=pi(e,s);if(!f){console.log("No top scope owner for instance: ",e," in project: ",s);continue}if(!(mi.includes(f.type)&&f.collapsed&&f.id!==e.id)){for(;f.parent&&f.parent!==s;)f=f.parent,mi.includes(f.type)&&f.collapsed&&(f.id,e.id);e.x=0,e.y=0,u==null||u.add(e,z.Updated),a.push(e),await r.tick()}}$n.autoGenerateLayout(s,u,a)}async function _Di(s,u,i={}){const r=X.YieldTracker.from(i),a=[],c=[s,...Nt(s)].map(e=>Mt(e)).filter(Boolean);for(const e of c){if(s.project.diggestedBuiltInBaseEntitiesIds.has(e.id))continue;let f=pi(e,s.project);if(f&&!(mi.includes(f.type)&&f.collapsed&&f.id!==e.id)){for(;f.parent&&f.parent!==s.project;)f=f.parent,mi.includes(f.type)&&f.collapsed&&(f.id,e.id);e.x=0,e.y=0,u==null||u.add(e,z.Updated),a.push(e),await r.tick()}}$n.autoGenerateLayout(s.project,u,a)}async function PDi(s,u,i={}){const r=X.YieldTracker.from(i),a=[],c=new Set;BSe(u,{shallowMissingActivesError:!0,excludeAffected:!0}).forEach(m=>{var b;if((!m.x||!m.y)&&!c.has(m.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(m.id)&&(a.push(m),c.add(m.id)),Xo(m,s)){const A=Mt(m);A&&!c.has(A.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(A.id)&&(a.push(A),c.add(A.id))}if(br.includes(m.type)){const A=m;[A,...Nt(A)].forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))})}m.type===d.DefinitionEntity&&m.methods.forEach(A=>{Nt(A).forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))})}),((b=m.parent)==null?void 0:b.type)===d.Project&&(a.push(m),c.add(m.id),br.includes(m.type)&&Nt(m).forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))}))});let f=[];for(const m of a)s.diggestedBuiltInBaseEntitiesIds.has(m.id)||(m.x=0,m.y=0,u==null||u.add(m,z.Updated),f.push(m),await r.tick());f=P(f),$n.autoGenerateLayout(s,u,f);const h=P([...f,...s.variableDeclarations,...s.variableInstances,...s.loops,...s.conditions,...s.operations,...s.searches]).filter(m=>m.x===0||m.y===0);$n.autoGenerateLayout(s,u,h)}var Bv=(s=>(s.Amazon="amazon",s.Google="google",s.Microsoft="microsoft",s))(Bv||{}),Jr=(s=>(s.RelationalDatabase="relational-database",s.CompiledLocalCodebase="compiled-local-codebase",s.CloudHostedCodebase="cloud-hosted-codebase",s.HttpApi="http-api",s.HttpEndpoint="http-endpoint",s.ServerlessFunction="serverless-function",s.CronJob="cron-job",s.AWSTenantAccount="aws-tenant-account",s))(Jr||{}),KP=(s=>(s.Post="post",s.Get="get",s.Acknowledgement="acknowledgment",s.Progress="progress",s.Error="error",s.Complete="complete",s))(KP||{}),oy=(s=>(s.Queued="queued",s.Running="running",s.Success="success",s.Failed="failed",s.CleanedUp="cleaned-up",s.Skipped="skipped",s.AbortedByUser="aborted-by-user",s.UnrecoverableFailure="unrecoverable-failure",s.Reverted="reverted",s.UnpublishingStarted="unpublishing-started",s.Unpublished="unpublished",s))(oy||{}),SP=(s=>(s.Queued="queued",s.Running="running",s.Success="success",s.Failed="failed",s.CleanedUp="cleaned-up",s.UnrecoverableFailure="unrecoverable-failure",s.Reverted="reverted",s.UnpublishingStarted="unpublishing-started",s.Unpublished="unpublished",s))(SP||{}),bi=(s=>(s.ProjectNotFound="project-not-found",s.ProjectPublishRequestAcknowledged="project-publish-request-acknowledged",s.PublicationStepFailedReasonUnknown="publication-step-failed-reason-unknown",s.DeploymentCompleted="deployment-completed",s.DeploymentStarted="deployment-started",s.DeploymentFailed="deployment-failed",s.AllInfrastructureSuccessfullyProvisioned="all-infrastucture-successfully-provisioned",s.RequestPayloadValidationFailed="request-payload-validation-failed",s.ProjectStateValidationFailedMissingName="project-state-validation-failed-missing-name",s.ProjectStateValidationFailedMissingAnyFunctionality="project-state-validation-failed-missing-any-functionality",s.ProjectAlreadyBeingPublished="project-already-being-published",s.BillingSubscriptionUpdateFailed="billing-subscription-update-failed",s.RelationalDatabaseDeploymentStarted="relational-database-deployment-started",s.RelationalDatabaseDeploymentCompleted="relational-database-deployment-completed",s.RelationalDatabaseDeploymentFailed="relational-database-deployment-failed",s.CreatingNewRelationalDatabase="creating-new-relational-database",s.WaitingForPreviousRelationalDatabaseDeployment="waiting-for-previous-relationa-database-deployment",s.RelationalDatabaseAlreadyExists="relational-database-already-exists",s.RelationalDatabaseDeletionStarted="relational-database-deletion-started",s.RelationalDatabaseDeletionCompleted="relational-database-deletion-completed",s.RelationalDatabaseDeletionFailed="relational-database-deletion-failed",s.WaitingForPreviousRelationalDatabaseDeletion="waiting-for-previous-relationa-database-deletion",s.HttpApiDeploymentStarted="http-api-deployment-started",s.HttpApiDeploymentCompleted="http-api-deployment-completed",s.HttpApiDeploymentFailed="http-api-deployment-failed",s.CreatingNewHttpApi="creating-new-http-api",s.HttpApiAlreadyExists="http-api-already-exists",s.HttpApiDeletionStarted="http-api-deletion-started",s.HttpApiDeletionCompleted="http-api-deletion-completed",s.HttpApiDeletionFailed="http-api-deletion-failed",s.WaitingForPreviousHttpApiDeletion="waiting-for-previous-http-api-deletion",s.BusinessLogicCodebaseDeploymentStarted="business-logic-codebase-deployment-started",s.BusinessLogicCodebaseDeploymentCompleted="business-logic-codebase-deployment-completed",s.BusinessLogicCodebaseDeploymentFailed="business-logic-codebase-deployment-failed",s.BundlingCodebaseForDownload="bundling-codebase-for-download",s.UploadingCodebaseToCloudStorage="uploading-codebase-to-cloud-storage",s.UploadingCodebaseToCloudStorageCompleted="uploading-codebase-to-cloud-storage-completed",s.UploadingCodebaseToCloudStorageFailed="uploading-codebase-to-cloud-storage-failed",s.InfrastructureValuesCodebaseInterpolationStarted="infrastructure-values-codebase-interpolation-started",s.InfrastructureValuesCodebaseInterpolationCompleted="infrastructure-values-codebase-interpolation-completed",s.InfrastructureValuesCodebaseInterpolationFailed="infrastructure-values-codebase-interpolation-failed",s.CodeCompilationStarted="code-compilation-started",s.CodeCompilationCompleted="code-compilation-completed",s.CodeCompilationFailed="code-compilation-failed",s.BundleCodebaseStarted="bundle-codebase-started",s.BundleCodebaseCompleted="bundle-codebase-completed",s.BundleCodebaseFailed="bundle-codebase-failed",s.InstallingCodebaseDependenciesStarted="installing-codebase-dependencies-started",s.InstallingCodebaseDependenciesCompleted="installing-codebase-dependencies-completed",s.InstallingCodebaseDependenciesFailed="installing-codebase-dependencies-failed",s.MigrateRelationalDatabaseStarted="migrate-relational-database-started",s.MigrateRelationalDatabaseCompleted="migrate-relational-database-completed",s.MigrateRelationalDatabaseFailed="migrate-relational-database-failed",s.ExecutePublicationCompletedEventStarted="execute-publication-completed-event-started",s.ExecutePublicationCompletedEventCompleted="execute-publication-completed-event-completed",s.ExecutePublicationCompletedEventFailed="execute-publication-completed-event-failed",s.ExecutePublicationCompletedEventTimedOut="execute-publication-completed-event-timed-out",s.AWSTenantAccountProvisioningStarted="aws-tenant-account-provisioning-started",s.AWSTenantAccountProvisioningCompleted="aws-tenant-account-provisioning-completed",s.AWSTenantAccountProvisioningFailed="aws-tenant-account-provisioning-failed",s))(bi||{}),Uo=(s=>(s.CodeCompilation="code-compilation",s.RelationalDatabaseDeployment="relational-database-deployment",s.RelationalDatabaseDeletion="relational-database-deletion",s.HttpApiDeployment="http-api-deployment",s.HttpApiDeletion="http-api-deletion",s.InfrastructureValuesCodebaseInterpolation="infrastructure-values-codebase-interpolation",s.BundleCodebase="bundle-codebase",s.MigrateRelationalDatabase="migrate-relational-database",s.BusinessLogicCodebaseDeployment="business-logic-codebase-deployment",s.ExecutePublicationCompletedEvent="execute-publication-completed-event",s.CodebaseCleanup="codebase-cleanup",s.AWSTenantAccountProvisioning="aws-tenant-account-provisioning",s))(Uo||{});Jr.CloudHostedCodebase,Jr.HttpApi,Jr.RelationalDatabase,Jr.CloudHostedCodebase,Jr.CloudHostedCodebase,Jr.RelationalDatabase,Jr.CloudHostedCodebase,Jr.CloudHostedCodebase;function SGe(s){return`project-${s}-http-api`}function Nw(s){return`entity-${s}-database`}class qGe{constructor(u,i,r,a,c,e,f,h,m){w(this,"stepType");w(this,"id");w(this,"resourceType");w(this,"index");w(this,"dependency",[]);w(this,"lastEvent",null);w(this,"lastEventTimestamp",null);w(this,"status",oy.Queued);w(this,"publicationRun");w(this,"resource");this.stepType=u,this.id=i,this.resourceType=r,this.status=a,this.dependency=c,this.index=e,this.lastEventTimestamp=f,this.publicationRun=h,this.resource=m}toJSON(){return{stepType:this.stepType,id:this.id,resourceType:this.resourceType,index:this.index,status:this.status,dependency:this.dependency,lastEvent:this.lastEvent,resource:{resourceId:this.resource.resourceId,resourceType:this.resource.resourceType,provider:this.resource.provider,details:this.resource.details,status:this.resource.status,name:this.resource.name}}}async update(u){var i,r;this.status=u.status,this.dependency=u.dependency,this.index=u.index,this.stepType=u.stepType,this.resourceType=u.resourceType,this.lastEvent=u.lastEvent,this.id=u.id,(r=this.resource)==null||r.setDetails((i=u.resource)==null?void 0:i.details)}}var ZGe=(s=>(s.Ready="ready",s.Provisioning="provisioning",s.Queued="queued",s.ProvisioningFailed="provisioning-failed",s.Deleting="deleting",s.DeletingFailed="deleting-failed",s.Deleted="deleted",s))(ZGe||{});class Pf{constructor(u,i,r){w(this,"provisionedBy");w(this,"publicationRun");w(this,"resourceType");w(this,"provider");w(this,"resourceId");w(this,"details",null);w(this,"name",null);w(this,"status","queued");this.publicationRun=u,this.resourceType=i,this.provider=r}setDetails(u){this.details=u}setStatus(u){this.status=u}setProvisionedBy(u){this.provisionedBy=u}}class NDi extends Pf{constructor(i,r,a){super(i,Jr.HttpEndpoint,a);w(this,"resourceType",Jr.HttpEndpoint);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class VDi extends Pf{constructor(i,r,a){super(i,Jr.ServerlessFunction,a);w(this,"resourceType",Jr.ServerlessFunction);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class HGe extends Pf{constructor(i,r,a){super(i,Jr.HttpApi,a);w(this,"resourceType",Jr.HttpApi);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=SGe(this.publicationRun.project.id),this.resourceId}}class WGe extends Pf{constructor(i,r,a){super(i,Jr.RelationalDatabase,a);w(this,"resourceType",Jr.RelationalDatabase);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class zGe extends Pf{constructor(i,r){super(i,Jr.CloudHostedCodebase,r);w(this,"resourceType",Jr.CloudHostedCodebase);w(this,"details",null);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`cloud-hosted-codebase--${this.publicationRun.project.id}--${this.publicationRun.project.version}`,this.resourceId}}class YGe extends Pf{constructor(i,r){super(i,Jr.CompiledLocalCodebase,r);w(this,"resourceType",Jr.CompiledLocalCodebase);w(this,"details",null);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`compiled-codebase--${this.publicationRun.project.id}--${this.publicationRun.project.version}--${this.publicationRun.id}`,this.resourceId}}class xDi extends Pf{constructor(i,r){super(i,Jr.AWSTenantAccount,r);w(this,"resourceType",Jr.AWSTenantAccount);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`aws-tenant-account--${this.publicationRun.project.id}`,this.resourceId}}class $Di{constructor(u,i){w(this,"id");w(this,"projectAutoIncrementPublicationCount");w(this,"projectPublishedSemanticVersion");w(this,"envIdentifier");w(this,"projectVersion");w(this,"projectBranchId");w(this,"projectId");w(this,"triggeredBy");w(this,"createdAt");w(this,"updatedAt");w(this,"status");w(this,"steps",[]);w(this,"editor");w(this,"explicitResources",new Map);w(this,"implicitGlobalResources",new Map);w(this,"finalGlobalEvent",null);w(this,"finalStatus",null);w(this,"contextType",le.PublicationRun);w(this,"extensionsRegistry");this.id=u.id,this.projectAutoIncrementPublicationCount=u.projectAutoIncrementPublicationCount,this.projectPublishedSemanticVersion=u.projectPublishedSemanticVersion,this.envIdentifier=u.envIdentifier,this.projectVersion=u.projectVersion,this.projectBranchId=u.projectBranchId,this.projectId=u.projectId,this.triggeredBy=u.triggeredBy,this.createdAt=u.createdAt,this.updatedAt=u.updatedAt,this.status=u.status,this.editor=i,this.initRegistry()}get off(){return this.extensionsRegistry.off}get on(){return this.extensionsRegistry.on}get emit(){return this.extensionsRegistry.emit}get emitAsync(){return this.extensionsRegistry.emitAsync}get emitAsyncAll(){return this.extensionsRegistry.emitAsyncAll}get emitAsyncAllSettled(){return this.extensionsRegistry.emitAsyncAllSettled}get emitAsyncSequentially(){return this.extensionsRegistry.emitAsyncSequentially}get emitAsyncSequentiallyAll(){return this.extensionsRegistry.emitAsyncSequentiallyAll}get emitAsyncSequentiallyAllSettled(){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled}get project(){return this.editor.project}getInfraTypes(u){return this.steps.filter(i=>u.includes(i.resourceType))}getStepsTypes(u){return this.steps.filter(i=>u.includes(i.stepType))}toIds(u){return u.map(i=>i.id)}getResourceForEntity(u){const i=Array.from(this.explicitResources.values()).find(r=>r.owners.has(u.id));return i||null}async init(){await this.initResources()}async initResources(){this.implicitGlobalResources.set(Jr.CompiledLocalCodebase,new YGe(this,Bv.Amazon)),this.implicitGlobalResources.set(Jr.CloudHostedCodebase,new zGe(this,Bv.Amazon));const u=this.project.entities.filter(r=>Gi(r,Ae.HTTP_ENDPOINT)),i=this.project.entities.filter(r=>Gi(r,Ae.RELATIONAL_DATABASE));if(i.length&&i.forEach(r=>{const a=new WGe(this,[r],Bv.Amazon);this.explicitResources.set(a.resourceId,a)}),u.length){const r=new HGe(this,u,Bv.Amazon);this.explicitResources.set(r.resourceId,r)}}setSteps(u,i){u.forEach(r=>{this.addStep(r,i)}),this.editor.events.emit(bi.ProjectPublishRequestAcknowledged,{})}addStep(u,i){const r=u.dependency||[];if(r.length){const c=r.filter(e=>!this.steps.find(f=>f.id===e));if(c.length)throw new Error(`Missing dependencies: ${c.join(", ")}`)}if(!this.steps.find(c=>c.id===u.id)){const c=new qGe(u.stepType,u.id,u.resourceType,u.status,r,u.index,i,this,null);this.steps.push(c)}}onUpdate(u){var i;if(X.Logger.log("onUpdate",u),(i=u.payload)!=null&&i.stepType){const r=this.steps.find(a=>{var c;return a.id===((c=u.payload)==null?void 0:c.id)});r&&U(u.emittedAt).isAfter(U(r.lastEventTimestamp))&&r.update(u.payload)}this.editor.events.emit("publication-updated",{}),u.type===KP.Error?(this.finalStatus=SP.Failed,this.finalGlobalEvent=u.event,this.editor.events.emit("project-publication-error",u)):u.type===KP.Complete&&(this.finalStatus=SP.Success,this.finalGlobalEvent=u.event,this.editor.events.emit("project-publication-completed",u))}requestExtension(u){return this.extensionsRegistry.requestExtension(u)}async initRegistry(){return this.extensionsRegistry=new pL(this.editor.events),await this.extensionsRegistry.setup(),this.extensionsRegistry.onResolvePublicationRunContext(()=>this),await this.extensionsRegistry.contextAvailable(le.PublicationRun),this.extensionsRegistry}}function LDi(s){switch(s){case Uo.CodeCompilation:return"Code generation";case Uo.RelationalDatabaseDeployment:return"Database creation";case Uo.HttpApiDeployment:return"HTTP gateway creation";case Uo.InfrastructureValuesCodebaseInterpolation:return"Link code with resources";case Uo.BundleCodebase:return"Bundle code";case Uo.MigrateRelationalDatabase:return"Database structure migration";case Uo.BusinessLogicCodebaseDeployment:return"Update servers with new code";case Uo.CodebaseCleanup:return"Code cleanup";case Uo.HttpApiDeletion:return"HTTP gateway deletion";case Uo.RelationalDatabaseDeletion:return"Database deletion";default:return"Publication finished"}}function BDi(s){switch(s){case bi.DeploymentCompleted:return"Successfully published";case bi.DeploymentStarted:return"Publication started";case bi.DeploymentFailed:return"Publication failed";case bi.AllInfrastructureSuccessfullyProvisioned:return"All infrastructure successfully provisioned";case bi.RequestPayloadValidationFailed:return"Request payload validation failed";case bi.ProjectStateValidationFailedMissingName:return"Project state validation failed: missing name";case bi.ProjectStateValidationFailedMissingAnyFunctionality:return"Project state validation failed: missing any functionality";case bi.RelationalDatabaseDeploymentStarted:return"Database creation started";case bi.RelationalDatabaseDeploymentCompleted:return"Database creation completed";case bi.RelationalDatabaseDeploymentFailed:return"Database creation failed";case bi.CreatingNewRelationalDatabase:return"Creating new database (up to 5 mins)";case bi.WaitingForPreviousRelationalDatabaseDeployment:return"Waiting for previous database creation";case bi.RelationalDatabaseAlreadyExists:return"Database already exists";case bi.HttpApiDeploymentStarted:return"HTTP gateway creation started";case bi.HttpApiDeploymentCompleted:return"HTTP gateway creation completed";case bi.HttpApiDeploymentFailed:return"HTTP gateway creation failed";case bi.CreatingNewHttpApi:return"Creating new HTTP gateway";case bi.HttpApiAlreadyExists:return"HTTP gateway already exists";case bi.BusinessLogicCodebaseDeploymentStarted:return"Update servers with new code started";case bi.BusinessLogicCodebaseDeploymentCompleted:return"Update servers with new code completed";case bi.BusinessLogicCodebaseDeploymentFailed:return"Update servers with new code failed";case bi.BundlingCodebaseForDownload:return"Bundling code for download";case bi.UploadingCodebaseToCloudStorage:return"Uploading code to cloud storage";case bi.InfrastructureValuesCodebaseInterpolationStarted:return"Linking code with resources started";case bi.InfrastructureValuesCodebaseInterpolationCompleted:return"Linking code with resources completed";case bi.InfrastructureValuesCodebaseInterpolationFailed:return"Linking code with resources failed";case bi.CodeCompilationStarted:return"Code generation started";case bi.CodeCompilationCompleted:return"Code generation completed";case bi.CodeCompilationFailed:return"Code generation failed";case bi.BundleCodebaseStarted:return"Code bundling started";case bi.BundleCodebaseCompleted:return"Code bundling completed";case bi.BundleCodebaseFailed:return"Code bundling failed";case bi.InstallingCodebaseDependenciesStarted:return"Installing code dependencies";case bi.InstallingCodebaseDependenciesCompleted:return"Installing code dependencies completed";case bi.InstallingCodebaseDependenciesFailed:return"Installing code dependencies failed";case bi.MigrateRelationalDatabaseStarted:return"Database structure migration started";case bi.MigrateRelationalDatabaseCompleted:return"Database structure migration completed";case bi.MigrateRelationalDatabaseFailed:return"Database structure migration failed";case bi.ProjectAlreadyBeingPublished:return"Project already being published. You need to wait for the previous publication to complete";case bi.ProjectPublishRequestAcknowledged:return"Project publish request acknowledged";case bi.UploadingCodebaseToCloudStorageCompleted:return"Uploading code to cloud storage completed";case bi.UploadingCodebaseToCloudStorageFailed:return"Uploading code to cloud storage failed";case bi.BillingSubscriptionUpdateFailed:return"Billing subscription update failed";case bi.ProjectNotFound:return"Project not found";case bi.HttpApiDeletionCompleted:return"HTTP gateway deletion completed";case bi.HttpApiDeletionFailed:return"HTTP gateway deletion failed";case bi.HttpApiDeletionStarted:return"HTTP gateway deletion started";case bi.PublicationStepFailedReasonUnknown:return"Publication step failed: reason unknown";case bi.WaitingForPreviousHttpApiDeletion:return"Waiting for previous HTTP gateway deletion";case bi.RelationalDatabaseDeletionStarted:return"Database deletion started";case bi.RelationalDatabaseDeletionCompleted:return"Database deletion completed";case bi.RelationalDatabaseDeletionFailed:return"Database deletion failed";case bi.WaitingForPreviousRelationalDatabaseDeletion:return"Waiting for previous database deletion"}return"Unknown event"}var JGe=(s=>(s.NO_LOGIC="NO_LOGIC",s.NO_NAME="NO_NAME",s.NO_CHANGES="NO_CHANGES",s.PROJECT_PUBLICATION_ALREADY_ONGOING="PROJECT_PUBLICATION_ALREADY_ONGOING",s))(JGe||{});function MDi(s){switch(s){case"NO_LOGIC":return"This project has no logic";case"NO_NAME":return"This project has no name";case"NO_CHANGES":return"This version has already been published";case"PROJECT_PUBLICATION_ALREADY_ONGOING":return"This project is already being published";default:return"Publishing is currently not available. Try again later"}}function GDi(s){switch(s){case Jr.RelationalDatabase:return"Relational database";case Jr.HttpEndpoint:case Jr.HttpApi:return"HTTP endpoints";case Jr.ServerlessFunction:case Jr.CloudHostedCodebase:return"Server code functions";default:return"Resources"}}function kDi(s){switch(s){case oy.Running:return"In progress";case oy.Failed:return"Failed";case oy.Success:return"Succeeded";case oy.Skipped:return"Skipped";case oy.Queued:default:return"Queued"}}async function QGe(s,u={}){var h;const i=X.YieldTracker.from(u),r=ts(s),a=is(s),c=[...r,...a,...ta(s),...bL(s),...rs(s),...AL(s)],e=Qb(s);c.push(...e);const f=Ti(s.errors,c);await i.tick();for(const m of s.inputs)await m.validateAsync({tracker:i});for(const m of s.outputs)await m.validateAsync({tracker:i});for(const m of s.internalCalls)await m.validateAsync({tracker:i});return await((h=s.dataType)==null?void 0:h.validateAsync({tracker:i})),f}function XGe(s){var c;(c=s.dataType)==null||c.validate(),s.inputs.forEach(e=>e.validate()),s.outputs.forEach(e=>e.validate()),s.internalCalls.forEach(e=>e.validate());const u=ts(s),i=is(s),r=[...u,...i,...ta(s),...bL(s),...rs(s),...AL(s)],a=Qb(s);return r.push(...a),Ti(s.errors,r)}function bL(s,u){const r=[...s.project.getVariableDeclarations()].filter(a=>a.id!==s.id);return eA(s,[$r],r,u)}function AL(s){const u=[];if(s.parent!==s.project)return u;if(s.catchesError){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotCatchError}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot catch an error because it is globally declared. Global variable declarations must crash the project if an error occurs.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotCatchError,entity:s});u.push(i.error)}if(s.errorCalls.length){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotCallOnError}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot call other entities from its error branch because it is globally declared. Global variable declarations must crash the project if an error occurs.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotCallOnError,entity:s});u.push(i.error)}if(s.calledBy.length){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotBeCalled}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot be called because it is globally declared. Global variable declarations must be self initialized when the project is loaded, and not be called for initialization.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotBeCalled,entity:s});u.push(i.error)}return[]}const UDi=Object.freeze(Object.defineProperty({__proto__:null,validate:XGe,validateAsync:QGe,validateGlobalVariableDeclaration:AL,validateVariableDeclarationName:bL},Symbol.toStringTag,{value:"Module"}));async function eke(s,u={}){const i=X.YieldTracker.from(u),r=ts(s),a=is(s),c=[...r,...a,...ta(s),...rs(s),...Hd(s),...ike(s)],e=Qb(s);c.push(...e);const f=Ti(s.errors,c);await i.tick();for(const h of s.inputs)await h.validateAsync({tracker:i});for(const h of s.outputs)await h.validateAsync({tracker:i});for(const h of s.internalCalls)await h.validateAsync({tracker:i});return f}function tke(s){s.inputs.forEach(c=>c.validate()),s.outputs.forEach(c=>c.validate()),s.internalCalls.forEach(c=>c.validate());const u=ts(s),i=is(s),r=[...u,...i,...ta(s),...rs(s)],a=Qb(s);return r.push(...a),Ti(s.errors,r)}function ike(s){const u=[],i=s.declaration.constant;if(i&&s.readsValue){const r=Wt({id:`${s.id}--${we.ValueReadingOverridesConstantVariable}`,message:`The '${s.type}' entity "${ye(s,s.project)}" with id "${s.id}" is a constant variable whose value cannot be overriden, but reads a value.`,severity:Ee.Error,code:we.ValueReadingOverridesConstantVariable,entity:s});u.push(r.error)}if(i&&s.defaultValue){const r=Wt({id:`${s.id}--${we.DefaultValueOverridesConstantVariable}`,message:`The '${s.type}' entity "${ye(s,s.project)}" with id "${s.id}" is a constant variable whose value cannot be overridden, but has a 'defaultValue'.`,severity:Ee.Error,code:we.DefaultValueOverridesConstantVariable,entity:s});u.push(r.error)}return u}function Hd(s){var h;const u=[],i=s.declaration;if((i==null?void 0:i.id)===((h=s.parent)==null?void 0:h.id)||!s.calledBy.length&&!s.successCalls.length&&!s.errorCalls.length&&s.usedInternalCalls.length)return u;const r=Nt(s),a=Nt(i);!!r.find(m=>m.id===i.id)&&u.push(Wt({id:`${s.id}--${we.CalledBeforeDeclaration}`,code:we.CalledBeforeDeclaration,severity:Ee.Error,message:`Entity of type "${s.type}" with id "${s.id}" is called before its 'variable-declaration' '${i.name}' with id "${i.id}".
|
|
72
|
+
`,"color: #3b82f6; font-weight: bold;");const a={...Qp,...i};this.state="running";const c=this.project.activeExecution;this.project.activeExecution=this;try{const e=await this.executeBranch(this.entryPoint,a,r);return this.state="finished-success",e}finally{this.project.activeExecution=c}}getExecutionLevels(){const i=[];let r=this;for(;r;){const a=r.entryPoint,c=a?ye(a,this.project):"Unknown",e=a?a.type:"unknown";i.unshift(`${e} "${c}"`),r=r.parentExecution}return i.join(" -> ")}logBeforeExecution(i,r,a){var v,b;const c=this.getExecutionLevels(),e=pi(r,this.project),f=e?ye(e,this.project):"Project",h=e?e.type:"Project",m=ye(r,this.project);if(console.log(`%c[Execution: ${c}] %c[Scope: ${h} "${f}"]`,"color: #3b82f6; font-weight: bold;","color: #10b981; font-weight: bold;"),console.log(`%c${i} (${r.type}) -> [${m}]%c Inputs:`,"font-weight: bold; color: #224370ff;","color: #9ca3af;"),a.length?a.forEach(A=>{var R,O,$;const D=ye(A.valueOwner,this.project);console.log(` %c${(R=A.valueOwner)==null?void 0:R.type}%c (${(O=A.valueOwner)==null?void 0:O.id}) %c"${D}"%c:`,"color: #8b5cf6; font-weight: bold;","color: #9ca3af;","color: #10b981; font-weight: bold;","color: #667a9bff;",($=A.value)==null?void 0:$.value)}):console.log(" (none)"),r.type===d.VariableInstance||r.type===d.VariableDeclaration){const A=zr(r),D=Hu(A,this.valueResolutionContext);console.log(` %cExisting Value%c of [${ye(A,this.project)}]:`,"color: #ec4899; font-weight: bold;","color: #667a9bff;",(v=D==null?void 0:D.value)==null?void 0:v.value)}if(r.type===d.InternalCall){const A=r.parent;if(A){const D=Hu(A,this.valueResolutionContext);console.log(` %cParent Variable%c [${ye(A,this.project)}] Value:`,"color: #f59e0b; font-weight: bold;","color: #667a9bff;",(b=D==null?void 0:D.value)==null?void 0:b.value)}}}addEntity(i){var r;this.entities.includes(i)||(this.entities.push(i),(r=this.onAddEntityCallback)==null||r.call(this,i,{}))}async addEntityAsync(i,r={}){var a;this.entities.includes(i)||(this.entities.push(i),await((a=this.onAddEntityCallback)==null?void 0:a.call(this,i,r)))}addEntities(i){i.forEach(r=>this.addEntity(r))}async addEntitiesAsync(i,r={}){const a=X.YieldTracker.from(r),c=[];for(const e of i)c.push(this.addEntityAsync(e,r)),await a.tick();await Promise.all(c)}removeEntity(i){var r;if(i!==this.entryPoint){const a=this.entities.indexOf(i);a>-1&&(this.entities.splice(a,1),(r=this.onRemoveEntityCallback)==null||r.call(this,i,{}))}}hasEntity(i){var r;return this.entities.includes(i)?!0:i.parent&&((r=i.parent)==null?void 0:r.id)!==(i==null?void 0:i.id)?this.hasEntity(i.parent):!1}removeScheduled(i){const r=this.scheduled.indexOf(i);r>-1&&this.scheduled.splice(r,1)}hasScheduled(i){return!!this.scheduled.includes(i)}hasSkipped(i){return!!this.skipped.includes(i)}hasExecuted(i){return!!this.executed.includes(i)}hasEntityWithId(i){const r=this.project.get(i);return r?this.hasEntity(r):!1}onAddToSkippedList(i){this.onAddToSkippedListCallback=i}onAbortExecution(i){this.onAbortExecutionCallback=i}onAddEntity(i){this.onAddEntityCallback=i}onRemoveFromSkippedList(i){this.onRemoveFromSkippedListCallback=i}onRemoveEntity(i){this.onRemoveEntityCallback=i}addToExecutingList(i){this.executing.includes(i)||this.executing.push(i)}addToScheduledList(i){this.scheduled.includes(i)||this.scheduled.push(i)}removeFromScheduledList(i){const r=this.scheduled.indexOf(i);r>-1&&this.scheduled.splice(r,1)}removeFromExecutingList(i){var a;const r=this.executing.indexOf(i);r>-1&&(this.executing.splice(r,1),(a=this.onAbortExecutionCallback)==null||a.call(this,i,{}))}removeFromAlreadyExecutedList(i){const r=this.executed.indexOf(i);r>-1&&this.executed.splice(r,1)}removeFromSkippedList(i){var a;const r=this.skipped.indexOf(i);r>-1&&(this.skipped.splice(r,1),(a=this.onRemoveFromSkippedListCallback)==null||a.call(this,i,{}))}addToAlreadyExecutedList(i){this.executed.includes(i)||this.executed.push(i)}addToSkippedList(i){var r;this.skipped.includes(i)||(this.skipped.push(i),(r=this.onAddToSkippedListCallback)==null||r.call(this,i,{}))}getValueTypePreference(i){return this.parentContext.getValueTypePreference(i)||null}setValueTypePreference(i,r){this.parentContext.setValueTypePreference(i,r),this.emit(i,{})}}function mDi(s){var u,i;if(s.isList)return"list";if(((u=s.entity)==null?void 0:u.type)===d.DefinitionEntity)return"definition-entity";switch((i=s.entity)==null?void 0:i.name){case he.Number:return"number";case he.String:return"text";case he.Boolean:return"boolean";case he.UUID:return"uuid";case he.Date:return"date-time";default:return"definition-entity"}}const Js={[d.PrimitiveEntity]:{singular:"Primitive",plural:"Primitives",shortSingular:"Primitive",shortPlural:"Primitives"},[d.DefinitionEntity]:{singular:"Definition",plural:"Definitions",shortSingular:"Definition",shortPlural:"Definitions"},[d.BuiltInBaseEntity]:{singular:"Base",plural:"Bases",shortSingular:"Base definition",shortPlural:"Base definitions"},[d.Property]:{singular:"Property",plural:"Properties",shortSingular:"Property",shortPlural:"Properties"},[d.FunctionDeclaration]:{singular:"Custom trigger",plural:"Custom triggers",shortSingular:"Trigger",shortPlural:"Triggers"},[d.FunctionCall]:{singular:"Execute trigger",plural:"Execute trigger",shortSingular:"Execute",shortPlural:"Execute"},[d.GlobalEvent]:{singular:"System trigger",plural:"System triggers",shortSingular:"Trigger",shortPlural:"Triggers"},[d.Project]:{singular:"Project",plural:"Projects",shortSingular:"Project",shortPlural:"Projects"},[d.VariableDeclaration]:{singular:"Variable",plural:"Variables",shortSingular:"Variable",shortPlural:"Variables"},[d.VariableInstance]:{singular:"Variable",plural:"Variables",shortSingular:"Variable",shortPlural:"Variables"},[d.Condition]:{singular:"Condition",plural:"Conditions",shortSingular:"Condition",shortPlural:"Conditions"},[d.Operation]:{singular:"Operation",plural:"Operations",shortSingular:"Operation",shortPlural:"Operations"},[d.ReturnStatement]:{singular:"Termination",plural:"Terminations",shortSingular:"Termination",shortPlural:"Terminations"},[d.InstalledProject]:{singular:"Installed project",plural:"Installed projects",shortSingular:"Project",shortPlural:"Projects"},[d.Search]:{singular:"Search",plural:"Searches",shortSingular:"Search",shortPlural:"Searches"},[d.Loop]:{singular:"Loop",plural:"Loops",shortSingular:"Loop",shortPlural:"Loops"},[d.ActionDescriptor]:{singular:"Action descriptor",plural:"Action descriptors",shortSingular:"Action descriptor",shortPlural:"Action descriptors"},[d.InternalCall]:{singular:"Internal call",plural:"Internal calls",shortSingular:"Internal call",shortPlural:"Internal calls"},[d.BreakStatement]:{singular:"Loop exit",plural:"Loop exists",shortSingular:"Exit",shortPlural:"Exits"},[d.ContinueStatement]:{singular:"Next iteration",plural:"Next iterations",shortSingular:"Next",shortPlural:"Nexts"},[d.ArgumentDeclaration]:{singular:"Input definition",plural:"Input definitions",shortSingular:"Input",shortPlural:"Inputs"},[d.InputMap]:{singular:"Input",plural:"Inputs",shortSingular:"Input",shortPlural:"Inputs"},[d.OutputMap]:{singular:"Output",plural:"Outputs",shortSingular:"Output",shortPlural:"Outputs"},[d.ValueDescriptor]:{singular:"Value descriptor",plural:"Value descriptors",shortSingular:"Value descriptor",shortPlural:"Value descriptors"},[d.DataType]:{singular:"Data type",plural:"Data types",shortSingular:"Data type",shortPlural:"Data types"},[d.LiteralValue]:{singular:"Literal value",plural:"Literal values",shortSingular:"Value",shortPlural:"Values"}};function yL(s){const u=cD(s);if(!u){const r=Rm(s);if(r.includes(Ae.HTTP_ENDPOINT))return"HTTP endpoint";if(r.includes(Ae.PERSISTED_ENTITY))return"SQL database table";if(r.includes(Ae.CRON_JOB))return"Scheduled execution";if(r.includes(Ae.RELATIONAL_DATABASE))return"Relational database";if(r.includes(Ae.CONTAINER_COMPUTE_ENTITY))return"Container compute";if(r.includes(Ae.VOLUME_ENTITY))return"Shared files drive";if(r.includes(Ae.COMPUTE_ENTITY))return"Compute";if(r.includes(Ae.AIRTABLE_AUTH_CONNECTION))return"Airtable account connection";if(r.includes(Ae.GOOGLE_AUTH_CONNECTION))return"Google account connection";if(r.includes(Ae.SLACK_AUTH_CONNECTION))return"Slack account connection";if(r.includes(Ae.ATLASSIAN_AUTH_CONNECTION))return"Atlassian account connection";if(r.includes(Ae.JIRA_AUTH_CONNECTION))return"Jira account connection";if(r.includes(Ae.MICROSOFT_AUTH_CONNECTION))return"Microsoft account connection";if(r.includes(Ae.OPENAI_AUTH_CONNECTION))return"OpenAI account connection";if(r.includes(Ae.EXTERNAL_INTEGRATION_CONNECTION))return"External account connection"}if(u){let r="Extension of "+ye(u,u.project)+" entity",a=Xs(r);const c=Rm(s);return c.includes(Ae.HTTP_ENDPOINT)?"HTTP endpoint"+(a?", "+a:""):c.includes(Ae.PERSISTED_ENTITY)?"SQL database table"+(a?", "+a:""):c.includes(Ae.CRON_JOB)?"Scheduled execution"+(a?", "+a:""):c.includes(Ae.RELATIONAL_DATABASE)?"Relational database"+(a?", "+a:""):c.includes(Ae.CONTAINER_COMPUTE_ENTITY)?"Container compute"+(a?", "+a:""):c.includes(Ae.VOLUME_ENTITY)?"Shared files drive"+(a?", "+a:""):c.includes(Ae.COMPUTE_ENTITY)?"Compute"+(a?", "+a:""):c.includes(Ae.AIRTABLE_AUTH_CONNECTION)?"Airtable account connection"+(a?", "+a:""):c.includes(Ae.GOOGLE_AUTH_CONNECTION)?"Google account connection"+(a?", "+a:""):c.includes(Ae.SLACK_AUTH_CONNECTION)?"Slack account connection"+(a?", "+a:""):c.includes(Ae.ATLASSIAN_AUTH_CONNECTION)?"Atlassian account connection"+(a?", "+a:""):c.includes(Ae.JIRA_AUTH_CONNECTION)?"Jira account connection"+(a?", "+a:""):c.includes(Ae.MICROSOFT_AUTH_CONNECTION)?"Microsoft account connection"+(a?", "+a:""):c.includes(Ae.OPENAI_AUTH_CONNECTION)?"OpenAI account connection"+(a?", "+a:""):c.includes(Ae.EXTERNAL_INTEGRATION_CONNECTION)?"External account connection"+(a?", "+a:""):r}let i="";return s.abstract&&(i="Template "),s.static&&(i+=i?" single copy ":"Single copy "),i?i+"definition":"Definition"}function GGe(s){return s.parent.type===d.DefinitionEntity||s.parent.type===d.InstalledProject?"Internal action of "+ye(s.parent,s.project):s.parent.type===d.Loop?"Action repeated on every iteration":"Internal action of entity"}function hL(s){return LB(s)?GGe(s):"Custom trigger"}function TDi(s){var u;switch(s.type){case d.DefinitionEntity:return yL(s);case d.FunctionDeclaration:return hL(s)}return(u=Js[s.type])==null?void 0:u.singular}function vDi(s){var u;switch(s.type){case d.DefinitionEntity:return yL(s);case d.FunctionDeclaration:return hL(s)}return(u=Js[s.type])==null?void 0:u.singular}const mL=4e4,TL=280,EDi=300,vL=65,py=32,sm=39,oE=26,kGe=49,dE=44,bDi=35,TI=52,Pw=10,Cs=Pw*2,lc=38,vI=90,UI=270,UGe=mL/2+120,jGe=mL/2+180;function EL(s){let i=py+dE+lc+Pw;const r=[...s.inputs];return r.length&&(i+=Cs,r.forEach(()=>{i+=oE})),{height:i,width:280}}function uE(s){var a,c;let i=py+dE+lc+Pw;const r=[...s.inputs];return r.length&&(i+=Cs,r.forEach(()=>{i+=oE})),s.andChildrenGroup&&(i+=Cs,s.andChildrenGroup.forEach(e=>{i+=uE(e).height})),s.orChildrenGroup&&(i+=Cs,s.orChildrenGroup.forEach(e=>{i+=uE(e).height})),(((a=s.declaration)==null?void 0:a.id)===j.condition["condition-group-and"].id||((c=s.declaration)==null?void 0:c.id)===j.condition["condition-group-or"].id)&&(i+=lc),{height:i,width:280}}function FGe(s){var h,m;let i=vL;const r=[];if([d.DefinitionEntity].includes(s.type)){const v=[...s.suggestedProperties||[],...s.properties||[]];v.length&&(i+=Cs,v.forEach(b=>{i+=b.static?kGe:sm}))}if([d.DefinitionEntity,d.InstalledProject,d.Loop].includes(s.type)){const v=[...(s==null?void 0:s.suggestedMethods)||[],...s.methods||[],...s.functions||[],...s.body?[s.body]:[]];v.length&&(i+=Cs,v.forEach(b=>{const A=EL(b);i+=A.height}))}ei.includes(s.type)?(r.push(...(s.inputs||[]).flatMap(v=>[v])||[]),i+=Cs,i+=dE,s.error&&(i+=TI)):[d.ReturnStatement,d.BreakStatement,d.ContinueStatement].includes(s.type)?(r.push(...s.outputs||[]),s.throws&&(i+=TI)):s.type===d.Condition&&(r.push(s.inputs[0]),s.inputs[1]&&r.push(s.inputs[1]),(((h=s.declaration)==null?void 0:h.id)===j.condition["condition-group-and"].id||((m=s.declaration)==null?void 0:m.id)===j.condition["condition-group-or"].id)&&(i+=lc),s.andChildrenGroup&&(i+=Cs,s.andChildrenGroup.forEach(v=>{i+=uE(v).height})),s.orChildrenGroup&&(i+=Cs,s.orChildrenGroup.forEach(v=>{i+=uE(v).height})));const a=r.length;a&&(i+=a*sm,i+=Cs);const c=[];if(s.type===d.FunctionDeclaration||s.type===d.GlobalEvent?c.push(...s.inputs||[]):ei.includes(s.type)&&c.push(...s.outputs||[]),hi.includes(s.type)){i+=Cs,i+=dE,s.usedInternalCalls.length&&s.usedInternalCalls.forEach(b=>{i+=TI+Cs,i+=b.inputs.length*oE,i+=b.outputs.length*oE});const v=s.getDataType(null);(!v||v.canModifyObjectStructure())&&(i+=lc)}s.type===d.Search&&(i+=lc);const e=c.length;return e&&(i+=e*sm,i+=Cs),[d.DefinitionEntity,d.FunctionDeclaration,d.ReturnStatement,d.BreakStatement,d.ContinueStatement].includes(s.type)&&(i+=lc),{height:i,width:280}}function KGe(s){let u=0;if(s.parent.type!==d.DefinitionEntity)return{offset:u};const i=s.parent,r=i.methods.findIndex(c=>c.id===s.id);return i.methods.slice(0,r).forEach(c=>{const e=EL(c);u+=e.height}),(i.properties.length||i.suggestedProperties.length)&&(u+=Cs,i.suggestedProperties.forEach(()=>{u+=sm}),i.properties.forEach(()=>{u+=sm})),{offset:u}}function Nb(s){return`${s.split("-").map((r,a)=>a===0?r.charAt(0).toUpperCase()+r.slice(1):r.toLowerCase()).join(" ")}.`}function ADi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return"This template entity has non-template actions";case we.AbstractEntityWithNonAbstractProperties:return"This template entity has non-template properties";case we.IncorrectEntityImplementation:return"This entity incorrectly implements a template entity";case we.IncorrectMethodImplementation:return"This action incorrectly implements the template action it's based on";case we.IncorrectPropertyImplementation:return"This property incorrectly implements the template property it's based on";case we.AbstractMethodInNonAbstractEntity:return"This action is a template action in a non-template entity";case we.AbstractPropertyInNonAbstractEntity:return"This property is a template property in a non-template entity";case Pe.MethodOverwritesOtherSiblingWithSameName:return"An action in this entity overwrites an action in the template entity with the same name";case Pe.PropertyOverwritesOtherSiblingWithSameName:return"A property in this entity overwrites a property in the template entity with the same name";case we.MissingMethodImplementation:return"This entity is missing an action implementation from the template entity";case we.MissingPropertyImplementation:return"This entity is missing a property implementation from the template entity";case Pe.NameNotUniqueInScope:return"Invalid name. There is another entity with the same name in the same scope";case we.NoProperties:return"This entity has no properties, so it doesn't do anything";case we.NonStaticPropertyInStaticEntity:return"This property is not static in a static entity";case we.StaticEntityWithNonStaticProperties:return"This static entity has non-static properties";case we.ReadingFromIncompatibleType:return"This entity reads data from a value of a different data type";case we.WritingToIncompatibleType:return"This entity writes data to a value of a different data type";case we.ScopeWithoutLogic:return"This action has no logic, so it doesn't do anything";case we.NonStaticPropertyImplementsStatic:return"This property is static in a non-static entity";case we.PropertyImplementsIncompatibleType:return"This property implements a property of a different data type";case we.PropertyImplementsNonAbstact:return"This property implements a non-template property";case we.StaticPropertyImplementsNonStatic:return"This static property implements a non-static property";case we.VariableCallsOthersAndHasInternalCall:return"This variable calls other entities while being used to execute internal logic";case we.VariableHasInputsAndInternalCall:return"This variable has inputs while being used to execute internal logic";case we.VariableHasOutputsAndInternalCall:return"This variable has outputs while being used to execute internal logic";case we.VariableIsCalledAndHasInternalCall:return"This variable is called while being used to execute internal logic";case Pe.InternalCallDeclarationIsInvalidType:return"This internal call is not an action";case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return"This internal call is not found in the parent entity";case Pe.InternalCallParentDeclarationEntityInvalidType:return"This internal call parent entity is not a data type";case Pe.InternalCallParentMissingDataType:return"This internal call parent entity has no data type";case Pe.UnreachableEntity:return"This entity is unreachable";case we.DisconnectedCallableEntity:return"This entity is disconnected and won't be executed by anything after publishing";case we.AbstractEntityImplements:return"This template entity implements a non-template entity";case we.AbstractExtendingNonAbstractEntity:return"This template entity extends a non-template entity";case we.InvalidPropertiesCombination:return"This entity has an invalid combination of properties";case we.ExtendingNonInteractiveEntity:return"This entity extends a non-interactive entity";case we.ExtendsIncompatibleEntities:return"This entity extends incompatible entities";case we.ImplementingNonAbstractEntity:return"This entity implements a non-template entity";case we.ImplementsIncompatibleEntities:return"This entity implements incompatible entities";case we.LackingReturnStatementOnSomeBranches:return"This action is missing a termination on some branches";case we.LastCalledEntityMustBeReturnEntity:return"The last called entity in this action must be a termination node";case we.MissingRequiredValue:return"This action is missing a required value";case we.NoPrimaryKeyProperty:return"This entity has no primary key property";case we.NonAbstractExtendingAbstractEntity:return"This non-template entity extends a template entity";case we.NonStaticExtendingStaticEntity:return"This non-static entity extends a static entity";case we.NonStaticImplementingStaticEntity:return"This non-static entity implements a static entity";case we.StaticExtendingNonStaticEntity:return"This static entity extends a non-static entity";case we.StaticImplementingNonStaticEntity:return"This static entity implements a non-static entity";case we.VariableReadsValueAndInternalCall:return"This variable reads a value while being used to execute internal logic";case we.VariableWritesValuesAndInternalCall:return"This variable writes values while being used to execute internal logic";case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return"This internal call declaration is not in the parent entity";case Pe.EmptyName:return"This entity has no name";case Pe.InvalidObjectStructure:return"This entity has an invalid structure";case Pe.LoopBodyFunctionOverwrite:return"This loop body action overwrites an action in the template entity with the same name";case Pe.MethodOverwritesBaseMethodWithSameImplementation:return"This action overwrites a base action with the same implementation";case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return"This action overwrites an action in an extended entity with the same implementation";case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return"This action overwrites an action in an implemented entity with the same implementation";case Pe.MissingCaller:return"This action is missing a caller";case Pe.NameAsResolvedCodeNameNotUniqueInScope:return"This entity has a name that is not unique in the scope of the code it is used in";case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return"This entity name can only contain letters, numbers, underscores and spaces";case Pe.NameMustStartWithLetterOrUnderscore:return"This entity name must start with a letter or an underscore";case Pe.NoOverlapWithImplementedSignature:return"This action does not overlap with the implemented action signature";case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return"This property overwrites a base property with the same implementation";case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return"This property overwrites a property in an extended entity with the same implementation";case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return"This property overwrites a property in an implemented entity with the same implementation";case Pe.ReaderWriterIncompatibleDataType:return"This reader/writer has an incompatible data type with the value it is reading/writing";case au.StatusCodeMustBeBetween100And599:return"HTTP status code must be between 100 and 599";case au.StatusCodeMustBeNumber:return"HTTP status code must be a number, between 100 and 599";case el.UUIDMustBeString:return`UUID must be a string, eg: "${cc()}"`;case el.UUIDMustNotContainSpaces:return`UUID must not contain spaces, eg: "${cc()}"`;case el.UUIDMustBeValidFormat:return`UUID must be in a valid format. Eg: "${cc()}"`;case Ra.MustBeUniqueAmongSameEntities:return"This value must be unique among the same kind";case Ra.StringValueMustNotHaveDashes:return"This value must not contain dashes";case Ra.StringValueMustNotHaveSpaces:return"This value must not contain spaces";case Ra.ValueMustBeString:return"This value must be a string";case qv.DayOfMonthAndWeekConflict:return"Cron expression cannot have both day of month and day of week";case qv.InvalidCharacters:return"Cron expression has invalid characters";case qv.MustHaveSixFields:return"Cron expression must have six fields";case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return"Cannot call this action in a parallel branch";case we.DefaultValueOverridesConstantProperty:return"Cannot override constant property";case we.DefaultValueOverridesConstantVariable:return"Cannot override constant variable";case we.EmptyGroupCondition:return"Cannot have an empty condition group";case we.HigherScopeThanDeclaration:return"In higher scope than declaration";case we.MissingEnumOptions:return"Missing enum options";case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return"Current node catches its errors with no further calls which terminates the branch, but the parent trigger requires a returned value";case we.ValueReadingOverridesConstantProperty:return"Value reading overrides constant property";case we.ValueReadingOverridesConstantVariable:return"Value reading overrides constant variable";case Pe.GlobalVariableDeclarationCannotBeCalled:return"Global variable declaration cannot be called";case Pe.GlobalVariableDeclarationCannotCallOnError:return"Global variable declaration cannot have error calls";case Pe.GlobalVariableDeclarationCannotCatchError:return"Global variable declaration cannot catch errors";case Pe.InternalCallDeclarationNotFound:return"Internal call declaration not found";case Pe.NameIsForbiddenKeyword:return"The name given is a forbidden keyword";default:return Nb(s.code)}}function gDi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return"Non-template actions";case we.AbstractEntityWithNonAbstractProperties:return"Non-template properties";case we.IncorrectEntityImplementation:return"Incorrect implementation";case we.IncorrectMethodImplementation:return"Incorrect action implementation";case we.IncorrectPropertyImplementation:return"Incorrect property implementation";case we.AbstractMethodInNonAbstractEntity:return"Template action in non-template entity";case we.AbstractPropertyInNonAbstractEntity:return"Template property in non-template entity";case Pe.MethodOverwritesOtherSiblingWithSameName:return"Action overwrite";case Pe.PropertyOverwritesOtherSiblingWithSameName:return"Property overwrite";case we.MissingMethodImplementation:return"Missing action";case we.MissingPropertyImplementation:return"Missing property";case Pe.NameNotUniqueInScope:return"Duplicate name";case we.NoProperties:return"No properties";case we.NonStaticPropertyInStaticEntity:return"Non-static property";case we.StaticEntityWithNonStaticProperties:return"Non-static properties";case we.ReadingFromIncompatibleType:return"Read from different type";case we.WritingToIncompatibleType:return"Write to different type";case we.ScopeWithoutLogic:return"No logic";case we.NonStaticPropertyImplementsStatic:return"Invalid static property";case we.PropertyImplementsIncompatibleType:return"Incompatible data type";case we.PropertyImplementsNonAbstact:return"Non-template property";case we.StaticPropertyImplementsNonStatic:return"Non-static property";case we.VariableCallsOthersAndHasInternalCall:return"Bad internal call";case we.VariableHasInputsAndInternalCall:return"Bad internal call";case we.VariableHasOutputsAndInternalCall:return"Bad internal call";case we.VariableIsCalledAndHasInternalCall:return"Bad internal call";case Pe.InternalCallDeclarationIsInvalidType:return"Declaration not an action";case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return"Declaration not found in parent";case Pe.InternalCallParentDeclarationEntityInvalidType:return"Invalid parent declaration type";case Pe.InternalCallParentMissingDataType:return"Parent has no data type";case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return"Declaration not in parent";case Pe.UnreachableEntity:return"Unreachable entity";case we.DisconnectedCallableEntity:return"Disconnected entity";case we.AbstractEntityImplements:return"Abstract entity implements a non-template entity";case we.AbstractExtendingNonAbstractEntity:return"Abstract entity extends a non-template entity";case we.InvalidPropertiesCombination:return"Invalid properties combination";case we.ExtendingNonInteractiveEntity:return"Extending non-interactive entity";case we.ExtendsIncompatibleEntities:return"Extends incompatible entities";case we.ImplementingNonAbstractEntity:return"Implementing non-template entity";case we.ImplementsIncompatibleEntities:return"Implements incompatible entities";case we.LackingReturnStatementOnSomeBranches:return"Missing termination on some branches";case we.LastCalledEntityMustBeReturnEntity:return"Last called entity must be a termination node";case we.MissingRequiredValue:return"Missing required value";case we.NoPrimaryKeyProperty:return"No primary key property";case we.NonAbstractExtendingAbstractEntity:return"Non-template entity extending a template entity";case we.NonStaticExtendingStaticEntity:return"Non-static entity extending a static entity";case we.NonStaticImplementingStaticEntity:return"Non-static entity implementing a static entity";case we.StaticExtendingNonStaticEntity:return"Static entity extending a non-static entity";case we.StaticImplementingNonStaticEntity:return"Static entity implementing a non-static entity";case we.VariableReadsValueAndInternalCall:return"Variable reads value and has internal call";case we.VariableWritesValuesAndInternalCall:return"Variable writes values and has internal call";case Pe.EmptyName:return"Empty name";case Pe.InvalidObjectStructure:return"Invalid object structure";case Pe.LoopBodyFunctionOverwrite:return"Loop body action overwrites action with same name";case Pe.MethodOverwritesBaseMethodWithSameImplementation:return"Action overwrites base action with same implementation";case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return"Action overwrites another with same implementation";case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return"Action overwrites another with same implementation";case Pe.MissingCaller:return"Missing caller";case Pe.NameAsResolvedCodeNameNotUniqueInScope:return"Name not unique in scope";case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return"Name can only contain letters, numbers, underscores and spaces";case Pe.NameMustStartWithLetterOrUnderscore:return"Name must start with letter or underscore";case Pe.NoOverlapWithImplementedSignature:return"No overlap with implemented signature";case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return"Property overwrites base property with same implementation";case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return"Property overwrites another with same implementation";case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return"Property overwrites another with same implementation";case Pe.ReaderWriterIncompatibleDataType:return"Reader/writer incompatible data type";case au.StatusCodeMustBeBetween100And599:return"HTTP status code must be between 100 and 599";case au.StatusCodeMustBeNumber:return"HTTP status code must be a number";case el.UUIDMustBeString:return"UUID must be a string";case el.UUIDMustNotContainSpaces:return"UUID must not contain spaces";case el.UUIDMustBeValidFormat:return"UUID must be in a valid format";case Ra.MustBeUniqueAmongSameEntities:return"This value must be unique among the same kind";case Ra.StringValueMustNotHaveDashes:return"This value must not contain dashes";case Ra.StringValueMustNotHaveSpaces:return"This value must not contain spaces";case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return"Cannot call in a parallel branch";case we.DefaultValueOverridesConstantProperty:return"Cannot override constant";case we.DefaultValueOverridesConstantVariable:return"Cannot override constant";case we.EmptyGroupCondition:return"Empty condition group";case we.HigherScopeThanDeclaration:return"Higher scope than declaration";case we.MissingEnumOptions:return"Missing enum options";case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return"Catches errors with no further calls, but the parent trigger requires a returned value";case we.ValueReadingOverridesConstantProperty:return"Value reading overrides constant";case we.ValueReadingOverridesConstantVariable:return"Value reading overrides constant";case Pe.GlobalVariableDeclarationCannotBeCalled:return"Global variable declaration cannot be called";case Pe.GlobalVariableDeclarationCannotCallOnError:return"Global variable declaration cannot have error calls";case Pe.GlobalVariableDeclarationCannotCatchError:return"Global variable declaration cannot catch errors";case Pe.InternalCallDeclarationNotFound:return"Internal call declaration not found";case Pe.NameIsForbiddenKeyword:return"Name is a forbidden keyword";default:return Nb(s.code)}}function IDi(s){switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return`${ye(s.entity,s.entity.project)} has non-template actions`;case we.AbstractEntityWithNonAbstractProperties:return`${ye(s.entity,s.entity.project)} has non-template properties`;case we.IncorrectEntityImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements template`;case we.IncorrectMethodImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template`;case we.IncorrectPropertyImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template`;case we.AbstractMethodInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} can't be a template`;case we.AbstractPropertyInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} can't be a template`;case Pe.MethodOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites action`;case Pe.PropertyOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites property`;case we.MissingMethodImplementation:return`${ye(s.entity,s.entity.project)} is missing action`;case we.MissingPropertyImplementation:return`${ye(s.entity,s.entity.project)} is missing property`;case Pe.NameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} name is not unique`;case we.NoProperties:return`${ye(s.entity,s.entity.project)} has no properties`;case we.NonStaticPropertyInStaticEntity:return`${ye(s.entity,s.entity.project)} has non-static property`;case we.StaticEntityWithNonStaticProperties:return`${ye(s.entity,s.entity.project)} has non-static properties`;case we.ReadingFromIncompatibleType:return`${ye(s.entity,s.entity.project)} reads from different type`;case we.WritingToIncompatibleType:return`${ye(s.entity,s.entity.project)} writes to different type`;case we.ScopeWithoutLogic:return`${ye(s.entity,s.entity.project)} has no logic`;case we.NonStaticPropertyImplementsStatic:return`${ye(s.entity,s.entity.project)} has invalid static property`;case we.PropertyImplementsIncompatibleType:return`${ye(s.entity,s.entity.project)} has incompatible data type`;case we.PropertyImplementsNonAbstact:return`${ye(s.entity,s.entity.project)} has non-template property`;case we.StaticPropertyImplementsNonStatic:return`${ye(s.entity,s.entity.project)} has non-static property`;case we.VariableCallsOthersAndHasInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableHasInputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableHasOutputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case we.VariableIsCalledAndHasInternalCall:return`${ye(s.entity,s.entity.project)} has bad internal call`;case Pe.InternalCallDeclarationIsInvalidType:return`${ye(s.entity,s.entity.project)} has declaration that is not an action`;case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has declaration that is not found in parent`;case Pe.InternalCallParentDeclarationEntityInvalidType:return`${ye(s.entity,s.entity.project)} has invalid parent declaration type`;case Pe.InternalCallParentMissingDataType:return`${ye(s.entity,s.entity.project)}'s parent has no data type`;case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has declaration that is not in parent`;case Pe.UnreachableEntity:return`${ye(s.entity,s.entity.project)} is unreachable`;case we.DisconnectedCallableEntity:return`${ye(s.entity,s.entity.project)} is not executed by any entity`;case we.AbstractEntityImplements:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.AbstractExtendingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a non-template entity`;case we.InvalidPropertiesCombination:return`${ye(s.entity,s.entity.project)} has invalid properties combination`;case we.ExtendingNonInteractiveEntity:return`${ye(s.entity,s.entity.project)} extends a non-interactive entity`;case we.ExtendsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} extends incompatible entities`;case we.ImplementingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.ImplementsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} implements incompatible entities`;case we.LackingReturnStatementOnSomeBranches:return`${ye(s.entity,s.entity.project)} is missing termination on some branches`;case we.LastCalledEntityMustBeReturnEntity:return`${ye(s.entity,s.entity.project)}'s last called entity must be a termination node`;case we.MissingRequiredValue:return`${ye(s.entity,s.entity.project)} is missing a required value`;case we.NoPrimaryKeyProperty:return`${ye(s.entity,s.entity.project)} has no primary key property`;case we.NonAbstractExtendingAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a template entity`;case we.NonStaticExtendingStaticEntity:return`${ye(s.entity,s.entity.project)} extends a static entity`;case we.NonStaticImplementingStaticEntity:return`${ye(s.entity,s.entity.project)} implements a static entity`;case we.StaticExtendingNonStaticEntity:return`${ye(s.entity,s.entity.project)} extends a non-static entity`;case we.StaticImplementingNonStaticEntity:return`${ye(s.entity,s.entity.project)} implements a non-static entity`;case we.VariableReadsValueAndInternalCall:return`${ye(s.entity,s.entity.project)} reads a value and has internal call`;case we.VariableWritesValuesAndInternalCall:return`${ye(s.entity,s.entity.project)} writes values and has internal call`;case Pe.EmptyName:return`${Js[s.entity.type]} has no name`;case Pe.InvalidObjectStructure:return`${ye(s.entity,s.entity.project)} has invalid structure`;case Pe.LoopBodyFunctionOverwrite:return`${ye(s.entity,s.entity.project)}'s loop body action overwrites an action`;case Pe.MethodOverwritesBaseMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites base action`;case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MissingCaller:return`${ye(s.entity,s.entity.project)} is missing a caller`;case Pe.NameAsResolvedCodeNameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a name not unique in the scope`;case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return`${ye(s.entity,s.entity.project)} name can only contain letters, numbers, underscores and spaces`;case Pe.NameMustStartWithLetterOrUnderscore:return`${ye(s.entity,s.entity.project)} name must start with letter or underscore`;case Pe.NoOverlapWithImplementedSignature:return`${ye(s.entity,s.entity.project)} has no overlap with implemented signature`;case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites base property`;case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.ReaderWriterIncompatibleDataType:return`${ye(s.entity,s.entity.project)} has reader/writer with incompatible data type`;case au.StatusCodeMustBeBetween100And599:return`${ye(s.entity,s.entity.project)} HTTP status code must be between 100 and 599`;case au.StatusCodeMustBeNumber:return`${ye(s.entity,s.entity.project)} HTTP status code must be a number`;case el.UUIDMustBeString:return`${ye(s.entity,s.entity.project)} UUID must be a string`;case el.UUIDMustNotContainSpaces:return`${ye(s.entity,s.entity.project)} UUID must not contain spaces`;case el.UUIDMustBeValidFormat:return`${ye(s.entity,s.entity.project)} UUID must be in a valid format`;case Ra.MustBeUniqueAmongSameEntities:return`${ye(s.entity,s.entity.project)} value must be unique among the same kind`;case Ra.StringValueMustNotHaveDashes:return`${ye(s.entity,s.entity.project)} value must not contain dashes`;case Ra.StringValueMustNotHaveSpaces:return`${ye(s.entity,s.entity.project)} value must not contain spaces`;default:return`${ye(s.entity,s.entity.project)} Error: ${Nb(s.code)}`}}function RDi(s){var u,i,r,a;switch(s.code){case we.AbstractEntityWithNonAbstractMethods:return`${ye(s.entity,s.entity.project)} has non-template actions`;case we.AbstractEntityWithNonAbstractProperties:return`${ye(s.entity,s.entity.project)} has non-template properties`;case we.IncorrectEntityImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template entity`;case we.IncorrectMethodImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template action it's based on`;case we.IncorrectPropertyImplementation:return`${ye(s.entity,s.entity.project)} incorrectly implements the template property it's based on`;case we.AbstractMethodInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} is a template action in a non-template entity`;case we.AbstractPropertyInNonAbstractEntity:return`${ye(s.entity,s.entity.project)} is a template property in a non-template entity`;case Pe.MethodOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites an action in the template entity`;case Pe.PropertyOverwritesOtherSiblingWithSameName:return`${ye(s.entity,s.entity.project)} overwrites a property in the template entity`;case we.MissingMethodImplementation:return`${ye(s.entity,s.entity.project)} is missing an action implementation from the template entity`;case we.MissingPropertyImplementation:return`${ye(s.entity,s.entity.project)} is missing a property implementation from the template entity`;case Pe.NameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a duplicate name in the same scope`;case we.NoProperties:return`${ye(s.entity,s.entity.project)} has no properties, so it doesn't do anything`;case we.NonStaticPropertyInStaticEntity:return`${ye(s.entity,s.entity.project)} has a non-static property in a static entity`;case we.StaticEntityWithNonStaticProperties:return`${ye(s.entity,s.entity.project)} has non-static properties in a static entity`;case we.ReadingFromIncompatibleType:return`${ye(s.entity,s.entity.project)} reads data from a value of a different data type`;case we.WritingToIncompatibleType:return`${ye(s.entity,s.entity.project)} writes data to a value of a different data type`;case we.ScopeWithoutLogic:return`${ye(s.entity,s.entity.project)} has no logic`;case we.NonStaticPropertyImplementsStatic:return`${ye(s.entity,s.entity.project)} has a static property in a non-static entity`;case we.PropertyImplementsIncompatibleType:return`${ye(s.entity,s.entity.project)} implements a property of a different data type`;case we.PropertyImplementsNonAbstact:return`${ye(s.entity,s.entity.project)} implements a non-template property`;case we.StaticPropertyImplementsNonStatic:return`${ye(s.entity,s.entity.project)} has a static property in a non-static entity`;case we.VariableCallsOthersAndHasInternalCall:return`${ye(s.entity,s.entity.project)} calls other entities while being used to execute internal logic`;case we.VariableHasInputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has inputs while being used to execute internal logic`;case we.VariableHasOutputsAndInternalCall:return`${ye(s.entity,s.entity.project)} has outputs while being used to execute internal logic`;case we.VariableIsCalledAndHasInternalCall:return`${ye(s.entity,s.entity.project)} is called while being used to execute internal logic`;case Pe.InternalCallDeclarationIsInvalidType:return`${ye(s.entity,s.entity.project)} has a declaration that is not an action`;case Pe.InternalCallDeclarationNotFoundInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has a declaration that is not found in ${(u=s.entity.parent.getDataType(null))!=null&&u.entity?ye((i=s.entity.parent.getDataType(null))==null?void 0:i.entity,s.entity.project):"the variable's data-type entity"}`;case Pe.InternalCallParentDeclarationEntityInvalidType:return`${ye(s.entity,s.entity.project)} is part of a variable whos data-type entity can't have actions`;case Pe.InternalCallParentMissingDataType:return`${ye(s.entity,s.entity.project)} is part of a variable with no data-type entity`;case Pe.InternalCallDeclarationNotInParentDatatypeEntity:return`${ye(s.entity,s.entity.project)} has a declaration doesn't belong to ${(r=s.entity.parent.getDataType(null))!=null&&r.entity?ye((a=s.entity.parent.getDataType(null))==null?void 0:a.entity,s.entity.project):"the variable's data-type entity"}`;case Pe.UnreachableEntity:return`${ye(s.entity,s.entity.project)} is unreachable`;case we.DisconnectedCallableEntity:return`${ye(s.entity,s.entity.project)} is disconnected and won't be executed by anything after publishing`;case we.AbstractEntityImplements:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.AbstractExtendingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} extends a non-template entity`;case we.InvalidPropertiesCombination:return`${ye(s.entity,s.entity.project)} has an invalid combination of properties`;case we.ExtendingNonInteractiveEntity:return`${ye(s.entity,s.entity.project)} extends a non-interactive entity`;case we.ExtendsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} extends incompatible entities`;case we.ImplementingNonAbstractEntity:return`${ye(s.entity,s.entity.project)} implements a non-template entity`;case we.ImplementsIncompatibleEntities:return`${ye(s.entity,s.entity.project)} implements incompatible entities`;case we.LackingReturnStatementOnSomeBranches:return`${ye(s.entity,s.entity.project)} has branches that don't terminate`;case we.LastCalledEntityMustBeReturnEntity:return`${ye(s.entity,s.entity.project)} must end with a termination node`;case we.MissingRequiredValue:return`${ye(s.entity,s.entity.project)} is missing a required value`;case we.NoPrimaryKeyProperty:return`${ye(s.entity,s.entity.project)} has no primary key property`;case we.NonAbstractExtendingAbstractEntity:return`${ye(s.entity,s.entity.project)} is a non-template entity extending a template entity`;case we.NonStaticExtendingStaticEntity:return`${ye(s.entity,s.entity.project)} is a non-static entity extending a static entity`;case we.NonStaticImplementingStaticEntity:return`${ye(s.entity,s.entity.project)} is a non-static entity implementing a static entity`;case we.StaticExtendingNonStaticEntity:return`${ye(s.entity,s.entity.project)} is a static entity extending a non-static entity`;case we.StaticImplementingNonStaticEntity:return`${ye(s.entity,s.entity.project)} is a static entity implementing a non-static entity`;case we.VariableReadsValueAndInternalCall:return`${ye(s.entity,s.entity.project)} reads a value and has an internal call`;case we.VariableWritesValuesAndInternalCall:return`${ye(s.entity,s.entity.project)} writes values and has an internal call`;case Pe.EmptyName:return`${Js[s.entity.type]} has no name`;case Pe.InvalidObjectStructure:return`${ye(s.entity,s.entity.project)} has an invalid structure`;case Pe.LoopBodyFunctionOverwrite:return`${ye(s.entity,s.entity.project)}'s loop body action overwrites`;case Pe.MethodOverwritesBaseMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites a base action with same implementation`;case Pe.MethodOverwritesOtherExtendedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MethodOverwritesOtherImplementedEntitysMethodWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another action with same implementation`;case Pe.MissingCaller:return`${ye(s.entity,s.entity.project)} is missing a caller`;case Pe.NameAsResolvedCodeNameNotUniqueInScope:return`${ye(s.entity,s.entity.project)} has a name that is not unique in the scope`;case Pe.NameCanOnlyContainLettersNumbersUnderscoreAndSpaces:return`${ye(s.entity,s.entity.project)} name can only contain letters, numbers, underscores and spaces`;case Pe.NameMustStartWithLetterOrUnderscore:return`${ye(s.entity,s.entity.project)} name must start with letter or underscore`;case Pe.NoOverlapWithImplementedSignature:return`${ye(s.entity,s.entity.project)} has no overlap with implemented signature`;case Pe.PropertyOverwritesBasePropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites a base property with same implementation`;case Pe.PropertyOverwritesOtherExtendedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.PropertyOverwritesOtherImplementedEntitysPropertyWithSameImplementation:return`${ye(s.entity,s.entity.project)} overwrites another property with same implementation`;case Pe.ReaderWriterIncompatibleDataType:return`${ye(s.entity,s.entity.project)} has a reader/writer with incompatible data type`;case au.StatusCodeMustBeBetween100And599:return`${ye(s.entity,s.entity.project)} HTTP status code must be between 100 and 599`;case au.StatusCodeMustBeNumber:return`${ye(s.entity,s.entity.project)} HTTP status code must be a number, between 100 and 599`;case el.UUIDMustBeString:return`${ye(s.entity,s.entity.project)} UUID must be a string, eg: "${cc()}"`;case el.UUIDMustNotContainSpaces:return`${ye(s.entity,s.entity.project)} UUID must not contain spaces, eg: "${cc()}"`;case el.UUIDMustBeValidFormat:return`${ye(s.entity,s.entity.project)} UUID must be in a valid format. Eg: "${cc()}"`;case Ra.MustBeUniqueAmongSameEntities:return`${ye(s.entity,s.entity.project)} value must be unique among the same kind`;case Ra.StringValueMustNotHaveDashes:return`${ye(s.entity,s.entity.project)} value must not contain dashes`;case Ra.StringValueMustNotHaveSpaces:return`${ye(s.entity,s.entity.project)} value must not contain spaces`;case we.CalledBeforeDeclaration:return"Called before declaration";case we.CalledInParallelBranchToDeclaration:return`${ye(s.entity,s.entity.project)} cannot be called in a parallel branch`;case we.DefaultValueOverridesConstantProperty:return`${ye(s.entity,s.entity.project)} default value overrides constant property`;case we.DefaultValueOverridesConstantVariable:return`${ye(s.entity,s.entity.project)} default value overrides constant variable`;case we.EmptyGroupCondition:return`${ye(s.entity,s.entity.project)} contains an empty group condition`;case we.HigherScopeThanDeclaration:return`${ye(s.entity,s.entity.project)} is in a higher scope than its declaration`;case we.MissingEnumOptions:return`${ye(s.entity,s.entity.project)} is missing enum options`;case we.ParentScopeRequiresReturnCurrentCatchesErrorWithNoCalls:return`${ye(s.entity,s.entity.project)} catches its errors but its parent scope requires a returned value`;case we.ValueReadingOverridesConstantProperty:return`${ye(s.entity,s.entity.project)} is reading a value, but it is a constant property`;case we.ValueReadingOverridesConstantVariable:return`${ye(s.entity,s.entity.project)} is reading a value, but it is a constant variable`;case Pe.GlobalVariableDeclarationCannotBeCalled:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot be called`;case Pe.GlobalVariableDeclarationCannotCallOnError:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot call on error`;case Pe.GlobalVariableDeclarationCannotCatchError:return`${ye(s.entity,s.entity.project)} is global variable declaration and cannot catch errors`;case Pe.InternalCallDeclarationNotFound:return`${ye(s.entity,s.entity.project)}'s declaration isn't found`;case Pe.NameIsForbiddenKeyword:return`${ye(s.entity,s.entity.project)}'s name is a forbidden keyword`;default:return`${ye(s.entity,s.entity.project)} Error: ${Nb(s.code)}`}}function Vb(s){const u=(s||"").startsWith("error-caller-only--");switch(u?s.replace("error-caller-only--",""):s){case Di.CallIsInHigherScope:return"In a higher scope";case Di.CallIsInLowerScope:return"In a lower scope";case Di.CallerIsInHigherScope:return"Caller is in a higher scope";case Di.CallerIsInLowerScope:return"Caller is in a lower scope";case Di.CannotBeCalledByChildren:return"Cannot be called by children";case Di.CannotCallAncestor:return"Cannot call ancestor";case Di.CannotConnectToItself:return"Cannot connect to itself";case Di.CannotReadMoreThanOneValue:return"Cannot read more than one value";case Di.CannotReadValueFromChildren:return"Cannot read value from entities executed after itself";case Di.CannotWriteValueToAncestor:return"Cannot write value to ancestor";case bE.Suggestion:return"Suggestion";case Di.ContinueOrBreakStatementCalledFromOutsideLoop:return"Cannot be called from outside loop";case Di.DataTypesNotCompatible:return"Data types not compatible";case Di.ElementInLoopBodyCallingOutsideLoop:return"Cannot call outside loop";case Di.ErrorOututMapCannotBeConnectedToParentSuccessBranchCallees:return"Error cannot be connected to success branch";case Di.ExecutionsAlreadyConnected:return"Executions already connected";case Di.IsNotValueReadingEntity:return"Is not a value reading entity";case Di.IsNotValueWritingEntity:return"Is not a value writing entity";case Di.NotInScope:return"Not in a compatible scope";case Di.OtherIncompatibleScopeReason:return"Incompatible scope";case Di.SiblingInternalCallAlreadyUsedInParentVariable:return"Internal call already used in parent variable";case Di.SuccessOutputMapCannotBeConnectedToParentErrorBranchCallees:return"Success cannot be connected to error branch";case Di.ValuesAlreadyConnected:return"Values already connected";case Di.CannotInteractWithInputInVariableWithInternalCalls:return"Cannot interact with input in variable with internal calls";case Di.CannotInteractWithOutputInVariableWithInternalCalls:return"Cannot interact with output in variable with internal calls";case bE.CanvasGloballyDisabled:return"Canvas is globally disabled";case Di.PropertyIsConstantItsValueCantBeReset:return"Property is constant, its value can't be reset";case Di.CannotWriteValueOfGlobalVariableDeclaration:return"Cannot write value of global variable declaration";case Di.CannotReSetValueOfConstantVariable:return"Cannot re-set value of constant variable";case Di.CannotConnectToOwnNode:return"It is part of the same node";case Di.CalledByErrorMustBePassThroughCallable:return"Called by error must be pass-through callable";case Di.CannotChangeScopeBecauseItCallsOtherEntities:return"Cannot change scope because it calls other entities in its current scope";case Di.CannotChangeScopeBecauseItIsAlreadyCalledByOtherEntitiesInDifferentScope:return"Cannot change scope because it is already called by other entities in different scope";case Di.VariableDeclarationCannotBeMovedToLowerScopeBecauseInstancesUsage:return"Variable declaration cannot be moved to lower scope because its instances are used in the current or different incompatible lower scope";case Di.CalledBySourceMustBeCallerEntity:return"Not a caller type";case Di.CalledByErrorCannotBeConnectedToEntitiesCalledByOwnSuccessBranch:return"Already connected to the success branch from a common origin caller";case Di.CalledBySuccessCannotBeConnectedToEntitiesCalledByOwnErrorBranch:return"Already connected to the error branch from a common origin caller";case Di.RedundantCall:return"Redundant call. Already connected further down the execution path";case Di.CannotBeCalledBeforeDeclaration:return"Cannot be called before declaration";case Di.CannotBeCalledInParallelBranchToDeclaration:return"Cannot be called in parallel branch to declaration";case Di.CannotBeHigherScopeThanDeclaration:return"Cannot be in a higher scope than declaration";case Di.CannotCallGlobalVariableDeclaration:return"Cannot call global variable declaration";case Di.EntityAlreadyCalledBySuccessCannotBeConnectedToUnrelatedErrorBranch:return u?"Cannot connect error: Already connected to a success branch from a common origin caller":"Already connected to a success branch from a common origin caller";case Di.CannotInteractWithInputInGlobalVariableDeclaration:return"Cannot interact with input in global variable declaration";case Di.IsNotCallableEntity:return"Is not a callable node type";case Di.IsNotCallerEntity:return"Is not a caller node type";case Di.IsNotPassThroughCallableEntity:return"Is not a pass-through callable node type that has an error branch";case Di.NotAConnectableEntityType:return"Not a connectable node type";case Di.WouldMakeAnEarlierNodeBeCalledBeforeItsDeclaration:return"Would make an earlier node be called before its declaration";default:return _f(s||"")}}function wDi(s,u){const i=[...s,...u],r=Array.from(new Set(i));return{hasChanged:r.length!==s.length,reasons:r}}function DDi(s,u){const i=s.filter(a=>!u.includes(a));return{hasChanged:i.length!==s.length,reasons:i}}function CDi(s,u){return s.find(i=>i.entity.id===u)||null}function Zj(s){return s.filter((u,i)=>s.indexOf(u)===i)}class $n{constructor(u,i,r=null,a){w(this,"ids",[]);w(this,"entity");w(this,"entityCardHeight");w(this,"entityCardWidth");w(this,"index");w(this,"childEntities",[]);w(this,"children",[]);w(this,"parents",[]);w(this,"calculationEntryPoint");w(this,"_onlyEntities",null);w(this,"_changeSet",null);if(this.index=i,this.entity=u,this.calculationEntryPoint=r||this,this._changeSet=a||null,this===this.calculationEntryPoint&&!a)throw new Error("Change-set must be provided for the calculation entry point");this.calculateCardSize(),this.getSortedChildren()}static autoGenerateLayout(u,i,r){const a=UGe-UI-TL,c=jGe-vI-vL;u.type===d.Project?(u.x=a,u.y=c):u.metaSync({x:u.x||a,y:u.y||c},i);const e=new $n(u,0,null,i);e.calculationEntryPoint=e,e._onlyEntities=r||[],e.ids=["0"];const f=[];e.next(m=>{f.push(...m)}),$n.recursivelyAssembleChildrenAreas(f),e.resolveChildrenOverlaps();const h=e.flattenChildEntities();return e._onlyEntities?h.filter(m=>{var v;return(v=e._onlyEntities)==null?void 0:v.includes(m)}):h}static recursivelyAssembleChildrenAreas(u){const i=[];u.forEach(r=>{r.next(a=>{i.push(...a)})}),i.length>0&&$n.recursivelyAssembleChildrenAreas(i)}get onlyEntities(){return this.calculationEntryPoint._onlyEntities||[]}get changeSet(){return this.calculationEntryPoint._changeSet}set changeSet(u){this.calculationEntryPoint._changeSet=u}findAreaInChildrenFromEntity(u){if(this.entity===u)return this;const i=this.children.find(a=>a.entity===u);return i||this.children.reduce((a,c)=>a||c.findAreaInChildrenFromEntity(u),null)}findAreaFromEntity(u){if(this.entity===u)return this;const i=this.calculationEntryPoint.children,r=i.find(c=>c.entity===u);return r||i.reduce((c,e)=>c||e.findAreaInChildrenFromEntity(u),null)}addParent(u){if(!this.parents.includes(u)){const i=$n.resolveIds(u,this.index);this.ids.push(...i),this.parents.push(u)}}static resolveIds(u,i){return u?u.ids.map(r=>`${r}-${i}`):[`${i}`]}getSortedChildren(){if(this.entity.collapsed){this.childEntities=[];return}const u=Jo(this.entity,!0);if(this.entity.type===d.Project){const i=[],r=[],a=[];u.forEach(e=>{if(d.DefinitionEntity===e.type){r.push(e);return}else if(mi.includes(e.type)){a.push(e);return}i.push(e)});const c=i.sort((e,f)=>{const h=!!QI(e,f).length,m=Jo(e),v=Jo(f);return h?0:m.length&&!v.length?-1:!m.length&&v.length?1:0}).filter(e=>!$f(e).length);this.childEntities=[...r,...a,...c]}else{const i=[],r=[],a=[],c=[],e=[];br.includes(this.entity.type)&&uD(this.entity).forEach(m=>{if(hi.includes(m.type)){a.push(m);return}const v=Mt(m);i.push(v)}),en.includes(this.entity.type)&&r.push(...this.entity.detachedChildren);const f=u.filter(h=>{const m=i.includes(h);return m||a.includes(h)||r.includes(h)?!1:hi.includes(h.type)?(a.push(h),!1):Ar.includes(h.type)&&!m?(c.push(h),!1):h.type===d.DefinitionEntity?(e.push(h),!1):!0});i.sort((h,m)=>Zo(h,m)?-1:0),c.sort((h,m)=>Zo(h,m)?-1:0),a.sort((h,m)=>mN(h,m)?1:mN(m,h)?-1:0),this.childEntities=[...e,...i,...c,...f,...a,...r]}}calculateCardSize(){const u=FGe(this.entity);this.entityCardWidth=u.width,this.entityCardHeight=u.height}static getBoundriesOfTwoAreas(u,i){return{top:Math.min(u.top,i.top),left:Math.min(u.left,i.left),bottom:Math.max(u.bottom,i.bottom),right:Math.max(u.right,i.right)}}static getBoundriedOfCombinedAreas(u,i){const r=u.filter(c=>!i.includes(c));return r.reduce((c,e)=>i.includes(e)?c:$n.getBoundriesOfTwoAreas(c,e.fullBranchArea),r[0].fullBranchArea)}getFullAreaUntilAny(u){const i=this.ownEntityPlusBufferArea;return this.children.filter(e=>!u.includes(e)).map(e=>e.getFullAreaUntilAny(u)).reduce((e,f)=>$n.getBoundriesOfTwoAreas(e,f),i)}getFullAreaUntilAreaOrAnyChildren(u){const i=[u,...u.flattenChildren()],r=this.ownEntityPlusBufferArea;return this.children.filter(e=>i.includes(e)).map(e=>e.getFullAreaUntil(u)).reduce((e,f)=>$n.getBoundriesOfTwoAreas(e,f),r)}getFullAreaUntil(u){const i=this.ownEntityPlusBufferArea;return this.children.filter(c=>c!==u).map(c=>c.getFullAreaUntil(u)).reduce((c,e)=>$n.getBoundriesOfTwoAreas(c,e),i)}get fullBranchArea(){const u=this.ownEntityPlusBufferArea;return this.children.map(a=>a.fullBranchArea).reduce((a,c)=>$n.getBoundriesOfTwoAreas(a,c),u)}get ownEntityArea(){return{top:this.entity.y,left:this.entity.x,bottom:this.entity.y+this.entityCardHeight,right:this.entity.x+this.entityCardWidth}}get ownEntityPlusBufferArea(){const u=this.ownEntityArea;return{top:u.top,left:u.left,bottom:u.bottom+vI,right:u.right+UI}}static filterOutRepeatedAreas(u){return u.filter((i,r)=>u.indexOf(i)===r)}getEarliestId(u,i){const r=u.split("-"),a=i.split("-");return r.length<a.length?u:r.length>a.length?i:r.reduce((e,f,h)=>f<a[h]?u:i,u)}getEarliestLevel(){return this.ids.reduce((r,a)=>this.getEarliestId(r,a),this.ids[0]).split("-").length}countColumns(){let u=0;if(this!==this.calculationEntryPoint)u++;else return u;if(!this.parents.length)return u;const r=this.parents.reduce((a,c)=>c.getEarliestLevel()>a.getEarliestLevel()?c:a,this.parents[0]).countColumns();return u+=r,u}getLatestId(u,i){if(u===i)return u;const r=u.split("-"),a=i.split("-");return r.length<a.length?i:r.length>a.length?u:r.reduce((e,f,h)=>f>a[h]?u:i,u)}getLatestLevel(){return this.ids.length===1?this.ids[0].split("-").length:this.ids.reduce((r,a)=>this.getLatestId(r,a),this.ids[0]).split("-").length}smoothPosition(){const u=this.flattenSiblings();if(!u.length&&this.parents.length<=1&&this.children.length){const i=this.centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight();this.parents.forEach(r=>{r!==this.calculationEntryPoint&&r.shiftDownAlone(i)})}else if([...mi].includes(this.entity.type)&&this.children.length)this.centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight();else if(!this.children.length&&this.parents.length>1){const i=u.filter(r=>!this.parents.includes(r));i.length?i.every(a=>{const c=this.countColumns(),e=a.countColumns();return c>e})&&this.centerHeaderVerticallyOverCombinedAllParentsHeaderHeight():i.length||this.centerHeaderVerticallyOverCombinedAllParentsHeaderHeight()}}shiftDownUntilAny(u,i){if(u.includes(this))return u;this.move(this.entity,{y:this.entity.y+i});let r=[...u,this];return this.children.forEach(a=>{if($n.getEarliestParentInChain(a)!==this)return;const e=CDi(r,a.entity.id);r=$n.filterOutRepeatedAreas([...r]),e||(r=r.filter(h=>h!==a));const f=a.shiftDownUntilAny(r,i);r.push(...f)}),r}shiftRightUntilAny(u,i){u.includes(this)||(this.move(this.entity,{x:this.entity.x+i}),this.children.forEach(r=>{const a=$n.filterOutRepeatedAreas([...this.flattenSiblings(),...u]);$n.getEarliestParentInChain(r)===this&&r.shiftRightUntilAny(a,i)}))}shiftRight(u){this.move(this.entity,{x:this.entity.x+u}),this.children.forEach(i=>{const a=i.flattenSiblings().filter(c=>c!==i);i.shiftRightUntilAny(a,u)})}shiftDownAlone(u){this.move(this.entity,{y:this.entity.y+u})}centerHeaderVerticallyOverCombinedAllParentsHeaderHeight(){const u=this.parents.reduce((a,c)=>{const e=c.ownEntityArea,f=e.top+py,h={top:f,left:e.left,bottom:f,right:e.right};return $n.getBoundriesOfTwoAreas(a,h)},{top:1/0,left:1/0,bottom:-1/0,right:-1/0}),r=(u.bottom-u.top)/2-py;this.shiftDownAlone(r)}centerHeaderVerticallyOverCombinedAllChildrenHeaderHeight(){const u=this.children.reduce((a,c)=>{const e=c.ownEntityArea,f=e.top+py,h={top:f,left:e.left,bottom:f,right:e.right};return $n.getBoundriesOfTwoAreas(a,h)},{top:1/0,left:1/0,bottom:-1/0,right:-1/0}),r=(u.bottom-u.top)/2-py;return this.shiftDownAlone(r),r}resolveChildrenOverlaps(){const u=this.flattenChildren();let i=[];u.forEach(r=>{const a=r.adjustVerticallyToAvoidOverlaps();i.push(...a)}),u.forEach(r=>{r.smoothPosition()})}static getEarliestParentInChain(u){let i=u.parents[0];return u.parents.length&&(i=u.parents.sort((r,a)=>{if(!r.ids.length)return-1;if(!a.ids.length)return 1;const c=r.ids.sort((f,h)=>f.length<h.length?-1:0),e=a.ids.sort((f,h)=>f.length<h.length?-1:0);return c[0].length-e[0].length})[0]),i}flattenEarlierSiblings(u=new Set){return u.add(this.entity.id),this.parents.reduce((r,a)=>{if(u.has(a.entity.id))return r;u.add(a.entity.id);const e=a.children.slice(0,a.children.indexOf(this)).reduce((f,h)=>[...f,h,...h.flattenChildren(u)],[]);return[...r,...e]},[])}flattenSiblings(u=new Set){return u.add(this.entity.id),this.parents.reduce((r,a)=>{if(u.has(a.entity.id))return r;u.add(a.entity.id);const e=a.children.filter(f=>f!==this).reduce((f,h)=>[...f,h,...h.flattenChildren(u)],[]);return[...r,...e]},[])}flattenChildren(u=new Set){return this.children.reduce((i,r)=>u.has(r.entity.id)?i:(u.add(r.entity.id),[...i,r,...r.flattenChildren(u)]),[])}flattenParents(u=new Set){return this.parents.reduce((r,a)=>u.has(a.entity.id)?r:(u.add(a.entity.id),[...r,a,...a.flattenParents(u)]),[])}getAreaIfRendered(u){return this.calculationEntryPoint.flattenChildren().find(a=>a.entity.id===u.id)||null}getLowerSiblings(){const u=this.parents.reduce((i,r)=>{const a=r.children.indexOf(this),c=r.children.slice(a+1);return[...i,...c]},[]);return Zj(u)}getLowerAreas(){const u=this.getLowerSiblings(),i=this.parents.reduce((r,a)=>[...r,...a.getLowerAreas()],[]);return Zj([...u,...i])}adjustVerticallyToAvoidOverlaps(u=[]){const r=$n.getEarliestParentInChain(this).children[this.index-1];if(!r)return u;const a=this.flattenEarlierSiblings(),c=this.flattenParents(),e=[...a,...c,r],m=P(e.flatMap(D=>QI(this.entity,D.entity))).filter(D=>D.id!==this.entity.id).map(D=>this.findAreaFromEntity(D)).filter(D=>!!D),v=this.getFullAreaUntilAny(m),b=r.getFullAreaUntilAny(m),A=e.reduce((D,R)=>R===this||R.fullBranchArea.left!==v.left?D:Math.max(D,R.fullBranchArea.bottom),b.bottom);if(v.top<A){const D=A-v.top+vI;return this.shiftDownUntilAny(u,D)}return u}move(u,i){if(this.onlyEntities.includes(u)){if(!this.changeSet)throw new Error("Change set is not defined for this area, cannot move entity");u.metaSync(i,this.changeSet)}}addChild(u){const i=this.childEntities[u];let r=null;i.x&&i.y?r=this.getAreaIfRendered(i):!i.x&&!i.y&&this.move(i,{x:this.entity.x,y:this.entity.y}),r||(r=new $n(i,u,this.calculationEntryPoint));const a=this.ownEntityPlusBufferArea;this.children.includes(r)||(this.children.push(r),r.addParent(this));const c=r.fullBranchArea;if(c.left<a.right){const e=a.right-c.left;r.shiftRight(e)}return r}flattenChildEntities(u=new Set){return this.children.reduce((i,r)=>u.has(r.entity.id)?i:(u.add(r.entity.id),[...i,r.entity,...r.flattenChildEntities(u)]),[])}next(u){const i=[];this.childEntities.forEach((r,a)=>{const c=this.addChild(a);c&&i.push(c)}),u(i)}}async function ODi(s,u,i={}){var c;const r=X.YieldTracker.from(i),a=[];console.log("Generating layout for project...");for(const e of s.instancesList){if(s.diggestedBuiltInBaseEntitiesIds.has(e.id)||!Ry.includes(e.type)||((c=Mt(e))==null?void 0:c.id)!==e.id)continue;let f=pi(e,s);if(!f){console.log("No top scope owner for instance: ",e," in project: ",s);continue}if(!(mi.includes(f.type)&&f.collapsed&&f.id!==e.id)){for(;f.parent&&f.parent!==s;)f=f.parent,mi.includes(f.type)&&f.collapsed&&(f.id,e.id);e.x=0,e.y=0,u==null||u.add(e,z.Updated),a.push(e),await r.tick()}}$n.autoGenerateLayout(s,u,a)}async function _Di(s,u,i={}){const r=X.YieldTracker.from(i),a=[],c=[s,...Nt(s)].map(e=>Mt(e)).filter(Boolean);for(const e of c){if(s.project.diggestedBuiltInBaseEntitiesIds.has(e.id))continue;let f=pi(e,s.project);if(f&&!(mi.includes(f.type)&&f.collapsed&&f.id!==e.id)){for(;f.parent&&f.parent!==s.project;)f=f.parent,mi.includes(f.type)&&f.collapsed&&(f.id,e.id);e.x=0,e.y=0,u==null||u.add(e,z.Updated),a.push(e),await r.tick()}}$n.autoGenerateLayout(s.project,u,a)}async function PDi(s,u,i={}){const r=X.YieldTracker.from(i),a=[],c=new Set;BSe(u,{shallowMissingActivesError:!0,excludeAffected:!0}).forEach(m=>{var b;if((!m.x||!m.y)&&!c.has(m.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(m.id)&&(a.push(m),c.add(m.id)),Xo(m,s)){const A=Mt(m);A&&!c.has(A.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(A.id)&&(a.push(A),c.add(A.id))}if(br.includes(m.type)){const A=m;[A,...Nt(A)].forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))})}m.type===d.DefinitionEntity&&m.methods.forEach(A=>{Nt(A).forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))})}),((b=m.parent)==null?void 0:b.type)===d.Project&&(a.push(m),c.add(m.id),br.includes(m.type)&&Nt(m).forEach(R=>{const O=Mt(R);O&&!c.has(O.id)&&!s.diggestedBuiltInBaseEntitiesIds.has(O.id)&&(a.push(O),c.add(O.id))}))});let f=[];for(const m of a)s.diggestedBuiltInBaseEntitiesIds.has(m.id)||(m.x=0,m.y=0,u==null||u.add(m,z.Updated),f.push(m),await r.tick());f=P(f),$n.autoGenerateLayout(s,u,f);const h=P([...f,...s.variableDeclarations,...s.variableInstances,...s.loops,...s.conditions,...s.operations,...s.searches]).filter(m=>m.x===0||m.y===0);$n.autoGenerateLayout(s,u,h)}var Bv=(s=>(s.Amazon="amazon",s.Google="google",s.Microsoft="microsoft",s))(Bv||{}),Jr=(s=>(s.RelationalDatabase="relational-database",s.CompiledLocalCodebase="compiled-local-codebase",s.CloudHostedCodebase="cloud-hosted-codebase",s.HttpApi="http-api",s.HttpEndpoint="http-endpoint",s.ServerlessFunction="serverless-function",s.CronJob="cron-job",s.AWSTenantAccount="aws-tenant-account",s.ContainerCompute="container-compute",s.SharedDrive="shared-drive",s))(Jr||{}),KP=(s=>(s.Post="post",s.Get="get",s.Acknowledgement="acknowledgment",s.Progress="progress",s.Error="error",s.Complete="complete",s))(KP||{}),oy=(s=>(s.Queued="queued",s.Running="running",s.Success="success",s.Failed="failed",s.CleanedUp="cleaned-up",s.Skipped="skipped",s.AbortedByUser="aborted-by-user",s.UnrecoverableFailure="unrecoverable-failure",s.Reverted="reverted",s.UnpublishingStarted="unpublishing-started",s.Unpublished="unpublished",s))(oy||{}),SP=(s=>(s.Queued="queued",s.Running="running",s.Success="success",s.Failed="failed",s.CleanedUp="cleaned-up",s.UnrecoverableFailure="unrecoverable-failure",s.Reverted="reverted",s.UnpublishingStarted="unpublishing-started",s.Unpublished="unpublished",s))(SP||{}),bi=(s=>(s.ProjectNotFound="project-not-found",s.ProjectPublishRequestAcknowledged="project-publish-request-acknowledged",s.PublicationStepFailedReasonUnknown="publication-step-failed-reason-unknown",s.DeploymentCompleted="deployment-completed",s.DeploymentStarted="deployment-started",s.DeploymentFailed="deployment-failed",s.AllInfrastructureSuccessfullyProvisioned="all-infrastucture-successfully-provisioned",s.RequestPayloadValidationFailed="request-payload-validation-failed",s.ProjectStateValidationFailedMissingName="project-state-validation-failed-missing-name",s.ProjectStateValidationFailedMissingAnyFunctionality="project-state-validation-failed-missing-any-functionality",s.ProjectAlreadyBeingPublished="project-already-being-published",s.BillingSubscriptionUpdateFailed="billing-subscription-update-failed",s.RelationalDatabaseDeploymentStarted="relational-database-deployment-started",s.RelationalDatabaseDeploymentCompleted="relational-database-deployment-completed",s.RelationalDatabaseDeploymentFailed="relational-database-deployment-failed",s.CreatingNewRelationalDatabase="creating-new-relational-database",s.WaitingForPreviousRelationalDatabaseDeployment="waiting-for-previous-relationa-database-deployment",s.RelationalDatabaseAlreadyExists="relational-database-already-exists",s.RelationalDatabaseDeletionStarted="relational-database-deletion-started",s.RelationalDatabaseDeletionCompleted="relational-database-deletion-completed",s.RelationalDatabaseDeletionFailed="relational-database-deletion-failed",s.WaitingForPreviousRelationalDatabaseDeletion="waiting-for-previous-relationa-database-deletion",s.HttpApiDeploymentStarted="http-api-deployment-started",s.HttpApiDeploymentCompleted="http-api-deployment-completed",s.HttpApiDeploymentFailed="http-api-deployment-failed",s.CreatingNewHttpApi="creating-new-http-api",s.HttpApiAlreadyExists="http-api-already-exists",s.HttpApiDeletionStarted="http-api-deletion-started",s.HttpApiDeletionCompleted="http-api-deletion-completed",s.HttpApiDeletionFailed="http-api-deletion-failed",s.WaitingForPreviousHttpApiDeletion="waiting-for-previous-http-api-deletion",s.BusinessLogicCodebaseDeploymentStarted="business-logic-codebase-deployment-started",s.BusinessLogicCodebaseDeploymentCompleted="business-logic-codebase-deployment-completed",s.BusinessLogicCodebaseDeploymentFailed="business-logic-codebase-deployment-failed",s.BundlingCodebaseForDownload="bundling-codebase-for-download",s.UploadingCodebaseToCloudStorage="uploading-codebase-to-cloud-storage",s.UploadingCodebaseToCloudStorageCompleted="uploading-codebase-to-cloud-storage-completed",s.UploadingCodebaseToCloudStorageFailed="uploading-codebase-to-cloud-storage-failed",s.InfrastructureValuesCodebaseInterpolationStarted="infrastructure-values-codebase-interpolation-started",s.InfrastructureValuesCodebaseInterpolationCompleted="infrastructure-values-codebase-interpolation-completed",s.InfrastructureValuesCodebaseInterpolationFailed="infrastructure-values-codebase-interpolation-failed",s.CodeCompilationStarted="code-compilation-started",s.CodeCompilationCompleted="code-compilation-completed",s.CodeCompilationFailed="code-compilation-failed",s.BundleCodebaseStarted="bundle-codebase-started",s.BundleCodebaseCompleted="bundle-codebase-completed",s.BundleCodebaseFailed="bundle-codebase-failed",s.InstallingCodebaseDependenciesStarted="installing-codebase-dependencies-started",s.InstallingCodebaseDependenciesCompleted="installing-codebase-dependencies-completed",s.InstallingCodebaseDependenciesFailed="installing-codebase-dependencies-failed",s.MigrateRelationalDatabaseStarted="migrate-relational-database-started",s.MigrateRelationalDatabaseCompleted="migrate-relational-database-completed",s.MigrateRelationalDatabaseFailed="migrate-relational-database-failed",s.ExecutePublicationCompletedEventStarted="execute-publication-completed-event-started",s.ExecutePublicationCompletedEventCompleted="execute-publication-completed-event-completed",s.ExecutePublicationCompletedEventFailed="execute-publication-completed-event-failed",s.ExecutePublicationCompletedEventTimedOut="execute-publication-completed-event-timed-out",s.AWSTenantAccountProvisioningStarted="aws-tenant-account-provisioning-started",s.AWSTenantAccountProvisioningCompleted="aws-tenant-account-provisioning-completed",s.AWSTenantAccountProvisioningFailed="aws-tenant-account-provisioning-failed",s.ComputeDeploymentStarted="compute-deployment-started",s.ComputeDeploymentCompleted="compute-deployment-completed",s.ComputeDeploymentFailed="compute-deployment-failed",s))(bi||{}),Uo=(s=>(s.CodeCompilation="code-compilation",s.RelationalDatabaseDeployment="relational-database-deployment",s.RelationalDatabaseDeletion="relational-database-deletion",s.HttpApiDeployment="http-api-deployment",s.HttpApiDeletion="http-api-deletion",s.InfrastructureValuesCodebaseInterpolation="infrastructure-values-codebase-interpolation",s.BundleCodebase="bundle-codebase",s.MigrateRelationalDatabase="migrate-relational-database",s.BusinessLogicCodebaseDeployment="business-logic-codebase-deployment",s.ExecutePublicationCompletedEvent="execute-publication-completed-event",s.CodebaseCleanup="codebase-cleanup",s.AWSTenantAccountProvisioning="aws-tenant-account-provisioning",s.ComputeDeployment="compute-deployment",s))(Uo||{});Jr.CloudHostedCodebase,Jr.HttpApi,Jr.RelationalDatabase,Jr.CloudHostedCodebase,Jr.CloudHostedCodebase,Jr.RelationalDatabase,Jr.CloudHostedCodebase,Jr.CloudHostedCodebase;function SGe(s){return`project-${s}-http-api`}function Nw(s){return`entity-${s}-database`}class qGe{constructor(u,i,r,a,c,e,f,h,m){w(this,"stepType");w(this,"id");w(this,"resourceType");w(this,"index");w(this,"dependency",[]);w(this,"lastEvent",null);w(this,"lastEventTimestamp",null);w(this,"status",oy.Queued);w(this,"publicationRun");w(this,"resource");this.stepType=u,this.id=i,this.resourceType=r,this.status=a,this.dependency=c,this.index=e,this.lastEventTimestamp=f,this.publicationRun=h,this.resource=m}toJSON(){return{stepType:this.stepType,id:this.id,resourceType:this.resourceType,index:this.index,status:this.status,dependency:this.dependency,lastEvent:this.lastEvent,resource:{resourceId:this.resource.resourceId,resourceType:this.resource.resourceType,provider:this.resource.provider,details:this.resource.details,status:this.resource.status,name:this.resource.name}}}async update(u){var i,r;this.status=u.status,this.dependency=u.dependency,this.index=u.index,this.stepType=u.stepType,this.resourceType=u.resourceType,this.lastEvent=u.lastEvent,this.id=u.id,(r=this.resource)==null||r.setDetails((i=u.resource)==null?void 0:i.details)}}var ZGe=(s=>(s.Ready="ready",s.Provisioning="provisioning",s.Queued="queued",s.ProvisioningFailed="provisioning-failed",s.Deleting="deleting",s.DeletingFailed="deleting-failed",s.Deleted="deleted",s))(ZGe||{});class Pf{constructor(u,i,r){w(this,"provisionedBy");w(this,"publicationRun");w(this,"resourceType");w(this,"provider");w(this,"resourceId");w(this,"details",null);w(this,"name",null);w(this,"status","queued");this.publicationRun=u,this.resourceType=i,this.provider=r}setDetails(u){this.details=u}setStatus(u){this.status=u}setProvisionedBy(u){this.provisionedBy=u}}class NDi extends Pf{constructor(i,r,a){super(i,Jr.HttpEndpoint,a);w(this,"resourceType",Jr.HttpEndpoint);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class VDi extends Pf{constructor(i,r,a){super(i,Jr.ServerlessFunction,a);w(this,"resourceType",Jr.ServerlessFunction);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class HGe extends Pf{constructor(i,r,a){super(i,Jr.HttpApi,a);w(this,"resourceType",Jr.HttpApi);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=SGe(this.publicationRun.project.id),this.resourceId}}class WGe extends Pf{constructor(i,r,a){super(i,Jr.RelationalDatabase,a);w(this,"resourceType",Jr.RelationalDatabase);w(this,"owners",new Map);w(this,"details",null);w(this,"status","queued");r.forEach(c=>{this.owners.set(c.id,c)}),this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){var i,r;return this.resourceId=Nw((r=(i=Array.from(this.owners.values()))==null?void 0:i[0])==null?void 0:r.id),this.resourceId}}class zGe extends Pf{constructor(i,r){super(i,Jr.CloudHostedCodebase,r);w(this,"resourceType",Jr.CloudHostedCodebase);w(this,"details",null);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`cloud-hosted-codebase--${this.publicationRun.project.id}--${this.publicationRun.project.version}`,this.resourceId}}class YGe extends Pf{constructor(i,r){super(i,Jr.CompiledLocalCodebase,r);w(this,"resourceType",Jr.CompiledLocalCodebase);w(this,"details",null);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`compiled-codebase--${this.publicationRun.project.id}--${this.publicationRun.project.version}--${this.publicationRun.id}`,this.resourceId}}class xDi extends Pf{constructor(i,r){super(i,Jr.AWSTenantAccount,r);w(this,"resourceType",Jr.AWSTenantAccount);w(this,"status","queued");this.resolveDeterministicResourceId()}resolveDeterministicResourceId(){return this.resourceId=`aws-tenant-account--${this.publicationRun.project.id}`,this.resourceId}}class $Di{constructor(u,i){w(this,"id");w(this,"projectAutoIncrementPublicationCount");w(this,"projectPublishedSemanticVersion");w(this,"envIdentifier");w(this,"projectVersion");w(this,"projectBranchId");w(this,"projectId");w(this,"triggeredBy");w(this,"createdAt");w(this,"updatedAt");w(this,"status");w(this,"steps",[]);w(this,"editor");w(this,"explicitResources",new Map);w(this,"implicitGlobalResources",new Map);w(this,"finalGlobalEvent",null);w(this,"finalStatus",null);w(this,"contextType",le.PublicationRun);w(this,"extensionsRegistry");this.id=u.id,this.projectAutoIncrementPublicationCount=u.projectAutoIncrementPublicationCount,this.projectPublishedSemanticVersion=u.projectPublishedSemanticVersion,this.envIdentifier=u.envIdentifier,this.projectVersion=u.projectVersion,this.projectBranchId=u.projectBranchId,this.projectId=u.projectId,this.triggeredBy=u.triggeredBy,this.createdAt=u.createdAt,this.updatedAt=u.updatedAt,this.status=u.status,this.editor=i,this.initRegistry()}get off(){return this.extensionsRegistry.off}get on(){return this.extensionsRegistry.on}get emit(){return this.extensionsRegistry.emit}get emitAsync(){return this.extensionsRegistry.emitAsync}get emitAsyncAll(){return this.extensionsRegistry.emitAsyncAll}get emitAsyncAllSettled(){return this.extensionsRegistry.emitAsyncAllSettled}get emitAsyncSequentially(){return this.extensionsRegistry.emitAsyncSequentially}get emitAsyncSequentiallyAll(){return this.extensionsRegistry.emitAsyncSequentiallyAll}get emitAsyncSequentiallyAllSettled(){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled}get project(){return this.editor.project}getInfraTypes(u){return this.steps.filter(i=>u.includes(i.resourceType))}getStepsTypes(u){return this.steps.filter(i=>u.includes(i.stepType))}toIds(u){return u.map(i=>i.id)}getResourceForEntity(u){const i=Array.from(this.explicitResources.values()).find(r=>r.owners.has(u.id));return i||null}async init(){await this.initResources()}async initResources(){this.implicitGlobalResources.set(Jr.CompiledLocalCodebase,new YGe(this,Bv.Amazon)),this.implicitGlobalResources.set(Jr.CloudHostedCodebase,new zGe(this,Bv.Amazon));const u=this.project.entities.filter(r=>Gi(r,Ae.HTTP_ENDPOINT)),i=this.project.entities.filter(r=>Gi(r,Ae.RELATIONAL_DATABASE));if(i.length&&i.forEach(r=>{const a=new WGe(this,[r],Bv.Amazon);this.explicitResources.set(a.resourceId,a)}),u.length){const r=new HGe(this,u,Bv.Amazon);this.explicitResources.set(r.resourceId,r)}}setSteps(u,i){u.forEach(r=>{this.addStep(r,i)}),this.editor.events.emit(bi.ProjectPublishRequestAcknowledged,{})}addStep(u,i){const r=u.dependency||[];if(r.length){const c=r.filter(e=>!this.steps.find(f=>f.id===e));if(c.length)throw new Error(`Missing dependencies: ${c.join(", ")}`)}if(!this.steps.find(c=>c.id===u.id)){const c=new qGe(u.stepType,u.id,u.resourceType,u.status,r,u.index,i,this,null);this.steps.push(c)}}onUpdate(u){var i;if(X.Logger.log("onUpdate",u),(i=u.payload)!=null&&i.stepType){const r=this.steps.find(a=>{var c;return a.id===((c=u.payload)==null?void 0:c.id)});r&&U(u.emittedAt).isAfter(U(r.lastEventTimestamp))&&r.update(u.payload)}this.editor.events.emit("publication-updated",{}),u.type===KP.Error?(this.finalStatus=SP.Failed,this.finalGlobalEvent=u.event,this.editor.events.emit("project-publication-error",u)):u.type===KP.Complete&&(this.finalStatus=SP.Success,this.finalGlobalEvent=u.event,this.editor.events.emit("project-publication-completed",u))}requestExtension(u){return this.extensionsRegistry.requestExtension(u)}async initRegistry(){return this.extensionsRegistry=new pL(this.editor.events),await this.extensionsRegistry.setup(),this.extensionsRegistry.onResolvePublicationRunContext(()=>this),await this.extensionsRegistry.contextAvailable(le.PublicationRun),this.extensionsRegistry}}function LDi(s){switch(s){case Uo.CodeCompilation:return"Code generation";case Uo.RelationalDatabaseDeployment:return"Database creation";case Uo.HttpApiDeployment:return"HTTP gateway creation";case Uo.InfrastructureValuesCodebaseInterpolation:return"Link code with resources";case Uo.BundleCodebase:return"Bundle code";case Uo.MigrateRelationalDatabase:return"Database structure migration";case Uo.BusinessLogicCodebaseDeployment:return"Update servers with new code";case Uo.CodebaseCleanup:return"Code cleanup";case Uo.HttpApiDeletion:return"HTTP gateway deletion";case Uo.RelationalDatabaseDeletion:return"Database deletion";default:return"Publication finished"}}function BDi(s){switch(s){case bi.DeploymentCompleted:return"Successfully published";case bi.DeploymentStarted:return"Publication started";case bi.DeploymentFailed:return"Publication failed";case bi.AllInfrastructureSuccessfullyProvisioned:return"All infrastructure successfully provisioned";case bi.RequestPayloadValidationFailed:return"Request payload validation failed";case bi.ProjectStateValidationFailedMissingName:return"Project state validation failed: missing name";case bi.ProjectStateValidationFailedMissingAnyFunctionality:return"Project state validation failed: missing any functionality";case bi.RelationalDatabaseDeploymentStarted:return"Database creation started";case bi.RelationalDatabaseDeploymentCompleted:return"Database creation completed";case bi.RelationalDatabaseDeploymentFailed:return"Database creation failed";case bi.CreatingNewRelationalDatabase:return"Creating new database (up to 5 mins)";case bi.WaitingForPreviousRelationalDatabaseDeployment:return"Waiting for previous database creation";case bi.RelationalDatabaseAlreadyExists:return"Database already exists";case bi.HttpApiDeploymentStarted:return"HTTP gateway creation started";case bi.HttpApiDeploymentCompleted:return"HTTP gateway creation completed";case bi.HttpApiDeploymentFailed:return"HTTP gateway creation failed";case bi.CreatingNewHttpApi:return"Creating new HTTP gateway";case bi.HttpApiAlreadyExists:return"HTTP gateway already exists";case bi.BusinessLogicCodebaseDeploymentStarted:return"Update servers with new code started";case bi.BusinessLogicCodebaseDeploymentCompleted:return"Update servers with new code completed";case bi.BusinessLogicCodebaseDeploymentFailed:return"Update servers with new code failed";case bi.BundlingCodebaseForDownload:return"Bundling code for download";case bi.UploadingCodebaseToCloudStorage:return"Uploading code to cloud storage";case bi.InfrastructureValuesCodebaseInterpolationStarted:return"Linking code with resources started";case bi.InfrastructureValuesCodebaseInterpolationCompleted:return"Linking code with resources completed";case bi.InfrastructureValuesCodebaseInterpolationFailed:return"Linking code with resources failed";case bi.CodeCompilationStarted:return"Code generation started";case bi.CodeCompilationCompleted:return"Code generation completed";case bi.CodeCompilationFailed:return"Code generation failed";case bi.BundleCodebaseStarted:return"Code bundling started";case bi.BundleCodebaseCompleted:return"Code bundling completed";case bi.BundleCodebaseFailed:return"Code bundling failed";case bi.InstallingCodebaseDependenciesStarted:return"Installing code dependencies";case bi.InstallingCodebaseDependenciesCompleted:return"Installing code dependencies completed";case bi.InstallingCodebaseDependenciesFailed:return"Installing code dependencies failed";case bi.MigrateRelationalDatabaseStarted:return"Database structure migration started";case bi.MigrateRelationalDatabaseCompleted:return"Database structure migration completed";case bi.MigrateRelationalDatabaseFailed:return"Database structure migration failed";case bi.ProjectAlreadyBeingPublished:return"Project already being published. You need to wait for the previous publication to complete";case bi.ProjectPublishRequestAcknowledged:return"Project publish request acknowledged";case bi.UploadingCodebaseToCloudStorageCompleted:return"Uploading code to cloud storage completed";case bi.UploadingCodebaseToCloudStorageFailed:return"Uploading code to cloud storage failed";case bi.BillingSubscriptionUpdateFailed:return"Billing subscription update failed";case bi.ProjectNotFound:return"Project not found";case bi.HttpApiDeletionCompleted:return"HTTP gateway deletion completed";case bi.HttpApiDeletionFailed:return"HTTP gateway deletion failed";case bi.HttpApiDeletionStarted:return"HTTP gateway deletion started";case bi.PublicationStepFailedReasonUnknown:return"Publication step failed: reason unknown";case bi.WaitingForPreviousHttpApiDeletion:return"Waiting for previous HTTP gateway deletion";case bi.RelationalDatabaseDeletionStarted:return"Database deletion started";case bi.RelationalDatabaseDeletionCompleted:return"Database deletion completed";case bi.RelationalDatabaseDeletionFailed:return"Database deletion failed";case bi.WaitingForPreviousRelationalDatabaseDeletion:return"Waiting for previous database deletion"}return"Unknown event"}var JGe=(s=>(s.NO_LOGIC="NO_LOGIC",s.NO_NAME="NO_NAME",s.NO_CHANGES="NO_CHANGES",s.PROJECT_PUBLICATION_ALREADY_ONGOING="PROJECT_PUBLICATION_ALREADY_ONGOING",s))(JGe||{});function MDi(s){switch(s){case"NO_LOGIC":return"This project has no logic";case"NO_NAME":return"This project has no name";case"NO_CHANGES":return"This version has already been published";case"PROJECT_PUBLICATION_ALREADY_ONGOING":return"This project is already being published";default:return"Publishing is currently not available. Try again later"}}function GDi(s){switch(s){case Jr.RelationalDatabase:return"Relational database";case Jr.HttpEndpoint:case Jr.HttpApi:return"HTTP endpoints";case Jr.ServerlessFunction:case Jr.CloudHostedCodebase:return"Server code functions";default:return"Resources"}}function kDi(s){switch(s){case oy.Running:return"In progress";case oy.Failed:return"Failed";case oy.Success:return"Succeeded";case oy.Skipped:return"Skipped";case oy.Queued:default:return"Queued"}}async function QGe(s,u={}){var h;const i=X.YieldTracker.from(u),r=ts(s),a=is(s),c=[...r,...a,...ta(s),...bL(s),...rs(s),...AL(s)],e=Qb(s);c.push(...e);const f=Ti(s.errors,c);await i.tick();for(const m of s.inputs)await m.validateAsync({tracker:i});for(const m of s.outputs)await m.validateAsync({tracker:i});for(const m of s.internalCalls)await m.validateAsync({tracker:i});return await((h=s.dataType)==null?void 0:h.validateAsync({tracker:i})),f}function XGe(s){var c;(c=s.dataType)==null||c.validate(),s.inputs.forEach(e=>e.validate()),s.outputs.forEach(e=>e.validate()),s.internalCalls.forEach(e=>e.validate());const u=ts(s),i=is(s),r=[...u,...i,...ta(s),...bL(s),...rs(s),...AL(s)],a=Qb(s);return r.push(...a),Ti(s.errors,r)}function bL(s,u){const r=[...s.project.getVariableDeclarations()].filter(a=>a.id!==s.id);return eA(s,[$r],r,u)}function AL(s){const u=[];if(s.parent!==s.project)return u;if(s.catchesError){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotCatchError}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot catch an error because it is globally declared. Global variable declarations must crash the project if an error occurs.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotCatchError,entity:s});u.push(i.error)}if(s.errorCalls.length){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotCallOnError}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot call other entities from its error branch because it is globally declared. Global variable declarations must crash the project if an error occurs.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotCallOnError,entity:s});u.push(i.error)}if(s.calledBy.length){const i=Wt({id:`${s.id}--${Pe.GlobalVariableDeclarationCannotBeCalled}`,message:`${Js[s.type].singular} "${ye(s,s.project)}" with id "${s.id}" cannot be called because it is globally declared. Global variable declarations must be self initialized when the project is loaded, and not be called for initialization.`,severity:Ee.Error,code:Pe.GlobalVariableDeclarationCannotBeCalled,entity:s});u.push(i.error)}return[]}const UDi=Object.freeze(Object.defineProperty({__proto__:null,validate:XGe,validateAsync:QGe,validateGlobalVariableDeclaration:AL,validateVariableDeclarationName:bL},Symbol.toStringTag,{value:"Module"}));async function eke(s,u={}){const i=X.YieldTracker.from(u),r=ts(s),a=is(s),c=[...r,...a,...ta(s),...rs(s),...Hd(s),...ike(s)],e=Qb(s);c.push(...e);const f=Ti(s.errors,c);await i.tick();for(const h of s.inputs)await h.validateAsync({tracker:i});for(const h of s.outputs)await h.validateAsync({tracker:i});for(const h of s.internalCalls)await h.validateAsync({tracker:i});return f}function tke(s){s.inputs.forEach(c=>c.validate()),s.outputs.forEach(c=>c.validate()),s.internalCalls.forEach(c=>c.validate());const u=ts(s),i=is(s),r=[...u,...i,...ta(s),...rs(s)],a=Qb(s);return r.push(...a),Ti(s.errors,r)}function ike(s){const u=[],i=s.declaration.constant;if(i&&s.readsValue){const r=Wt({id:`${s.id}--${we.ValueReadingOverridesConstantVariable}`,message:`The '${s.type}' entity "${ye(s,s.project)}" with id "${s.id}" is a constant variable whose value cannot be overriden, but reads a value.`,severity:Ee.Error,code:we.ValueReadingOverridesConstantVariable,entity:s});u.push(r.error)}if(i&&s.defaultValue){const r=Wt({id:`${s.id}--${we.DefaultValueOverridesConstantVariable}`,message:`The '${s.type}' entity "${ye(s,s.project)}" with id "${s.id}" is a constant variable whose value cannot be overridden, but has a 'defaultValue'.`,severity:Ee.Error,code:we.DefaultValueOverridesConstantVariable,entity:s});u.push(r.error)}return u}function Hd(s){var h;const u=[],i=s.declaration;if((i==null?void 0:i.id)===((h=s.parent)==null?void 0:h.id)||!s.calledBy.length&&!s.successCalls.length&&!s.errorCalls.length&&s.usedInternalCalls.length)return u;const r=Nt(s),a=Nt(i);!!r.find(m=>m.id===i.id)&&u.push(Wt({id:`${s.id}--${we.CalledBeforeDeclaration}`,code:we.CalledBeforeDeclaration,severity:Ee.Error,message:`Entity of type "${s.type}" with id "${s.id}" is called before its 'variable-declaration' '${i.name}' with id "${i.id}".
|
|
73
73
|
The 'variable-declaration' must be called before any internal call that references it can be called.`,entity:s}).error);const e=pi(i,s.project),f=pi(s,s.project);if((e==null?void 0:e.type)!==d.Project&&e&&f){const m=!!a.find(v=>v.id===s.id);if((e==null?void 0:e.id)===(f==null?void 0:f.id))m||u.push(Wt({id:`${s.id}--${we.CalledInParallelBranchToDeclaration}`,code:we.CalledInParallelBranchToDeclaration,severity:Ee.Error,message:`Entity of type "${s.type}" with id "${s.id}" is called in a parallel branch to its 'variable-declaration' '${i.name}' with id "${i.id}".
|
|
74
74
|
The 'variable-declaration' must be called in a different branch that executes before any internal call that references it can be called.`,entity:s}).error);else if(Os(f,e,s.project))u.push(Wt({id:`${s.id}--${we.HigherScopeThanDeclaration}`,code:we.HigherScopeThanDeclaration,severity:Ee.Error,message:`Entity of type "${s.type}" with id "${s.id}" is called in a higher scope than its 'variable-declaration' '${i.name}' with id "${i.id}".
|
|
75
75
|
The 'variable-declaration' must be called in the same scope or in a higher scope than any internal call that references it.`,entity:s}).error);else if(Os(e,f,s.project)){let v=f;for(;v.id!==e.id&&v.id!==s.project.id;){const A=pi(v,s.project);if(A.id===e.id)break;v=A}const b=k0(v);if(b){const D=!!Nt(b).find(O=>O.id===i.id),R=!!a.find(O=>O.id===b.id);D?u.push(Wt({id:`${s.id}--${we.CalledBeforeDeclaration}`,code:we.CalledBeforeDeclaration,severity:Ee.Error,message:`Entity of type "${s.type}" with id "${s.id}" is called before its 'variable-declaration' '${i.name}' with id "${i.id}".
|
package/dist/index.js
CHANGED
|
@@ -136034,7 +136034,7 @@ async function u5i(s, u, i = {}) {
|
|
|
136034
136034
|
]).filter((m) => m.x === 0 || m.y === 0);
|
|
136035
136035
|
kn.autoGenerateLayout(s, u, h);
|
|
136036
136036
|
}
|
|
136037
|
-
var dv = /* @__PURE__ */ ((s) => (s.Amazon = "amazon", s.Google = "google", s.Microsoft = "microsoft", s))(dv || {}), Jr = /* @__PURE__ */ ((s) => (s.RelationalDatabase = "relational-database", s.CompiledLocalCodebase = "compiled-local-codebase", s.CloudHostedCodebase = "cloud-hosted-codebase", s.HttpApi = "http-api", s.HttpEndpoint = "http-endpoint", s.ServerlessFunction = "serverless-function", s.CronJob = "cron-job", s.AWSTenantAccount = "aws-tenant-account", s))(Jr || {}), lO = /* @__PURE__ */ ((s) => (s.Post = "post", s.Get = "get", s.Acknowledgement = "acknowledgment", s.Progress = "progress", s.Error = "error", s.Complete = "complete", s))(lO || {}), _f = /* @__PURE__ */ ((s) => (s.Queued = "queued", s.Running = "running", s.Success = "success", s.Failed = "failed", s.CleanedUp = "cleaned-up", s.Skipped = "skipped", s.AbortedByUser = "aborted-by-user", s.UnrecoverableFailure = "unrecoverable-failure", s.Reverted = "reverted", s.UnpublishingStarted = "unpublishing-started", s.Unpublished = "unpublished", s))(_f || {}), oO = /* @__PURE__ */ ((s) => (s.Queued = "queued", s.Running = "running", s.Success = "success", s.Failed = "failed", s.CleanedUp = "cleaned-up", s.UnrecoverableFailure = "unrecoverable-failure", s.Reverted = "reverted", s.UnpublishingStarted = "unpublishing-started", s.Unpublished = "unpublished", s))(oO || {}), Ai = /* @__PURE__ */ ((s) => (s.ProjectNotFound = "project-not-found", s.ProjectPublishRequestAcknowledged = "project-publish-request-acknowledged", s.PublicationStepFailedReasonUnknown = "publication-step-failed-reason-unknown", s.DeploymentCompleted = "deployment-completed", s.DeploymentStarted = "deployment-started", s.DeploymentFailed = "deployment-failed", s.AllInfrastructureSuccessfullyProvisioned = "all-infrastucture-successfully-provisioned", s.RequestPayloadValidationFailed = "request-payload-validation-failed", s.ProjectStateValidationFailedMissingName = "project-state-validation-failed-missing-name", s.ProjectStateValidationFailedMissingAnyFunctionality = "project-state-validation-failed-missing-any-functionality", s.ProjectAlreadyBeingPublished = "project-already-being-published", s.BillingSubscriptionUpdateFailed = "billing-subscription-update-failed", s.RelationalDatabaseDeploymentStarted = "relational-database-deployment-started", s.RelationalDatabaseDeploymentCompleted = "relational-database-deployment-completed", s.RelationalDatabaseDeploymentFailed = "relational-database-deployment-failed", s.CreatingNewRelationalDatabase = "creating-new-relational-database", s.WaitingForPreviousRelationalDatabaseDeployment = "waiting-for-previous-relationa-database-deployment", s.RelationalDatabaseAlreadyExists = "relational-database-already-exists", s.RelationalDatabaseDeletionStarted = "relational-database-deletion-started", s.RelationalDatabaseDeletionCompleted = "relational-database-deletion-completed", s.RelationalDatabaseDeletionFailed = "relational-database-deletion-failed", s.WaitingForPreviousRelationalDatabaseDeletion = "waiting-for-previous-relationa-database-deletion", s.HttpApiDeploymentStarted = "http-api-deployment-started", s.HttpApiDeploymentCompleted = "http-api-deployment-completed", s.HttpApiDeploymentFailed = "http-api-deployment-failed", s.CreatingNewHttpApi = "creating-new-http-api", s.HttpApiAlreadyExists = "http-api-already-exists", s.HttpApiDeletionStarted = "http-api-deletion-started", s.HttpApiDeletionCompleted = "http-api-deletion-completed", s.HttpApiDeletionFailed = "http-api-deletion-failed", s.WaitingForPreviousHttpApiDeletion = "waiting-for-previous-http-api-deletion", s.BusinessLogicCodebaseDeploymentStarted = "business-logic-codebase-deployment-started", s.BusinessLogicCodebaseDeploymentCompleted = "business-logic-codebase-deployment-completed", s.BusinessLogicCodebaseDeploymentFailed = "business-logic-codebase-deployment-failed", s.BundlingCodebaseForDownload = "bundling-codebase-for-download", s.UploadingCodebaseToCloudStorage = "uploading-codebase-to-cloud-storage", s.UploadingCodebaseToCloudStorageCompleted = "uploading-codebase-to-cloud-storage-completed", s.UploadingCodebaseToCloudStorageFailed = "uploading-codebase-to-cloud-storage-failed", s.InfrastructureValuesCodebaseInterpolationStarted = "infrastructure-values-codebase-interpolation-started", s.InfrastructureValuesCodebaseInterpolationCompleted = "infrastructure-values-codebase-interpolation-completed", s.InfrastructureValuesCodebaseInterpolationFailed = "infrastructure-values-codebase-interpolation-failed", s.CodeCompilationStarted = "code-compilation-started", s.CodeCompilationCompleted = "code-compilation-completed", s.CodeCompilationFailed = "code-compilation-failed", s.BundleCodebaseStarted = "bundle-codebase-started", s.BundleCodebaseCompleted = "bundle-codebase-completed", s.BundleCodebaseFailed = "bundle-codebase-failed", s.InstallingCodebaseDependenciesStarted = "installing-codebase-dependencies-started", s.InstallingCodebaseDependenciesCompleted = "installing-codebase-dependencies-completed", s.InstallingCodebaseDependenciesFailed = "installing-codebase-dependencies-failed", s.MigrateRelationalDatabaseStarted = "migrate-relational-database-started", s.MigrateRelationalDatabaseCompleted = "migrate-relational-database-completed", s.MigrateRelationalDatabaseFailed = "migrate-relational-database-failed", s.ExecutePublicationCompletedEventStarted = "execute-publication-completed-event-started", s.ExecutePublicationCompletedEventCompleted = "execute-publication-completed-event-completed", s.ExecutePublicationCompletedEventFailed = "execute-publication-completed-event-failed", s.ExecutePublicationCompletedEventTimedOut = "execute-publication-completed-event-timed-out", s.AWSTenantAccountProvisioningStarted = "aws-tenant-account-provisioning-started", s.AWSTenantAccountProvisioningCompleted = "aws-tenant-account-provisioning-completed", s.AWSTenantAccountProvisioningFailed = "aws-tenant-account-provisioning-failed", s))(Ai || {}), $o = /* @__PURE__ */ ((s) => (s.CodeCompilation = "code-compilation", s.RelationalDatabaseDeployment = "relational-database-deployment", s.RelationalDatabaseDeletion = "relational-database-deletion", s.HttpApiDeployment = "http-api-deployment", s.HttpApiDeletion = "http-api-deletion", s.InfrastructureValuesCodebaseInterpolation = "infrastructure-values-codebase-interpolation", s.BundleCodebase = "bundle-codebase", s.MigrateRelationalDatabase = "migrate-relational-database", s.BusinessLogicCodebaseDeployment = "business-logic-codebase-deployment", s.ExecutePublicationCompletedEvent = "execute-publication-completed-event", s.CodebaseCleanup = "codebase-cleanup", s.AWSTenantAccountProvisioning = "aws-tenant-account-provisioning", s))($o || {});
|
|
136037
|
+
var dv = /* @__PURE__ */ ((s) => (s.Amazon = "amazon", s.Google = "google", s.Microsoft = "microsoft", s))(dv || {}), Jr = /* @__PURE__ */ ((s) => (s.RelationalDatabase = "relational-database", s.CompiledLocalCodebase = "compiled-local-codebase", s.CloudHostedCodebase = "cloud-hosted-codebase", s.HttpApi = "http-api", s.HttpEndpoint = "http-endpoint", s.ServerlessFunction = "serverless-function", s.CronJob = "cron-job", s.AWSTenantAccount = "aws-tenant-account", s.ContainerCompute = "container-compute", s.SharedDrive = "shared-drive", s))(Jr || {}), lO = /* @__PURE__ */ ((s) => (s.Post = "post", s.Get = "get", s.Acknowledgement = "acknowledgment", s.Progress = "progress", s.Error = "error", s.Complete = "complete", s))(lO || {}), _f = /* @__PURE__ */ ((s) => (s.Queued = "queued", s.Running = "running", s.Success = "success", s.Failed = "failed", s.CleanedUp = "cleaned-up", s.Skipped = "skipped", s.AbortedByUser = "aborted-by-user", s.UnrecoverableFailure = "unrecoverable-failure", s.Reverted = "reverted", s.UnpublishingStarted = "unpublishing-started", s.Unpublished = "unpublished", s))(_f || {}), oO = /* @__PURE__ */ ((s) => (s.Queued = "queued", s.Running = "running", s.Success = "success", s.Failed = "failed", s.CleanedUp = "cleaned-up", s.UnrecoverableFailure = "unrecoverable-failure", s.Reverted = "reverted", s.UnpublishingStarted = "unpublishing-started", s.Unpublished = "unpublished", s))(oO || {}), Ai = /* @__PURE__ */ ((s) => (s.ProjectNotFound = "project-not-found", s.ProjectPublishRequestAcknowledged = "project-publish-request-acknowledged", s.PublicationStepFailedReasonUnknown = "publication-step-failed-reason-unknown", s.DeploymentCompleted = "deployment-completed", s.DeploymentStarted = "deployment-started", s.DeploymentFailed = "deployment-failed", s.AllInfrastructureSuccessfullyProvisioned = "all-infrastucture-successfully-provisioned", s.RequestPayloadValidationFailed = "request-payload-validation-failed", s.ProjectStateValidationFailedMissingName = "project-state-validation-failed-missing-name", s.ProjectStateValidationFailedMissingAnyFunctionality = "project-state-validation-failed-missing-any-functionality", s.ProjectAlreadyBeingPublished = "project-already-being-published", s.BillingSubscriptionUpdateFailed = "billing-subscription-update-failed", s.RelationalDatabaseDeploymentStarted = "relational-database-deployment-started", s.RelationalDatabaseDeploymentCompleted = "relational-database-deployment-completed", s.RelationalDatabaseDeploymentFailed = "relational-database-deployment-failed", s.CreatingNewRelationalDatabase = "creating-new-relational-database", s.WaitingForPreviousRelationalDatabaseDeployment = "waiting-for-previous-relationa-database-deployment", s.RelationalDatabaseAlreadyExists = "relational-database-already-exists", s.RelationalDatabaseDeletionStarted = "relational-database-deletion-started", s.RelationalDatabaseDeletionCompleted = "relational-database-deletion-completed", s.RelationalDatabaseDeletionFailed = "relational-database-deletion-failed", s.WaitingForPreviousRelationalDatabaseDeletion = "waiting-for-previous-relationa-database-deletion", s.HttpApiDeploymentStarted = "http-api-deployment-started", s.HttpApiDeploymentCompleted = "http-api-deployment-completed", s.HttpApiDeploymentFailed = "http-api-deployment-failed", s.CreatingNewHttpApi = "creating-new-http-api", s.HttpApiAlreadyExists = "http-api-already-exists", s.HttpApiDeletionStarted = "http-api-deletion-started", s.HttpApiDeletionCompleted = "http-api-deletion-completed", s.HttpApiDeletionFailed = "http-api-deletion-failed", s.WaitingForPreviousHttpApiDeletion = "waiting-for-previous-http-api-deletion", s.BusinessLogicCodebaseDeploymentStarted = "business-logic-codebase-deployment-started", s.BusinessLogicCodebaseDeploymentCompleted = "business-logic-codebase-deployment-completed", s.BusinessLogicCodebaseDeploymentFailed = "business-logic-codebase-deployment-failed", s.BundlingCodebaseForDownload = "bundling-codebase-for-download", s.UploadingCodebaseToCloudStorage = "uploading-codebase-to-cloud-storage", s.UploadingCodebaseToCloudStorageCompleted = "uploading-codebase-to-cloud-storage-completed", s.UploadingCodebaseToCloudStorageFailed = "uploading-codebase-to-cloud-storage-failed", s.InfrastructureValuesCodebaseInterpolationStarted = "infrastructure-values-codebase-interpolation-started", s.InfrastructureValuesCodebaseInterpolationCompleted = "infrastructure-values-codebase-interpolation-completed", s.InfrastructureValuesCodebaseInterpolationFailed = "infrastructure-values-codebase-interpolation-failed", s.CodeCompilationStarted = "code-compilation-started", s.CodeCompilationCompleted = "code-compilation-completed", s.CodeCompilationFailed = "code-compilation-failed", s.BundleCodebaseStarted = "bundle-codebase-started", s.BundleCodebaseCompleted = "bundle-codebase-completed", s.BundleCodebaseFailed = "bundle-codebase-failed", s.InstallingCodebaseDependenciesStarted = "installing-codebase-dependencies-started", s.InstallingCodebaseDependenciesCompleted = "installing-codebase-dependencies-completed", s.InstallingCodebaseDependenciesFailed = "installing-codebase-dependencies-failed", s.MigrateRelationalDatabaseStarted = "migrate-relational-database-started", s.MigrateRelationalDatabaseCompleted = "migrate-relational-database-completed", s.MigrateRelationalDatabaseFailed = "migrate-relational-database-failed", s.ExecutePublicationCompletedEventStarted = "execute-publication-completed-event-started", s.ExecutePublicationCompletedEventCompleted = "execute-publication-completed-event-completed", s.ExecutePublicationCompletedEventFailed = "execute-publication-completed-event-failed", s.ExecutePublicationCompletedEventTimedOut = "execute-publication-completed-event-timed-out", s.AWSTenantAccountProvisioningStarted = "aws-tenant-account-provisioning-started", s.AWSTenantAccountProvisioningCompleted = "aws-tenant-account-provisioning-completed", s.AWSTenantAccountProvisioningFailed = "aws-tenant-account-provisioning-failed", s.ComputeDeploymentStarted = "compute-deployment-started", s.ComputeDeploymentCompleted = "compute-deployment-completed", s.ComputeDeploymentFailed = "compute-deployment-failed", s))(Ai || {}), $o = /* @__PURE__ */ ((s) => (s.CodeCompilation = "code-compilation", s.RelationalDatabaseDeployment = "relational-database-deployment", s.RelationalDatabaseDeletion = "relational-database-deletion", s.HttpApiDeployment = "http-api-deployment", s.HttpApiDeletion = "http-api-deletion", s.InfrastructureValuesCodebaseInterpolation = "infrastructure-values-codebase-interpolation", s.BundleCodebase = "bundle-codebase", s.MigrateRelationalDatabase = "migrate-relational-database", s.BusinessLogicCodebaseDeployment = "business-logic-codebase-deployment", s.ExecutePublicationCompletedEvent = "execute-publication-completed-event", s.CodebaseCleanup = "codebase-cleanup", s.AWSTenantAccountProvisioning = "aws-tenant-account-provisioning", s.ComputeDeployment = "compute-deployment", s))($o || {});
|
|
136038
136038
|
Jr.CloudHostedCodebase, Jr.HttpApi, Jr.RelationalDatabase, Jr.CloudHostedCodebase, Jr.CloudHostedCodebase, Jr.RelationalDatabase, Jr.CloudHostedCodebase, Jr.CloudHostedCodebase;
|
|
136039
136039
|
function WAi(s) {
|
|
136040
136040
|
return `project-${s}-http-api`;
|
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.7044",
|
|
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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"log:project": "tsx --tsconfig tsconfig.scripts.json scripts/describe-project.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@elyx-code/definitions": "^0.0.
|
|
41
|
+
"@elyx-code/definitions": "^0.0.80000",
|
|
42
42
|
"axios": "^1.9.0",
|
|
43
43
|
"dayjs": "^1.11.13",
|
|
44
44
|
"sql-parser-cst": "^0.33.1",
|