@elyx-code/project-logic-tree 0.0.6123 → 0.0.6124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +182 -180
- package/dist/index.umd.cjs +30 -30
- package/dist/tree/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(d=typeof globalThis<"u"?globalThis:d||self,i(d["@elyx-code/project-logic-tree"]={}))})(this,function(d){"use strict";var SJ=Object.defineProperty;var OJ=(d,i,U)=>i in d?SJ(d,i,{enumerable:!0,configurable:!0,writable:!0,value:U}):d[i]=U;var c=(d,i,U)=>(OJ(d,typeof i!="symbol"?i+"":i,U),U);var i=(r=>(r.DefinitionEntity="definition-entity",r.BuiltInBaseEntity="built-in-base-entity",r.Project="project",r.InstalledProject="installed-project",r.GlobalEvent="global-event",r.DataType="data-type",r.FunctionCall="function-call",r.FunctionDeclaration="function-declaration",r.ActionDescriptor="action-descriptor",r.ValueDescriptor="value-descriptor",r.ArgumentDeclaration="argument-declaration",r.InputMap="input-map",r.ReturnStatement="return-statement",r.BreakStatement="break-statement",r.ContinueStatement="continue-statement",r.ReturnDeclaration="return-declaration",r.OutputMap="output-map",r.PrimitiveEntity="primitive-entity",r.LiteralValue="literal-value",r.Property="property",r.Operation="operation",r.Condition="condition",r.VariableDeclaration="variable-declaration",r.VariableInstance="variable-instance",r.Search="search",r.Loop="loop",r.InternalCall="internal-call",r.GenericReference="generic-reference",r))(i||{}),U=(r=>(r.HTTP_ENDPOINT="BUILT_IN_HTTP_ENDPOINT_ENTITY",r.RELATIONAL_DATABASE="BUILT_IN_RELATIONAL_DATABASE_ENTITY",r.PERSISTED_ENTITY="BUILT_IN_PERSISTED_ENTITY_ENTITY",r.CRON_JOB="BUILT_IN_CRON_JOB_ENTITY",r.EXECUTION="BUILT_IN_EXECUTION_ENTITY",r.KEY_VALUE_PARAM="BUILT_IN_KEY_VALUE_PARAM_ENTITY",r))(U||{}),ze=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(ze||{}),C=(r=>(r.EntityTemplate="entity-template",r.ActionDescriptor="action-descriptor",r.String="string",r.Number="number",r.Boolean="boolean",r.Null="null",r.Enum="enum",r.KeyValue="key-value",r.Date="date",r.UUID="uuid",r.File="file",r.Untyped="untyped",r))(C||{}),Ge=(r=>(r.Addition="addition",r.Subtraction="subtraction",r.Multiplication="multiplication",r.Division="division",r.Remainder="remainder",r.Exponentiation="exponentiation",r))(Ge||{}),re=(r=>(r.Join="string-join",r.Split="string-split",r.DeleteLast="string-delete-last",r.DeleteFirst="string-delete-first",r.DeleteIndex="string-delete-index",r.AddIndex="string-add-index",r.ReplaceFirst="string-replace-first",r.ReplaceLast="string-replace-last",r.ReplaceIndex="string-replace-index",r.ReplaceSingleMatch="string-replace-single-match",r.ReplaceAllMatches="string-replace-all-matches",r.GetIndex="string-get-index",r.GetFirst="string-get-first",r.GetLast="string-get-last",r.Append="string-append",r.Prepend="string-prepend",r))(re||{}),X=(r=>(r.Join="list-join",r.Split="list-split",r.DeleteLast="list-delete-last",r.DeleteFirst="list-delete-first",r.DeleteIndex="list-delete-index",r.AddIndex="list-add-index",r.ReplaceFirst="list-replace-first",r.ReplaceLast="list-replace-last",r.ReplaceIndex="list-replace-index",r.ReplaceSingleMatch="list-replace-single-match",r.ReplaceAllMatches="list-replace-all-matches",r.GetIndex="list-get-index",r.GetFirst="list-get-first",r.GetLast="list-get-last",r.Append="list-append",r.Prepend="list-prepend",r))(X||{}),Ve=(r=>(r.Parallel="parallel",r.Sequential="sequential",r.Wait="wait",r))(Ve||{}),Ne=(r=>(r.CreateNewInstance="create-new-instance",r.Validate="validate",r))(Ne||{}),dt=(r=>(r.HttpRequest="base-http-request",r))(dt||{}),qe=(r=>(r.Equal="equal",r.NotEqual="not-equal",r.And="and",r.Or="or",r.LessThan="less-than",r.MoreThan="more-than",r.LessThanOrEqual="less-than-or-equal",r.MoreThanOrEqual="more-than-or-equal",r))(qe||{}),Jt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Jt||{}),k=(r=>(r.ManualFlow="manual-flow-loop",r.Counted="counted-loop",r.List="list-loop",r.ObjectKeys="object-keys-loop",r.ObjectValues="object-values-loop",r.String="string-loop",r))(k||{}),A=(r=>(r.FixedArguments="fixed-arguments",r.FixedReturns="fixed-returns",r.ReturnedError="returned-error",r.OngoingProcessExecution="ongoing-process-execution",r.DynamicArgument="dynamic-argument-types",r.DynamicReturn="dynamic-return-types",r))(A||{}),et=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(et||{}),Dn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(Dn||{}),Gt=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Gt||{}),ri=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(ri||{});const Sn=[i.VariableDeclaration,i.VariableInstance,i.InputMap,i.ReturnDeclaration],Ze=[i.VariableDeclaration,i.VariableInstance,i.ArgumentDeclaration,i.OutputMap],pp=[...Sn,...Ze],Fe=[i.VariableDeclaration,i.VariableInstance],yp=[i.FunctionDeclaration,i.Condition,i.Loop,i.Operation,i.FunctionCall,i.Search,i.InternalCall,i.GlobalEvent,i.DefinitionEntity,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.VariableDeclaration,i.VariableInstance,i.LiteralValue,i.ActionDescriptor,i.ValueDescriptor,i.Property,i.DataType,i.InstalledProject,i.ArgumentDeclaration,i.InputMap,i.OutputMap,i.ReturnDeclaration],hp=[i.FunctionDeclaration,i.Property,i.ArgumentDeclaration,i.ReturnDeclaration],gl=[i.FunctionCall,i.VariableInstance,i.InputMap,i.OutputMap,i.InternalCall],FP=[...gl,i.Condition,i.Loop,i.Operation,i.Condition],ii=[i.GlobalEvent],Je=[i.Operation,i.FunctionCall,i.Condition,i.Search,i.VariableDeclaration,i.VariableInstance,i.InternalCall,i.Loop],bl=[i.Operation,i.FunctionCall,i.Condition,i.Search,i.VariableDeclaration,i.VariableInstance,i.Loop],We=[i.FunctionDeclaration,...ii],Xt=[...Je,i.ReturnStatement,i.BreakStatement,i.ContinueStatement],vl=[...bl,i.ReturnStatement,i.BreakStatement,i.ContinueStatement],on=[...Je,...We],fp=[...bl,...We],UP=[...Xt,...We],xP=[...vl,...We],pt=[...We,i.Loop],xe=[i.ReturnStatement,i.BreakStatement,i.ContinueStatement],jP=[i.DefinitionEntity,i.BuiltInBaseEntity,i.Project,i.InstalledProject,i.GlobalEvent,i.DataType,i.FunctionCall,i.FunctionDeclaration,i.ActionDescriptor,i.ValueDescriptor,i.ArgumentDeclaration,i.InputMap,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.ReturnDeclaration,i.OutputMap,i.PrimitiveEntity,i.LiteralValue,i.Property,i.Operation,i.Condition,i.VariableDeclaration,i.VariableInstance,i.Search,i.Loop,i.InternalCall],ss=[i.DefinitionEntity,i.GlobalEvent,i.FunctionDeclaration,i.FunctionCall,i.VariableDeclaration,i.VariableInstance,i.Operation,i.Condition,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.InstalledProject,i.Loop,i.Search],mp=[i.DefinitionEntity,i.FunctionDeclaration,i.ArgumentDeclaration,i.ReturnDeclaration,i.Property,i.VariableDeclaration,i.Search,i.Project,i.InstalledProject,i.ActionDescriptor,i.ValueDescriptor],Jn=[i.BuiltInBaseEntity,i.PrimitiveEntity],Tp=[i.DefinitionEntity,i.FunctionDeclaration,i.ArgumentDeclaration,i.ReturnDeclaration,i.Property,i.VariableDeclaration,i.GlobalEvent,i.Search,i.Project,i.InstalledProject,i.ActionDescriptor,i.ValueDescriptor,i.InputMap,i.OutputMap,i.FunctionCall,i.Operation,i.Condition,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.VariableInstance,i.LiteralValue,i.InternalCall];var os=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(os||{});const _={[i.PrimitiveEntity]:{[C.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[C.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[C.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[C.KeyValue]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[C.Enum]:{id:"9542b8b4-2642-4eee-9db9-def7963a17a0",properties:{options:{id:"00ccfcae-2104-45ef-bf6c-50ddccd74286",dataType:{id:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",defaultValue:{id:"enum-options-property-data-type-default-value-id"}}}}},[C.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[C.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[C.Null]:{id:"7d698f34-5a89-4aab-846b-07ef3843b8c4",properties:{}},[C.Untyped]:{id:"4044a018-818e-49d7-bf9a-c3dd1fff2102",properties:{}}},[i.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[i.BuiltInBaseEntity]:{[U.KEY_VALUE_PARAM]:{id:U.KEY_VALUE_PARAM},[U.HTTP_ENDPOINT]:{id:U.HTTP_ENDPOINT,properties:{method:{id:"http-endpoint-built-in-method-property-id"},path:{id:"http-endpoint-built-in-path-property-id"},cors:{id:"http-endpoint-built-in-cors-property-id"}}},[U.PERSISTED_ENTITY]:{id:U.PERSISTED_ENTITY,properties:{database:{id:"persisted-built-in-base-entity-database-property-id"},primaryKey:{id:"persisted-built-in-base-entity-primary-key-property-id"}}},[U.RELATIONAL_DATABASE]:{id:U.RELATIONAL_DATABASE,properties:{identifier:{id:"relational-database-built-in-base-entity-identifier-property-id"},username:{id:"relational-database-built-in-base-entity-username-property-id"},password:{id:"relational-database-built-in-base-entity-password-property-id"},minSize:{id:"relational-database-built-in-base-entity-min-size-property-id"},default:{id:"relational-database-built-in-base-entity-default-property-id"},autoscaling:{id:"relational-database-built-in-base-entity-autoscaling-property-id"}}},[U.CRON_JOB]:{id:U.CRON_JOB,properties:{expression:{id:"cron-job-built-in-base-entity-expression-property-id"}}}},[i.Operation]:{[re.Join]:{id:re.Join,inputs:{separator:{id:"join-strings-separator-input-id"},first:{id:"join-strings-first-string-input-id"},second:{id:"join-strings-second-string-input-id"},dynamicString:{id:"join-strings-dynamic-string-input-id"}},outputs:{result:{id:"join-strings-result-string-return-delaration-id"},error:{id:"join-strings-error-return-delaration-id"}}},[re.Split]:{id:re.Split,inputs:{stringValue:{id:"split-string-string-input-id"},indexLocation:{id:"split-string-index-input-id"}},outputs:{firstPartResult:{id:"split-string-first-part-result-string-return-delaration-id"},secondPartResult:{id:"split-string-second-part-result-string-return-delaration-id"},error:{id:"split-string-error-return-delaration-id"}}},[Ge.Addition]:{id:Ge.Addition,inputs:{firstSummand:{id:"number-addition-first-summand-number-input-id"},secondSummand:{id:"number-addition-second-summand-number-input-id"},dynamicSummand:{id:"number-addition-dynamic-summand-number-input-id"}},outputs:{result:{id:"number-addition-result-number-return-delaration-id",dataType:{id:"number-addition-result-number-data-type-id"}},error:{id:"number-addition-error-return-delaration-id"}}},[Ge.Subtraction]:{id:Ge.Subtraction,inputs:{minuend:{id:"number-subtraction-minuend-number-input-id"},subtrahend:{id:"number-subtraction-subtrahend-number-input-id"},dynamicSubtrahend:{id:"number-subtraction-dynamic-subtrahend-number-input-id"}},outputs:{result:{id:"number-subtraction-result-number-return-delaration-id",dataType:{id:"number-subtraction-result-number-data-type-id"}},error:{id:"number-subtraction-error-return-delaration-id"}}},[dt.HttpRequest]:{id:dt.HttpRequest,inputs:{url:{id:"http-request-url-input-id"},query:{id:"http-request-query-input-id"},method:{id:"http-request-method-input-id"},headers:{id:"http-request-headers-input-id"},body:{id:"http-request-body-string-input-id"}},outputs:{code:{id:"http-response-code-return-delaration-id"},body:{id:"http-response-body-return-delaration-id"},headers:{id:"http-response-headers-return-delaration-id"},error:{id:"http-request-error-return-delaration-id"}}},[Ne.Validate]:{id:Ne.Validate,inputs:{entityToMatch:{id:"validate-data-entity-to-match-input-id"},dataToValidate:{id:"validate-data-data-to-validate-input-id"}},outputs:{outputEntity:{id:"validate-data-output-entity-return-delaration-id"},error:{id:"validate-data-error-return-delaration-id"}}},[Ve.Parallel]:{id:Ve.Parallel,inputs:{listOfActions:{id:"parallel-execution-list-of-actions-input-id"}},outputs:{results:{id:"parallel-execution-results-output-id",dataType:{id:"parallel-execution-results-data-type-id"}},error:{id:"parallel-execution-error-output-id"}}}},[i.Loop]:{[k.List]:{id:k.List,inputs:{list:{id:"iterate-over-list-loop-list-input-id"}},outputs:{results:{id:"iterate-over-list-loop-output-id"}},body:{id:"iterate-over-list-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-list-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-list-loop-current-value-input-id"}}}},[k.String]:{id:k.String,inputs:{string:{id:"iterate-over-string-loop-string-input-id"}},outputs:{results:{id:"iterate-over-string-loop-output-id"}},body:{id:"iterate-over-string-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-string-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-string-loop-current-value-input-id"}}}},[k.ObjectKeys]:{id:k.ObjectKeys,inputs:{object:{id:"iterate-over-object-keys-loop-object-input-id"}},outputs:{results:{id:"iterate-over-object-keys-loop-output-id"}},body:{id:"iterate-over-object-keys-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-object-keys-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-object-keys-loop-current-value-input-id"}}}},[k.ObjectValues]:{id:k.ObjectValues,inputs:{object:{id:"iterate-over-object-values-loop-object-input-id"}},outputs:{results:{id:"iterate-over-object-values-loop-output-id"}},body:{id:"iterate-over-object-values-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-object-values-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-object-values-loop-current-value-input-id"}}}},[k.ManualFlow]:{id:k.ManualFlow,inputs:{},outputs:{results:{id:"manual-flow-loop-output-id"}},body:{id:"manual-flow-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-manual-flow-loop-iteration-number-input-id"}}}},[k.Counted]:{id:k.Counted,inputs:{number:{id:"counted-loop-number-input-id"}},outputs:{results:{id:"counted-loop-output-id"}},body:{id:"counted-loop-body-descriptor-id",inputs:{iterationNumber:{id:"counted-loop-iteration-number-input-id"}}}}},[i.Condition]:{[qe.MoreThanOrEqual]:{id:qe.MoreThanOrEqual,inputs:{leftHand:{id:"condition-more-than-or-equal-left-hand-input-id",dataType:{id:"condition-more-than-or-equal-left-hand-data-type-id"}},rightHand:{id:"condition-more-than-or-equal-right-hand-input-id",dataType:{id:"condition-more-than-or-equal-right-hand-data-type-id"}}}},[Jt.NotEmpty]:{id:Jt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[i.GlobalEvent]:{[Dn.PROJECT_PUBLICATION_COMPLETED]:{id:Dn.PROJECT_PUBLICATION_COMPLETED}}},$t=_[i.PrimitiveEntity],J={type:i.PrimitiveEntity,id:$t.string.id,description:"A string of characters.",version:1,name:C.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},On={type:i.PrimitiveEntity,id:$t.boolean.id,description:"A 'true' or 'false' value.",version:1,name:C.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},ee={type:i.PrimitiveEntity,id:$t.number.id,description:"A number value.",version:1,name:C.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ep={type:i.PrimitiveEntity,id:$t.null.id,description:"An explicitly empty value.",version:1,name:C.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},it={type:i.PrimitiveEntity,id:$t.untyped.id,description:"Data of any type that isn't known in advance.",version:1,name:C.Untyped,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Rp={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:i.GenericReference,entityId:$t.enum.properties.options.id,entityType:i.Property},gp={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:i.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:i.Property},bp={like:!1,inferred:!1,id:$t.enum.properties.options.dataType.id,version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:gp},vp={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:i.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:i.PrimitiveEntity},Ip={constant:!1,hidden:!1,required:!0,id:$t.enum.properties.options.id,name:"Options",version:1,type:i.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,defaultValue:{id:$t.enum.properties.options.dataType.defaultValue.id,type:i.LiteralValue,version:1,name:C.KeyValue,autogeneration:null,value:[],valueAsType:null,parent:Rp},dataType:bp,description:"Options for the enum. Each option is a text value.",parent:vp},Pn={type:i.PrimitiveEntity,id:$t.enum.id,description:"A set of text options to choose from.",version:1,name:C.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Ip],methods:[]},ln={type:i.PrimitiveEntity,id:$t.date.id,description:"A date and time value.",version:1,name:C.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},An={type:i.PrimitiveEntity,id:$t.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:C.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[J],properties:[],methods:[]},ai={type:i.PrimitiveEntity,id:$t[C.KeyValue].id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:C.KeyValue,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Dp=[J,On,ee,Ep,it,Pn,ln,An,ai],dn=_[i.Operation][Ge.Addition],Sp={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:dn.inputs.firstSummand.id,entityType:i.ValueDescriptor},Op={like:!1,inferred:!1,id:"number-addition-first-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Sp},Pp={type:i.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:dn.inputs.secondSummand.id,entityType:i.ValueDescriptor},Ap={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Pp},Cp={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:dn.outputs.result.id,entityType:i.ValueDescriptor},wp={like:!1,inferred:!1,id:dn.outputs.result.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Cp},Bp={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ge.Addition,entityType:i.ActionDescriptor},Il={id:dn.inputs.firstSummand.id,type:i.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",defaultValue:null,dataType:Op,required:!0,parentRelationType:A.FixedArguments,index:0,parent:Bp},Mp={type:i.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Ge.Addition,entityType:i.ActionDescriptor},Dl={id:dn.inputs.secondSummand.id,type:i.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",defaultValue:null,dataType:Ap,required:!0,parentRelationType:A.FixedArguments,index:1,parent:Mp},Sl={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ge.Addition,entityType:i.ActionDescriptor},Ol={parentRelationType:A.FixedReturns,id:dn.outputs.result.id,type:i.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",defaultValue:null,dataType:wp,required:!0,index:0,parent:Sl},_p={type:i.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Ge.Addition,entityType:i.ActionDescriptor},Vp={parentRelationType:A.FixedReturns,id:dn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:_p},Np={type:i.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:dn.inputs.dynamicSummand.id,entityType:i.ValueDescriptor},Lp={like:!1,inferred:!1,id:"number-addition-operation-dynamic-summand-argument-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Np},Gp={parentRelationType:A.DynamicArgument,id:dn.inputs.dynamicSummand.id,type:i.ValueDescriptor,description:"A number to add",version:1,name:"Summand",defaultValue:null,dataType:Lp,required:!0,index:2,parent:Sl},ls={id:Ge.Addition,type:i.ActionDescriptor,description:"Sum numbers",version:1,name:Ge.Addition,inputs:[Il,Dl,Gp],error:Vp,outputs:[Ol],parent:null},cn=_[i.Operation][Ge.Subtraction],$p={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:cn.inputs.minuend.id,entityType:i.ValueDescriptor},Fp={like:!1,inferred:!1,id:"number-subtraction-first-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:$p},Up={type:i.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:cn.inputs.subtrahend.id,entityType:i.ValueDescriptor},xp={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Up},jp={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:cn.outputs.result.id,entityType:i.ValueDescriptor},kp={like:!1,inferred:!1,id:cn.outputs.result.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:jp},Pl={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},qp={id:cn.inputs.minuend.id,type:i.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",defaultValue:null,dataType:Fp,required:!0,parentRelationType:A.FixedArguments,index:0,parent:Pl},Jp={type:i.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Wp={id:cn.inputs.subtrahend.id,type:i.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",defaultValue:null,dataType:xp,required:!0,parentRelationType:A.FixedArguments,index:1,parent:Jp},Yp={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Hp={parentRelationType:A.FixedReturns,id:cn.outputs.result.id,type:i.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",defaultValue:null,dataType:kp,required:!0,index:0,parent:Yp},zp={type:i.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Zp={parentRelationType:A.FixedReturns,id:cn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:zp},Kp={type:i.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:cn.inputs.dynamicSubtrahend.id,entityType:i.ValueDescriptor},Xp={like:!1,inferred:!1,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Kp},Qp={id:cn.inputs.dynamicSubtrahend.id,type:i.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",defaultValue:null,dataType:Xp,required:!0,parentRelationType:A.DynamicArgument,index:2,parent:Pl},Al={id:Ge.Subtraction,type:i.ActionDescriptor,description:"Substract numbers",version:1,name:Ge.Subtraction,inputs:[qp,Wp,Qp],error:Zp,outputs:[Hp],parent:null},ey={[Ge.Addition]:ls,[Ge.Subtraction]:Al},Wt=_[i.Operation][re.Join],ty={type:i.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Wt.inputs.first.id,entityType:i.ValueDescriptor},ny={like:!1,inferred:!1,id:"join-strings-first-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ty},ry={type:i.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Wt.inputs.second.id,entityType:i.ValueDescriptor},iy={like:!1,inferred:!1,id:"join-strings-second-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ry},ay={type:i.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Wt.outputs.result.id,entityType:i.ValueDescriptor},sy={like:!1,inferred:!1,id:"join-strings-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ay},oy={type:i.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},ds={id:Wt.inputs.first.id,type:i.ValueDescriptor,version:1,name:"Text",description:"The first text to join to the second one. Its value will be at the beginning of the resulting text.",defaultValue:null,dataType:ny,parentRelationType:A.FixedArguments,required:!0,index:1,parent:oy},ly={type:i.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Wt.inputs.first.id,entityType:i.ValueDescriptor},dy={type:i.GenericReference,id:"join-strings-separator-string-data-type-default-value-parent-ref",entityId:Wt.inputs.separator.id,entityType:i.ValueDescriptor},cy={type:i.LiteralValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:C.String,value:"",valueAsType:null,autogeneration:null,parent:dy},uy={like:!1,inferred:!1,id:"join-strings-separator-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ly},py={type:i.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},yy={id:Wt.inputs.separator.id,type:i.ValueDescriptor,version:1,name:"Separator",description:"The text value that will be inserted between each of the values that are joined.",defaultValue:cy,dataType:uy,parentRelationType:A.FixedArguments,required:!1,index:0,parent:py},hy={type:i.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},cs={id:Wt.inputs.second.id,type:i.ValueDescriptor,version:1,name:"Text",description:"The second text to join to the first one. Its value will be at the end of the resulting text.",defaultValue:null,dataType:iy,parentRelationType:A.FixedArguments,required:!0,index:2,parent:hy},fy={type:i.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Zi={parentRelationType:A.FixedReturns,id:Wt.outputs.result.id,type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",defaultValue:null,dataType:sy,required:!0,index:0,parent:fy},my={type:i.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Ty={parentRelationType:A.FixedReturns,id:Wt.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:my},Ey={type:i.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Wt.inputs.dynamicString.id,entityType:i.ValueDescriptor},Ry={like:!1,inferred:!1,id:"join-strings-dynamic-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:Ey},gy={type:i.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},by={id:Wt.inputs.dynamicString.id,type:i.ValueDescriptor,version:1,name:"Text",description:"Text to join to the previous ones. Its value will be at the end of the resulting text.",defaultValue:null,dataType:Ry,parentRelationType:A.DynamicArgument,required:!0,index:3,parent:gy},Ki={id:re.Join,type:i.ActionDescriptor,version:1,name:re.Join,description:"Join text values together, to form a single resulting text value.",inputs:[yy,ds,cs,by],outputs:[Zi],error:Ty,parent:null},Cn=_[i.Operation][re.Split],vy={type:i.GenericReference,id:"split-string-string-argument-declaration",entityId:Cn.inputs.stringValue.id,entityType:i.ValueDescriptor},Iy={like:!1,inferred:!1,id:"split-string-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:vy},Dy={type:i.GenericReference,id:"split-string-index-argument-declaration",entityId:Cn.inputs.indexLocation.id,entityType:i.ValueDescriptor},Sy={like:!1,inferred:!1,id:"split-string-index-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Dy},Oy={type:i.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:Cn.outputs.firstPartResult.id,entityType:i.ValueDescriptor},Py={like:!1,inferred:!1,id:"split-string-first-part-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:Oy},Ay={type:i.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:Cn.outputs.secondPartResult.id,entityType:i.ValueDescriptor},Cy={like:!1,inferred:!1,id:"split-string-second-part-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:Ay},wy={type:i.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},By={id:Cn.inputs.stringValue.id,type:i.ValueDescriptor,version:1,name:"Text value",description:"The text value that will be split into two at the given index location.",defaultValue:null,dataType:Iy,parentRelationType:A.FixedArguments,required:!0,index:0,parent:wy},My={type:i.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},_y={id:Cn.inputs.indexLocation.id,type:i.ValueDescriptor,version:1,name:"Index location",description:"The index location where the text will be split into two. The text at this index will be the beginning of the second text.",defaultValue:null,dataType:Sy,parentRelationType:A.FixedArguments,required:!0,index:1,parent:My},Vy={type:i.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},kP={parentRelationType:A.FixedReturns,id:Cn.outputs.secondPartResult.id,type:i.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",defaultValue:null,dataType:Cy,required:!0,index:1,parent:Vy},Ny={type:i.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Ly={parentRelationType:A.FixedReturns,id:Cn.outputs.firstPartResult.id,type:i.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",defaultValue:null,dataType:Py,required:!0,index:0,parent:Ny},Gy={type:i.GenericReference,id:"split-string-operation-error-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},$y={parentRelationType:A.FixedReturns,id:Cn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Gy},Cl={id:re.Split,type:i.ActionDescriptor,version:1,name:re.Split,description:"Split a text into two, at the given index location.",inputs:[By,_y],outputs:[Ly],error:$y,parent:null},Fy={[re.Join]:Ki,[re.Split]:Cl};var Uy=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(Uy||{}),xy=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(xy||{});const jy={type:i.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:i.ValueDescriptor},ky={like:!1,inferred:!1,id:"join-list-first-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:jy},qy={type:i.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:i.ValueDescriptor},Jy={like:!1,inferred:!1,id:"join-list-second-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:qy},Wy={type:i.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:i.ValueDescriptor},Yy={like:!1,inferred:!1,id:"join-list-result-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Wy},Hy={type:i.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},zy={id:"join-list-first-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"First value",description:"The first list to join to the second one. Its values will be at the beginning of the resulting list.",defaultValue:null,dataType:ky,parentRelationType:A.FixedArguments,required:!0,index:0,parent:Hy},Zy={type:i.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},Ky={id:"join-list-second-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"Second value",description:"The second list to join to the first one. Its values will be at the end of the resulting list.",defaultValue:null,dataType:Jy,parentRelationType:A.FixedArguments,required:!0,index:1,parent:Zy},Xy={type:i.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},Qy={parentRelationType:A.FixedReturns,id:"join-list-result-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",defaultValue:null,dataType:Yy,required:!0,index:0,parent:Xy},eh={type:i.GenericReference,id:"join-list-operation-error-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},th={parentRelationType:A.FixedReturns,id:"join-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:eh},wl={id:X.Join,type:i.ActionDescriptor,version:1,name:X.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[zy,Ky],error:th,outputs:[Qy],parent:null};var nh=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(nh||{}),rh=(r=>(r.FirstOutputList="split-list-first-output-list-return-delaration",r.SecondOutputList="split-list-second-output-list-return-delaration",r.Error="split-list-error-return-delaration",r))(rh||{});const ih={type:i.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:i.ValueDescriptor},ah={like:!1,inferred:!1,id:"split-list-operation-input-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:ih},sh={type:i.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:i.ValueDescriptor},oh={like:!1,inferred:!1,id:"split-list-operation-split-index-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:sh},Bl={type:i.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:i.ValueDescriptor},lh={like:!1,inferred:!1,id:"split-list-operation-first-output-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Bl},dh={type:i.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},ch={id:"list-to-split-argument-declaration",type:i.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",defaultValue:null,dataType:ah,parentRelationType:A.FixedArguments,required:!0,index:0,parent:dh},uh={type:i.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},ph={id:"split-list-index-argument-declaration",type:i.ValueDescriptor,version:1,name:"Split location",description:"The index at which to split the list. The value at this index will be the first value of the second list.",defaultValue:null,dataType:oh,parentRelationType:A.FixedArguments,required:!0,index:1,parent:uh},yh={type:i.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},hh={parentRelationType:A.FixedReturns,id:"split-list-first-output-list-return-delaration",type:i.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",defaultValue:null,dataType:lh,required:!0,index:0,parent:yh},fh={like:!1,inferred:!1,id:"split-list-operation-second-output-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Bl},mh={type:i.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},Th={parentRelationType:A.FixedReturns,id:"split-list-second-output-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",defaultValue:null,dataType:fh,required:!0,index:0,parent:mh},Eh={type:i.GenericReference,id:"split-list-operation-error-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},Rh={parentRelationType:A.FixedReturns,id:"split-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Eh},Ml={id:X.Split,type:i.ActionDescriptor,version:1,name:X.Split,description:"Splits a given list at the given index, and returns two lists, one with the values up to the index, and the other with the values after the index",inputs:[ch,ph],outputs:[hh,Th],error:Rh,parent:null};var gh=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(gh||{}),bh=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(bh||{});const vh={type:i.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:i.ValueDescriptor},Ih={like:!1,inferred:!1,id:"get-last-in-list-input-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:vh},Dh={type:i.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:i.ValueDescriptor},Sh={like:!1,inferred:!1,id:"get-last-in-list-output-element-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Dh},Oh={type:i.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},Ph={id:"get-last-in-list-input-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",defaultValue:null,dataType:Ih,parentRelationType:A.FixedArguments,required:!0,index:0,parent:Oh},Ah={type:i.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},Ch={parentRelationType:A.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:i.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",defaultValue:null,dataType:Sh,required:!0,index:0,parent:Ah},wh={type:i.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},Bh={parentRelationType:A.FixedReturns,id:"get-last-in-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:wh},_l={id:X.GetLast,type:i.ActionDescriptor,version:1,name:X.GetLast,description:"Outputs the last element of a given list.",inputs:[Ph],outputs:[Ch],error:Bh,parent:null};var Mh=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(Mh||{}),_h=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(_h||{});const Vh={type:i.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:i.ValueDescriptor},Nh={like:!1,inferred:!1,id:"append-to-list-lsit-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:Vh},Lh={type:i.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:i.ValueDescriptor},Gh={like:!1,inferred:!1,id:"append-to-list-second-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:Lh},$h={type:i.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:i.ValueDescriptor},Fh={like:!1,inferred:!1,id:"append-to-list-result-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:$h},Uh={type:i.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Vl={id:"append-to-list-lsit-argument-declaration",type:i.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",defaultValue:null,dataType:Nh,parentRelationType:A.FixedArguments,required:!0,index:0,parent:Uh},xh={type:i.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Nl={id:"append-to-list-element-to-append-argument-declaration",type:i.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",defaultValue:null,dataType:Gh,parentRelationType:A.FixedArguments,required:!0,index:1,parent:xh},jh={type:i.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},kh={parentRelationType:A.FixedReturns,id:"append-to-list-result-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",defaultValue:null,dataType:Fh,required:!0,index:0,parent:jh},qh={type:i.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Jh={parentRelationType:A.FixedReturns,id:"append-to-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:qh},us={id:X.Append,type:i.ActionDescriptor,version:1,name:X.Append,description:"Adds a given element to the end of a list value.",inputs:[Vl,Nl],error:Jh,outputs:[kh],parent:null},Wh={[X.Join]:wl,[X.Split]:Ml,[X.GetLast]:_l,[X.Append]:us},si=_[i.Operation][Ve.Parallel],Yh={id:"parallel-execution-list-of-functions-blueprint-dynamic-output-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},Hh={id:"parallel-execution-list-of-functions-blueprint-dynamic-input-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},zh={id:"parallel-execution-list-of-functions-blueprint-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[Hh],outputs:[Yh],error:null,parent:null},Zh={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:si.inputs.listOfActions.id,entityType:i.ValueDescriptor},Kh={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zh,asType:!1,isList:!0,parent:Zh},Xh={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:si.outputs.results.id,entityType:i.ValueDescriptor},Qh={like:!1,inferred:!1,id:si.outputs.results.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!0,parent:Xh},ef={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ve.Parallel,entityType:i.ActionDescriptor},Ll={id:si.inputs.listOfActions.id,type:i.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Kh,defaultValue:null,required:!0,index:0,parent:ef,parentRelationType:A.FixedArguments},tf={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ve.Parallel,entityType:i.ActionDescriptor},Gl={id:si.outputs.results.id,type:i.ValueDescriptor,version:1,name:"List of execution results",description:"Each execution result, in the same order as the input list of actions. One item on this list for each executed action.",dataType:Qh,defaultValue:null,required:!0,index:0,parent:tf,parentRelationType:A.FixedReturns},nf={type:i.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:Ve.Parallel,entityType:i.ActionDescriptor},rf={id:si.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:nf,parentRelationType:A.ReturnedError},Qt={id:Ve.Parallel,type:i.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:Ve.Parallel,inputs:[Ll],outputs:[Gl],error:rf,parent:null};var af=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(af||{}),sf=(r=>(r.Error="wait-operation-error-return-delaration",r))(sf||{});const of={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:i.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},lf={like:!1,inferred:!1,id:"wait-milliseconds-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:of},df={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:i.ActionDescriptor,entityId:Ve.Wait},yr={id:"wait-milliseconds-number-argument-declaration",type:i.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",defaultValue:null,dataType:lf,required:!0,index:0,parent:df,parentRelationType:A.FixedArguments},cf={type:i.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ve.Wait,entityType:i.ActionDescriptor},uf={id:"wait-operation-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:cf,parentRelationType:A.ReturnedError},Rt={id:Ve.Wait,type:i.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:Ve.Wait,inputs:[yr],outputs:[],error:uf,parent:null};var pf=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(pf||{}),yf=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(yf||{});const hf={id:"sequential-execution-list-of-functions-blueprint-dynamic-output-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},ff={id:"sequential-execution-list-of-functions-blueprint-dynamic-input-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},mf={id:"sequential-execution-list-of-functions-blueprint-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[ff],outputs:[hf],error:null,parent:null},Tf={type:i.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:i.ValueDescriptor},Ef={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:mf,asType:!1,isList:!0,parent:Tf},Rf={type:i.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:i.ValueDescriptor},gf={like:!1,inferred:!1,id:"sequential-execution-list-of-execution-results-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!0,parent:Rf},bf={type:i.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},$l={id:"sequential-execution-list-of-functions-argument-declaration",type:i.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",defaultValue:null,dataType:Ef,required:!0,index:0,parent:bf,parentRelationType:A.FixedArguments},vf={type:i.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},Fl={id:"sequential-execution-result-return-delaration",type:i.ValueDescriptor,version:1,name:"List of execution results",description:"Each execution result, in the same order as the input list of actions. One item on this list for each executed action.",defaultValue:null,dataType:gf,required:!0,index:0,parent:vf,parentRelationType:A.FixedReturns},If={type:i.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},Df={id:"sequential-execution-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:If,parentRelationType:A.ReturnedError},wn={id:Ve.Sequential,type:i.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:Ve.Sequential,inputs:[$l],outputs:[Fl],error:Df,parent:null},Sf={[Ve.Parallel]:Qt,[Ve.Wait]:Rt,[Ve.Sequential]:wn};var Of=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(Of||{}),Pf=(r=>(r.Error="create-new-instance-error-return-delaration",r))(Pf||{});const Af={type:i.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},Cf={type:i.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:i.ValueDescriptor},wf={like:!1,inferred:!1,id:"new-entity-data-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:Cf},Bf={id:"new-entity-data-argument-declaration",type:i.ValueDescriptor,version:1,name:"Data for new entity",description:"The data to be used to create the new entity, with all the required properties",dataType:wf,required:!0,defaultValue:null,parentRelationType:A.FixedArguments,index:1,parent:Af},Mf={type:i.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},_f={like:!1,inferred:!1,id:"entity-to-instanciate-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,parent:Mf},Vf={type:i.GenericReference,id:"create-new-instance-operation-ref",entityType:i.ActionDescriptor,entityId:Ne.CreateNewInstance},Nf={id:"entity-to-instanciate-argument-declaration",type:i.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",defaultValue:null,dataType:_f,required:!0,parentRelationType:A.FixedArguments,index:0,parent:Vf},Lf={type:i.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},Gf={parentRelationType:A.FixedReturns,id:"create-new-instance-output-entity-declaration",type:i.ValueDescriptor,version:1,name:"Created entity",description:"The entity that was created",defaultValue:null,dataType:null,parent:Lf,required:!0,index:0},$f={type:i.GenericReference,id:"create-new-instance-error-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},Ff={parentRelationType:A.FixedReturns,id:"create-new-instance-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:$f},hr={id:Ne.CreateNewInstance,type:i.ActionDescriptor,description:"Creates a new copy of a given entity, with the given values for each property, or default values if a value is not provided",version:1,name:Ne.CreateNewInstance,inputs:[Nf,Bf],outputs:[Gf],error:Ff,parent:null},oi=_[i.Operation][Ne.Validate],Uf={type:i.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:oi.inputs.dataToValidate.id},xf={like:!1,inferred:!1,id:"validate-data-operation-data-to-validate-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:Uf},jf={type:i.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:i.ActionDescriptor,entityId:Ne.Validate},kf={id:oi.inputs.dataToValidate.id,type:i.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",defaultValue:null,dataType:xf,required:!0,parentRelationType:A.FixedArguments,index:0,parent:jf},qf={type:i.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:oi.inputs.entityToMatch.id},Jf={like:!1,inferred:!1,id:"validate-data-operation-entity-to-match-type-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,parent:qf},Wf={type:i.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:i.ActionDescriptor,entityId:Ne.Validate},Yf={id:oi.inputs.entityToMatch.id,type:i.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:Jf,defaultValue:null,required:!0,index:0,parentRelationType:A.FixedArguments,parent:Wf},Hf={type:i.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:Ne.Validate,entityType:i.ActionDescriptor},zf={id:oi.outputs.outputEntity.id,type:i.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",defaultValue:null,parent:Hf,required:!0,index:0,parentRelationType:A.FixedReturns},Zf={type:i.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ne.Validate,entityType:i.ActionDescriptor},Kf={id:oi.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,defaultValue:null,required:!0,index:1,parent:Zf,parentRelationType:A.ReturnedError},fr={id:Ne.Validate,type:i.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:Ne.Validate,inputs:[Yf,kf],outputs:[zf],error:Kf,parent:null},Xf={[Ne.CreateNewInstance]:hr,[Ne.Validate]:fr},Qe=_[i.Operation]["base-http-request"],Qf={type:i.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:i.ValueDescriptor,entityId:Qe.inputs.url.id},em={id:"http-request-url-default-value-id",type:i.LiteralValue,version:1,value:"https://some-url.com",name:C.String,valueAsType:null,parent:Qf,autogeneration:null},tm={type:i.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Qe.inputs.url.id,entityType:i.ValueDescriptor},nm={like:!1,inferred:!1,id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:tm},rm={type:i.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Qe.inputs.query.id,entityType:i.ValueDescriptor},im={like:!1,inferred:!1,id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:rm},am={type:i.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:i.ValueDescriptor,entityId:Qe.inputs.method.id},sm={id:"http-request-method-default-value-id",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,valueAsType:null,parent:am,autogeneration:null},om={type:i.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Qe.inputs.method.id,entityType:i.ValueDescriptor},lm={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:om},dm={type:i.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Qe.inputs.headers.id,entityType:i.ValueDescriptor},cm={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:dm},um={type:i.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Qe.inputs.body.id,entityType:i.ValueDescriptor},pm={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:um},ym={type:i.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:i.ValueDescriptor,entityId:Qe.outputs.code.id},hm={like:!1,inferred:!1,id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:ym},fm={type:i.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:i.ValueDescriptor,entityId:Qe.outputs.headers.id},mm={type:i.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:i.ValueDescriptor,entityId:Qe.outputs.headers.id},Tm={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:mm},Em={type:i.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:i.ValueDescriptor,entityId:Qe.outputs.body.id},Rm={type:i.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:i.ValueDescriptor,entityId:Qe.outputs.body.id},gm={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:Rm},bm={type:i.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ps={id:Qe.inputs.method.id,type:i.ValueDescriptor,description:"A single word that represents the type of request you want to make. For example: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, TRACE, CONNECT, CUSTOM",version:1,name:"Method",defaultValue:sm,dataType:lm,required:!1,index:0,parentRelationType:A.FixedArguments,parent:bm},vm={type:i.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ys={id:Qe.inputs.url.id,type:i.ValueDescriptor,description:"The base domain, or address where the request is being sent to. For example: https://some-url.com",version:1,name:"URL",dataType:nm,defaultValue:em,required:!1,index:1,parentRelationType:A.FixedArguments,parent:vm},Im={type:i.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Ul={id:Qe.inputs.query.id,type:i.ValueDescriptor,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",version:1,name:"Query Params",defaultValue:null,dataType:im,required:!1,index:2,parentRelationType:A.FixedArguments,parent:Im},Dm={type:i.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},hs={id:Qe.inputs.headers.id,type:i.ValueDescriptor,description:"A set of any properties, with names and values that represent metadata about the request, such as the server, date, content type, and more, that you want to send alongside your request data.",version:1,name:"Headers",defaultValue:null,dataType:cm,required:!1,index:3,parent:Dm,parentRelationType:A.FixedArguments},Sm={type:i.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},fs={id:Qe.inputs.body.id,type:i.ValueDescriptor,description:"The main data payload of the request. This is the data that you want to send to the server. It could be anything, but it is usually a KeyValue data structure or a text value.",version:1,name:"Body",dataType:pm,defaultValue:null,required:!1,index:4,parentRelationType:A.FixedArguments,parent:Sm},Om={type:i.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ms={id:Qe.outputs.code.id,type:i.ValueDescriptor,description:'A standardized status code of the response. It is a 3-digit number that represents the response status. For example, 200 means "OK", 404 means "Not Found", and 500 means "Internal Server Error".',version:1,name:"Code",defaultValue:null,dataType:hm,required:!0,index:0,parentRelationType:A.FixedReturns,parent:Om},Pm={type:i.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Ts={parentRelationType:A.FixedReturns,id:Qe.outputs.headers.id,type:i.ValueDescriptor,description:"A set of any properties, with names and value that the server sent back to you. It represents metadata about the response, such as the server, date, content type, and more.",version:1,name:"Headers",defaultValue:{id:"http-response-headers-default-value-id",type:i.LiteralValue,version:1,value:{},name:C.KeyValue,parent:fm,valueAsType:null,autogeneration:null},dataType:Tm,required:!0,index:1,parent:Pm},Am={type:i.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Es={id:Qe.outputs.body.id,type:i.ValueDescriptor,description:"The main data payload of the response. This is the data that the server sent back to you. It could be anything, but it is usually a KeyValue data structure or a text value.",version:1,name:"Body",parentRelationType:A.FixedReturns,dataType:gm,defaultValue:{id:"http-response-body-default-value-id",type:i.LiteralValue,version:1,value:{},name:C.KeyValue,parent:Em,valueAsType:null,autogeneration:null},required:!0,index:2,parent:Am},Cm={type:i.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},wm={type:i.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:i.ValueDescriptor,entityId:Qe.outputs.error.id},Bm={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:wm},xl={parentRelationType:A.ReturnedError,id:Qe.outputs.error.id,type:i.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",defaultValue:null,dataType:Bm,required:!0,index:0,parent:Cm},Xi={type:i.ActionDescriptor,id:dt.HttpRequest,name:dt.HttpRequest,description:"Make an HTTP request, out to the internet, to a given URL with the specified method, query parameters, headers, and body.",version:1,inputs:[ps,ys,Ul,hs,fs],outputs:[ms,Ts,Es],error:xl,parent:null},Mm={[dt.HttpRequest]:Xi},_m={...Fy,...ey,...Wh,...Sf,...Xf,...Mm},Vm=Object.values(_m),qP=_[i.Loop]["manual-flow-loop"],Nm={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ManualFlow,entityType:i.ActionDescriptor},Lm={id:qP.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:Nm,parentRelationType:A.DynamicReturn},Rs={id:k.ManualFlow,type:i.ActionDescriptor,version:1,name:k.ManualFlow,description:"A loop that is manually controlled by the continue and break statements. It runs until the break statement is called, and it can skip to the next iteration with the continue statement.",inputs:[],outputs:[Lm],error:null,parent:null},Qi=_[i.Loop]["manual-flow-loop"],Gm={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"manual-flow-loop-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},$m={like:!1,inferred:!1,id:"manual-flow-loop-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:Gm},Fm={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},jl={id:Qi.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the manual flow loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:$m,required:!0,index:0,parentRelationType:A.FixedArguments,parent:Fm},Um={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},xm={id:"manual-flow-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:1,parentRelationType:A.DynamicArgument,parent:Um},jm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},km={id:"manual-flow-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:jm},kl={id:Qi.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[jl,xm],outputs:[km],error:null,parent:null},qm=_[i.Loop]["string-loop"],Jm={id:"iterate-over-string-loop-string-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-string-argument-declaration-id",entityType:i.ValueDescriptor},Wm={like:!1,inferred:!1,id:"iterate-over-string-loop-string-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:Jm},Ym={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.String,entityType:i.ActionDescriptor},Hm={id:qm.inputs.string.id,type:i.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",defaultValue:null,required:!0,dataType:Wm,index:0,parent:Ym,parentRelationType:A.FixedArguments},zm={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.String,entityType:i.ActionDescriptor},Zm={id:qm.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:zm,parentRelationType:A.DynamicReturn},ea={id:k.String,type:i.ActionDescriptor,version:1,name:k.String,description:"Iterates over a string of entities",inputs:[Hm],outputs:[Zm],error:null,parent:null},mr=_[i.Loop]["string-loop"],Km={id:"iterate-over-string-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},Xm={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:Km},Qm={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},ql={id:mr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the string that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:Xm,required:!0,index:1,parentRelationType:A.FixedArguments,parent:Qm},eT={id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},tT={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:eT},nT={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},Jl={id:mr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the string loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:tT,required:!0,index:0,parentRelationType:A.FixedArguments,parent:nT},rT={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},iT={id:"iterate-over-string-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:rT},aT={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},sT={id:"iterate-over-string-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:aT},Wl={id:mr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Jl,ql,iT],outputs:[sT],error:null,parent:null},oT=_[i.Loop]["list-loop"],lT={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:i.ValueDescriptor},dT={like:!1,inferred:!1,id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,entity:null,asType:!1,parent:lT},cT={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.List,entityType:i.ActionDescriptor},uT={id:oT.inputs.list.id,type:i.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,defaultValue:null,dataType:dT,index:0,parent:cT,parentRelationType:A.FixedArguments},pT={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.List,entityType:i.ActionDescriptor},yT={id:oT.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,defaultValue:null,dataType:null,index:0,parent:pT,parentRelationType:A.DynamicReturn},Wn={id:k.List,type:i.ActionDescriptor,version:1,name:k.List,description:"Iterates over a list of entities",inputs:[uT],outputs:[yT],error:null,parent:null},Tr=_[i.Loop]["list-loop"],hT={id:"iterate-over-list-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},fT={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:null,asType:!1,parent:hT},mT={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},gs={id:Tr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the list that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:fT,required:!0,index:1,parentRelationType:A.FixedArguments,parent:mT},TT={id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},ET={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:TT},RT={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},gT={id:Tr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the list loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:ET,required:!0,index:0,parentRelationType:A.FixedArguments,parent:RT},bT={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},vT={id:"iterate-over-list-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:bT},IT={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},DT={id:"iterate-over-list-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:IT},bs={id:Tr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[gT,gs,vT],outputs:[DT],error:null,parent:null},ST=_[i.Loop]["object-keys-loop"],OT={id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-object-argument-declaration-id",entityType:i.ValueDescriptor},PT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:it,asType:!1,parent:OT},AT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectKeys,entityType:i.ActionDescriptor},CT={id:ST.inputs.object.id,type:i.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,defaultValue:null,dataType:PT,index:0,parent:AT,parentRelationType:A.FixedArguments},wT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectKeys,entityType:i.ActionDescriptor},BT={id:ST.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:wT,parentRelationType:A.DynamicReturn},li={id:k.ObjectKeys,type:i.ActionDescriptor,version:1,name:k.ObjectKeys,description:"Iterates over a object of entities",inputs:[CT],outputs:[BT],error:null,parent:null},Er=_[i.Loop]["object-keys-loop"],MT={id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},_T={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:MT},VT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},Yl={id:Er.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the object-keys that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:_T,required:!0,index:1,parentRelationType:A.FixedArguments,parent:VT},NT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},LT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:NT},GT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},$T={id:Er.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the object-keys loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:LT,required:!0,index:0,parentRelationType:A.FixedArguments,parent:GT},FT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},UT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:FT},xT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},jT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:xT},kT={id:Er.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[$T,Yl,UT],outputs:[jT],error:null,parent:null},qT=_[i.Loop]["object-values-loop"],JT={id:"iterate-over-object-values-loop-object-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-object-argument-declaration-id",entityType:i.ValueDescriptor},WT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-object-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:it,asType:!1,parent:JT},YT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectValues,entityType:i.ActionDescriptor},HT={id:qT.inputs.object.id,type:i.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,defaultValue:null,dataType:WT,index:0,parent:YT,parentRelationType:A.FixedArguments},zT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectValues,entityType:i.ActionDescriptor},ZT={id:qT.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:zT,parentRelationType:A.DynamicReturn},di={id:k.ObjectValues,type:i.ActionDescriptor,version:1,name:k.ObjectValues,description:"Iterates over a object of entities",inputs:[HT],outputs:[ZT],error:null,parent:null},Rr=_[i.Loop]["object-values-loop"],KT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},XT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:null,entity:null,asType:null,like:!1,inferred:!1,parent:KT},QT={id:"iterate-over-object-values-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},Hl={id:Rr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the object-values that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:XT,required:!0,index:1,parentRelationType:A.FixedArguments,parent:QT},eE={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},tE={like:!1,inferred:!1,id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:eE},nE={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},rE={id:Rr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the object-values loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:tE,required:!0,index:0,parentRelationType:A.FixedArguments,parent:nE},iE={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},aE={id:"iterate-over-object-values-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:iE},sE={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},oE={id:"iterate-over-object-values-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:sE},lE={id:Rr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[rE,Hl,aE],outputs:[oE],error:null,parent:null},zl=_[i.Loop]["counted-loop"],dE={id:"counted-loop-string-argument-declaration-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:zl.inputs.number.id,entityType:i.ValueDescriptor},cE={id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:i.LiteralValue,name:C.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:dE},uE={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:i.ValueDescriptor},pE={like:!1,inferred:!1,id:"counted-loop-string-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:uE},yE={id:"counted-loop-string-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.Counted,entityType:i.ActionDescriptor},hE={id:zl.inputs.number.id,type:i.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:pE,defaultValue:cE,index:0,parent:yE,parentRelationType:A.FixedArguments},fE={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.Counted,entityType:i.ActionDescriptor},mE={id:zl.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:fE,parentRelationType:A.DynamicReturn},ta={id:k.Counted,type:i.ActionDescriptor,version:1,name:k.Counted,description:"Iterates a given number of times",inputs:[hE],outputs:[mE],error:null,parent:null},na=_[i.Loop]["counted-loop"],TE={id:"counted-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"counted-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},EE={like:!1,inferred:!1,id:"counted-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:TE},RE={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},Zl={id:na.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the string loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:EE,required:!0,index:0,parentRelationType:A.FixedArguments,parent:RE},gE={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},bE={id:"counted-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:1,parentRelationType:A.DynamicArgument,parent:gE},vE={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},IE={id:"counted-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:vE},Kl={id:na.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Zl,bE],outputs:[IE],error:null,parent:null},DE=[Rs,Wn,ea,li,di,ta],Yn=_[i.BuiltInBaseEntity][U.HTTP_ENDPOINT].properties,SE={id:"endpointBuiltInCorsPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.cors.id},OE={id:"endpointBuiltInCorsPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:Yn.cors.id},PE={like:!1,inferred:!1,id:"endpointBuiltInCorsPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:OE},AE={id:"endpointBuiltInBaseEntityRef",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},CE={constant:!1,hidden:!0,required:!0,id:Yn.cors.id,name:"Allowed origins",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:PE,defaultValue:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:["*"],parent:SE,autogeneration:null,valueAsType:null},description:"The origins that are allowed to access this endpoint, use * for all origins, or http://example.com/* to be as specific as you need.",parent:AE},wE={id:"endpointBuiltInPathPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.path.id},BE={id:"endpointBuiltInPathPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:Yn.path.id},ME={like:!1,inferred:!1,id:"endpointBuiltInPathPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:BE},_E={id:"endpointBuiltInBaseEntityRefTwo",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},Xl={constant:!1,id:Yn.path.id,hidden:!1,required:!0,name:"Path",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:ME,defaultValue:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.String,value:"/",parent:wE,autogeneration:null,valueAsType:null},description:"Path to the endpoint, for example /api/users, or /api/users/{id}, or /api/users/{id}/:name. The path can contain parameters, which are defined by curly braces, and will be passed to the endpoint event as variables with the same name.",parent:_E},VE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.method.id},NE={id:"endpointBuiltInMethodPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"endpointBuiltInMethodProperty"},LE={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Pn,isList:!0,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:NE},GE={id:"endpointBuiltInBaseEntityRefThree",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},Ql={constant:!1,hidden:!1,required:!0,id:Yn.method.id,name:"Method",version:1,type:i.Property,private:!1,index:2,implements:null,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,parent:VE,autogeneration:null,valueAsType:null},abstract:!0,static:!0,dataType:LE,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:GE},$E={id:"endpointRequestHeadersVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointRequestHeadersArgumentDeclaration"},FE={id:"endpointRequestHeadersArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},UE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:FE},xE={id:"endpointRequestBodyArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},jE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:xE},kE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointRequestQueryParamsArgumentDeclaration"},qE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},JE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,asType:!1,entity:ai,parent:qE},WE={id:"endpointPathParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointPathParamsArgumentDeclaration"},YE={id:"endpointPathParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},HE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:ai,asType:!1,parent:YE},zE={id:"endpointReachedTriggerActionDescriptorRef",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},ed={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:i.ValueDescriptor,name:"Request headers",dataType:UE,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:$E,autogeneration:null,valueAsType:null},required:!0,index:0,parentRelationType:A.FixedArguments,parent:zE},ZE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},td={id:"endpointPathParamsArgumentDeclaration",type:i.ValueDescriptor,description:"A standarized text, without spaces that is added at the end of the domain and routes the request to a specific resource within the target server. For example: /api/users/123, /api/users/123/:name, /api/users/123/:name/:age.",version:1,name:"Path parameters",dataType:HE,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:[],parent:WE,autogeneration:null,valueAsType:null},required:!0,index:1,parentRelationType:A.FixedArguments,parent:ZE},KE={id:"endpointReachedTriggerActionDescriptorRefThree",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},nd={id:"endpointRequestQueryParamsArgumentDeclaration",version:1,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",type:i.ValueDescriptor,name:"Request query params",dataType:JE,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:[],parent:kE,autogeneration:null,valueAsType:null},required:!0,index:2,parentRelationType:A.FixedArguments,parent:KE},XE={id:"endpointReachedTriggerActionDescriptorRefFour",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},rd={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:i.ValueDescriptor,name:"Request body",dataType:jE,defaultValue:null,index:3,required:!0,parentRelationType:A.FixedArguments,parent:XE},QE={id:"endpointResponseCodeReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},eR={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:QE},tR={id:"endpointReturnStatementRef",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},id={id:"endpointResponseCodeReturnDeclaration",version:1,description:"A standarized number that represents the status of the response. 200 for OK, 404 for not found, 500 for server error, etc.",type:i.ValueDescriptor,name:"Response code",dataType:eR,defaultValue:null,required:!0,index:0,parentRelationType:A.FixedReturns,parent:tR},nR={id:"endpointResponseHeadersDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointResponseHeadersReturnDeclaration"},rR={id:"endpointResponseHeadersReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},iR={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:rR},aR={id:"endpointReturnStatementRefTwo",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},ad={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:i.ValueDescriptor,name:"Response headers",dataType:iR,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:nR,autogeneration:null,valueAsType:null},required:!1,index:1,parentRelationType:A.FixedReturns,parent:aR},sR={id:"endpointResponseBodyReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},oR={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:sR},lR={id:"endpointReturnStatementRefThree",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},sd={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:i.ValueDescriptor,name:"Response body",dataType:oR,defaultValue:null,required:!1,index:2,parentRelationType:A.FixedReturns,parent:lR},dR={id:"endpointBuiltInBaseEntityRefFour",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},od={id:"endpointReachedTriggerActionDescriptor",type:i.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[ed,td,nd,rd],outputs:[id,ad,sd],error:null,parent:dR},ra={id:U.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:U.HTTP_ENDPOINT,type:i.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[CE,Xl,Ql],abstractMethods:[od],extends:[],methods:[]},ct=_[i.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,cR={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.identifier.id,entityType:i.Property},uR={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:i.GenericReference,entityId:ct.properties.identifier.id,entityType:i.Property},pR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:uR},ci={id:"relational-database-built-in-base-entity-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},vs={constant:!1,id:ct.properties.identifier.id,hidden:!1,required:!0,name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,defaultValue:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:null,parent:cR,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:pR,description:"The name of the main database inside of the server instance where the data will be stored.",parent:ci},JP={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:i.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:i.Property},yR={id:"relational-database-built-in-base-entity-username-property-ref-id",type:i.GenericReference,entityId:ct.properties.username.id,entityType:i.Property},hR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:yR},Is={constant:!1,hidden:!1,required:!0,id:ct.properties.username.id,name:"Username",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,defaultValue:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:ct.properties.username.id,entityType:i.Property},autogeneration:null,valueAsType:null},dataType:hR,description:"The username that will be used to connect to the database.",parent:ci},WP={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:i.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:i.Property},fR={id:"relational-database-built-in-base-entity-password-property-ref-id",type:i.GenericReference,entityId:ct.properties.password.id,entityType:i.Property},mR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:fR},Ds={constant:!1,hidden:!1,required:!0,id:ct.properties.password.id,name:"Password",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,defaultValue:null,dataType:mR,description:"The password that will be used to connect to the database.",parent:ci},TR={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.minSize.id,entityType:i.Property},ER={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:i.GenericReference,entityId:ct.properties.minSize.id,entityType:i.Property},RR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:ER},Ss={constant:!1,hidden:!0,required:!0,id:ct.properties.minSize.id,name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,defaultValue:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:TR,autogeneration:null,valueAsType:null},dataType:RR,description:"The minimum size of the database in GB.",parent:ci},gR={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.default.id,entityType:i.Property},bR={id:"relational-database-built-in-base-entity-default-property-ref-id",type:i.GenericReference,entityId:ct.properties.default.id,entityType:i.Property},vR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:On,asType:!1,parent:bR},ld={constant:!1,hidden:!0,required:!0,id:ct.properties.default.id,name:"Default",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!1,parent:gR,autogeneration:null,valueAsType:null},dataType:vR,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:ci},IR={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:i.GenericReference,entityId:ct.properties.autoscaling.id,entityType:i.Property},DR={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.autoscaling.id,entityType:i.Property},SR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:On,asType:!1,parent:IR},OR={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},dd={constant:!1,hidden:!0,required:!0,id:ct.properties.autoscaling.id,name:"Auto-scaling",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!1,parent:DR,autogeneration:null,valueAsType:null},dataType:SR,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:OR},un={id:U.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:U.RELATIONAL_DATABASE,type:i.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[vs,Is,Ds,Ss,ld,dd],abstractMethods:[],methods:[],extends:[]},PR={type:i.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:i.BuiltInBaseEntity,id:Gt.DeletePersistedEntity},cd={type:i.FunctionDeclaration,id:Gt.DeletePersistedEntity,name:Gt.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:PR,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},AR=_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties,YP={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:i.DataType},CR={id:"persisted-built-in-base-entity-database-property-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:i.Property},wR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:CR},BR={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},ui={constant:!1,hidden:!0,required:!0,id:AR.database.id,name:"Database",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:wR,description:"The database that the entity belongs to.",parent:BR},MR={id:"persisted-built-in-base-entity-primary-key-property-number-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},_R={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-number-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:MR},VR={id:"persisted-built-in-base-entity-primary-key-property-string-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},NR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-string-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:VR},LR={id:"persisted-built-in-base-entity-primary-key-property-uuid-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},GR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-uuid-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:LR},$R={id:"persisted-built-in-base-entity-primary-key-property-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-id",entityType:i.Property},FR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:[GR,NR,_R],isList:!1,entity:null,asType:null,implementationChooseOne:!0,parent:$R},UR={id:"persisted-built-in-base-entity-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},pi={constant:!1,hidden:!1,required:!0,id:AR.primaryKey.id,name:"Primary key",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:FR,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:UR},st={id:U.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:U.PERSISTED_ENTITY,type:i.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[ui,pi],methods:[cd],extends:[]},xR={type:i.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:i.BuiltInBaseEntity,id:Gt.SoftDeletePersistedEntity},HP={type:i.FunctionDeclaration,id:Gt.SoftDeletePersistedEntity,name:Gt.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:xR,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},jR={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},ud={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:i.ActionDescriptor,description:"Executed when the cron job is triggered",inputs:[],error:null,outputs:[],parent:jR},kR=_[i.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,zP={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:i.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:i.DataType},qR={id:"cron-job-built-in-base-entity-expression-property-ref",type:i.GenericReference,entityId:kR.properties.expression.id,entityType:i.Property},ZP={like:!1,inferred:!1,id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:qR},JR={id:"cron-job-built-in-base-entity-ref",type:i.GenericReference,entityId:U.CRON_JOB,entityType:i.BuiltInBaseEntity},WR={constant:!1,hidden:!1,required:!0,id:kR.properties.expression.id,name:"Cron expression",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:ZP,description:"The cron-job expression that defines when the cron-job job should be triggered. The expression should be in the format of a cron-job expression.",parent:JR},Os={id:U.CRON_JOB,version:1,description:"This entity represents a scheduled trigger. The action on this entity will be executed one the time set by the cron-job expression is reached.",name:U.CRON_JOB,type:i.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[WR],methods:[],abstractMethods:[ud],extends:[]},YR={type:i.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:i.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},pd={id:"execution-built-in-entity-abort-method-id",type:i.FunctionDeclaration,version:1,name:Gt.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:YR},Ps={id:U.EXECUTION,type:i.BuiltInBaseEntity,version:1,name:U.EXECUTION,description:"A reference to an ongoing execution of any entity that can be called. Eg: Operations, custom trigger calls, etc.",static:!1,abstract:!1,interactive:!0,extends:[],properties:[],methods:[pd],abstractMethods:[]},HR=[ra,un,st,Os,Ps],KP=_[i.Condition]["not-empty"],zR={type:i.GenericReference,id:"not-empty-condition-ref",entityType:i.ActionDescriptor,entityId:Jt.NotEmpty},ZR={id:KP.inputs.leftHand.id,type:i.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",defaultValue:null,dataType:null,required:!0,parentRelationType:A.FixedArguments,index:0,parent:zR},gr={type:i.ActionDescriptor,id:Jt.NotEmpty,version:1,name:Jt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[ZR],outputs:[],error:null},KR={[Jt.NotEmpty]:gr},yi=_[i.Condition]["more-than-or-equal"],XR={type:i.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:i.ValueDescriptor,entityId:yi.inputs.leftHand.id},QR={type:i.DataType,id:yi.inputs.leftHand.dataType.id,version:1,entity:ee,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,parent:XR},eg={type:i.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:i.ActionDescriptor,entityId:qe.MoreThanOrEqual},tg={id:yi.inputs.leftHand.id,type:i.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",defaultValue:null,dataType:QR,required:!0,parentRelationType:A.FixedArguments,index:0,parent:eg},ng={type:i.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:i.ValueDescriptor,entityId:yi.inputs.rightHand.id},rg={type:i.DataType,id:yi.inputs.rightHand.dataType.id,version:1,entity:ee,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,parent:ng},ig={type:i.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:i.ActionDescriptor,entityId:qe.MoreThanOrEqual},ag={id:yi.inputs.rightHand.id,type:i.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",defaultValue:null,dataType:rg,required:!0,parentRelationType:A.FixedArguments,index:1,parent:ig},hi={type:i.ActionDescriptor,id:qe.MoreThanOrEqual,version:1,name:qe.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[tg,ag],outputs:[],error:null},sg={[qe.MoreThanOrEqual]:hi},og={...KR,...sg},lg=Object.values(og),As={type:i.ActionDescriptor,id:Dn.PROJECT_PUBLICATION_COMPLETED,version:1,name:Dn.PROJECT_PUBLICATION_COMPLETED,description:"The event that is triggered when the project has completed its publication and all its code and resurces are now deployed and ready to be used by the users",parent:null,inputs:[],outputs:[],error:null},dg={[Dn.PROJECT_PUBLICATION_COMPLETED]:As},cg=Object.values(dg),yd=_[i.ValueDescriptor][os.ActionOngoingProcessOutputValue],ug={type:i.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:i.ValueDescriptor,entityId:yd.id},pg={like:!1,inferred:!1,id:yd.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ps,asType:!1,isList:!1,parent:ug},Cs={id:yd.id,type:i.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",defaultValue:null,dataType:pg,required:!0,index:0,parent:null,parentRelationType:A.OngoingProcessExecution},yg=[Cs],hg=[...Dp,...Vm,...DE,...HR,...lg,...cg,...yg];var le;(function(r){r.assertEqual=a=>a;function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const s={};for(const o of a)s[o]=o;return s},r.getValidEnumValues=a=>{const s=r.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of s)o[l]=a[l];return r.objectValues(o)},r.objectValues=a=>r.objectKeys(a).map(function(s){return a[s]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&s.push(o);return s},r.find=(a,s)=>{for(const o of a)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=n,r.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(le||(le={}));var hd;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(hd||(hd={}));const x=le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Hn=r=>{switch(typeof r){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(r)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(r)?x.array:r===null?x.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?x.promise:typeof Map<"u"&&r instanceof Map?x.map:typeof Set<"u"&&r instanceof Set?x.set:typeof Date<"u"&&r instanceof Date?x.date:x.object;default:return x.unknown}},N=le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),XP=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class wt extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let l=n,p=0;for(;p<o.path.length;){const u=o.path[p];p===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(o))):l[u]=l[u]||{_errors:[]},l=l[u],p++}}};return a(this),n}static assert(e){if(!(e instanceof wt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const a of this.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}wt.create=r=>new wt(r);const fi=(r,e)=>{let t;switch(r.code){case N.invalid_type:r.received===x.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case N.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,le.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:t=`Unrecognized key(s) in object: ${le.joinValues(r.keys,", ")}`;break;case N.invalid_union:t="Invalid input";break;case N.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${le.joinValues(r.options)}`;break;case N.invalid_enum_value:t=`Invalid enum value. Expected ${le.joinValues(r.options)}, received '${r.received}'`;break;case N.invalid_arguments:t="Invalid function arguments";break;case N.invalid_return_type:t="Invalid function return type";break;case N.invalid_date:t="Invalid date";break;case N.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:le.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case N.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case N.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case N.custom:t="Invalid input";break;case N.invalid_intersection_types:t="Intersection results could not be merged";break;case N.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case N.not_finite:t="Number must be finite";break;default:t=e.defaultError,le.assertNever(r)}return{message:t}};let fg=fi;function QP(r){fg=r}function ws(){return fg}const Bs=r=>{const{data:e,path:t,errorMaps:n,issueData:a}=r,s=[...t,...a.path||[]],o={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let l="";const p=n.filter(u=>!!u).slice().reverse();for(const u of p)l=u(o,{data:e,defaultError:l}).message;return{...a,path:s,message:l}},eA=[];function F(r,e){const t=ws(),n=Bs({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===fi?void 0:fi].filter(a=>!!a)});r.common.issues.push(n)}class yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const a of t){if(a.status==="aborted")return z;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const a of t){const s=await a.key,o=await a.value;n.push({key:s,value:o})}return yt.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const a of t){const{key:s,value:o}=a;if(s.status==="aborted"||o.status==="aborted")return z;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const z=Object.freeze({status:"aborted"}),mi=r=>({status:"dirty",value:r}),gt=r=>({status:"valid",value:r}),fd=r=>r.status==="aborted",md=r=>r.status==="dirty",ia=r=>r.status==="valid",aa=r=>typeof Promise<"u"&&r instanceof Promise;function Ms(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}function mg(r,e,t,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t}typeof SuppressedError=="function"&&SuppressedError;var W;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(W||(W={}));var sa,oa;class pn{constructor(e,t,n,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tg=(r,e)=>{if(ia(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new wt(r.common.issues);return this._error=t,this._error}}};function ne(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:a}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,l)=>{var p,u;const{message:h}=r;return o.code==="invalid_enum_value"?{message:h??l.defaultError}:typeof l.data>"u"?{message:(p=h??n)!==null&&p!==void 0?p:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(u=h??t)!==null&&u!==void 0?u:l.defaultError}},description:a}}class ie{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Hn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Hn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new yt,ctx:{common:e.parent.common,data:e.data,parsedType:Hn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(aa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const a={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return Tg(a,s)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hn(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(aa(a)?a:Promise.resolve(a));return Tg(n,s)}refine(e,t){const n=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,s)=>{const o=e(a),l=()=>s.addIssue({code:N.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(p=>p?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,t){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof t=="function"?t(n,a):t),!1))}_refinement(e){return new nn({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return hn.create(this,this._def)}nullable(){return Xn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tn.create(this,this._def)}promise(){return gi.create(this,this._def)}or(e){return ua.create([this,e],this._def)}and(e){return pa.create(this,e,this._def)}transform(e){return new nn({...ne(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Ta({...ne(this._def),innerType:this,defaultValue:t,typeName:Y.ZodDefault})}brand(){return new Rd({typeName:Y.ZodBranded,type:this,...ne(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ea({...ne(this._def),innerType:this,catchValue:t,typeName:Y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ra.create(this,e)}readonly(){return ga.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tA=/^c[^\s-]{8,}$/i,nA=/^[0-9a-z]+$/,rA=/^[0-9A-HJKMNP-TV-Z]{26}$/,iA=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,aA=/^[a-z0-9_-]{21}$/i,sA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,oA=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Td;const dA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cA=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,uA=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Eg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pA=new RegExp(`^${Eg}$`);function Rg(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function yA(r){return new RegExp(`^${Rg(r)}$`)}function gg(r){let e=`${Eg}T${Rg(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function hA(r,e){return!!((e==="v4"||!e)&&dA.test(r)||(e==="v6"||!e)&&cA.test(r))}class en extends ie{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.string,received:s.parsedType}),z}const n=new yt;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,l=e.data.length<s.value;(o||l)&&(a=this._getOrReturnCtx(e,a),o?F(a,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&F(a,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")oA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"email",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Td||(Td=new RegExp(lA,"u")),Td.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"emoji",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")iA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"uuid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")aA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"nanoid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")tA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"cuid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")nA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"cuid2",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")rA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"ulid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),F(a,{validation:"url",code:N.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"regex",code:N.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?gg(s).test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?pA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?yA(s).test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?sA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"duration",code:N.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?hA(e.data,s.version)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"ip",code:N.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?uA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"base64",code:N.invalid_string,message:s.message}),n.dirty()):le.assertNever(s);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(a=>e.test(a),{validation:t,code:N.invalid_string,...W.errToObj(n)})}_addCheck(e){return new en({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...W.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...W.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...W.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...W.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...W.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...W.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...W.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...W.errToObj(t)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new en({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}en.create=r=>{var e;return new en({checks:[],typeName:Y.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...ne(r)})};function fA(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=t>n?t:n,s=parseInt(r.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class zn extends ie{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.number){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.number,received:s.parsedType}),z}let n;const a=new yt;for(const s of this._def.checks)s.kind==="int"?le.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:N.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?fA(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_finite,message:s.message}),a.dirty()):le.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,n,a){return new zn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:W.toString(a)}]})}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&le.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}zn.create=r=>new zn({checks:[],typeName:Y.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...ne(r)});class Zn extends ie{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==x.bigint){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.bigint,received:s.parsedType}),z}let n;const a=new yt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):le.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,n,a){return new Zn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:W.toString(a)}]})}_addCheck(e){return new Zn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Zn.create=r=>{var e;return new Zn({checks:[],typeName:Y.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...ne(r)})};class la extends ie{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.boolean,received:n.parsedType}),z}return gt(e.data)}}la.create=r=>new la({typeName:Y.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...ne(r)});class br extends ie{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.date,received:s.parsedType}),z}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_date}),z}const n=new yt;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):le.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new br({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}br.create=r=>new br({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Y.ZodDate,...ne(r)});class _s extends ie{_parse(e){if(this._getType(e)!==x.symbol){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.symbol,received:n.parsedType}),z}return gt(e.data)}}_s.create=r=>new _s({typeName:Y.ZodSymbol,...ne(r)});class da extends ie{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.undefined,received:n.parsedType}),z}return gt(e.data)}}da.create=r=>new da({typeName:Y.ZodUndefined,...ne(r)});class ca extends ie{_parse(e){if(this._getType(e)!==x.null){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.null,received:n.parsedType}),z}return gt(e.data)}}ca.create=r=>new ca({typeName:Y.ZodNull,...ne(r)});class Ti extends ie{constructor(){super(...arguments),this._any=!0}_parse(e){return gt(e.data)}}Ti.create=r=>new Ti({typeName:Y.ZodAny,...ne(r)});class vr extends ie{constructor(){super(...arguments),this._unknown=!0}_parse(e){return gt(e.data)}}vr.create=r=>new vr({typeName:Y.ZodUnknown,...ne(r)});class Bn extends ie{_parse(e){const t=this._getOrReturnCtx(e);return F(t,{code:N.invalid_type,expected:x.never,received:t.parsedType}),z}}Bn.create=r=>new Bn({typeName:Y.ZodNever,...ne(r)});class Vs extends ie{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.void,received:n.parsedType}),z}return gt(e.data)}}Vs.create=r=>new Vs({typeName:Y.ZodVoid,...ne(r)});class tn extends ie{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),a=this._def;if(t.parsedType!==x.array)return F(t,{code:N.invalid_type,expected:x.array,received:t.parsedType}),z;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,l=t.data.length<a.exactLength.value;(o||l)&&(F(t,{code:o?N.too_big:N.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(F(t,{code:N.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(F(t,{code:N.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>a.type._parseAsync(new pn(t,o,t.path,l)))).then(o=>yt.mergeArray(n,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new pn(t,o,t.path,l)));return yt.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new tn({...this._def,minLength:{value:e,message:W.toString(t)}})}max(e,t){return new tn({...this._def,maxLength:{value:e,message:W.toString(t)}})}length(e,t){return new tn({...this._def,exactLength:{value:e,message:W.toString(t)}})}nonempty(e){return this.min(1,e)}}tn.create=(r,e)=>new tn({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...ne(e)});function Ei(r){if(r instanceof Ke){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=hn.create(Ei(n))}return new Ke({...r._def,shape:()=>e})}else return r instanceof tn?new tn({...r._def,type:Ei(r.element)}):r instanceof hn?hn.create(Ei(r.unwrap())):r instanceof Xn?Xn.create(Ei(r.unwrap())):r instanceof yn?yn.create(r.items.map(e=>Ei(e))):r}class Ke extends ie{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=le.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const u=this._getOrReturnCtx(e);return F(u,{code:N.invalid_type,expected:x.object,received:u.parsedType}),z}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Bn&&this._def.unknownKeys==="strip"))for(const u in a.data)o.includes(u)||l.push(u);const p=[];for(const u of o){const h=s[u],f=a.data[u];p.push({key:{status:"valid",value:u},value:h._parse(new pn(a,f,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof Bn){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of l)p.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(u==="strict")l.length>0&&(F(a,{code:N.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of l){const f=a.data[h];p.push({key:{status:"valid",value:h},value:u._parse(new pn(a,f,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of p){const f=await h.key,R=await h.value;u.push({key:f,value:R,alwaysSet:h.alwaysSet})}return u}).then(u=>yt.mergeObjectSync(n,u)):yt.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new Ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var a,s,o,l;const p=(o=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(l=W.errToObj(e).message)!==null&&l!==void 0?l:p}:{message:p}}}:{}})}strip(){return new Ke({...this._def,unknownKeys:"strip"})}passthrough(){return new Ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ke({...this._def,catchall:e})}pick(e){const t={};return le.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Ke({...this._def,shape:()=>t})}omit(e){const t={};return le.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Ke({...this._def,shape:()=>t})}deepPartial(){return Ei(this)}partial(e){const t={};return le.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];e&&!e[n]?t[n]=a:t[n]=a.optional()}),new Ke({...this._def,shape:()=>t})}required(e){const t={};return le.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof hn;)s=s._def.innerType;t[n]=s}}),new Ke({...this._def,shape:()=>t})}keyof(){return bg(le.objectKeys(this.shape))}}Ke.create=(r,e)=>new Ke({shape:()=>r,unknownKeys:"strip",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)}),Ke.strictCreate=(r,e)=>new Ke({shape:()=>r,unknownKeys:"strict",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)}),Ke.lazycreate=(r,e)=>new Ke({shape:r,unknownKeys:"strip",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)});class ua extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function a(s){for(const l of s)if(l.result.status==="valid")return l.result;for(const l of s)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const o=s.map(l=>new wt(l.ctx.common.issues));return F(t,{code:N.invalid_union,unionErrors:o}),z}if(t.common.async)return Promise.all(n.map(async s=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let s;const o=[];for(const p of n){const u={...t,common:{...t.common,issues:[]},parent:null},h=p._parseSync({data:t.data,path:t.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(p=>new wt(p));return F(t,{code:N.invalid_union,unionErrors:l}),z}}get options(){return this._def.options}}ua.create=(r,e)=>new ua({options:r,typeName:Y.ZodUnion,...ne(e)});const Mn=r=>r instanceof ha?Mn(r.schema):r instanceof nn?Mn(r.innerType()):r instanceof fa?[r.value]:r instanceof Kn?r.options:r instanceof ma?le.objectValues(r.enum):r instanceof Ta?Mn(r._def.innerType):r instanceof da?[void 0]:r instanceof ca?[null]:r instanceof hn?[void 0,...Mn(r.unwrap())]:r instanceof Xn?[null,...Mn(r.unwrap())]:r instanceof Rd||r instanceof ga?Mn(r.unwrap()):r instanceof Ea?Mn(r._def.innerType):[];class Ns extends ie{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return F(t,{code:N.invalid_type,expected:x.object,received:t.parsedType}),z;const n=this.discriminator,a=t.data[n],s=this.optionsMap.get(a);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(F(t,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const a=new Map;for(const s of t){const o=Mn(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of o){if(a.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);a.set(l,s)}}return new Ns({typeName:Y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...ne(n)})}}function Ed(r,e){const t=Hn(r),n=Hn(e);if(r===e)return{valid:!0,data:r};if(t===x.object&&n===x.object){const a=le.objectKeys(e),s=le.objectKeys(r).filter(l=>a.indexOf(l)!==-1),o={...r,...e};for(const l of s){const p=Ed(r[l],e[l]);if(!p.valid)return{valid:!1};o[l]=p.data}return{valid:!0,data:o}}else if(t===x.array&&n===x.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<r.length;s++){const o=r[s],l=e[s],p=Ed(o,l);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===x.date&&n===x.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class pa extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=(s,o)=>{if(fd(s)||fd(o))return z;const l=Ed(s.value,o.value);return l.valid?((md(s)||md(o))&&t.dirty(),{status:t.value,value:l.data}):(F(n,{code:N.invalid_intersection_types}),z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>a(s,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}pa.create=(r,e,t)=>new pa({left:r,right:e,typeName:Y.ZodIntersection,...ne(t)});class yn extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.array)return F(n,{code:N.invalid_type,expected:x.array,received:n.parsedType}),z;if(n.data.length<this._def.items.length)return F(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),z;!this._def.rest&&n.data.length>this._def.items.length&&(F(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((o,l)=>{const p=this._def.items[l]||this._def.rest;return p?p._parse(new pn(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>yt.mergeArray(t,o)):yt.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new yn({...this._def,rest:e})}}yn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yn({items:r,typeName:Y.ZodTuple,rest:null,...ne(e)})};class ya extends ie{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.object)return F(n,{code:N.invalid_type,expected:x.object,received:n.parsedType}),z;const a=[],s=this._def.keyType,o=this._def.valueType;for(const l in n.data)a.push({key:s._parse(new pn(n,l,n.path,l)),value:o._parse(new pn(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?yt.mergeObjectAsync(t,a):yt.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof ie?new ya({keyType:e,valueType:t,typeName:Y.ZodRecord,...ne(n)}):new ya({keyType:en.create(),valueType:e,typeName:Y.ZodRecord,...ne(t)})}}class Ls extends ie{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.map)return F(n,{code:N.invalid_type,expected:x.map,received:n.parsedType}),z;const a=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([l,p],u)=>({key:a._parse(new pn(n,l,n.path,[u,"key"])),value:s._parse(new pn(n,p,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const p of o){const u=await p.key,h=await p.value;if(u.status==="aborted"||h.status==="aborted")return z;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(u.value,h.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const p of o){const u=p.key,h=p.value;if(u.status==="aborted"||h.status==="aborted")return z;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(u.value,h.value)}return{status:t.value,value:l}}}}Ls.create=(r,e,t)=>new Ls({valueType:e,keyType:r,typeName:Y.ZodMap,...ne(t)});class Ir extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.set)return F(n,{code:N.invalid_type,expected:x.set,received:n.parsedType}),z;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(F(n,{code:N.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(F(n,{code:N.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const s=this._def.valueType;function o(p){const u=new Set;for(const h of p){if(h.status==="aborted")return z;h.status==="dirty"&&t.dirty(),u.add(h.value)}return{status:t.value,value:u}}const l=[...n.data.values()].map((p,u)=>s._parse(new pn(n,p,n.path,u)));return n.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new Ir({...this._def,minSize:{value:e,message:W.toString(t)}})}max(e,t){return new Ir({...this._def,maxSize:{value:e,message:W.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ir.create=(r,e)=>new Ir({valueType:r,minSize:null,maxSize:null,typeName:Y.ZodSet,...ne(e)});class Ri extends ie{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return F(t,{code:N.invalid_type,expected:x.function,received:t.parsedType}),z;function n(l,p){return Bs({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ws(),fi].filter(u=>!!u),issueData:{code:N.invalid_arguments,argumentsError:p}})}function a(l,p){return Bs({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ws(),fi].filter(u=>!!u),issueData:{code:N.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof gi){const l=this;return gt(async function(...p){const u=new wt([]),h=await l._def.args.parseAsync(p,s).catch(v=>{throw u.addIssue(n(p,v)),u}),f=await Reflect.apply(o,this,h);return await l._def.returns._def.type.parseAsync(f,s).catch(v=>{throw u.addIssue(a(f,v)),u})})}else{const l=this;return gt(function(...p){const u=l._def.args.safeParse(p,s);if(!u.success)throw new wt([n(p,u.error)]);const h=Reflect.apply(o,this,u.data),f=l._def.returns.safeParse(h,s);if(!f.success)throw new wt([a(h,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ri({...this._def,args:yn.create(e).rest(vr.create())})}returns(e){return new Ri({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ri({args:e||yn.create([]).rest(vr.create()),returns:t||vr.create(),typeName:Y.ZodFunction,...ne(n)})}}class ha extends ie{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ha.create=(r,e)=>new ha({getter:r,typeName:Y.ZodLazy,...ne(e)});class fa extends ie{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return F(t,{received:t.data,code:N.invalid_literal,expected:this._def.value}),z}return{status:"valid",value:e.data}}get value(){return this._def.value}}fa.create=(r,e)=>new fa({value:r,typeName:Y.ZodLiteral,...ne(e)});function bg(r,e){return new Kn({values:r,typeName:Y.ZodEnum,...ne(e)})}class Kn extends ie{constructor(){super(...arguments),sa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return F(t,{expected:le.joinValues(n),received:t.parsedType,code:N.invalid_type}),z}if(Ms(this,sa,"f")||mg(this,sa,new Set(this._def.values),"f"),!Ms(this,sa,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return F(t,{received:t.data,code:N.invalid_enum_value,options:n}),z}return gt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Kn.create(e,{...this._def,...t})}exclude(e,t=this._def){return Kn.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}sa=new WeakMap,Kn.create=bg;class ma extends ie{constructor(){super(...arguments),oa.set(this,void 0)}_parse(e){const t=le.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==x.string&&n.parsedType!==x.number){const a=le.objectValues(t);return F(n,{expected:le.joinValues(a),received:n.parsedType,code:N.invalid_type}),z}if(Ms(this,oa,"f")||mg(this,oa,new Set(le.getValidEnumValues(this._def.values)),"f"),!Ms(this,oa,"f").has(e.data)){const a=le.objectValues(t);return F(n,{received:n.data,code:N.invalid_enum_value,options:a}),z}return gt(e.data)}get enum(){return this._def.values}}oa=new WeakMap,ma.create=(r,e)=>new ma({values:r,typeName:Y.ZodNativeEnum,...ne(e)});class gi extends ie{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&t.common.async===!1)return F(t,{code:N.invalid_type,expected:x.promise,received:t.parsedType}),z;const n=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return gt(n.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}gi.create=(r,e)=>new gi({type:r,typeName:Y.ZodPromise,...ne(e)});class nn extends ie{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:o=>{F(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const o=a.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return z;const p=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return p.status==="aborted"?z:p.status==="dirty"||t.value==="dirty"?mi(p.value):p});{if(t.value==="aborted")return z;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?z:l.status==="dirty"||t.value==="dirty"?mi(l.value):l}}if(a.type==="refinement"){const o=l=>{const p=a.refinement(l,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?z:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?z:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ia(o))return o;const l=a.transform(o.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ia(o)?Promise.resolve(a.transform(o.value,s)).then(l=>({status:t.value,value:l})):o);le.assertNever(a)}}nn.create=(r,e,t)=>new nn({schema:r,typeName:Y.ZodEffects,effect:e,...ne(t)}),nn.createWithPreprocess=(r,e,t)=>new nn({schema:e,effect:{type:"preprocess",transform:r},typeName:Y.ZodEffects,...ne(t)});class hn extends ie{_parse(e){return this._getType(e)===x.undefined?gt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hn.create=(r,e)=>new hn({innerType:r,typeName:Y.ZodOptional,...ne(e)});class Xn extends ie{_parse(e){return this._getType(e)===x.null?gt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xn.create=(r,e)=>new Xn({innerType:r,typeName:Y.ZodNullable,...ne(e)});class Ta extends ie{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===x.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ta.create=(r,e)=>new Ta({innerType:r,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ne(e)});class Ea extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return aa(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new wt(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new wt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ea.create=(r,e)=>new Ea({innerType:r,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ne(e)});class Gs extends ie{_parse(e){if(this._getType(e)!==x.nan){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.nan,received:n.parsedType}),z}return{status:"valid",value:e.data}}}Gs.create=r=>new Gs({typeName:Y.ZodNaN,...ne(r)});const mA=Symbol("zod_brand");class Rd extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ra extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?z:s.status==="dirty"?(t.dirty(),mi(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?z:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,t){return new Ra({in:e,out:t,typeName:Y.ZodPipeline})}}class ga extends ie{_parse(e){const t=this._def.innerType._parse(e),n=a=>(ia(a)&&(a.value=Object.freeze(a.value)),a);return aa(t)?t.then(a=>n(a)):n(t)}unwrap(){return this._def.innerType}}ga.create=(r,e)=>new ga({innerType:r,typeName:Y.ZodReadonly,...ne(e)});function vg(r,e={},t){return r?Ti.create().superRefine((n,a)=>{var s,o;if(!r(n)){const l=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,p=(o=(s=l.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,u=typeof l=="string"?{message:l}:l;a.addIssue({code:"custom",...u,fatal:p})}}):Ti.create()}const TA={object:Ke.lazycreate};var Y;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Y||(Y={}));const EA=(r,e={message:`Input not instance of ${r.name}`})=>vg(t=>t instanceof r,e),$s=en.create,gd=zn.create,RA=Gs.create,gA=Zn.create,bd=la.create,Ig=br.create,bA=_s.create,vA=da.create,Dg=ca.create,IA=Ti.create,Fs=vr.create,DA=Bn.create,SA=Vs.create,OA=tn.create,Sg=Ke.create,PA=Ke.strictCreate,AA=ua.create,CA=Ns.create,wA=pa.create,BA=yn.create,Og=ya.create,MA=Ls.create,_A=Ir.create,VA=Ri.create,NA=ha.create,LA=fa.create,Pg=Kn.create,GA=ma.create,$A=gi.create,Ag=nn.create,FA=hn.create,UA=Xn.create,xA=nn.createWithPreprocess,jA=Ra.create;var y=Object.freeze({__proto__:null,defaultErrorMap:fi,setErrorMap:QP,getErrorMap:ws,makeIssue:Bs,EMPTY_PATH:eA,addIssueToContext:F,ParseStatus:yt,INVALID:z,DIRTY:mi,OK:gt,isAborted:fd,isDirty:md,isValid:ia,isAsync:aa,get util(){return le},get objectUtil(){return hd},ZodParsedType:x,getParsedType:Hn,ZodType:ie,datetimeRegex:gg,ZodString:en,ZodNumber:zn,ZodBigInt:Zn,ZodBoolean:la,ZodDate:br,ZodSymbol:_s,ZodUndefined:da,ZodNull:ca,ZodAny:Ti,ZodUnknown:vr,ZodNever:Bn,ZodVoid:Vs,ZodArray:tn,ZodObject:Ke,ZodUnion:ua,ZodDiscriminatedUnion:Ns,ZodIntersection:pa,ZodTuple:yn,ZodRecord:ya,ZodMap:Ls,ZodSet:Ir,ZodFunction:Ri,ZodLazy:ha,ZodLiteral:fa,ZodEnum:Kn,ZodNativeEnum:ma,ZodPromise:gi,ZodEffects:nn,ZodTransformer:nn,ZodOptional:hn,ZodNullable:Xn,ZodDefault:Ta,ZodCatch:Ea,ZodNaN:Gs,BRAND:mA,ZodBranded:Rd,ZodPipeline:Ra,ZodReadonly:ga,custom:vg,Schema:ie,ZodSchema:ie,late:TA,get ZodFirstPartyTypeKind(){return Y},coerce:{string:r=>en.create({...r,coerce:!0}),number:r=>zn.create({...r,coerce:!0}),boolean:r=>la.create({...r,coerce:!0}),bigint:r=>Zn.create({...r,coerce:!0}),date:r=>br.create({...r,coerce:!0})},any:IA,array:OA,bigint:gA,boolean:bd,date:Ig,discriminatedUnion:CA,effect:Ag,enum:Pg,function:VA,instanceof:EA,intersection:wA,lazy:NA,literal:LA,map:MA,nan:RA,nativeEnum:GA,never:DA,null:Dg,nullable:UA,number:gd,object:Sg,oboolean:()=>bd().optional(),onumber:()=>gd().optional(),optional:FA,ostring:()=>$s().optional(),pipeline:jA,preprocess:xA,promise:$A,record:Og,set:_A,strictObject:PA,string:$s,symbol:bA,transformer:Ag,tuple:BA,undefined:vA,union:AA,unknown:Fs,void:SA,NEVER:z,ZodIssueCode:N,quotelessJson:XP,ZodError:wt});function Cg(r){var a,s,o;if(!(r!=null&&r.dataType))return Fs();const e=!r.required,t=r.dataType.isList||!1;let n=Fs();if(((a=r.dataType.entity)==null?void 0:a.type)===i.PrimitiveEntity)switch(r.dataType.entity.name){case C.String:n=$s();break;case C.KeyValue:n=Og(Fs());break;case C.Number:n=gd();break;case C.Boolean:n=bd();break;case C.Date:n=Ig();break;case C.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);n=Pg(l);break}case C.Null:n=Dg();break;case C.UUID:n=$s().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===i.DefinitionEntity)n=wg(r.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=r.dataType.entity)==null?void 0:o.type}`);return e&&(n=n.nullable()),t&&(n=n.array()),n}function wg(r){const e=Sg({});for(const t of r.properties){const n=Cg(t);e.shape[t.name]=n}return e}function Bg(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function Mg(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function _g(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function Vg(r){return r.rangeStart&&r.rangeEnd?_g(r):r.rangeStart?Bg(r):r.rangeEnd?Mg(r):new Date}function kA(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ng={},Us={},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=JA;let js;const qA=new Uint8Array(16);function JA(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(qA)}var Qn={},Dr={},ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var WA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;ks.default=WA,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.default=void 0;var YA=HA(ks);function HA(r){return r&&r.__esModule?r:{default:r}}function zA(r){return typeof r=="string"&&YA.default.test(r)}var ZA=zA;Dr.default=ZA,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.default=void 0,Qn.unsafeStringify=Lg;var KA=XA(Dr);function XA(r){return r&&r.__esModule?r:{default:r}}const ut=[];for(let r=0;r<256;++r)ut.push((r+256).toString(16).slice(1));function Lg(r,e=0){return ut[r[e+0]]+ut[r[e+1]]+ut[r[e+2]]+ut[r[e+3]]+"-"+ut[r[e+4]]+ut[r[e+5]]+"-"+ut[r[e+6]]+ut[r[e+7]]+"-"+ut[r[e+8]]+ut[r[e+9]]+"-"+ut[r[e+10]]+ut[r[e+11]]+ut[r[e+12]]+ut[r[e+13]]+ut[r[e+14]]+ut[r[e+15]]}function QA(r,e=0){const t=Lg(r,e);if(!(0,KA.default)(t))throw TypeError("Stringified UUID is invalid");return t}var eC=QA;Qn.default=eC,Object.defineProperty(Us,"__esModule",{value:!0}),Us.default=void 0;var tC=rC(xs),nC=Qn;function rC(r){return r&&r.__esModule?r:{default:r}}let Gg,vd,Id=0,Dd=0;function iC(r,e,t){let n=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||Gg,o=r.clockseq!==void 0?r.clockseq:vd;if(s==null||o==null){const R=r.random||(r.rng||tC.default)();s==null&&(s=Gg=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=vd=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:Dd+1;const u=l-Id+(p-Dd)/1e4;if(u<0&&r.clockseq===void 0&&(o=o+1&16383),(u<0||l>Id)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Id=l,Dd=p,vd=o,l+=122192928e5;const h=((l&268435455)*1e4+p)%4294967296;a[n++]=h>>>24&255,a[n++]=h>>>16&255,a[n++]=h>>>8&255,a[n++]=h&255;const f=l/4294967296*1e4&268435455;a[n++]=f>>>8&255,a[n++]=f&255,a[n++]=f>>>24&15|16,a[n++]=f>>>16&255,a[n++]=o>>>8|128,a[n++]=o&255;for(let R=0;R<6;++R)a[n+R]=s[R];return e||(0,nC.unsafeStringify)(a)}var aC=iC;Us.default=aC;var qs={},er={},ba={};Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var sC=oC(Dr);function oC(r){return r&&r.__esModule?r:{default:r}}function lC(r){if(!(0,sC.default)(r))throw TypeError("Invalid UUID");let e;const t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var dC=lC;ba.default=dC,Object.defineProperty(er,"__esModule",{value:!0}),er.URL=er.DNS=void 0,er.default=hC;var cC=Qn,uC=pC(ba);function pC(r){return r&&r.__esModule?r:{default:r}}function yC(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const $g="6ba7b810-9dad-11d1-80b4-00c04fd430c8";er.DNS=$g;const Fg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";er.URL=Fg;function hC(r,e,t){function n(a,s,o,l){var p;if(typeof a=="string"&&(a=yC(a)),typeof s=="string"&&(s=(0,uC.default)(s)),((p=s)===null||p===void 0?void 0:p.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+a.length);if(u.set(s),u.set(a,s.length),u=t(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,o){l=l||0;for(let h=0;h<16;++h)o[l+h]=u[h];return o}return(0,cC.unsafeStringify)(u)}try{n.name=r}catch{}return n.DNS=$g,n.URL=Fg,n}var Js={};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=void 0;function fC(r){if(typeof r=="string"){const e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(let t=0;t<e.length;++t)r[t]=e.charCodeAt(t)}return mC(TC(EC(r),r.length*8))}function mC(r){const e=[],t=r.length*32,n="0123456789abcdef";for(let a=0;a<t;a+=8){const s=r[a>>5]>>>a%32&255,o=parseInt(n.charAt(s>>>4&15)+n.charAt(s&15),16);e.push(o)}return e}function Ug(r){return(r+64>>>9<<4)+14+1}function TC(r,e){r[e>>5]|=128<<e%32,r[Ug(e)-1]=e;let t=1732584193,n=-271733879,a=-1732584194,s=271733878;for(let o=0;o<r.length;o+=16){const l=t,p=n,u=a,h=s;t=ht(t,n,a,s,r[o],7,-680876936),s=ht(s,t,n,a,r[o+1],12,-389564586),a=ht(a,s,t,n,r[o+2],17,606105819),n=ht(n,a,s,t,r[o+3],22,-1044525330),t=ht(t,n,a,s,r[o+4],7,-176418897),s=ht(s,t,n,a,r[o+5],12,1200080426),a=ht(a,s,t,n,r[o+6],17,-1473231341),n=ht(n,a,s,t,r[o+7],22,-45705983),t=ht(t,n,a,s,r[o+8],7,1770035416),s=ht(s,t,n,a,r[o+9],12,-1958414417),a=ht(a,s,t,n,r[o+10],17,-42063),n=ht(n,a,s,t,r[o+11],22,-1990404162),t=ht(t,n,a,s,r[o+12],7,1804603682),s=ht(s,t,n,a,r[o+13],12,-40341101),a=ht(a,s,t,n,r[o+14],17,-1502002290),n=ht(n,a,s,t,r[o+15],22,1236535329),t=ft(t,n,a,s,r[o+1],5,-165796510),s=ft(s,t,n,a,r[o+6],9,-1069501632),a=ft(a,s,t,n,r[o+11],14,643717713),n=ft(n,a,s,t,r[o],20,-373897302),t=ft(t,n,a,s,r[o+5],5,-701558691),s=ft(s,t,n,a,r[o+10],9,38016083),a=ft(a,s,t,n,r[o+15],14,-660478335),n=ft(n,a,s,t,r[o+4],20,-405537848),t=ft(t,n,a,s,r[o+9],5,568446438),s=ft(s,t,n,a,r[o+14],9,-1019803690),a=ft(a,s,t,n,r[o+3],14,-187363961),n=ft(n,a,s,t,r[o+8],20,1163531501),t=ft(t,n,a,s,r[o+13],5,-1444681467),s=ft(s,t,n,a,r[o+2],9,-51403784),a=ft(a,s,t,n,r[o+7],14,1735328473),n=ft(n,a,s,t,r[o+12],20,-1926607734),t=mt(t,n,a,s,r[o+5],4,-378558),s=mt(s,t,n,a,r[o+8],11,-2022574463),a=mt(a,s,t,n,r[o+11],16,1839030562),n=mt(n,a,s,t,r[o+14],23,-35309556),t=mt(t,n,a,s,r[o+1],4,-1530992060),s=mt(s,t,n,a,r[o+4],11,1272893353),a=mt(a,s,t,n,r[o+7],16,-155497632),n=mt(n,a,s,t,r[o+10],23,-1094730640),t=mt(t,n,a,s,r[o+13],4,681279174),s=mt(s,t,n,a,r[o],11,-358537222),a=mt(a,s,t,n,r[o+3],16,-722521979),n=mt(n,a,s,t,r[o+6],23,76029189),t=mt(t,n,a,s,r[o+9],4,-640364487),s=mt(s,t,n,a,r[o+12],11,-421815835),a=mt(a,s,t,n,r[o+15],16,530742520),n=mt(n,a,s,t,r[o+2],23,-995338651),t=Tt(t,n,a,s,r[o],6,-198630844),s=Tt(s,t,n,a,r[o+7],10,1126891415),a=Tt(a,s,t,n,r[o+14],15,-1416354905),n=Tt(n,a,s,t,r[o+5],21,-57434055),t=Tt(t,n,a,s,r[o+12],6,1700485571),s=Tt(s,t,n,a,r[o+3],10,-1894986606),a=Tt(a,s,t,n,r[o+10],15,-1051523),n=Tt(n,a,s,t,r[o+1],21,-2054922799),t=Tt(t,n,a,s,r[o+8],6,1873313359),s=Tt(s,t,n,a,r[o+15],10,-30611744),a=Tt(a,s,t,n,r[o+6],15,-1560198380),n=Tt(n,a,s,t,r[o+13],21,1309151649),t=Tt(t,n,a,s,r[o+4],6,-145523070),s=Tt(s,t,n,a,r[o+11],10,-1120210379),a=Tt(a,s,t,n,r[o+2],15,718787259),n=Tt(n,a,s,t,r[o+9],21,-343485551),t=tr(t,l),n=tr(n,p),a=tr(a,u),s=tr(s,h)}return[t,n,a,s]}function EC(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(Ug(e));for(let n=0;n<e;n+=8)t[n>>5]|=(r[n/8]&255)<<n%32;return t}function tr(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function RC(r,e){return r<<e|r>>>32-e}function Ws(r,e,t,n,a,s){return tr(RC(tr(tr(e,r),tr(n,s)),a),t)}function ht(r,e,t,n,a,s,o){return Ws(e&t|~e&n,r,e,a,s,o)}function ft(r,e,t,n,a,s,o){return Ws(e&n|t&~n,r,e,a,s,o)}function mt(r,e,t,n,a,s,o){return Ws(e^t^n,r,e,a,s,o)}function Tt(r,e,t,n,a,s,o){return Ws(t^(e|~n),r,e,a,s,o)}var gC=fC;Js.default=gC,Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=void 0;var bC=xg(er),vC=xg(Js);function xg(r){return r&&r.__esModule?r:{default:r}}var IC=(0,bC.default)("v3",48,vC.default);qs.default=IC;var Ys={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=void 0;var DC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Hs.default=DC,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.default=void 0;var jg=kg(Hs),SC=kg(xs),OC=Qn;function kg(r){return r&&r.__esModule?r:{default:r}}function PC(r,e,t){if(jg.default.randomUUID&&!e&&!r)return jg.default.randomUUID();r=r||{};const n=r.random||(r.rng||SC.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return(0,OC.unsafeStringify)(n)}var AC=PC;Ys.default=AC;var zs={},Zs={};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.default=void 0;function CC(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function Sd(r,e){return r<<e|r>>>32-e}function wC(r){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){const o=unescape(encodeURIComponent(r));r=[];for(let l=0;l<o.length;++l)r.push(o.charCodeAt(l))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);const n=r.length/4+2,a=Math.ceil(n/16),s=new Array(a);for(let o=0;o<a;++o){const l=new Uint32Array(16);for(let p=0;p<16;++p)l[p]=r[o*64+p*4]<<24|r[o*64+p*4+1]<<16|r[o*64+p*4+2]<<8|r[o*64+p*4+3];s[o]=l}s[a-1][14]=(r.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(r.length-1)*8&4294967295;for(let o=0;o<a;++o){const l=new Uint32Array(80);for(let v=0;v<16;++v)l[v]=s[o][v];for(let v=16;v<80;++v)l[v]=Sd(l[v-3]^l[v-8]^l[v-14]^l[v-16],1);let p=t[0],u=t[1],h=t[2],f=t[3],R=t[4];for(let v=0;v<80;++v){const I=Math.floor(v/20),D=Sd(p,5)+CC(I,u,h,f)+R+e[I]+l[v]>>>0;R=f,f=h,h=Sd(u,30)>>>0,u=p,p=D}t[0]=t[0]+p>>>0,t[1]=t[1]+u>>>0,t[2]=t[2]+h>>>0,t[3]=t[3]+f>>>0,t[4]=t[4]+R>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var BC=wC;Zs.default=BC,Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=void 0;var MC=qg(er),_C=qg(Zs);function qg(r){return r&&r.__esModule?r:{default:r}}var VC=(0,MC.default)("v5",80,_C.default);zs.default=VC;var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.default=void 0;var NC="00000000-0000-0000-0000-000000000000";Ks.default=NC;var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.default=void 0;var LC=GC(Dr);function GC(r){return r&&r.__esModule?r:{default:r}}function $C(r){if(!(0,LC.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var FC=$C;Xs.default=FC,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return o.default}});var e=h(Us),t=h(qs),n=h(Ys),a=h(zs),s=h(Ks),o=h(Xs),l=h(Dr),p=h(Qn),u=h(ba);function h(f){return f&&f.__esModule?f:{default:f}}}(Ng);function Od(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}Od.prototype.convert=function(r){var e,t,n,a={},s=this.srcAlphabet.length,o=this.dstAlphabet.length,l=r.length,p=typeof r=="string"?"":[];if(!this.isValid(r))throw new Error('Number "'+r+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return r;for(e=0;e<l;e++)a[e]=this.srcAlphabet.indexOf(r[e]);do{for(t=0,n=0,e=0;e<l;e++)t=t*s+a[e],t>=o?(a[n++]=parseInt(t/o,10),t=t%o):n>0&&(a[n++]=0);l=n,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(n!==0);return p},Od.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var UC=Od,xC=UC;function va(r,e){var t=new xC(r,e);return function(n){return t.convert(n)}}va.BIN="01",va.OCT="01234567",va.DEC="0123456789",va.HEX="0123456789abcdef";var jC=va;const{v4:Pd,validate:kC}=Ng,Qs=jC,Ad={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},qC={consistentLength:!0};let Cd;const Jg=(r,e,t)=>{const n=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?n:n.padStart(t.shortIdLength,t.paddingChar)},Wg=(r,e)=>{const n=e(r).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[n[1],n[2],n[3],n[4],n[5]].join("-")},JC=r=>Math.ceil(Math.log(2**128)/Math.log(r));var WC=(()=>{const r=(e,t)=>{const n=e||Ad.flickrBase58,a={...qC,...t};if([...new Set(Array.from(n))].length!==n.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const s=JC(n.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:n[0]},l=Qs(Qs.HEX,n),p=Qs(n,Qs.HEX),u=()=>Jg(Pd(),l,o),f={alphabet:n,fromUUID:R=>Jg(R,l,o),maxLength:s,generate:u,new:u,toUUID:R=>Wg(R,p),uuid:Pd,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const I=a.consistentLength?R.length===s:R.length<=s,D=R.split("").every(O=>n.includes(O));return v===!1?I&&D:I&&D&&kC(Wg(R,p))}};return Object.freeze(f),f};return r.constants=Ad,r.uuid=Pd,r.generate=()=>(Cd||(Cd=r(Ad.flickrBase58).generate),Cd()),r})();const eo=kA(WC);function Yg(){return eo().uuid()}function Hg(r){return r.rangeStart+Math.random()}function zg(r){const e=r.rangeEnd;return Math.random()*e}function Zg(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function Kg(r){return r.rangeStart&&r.rangeEnd?Zg(r):r.rangeStart?Hg(r):r.rangeEnd?zg(r):Math.random()}function Xg(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function Qg(r){const e=r.rangeEnd;return Math.random().toString(36).substring(0,e)}function eb(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random().toString(36).substring(e,t)}function tb(r){return r.rangeStart&&r.rangeEnd?eb(r):r.rangeStart?Xg(r):r.rangeEnd?Qg(r):Math.random().toString(36)}function nb(r){return Math.random()>=.5}function YC(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case ze.CurrentDateAndTime:if(r.name===C.Date)return new Date;case ze.Random:{if(r.name===C.Date)return Vg(r.autogeneration);if(r.name===C.Number)return Kg(r.autogeneration);if(r.name===C.String)return tb(r.autogeneration);if(r.name===C.Boolean)return nb(r.autogeneration)}case ze.Unique:if(r.name===C.UUID)return Yg();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const H="e7eb5382-3d99-44fd-972a-b8b1e819f6be",rb="global-user-variable-id",wd="last-executed-timestamp-variable-id",HC={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:i.ValueDescriptor},zC={id:"alternative-relational-database-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:i.Property},ZC={like:!1,inferred:!1,id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:zC},to={id:"alternative-relational-database-entity-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-id",entityType:i.DefinitionEntity},KC={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!1,implements:vs,static:!0,index:0,defaultValue:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:null,parent:HC,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:ZC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:to};i.GenericReference,i.ValueDescriptor;const XC={id:"alternative-relational-database-entity-username-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:i.Property},QC={like:!1,inferred:!1,id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:XC},ew={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:i.Property,private:!1,abstract:!1,implements:Is,static:!0,index:1,defaultValue:null,dataType:QC,description:"The username that will be used to connect to the database.",parent:to};i.GenericReference,i.ValueDescriptor;const tw={id:"alternative-relational-database-entity-password-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:i.Property},nw={like:!1,inferred:!1,id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:tw},rw={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:i.Property,private:!1,abstract:!1,implements:Ds,static:!0,index:2,defaultValue:null,dataType:nw,description:"The password that will be used to connect to the database.",parent:to},iw={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:i.ValueDescriptor},aw={id:"alternative-relational-database-entity-min-size-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:i.Property},sw={like:!1,inferred:!1,id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:aw},ow={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!1,implements:Ss,static:!0,index:3,defaultValue:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:iw,autogeneration:null,valueAsType:null},dataType:sw,description:"The minimum size of the database in GB.",parent:to},lw={id:"alternative-relational-database-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Bd={id:"alternative-relational-database-entity-id",type:i.DefinitionEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[KC,ew,rw,ow],methods:[],abstractMethods:[],extends:[],implements:[un],x:0,y:0,parent:lw},dw={id:"animal-prototype-database-property-ref-id",type:i.GenericReference,entityId:"animal-prototype-database-property-id",entityType:i.Property},cw={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"animal-prototype-database-property-id",entityType:i.Property},uw={like:!1,inferred:!1,id:"animal-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:dw},pw={id:"animal-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",entityType:i.DefinitionEntity},yw={constant:!1,hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Bd,autogeneration:null,parent:cw},dataType:uw,description:"The database that the entity belongs to.",parent:pw},hw={type:i.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:i.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},fw={like:!1,inferred:!1,id:"c1930577-9e79-48a6-8905-be24611015c1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:hw},mw={type:i.GenericReference,id:"animal-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970"},Tw={constant:!1,hidden:!1,required:!0,type:i.Property,id:"5cb617b0-92be-4dbe-a007-49093368d94f",version:1,name:"Name",description:"The name of the animal",defaultValue:null,implements:pi,static:!1,private:!1,index:0,dataType:fw,abstract:!1,parent:mw},Ew={type:i.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:i.Project,entityId:H},Rw={type:i.DefinitionEntity,id:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",version:1,name:"Animal",description:"A living creature that is not human",abstract:!1,static:!1,abstractMethods:[],properties:[yw,Tw],methods:[],extends:[],implements:[st],x:0,y:0,parent:Ew},Ia="base-table-entity",ib="base-table-entity-identifier-property-id";i.GenericReference,i.Property,i.GenericReference,i.Property;const gw={id:"base-table-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:ib,entityType:i.Property},bw={id:"base-table-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-identifier-property-id",entityType:i.Property},vw={like:!1,inferred:!1,id:"base-table-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:bw},Iw={id:"base-table-entity-identifier-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity};i.Property,i.LiteralValue,C.UUID,ze.Unique,i.GenericReference,i.Property;const Dw={id:"base-table-entity-deleted-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-deleted-at-property-id",entityType:i.Property},Sw={like:!1,inferred:!1,id:"base-table-entity-deleted-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Dw},Ow={id:"base-table-entity-deleted-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Pw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-deleted-at-property-id",name:"Deleted at",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,defaultValue:null,dataType:Sw,description:"The date and time when the entity was deleted.",parent:Ow};i.GenericReference,i.Property;const Aw={id:"base-table-entity-created-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-created-at-property-id",entityType:i.Property},Cw={like:!1,inferred:!1,id:"base-table-entity-created-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Aw},ww={id:"base-table-entity-created-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Bw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-created-at-property-id",name:"Created at",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,defaultValue:null,dataType:Cw,description:"The date and time when the entity was created.",parent:ww};i.GenericReference,i.Property;const Mw={id:"base-table-entity-updated-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-updated-at-property-id",entityType:i.Property},_w={like:!1,inferred:!1,id:"base-table-entity-updated-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Mw},Vw={id:"base-table-entity-updated-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Nw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-updated-at-property-id",name:"Updated at",version:1,type:i.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,defaultValue:null,dataType:_w,description:"The date and time when the entity was last updated.",parent:Vw},Lw={id:"base-table-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Ft={id:Ia,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:"Base database table format",type:i.DefinitionEntity,abstract:!0,static:!1,abstractMethods:[],implements:[],properties:[Pw,Bw,Nw],methods:[],extends:[],x:0,y:0,parent:Lw},Gw={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:i.Property},$w={id:"default-relational-database-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:i.Property},Fw={like:!1,inferred:!1,id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:$w},bi={id:"default-relational-database-entity-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-id",entityType:i.DefinitionEntity},Uw={constant:!1,id:"default-relational-database-entity-identifier-property-id",hidden:!1,required:!0,name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!1,implements:vs,static:!0,index:0,defaultValue:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"main",parent:Gw,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:Fw,description:"The name of the main database inside of the server instance where the data will be stored.",parent:bi};i.GenericReference,i.Property;const xw={id:"default-relational-database-entity-username-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:i.Property},jw={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:i.Property},kw={like:!1,inferred:!1,id:"default-relational-database-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:xw},qw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:i.Property,private:!1,abstract:!1,implements:Is,defaultValue:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"root",parent:jw,autogeneration:null,valueAsType:null},static:!0,index:1,dataType:kw,description:"The username that will be used to connect to the database.",parent:bi};i.GenericReference,i.Property;const Jw={id:"default-relational-database-entity-password-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:i.Property},Ww={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:i.Property},Yw={like:!1,inferred:!1,id:"default-relational-database-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:Jw},Hw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:i.Property,private:!1,abstract:!1,implements:Ds,static:!0,index:2,defaultValue:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"password",parent:Ww,autogeneration:null,valueAsType:null},dataType:Yw,description:"The password that will be used to connect to the database.",parent:bi},zw={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:i.Property},Zw={id:"default-relational-database-entity-min-size-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:i.Property},Kw={like:!1,inferred:!1,id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:Zw},Xw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!1,implements:Ss,static:!0,index:3,defaultValue:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:zw,autogeneration:null,valueAsType:null},dataType:Kw,description:"The minimum size of the database in GB.",parent:bi},Qw={id:"default-relational-database-entity-default-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:i.Property},eB={id:"default-relational-database-entity-default-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:i.Property},tB={like:!1,inferred:!1,id:"default-relational-database-entity-default-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:eB},nB={constant:!1,id:"default-relational-database-entity-default-property-id",hidden:!0,required:!0,name:"Default",description:"Whether this database is automatically picked by other entities as the default database.",version:1,type:i.Property,private:!1,abstract:!1,implements:ld,static:!0,index:4,dataType:tB,defaultValue:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!0,parent:Qw,autogeneration:null,valueAsType:null},parent:bi},rB={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:i.Property},iB={id:"default-relational-database-entity-autoscaling-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:i.Property},aB={like:!1,inferred:!1,id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:iB},sB={constant:!1,id:"default-relational-database-entity-autoscaling-property-id",hidden:!1,required:!0,name:"Auto-scaling",version:1,type:i.Property,private:!1,abstract:!1,implements:dd,static:!0,index:5,defaultValue:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!0,parent:rB,autogeneration:null,valueAsType:null},dataType:aB,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:bi},oB={id:"default-relational-database-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Md={id:"default-relational-database-entity-id",type:i.DefinitionEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[nB,sB,Uw,qw,Hw,Xw],methods:[],abstractMethods:[],extends:[],implements:[un],x:0,y:0,parent:oB},lB={id:"user-prototype-database-property-data-type-ref-id",type:i.GenericReference,entityId:"user-prototype-database-property-id",entityType:i.Property},dB={id:"user-prototype-database-property-ref-id",type:i.GenericReference,entityId:"user-prototype-database-property-id",entityType:i.Property},cB={like:!1,inferred:!1,id:"user-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:dB},uB={id:"user-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:i.DefinitionEntity},pB={constant:!1,hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Md,autogeneration:null,parent:lB},dataType:cB,description:"The database that the entity belongs to.",parent:uB},yB={type:i.GenericReference,id:"user-prototype-parent-ref-id",entityType:i.Project,entityId:H},hB={id:"user-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"user-prototype-primary-key-property-id",entityType:i.Property},fB={id:"user-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"user-prototype-primary-key-property-id",entityType:i.Property},mB={like:!1,inferred:!1,id:"user-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:fB},TB={id:"user-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:i.DefinitionEntity},EB={constant:!1,hidden:!1,required:!0,id:"user-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:pi,static:!1,index:1,defaultValue:{id:"user-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:hB,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:mB,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:TB},_d={type:i.DefinitionEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[st,Ft],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[pB,EB],methods:[],x:0,y:0,parent:yB},RB={type:i.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:i.Property,entityId:"person-date-of-birth-property-id"},gB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ln,isList:!1,asType:!1,parent:RB},bB={type:i.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},vB={constant:!1,hidden:!1,required:!0,type:i.Property,id:"person-date-of-birth-property-id",version:1,name:"Date of birth",description:"The date of birth of the person",implements:null,private:!1,static:!1,index:0,defaultValue:null,dataType:gB,abstract:!1,parent:bB},IB={type:i.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:i.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},DB={like:!1,inferred:!1,id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:IB},SB={type:i.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:i.DefinitionEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},OB={constant:!1,hidden:!1,required:!0,type:i.Property,id:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7",version:1,name:"Name",description:"The name of the person",implements:null,private:!1,static:!1,index:0,defaultValue:null,dataType:DB,abstract:!1,parent:SB},PB={type:i.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:i.Project,entityId:H},bt={type:i.DefinitionEntity,id:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416",version:1,name:"Person",description:"A entity to store more information about a person than the user entity does, to split the responsibilities and keep it the logic clean.",properties:[OB,vB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[_d],x:0,y:0,parent:PB},AB={type:i.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},CB={type:i.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:i.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},wB={type:i.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:i.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},BB={type:i.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:i.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},MB={like:!1,inferred:!1,id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:BB},Vd={constant:!0,isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:i.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,defaultValue:null,dataType:MB,implements:null,readsValue:wB,required:!0,index:0,parent:CB},_B={type:i.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},VB={type:i.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},ab={type:i.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Vd],calledByError:[],calledByEntry:[_B],calledBySuccess:[],throws:null,x:0,y:0,parent:VB},NB={type:i.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:i.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},LB={like:!1,inferred:!1,id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:NB},sb={constant:!0,id:"500dee3a-3435-4453-9699-0d053f646523",type:i.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,defaultValue:null,dataType:LB,implements:null,required:!0,writesValues:[Vd],index:0,parent:AB},GB={type:i.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},ob={type:i.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[sb],calls:[ab],returnStatements:[ab],index:0,collapsed:!1,private:!1,x:0,y:0,parent:GB},$B={type:i.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:i.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},FB={like:!1,inferred:!1,id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:$B},UB={type:i.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:i.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},xB={type:i.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},jB={constant:!0,required:!0,id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:i.VariableDeclaration,version:1,name:"Output Account Owner",description:null,defaultValue:null,dataType:FB,readsValue:UB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:xB},kB={type:i.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:i.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},qB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:i.OutputMap,version:1,declaration:Vd,defaultValue:null,writesValues:[jB],index:0,parent:kB},JB={type:i.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},WB={type:i.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},YB={type:i.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:i.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},HB={like:!1,inferred:!1,id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:YB},zB={type:i.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:i.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},ZB={type:i.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},KB={type:i.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:i.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},XB={type:i.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:i.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},lb={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:i.InputMap,version:1,declaration:sb,name:null,description:null,readsValue:XB,defaultValue:null,index:0,parent:KB},QB={constant:!0,required:!0,type:i.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,defaultValue:null,dataType:HB,readsValue:zB,writesValues:[lb],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:ZB},eM={type:i.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:ob,inputs:[lb],outputs:[qB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[JB],calledBySuccess:[],parent:WB,error:null,x:0,y:0},tM={type:i.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:i.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},nM={like:!1,inferred:!1,id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:tM},rM={type:i.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},iM={constant:!0,id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:i.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",defaultValue:null,dataType:nM,implements:null,required:!0,index:0,writesValues:[QB],parent:rM},aM={type:i.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},sM={type:i.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[iM],collapsed:!0,returnStatements:[],calls:[eM],private:!1,index:0,implements:null,x:0,y:0,parent:aM},oM={type:i.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:i.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},lM={like:!1,inferred:!1,id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:oM},dM={type:i.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},cM={constant:!1,hidden:!1,required:!0,type:i.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,defaultValue:null,implements:pi,static:!1,index:0,dataType:lM,abstract:!1,parent:dM},uM={type:i.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:i.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},pM={like:!1,inferred:!1,id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:uM},yM={type:i.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},hM={constant:!1,hidden:!1,required:!0,type:i.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,defaultValue:null,dataType:pM,implements:null,static:!1,private:!0,abstract:!1,parent:yM},fM={type:i.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:i.Project,entityId:H},vi={type:i.DefinitionEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[cM,hM],methods:[ob,sM],extends:[],implements:[st,Ft],x:0,y:0,parent:fM},Da="bitcoin-api-response-id",db="time-property-id",cb="disclaimer-property-id",ub="chart-name-property-id",pb="bpi-property-id",no="bpi-entity-id",yb="usd-property-id",hb="gbp-property-id",fb="eur-property-id",Ii="currency-entity-id",mb="currency-code-property-id",Tb="currency-symbol-property-id",Eb="currency-rate-property-id",Rb="currency-description-property-id",gb="currency-rate-number-property-id",mM={type:i.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:i.Property,entityId:mb},TM={like:!1,inferred:!1,id:"code-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["USD","GBP","EUR"],parent:mM},EM={type:i.GenericReference,id:"code-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},RM={constant:!1,hidden:!1,required:!0,type:i.Property,id:mb,version:1,name:"code",description:null,defaultValue:null,dataType:TM,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:EM},gM={type:i.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:i.Property,entityId:Tb},bM={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["$","£","€"],parent:gM},vM={type:i.GenericReference,id:"symbol-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},IM={constant:!1,hidden:!1,required:!0,type:i.Property,id:Tb,version:1,name:"symbol",description:null,index:0,defaultValue:null,dataType:bM,implements:null,static:!1,private:!1,abstract:!1,parent:vM},DM={type:i.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:i.Property,entityId:Eb},SM={like:!1,inferred:!1,id:"rate-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:DM},OM={type:i.GenericReference,id:"rate-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},PM={constant:!1,hidden:!1,required:!0,type:i.Property,id:Eb,version:1,name:"rate",description:null,index:0,defaultValue:null,dataType:SM,implements:null,static:!1,private:!1,abstract:!1,parent:OM},AM={type:i.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:i.Property,entityId:Rb},CM={like:!1,inferred:!1,id:"description-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:AM},wM={type:i.GenericReference,id:"description-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},BM={constant:!1,hidden:!1,required:!0,type:i.Property,id:Rb,version:1,name:"description",description:null,defaultValue:null,dataType:CM,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:wM},MM={type:i.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:i.Property,entityId:gb},_M={like:!1,inferred:!1,id:"rate-number-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:MM},VM={type:i.GenericReference,id:"rate-number-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},NM={constant:!1,hidden:!1,required:!0,type:i.Property,id:gb,version:1,name:"rate_float",description:null,defaultValue:null,dataType:_M,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:VM},LM={type:i.GenericReference,id:"currency-prototype-parent-ref-id",entityType:i.Project,entityId:H},ro={type:i.DefinitionEntity,id:Ii,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[RM,IM,PM,BM,NM],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:LM},GM={type:i.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:i.Property,entityId:yb},$M={like:!1,inferred:!1,id:"usd-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:GM},FM={type:i.GenericReference,id:"usd-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},UM={constant:!1,hidden:!1,required:!0,id:yb,type:i.Property,version:1,name:"USD",description:null,index:0,dataType:$M,defaultValue:null,implements:null,static:!1,private:!1,abstract:!1,parent:FM},xM={type:i.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:i.Property,entityId:hb},jM={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:xM},kM={type:i.GenericReference,id:"gbp-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},qM={constant:!1,hidden:!1,required:!0,id:hb,type:i.Property,version:1,name:"GBP",description:null,index:0,dataType:jM,defaultValue:null,implements:null,static:!1,private:!1,abstract:!1,parent:kM},JM={type:i.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:i.Property,entityId:fb},WM={like:!1,inferred:!1,id:"eur-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:JM},YM={type:i.GenericReference,id:"eur-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},HM={constant:!1,hidden:!1,required:!0,id:fb,type:i.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,defaultValue:null,dataType:WM,private:!1,abstract:!1,parent:YM},zM={type:i.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:i.Project,entityId:H},bb={type:i.DefinitionEntity,id:no,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[UM,qM,HM],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:zM},ZM={type:i.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:i.Property,entityId:db},KM={like:!1,inferred:!1,id:"time-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ai,isList:!1,asType:!1,parent:ZM},XM={type:i.GenericReference,id:"time-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},QM={constant:!1,hidden:!1,required:!0,type:i.Property,id:db,version:1,name:"time",description:null,index:0,defaultValue:null,dataType:KM,implements:null,static:!1,private:!1,abstract:!1,parent:XM},e_={type:i.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:i.Property,entityId:cb},t_={like:!1,inferred:!1,id:"disclaimer-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:e_},n_={type:i.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},r_={constant:!1,hidden:!1,required:!0,type:i.Property,id:cb,version:1,name:"disclaimer",description:null,index:0,defaultValue:null,dataType:t_,implements:null,static:!1,private:!1,abstract:!1,parent:n_},i_={type:i.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:i.Property,entityId:ub},a_={like:!1,inferred:!1,id:"chart-name-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:i_},s_={type:i.GenericReference,id:"chart-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},o_={constant:!1,hidden:!1,required:!0,type:i.Property,id:ub,version:1,name:"chartName",description:null,index:0,defaultValue:null,dataType:a_,implements:null,static:!1,private:!1,abstract:!1,parent:s_},l_={type:i.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:i.Property,entityId:pb},d_={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bb,isList:!1,asType:!1,parent:l_},c_={type:i.GenericReference,id:"bpi-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},u_={constant:!1,hidden:!1,required:!0,type:i.Property,id:pb,version:1,name:"bpi",description:null,implements:null,index:0,defaultValue:null,dataType:d_,static:!1,private:!1,abstract:!1,parent:c_},p_={type:i.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:i.Project,entityId:H},vb={type:i.DefinitionEntity,id:Da,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[QM,r_,o_,u_],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:p_},y_={type:i.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:i.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},h_={like:!1,inferred:!1,id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:y_},f_={type:i.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:i.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},m_={type:i.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:i.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},T_={like:!1,inferred:!1,id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:m_},E_={type:i.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:i.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Ib={constant:!0,isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",implements:null,defaultValue:null,dataType:T_,readsValue:E_,required:!0,index:0,parent:f_},R_={type:i.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},g_={constant:!0,id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:i.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,defaultValue:null,dataType:h_,writesValues:[Ib],required:!0,index:0,parent:R_},b_={type:i.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},v_={type:i.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},I_={type:i.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},Db={type:i.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[Ib],calledByError:[],calledByEntry:[v_],calledBySuccess:[],throws:null,x:0,y:0,parent:I_},D_={type:i.FunctionDeclaration,id:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4",version:1,name:"Change owner of company",description:"Change the owner of the company to a new person",inputs:[g_],calls:[Db],index:0,collapsed:!1,implements:null,returnStatements:[Db],private:!1,x:0,y:0,parent:b_},S_={type:i.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},O_={type:i.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},P_={type:i.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:i.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},A_={type:i.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},C_={type:i.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:i.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},w_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,asType:!1,isList:!1,parent:C_},Nd={constant:!0,isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:i.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",defaultValue:null,dataType:w_,implements:null,readsValue:A_,required:!0,index:0,parent:P_},B_={type:i.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Ld={type:i.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[Nd],calledByError:[],calledByEntry:[],calledBySuccess:[S_,B_],throws:null,x:0,y:0,parent:O_},M_={type:i.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},__={type:i.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:i.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},Sb={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:i.InputMap,version:1,declaration:Ul,name:null,description:null,readsValue:__,defaultValue:null,parent:M_,index:2},V_={type:i.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},N_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,isList:!1,asType:!1,parent:V_},L_={type:i.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},G_={type:i.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:i.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},$_={type:i.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:i.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Ob={constant:!0,required:!0,type:i.VariableDeclaration,id:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a",version:1,name:"Is name registered",description:"Whether the company name is registered with the government company registry",defaultValue:null,dataType:N_,readsValue:G_,writesValues:[Nd],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[$_],successCalls:[Ld],errorCalls:[],internalCalls:[],x:0,y:0,parent:L_},F_={type:i.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:i.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},U_={type:i.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},x_={type:i.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:ys,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:i.LiteralValue,version:1,value:"https://api.publicapis.org/entries",name:C.String,valueAsType:null,parent:F_,autogeneration:null},index:1,parent:U_},j_={type:i.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},k_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:i.OutputMap,version:1,defaultValue:null,declaration:Es,index:2,writesValues:[Ob],parent:j_},q_={type:i.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},J_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:i.InputMap,version:1,declaration:ps,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:q_},W_={type:i.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Y_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:i.InputMap,version:1,name:null,description:null,declaration:hs,index:3,readsValue:null,defaultValue:null,parent:W_},H_={type:i.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},z_={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:i.InputMap,version:1,declaration:fs,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:H_},Z_={type:i.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},K_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:i.OutputMap,version:1,defaultValue:null,declaration:Ts,index:1,writesValues:[],parent:Z_},X_={type:i.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Q_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:i.OutputMap,version:1,defaultValue:null,declaration:ms,index:0,writesValues:[],parent:X_},eV={type:i.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},tV={type:i.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},nV={type:i.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},rV={type:i.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},iV={type:i.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:i.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},aV={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:iV},sV={type:i.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:i.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},Pb={constant:!0,isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:i.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:aV,defaultValue:null,implements:null,required:!0,readsValue:null,index:0,parent:sV},Ab={type:i.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[rV],calledByEntry:[],calledBySuccess:[],throws:Pb,x:0,y:0,parent:nV},oV={type:i.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},lV={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:i.OutputMap,declaration:xl,defaultValue:null,version:1,writesValues:[Pb],index:0,parentRelationType:ri.Error,parent:oV},dV={type:i.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Xi,inputs:[J_,x_,Sb,Y_,z_],outputs:[Q_,K_,k_],process:null,calledByError:[],calledByEntry:[eV],calledBySuccess:[],successCalls:[Ld,Ob],errorCalls:[Ab],error:lV,x:0,y:0,parent:tV},cV={type:i.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:i.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},uV={type:i.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},pV={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:i.InputMap,version:1,declaration:ds,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:i.LiteralValue,version:1,value:"?name=",name:C.String,parent:cV,valueAsType:null,autogeneration:null},index:0,parent:uV},yV={type:i.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},hV={type:i.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},fV={type:i.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:i.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},mV={like:!1,inferred:!1,id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:fV},TV={type:i.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:i.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},EV={type:i.GenericReference,id:"assembled-query-string-called-by-ref",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},Cb={constant:!0,required:!0,type:i.VariableDeclaration,id:"83e12ebb-c958-4dee-b750-8ab9930f0f4e",version:1,name:"Query string",description:"The final, assembled query string that will be used in the HTTP request to the government company registry",defaultValue:null,dataType:mV,readsValue:TV,writesValues:[Sb],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[EV],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:hV},RV={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:i.OutputMap,version:1,defaultValue:null,writesValues:[Cb],declaration:Zi,index:0,parent:yV},gV={type:i.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},bV={type:i.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},vV={type:i.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:i.ArgumentDeclaration},IV={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},wb={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:i.InputMap,declaration:cs,name:null,description:null,readsValue:vV,defaultValue:null,index:1,parent:IV},DV={type:i.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:Ki,version:1,inputs:[wb,pV],outputs:[RV],process:null,calledByError:[],calledByEntry:[gV],calledBySuccess:[],successCalls:[Cb],errorCalls:[],error:null,x:0,y:0,parent:bV},SV={type:i.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:i.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},OV={like:!1,inferred:!1,id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:SV},PV={type:i.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},Bb={constant:!0,id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:i.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:OV,defaultValue:null,implements:null,required:!1,writesValues:[wb],index:0,parent:PV},AV={type:i.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:i.Project,entityId:H},Mb={type:i.FunctionDeclaration,id:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d",version:1,name:"Check Gov Company Registry availability",description:"Check whether the company name is already registered in the government company registry, or it is available for a new company to use.",inputs:[Bb],calls:[DV,dV],returnStatements:[Ld,Ab],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:AV},CV={type:i.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:i.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},wV={type:i.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},BV={type:i.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},MV={type:i.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},_b={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:i.InputMap,declaration:Bb,name:null,description:null,readsValue:BV,defaultValue:null,index:0,parent:MV},_V={type:i.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},VV={type:i.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:i.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},NV={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,asType:!1,isList:!1,parent:VV},LV={type:i.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:i.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},GV={type:i.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},$V={type:i.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Vb={constant:!0,required:!0,type:i.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",defaultValue:null,dataType:NV,readsValue:LV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[$V],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:GV},FV={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.OutputMap,version:1,declaration:Nd,defaultValue:null,writesValues:[Vb],index:0,parent:_V},UV={type:i.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:Mb,inputs:[_b],outputs:[FV],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[CV],successCalls:[Vb],errorCalls:[],error:null,x:0,y:0,parent:wV},xV={type:i.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},jV={type:i.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},kV={type:i.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},qV={type:i.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:i.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},Nb={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:i.InputMap,declaration:gr.inputs[0],name:null,description:null,readsValue:kV,defaultValue:null,index:0,parent:qV},JV={type:i.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:gr,inputs:[Nb],calledByError:[],calledByEntry:[xV],calledBySuccess:[],successCalls:[UV],errorCalls:[],x:0,y:0,parent:jV},WV={type:i.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},YV={type:i.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:i.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},HV={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,asType:!1,isList:!1,parent:YV},zV={type:i.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},ZV={type:i.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:i.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},KV={type:i.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},Lb={constant:!0,required:!0,type:i.VariableDeclaration,id:"9c928995-0dd5-4f97-9962-56b343bc8a45",version:1,name:"New bank account",description:"The new entity value representing the new bank account of the company",defaultValue:null,dataType:HV,readsValue:ZV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[KV],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:zV},XV={type:i.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:i.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},QV={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,asType:!1,isList:!1,parent:XV},eN={constant:!0,id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:i.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:QV,implements:null,defaultValue:null,required:!0,index:1,writesValues:[Lb],parent:WV},tN={type:i.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},nN={type:i.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},rN={type:i.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},iN={like:!1,inferred:!1,id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:rN},aN={constant:!0,id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:i.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:iN,implements:null,defaultValue:null,required:!0,index:0,writesValues:[Nb,_b],parent:nN},sN={type:i.FunctionDeclaration,id:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84",version:1,name:"Company changed event",description:"The event that is triggered when a company is changed",returnStatements:[],collapsed:!1,inputs:[aN,eN],calls:[JV,Lb],index:1,private:!1,implements:null,x:0,y:0,parent:tN},oN={type:i.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},lN={type:i.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:i.Property,entityId:"employee-manager-property-id"},dN={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oN,isList:!1,asType:!1,parent:lN},cN={type:i.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},uN={constant:!1,required:!0,hidden:!1,type:i.Property,id:"employee-manager-property-id",version:1,name:"Manager",description:"The manager of the employee",index:0,implements:null,private:!1,static:!1,defaultValue:null,dataType:dN,abstract:!1,parent:cN},pN={type:i.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:i.Property,entityId:"employee-start-date-property-id"},yN={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ln,isList:!1,asType:!1,parent:pN},hN={type:i.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},fN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"employee-start-date-property-id",version:1,name:"Start date",description:"The date the employee started working in the company",index:0,private:!1,static:!1,defaultValue:null,implements:null,dataType:yN,abstract:!1,parent:hN},mN={type:i.GenericReference,id:"employee-department-property-ref-id",entityType:i.Property,entityId:"employee-department-property-id"},TN={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],parent:mN},EN={type:i.GenericReference,id:"employee-department-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},RN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"employee-department-property-id",version:1,name:"Department",description:"The department the employee works in, from a list of departments in the company",index:0,defaultValue:null,implements:null,static:!1,private:!1,dataType:TN,abstract:!1,parent:EN},gN={type:i.GenericReference,id:"employee-prototype-parent-ref-id",entityType:i.Project,entityId:H},Yt={type:i.DefinitionEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[RN,fN,uN],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[bt],x:0,y:0,parent:gN},bN={type:i.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:i.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},vN={like:!1,inferred:!1,id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:bN},IN={type:i.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},DN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd",version:1,name:"Company Name",private:!1,static:!1,description:"The name of the company",index:0,defaultValue:null,implements:null,dataType:vN,abstract:!1,parent:IN},SN={type:i.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:i.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},ON={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,isList:!1,asType:!1,parent:SN},PN={type:i.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},Gd={constant:!1,hidden:!1,required:!0,type:i.Property,id:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",version:1,name:"Bank account",description:"The bank account of the company",index:1,implements:null,static:!1,private:!1,defaultValue:null,dataType:ON,abstract:!1,parent:PN},AN={type:i.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:i.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},CN={like:!1,inferred:!1,id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:AN},wN={type:i.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},BN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"19a31727-1fba-40a5-be25-18e0f149d5cb",version:1,name:"Company Owner",description:"The person that owns the company",index:2,static:!1,implements:null,defaultValue:null,dataType:CN,private:!0,abstract:!1,parent:wN},MN={type:i.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:i.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},_N={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,isList:!0,asType:!1,parent:MN},VN={type:i.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},NN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,defaultValue:null,dataType:_N,implements:null,private:!0,static:!1,abstract:!1,parent:VN},LN={id:"company-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"company-prototype-primary-key-property-id",entityType:i.Property},GN={id:"company-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"company-prototype-primary-key-property-id",entityType:i.Property},$N={like:!1,inferred:!1,id:"company-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:GN},FN={id:"company-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",entityType:i.DefinitionEntity},UN={constant:!1,hidden:!1,required:!0,id:"company-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:pi,static:!1,index:4,defaultValue:{id:"company-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:LN,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:$N,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:FN},xN={type:i.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:i.Project,entityId:H},Ht={type:i.DefinitionEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[DN,Gd,BN,NN,UN],static:!1,abstract:!1,abstractMethods:[],methods:[D_,sN],extends:[],implements:[st,Ft],x:0,y:0,parent:xN},jN={type:i.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:i.Project,entityId:H},$d={type:i.FunctionDeclaration,id:"0f89260c-8c58-4639-8629-d9ea5ab40ba7",version:1,name:"Show popup",description:null,inputs:[],calls:[],returnStatements:[],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:jN};i.GenericReference,i.DataType;const kN={id:"cron-job-entity-expression-property-ref-id",type:i.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:i.Property},qN={like:!1,inferred:!1,id:"cron-job-entity-expression-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:kN},JN={id:"cron-job-entity-ref-id",type:i.GenericReference,entityId:"cron-job-entity-id",entityType:i.DefinitionEntity},WN={constant:!1,hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:i.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",defaultValue:null,dataType:qN,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:JN},YN={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:i.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:i.FunctionDeclaration},HN={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:i.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:i.FunctionDeclaration},zN={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:i.FunctionCall,declaration:$d,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[YN],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:HN},ZN={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:i.GenericReference,entityId:"cron-job-entity-id",entityType:i.DefinitionEntity},KN={id:"cron-job-entity-trigger-func-decl-id",version:1,type:i.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:ud,calls:[zN],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:ZN},XN={id:"cron-job-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},QN={id:"cron-job-entity-id",version:1,type:i.DefinitionEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[WN],static:!0,abstract:!1,abstractMethods:[],extends:[Os],implements:[],methods:[KN],x:0,y:0,parent:XN},eL={type:i.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:i.Project,entityId:H},tL={type:i.DefinitionEntity,id:"6f0908c2-09c6-4a8b-8f43-d2467fe6fb39",version:1,name:"Get bank all bank accounts",description:null,properties:[],static:!0,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[ra],x:0,y:0,parent:eL},io="f558fbf8-67de-4545-9804-6ae621e0b2d4",nL={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},rL={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},iL={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:rL},aL={id:"getCompanyByIdEndpointReachedEntityEventRef",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},sL={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},oL={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},lL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:oL},dL={constant:!0,id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:i.ArgumentDeclaration,writesValues:[],name:"Request headers",defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:sL,autogeneration:null,valueAsType:null},dataType:lL,implements:ed,required:!0,index:0,parent:aL},cL={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},uL={constant:!0,id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:i.ArgumentDeclaration,description:"A standarized text, without spaces that is added at the end of the domain and routes the request to a specific resource within the target server. For example: /api/users/123, /api/users/123/:name, /api/users/123/:name/:age.",version:1,name:"Path parameters",writesValues:[],defaultValue:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:nL,autogeneration:null,valueAsType:null},dataType:iL,implements:td,required:!0,index:1,parent:cL},pL={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},yL={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},hL={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},fL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,asType:!1,entity:J,parent:hL},mL={constant:!0,id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration",version:1,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",type:i.ArgumentDeclaration,writesValues:[],name:"Request query params",defaultValue:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:yL,autogeneration:null,valueAsType:null},dataType:fL,implements:nd,required:!0,index:2,parent:pL},TL={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},EL={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},RL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:EL},gL={constant:!0,id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:i.ArgumentDeclaration,writesValues:[],name:"Request body",defaultValue:null,dataType:RL,implements:rd,index:3,required:!0,parent:TL},bL={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},vL={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:bL},IL={id:"getCompanyByIdEndpointReturnStatementRef",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},DL={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseCodeReturnDeclaration",version:1,description:"A standarized number that represents the status of the response. 200 for OK, 404 for not found, 500 for server error, etc.",type:i.ReturnDeclaration,name:"Response code",defaultValue:null,dataType:vL,implements:id,readsValue:null,required:!0,index:0,parent:IL},SL={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},OL={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},PL={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:OL},AL={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},CL={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:i.ReturnDeclaration,name:"Response headers",defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:SL,autogeneration:null,valueAsType:null},dataType:PL,implements:ad,readsValue:null,required:!0,index:1,parent:AL},wL={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},BL={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:wL},ML={id:"getCompanyByIdEndpointReturnStatementRefThree",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},_L={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:i.ReturnDeclaration,name:"Response body",implements:sd,defaultValue:null,dataType:BL,readsValue:null,required:!0,index:2,parent:ML},VL={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:i.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:i.FunctionDeclaration},NL={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},LL={id:"getCompanyByIdEndpointReturnStatement",type:i.ReturnStatement,version:1,outputs:[DL,CL,_L],calledByError:[],calledByEntry:[VL],calledBySuccess:[],throws:null,x:0,y:0,parent:NL},GL={id:"endpointBuiltInBaseEntityRefFour",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:io},$L={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:i.FunctionDeclaration,inputs:[dL,uL,mL,gL],returnStatements:[LL],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:od,index:0,private:!1,x:0,y:0,parent:GL},FL={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointPathProperty"},UL={id:"getCompanyByIdEndpointPathPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointPathProperty"},xL={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:UL},jL={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:i.GenericReference,entityType:i.DefinitionEntity,entityId:io},kL={constant:!1,id:"getCompanyByIdEndpointPathProperty",hidden:!1,required:!0,name:"Path",version:1,type:i.Property,private:!1,abstract:!1,static:!0,implements:Xl,defaultValue:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.String,value:"/company/{id}",parent:FL,valueAsType:null,autogeneration:null},dataType:xL,index:1,description:"Path to the endpoint, for example /api/users, or /api/users/{id}, or /api/users/{id}/:name. The path can contain parameters, which are defined by curly braces, and will be passed to the endpoint event as variables with the same name.",parent:jL},qL={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointMethodProperty"},JL={id:"getCompanyByIdEndpointMethodPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointMethodProperty"},WL={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Pn,isList:!0,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:JL},YL={id:"getCompanyByIdEndpointBaseEntityRefThree",type:i.GenericReference,entityType:i.DefinitionEntity,entityId:io},HL={constant:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:i.Property,private:!1,abstract:!1,static:!0,implements:Ql,index:0,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,parent:qL,valueAsType:null,autogeneration:null},dataType:WL,description:null,parent:YL},zL={type:i.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:i.Project,entityId:H},ZL={type:i.DefinitionEntity,id:io,version:1,name:"Get given company data by id",description:null,properties:[kL,HL],methods:[$L],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[ra],x:0,y:0,parent:zL},KL={id:"plant-prototype-database-property-ref-id",type:i.GenericReference,entityId:"plant-prototype-database-property-id",entityType:i.Property},XL={id:"plant-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"plant-prototype-database-property-id",entityType:i.Property},QL={like:!1,inferred:!1,id:"plant-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:KL},e0={id:"plant-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"plant-entity-id",entityType:i.DefinitionEntity},t0={constant:!1,hidden:!1,required:!0,id:"plant-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"plant-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Bd,autogeneration:null,parent:XL},dataType:QL,description:"The database that the entity belongs to.",parent:e0},n0={type:i.GenericReference,id:"plant-name-property-ref-id",entityType:i.Property,entityId:"plant-name-property-id"},r0={like:!1,inferred:!1,id:"plant-name-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:n0},i0={type:i.GenericReference,id:"animal-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"plant-entity-id"},a0={constant:!1,hidden:!1,required:!0,type:i.Property,id:"plant-name-property-id",version:1,name:"Name",description:"The name of the plant",defaultValue:null,implements:null,static:!1,private:!1,index:0,dataType:r0,abstract:!1,parent:i0},s0={type:i.GenericReference,id:"plant-prototype-parent-ref-id",entityType:i.Project,entityId:H},o0={type:i.DefinitionEntity,id:"plant-entity-id",version:1,name:"Plant",description:"A living creature that is not an animal",abstract:!1,static:!1,abstractMethods:[],properties:[t0,a0],methods:[],extends:[],implements:[st],x:0,y:0,parent:s0},l0={id:"product-prototype-database-property-ref-id",type:i.GenericReference,entityId:"product-prototype-database-property-id",entityType:i.Property},d0={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"product-prototype-database-property-id",entityType:i.Property},c0={like:!1,inferred:!1,id:"product-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:l0},u0={id:"product-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",entityType:i.DefinitionEntity},p0={constant:!1,hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Md,autogeneration:null,parent:d0},dataType:c0,description:"The database that the entity belongs to.",parent:u0},y0={type:i.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:i.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},h0={like:!1,inferred:!1,id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:y0},f0={type:i.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:i.DefinitionEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},m0={constant:!1,hidden:!1,required:!0,type:i.Property,id:"d519c26a-15b8-40d8-ad09-13fa9342e9ba",version:1,name:"Name",description:"The name of the product",index:0,implements:null,static:!1,private:!1,defaultValue:null,dataType:h0,abstract:!1,parent:f0},T0={type:i.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:i.Project,entityId:H},E0={id:"product-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"product-prototype-primary-key-property-id",entityType:i.Property},R0={id:"product-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"product-prototype-primary-key-property-id",entityType:i.Property},g0={like:!1,inferred:!1,id:"product-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:R0},b0={id:"product-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",entityType:i.DefinitionEntity},v0={constant:!1,hidden:!1,required:!0,id:"product-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,defaultValue:{id:"product-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:E0,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:g0,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:b0},I0={type:i.DefinitionEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[st,Ft],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[v0,p0,m0],methods:[],x:0,y:0,parent:T0},Di="project-loaded-event-id",_n="get-bitcoin-price-http-call-operation-id",Gb="get-bitcoin-price-http-call-response-body-id",ao="validate-bitcoin-price-response-operation-ids",D0={type:i.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Gb},S0={type:i.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:i.Operation,entityId:ao},$b={id:"validate-bitcoin-data-to-validate-input-map-id",type:i.InputMap,version:1,declaration:fr.inputs[1],name:null,description:null,readsValue:D0,defaultValue:null,index:0,parent:S0},O0={type:i.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},P0={type:i.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:i.Operation,entityId:ao},A0={id:"validate-bitcoin-type-to-match-input-map-id",type:i.InputMap,version:1,declaration:fr.inputs[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:i.LiteralValue,version:1,name:C.EntityTemplate,valueAsType:vb,value:null,parent:O0,autogeneration:null},index:0,parent:P0},C0={type:i.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:i.Operation,entityId:ao},w0={id:"validate-bitcoin-validated-entity-output-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:fr.outputs[0],writesValues:[],index:0,parent:C0},B0={type:i.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:i.GlobalEvent,entityId:Di},M0={type:i.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:i.Operation,entityId:_n},_0={type:i.Operation,id:ao,version:1,declaration:fr,inputs:[A0,$b],outputs:[w0],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[M0],parent:B0},V0={type:i.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:i.FunctionCall,entityId:_n},N0={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:i.InputMap,declaration:ps,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:V0},L0={type:i.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:i.FunctionCall,entityId:_n},G0={type:i.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:i.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},$0={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:i.InputMap,declaration:ys,name:null,description:null,readsValue:null,defaultValue:{id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:i.LiteralValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:C.String,parent:G0,valueAsType:null,autogeneration:null},index:1,parent:L0},F0={type:i.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:i.FunctionCall,entityId:_n},U0={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:i.InputMap,declaration:hs,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:F0},x0={type:i.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:i.FunctionCall,entityId:_n},j0={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:i.InputMap,declaration:fs,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:x0},k0={type:i.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:i.FunctionCall,entityId:_n},q0={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:i.OutputMap,defaultValue:null,declaration:Ts,writesValues:[],index:1,parent:k0},J0={type:i.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:i.FunctionCall,entityId:_n},W0={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:i.OutputMap,defaultValue:null,declaration:ms,writesValues:[],index:0,parent:J0},Y0={type:i.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:i.FunctionCall,entityId:_n},H0={id:Gb,type:i.OutputMap,defaultValue:null,version:1,declaration:Es,writesValues:[$b],index:2,parent:Y0},z0={type:i.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:i.GlobalEvent,entityId:Di},Z0={type:i.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:i.GlobalEvent,entityId:Di},K0={type:i.Operation,id:_n,version:1,declaration:Xi,inputs:[N0,$0,U0,j0],outputs:[W0,q0,H0],process:null,parent:Z0,calledByError:[],calledByEntry:[z0],calledBySuccess:[],successCalls:[_0],errorCalls:[],error:null,x:0,y:0},X0={type:i.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:i.GlobalEvent,entityId:Di},Q0={type:i.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:i.GlobalEvent,entityId:Di},e1={process:null,type:i.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:$d,inputs:[],outputs:[],calledByError:[],calledByEntry:[X0],calledBySuccess:[],parent:Q0,successCalls:[],errorCalls:[],error:null,x:0,y:0},t1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:i.GenericReference,entityType:i.Project,entityId:H},n1={type:i.GlobalEvent,id:Di,version:1,name:Dn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:As,parent:t1,inputs:[],calls:[e1,K0],x:0,y:0},Ut="abort-execution-func-declaration-id",Sa="abort-execution-func-exec-var-declaration-id",Fd="abort-execution-func-small-wait-op-id",Ud="abort-execution-func-long-wait-op-id",Fb="abort-execution-func-long-wait-process-output-id",Ub="abort-execution-func-exec-var-instance-write-id",xb="abort-execution-func-long-wait-return-stmt-id",jb="abort-execution-func-small-wait-return-stmt-id",r1="abort-execution-func-exec-var-instance-abort-call-id",xd="abort-execution-func-exec-var-instance-abort-internal-call-id",jd="abort-execution-func-exec-second-wait-op-id",i1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},a1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},s1={like:!1,inferred:!1,id:"short-wait-return-statement-returned-hello-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:i1},o1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:i.ReturnStatement,entityId:jb},l1={constant:!0,isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:i.ReturnDeclaration,version:1,name:"Return 1",description:"A random string that is returned by the function",defaultValue:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:a1},dataType:s1,implements:null,readsValue:null,required:!0,index:0,parent:o1},d1={type:i.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:jd},c1={type:i.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},kb={type:i.ReturnStatement,id:jb,version:1,outputs:[l1],calledByError:[],calledByEntry:[],calledBySuccess:[d1],throws:null,x:0,y:0,parent:c1},u1={type:i.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"second-wait-argument-map-id"},p1={type:i.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:i.Operation,entityId:jd},y1={id:"second-wait-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:i.LiteralValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:C.Number,parent:u1},index:0,parent:p1},h1={type:i.GenericReference,id:"small-wait-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},f1={type:i.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:i.InternalCall,entityId:xd},m1={id:jd,type:i.Operation,version:1,declaration:Rt,inputs:[y1],outputs:[],process:null,successCalls:[kb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[f1],error:null,parent:h1},T1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:i.VariableInstance,entityId:Ub},E1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:i.Operation,entityId:Fd},R1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},g1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id-2",entityType:i.VariableDeclaration,entityId:Sa},b1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:i.InternalCall,entityId:xd},v1={id:r1,type:i.VariableInstance,version:1,declaration:g1,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[b1],parent:R1},qb={id:xd,type:i.InternalCall,version:1,inputs:[],outputs:[],declaration:pd,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[T1,E1],successCalls:[m1],errorCalls:[],error:null,index:0,parent:v1},I1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},D1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:i.VariableDeclaration,entityId:Sa},S1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:i.FunctionDeclaration,entityId:Ut},O1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:Sa},P1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:i.OutputMap,entityId:Fb},kd={id:Ub,type:i.VariableInstance,version:1,declaration:O1,inputs:[],outputs:[],defaultValue:null,calledByError:[],calledByEntry:[S1],calledBySuccess:[D1],successCalls:[qb],errorCalls:[],x:0,y:0,readsValue:P1,writesValues:[],internalCalls:[],parent:I1},A1={type:i.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:Sa};i.GenericReference,i.DataType;const C1={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ps,version:1,asType:!1,isList:!1,parent:A1},w1={type:i.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},B1={type:i.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},M1={constant:!0,required:!0,id:Sa,type:i.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",defaultValue:null,dataType:C1,inputs:[],outputs:[],calledByError:[],calledByEntry:[B1],calledBySuccess:[],successCalls:[kd],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:w1},_1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},V1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},N1={like:!1,inferred:!1,id:"long-wait-return-statement-returned-hello-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:_1},L1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:i.ReturnStatement,entityId:xb},G1={constant:!0,isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:i.ReturnDeclaration,version:1,name:"Return 2",description:"A random string that is returned by the function",implements:null,defaultValue:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:V1},dataType:N1,readsValue:null,required:!0,index:0,parent:L1},$1={type:i.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:Ud},F1={type:i.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},Jb={type:i.ReturnStatement,id:xb,version:1,outputs:[G1],calledByError:[],calledByEntry:[],calledBySuccess:[$1],throws:null,x:0,y:0,parent:F1},U1={type:i.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"long-argument-map-id"},Wb={type:i.GenericReference,id:"long-argument-map-parent-ref-id",entityType:i.Operation,entityId:Ud},x1={id:"long-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:i.LiteralValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:C.Number,parent:U1},index:0,parent:Wb},j1={type:i.GenericReference,id:"long-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},k1={type:i.GenericReference,id:"long-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},q1={id:Fb,type:i.OutputMap,version:1,defaultValue:null,declaration:Cs,writesValues:[kd],index:0,parent:Wb},J1={id:Ud,type:i.Operation,version:1,declaration:Rt,inputs:[x1],outputs:[],process:q1,successCalls:[Jb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[k1],calledBySuccess:[],error:null,parent:j1},W1={type:i.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"small-wait-argument-map-id"},Y1={type:i.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:i.Operation,entityId:Fd},H1={id:"small-wait-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:i.LiteralValue,version:1,value:500,valueAsType:null,autogeneration:null,name:C.Number,parent:W1},index:0,parent:Y1},z1={type:i.GenericReference,id:"small-wait-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},Z1={type:i.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},K1={id:Fd,type:i.Operation,version:1,declaration:Rt,inputs:[H1],outputs:[],process:null,successCalls:[qb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[Z1],calledBySuccess:[],error:null,parent:z1},X1={type:i.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:i.Project,entityId:H},Yb={id:Ut,type:i.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[Jb,kb],calls:[K1,M1,kd,J1],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:X1},Q1={type:i.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:i.Project,entityId:H},eG={id:"call-execution-abort-func-id",type:i.FunctionCall,version:1,declaration:Yb,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:Q1},so="manual-hello-world-loop-func-decl-id",Hb="manual-hello-world-loop-func-return-statement-id",fn="manual-hello-world-loop-id",Oa="manual-hello-world-loop-body-id",qd="manual-hello-world-loop-break-statement-id",Pa="manual-hello-world-loop-current-iteration-number-output-map-id",Jd="manual-hello-world-loop-previous-iterations-results-output-map-id",Wd="assembled-hello-world-text-output-id",tG="assembled-hello-world-list-output-id",Aa="iteration-number-is-equal-or-greater-than-10-condition-id",oo="join-hello-world-and-number-operation-id",lo="append-string-to-list-operation-id",zb="hello-world-loop-output-map-id",nG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:i.ReturnStatement,entityId:Hb},rG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:i.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},iG={like:!1,inferred:!1,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!0,asType:!1,parent:rG},aG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:i.OutputMap,entityId:zb},Zb={constant:!0,isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:i.ReturnDeclaration,name:"Results",description:null,defaultValue:null,dataType:iG,implements:null,readsValue:aG,required:!0,index:0,parent:nG},sG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:i.Loop,entityId:fn},oG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:i.FunctionDeclaration,entityId:so},Kb={type:i.ReturnStatement,id:Hb,version:1,outputs:[Zb],calledByError:[],calledByEntry:[],calledBySuccess:[sG],parent:oG,throws:null,x:0,y:0},lG={type:i.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:i.BreakStatement,entityId:qd},Xb={constant:!0,isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration result",description:null,defaultValue:null,dataType:null,readsValue:null,implements:null,required:!0,index:0,parent:lG},dG={type:i.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Pa},cG={type:i.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:i.BreakStatement,entityId:qd},Qb={constant:!0,isError:!1,id:"hello-world-loop-break-statement-counter-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration counter",description:null,implements:null,defaultValue:null,dataType:null,readsValue:dG,required:!0,index:1,parent:cG},uG={type:i.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:i.Condition,entityId:Aa},pG={type:i.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:i.Loop,entityId:fn},ev={type:i.BreakStatement,id:qd,version:1,outputs:[Xb,Qb],calledByError:[],calledByEntry:[],calledBySuccess:[uG],parent:pG,throws:null,x:0,y:0},yG={type:i.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:i.ContinueStatement,entityId:"hello-world-loop-continue-statement"},hG={type:i.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:i.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},fG={like:!1,inferred:!1,id:"hello-world-loop-continue-statement-output-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:hG},mG={type:i.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:i.OutputMap,entityId:Wd},tv={constant:!0,isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration result",description:null,defaultValue:null,implements:null,dataType:fG,readsValue:mG,required:!0,index:0,parent:yG},TG={type:i.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:i.Condition,entityId:Aa},EG={type:i.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:i.Loop,entityId:fn},nv={type:i.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[tv],calledBySuccess:[],calledByError:[TG],calledByEntry:[],parent:EG,throws:null,x:0,y:0};i.GenericReference,i.InputMap;const RG={type:i.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:i.Operation,entityId:lo},gG={type:i.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Jd},rv={id:"append-string-to-list-base-string-map-id",type:i.InputMap,version:1,declaration:Vl,name:null,description:null,readsValue:gG,defaultValue:null,index:0,parent:RG},bG={type:i.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:i.Operation,entityId:lo},vG={id:tG,type:i.OutputMap,version:1,defaultValue:null,writesValues:[Xb],declaration:Zi,index:0,parent:bG},IG={type:i.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:i.Condition,entityId:Aa},DG={type:i.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Wd},SG={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:lo},iv={id:"latest-string-to-add-input-map-id",version:1,type:i.InputMap,declaration:Nl,name:null,description:null,readsValue:DG,defaultValue:null,index:1,parent:SG},OG={type:i.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:i.FunctionDeclaration,entityId:fn},PG={type:i.Operation,id:lo,declaration:us,version:1,inputs:[rv,iv],outputs:[vG],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[IG],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:OG},AG={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:Oa},CG={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:i.Loop,entityId:fn},wG={type:i.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Pa},av={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:i.Condition,entityId:Aa},BG={id:"current-iteration-number-to-check-map-id",version:1,type:i.InputMap,declaration:hi.inputs[0],name:null,description:null,readsValue:wG,index:0,defaultValue:null,parent:av},MG={type:i.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:"max-num-iterations-value-map-id"},_G={id:"max-num-iterations-value-map-id",version:1,type:i.InputMap,declaration:hi.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:10,autogeneration:null,valueAsType:null,parent:MG},parent:av},VG={type:i.Condition,id:Aa,version:1,declaration:hi,inputs:[BG,_G],calledByError:[],calledByEntry:[AG],calledBySuccess:[],successCalls:[ev,PG],errorCalls:[nv],x:0,y:0,parent:CG},NG={type:i.GenericReference,id:"base-string-map-ref-id",entityType:i.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},LG={type:i.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:i.Operation,entityId:oo},GG={id:"join-hello-world-and-number-base-string-map-id",type:i.InputMap,version:1,declaration:ds,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:i.LiteralValue,version:1,value:"Hello world ",name:C.String,parent:NG,valueAsType:null,autogeneration:null},index:0,parent:LG},$G={type:i.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:i.Operation,entityId:oo},FG={id:Wd,type:i.OutputMap,version:1,defaultValue:null,writesValues:[iv,tv],declaration:Zi,index:0,parent:$G},UG={type:i.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:Oa},xG={type:i.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Pa},jG={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:oo},sv={id:"current-iteration-number-input-map-id",version:1,type:i.InputMap,declaration:cs,name:null,description:null,readsValue:xG,defaultValue:null,index:1,parent:jG},kG={type:i.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:i.FunctionDeclaration,entityId:fn},qG={type:i.Operation,id:oo,declaration:Ki,version:1,inputs:[GG,sv],outputs:[FG],process:null,calledByError:[],calledByEntry:[UG],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:kG},JG={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:Jd,entityType:i.ArgumentDeclaration},WG={like:!1,inferred:!1,id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,entity:null,asType:!1,parent:JG},YG={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:i.GenericReference,entityId:Oa,entityType:i.FunctionDeclaration},HG={constant:!0,id:Jd,type:i.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,defaultValue:null,dataType:WG,implements:null,writesValues:[rv],index:1,parent:YG},zG={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:i.GenericReference,entityId:Oa,entityType:i.FunctionDeclaration},ZG={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:Pa,entityType:i.ArgumentDeclaration};i.DataType;const KG={constant:!0,id:Pa,type:i.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,implements:jl,defaultValue:null,dataType:null,writesValues:[sv,Qb],index:0,parent:zG},XG={id:"manual-flow-loop-body-parent-ref-id",type:i.GenericReference,entityId:fn,entityType:i.Loop},QG={id:Oa,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[KG,HG],calls:[VG,qG],implements:kl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:XG},e$={type:i.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:i.Loop,entityId:fn},ov={id:"hello-world-loop-iteration-result-inline-output-declaration-id",version:1,type:i.ValueDescriptor,name:"Iteration result",defaultValue:null,description:null,dataType:null,required:!0,parentRelationType:A.FixedReturns,index:0,parent:e$},t$={type:i.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:i.Loop,entityId:fn},n$={type:i.OutputMap,id:zb,version:1,defaultValue:null,declaration:ov,writesValues:[Zb],index:0,parent:t$},r$={id:"manual-hello-world-loop-parent-ref-id",type:i.GenericReference,entityId:so,entityType:i.FunctionDeclaration},i$={id:"manual-hello-world-loop-called-by-ref-id",type:i.GenericReference,entityId:so,entityType:i.FunctionDeclaration},a$={id:fn,type:i.Loop,version:1,declaration:Rs,inputs:[],outputsDeclarations:[ov],outputs:[n$],body:QG,successCalls:[Kb],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[i$],calledBySuccess:[],breakStatements:[ev],continueStatements:[nv],x:0,y:0,parent:r$},s$={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},lv={type:i.FunctionDeclaration,id:so,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[a$],returnStatements:[Kb],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:s$},o$={type:i.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:i.Project,entityId:H},l$={id:"call-hello-world-loop-id",type:i.FunctionCall,version:1,declaration:lv,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:o$},Vn="company-dto-function-declaration-id",Yd="company-dto-func-declaration-argument-dcl-id",mn="company-dto-function-company-variable-id",nr="company-dto-function-company-dto-variable-id",Si="iterate-over-employee-list-loop-id",dv="iterate-over-employee-list-loop-employee-dto-output-map-id",Hd="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",co="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",cv="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",uv="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",pv="iterate-over-employee-list-continue-statement-id",uo="iterate-over-employee-list-loop-body-id",yv="company-dto-func-declaration-return-statement-id",hv="company-dto-func-declaration-return-decl-id",fv="company-dto-func-declaration-company-variable-id-output-map-id",mv="company-dto-func-declaration-company-variable-employess-output-map-id",Tv="company-dto-func-declaration-company-variable-name-output-map-id",d$="company-dto-func-declaration-company-dto-variable-input-map-id",c$="company-dto-func-declaration-company-dto-variable-employess-input-map-id",u$="company-dto-func-declaration-company-dto-variable-name-input-map-id",po="company-dto-func-declaration-owner-variable-id",p$="company-dto-func-declaration-company-dto-variable-owner-input-map-id",Ev="company-dto-func-declaration-company-variable-owner-output-map-id",Rv="company-dto-func-declaration-owner-variable-id-output-map-id",yo="company-dto-func-declaration-bank-account-variable-id",y$="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",gv="company-dto-func-declaration-company-variable-bank-account-output-map-id",bv="company-dto-func-declaration-bank-account-variable-id-output-map-id",h$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:hv},f$={like:!1,inferred:!1,id:"company-dto-func-returned-company-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,parent:h$},m$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:yv},T$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:nr},vv={constant:!0,isError:!1,id:hv,type:i.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",defaultValue:null,implements:null,dataType:f$,readsValue:T$,required:!0,index:0,parent:m$},E$={type:i.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:i.Operation,entityId:nr},R$={type:i.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},zd={type:i.ReturnStatement,id:yv,version:1,outputs:[vv],calledByError:[],calledByEntry:[],calledBySuccess:[E$],throws:null,x:0,y:0,parent:R$},g$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Rv},b$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Iv={id:p$,type:i.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:g$,parent:b$},v$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:bv},I$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Dv={id:y$,type:i.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:v$,parent:I$},D$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Tv},S$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Sv={id:u$,type:i.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:D$,parent:S$},O$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:dv},P$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Ov={id:c$,type:i.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:O$,parent:P$},A$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:fv},C$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Pv={id:d$,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:A$,parent:C$},w$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},B$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:i.VariableDeclaration,entityId:yo},M$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:i.VariableDeclaration,entityId:po},_$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:i.VariableDeclaration,entityId:Si},Zd={constant:!0,required:!0,id:nr,type:i.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[B$,M$,_$],successCalls:[zd],errorCalls:[],readsValue:null,writesValues:[vv],inputs:[Pv,Sv,Dv,Iv,Ov],outputs:[],internalCalls:[],parent:w$,x:0,y:0},Sr="employee-dto-func-declaration-id",Kd="employee-dto-func-declaration-argument-dcl-id",Av="employee-dto-func-declaration-return-statement-id",Cv="employee-dto-func-declaration-return-decl-id",Or="employee-dto-func-declaration-employee-variable-id",Pr="employee-dto-func-declaration-employee-dto-variable-id",ho="employee-dto-func-declaration-manager-variable-id",wv="employee-dto-func-declaration-employee-variable-id-output-map-id",Bv="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",Mv="employee-dto-func-declaration-employee-variable-department-output-map-id",_v="employee-dto-func-declaration-employee-variable-manager-output-map-id",Vv="employee-dto-func-declaration-manager-variable-id-output-map-id",V$="employee-dto-func-declaration-employee-dto-variable-input-map-id",N$="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",L$="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",G$="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",$$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:Cv},F$={like:!1,inferred:!1,id:"employee-dto-func-returned-employee-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,parent:$$},U$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:Av},x$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Nv={constant:!0,isError:!1,id:Cv,type:i.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",defaultValue:null,dataType:F$,implements:null,readsValue:x$,required:!0,index:0,parent:U$},j$={type:i.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:i.Operation,entityId:Pr},k$={type:i.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},Xd={type:i.ReturnStatement,id:Av,version:1,outputs:[Nv],calledByError:[],calledByEntry:[],calledBySuccess:[j$],throws:null,x:0,y:0,parent:k$},q$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Vv},J$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Lv={id:G$,type:i.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:q$,parent:J$},W$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Mv},Y$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Gv={id:L$,type:i.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:W$,parent:Y$},H$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Bv},z$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},$v={id:N$,type:i.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:H$,parent:z$},Z$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:wv},K$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Fv={id:V$,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:Z$,parent:K$},X$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},Q$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:i.VariableDeclaration,entityId:ho},eF={constant:!0,required:!0,id:Pr,type:i.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[Q$],successCalls:[Xd],errorCalls:[],readsValue:null,writesValues:[Nv],inputs:[Fv,$v,Gv,Lv],outputs:[],internalCalls:[],parent:X$,x:0,y:0},tF={type:i.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:ho},nF={id:Vv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Lv],parent:tF},rF={type:i.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:ho},iF={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:rF},aF={type:i.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:_v},sF={type:i.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr};i.GenericReference,i.VariableDeclaration;const Uv={constant:!0,required:!0,id:ho,type:i.VariableDeclaration,version:1,name:"Manager",description:"A variable holding an inherited manager",defaultValue:null,dataType:iF,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[eF],errorCalls:[],readsValue:aF,writesValues:[],inputs:[],outputs:[nF],internalCalls:[],parent:sF,x:0,y:0},oF={type:i.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},lF={id:_v,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[2],index:3,writesValues:[Uv],parent:oF},dF={type:i.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},cF={id:Mv,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[0],index:2,writesValues:[Gv],parent:dF},uF={type:i.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},pF={id:Bv,type:i.OutputMap,version:1,defaultValue:null,declaration:bt.properties[1],index:1,writesValues:[$v],parent:uF},yF={type:i.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},hF={id:wv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Fv],parent:yF},fF={type:i.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},mF={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:fF},TF={type:i.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},EF={type:i.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Kd},RF={type:i.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:i.FunctionDeclaration,entityId:Sr},xv={constant:!0,required:!0,id:Or,type:i.VariableDeclaration,version:1,name:"Company employee",dataType:mF,description:"A variable holding a company employee",calledByError:[],defaultValue:null,calledByEntry:[RF],calledBySuccess:[],successCalls:[Uv],errorCalls:[],readsValue:EF,writesValues:[],inputs:[],outputs:[hF,pF,cF,lF],internalCalls:[],parent:TF,x:0,y:0},gF={type:i.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Kd,entityType:i.ArgumentDeclaration},bF={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:Yt,asType:!1,isList:!1,like:!1,inferred:!1,parent:gF},vF={type:i.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:Sr,entityType:i.FunctionDeclaration},IF={constant:!0,type:i.ArgumentDeclaration,id:Kd,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,defaultValue:null,dataType:bF,index:0,writesValues:[xv],parent:vF},DF={type:i.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},Qd={type:i.FunctionDeclaration,id:Sr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[IF],calls:[xv],implements:null,returnStatements:[Xd],collapsed:!1,private:!1,x:0,y:0,parent:DF},SF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:cv,entityType:i.ReturnDeclaration},OF={like:!1,inferred:!1,id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:SF},PF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:i.GenericReference,entityId:uv,entityType:i.OutputMap},AF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:i.GenericReference,entityId:pv,entityType:i.ContinueStatement},jv={constant:!0,isError:!1,id:cv,type:i.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",defaultValue:null,readsValue:PF,dataType:OF,implements:null,required:!0,index:0,parent:AF},CF={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},wF={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},kv={id:pv,type:i.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[CF],outputs:[jv],throws:null,x:0,y:0,parent:wF},BF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},MF={id:uv,type:i.OutputMap,version:1,defaultValue:null,declaration:Xd.outputs[0],writesValues:[jv],index:0,parent:BF},_F={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Hd,entityType:i.ArgumentDeclaration},VF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},qv={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Qd.inputs[0],readsValue:_F,index:0,defaultValue:null,parent:VF},NF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},LF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},GF={id:co,type:i.FunctionCall,version:1,declaration:Qd,inputs:[qv],process:null,outputs:[MF],calledByError:[],calledByEntry:[NF],calledBySuccess:[],successCalls:[kv],errorCalls:[],error:null,x:0,y:0,parent:LF},$F={type:i.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Hd,entityType:i.ArgumentDeclaration},FF={like:!1,inferred:!1,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,isList:!1,asType:!1,parent:$F},UF={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},xF={constant:!0,id:Hd,type:i.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",defaultValue:null,dataType:FF,required:!0,implements:gs,index:0,writesValues:[qv],parent:UF},jF={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},kF={id:uo,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[xF],calls:[GF],implements:bs,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:jF},qF={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},JF={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:i.GenericReference,entityId:mv,entityType:i.OutputMap},Jv={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Wn.inputs[0],defaultValue:null,readsValue:JF,index:0,parent:qF},WF={id:"iterate-over-employee-list-loop-parent-ref-id",type:i.GenericReference,entityId:Vn,entityType:i.FunctionDeclaration},YF={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},HF={id:dv,type:i.OutputMap,version:1,defaultValue:null,declaration:Wn.outputs[0],writesValues:[Ov],index:0,parent:YF},zF={type:i.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:i.VariableDeclaration,entityId:mn},ZF={id:Si,type:i.Loop,version:1,declaration:Wn,inputs:[Jv],successCalls:[Zd],errorCalls:[],outputsDeclarations:[],outputs:[HF],body:kF,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[zF],breakStatements:[],continueStatements:[kv],error:null,x:0,y:0,parent:WF},KF={type:i.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:yo},XF={id:bv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Dv],parent:KF},QF={type:i.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:yo},eU={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:QF},tU={type:i.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:gv},nU={type:i.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn};i.GenericReference,i.VariableDeclaration;const Wv={constant:!0,required:!0,id:yo,type:i.VariableDeclaration,version:1,name:"Bank account",description:"A variable holding an inherited bank account",defaultValue:null,dataType:eU,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Zd],errorCalls:[],readsValue:tU,writesValues:[],inputs:[],outputs:[XF],internalCalls:[],parent:nU,x:0,y:0},rU={type:i.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:po},iU={id:Rv,type:i.OutputMap,version:1,declaration:Ft.properties[0],index:0,defaultValue:null,writesValues:[Iv],parent:rU},aU={type:i.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:po},sU={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:aU},oU={type:i.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:Ev},lU={type:i.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn};i.GenericReference,i.VariableDeclaration;const Yv={constant:!0,required:!0,id:po,type:i.VariableDeclaration,version:1,name:"Owner",dataType:sU,description:"A variable holding an inherited owner",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Zd],errorCalls:[],readsValue:oU,writesValues:[],inputs:[],outputs:[iU],internalCalls:[],parent:lU,x:0,y:0},dU={type:i.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},cU={id:Ev,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[2],index:4,writesValues:[Yv],parent:dU},uU={type:i.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},pU={id:gv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[2],index:3,writesValues:[Wv],parent:uU},yU={type:i.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},hU={id:Tv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[0],index:2,writesValues:[Sv],parent:yU},fU={type:i.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},mU={id:mv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[3],index:1,writesValues:[Jv],parent:fU},TU={type:i.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},EU={id:fv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Pv],parent:TU},RU={type:i.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},gU={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:RU},bU={type:i.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},vU={type:i.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Yd},IU={type:i.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:i.FunctionDeclaration,entityId:Vn},Hv={constant:!0,required:!0,id:mn,type:i.VariableDeclaration,version:1,name:"Company",dataType:gU,description:"A variable holding a company",defaultValue:null,calledByError:[],calledByEntry:[IU],calledBySuccess:[],successCalls:[Wv,Yv,ZF],errorCalls:[],readsValue:vU,writesValues:[],inputs:[],outputs:[EU,mU,hU,pU,cU],internalCalls:[],parent:bU,x:0,y:0},DU={type:i.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Yd,entityType:i.ArgumentDeclaration},SU={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Ht,asType:!1,isList:!1,like:!1,inferred:!1,parent:DU},OU={type:i.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:Vn,entityType:i.FunctionDeclaration},PU={constant:!0,type:i.ArgumentDeclaration,id:Yd,version:1,name:"Company",description:"The company to create a DTO for",defaultValue:null,required:!0,implements:null,dataType:SU,index:0,writesValues:[Hv],parent:OU},AU={type:i.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},ec={type:i.FunctionDeclaration,id:Vn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[PU],calls:[Hv],implements:null,index:null,returnStatements:[zd],collapsed:!1,private:!1,x:0,y:0,parent:AU},Ca="exec-in-parallel-operation-call-id",wa="exec-sequentially-operation-call-id",vt="concurrency-and-wait-function-declaration-id",zv="concurrency-and-wait-return-statement-id",Zv="concurrency-and-wait-return-declaration-id",tc="exec-in-parallel-argument-map-id",Kv="exec-sequentially-argument-map-id",nc="wait-for-2-seconds-operation-id",Xv="wait-for-2-seconds-argument-map-id",rc="map-company-dto-function-call-id",Qv="map-company-dto-function-call-company-dto-output-map-id",fo="company-dto-variable-one-id",ic="company-dto-variable-one-instance-id",eI="company-dto-variable-two-id",CU={type:i.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:Zv},wU={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:CU},BU={type:i.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:zv},MU={type:i.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:eI},tI={constant:!0,isError:!1,id:Zv,type:i.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",defaultValue:null,dataType:wU,implements:null,readsValue:MU,required:!0,index:0,parent:BU},_U={type:i.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:nc},VU={type:i.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},nI={type:i.ReturnStatement,id:zv,version:1,outputs:[tI],calledByError:[],calledByEntry:[],calledBySuccess:[_U],throws:null,x:0,y:0,parent:VU},NU={type:i.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:i.VariableInstance,entityId:ic},LU={type:i.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:i.VariableInstance,entityId:ic},GU={type:i.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},rI={constant:!0,required:!0,id:eI,type:i.VariableDeclaration,version:1,name:"Company DTO",description:null,defaultValue:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[NU],internalCalls:[],writesValues:[tI],readsValue:LU,x:0,y:0,parent:GU},$U={type:i.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:i.VariableDeclaration,entityId:fo},FU={type:i.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:fo},UU={type:i.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},xU={type:i.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:fo},iI={id:ic,type:i.VariableInstance,version:1,declaration:xU,inputs:[],outputs:[],successCalls:[rI],errorCalls:[],defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[$U],internalCalls:[],writesValues:[rI],readsValue:FU,x:0,y:0,parent:UU},jU={type:i.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:i.FunctionCall,entityId:rc},kU={type:i.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:i.OutputMap,entityId:Qv},qU={type:i.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},aI={constant:!0,required:!0,id:fo,type:i.VariableDeclaration,version:1,name:"Company DTO",description:null,defaultValue:null,dataType:null,inputs:[],outputs:[],successCalls:[iI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[jU],internalCalls:[],writesValues:[iI],readsValue:kU,x:0,y:0,parent:qU},sI={type:i.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:i.FunctionCall,entityId:rc},JU={id:"map-company-dto-function-call-company-input-map-id",type:i.InputMap,version:1,declaration:ec.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:sI},WU={id:Qv,type:i.OutputMap,version:1,defaultValue:null,declaration:zd.outputs[0],writesValues:[aI],index:0,parent:sI},YU={id:"map-company-dto-function-call-called-by-ref-id",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:vt},HU={id:"map-company-dto-function-call-parent-ref-id",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:vt},zU={id:rc,type:i.FunctionCall,version:1,declaration:ec,successCalls:[aI],process:null,errorCalls:[],inputs:[JU],outputs:[WU],calledByError:[],calledByEntry:[YU],calledBySuccess:[],parent:HU,x:0,y:0,error:null},ZU={type:i.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:wd},KU={type:i.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:i.VariableDeclaration,entityId:wd},XU={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:ln,version:1,asType:!1,isList:!1,parent:ZU},QU={type:i.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:i.Project,entityId:H},ac={constant:!0,required:!0,id:wd,type:i.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",defaultValue:{id:"last-timestamp-variable-default-value-id",type:i.LiteralValue,version:1,name:C.Date,value:null,autogeneration:{type:ze.CurrentDateAndTime,rangeStart:null,rangeEnd:null},valueAsType:null,parent:KU},dataType:XU,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:QU},e4={type:i.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:Xv},t4={type:i.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:i.Operation,entityId:nc},n4={id:Xv,type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:i.LiteralValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:C.Number,parent:e4},index:0,parent:t4},r4={type:i.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},i4={type:i.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:i.Operation,entityId:wa},a4={type:i.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:i.Operation,entityId:Ca},oI={id:nc,type:i.Operation,version:1,declaration:Qt,inputs:[n4],outputs:[],process:null,successCalls:[nI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[i4,a4],error:null,parent:r4},s4={type:i.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"wait-for-random-amount-input-map-id"},o4={type:i.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:i.Operation,entityId:"wait-for-random-amount-id"},l4={id:"wait-for-random-amount-input-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:i.LiteralValue,version:1,value:null,valueAsType:null,autogeneration:{type:ze.Random,rangeStart:1e3,rangeEnd:4e3},name:C.Number,parent:s4},index:0,parent:o4},d4={type:i.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:i.Project,entityId:H},Oi={id:"wait-for-random-amount-id",type:i.Operation,version:1,declaration:Qt,inputs:[l4],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:d4},sc="list-of-functions-variable-id",c4={type:i.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-argument-parent-ref-id",entityType:i.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},u4={id:"list-of-functions-variable-action-descriptor-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"Any input value that can be passed to the action",defaultValue:null,index:0,required:!1,dataType:null,parent:c4},p4={type:i.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-return-parent-ref-id",entityType:i.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},y4={id:"list-of-functions-variable-action-descriptor-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"Any output value that can be returned to the action",defaultValue:null,index:0,required:!1,dataType:null,parent:p4},h4={type:i.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:sc},f4={id:"list-of-functions-variable-action-descriptor-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[u4],error:null,outputs:[y4],parent:null},m4={type:i.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:i.VariableDeclaration,entityId:sc},T4={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:f4,asType:!1,isList:!0,parent:h4},E4={type:i.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt};i.GenericReference,i.InputMap;const R4={type:i.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:i.InputMap,entityId:Kv},g4={type:i.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:i.InputMap,entityId:tc},lI={constant:!0,required:!0,id:sc,type:i.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.ActionDescriptor,value:null,valueAsType:[Oi,Oi,Oi,Oi,Oi],autogeneration:null,parent:m4},dataType:T4,parent:E4,readsValue:null,writesValues:[R4,g4],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},b4={type:i.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:i.Operation,entityId:Ca},v4={type:i.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},I4={type:i.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:"exec-in-parallel-return-map-id"},D4={type:i.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:i.Operation,entityId:Ca},dI={id:"exec-in-parallel-result-variable-id",type:i.VariableInstance,version:1,declaration:ac,readsValue:I4,writesValues:[],defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[D4],successCalls:[],errorCalls:[],internalCalls:[],parent:v4,x:0,y:0},S4={id:"exec-in-parallel-return-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:Gl,writesValues:[dI],index:0,parent:b4},O4={type:i.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:i.Operation,entityId:Ca},P4={id:tc,type:i.InputMap,version:1,declaration:Ll,name:null,description:null,readsValue:lI,defaultValue:null,index:0,parent:O4},A4={type:i.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},C4={type:i.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:vt},w4={process:null,id:Ca,type:i.Operation,version:1,declaration:Qt,inputs:[P4],outputs:[S4],successCalls:[oI,dI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[C4],calledBySuccess:[],error:null,parent:A4},B4={type:i.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:i.Operation,entityId:wa},M4={type:i.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},_4={type:i.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:"exec-sequentially-return-map-id"},V4={type:i.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:i.Operation,entityId:wa},cI={id:"exec-sequentially-result-variable-id",type:i.VariableInstance,version:1,declaration:ac,readsValue:_4,defaultValue:null,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[V4],successCalls:[],errorCalls:[],internalCalls:[],parent:M4,x:0,y:0},N4={id:"exec-sequentially-return-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:Fl,writesValues:[cI],index:0,parent:B4},L4={type:i.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:i.Operation,entityId:wa},G4={id:Kv,type:i.InputMap,version:1,declaration:$l,name:null,description:null,readsValue:lI,defaultValue:null,index:0,parent:L4},$4={type:i.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},F4={type:i.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:vt},U4={id:wa,type:i.Operation,version:1,declaration:wn,inputs:[G4],process:null,outputs:[N4],successCalls:[oI,cI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[F4],calledBySuccess:[],error:null,parent:$4},x4={type:i.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:i.Project,entityId:H},j4={type:i.FunctionDeclaration,id:vt,version:1,name:"Execute with concurrency and wait",description:"Executes a hardcoded list of actions in parallel and waits for some time before ending the logic with some unrelated data payload as the result.",inputs:[],calls:[U4,w4,zU],returnStatements:[nI],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:x4},k4={type:i.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:i.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},q4={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,isList:!1,asType:!1,parent:k4},J4={type:i.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:i.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},W4={constant:!0,isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",defaultValue:null,implements:null,dataType:q4,readsValue:null,required:!0,index:0,parent:J4},Y4={type:i.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:i.FunctionDeclaration,entityId:"5059c093-eda2-4efc-b7b4-aaaadd4d44de"},H4={type:i.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:i.FunctionDeclaration,entityId:"5059c093-eda2-4efc-b7b4-aaaadd4d44de"},uI={type:i.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[W4],calledByError:[],calledByEntry:[H4],calledBySuccess:[],throws:null,x:0,y:0,parent:Y4},z4={type:i.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:i.Project,entityId:H},Z4={type:i.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[uI],index:null,implements:null,returnStatements:[uI],collapsed:!1,private:!1,x:0,y:0,parent:z4},oc="get-current-date-and-time-func-decl-id",pI="get-current-date-and-time-return-statement-id",lc="get-current-date-and-time-return-declaration-id",K4="get-current-date-and-time-return-declaration-data-type-id",X4={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:lc},Q4={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:lc},ex={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:K4,version:1,entity:ln,asType:!1,isList:!1,like:!1,inferred:!1,parent:Q4},tx={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:i.ReturnStatement,entityId:pI};i.ReturnDeclaration,i.LiteralValue,C.Date,ze.CurrentDateAndTime;const nx={type:i.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:oc},rx={type:i.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:oc};i.ReturnStatement;const ix={type:i.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:i.Project,entityId:H},ax={type:i.FunctionDeclaration,id:oc,version:1,name:"Get current date and time",description:"Generates and returns the current date and time at the time of the execution",inputs:[],calls:[],returnStatements:[],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:ix},yI="do-math-return-statement-id",dc="do-math-return-declaration-id",sx={type:i.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:i.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},ox={like:!1,inferred:!1,id:"do-math-func-var-to-return-one-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:sx},lx={type:i.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},dx={type:i.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:i.ReturnDeclaration,entityId:dc},cx={constant:!0,required:!0,type:i.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",defaultValue:null,dataType:ox,readsValue:null,writesValues:[dx],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:lx},ux={type:i.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:i.ReturnStatement,entityId:yI},px={type:i.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:i.ReturnDeclaration,entityId:dc},yx={like:!1,inferred:!1,id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:px},hx={constant:!0,isError:!1,id:dc,version:1,type:i.ReturnDeclaration,name:"Result",description:null,implements:null,defaultValue:null,dataType:yx,readsValue:cx,required:!0,index:0,parent:ux},fx={type:i.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},mx={type:i.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},hI={type:i.ReturnStatement,id:yI,version:1,outputs:[hx],calledByError:[],calledByEntry:[],calledBySuccess:[fx],parent:mx,throws:null,x:0,y:0},Tx={type:i.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:i.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},Ex={like:!1,inferred:!1,id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Tx},Rx={type:i.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},gx={type:i.GenericReference,id:"do-math-func-return-one-called-by",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},bx={type:i.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:i.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},fI={constant:!0,required:!0,type:i.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:Ex,description:null,defaultValue:null,readsValue:bx,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[gx],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:Rx},vx={type:i.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Ix={type:i.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:i.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},Dx={type:i.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:i.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},Sx={like:!1,inferred:!1,id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Dx},Ox={type:i.GenericReference,id:"do-math-func-return-two-called-by",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},mI={constant:!0,required:!0,type:i.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[Ox],successCalls:[],errorCalls:[],dataType:Sx,readsValue:Ix,writesValues:[],internalCalls:[],parent:vx,x:0,y:0},TI={type:i.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Px={type:i.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Ax={type:i.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Cx={type:i.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:i.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},EI={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:i.InputMap,declaration:Il,name:null,description:null,readsValue:Cx,defaultValue:null,index:0,parent:Ax},wx={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:i.OutputMap,version:1,defaultValue:null,declaration:Ol,writesValues:[fI,mI],index:0,parent:Px},Bx={type:i.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Mx={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:i.GenericReference,entityType:i.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},RI={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:i.InputMap,declaration:Dl,name:null,description:null,readsValue:Mx,defaultValue:null,index:1,parent:Bx},_x={type:i.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:ls,version:1,inputs:[EI,RI],outputs:[wx],calledByError:[],calledByEntry:[TI],calledBySuccess:[],process:null,successCalls:[hI,fI,mI],errorCalls:[],parent:TI,error:null,x:0,y:0},Vx={type:i.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:i.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},Nx={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:i.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:i.ArgumentDeclaration},gI={like:!1,inferred:!1,id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Nx},Lx={type:i.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:i.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},Gx={type:i.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},$x={type:i.GenericReference,id:"do-math-func-var-called-by-ref",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},bI={constant:!0,required:!0,id:"72a338d8-0183-4ca2-8760-227517854595",type:i.VariableDeclaration,version:1,name:"Z",description:null,defaultValue:{id:"do-math-func-argument-two-default-value-id",type:i.LiteralValue,version:1,value:1,name:C.Number,valueAsType:null,autogeneration:null,parent:Vx},dataType:gI,inputs:[],outputs:[],calledByError:[],calledByEntry:[$x],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:Lx,writesValues:[RI],internalCalls:[],x:0,y:0,parent:Gx},Fx={entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:i.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},Ux={constant:!0,id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:i.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",defaultValue:null,dataType:gI,implements:null,writesValues:[bI],required:!0,index:1,parent:Fx},xx={type:i.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:i.Project,entityId:H},jx={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},kx={type:i.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:i.VariableDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},qx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:i.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:i.ArgumentDeclaration},Jx={like:!1,inferred:!1,id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:qx},Wx={constant:!0,id:"d8895765-f705-457e-85fa-25d130926769",type:i.ArgumentDeclaration,version:1,name:"N",dataType:Jx,description:"The number to add",implements:null,defaultValue:{id:"do-math-func-argument-one-default-value-id",type:i.LiteralValue,version:1,value:5,name:C.Number,valueAsType:null,autogeneration:null,parent:kx},writesValues:[EI],required:!0,index:0,parent:jx},Yx={type:i.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[Wx,Ux],calls:[_x,bI],implements:null,index:null,collapsed:!1,returnStatements:[hI],private:!1,x:0,y:0,parent:xx},It="replace-bank-account-in-company-func-declaration-id",cc="company-entity-to-modify-arg-declaration-id",uc="account-number-to-create-arg-decl-id",Pi="company-main-variable-id",Ai="search-person-by-id-id",vI="new-bank-account-owner-arg-decl-id",II="search-person-by-id-output-declaration-id",pc="search-person-by-id-output-entity-map-id",Ba="person-not-empty-condition-id",mo="create-new-bank-account-instance-operation-id",DI="create-new-bank-account-instance-operation-output-entity-map-id",SI="company-bank-account-output-map-id",yc="old-bank-account-var-declaration-id",OI="old-bank-account-var-instance-id",PI="company-variable-instance-id",hc="delete-bank-account-internal-call-id",Ma="new-bank-account-data-variable-declaration-id",Hx={type:i.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},zx={type:i.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:i.InternalCall,entityId:hc},Zx={type:i.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:Pi},Kx={type:i.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:i.VariableInstance,entityId:PI},Xx={type:i.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:DI},AI={type:i.InputMap,id:"bank-account-input-map-id",version:1,readsValue:Xx,declaration:Gd,name:null,description:null,index:0,defaultValue:null,parent:Kx},Qx={type:i.VariableInstance,id:PI,version:1,defaultValue:null,declaration:Zx,inputs:[AI],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[zx],successCalls:[],errorCalls:[],internalCalls:[],parent:Hx,readsValue:null,writesValues:[],x:0,y:0},ej={type:i.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},tj={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:vi,asType:!1,isList:!1,like:!1,inferred:!1,parent:ej},nj={type:i.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:SI},rj={type:i.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},ij={type:i.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:i.VariableDeclaration,entityId:Pi},aj={type:i.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:i.Operation,entityId:mo};i.GenericReference,i.VariableInstance;const sj={type:i.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:i.VariableDeclaration,entityId:yc},oj={type:i.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:i.VariableDeclaration,entityId:yc},lj={type:i.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:i.FunctionDeclaration,entityId:It},dj={type:i.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:i.InternalCall,entityId:hc},cj={type:i.VariableInstance,id:OI,version:1,defaultValue:null,declaration:oj,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[dj],errorCalls:[],parent:lj,readsValue:null,writesValues:[],x:0,y:0},CI={process:null,type:i.InternalCall,id:hc,version:1,declaration:cd,index:0,successCalls:[Qx],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[aj,sj],parent:cj},wI={constant:!0,required:!0,type:i.VariableDeclaration,id:yc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:tj,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[ij],successCalls:[CI],internalCalls:[],errorCalls:[],parent:rj,readsValue:nj,writesValues:[],x:0,y:0},uj={type:i.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},pj={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Ht,asType:!1,isList:!1,like:!1,inferred:!1,parent:uj},yj={type:i.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:cc},hj={type:i.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},fj={type:i.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:It},mj={type:i.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},Tj={id:SI,version:1,type:i.OutputMap,defaultValue:null,declaration:Gd,index:0,parent:mj,writesValues:[wI]},BI={constant:!0,required:!0,type:i.VariableDeclaration,id:Pi,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",defaultValue:null,dataType:pj,inputs:[],outputs:[Tj],calledByError:[],calledByEntry:[fj],calledBySuccess:[],successCalls:[wI],errorCalls:[],parent:hj,internalCalls:[],readsValue:yj,writesValues:[],x:0,y:0},Ej={type:i.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ma},Rj={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:i.GenericReference,entityType:i.OutputMap,entityId:pc},MI={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:i.InputMap,declaration:null,name:"Account owner",description:null,readsValue:Rj,index:1,defaultValue:null,parent:Ej},gj={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:uc},bj={type:i.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ma},_I={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:i.InputMap,declaration:null,name:"Account number",description:null,readsValue:gj,defaultValue:null,index:0,parent:bj},VI={type:i.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:i.Operation,entityId:mo},vj={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:i.InputMap,declaration:hr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:i.LiteralValue,name:C.EntityTemplate,value:null,valueAsType:vi,autogeneration:null},parent:VI},Ij={type:i.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:Ma},NI={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:i.InputMap,declaration:hr.inputs[1],name:null,description:null,index:1,readsValue:Ij,defaultValue:null,parent:VI},Dj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:i.Operation,entityId:mo},Sj={id:DI,version:1,type:i.OutputMap,defaultValue:null,declaration:hr.outputs[0],index:0,writesValues:[AI],parent:Dj},Oj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.Condition,entityId:Ba},Pj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.VariableDeclaration,entityId:Ma},Aj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},LI={process:null,id:mo,type:i.Operation,version:1,declaration:hr,inputs:[vj,NI],error:null,outputs:[Sj],successCalls:[CI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[Pj,Oj],parent:Aj,x:0,y:0},Cj={type:i.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},wj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.Condition,entityId:Ba},Bj={constant:!0,required:!0,id:Ma,type:i.VariableDeclaration,version:1,defaultValue:null,inputs:[_I,MI],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[NI],successCalls:[LI],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[wj],calledByEntry:[],x:0,y:0,parent:Cj},Mj={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:i.ReturnDeclaration},_j={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:i.ReturnDeclaration},Vj={like:!1,inferred:!1,id:"person-not-found-thrown-error-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:_j},Nj={id:"person-not-found-thrown-error-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:i.ReturnStatement},Lj={constant:!0,isError:!0,id:"person-not-found-thrown-error-id",type:i.ReturnDeclaration,version:1,dataType:Vj,name:"Person not found error",description:"If the person entity was not found this error is outputted",defaultValue:{id:"person-not-found-thrown-error-datatype-default-value-id",type:i.LiteralValue,version:1,value:"Person not found",name:C.String,parent:Mj,valueAsType:null,autogeneration:null},parent:Nj,implements:null,required:!0,index:0,readsValue:null},Gj={id:"person-not-found-error-return-statement-called-by-ref-id",type:i.GenericReference,entityId:Ba,entityType:i.Condition},$j={id:"person-not-found-error-return-statement-parent-ref-id",type:i.GenericReference,entityId:It,entityType:i.FunctionDeclaration},Fj={id:"person-not-found-error-return-statement-id",type:i.ReturnStatement,version:1,throws:Lj,outputs:[],calledBySuccess:[],calledByError:[Gj],calledByEntry:[],x:0,y:0,parent:$j},Uj={type:i.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:i.Search,entityId:Ai},xj={type:i.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},jj={type:i.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:i.OutputMap,entityId:pc},kj={type:i.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:i.Condition,entityId:Ba},GI={id:"person-entity-to-check-map-id",version:1,type:i.InputMap,declaration:gr.inputs[0],name:null,description:null,readsValue:jj,index:0,defaultValue:null,parent:kj},qj={type:i.Condition,id:Ba,version:1,declaration:gr,inputs:[GI],calledByError:[],calledByEntry:[],calledBySuccess:[Uj],successCalls:[Bj,LI],errorCalls:[Fj],x:0,y:0,parent:xj},Jj={type:i.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:i.ValueDescriptor,entityId:II},Wj={like:!1,inferred:!1,id:"search-person-by-id-output-entity-declaration-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,asType:!1,entity:bt,parent:Jj},Yj={type:i.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:i.Search,entityId:Ai},$I={id:II,type:i.ValueDescriptor,version:1,defaultValue:null,dataType:Wj,name:"Found person",description:"The person entity that was found",parent:Yj,required:!0,index:0},Hj={type:i.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:i.Search,entityId:Ai},zj={type:i.OutputMap,id:pc,version:1,defaultValue:null,declaration:$I,parent:Hj,writesValues:[GI,MI],index:0},Zj={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:i.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:i.ArgumentDeclaration};i.DataType;const Kj={type:i.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:i.Search,entityId:Ai},FI={id:"search-person-by-id-input-declaration-id",type:i.ValueDescriptor,version:1,dataType:null,defaultValue:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",parentRelationType:A.FixedArguments,index:0,required:!0,parent:Kj},Xj={type:i.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:i.Search,entityId:Ai},Qj={id:"search-person-by-id-input-map-reads-value-ref-id",type:i.GenericReference,entityId:vI,entityType:i.ArgumentDeclaration},UI={type:i.InputMap,id:"search-person-by-id-input-map",version:1,declaration:FI,name:null,description:null,readsValue:Qj,defaultValue:null,parent:Xj,index:0},e8="SELECT * FROM Person WHERE id = your_id;",t8={type:i.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},n8={type:i.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:It},r8={type:i.Search,id:Ai,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:e8,inputsDeclarations:[FI],inputs:[UI],outputsDeclarations:[$I],outputs:[zj],calledByError:[],calledByEntry:[n8],calledBySuccess:[],error:null,successCalls:[qj],errorCalls:[],parent:t8,x:0,y:0};i.GenericReference,i.DataType;const i8={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:uc,entityType:i.ArgumentDeclaration},a8={like:!1,inferred:!1,id:"account-number-to-create-arg-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:i8},s8={entityType:i.FunctionDeclaration,entityId:It,type:i.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},o8={constant:!0,id:uc,type:i.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",defaultValue:null,dataType:a8,implements:null,writesValues:[_I],required:!0,index:1,parent:s8};i.GenericReference,i.DataType;const l8={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:i.ArgumentDeclaration},d8={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:An,isList:!1,asType:!1,parent:l8},c8={entityType:i.FunctionDeclaration,entityId:It,type:i.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},u8={constant:!0,id:vI,type:i.ArgumentDeclaration,version:1,name:"New account owner ID",description:"If it has changed, this is the new person entity, that owns of the bank account",defaultValue:null,dataType:d8,implements:null,writesValues:[UI],required:!1,index:1,parent:c8},p8={type:i.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:i.Project,entityId:H},y8={type:i.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:i.FunctionDeclaration,entityId:It};i.GenericReference,i.DataType;const h8={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:i.GenericReference,entityId:cc,entityType:i.ArgumentDeclaration},f8={like:!1,inferred:!1,id:"company-entity-to-modify-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:h8},m8={constant:!0,id:cc,type:i.ArgumentDeclaration,version:1,name:"Company",defaultValue:null,dataType:f8,implements:null,description:"The company to replace the bank account for",writesValues:[BI],required:!0,index:0,parent:y8},T8={type:i.FunctionDeclaration,id:It,version:1,name:"Replace bank account",description:"This action takes an existing company and data to create a new bank account entity. It then creates a bank account, deletes the old one, and updates the company with the new bank account",inputs:[m8,o8,u8],index:null,implements:null,calls:[r8,BI],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:p8},E8={type:i.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:i.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},R8={type:i.FunctionDeclaration,version:1,id:"6bedb217-f844-4332-af72-9626b2a32511",name:"Some library main function",description:null,inputs:[],calls:[],implements:null,collapsed:!0,index:null,returnStatements:[],private:!1,parent:E8,x:0,y:0},g8={type:i.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:i.Project,entityId:H},b8={type:i.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:i.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},v8={type:i.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[R8],events:[],implements:b8,parent:g8,x:0,y:0},fc="global-counted-test-loop-id",xI="global-counted-test-loop-body-id",jI="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",I8={type:i.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:jI,entityType:i.ArgumentDeclaration},D8={like:!1,inferred:!1,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:I8},S8={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:xI,entityType:i.FunctionDeclaration},O8={constant:!0,id:jI,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:D8,implements:Zl,required:!0,index:0,writesValues:[],parent:S8},P8={id:"global-counted-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:fc,entityType:i.Loop},A8={id:xI,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[O8],calls:[],implements:Kl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:P8},Ci="random-company-employee-test-variable-id",mc="manager-global-variable-id",kI="global-user-instance-id",Tn="employee-mapped-dto-variable-id",Ar="employee-mapped-dto-variable-instance-id",qI="random-employee-id-output-map-id",JI="random-employee-birth-date-output-map-id",WI="random-employee-department-output-map-id",YI="random-employee-manager-output-map-id",HI="manager-global-id-output-map-id",zI="global-user-instance-id-output-map-id",C8="employee-mapped-dto-requester-id-input-map-id",ZI="employee-mapped-dto-now-timestamp-input-map-id",w8="employee-mapped-dto-id-input-map-id",B8="employee-mapped-dto-birth-date-input-map-id",M8="employee-mapped-dto-department-input-map-id",_8="employee-mapped-dto-manager-input-map-id",V8={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:i.GenericReference,entityId:fc,entityType:i.Loop};i.GenericReference,i.VariableDeclaration;const N8={id:"global-counted-test-loop-iteration-number-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:ta.inputs[0],defaultValue:null,readsValue:null,index:0,parent:V8},L8={id:"global-counted-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},G8={id:"global-counted-test-loop-called-by-success-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},KI={id:fc,type:i.Loop,version:1,declaration:ta,inputs:[N8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:A8,calledByError:[],calledByEntry:[],calledBySuccess:[G8],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:L8},Tc="global-object-keys-test-loop-id",XI="global-object-keys-test-loop-body-id",QI="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",$8={type:i.GenericReference,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:QI,entityType:i.ArgumentDeclaration},F8={like:!1,inferred:!1,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:$8},U8={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:XI,entityType:i.FunctionDeclaration},x8={constant:!0,id:QI,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:F8,implements:Yl,required:!0,index:0,writesValues:[],parent:U8},j8={id:"global-object-keys-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:Tc,entityType:i.Loop},k8={id:XI,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[x8],calls:[],implements:li,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:j8},q8={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:i.GenericReference,entityId:Tc,entityType:i.Loop},J8={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Tn,entityType:i.VariableDeclaration},eD={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:li.inputs[0],defaultValue:null,readsValue:J8,index:0,parent:q8},W8={id:"global-object-keys-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Y8={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},H8={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:i.GenericReference,entityId:Tn,entityType:i.VariableDeclaration},Ec={id:Tc,type:i.Loop,version:1,declaration:li,inputs:[eD],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:k8,calledByError:[],calledByEntry:[],calledBySuccess:[H8,Y8],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:W8},Rc="global-object-values-test-loop-id",tD="global-object-values-test-loop-body-id",nD="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",z8={type:i.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:nD,entityType:i.ArgumentDeclaration},Z8={like:!1,inferred:!1,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:z8},K8={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:tD,entityType:i.FunctionDeclaration},X8={constant:!0,id:nD,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:Z8,implements:Hl,required:!0,index:0,writesValues:[],parent:K8},Q8={id:"global-object-values-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:Rc,entityType:i.Loop},ek={id:tD,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[X8],calls:[],implements:di,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Q8},tk={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:i.GenericReference,entityId:Rc,entityType:i.Loop},nk={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},rD={id:"global-object-values-test-loop-iteration-object-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:di.inputs[0],defaultValue:null,readsValue:nk,index:0,parent:tk},rk={id:"global-object-values-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},ik={id:"global-object-values-test-loop-called-by-success-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableInstance},iD={id:Rc,type:i.Loop,version:1,declaration:di,inputs:[rD],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:ek,calledByError:[],calledByEntry:[],calledBySuccess:[ik],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:rk},gc="global-test-iterate-over-string-loop-id",bc="global-test-iterate-over-string-loop-body-id",To="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",aD="global-test-iterate-over-string-loop-iteration-list-input-map-id",ak={type:i.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:To,entityType:i.ArgumentDeclaration},sk={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:ak},ok={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:bc,entityType:i.FunctionDeclaration},lk={constant:!0,id:To,type:i.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",defaultValue:null,dataType:sk,implements:ql,required:!0,index:1,writesValues:[],parent:ok},dk={type:i.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:To,entityType:i.ArgumentDeclaration},ck={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:dk},uk={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:bc,entityType:i.FunctionDeclaration},pk={constant:!0,id:To,type:i.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",defaultValue:null,dataType:ck,implements:Jl,required:!0,index:0,writesValues:[],parent:uk},yk={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:i.GenericReference,entityId:gc,entityType:i.Loop},hk={id:bc,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[pk,lk],calls:[],implements:Wl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:yk},fk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:gc,entityType:i.Loop},mk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:i.GenericReference,entityId:aD,entityType:i.InputMap},Tk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:i.LiteralValue,name:C.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:ze.Random,rangeStart:4,rangeEnd:5},parent:mk},Ek={id:aD,type:i.InputMap,version:1,name:null,description:null,declaration:ea.inputs[0],defaultValue:Tk,readsValue:null,index:0,parent:fk},Rk={id:"global-test-iterate-over-string-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},gk={id:gc,type:i.Loop,version:1,declaration:ea,inputs:[Ek],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:hk,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Rk},vc="iterate-over-list-loop-id",sD="iterate-over-list-loop-body-id",oD="iterate-over-list-loop-body-current-iteration-value-argument-declaration-id",bk={type:i.GenericReference,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:oD,entityType:i.ArgumentDeclaration},vk={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:bk},Ik={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:sD,entityType:i.FunctionDeclaration},Dk={constant:!0,id:oD,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:vk,implements:gs,required:!0,index:0,writesValues:[],parent:Ik},Sk={id:"iterate-over-list-loop-body-parent-ref-id",type:i.GenericReference,entityId:vc,entityType:i.Loop},Ok={id:sD,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Dk],calls:[],implements:bs,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Sk},Pk={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:vc,entityType:i.Loop},Ak={id:"iterate-over-list-loop-iteration-list-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Wn.inputs[0],defaultValue:null,readsValue:null,index:0,parent:Pk},Ck={id:"iterate-over-list-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},wk={id:vc,type:i.Loop,version:1,declaration:Wn,inputs:[Ak],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Ok,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Ck},Bk=`SELECT
|
|
1
|
+
(function(d,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(d=typeof globalThis<"u"?globalThis:d||self,i(d["@elyx-code/project-logic-tree"]={}))})(this,function(d){"use strict";var SJ=Object.defineProperty;var OJ=(d,i,U)=>i in d?SJ(d,i,{enumerable:!0,configurable:!0,writable:!0,value:U}):d[i]=U;var c=(d,i,U)=>(OJ(d,typeof i!="symbol"?i+"":i,U),U);var i=(r=>(r.DefinitionEntity="definition-entity",r.BuiltInBaseEntity="built-in-base-entity",r.Project="project",r.InstalledProject="installed-project",r.GlobalEvent="global-event",r.DataType="data-type",r.FunctionCall="function-call",r.FunctionDeclaration="function-declaration",r.ActionDescriptor="action-descriptor",r.ValueDescriptor="value-descriptor",r.ArgumentDeclaration="argument-declaration",r.InputMap="input-map",r.ReturnStatement="return-statement",r.BreakStatement="break-statement",r.ContinueStatement="continue-statement",r.ReturnDeclaration="return-declaration",r.OutputMap="output-map",r.PrimitiveEntity="primitive-entity",r.LiteralValue="literal-value",r.Property="property",r.Operation="operation",r.Condition="condition",r.VariableDeclaration="variable-declaration",r.VariableInstance="variable-instance",r.Search="search",r.Loop="loop",r.InternalCall="internal-call",r.GenericReference="generic-reference",r))(i||{}),U=(r=>(r.HTTP_ENDPOINT="BUILT_IN_HTTP_ENDPOINT_ENTITY",r.RELATIONAL_DATABASE="BUILT_IN_RELATIONAL_DATABASE_ENTITY",r.PERSISTED_ENTITY="BUILT_IN_PERSISTED_ENTITY_ENTITY",r.CRON_JOB="BUILT_IN_CRON_JOB_ENTITY",r.EXECUTION="BUILT_IN_EXECUTION_ENTITY",r.KEY_VALUE_PARAM="BUILT_IN_KEY_VALUE_PARAM_ENTITY",r))(U||{}),ze=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(ze||{}),C=(r=>(r.EntityTemplate="entity-template",r.ActionDescriptor="action-descriptor",r.String="string",r.Number="number",r.Boolean="boolean",r.Null="null",r.Enum="enum",r.KeyValue="key-value",r.Date="date",r.UUID="uuid",r.File="file",r.Untyped="untyped",r))(C||{}),Ge=(r=>(r.Addition="addition",r.Subtraction="subtraction",r.Multiplication="multiplication",r.Division="division",r.Remainder="remainder",r.Exponentiation="exponentiation",r))(Ge||{}),re=(r=>(r.Join="string-join",r.Split="string-split",r.DeleteLast="string-delete-last",r.DeleteFirst="string-delete-first",r.DeleteIndex="string-delete-index",r.AddIndex="string-add-index",r.ReplaceFirst="string-replace-first",r.ReplaceLast="string-replace-last",r.ReplaceIndex="string-replace-index",r.ReplaceSingleMatch="string-replace-single-match",r.ReplaceAllMatches="string-replace-all-matches",r.GetIndex="string-get-index",r.GetFirst="string-get-first",r.GetLast="string-get-last",r.Append="string-append",r.Prepend="string-prepend",r))(re||{}),X=(r=>(r.Join="list-join",r.Split="list-split",r.DeleteLast="list-delete-last",r.DeleteFirst="list-delete-first",r.DeleteIndex="list-delete-index",r.AddIndex="list-add-index",r.ReplaceFirst="list-replace-first",r.ReplaceLast="list-replace-last",r.ReplaceIndex="list-replace-index",r.ReplaceSingleMatch="list-replace-single-match",r.ReplaceAllMatches="list-replace-all-matches",r.GetIndex="list-get-index",r.GetFirst="list-get-first",r.GetLast="list-get-last",r.Append="list-append",r.Prepend="list-prepend",r))(X||{}),Ve=(r=>(r.Parallel="parallel",r.Sequential="sequential",r.Wait="wait",r))(Ve||{}),Ne=(r=>(r.CreateNewInstance="create-new-instance",r.Validate="validate",r))(Ne||{}),dt=(r=>(r.HttpRequest="base-http-request",r))(dt||{}),qe=(r=>(r.Equal="equal",r.NotEqual="not-equal",r.And="and",r.Or="or",r.LessThan="less-than",r.MoreThan="more-than",r.LessThanOrEqual="less-than-or-equal",r.MoreThanOrEqual="more-than-or-equal",r))(qe||{}),Jt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Jt||{}),k=(r=>(r.ManualFlow="manual-flow-loop",r.Counted="counted-loop",r.List="list-loop",r.ObjectKeys="object-keys-loop",r.ObjectValues="object-values-loop",r.String="string-loop",r))(k||{}),A=(r=>(r.FixedArguments="fixed-arguments",r.FixedReturns="fixed-returns",r.ReturnedError="returned-error",r.OngoingProcessExecution="ongoing-process-execution",r.DynamicArgument="dynamic-argument-types",r.DynamicReturn="dynamic-return-types",r))(A||{}),et=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(et||{}),Dn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(Dn||{}),Gt=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Gt||{}),ri=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(ri||{});const Sn=[i.VariableDeclaration,i.VariableInstance,i.InputMap,i.ReturnDeclaration],Ze=[i.VariableDeclaration,i.VariableInstance,i.ArgumentDeclaration,i.OutputMap],hp=[...Sn,...Ze],Fe=[i.VariableDeclaration,i.VariableInstance],fp=[i.FunctionDeclaration,i.Condition,i.Loop,i.Operation,i.FunctionCall,i.Search,i.InternalCall,i.GlobalEvent,i.DefinitionEntity,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.VariableDeclaration,i.VariableInstance,i.LiteralValue,i.ActionDescriptor,i.ValueDescriptor,i.Property,i.DataType,i.InstalledProject,i.ArgumentDeclaration,i.InputMap,i.OutputMap,i.ReturnDeclaration],mp=[i.FunctionDeclaration,i.Property,i.ArgumentDeclaration,i.ReturnDeclaration],gl=[i.FunctionCall,i.VariableInstance,i.InputMap,i.OutputMap,i.InternalCall],FP=[...gl,i.Condition,i.Loop,i.Operation,i.Condition],ii=[i.GlobalEvent],Je=[i.Operation,i.FunctionCall,i.Condition,i.Search,i.VariableDeclaration,i.VariableInstance,i.InternalCall,i.Loop],bl=[i.Operation,i.FunctionCall,i.Condition,i.Search,i.VariableDeclaration,i.VariableInstance,i.Loop],We=[i.FunctionDeclaration,...ii],Xt=[...Je,i.ReturnStatement,i.BreakStatement,i.ContinueStatement],vl=[...bl,i.ReturnStatement,i.BreakStatement,i.ContinueStatement],on=[...Je,...We],Tp=[...bl,...We],UP=[...Xt,...We],xP=[...vl,...We],pt=[...We,i.Loop],xe=[i.ReturnStatement,i.BreakStatement,i.ContinueStatement],jP=[i.DefinitionEntity,i.BuiltInBaseEntity,i.Project,i.InstalledProject,i.GlobalEvent,i.DataType,i.FunctionCall,i.FunctionDeclaration,i.ActionDescriptor,i.ValueDescriptor,i.ArgumentDeclaration,i.InputMap,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.ReturnDeclaration,i.OutputMap,i.PrimitiveEntity,i.LiteralValue,i.Property,i.Operation,i.Condition,i.VariableDeclaration,i.VariableInstance,i.Search,i.Loop,i.InternalCall],ss=[i.DefinitionEntity,i.GlobalEvent,i.FunctionDeclaration,i.FunctionCall,i.VariableDeclaration,i.VariableInstance,i.Operation,i.Condition,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.InstalledProject,i.Loop,i.Search],Ep=[i.DefinitionEntity,i.FunctionDeclaration,i.ArgumentDeclaration,i.ReturnDeclaration,i.Property,i.VariableDeclaration,i.Search,i.Project,i.InstalledProject,i.ActionDescriptor,i.ValueDescriptor],Jn=[i.BuiltInBaseEntity,i.PrimitiveEntity],Rp=[i.DefinitionEntity,i.FunctionDeclaration,i.ArgumentDeclaration,i.ReturnDeclaration,i.Property,i.VariableDeclaration,i.GlobalEvent,i.Search,i.Project,i.InstalledProject,i.ActionDescriptor,i.ValueDescriptor,i.InputMap,i.OutputMap,i.FunctionCall,i.Operation,i.Condition,i.ReturnStatement,i.BreakStatement,i.ContinueStatement,i.VariableInstance,i.LiteralValue,i.InternalCall];var os=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(os||{});const _={[i.PrimitiveEntity]:{[C.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[C.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[C.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[C.KeyValue]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[C.Enum]:{id:"9542b8b4-2642-4eee-9db9-def7963a17a0",properties:{options:{id:"00ccfcae-2104-45ef-bf6c-50ddccd74286",dataType:{id:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",defaultValue:{id:"enum-options-property-data-type-default-value-id"}}}}},[C.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[C.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[C.Null]:{id:"7d698f34-5a89-4aab-846b-07ef3843b8c4",properties:{}},[C.Untyped]:{id:"4044a018-818e-49d7-bf9a-c3dd1fff2102",properties:{}}},[i.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[i.BuiltInBaseEntity]:{[U.KEY_VALUE_PARAM]:{id:U.KEY_VALUE_PARAM},[U.HTTP_ENDPOINT]:{id:U.HTTP_ENDPOINT,properties:{method:{id:"http-endpoint-built-in-method-property-id"},path:{id:"http-endpoint-built-in-path-property-id"},cors:{id:"http-endpoint-built-in-cors-property-id"}}},[U.PERSISTED_ENTITY]:{id:U.PERSISTED_ENTITY,properties:{database:{id:"persisted-built-in-base-entity-database-property-id"},primaryKey:{id:"persisted-built-in-base-entity-primary-key-property-id"}}},[U.RELATIONAL_DATABASE]:{id:U.RELATIONAL_DATABASE,properties:{identifier:{id:"relational-database-built-in-base-entity-identifier-property-id"},username:{id:"relational-database-built-in-base-entity-username-property-id"},password:{id:"relational-database-built-in-base-entity-password-property-id"},minSize:{id:"relational-database-built-in-base-entity-min-size-property-id"},default:{id:"relational-database-built-in-base-entity-default-property-id"},autoscaling:{id:"relational-database-built-in-base-entity-autoscaling-property-id"}}},[U.CRON_JOB]:{id:U.CRON_JOB,properties:{expression:{id:"cron-job-built-in-base-entity-expression-property-id"}}}},[i.Operation]:{[re.Join]:{id:re.Join,inputs:{separator:{id:"join-strings-separator-input-id"},first:{id:"join-strings-first-string-input-id"},second:{id:"join-strings-second-string-input-id"},dynamicString:{id:"join-strings-dynamic-string-input-id"}},outputs:{result:{id:"join-strings-result-string-return-delaration-id"},error:{id:"join-strings-error-return-delaration-id"}}},[re.Split]:{id:re.Split,inputs:{stringValue:{id:"split-string-string-input-id"},indexLocation:{id:"split-string-index-input-id"}},outputs:{firstPartResult:{id:"split-string-first-part-result-string-return-delaration-id"},secondPartResult:{id:"split-string-second-part-result-string-return-delaration-id"},error:{id:"split-string-error-return-delaration-id"}}},[Ge.Addition]:{id:Ge.Addition,inputs:{firstSummand:{id:"number-addition-first-summand-number-input-id"},secondSummand:{id:"number-addition-second-summand-number-input-id"},dynamicSummand:{id:"number-addition-dynamic-summand-number-input-id"}},outputs:{result:{id:"number-addition-result-number-return-delaration-id",dataType:{id:"number-addition-result-number-data-type-id"}},error:{id:"number-addition-error-return-delaration-id"}}},[Ge.Subtraction]:{id:Ge.Subtraction,inputs:{minuend:{id:"number-subtraction-minuend-number-input-id"},subtrahend:{id:"number-subtraction-subtrahend-number-input-id"},dynamicSubtrahend:{id:"number-subtraction-dynamic-subtrahend-number-input-id"}},outputs:{result:{id:"number-subtraction-result-number-return-delaration-id",dataType:{id:"number-subtraction-result-number-data-type-id"}},error:{id:"number-subtraction-error-return-delaration-id"}}},[dt.HttpRequest]:{id:dt.HttpRequest,inputs:{url:{id:"http-request-url-input-id"},query:{id:"http-request-query-input-id"},method:{id:"http-request-method-input-id"},headers:{id:"http-request-headers-input-id"},body:{id:"http-request-body-string-input-id"}},outputs:{code:{id:"http-response-code-return-delaration-id"},body:{id:"http-response-body-return-delaration-id"},headers:{id:"http-response-headers-return-delaration-id"},error:{id:"http-request-error-return-delaration-id"}}},[Ne.Validate]:{id:Ne.Validate,inputs:{entityToMatch:{id:"validate-data-entity-to-match-input-id"},dataToValidate:{id:"validate-data-data-to-validate-input-id"}},outputs:{outputEntity:{id:"validate-data-output-entity-return-delaration-id"},error:{id:"validate-data-error-return-delaration-id"}}},[Ve.Parallel]:{id:Ve.Parallel,inputs:{listOfActions:{id:"parallel-execution-list-of-actions-input-id"}},outputs:{results:{id:"parallel-execution-results-output-id",dataType:{id:"parallel-execution-results-data-type-id"}},error:{id:"parallel-execution-error-output-id"}}}},[i.Loop]:{[k.List]:{id:k.List,inputs:{list:{id:"iterate-over-list-loop-list-input-id"}},outputs:{results:{id:"iterate-over-list-loop-output-id"}},body:{id:"iterate-over-list-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-list-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-list-loop-current-value-input-id"}}}},[k.String]:{id:k.String,inputs:{string:{id:"iterate-over-string-loop-string-input-id"}},outputs:{results:{id:"iterate-over-string-loop-output-id"}},body:{id:"iterate-over-string-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-string-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-string-loop-current-value-input-id"}}}},[k.ObjectKeys]:{id:k.ObjectKeys,inputs:{object:{id:"iterate-over-object-keys-loop-object-input-id"}},outputs:{results:{id:"iterate-over-object-keys-loop-output-id"}},body:{id:"iterate-over-object-keys-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-object-keys-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-object-keys-loop-current-value-input-id"}}}},[k.ObjectValues]:{id:k.ObjectValues,inputs:{object:{id:"iterate-over-object-values-loop-object-input-id"}},outputs:{results:{id:"iterate-over-object-values-loop-output-id"}},body:{id:"iterate-over-object-values-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-object-values-loop-iteration-number-input-id"},currentValue:{id:"iterate-over-object-values-loop-current-value-input-id"}}}},[k.ManualFlow]:{id:k.ManualFlow,inputs:{},outputs:{results:{id:"manual-flow-loop-output-id"}},body:{id:"manual-flow-loop-body-descriptor-id",inputs:{iterationNumber:{id:"iterate-over-manual-flow-loop-iteration-number-input-id"}}}},[k.Counted]:{id:k.Counted,inputs:{number:{id:"counted-loop-number-input-id"}},outputs:{results:{id:"counted-loop-output-id"}},body:{id:"counted-loop-body-descriptor-id",inputs:{iterationNumber:{id:"counted-loop-iteration-number-input-id"}}}}},[i.Condition]:{[qe.MoreThanOrEqual]:{id:qe.MoreThanOrEqual,inputs:{leftHand:{id:"condition-more-than-or-equal-left-hand-input-id",dataType:{id:"condition-more-than-or-equal-left-hand-data-type-id"}},rightHand:{id:"condition-more-than-or-equal-right-hand-input-id",dataType:{id:"condition-more-than-or-equal-right-hand-data-type-id"}}}},[Jt.NotEmpty]:{id:Jt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[i.GlobalEvent]:{[Dn.PROJECT_PUBLICATION_COMPLETED]:{id:Dn.PROJECT_PUBLICATION_COMPLETED}}},$t=_[i.PrimitiveEntity],J={type:i.PrimitiveEntity,id:$t.string.id,description:"A string of characters.",version:1,name:C.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},On={type:i.PrimitiveEntity,id:$t.boolean.id,description:"A 'true' or 'false' value.",version:1,name:C.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},ee={type:i.PrimitiveEntity,id:$t.number.id,description:"A number value.",version:1,name:C.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},gp={type:i.PrimitiveEntity,id:$t.null.id,description:"An explicitly empty value.",version:1,name:C.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},it={type:i.PrimitiveEntity,id:$t.untyped.id,description:"Data of any type that isn't known in advance.",version:1,name:C.Untyped,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},bp={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:i.GenericReference,entityId:$t.enum.properties.options.id,entityType:i.Property},vp={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:i.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:i.Property},Ip={like:!1,inferred:!1,id:$t.enum.properties.options.dataType.id,version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:vp},Dp={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:i.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:i.PrimitiveEntity},Sp={constant:!1,hidden:!1,required:!0,id:$t.enum.properties.options.id,name:"Options",version:1,type:i.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,defaultValue:{id:$t.enum.properties.options.dataType.defaultValue.id,type:i.LiteralValue,version:1,name:C.KeyValue,autogeneration:null,value:[],valueAsType:null,parent:bp},dataType:Ip,description:"Options for the enum. Each option is a text value.",parent:Dp},Pn={type:i.PrimitiveEntity,id:$t.enum.id,description:"A set of text options to choose from.",version:1,name:C.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Sp],methods:[]},ln={type:i.PrimitiveEntity,id:$t.date.id,description:"A date and time value.",version:1,name:C.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},An={type:i.PrimitiveEntity,id:$t.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:C.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[J],properties:[],methods:[]},ai={type:i.PrimitiveEntity,id:$t[C.KeyValue].id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:C.KeyValue,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Op=[J,On,ee,gp,it,Pn,ln,An,ai],dn=_[i.Operation][Ge.Addition],Pp={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:dn.inputs.firstSummand.id,entityType:i.ValueDescriptor},Ap={like:!1,inferred:!1,id:"number-addition-first-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Pp},Cp={type:i.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:dn.inputs.secondSummand.id,entityType:i.ValueDescriptor},wp={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Cp},Bp={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:dn.outputs.result.id,entityType:i.ValueDescriptor},Mp={like:!1,inferred:!1,id:dn.outputs.result.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Bp},_p={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ge.Addition,entityType:i.ActionDescriptor},Il={id:dn.inputs.firstSummand.id,type:i.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",defaultValue:null,dataType:Ap,required:!0,parentRelationType:A.FixedArguments,index:0,parent:_p},Vp={type:i.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Ge.Addition,entityType:i.ActionDescriptor},Dl={id:dn.inputs.secondSummand.id,type:i.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",defaultValue:null,dataType:wp,required:!0,parentRelationType:A.FixedArguments,index:1,parent:Vp},Sl={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ge.Addition,entityType:i.ActionDescriptor},Ol={parentRelationType:A.FixedReturns,id:dn.outputs.result.id,type:i.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",defaultValue:null,dataType:Mp,required:!0,index:0,parent:Sl},Np={type:i.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Ge.Addition,entityType:i.ActionDescriptor},Lp={parentRelationType:A.FixedReturns,id:dn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Np},Gp={type:i.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:dn.inputs.dynamicSummand.id,entityType:i.ValueDescriptor},$p={like:!1,inferred:!1,id:"number-addition-operation-dynamic-summand-argument-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Gp},Fp={parentRelationType:A.DynamicArgument,id:dn.inputs.dynamicSummand.id,type:i.ValueDescriptor,description:"A number to add",version:1,name:"Summand",defaultValue:null,dataType:$p,required:!0,index:2,parent:Sl},ls={id:Ge.Addition,type:i.ActionDescriptor,description:"Sum numbers",version:1,name:Ge.Addition,inputs:[Il,Dl,Fp],error:Lp,outputs:[Ol],parent:null},cn=_[i.Operation][Ge.Subtraction],Up={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:cn.inputs.minuend.id,entityType:i.ValueDescriptor},xp={like:!1,inferred:!1,id:"number-subtraction-first-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Up},jp={type:i.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:cn.inputs.subtrahend.id,entityType:i.ValueDescriptor},kp={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:jp},qp={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:cn.outputs.result.id,entityType:i.ValueDescriptor},Jp={like:!1,inferred:!1,id:cn.outputs.result.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:qp},Pl={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Wp={id:cn.inputs.minuend.id,type:i.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",defaultValue:null,dataType:xp,required:!0,parentRelationType:A.FixedArguments,index:0,parent:Pl},Yp={type:i.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Hp={id:cn.inputs.subtrahend.id,type:i.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",defaultValue:null,dataType:kp,required:!0,parentRelationType:A.FixedArguments,index:1,parent:Yp},zp={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Zp={parentRelationType:A.FixedReturns,id:cn.outputs.result.id,type:i.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",defaultValue:null,dataType:Jp,required:!0,index:0,parent:zp},Kp={type:i.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Ge.Subtraction,entityType:i.ActionDescriptor},Xp={parentRelationType:A.FixedReturns,id:cn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Kp},Qp={type:i.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:cn.inputs.dynamicSubtrahend.id,entityType:i.ValueDescriptor},ey={like:!1,inferred:!1,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Qp},ty={id:cn.inputs.dynamicSubtrahend.id,type:i.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",defaultValue:null,dataType:ey,required:!0,parentRelationType:A.DynamicArgument,index:2,parent:Pl},Al={id:Ge.Subtraction,type:i.ActionDescriptor,description:"Substract numbers",version:1,name:Ge.Subtraction,inputs:[Wp,Hp,ty],error:Xp,outputs:[Zp],parent:null},ny={[Ge.Addition]:ls,[Ge.Subtraction]:Al},Wt=_[i.Operation][re.Join],ry={type:i.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Wt.inputs.first.id,entityType:i.ValueDescriptor},iy={like:!1,inferred:!1,id:"join-strings-first-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ry},ay={type:i.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Wt.inputs.second.id,entityType:i.ValueDescriptor},sy={like:!1,inferred:!1,id:"join-strings-second-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:ay},oy={type:i.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Wt.outputs.result.id,entityType:i.ValueDescriptor},ly={like:!1,inferred:!1,id:"join-strings-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:oy},dy={type:i.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},ds={id:Wt.inputs.first.id,type:i.ValueDescriptor,version:1,name:"Text",description:"The first text to join to the second one. Its value will be at the beginning of the resulting text.",defaultValue:null,dataType:iy,parentRelationType:A.FixedArguments,required:!0,index:1,parent:dy},cy={type:i.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Wt.inputs.first.id,entityType:i.ValueDescriptor},uy={type:i.GenericReference,id:"join-strings-separator-string-data-type-default-value-parent-ref",entityId:Wt.inputs.separator.id,entityType:i.ValueDescriptor},py={type:i.LiteralValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:C.String,value:"",valueAsType:null,autogeneration:null,parent:uy},yy={like:!1,inferred:!1,id:"join-strings-separator-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:cy},hy={type:i.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},fy={id:Wt.inputs.separator.id,type:i.ValueDescriptor,version:1,name:"Separator",description:"The text value that will be inserted between each of the values that are joined.",defaultValue:py,dataType:yy,parentRelationType:A.FixedArguments,required:!1,index:0,parent:hy},my={type:i.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},cs={id:Wt.inputs.second.id,type:i.ValueDescriptor,version:1,name:"Text",description:"The second text to join to the first one. Its value will be at the end of the resulting text.",defaultValue:null,dataType:sy,parentRelationType:A.FixedArguments,required:!0,index:2,parent:my},Ty={type:i.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Zi={parentRelationType:A.FixedReturns,id:Wt.outputs.result.id,type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",defaultValue:null,dataType:ly,required:!0,index:0,parent:Ty},Ey={type:i.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Ry={parentRelationType:A.FixedReturns,id:Wt.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Ey},gy={type:i.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Wt.inputs.dynamicString.id,entityType:i.ValueDescriptor},by={like:!1,inferred:!1,id:"join-strings-dynamic-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:gy},vy={type:i.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Iy={id:Wt.inputs.dynamicString.id,type:i.ValueDescriptor,version:1,name:"Text",description:"Text to join to the previous ones. Its value will be at the end of the resulting text.",defaultValue:null,dataType:by,parentRelationType:A.DynamicArgument,required:!0,index:3,parent:vy},Ki={id:re.Join,type:i.ActionDescriptor,version:1,name:re.Join,description:"Join text values together, to form a single resulting text value.",inputs:[fy,ds,cs,Iy],outputs:[Zi],error:Ry,parent:null},Cn=_[i.Operation][re.Split],Dy={type:i.GenericReference,id:"split-string-string-argument-declaration",entityId:Cn.inputs.stringValue.id,entityType:i.ValueDescriptor},Sy={like:!1,inferred:!1,id:"split-string-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:Dy},Oy={type:i.GenericReference,id:"split-string-index-argument-declaration",entityId:Cn.inputs.indexLocation.id,entityType:i.ValueDescriptor},Py={like:!1,inferred:!1,id:"split-string-index-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Oy},Ay={type:i.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:Cn.outputs.firstPartResult.id,entityType:i.ValueDescriptor},Cy={like:!1,inferred:!1,id:"split-string-first-part-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:Ay},wy={type:i.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:Cn.outputs.secondPartResult.id,entityType:i.ValueDescriptor},By={like:!1,inferred:!1,id:"split-string-second-part-result-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:wy},My={type:i.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},_y={id:Cn.inputs.stringValue.id,type:i.ValueDescriptor,version:1,name:"Text value",description:"The text value that will be split into two at the given index location.",defaultValue:null,dataType:Sy,parentRelationType:A.FixedArguments,required:!0,index:0,parent:My},Vy={type:i.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Ny={id:Cn.inputs.indexLocation.id,type:i.ValueDescriptor,version:1,name:"Index location",description:"The index location where the text will be split into two. The text at this index will be the beginning of the second text.",defaultValue:null,dataType:Py,parentRelationType:A.FixedArguments,required:!0,index:1,parent:Vy},Ly={type:i.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},kP={parentRelationType:A.FixedReturns,id:Cn.outputs.secondPartResult.id,type:i.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",defaultValue:null,dataType:By,required:!0,index:1,parent:Ly},Gy={type:i.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},$y={parentRelationType:A.FixedReturns,id:Cn.outputs.firstPartResult.id,type:i.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",defaultValue:null,dataType:Cy,required:!0,index:0,parent:Gy},Fy={type:i.GenericReference,id:"split-string-operation-error-parent-ref",entityId:re.Join,entityType:i.ActionDescriptor},Uy={parentRelationType:A.FixedReturns,id:Cn.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Fy},Cl={id:re.Split,type:i.ActionDescriptor,version:1,name:re.Split,description:"Split a text into two, at the given index location.",inputs:[_y,Ny],outputs:[$y],error:Uy,parent:null},xy={[re.Join]:Ki,[re.Split]:Cl};var jy=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(jy||{}),ky=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(ky||{});const qy={type:i.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:i.ValueDescriptor},Jy={like:!1,inferred:!1,id:"join-list-first-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:qy},Wy={type:i.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:i.ValueDescriptor},Yy={like:!1,inferred:!1,id:"join-list-second-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:Wy},Hy={type:i.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:i.ValueDescriptor},zy={like:!1,inferred:!1,id:"join-list-result-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Hy},Zy={type:i.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},Ky={id:"join-list-first-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"First value",description:"The first list to join to the second one. Its values will be at the beginning of the resulting list.",defaultValue:null,dataType:Jy,parentRelationType:A.FixedArguments,required:!0,index:0,parent:Zy},Xy={type:i.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},Qy={id:"join-list-second-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"Second value",description:"The second list to join to the first one. Its values will be at the end of the resulting list.",defaultValue:null,dataType:Yy,parentRelationType:A.FixedArguments,required:!0,index:1,parent:Xy},eh={type:i.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},th={parentRelationType:A.FixedReturns,id:"join-list-result-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",defaultValue:null,dataType:zy,required:!0,index:0,parent:eh},nh={type:i.GenericReference,id:"join-list-operation-error-parent-ref",entityId:X.Join,entityType:i.ActionDescriptor},rh={parentRelationType:A.FixedReturns,id:"join-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:nh},wl={id:X.Join,type:i.ActionDescriptor,version:1,name:X.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[Ky,Qy],error:rh,outputs:[th],parent:null};var ih=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(ih||{}),ah=(r=>(r.FirstOutputList="split-list-first-output-list-return-delaration",r.SecondOutputList="split-list-second-output-list-return-delaration",r.Error="split-list-error-return-delaration",r))(ah||{});const sh={type:i.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:i.ValueDescriptor},oh={like:!1,inferred:!1,id:"split-list-operation-input-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:sh},lh={type:i.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:i.ValueDescriptor},dh={like:!1,inferred:!1,id:"split-list-operation-split-index-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:lh},Bl={type:i.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:i.ValueDescriptor},ch={like:!1,inferred:!1,id:"split-list-operation-first-output-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Bl},uh={type:i.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},ph={id:"list-to-split-argument-declaration",type:i.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",defaultValue:null,dataType:oh,parentRelationType:A.FixedArguments,required:!0,index:0,parent:uh},yh={type:i.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},hh={id:"split-list-index-argument-declaration",type:i.ValueDescriptor,version:1,name:"Split location",description:"The index at which to split the list. The value at this index will be the first value of the second list.",defaultValue:null,dataType:dh,parentRelationType:A.FixedArguments,required:!0,index:1,parent:yh},fh={type:i.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},mh={parentRelationType:A.FixedReturns,id:"split-list-first-output-list-return-delaration",type:i.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",defaultValue:null,dataType:ch,required:!0,index:0,parent:fh},Th={like:!1,inferred:!1,id:"split-list-operation-second-output-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Bl},Eh={type:i.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},Rh={parentRelationType:A.FixedReturns,id:"split-list-second-output-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",defaultValue:null,dataType:Th,required:!0,index:0,parent:Eh},gh={type:i.GenericReference,id:"split-list-operation-error-parent-ref",entityId:X.Split,entityType:i.ActionDescriptor},bh={parentRelationType:A.FixedReturns,id:"split-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:gh},Ml={id:X.Split,type:i.ActionDescriptor,version:1,name:X.Split,description:"Splits a given list at the given index, and returns two lists, one with the values up to the index, and the other with the values after the index",inputs:[ph,hh],outputs:[mh,Rh],error:bh,parent:null};var vh=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(vh||{}),Ih=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(Ih||{});const Dh={type:i.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:i.ValueDescriptor},Sh={like:!1,inferred:!1,id:"get-last-in-list-input-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:Dh},Oh={type:i.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:i.ValueDescriptor},Ph={like:!1,inferred:!1,id:"get-last-in-list-output-element-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Oh},Ah={type:i.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},Ch={id:"get-last-in-list-input-list-argument-declaration",type:i.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",defaultValue:null,dataType:Sh,parentRelationType:A.FixedArguments,required:!0,index:0,parent:Ah},wh={type:i.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},Bh={parentRelationType:A.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:i.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",defaultValue:null,dataType:Ph,required:!0,index:0,parent:wh},Mh={type:i.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:X.GetLast,entityType:i.ActionDescriptor},_h={parentRelationType:A.FixedReturns,id:"get-last-in-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Mh},_l={id:X.GetLast,type:i.ActionDescriptor,version:1,name:X.GetLast,description:"Outputs the last element of a given list.",inputs:[Ch],outputs:[Bh],error:_h,parent:null};var Vh=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(Vh||{}),Nh=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(Nh||{});const Lh={type:i.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:i.ValueDescriptor},Gh={like:!1,inferred:!1,id:"append-to-list-lsit-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:Lh},$h={type:i.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:i.ValueDescriptor},Fh={like:!1,inferred:!1,id:"append-to-list-second-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,parent:$h},Uh={type:i.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:i.ValueDescriptor},xh={like:!1,inferred:!1,id:"append-to-list-result-list-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!0,parent:Uh},jh={type:i.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Vl={id:"append-to-list-lsit-argument-declaration",type:i.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",defaultValue:null,dataType:Gh,parentRelationType:A.FixedArguments,required:!0,index:0,parent:jh},kh={type:i.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Nl={id:"append-to-list-element-to-append-argument-declaration",type:i.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",defaultValue:null,dataType:Fh,parentRelationType:A.FixedArguments,required:!0,index:1,parent:kh},qh={type:i.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Jh={parentRelationType:A.FixedReturns,id:"append-to-list-result-list-return-delaration",type:i.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",defaultValue:null,dataType:xh,required:!0,index:0,parent:qh},Wh={type:i.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:X.Append,entityType:i.ActionDescriptor},Yh={parentRelationType:A.FixedReturns,id:"append-to-list-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Wh},us={id:X.Append,type:i.ActionDescriptor,version:1,name:X.Append,description:"Adds a given element to the end of a list value.",inputs:[Vl,Nl],error:Yh,outputs:[Jh],parent:null},Hh={[X.Join]:wl,[X.Split]:Ml,[X.GetLast]:_l,[X.Append]:us},si=_[i.Operation][Ve.Parallel],zh={id:"parallel-execution-list-of-functions-blueprint-dynamic-output-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},Zh={id:"parallel-execution-list-of-functions-blueprint-dynamic-input-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},Kh={id:"parallel-execution-list-of-functions-blueprint-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[Zh],outputs:[zh],error:null,parent:null},Xh={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:si.inputs.listOfActions.id,entityType:i.ValueDescriptor},Qh={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Kh,asType:!1,isList:!0,parent:Xh},ef={type:i.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:si.outputs.results.id,entityType:i.ValueDescriptor},tf={like:!1,inferred:!1,id:si.outputs.results.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!0,parent:ef},nf={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Ve.Parallel,entityType:i.ActionDescriptor},Ll={id:si.inputs.listOfActions.id,type:i.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Qh,defaultValue:null,required:!0,index:0,parent:nf,parentRelationType:A.FixedArguments},rf={type:i.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Ve.Parallel,entityType:i.ActionDescriptor},Gl={id:si.outputs.results.id,type:i.ValueDescriptor,version:1,name:"List of execution results",description:"Each execution result, in the same order as the input list of actions. One item on this list for each executed action.",dataType:tf,defaultValue:null,required:!0,index:0,parent:rf,parentRelationType:A.FixedReturns},af={type:i.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:Ve.Parallel,entityType:i.ActionDescriptor},sf={id:si.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:af,parentRelationType:A.ReturnedError},Qt={id:Ve.Parallel,type:i.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:Ve.Parallel,inputs:[Ll],outputs:[Gl],error:sf,parent:null};var of=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(of||{}),lf=(r=>(r.Error="wait-operation-error-return-delaration",r))(lf||{});const df={type:i.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:i.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},cf={like:!1,inferred:!1,id:"wait-milliseconds-number-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:df},uf={type:i.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:i.ActionDescriptor,entityId:Ve.Wait},yr={id:"wait-milliseconds-number-argument-declaration",type:i.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",defaultValue:null,dataType:cf,required:!0,index:0,parent:uf,parentRelationType:A.FixedArguments},pf={type:i.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ve.Wait,entityType:i.ActionDescriptor},yf={id:"wait-operation-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:pf,parentRelationType:A.ReturnedError},Rt={id:Ve.Wait,type:i.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:Ve.Wait,inputs:[yr],outputs:[],error:yf,parent:null};var hf=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(hf||{}),ff=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(ff||{});const mf={id:"sequential-execution-list-of-functions-blueprint-dynamic-output-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},Tf={id:"sequential-execution-list-of-functions-blueprint-dynamic-input-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",defaultValue:null,dataType:null,required:!1,index:0,parent:null,parentRelationType:A.DynamicArgument},Ef={id:"sequential-execution-list-of-functions-blueprint-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[Tf],outputs:[mf],error:null,parent:null},Rf={type:i.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:i.ValueDescriptor},gf={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ef,asType:!1,isList:!0,parent:Rf},bf={type:i.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:i.ValueDescriptor},vf={like:!1,inferred:!1,id:"sequential-execution-list-of-execution-results-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!0,parent:bf},If={type:i.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},$l={id:"sequential-execution-list-of-functions-argument-declaration",type:i.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",defaultValue:null,dataType:gf,required:!0,index:0,parent:If,parentRelationType:A.FixedArguments},Df={type:i.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},Fl={id:"sequential-execution-result-return-delaration",type:i.ValueDescriptor,version:1,name:"List of execution results",description:"Each execution result, in the same order as the input list of actions. One item on this list for each executed action.",defaultValue:null,dataType:vf,required:!0,index:0,parent:Df,parentRelationType:A.FixedReturns},Sf={type:i.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:Ve.Sequential,entityType:i.ActionDescriptor},Of={id:"sequential-execution-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Sf,parentRelationType:A.ReturnedError},wn={id:Ve.Sequential,type:i.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:Ve.Sequential,inputs:[$l],outputs:[Fl],error:Of,parent:null},Pf={[Ve.Parallel]:Qt,[Ve.Wait]:Rt,[Ve.Sequential]:wn};var Af=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(Af||{}),Cf=(r=>(r.Error="create-new-instance-error-return-delaration",r))(Cf||{});const wf={type:i.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},Bf={type:i.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:i.ValueDescriptor},Mf={like:!1,inferred:!1,id:"new-entity-data-argument-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:Bf},_f={id:"new-entity-data-argument-declaration",type:i.ValueDescriptor,version:1,name:"Data for new entity",description:"The data to be used to create the new entity, with all the required properties",dataType:Mf,required:!0,defaultValue:null,parentRelationType:A.FixedArguments,index:1,parent:wf},Vf={type:i.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},Nf={like:!1,inferred:!1,id:"entity-to-instanciate-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,parent:Vf},Lf={type:i.GenericReference,id:"create-new-instance-operation-ref",entityType:i.ActionDescriptor,entityId:Ne.CreateNewInstance},Gf={id:"entity-to-instanciate-argument-declaration",type:i.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",defaultValue:null,dataType:Nf,required:!0,parentRelationType:A.FixedArguments,index:0,parent:Lf},$f={type:i.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},Ff={parentRelationType:A.FixedReturns,id:"create-new-instance-output-entity-declaration",type:i.ValueDescriptor,version:1,name:"Created entity",description:"The entity that was created",defaultValue:null,dataType:null,parent:$f,required:!0,index:0},Uf={type:i.GenericReference,id:"create-new-instance-error-parent-ref",entityId:Ne.CreateNewInstance,entityType:i.ActionDescriptor},xf={parentRelationType:A.FixedReturns,id:"create-new-instance-error-return-delaration",type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",defaultValue:null,dataType:null,required:!0,index:1,parent:Uf},hr={id:Ne.CreateNewInstance,type:i.ActionDescriptor,description:"Creates a new copy of a given entity, with the given values for each property, or default values if a value is not provided",version:1,name:Ne.CreateNewInstance,inputs:[Gf,_f],outputs:[Ff],error:xf,parent:null},oi=_[i.Operation][Ne.Validate],jf={type:i.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:oi.inputs.dataToValidate.id},kf={like:!1,inferred:!1,id:"validate-data-operation-data-to-validate-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:jf},qf={type:i.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:i.ActionDescriptor,entityId:Ne.Validate},Jf={id:oi.inputs.dataToValidate.id,type:i.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",defaultValue:null,dataType:kf,required:!0,parentRelationType:A.FixedArguments,index:0,parent:qf},Wf={type:i.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:i.ValueDescriptor,entityId:oi.inputs.entityToMatch.id},Yf={like:!1,inferred:!1,id:"validate-data-operation-entity-to-match-type-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,parent:Wf},Hf={type:i.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:i.ActionDescriptor,entityId:Ne.Validate},zf={id:oi.inputs.entityToMatch.id,type:i.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:Yf,defaultValue:null,required:!0,index:0,parentRelationType:A.FixedArguments,parent:Hf},Zf={type:i.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:Ne.Validate,entityType:i.ActionDescriptor},Kf={id:oi.outputs.outputEntity.id,type:i.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",defaultValue:null,parent:Zf,required:!0,index:0,parentRelationType:A.FixedReturns},Xf={type:i.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ne.Validate,entityType:i.ActionDescriptor},Qf={id:oi.outputs.error.id,type:i.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,defaultValue:null,required:!0,index:1,parent:Xf,parentRelationType:A.ReturnedError},fr={id:Ne.Validate,type:i.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:Ne.Validate,inputs:[zf,Jf],outputs:[Kf],error:Qf,parent:null},em={[Ne.CreateNewInstance]:hr,[Ne.Validate]:fr},Qe=_[i.Operation]["base-http-request"],tm={type:i.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:i.ValueDescriptor,entityId:Qe.inputs.url.id},nm={id:"http-request-url-default-value-id",type:i.LiteralValue,version:1,value:"https://some-url.com",name:C.String,valueAsType:null,parent:tm,autogeneration:null},rm={type:i.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Qe.inputs.url.id,entityType:i.ValueDescriptor},im={like:!1,inferred:!1,id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:rm},am={type:i.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Qe.inputs.query.id,entityType:i.ValueDescriptor},sm={like:!1,inferred:!1,id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:am},om={type:i.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:i.ValueDescriptor,entityId:Qe.inputs.method.id},lm={id:"http-request-method-default-value-id",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,valueAsType:null,parent:om,autogeneration:null},dm={type:i.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Qe.inputs.method.id,entityType:i.ValueDescriptor},cm={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:dm},um={type:i.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Qe.inputs.headers.id,entityType:i.ValueDescriptor},pm={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:um},ym={type:i.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Qe.inputs.body.id,entityType:i.ValueDescriptor},hm={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:ym},fm={type:i.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:i.ValueDescriptor,entityId:Qe.outputs.code.id},mm={like:!1,inferred:!1,id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:fm},Tm={type:i.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:i.ValueDescriptor,entityId:Qe.outputs.headers.id},Em={type:i.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:i.ValueDescriptor,entityId:Qe.outputs.headers.id},Rm={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:Em},gm={type:i.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:i.ValueDescriptor,entityId:Qe.outputs.body.id},bm={type:i.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:i.ValueDescriptor,entityId:Qe.outputs.body.id},vm={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:bm},Im={type:i.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ps={id:Qe.inputs.method.id,type:i.ValueDescriptor,description:"A single word that represents the type of request you want to make. For example: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD, TRACE, CONNECT, CUSTOM",version:1,name:"Method",defaultValue:lm,dataType:cm,required:!1,index:0,parentRelationType:A.FixedArguments,parent:Im},Dm={type:i.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ys={id:Qe.inputs.url.id,type:i.ValueDescriptor,description:"The base domain, or address where the request is being sent to. For example: https://some-url.com",version:1,name:"URL",dataType:im,defaultValue:nm,required:!1,index:1,parentRelationType:A.FixedArguments,parent:Dm},Sm={type:i.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Ul={id:Qe.inputs.query.id,type:i.ValueDescriptor,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",version:1,name:"Query Params",defaultValue:null,dataType:sm,required:!1,index:2,parentRelationType:A.FixedArguments,parent:Sm},Om={type:i.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},hs={id:Qe.inputs.headers.id,type:i.ValueDescriptor,description:"A set of any properties, with names and values that represent metadata about the request, such as the server, date, content type, and more, that you want to send alongside your request data.",version:1,name:"Headers",defaultValue:null,dataType:pm,required:!1,index:3,parent:Om,parentRelationType:A.FixedArguments},Pm={type:i.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},fs={id:Qe.inputs.body.id,type:i.ValueDescriptor,description:"The main data payload of the request. This is the data that you want to send to the server. It could be anything, but it is usually a KeyValue data structure or a text value.",version:1,name:"Body",dataType:hm,defaultValue:null,required:!1,index:4,parentRelationType:A.FixedArguments,parent:Pm},Am={type:i.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},ms={id:Qe.outputs.code.id,type:i.ValueDescriptor,description:'A standardized status code of the response. It is a 3-digit number that represents the response status. For example, 200 means "OK", 404 means "Not Found", and 500 means "Internal Server Error".',version:1,name:"Code",defaultValue:null,dataType:mm,required:!0,index:0,parentRelationType:A.FixedReturns,parent:Am},Cm={type:i.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Ts={parentRelationType:A.FixedReturns,id:Qe.outputs.headers.id,type:i.ValueDescriptor,description:"A set of any properties, with names and value that the server sent back to you. It represents metadata about the response, such as the server, date, content type, and more.",version:1,name:"Headers",defaultValue:{id:"http-response-headers-default-value-id",type:i.LiteralValue,version:1,value:{},name:C.KeyValue,parent:Tm,valueAsType:null,autogeneration:null},dataType:Rm,required:!0,index:1,parent:Cm},wm={type:i.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Es={id:Qe.outputs.body.id,type:i.ValueDescriptor,description:"The main data payload of the response. This is the data that the server sent back to you. It could be anything, but it is usually a KeyValue data structure or a text value.",version:1,name:"Body",parentRelationType:A.FixedReturns,dataType:vm,defaultValue:{id:"http-response-body-default-value-id",type:i.LiteralValue,version:1,value:{},name:C.KeyValue,parent:gm,valueAsType:null,autogeneration:null},required:!0,index:2,parent:wm},Bm={type:i.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:i.ActionDescriptor,entityId:dt.HttpRequest},Mm={type:i.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:i.ValueDescriptor,entityId:Qe.outputs.error.id},_m={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,isList:!1,asType:!1,parent:Mm},xl={parentRelationType:A.ReturnedError,id:Qe.outputs.error.id,type:i.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",defaultValue:null,dataType:_m,required:!0,index:0,parent:Bm},Xi={type:i.ActionDescriptor,id:dt.HttpRequest,name:dt.HttpRequest,description:"Make an HTTP request, out to the internet, to a given URL with the specified method, query parameters, headers, and body.",version:1,inputs:[ps,ys,Ul,hs,fs],outputs:[ms,Ts,Es],error:xl,parent:null},Vm={[dt.HttpRequest]:Xi},Nm={...xy,...ny,...Hh,...Pf,...em,...Vm},Lm=Object.values(Nm),qP=_[i.Loop]["manual-flow-loop"],Gm={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ManualFlow,entityType:i.ActionDescriptor},$m={id:qP.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:Gm,parentRelationType:A.DynamicReturn},Rs={id:k.ManualFlow,type:i.ActionDescriptor,version:1,name:k.ManualFlow,description:"A loop that is manually controlled by the continue and break statements. It runs until the break statement is called, and it can skip to the next iteration with the continue statement.",inputs:[],outputs:[$m],error:null,parent:null},Qi=_[i.Loop]["manual-flow-loop"],Fm={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"manual-flow-loop-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},Um={like:!1,inferred:!1,id:"manual-flow-loop-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:Fm},xm={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},jl={id:Qi.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the manual flow loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:Um,required:!0,index:0,parentRelationType:A.FixedArguments,parent:xm},jm={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},km={id:"manual-flow-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:1,parentRelationType:A.DynamicArgument,parent:jm},qm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Qi.body.id,entityType:i.ActionDescriptor},Jm={id:"manual-flow-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:qm},kl={id:Qi.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[jl,km],outputs:[Jm],error:null,parent:null},Wm=_[i.Loop]["string-loop"],Ym={id:"iterate-over-string-loop-string-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-string-argument-declaration-id",entityType:i.ValueDescriptor},Hm={like:!1,inferred:!1,id:"iterate-over-string-loop-string-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:Ym},zm={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.String,entityType:i.ActionDescriptor},Zm={id:Wm.inputs.string.id,type:i.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",defaultValue:null,required:!0,dataType:Hm,index:0,parent:zm,parentRelationType:A.FixedArguments},Km={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.String,entityType:i.ActionDescriptor},Xm={id:Wm.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:Km,parentRelationType:A.DynamicReturn},ea={id:k.String,type:i.ActionDescriptor,version:1,name:k.String,description:"Iterates over a string of entities",inputs:[Zm],outputs:[Xm],error:null,parent:null},mr=_[i.Loop]["string-loop"],Qm={id:"iterate-over-string-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},eT={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:Qm},tT={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},ql={id:mr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the string that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:eT,required:!0,index:1,parentRelationType:A.FixedArguments,parent:tT},nT={id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-string-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},rT={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:nT},iT={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},Jl={id:mr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the string loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:rT,required:!0,index:0,parentRelationType:A.FixedArguments,parent:iT},aT={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},sT={id:"iterate-over-string-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:aT},oT={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:mr.body.id,entityType:i.ActionDescriptor},lT={id:"iterate-over-string-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:oT},Wl={id:mr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Jl,ql,sT],outputs:[lT],error:null,parent:null},dT=_[i.Loop]["list-loop"],cT={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:i.ValueDescriptor},uT={like:!1,inferred:!1,id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,entity:null,asType:!1,parent:cT},pT={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.List,entityType:i.ActionDescriptor},yT={id:dT.inputs.list.id,type:i.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,defaultValue:null,dataType:uT,index:0,parent:pT,parentRelationType:A.FixedArguments},hT={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.List,entityType:i.ActionDescriptor},fT={id:dT.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,defaultValue:null,dataType:null,index:0,parent:hT,parentRelationType:A.DynamicReturn},Wn={id:k.List,type:i.ActionDescriptor,version:1,name:k.List,description:"Iterates over a list of entities",inputs:[yT],outputs:[fT],error:null,parent:null},Tr=_[i.Loop]["list-loop"],mT={id:"iterate-over-list-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},TT={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:null,asType:!1,parent:mT},ET={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},gs={id:Tr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the list that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:TT,required:!0,index:1,parentRelationType:A.FixedArguments,parent:ET},RT={id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-list-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},gT={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:RT},bT={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},vT={id:Tr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the list loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:gT,required:!0,index:0,parentRelationType:A.FixedArguments,parent:bT},IT={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},DT={id:"iterate-over-list-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:IT},ST={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Tr.body.id,entityType:i.ActionDescriptor},OT={id:"iterate-over-list-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:ST},bs={id:Tr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[vT,gs,DT],outputs:[OT],error:null,parent:null},PT=_[i.Loop]["object-keys-loop"],AT={id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-object-argument-declaration-id",entityType:i.ValueDescriptor},CT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:it,asType:!1,parent:AT},wT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectKeys,entityType:i.ActionDescriptor},BT={id:PT.inputs.object.id,type:i.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,defaultValue:null,dataType:CT,index:0,parent:wT,parentRelationType:A.FixedArguments},MT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectKeys,entityType:i.ActionDescriptor},_T={id:PT.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:MT,parentRelationType:A.DynamicReturn},li={id:k.ObjectKeys,type:i.ActionDescriptor,version:1,name:k.ObjectKeys,description:"Iterates over a object of entities",inputs:[BT],outputs:[_T],error:null,parent:null},Er=_[i.Loop]["object-keys-loop"],VT={id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},NT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:J,asType:!1,parent:VT},LT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},Yl={id:Er.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the object-keys that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:NT,required:!0,index:1,parentRelationType:A.FixedArguments,parent:LT},GT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},$T={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:GT},FT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},UT={id:Er.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the object-keys loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:$T,required:!0,index:0,parentRelationType:A.FixedArguments,parent:FT},xT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},jT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:xT},kT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Er.body.id,entityType:i.ActionDescriptor},qT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:kT},JT={id:Er.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[UT,Yl,jT],outputs:[qT],error:null,parent:null},WT=_[i.Loop]["object-values-loop"],YT={id:"iterate-over-object-values-loop-object-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-object-argument-declaration-id",entityType:i.ValueDescriptor},HT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-object-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:it,asType:!1,parent:YT},zT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectValues,entityType:i.ActionDescriptor},ZT={id:WT.inputs.object.id,type:i.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,defaultValue:null,dataType:HT,index:0,parent:zT,parentRelationType:A.FixedArguments},KT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.ObjectValues,entityType:i.ActionDescriptor},XT={id:WT.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:KT,parentRelationType:A.DynamicReturn},di={id:k.ObjectValues,type:i.ActionDescriptor,version:1,name:k.ObjectValues,description:"Iterates over a object of entities",inputs:[ZT],outputs:[XT],error:null,parent:null},Rr=_[i.Loop]["object-values-loop"],QT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-body-current-value-declaration-id",entityType:i.ValueDescriptor},eE={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:null,entity:null,asType:null,like:!1,inferred:!1,parent:QT},tE={id:"iterate-over-object-values-loop-body-current-value-declaration-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},Hl={id:Rr.body.inputs.currentValue.id,type:i.ValueDescriptor,version:1,name:"Current value",description:"The current value in the object-values that is being iterated over. This value is passed to the child actions.",defaultValue:null,dataType:eE,required:!0,index:1,parentRelationType:A.FixedArguments,parent:tE},nE={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"iterate-over-object-values-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},rE={like:!1,inferred:!1,id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:nE},iE={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},aE={id:Rr.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the object-values loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:rE,required:!0,index:0,parentRelationType:A.FixedArguments,parent:iE},sE={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},oE={id:"iterate-over-object-values-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:2,parentRelationType:A.DynamicArgument,parent:sE},lE={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:Rr.body.id,entityType:i.ActionDescriptor},dE={id:"iterate-over-object-values-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:lE},cE={id:Rr.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[aE,Hl,oE],outputs:[dE],error:null,parent:null},zl=_[i.Loop]["counted-loop"],uE={id:"counted-loop-string-argument-declaration-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:zl.inputs.number.id,entityType:i.ValueDescriptor},pE={id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:i.LiteralValue,name:C.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:uE},yE={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:i.ValueDescriptor},hE={like:!1,inferred:!1,id:"counted-loop-string-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:yE},fE={id:"counted-loop-string-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:k.Counted,entityType:i.ActionDescriptor},mE={id:zl.inputs.number.id,type:i.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:hE,defaultValue:pE,index:0,parent:fE,parentRelationType:A.FixedArguments},TE={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:i.GenericReference,entityId:k.Counted,entityType:i.ActionDescriptor},EE={id:zl.outputs.results.id,type:i.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",defaultValue:null,required:!1,dataType:null,index:0,parent:TE,parentRelationType:A.DynamicReturn},ta={id:k.Counted,type:i.ActionDescriptor,version:1,name:k.Counted,description:"Iterates a given number of times",inputs:[mE],outputs:[EE],error:null,parent:null},na=_[i.Loop]["counted-loop"],RE={id:"counted-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:"counted-loop-body-current-iteration-number-declaration-id",entityType:i.ValueDescriptor},gE={like:!1,inferred:!1,id:"counted-loop-body-current-iteration-number-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,entity:ee,asType:!1,parent:RE},bE={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},Zl={id:na.body.inputs.iterationNumber.id,type:i.ValueDescriptor,version:1,name:"Current iteration number",description:"The number of the current iteration of the string loop. Keeps track of the number of iterations that have been executed.",defaultValue:null,dataType:gE,required:!0,index:0,parentRelationType:A.FixedArguments,parent:bE},vE={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},IE={id:"counted-loop-body-any-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",defaultValue:null,dataType:null,required:!1,index:1,parentRelationType:A.DynamicArgument,parent:vE},DE={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:i.GenericReference,entityId:na.body.id,entityType:i.ActionDescriptor},SE={id:"counted-loop-body-any-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",defaultValue:null,dataType:null,required:!1,index:0,parentRelationType:A.DynamicReturn,parent:DE},Kl={id:na.body.id,type:i.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Zl,IE],outputs:[SE],error:null,parent:null},OE=[Rs,Wn,ea,li,di,ta],Yn=_[i.BuiltInBaseEntity][U.HTTP_ENDPOINT].properties,PE={id:"endpointBuiltInCorsPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.cors.id},AE={id:"endpointBuiltInCorsPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:Yn.cors.id},CE={like:!1,inferred:!1,id:"endpointBuiltInCorsPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:AE},wE={id:"endpointBuiltInBaseEntityRef",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},BE={constant:!1,hidden:!0,required:!0,id:Yn.cors.id,name:"Allowed origins",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:CE,defaultValue:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:["*"],parent:PE,autogeneration:null,valueAsType:null},description:"The origins that are allowed to access this endpoint, use * for all origins, or http://example.com/* to be as specific as you need.",parent:wE},ME={id:"endpointBuiltInPathPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.path.id},_E={id:"endpointBuiltInPathPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:Yn.path.id},VE={like:!1,inferred:!1,id:"endpointBuiltInPathPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:_E},NE={id:"endpointBuiltInBaseEntityRefTwo",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},Xl={constant:!1,id:Yn.path.id,hidden:!1,required:!0,name:"Path",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:VE,defaultValue:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.String,value:"/",parent:ME,autogeneration:null,valueAsType:null},description:"Path to the endpoint, for example /api/users, or /api/users/{id}, or /api/users/{id}/:name. The path can contain parameters, which are defined by curly braces, and will be passed to the endpoint event as variables with the same name.",parent:NE},LE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:Yn.method.id},GE={id:"endpointBuiltInMethodPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"endpointBuiltInMethodProperty"},$E={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Pn,isList:!0,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:GE},FE={id:"endpointBuiltInBaseEntityRefThree",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},Ql={constant:!1,hidden:!1,required:!0,id:Yn.method.id,name:"Method",version:1,type:i.Property,private:!1,index:2,implements:null,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,parent:LE,autogeneration:null,valueAsType:null},abstract:!0,static:!0,dataType:$E,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:FE},UE={id:"endpointRequestHeadersVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointRequestHeadersArgumentDeclaration"},xE={id:"endpointRequestHeadersArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},jE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:xE},kE={id:"endpointRequestBodyArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},qE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:kE},JE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointRequestQueryParamsArgumentDeclaration"},WE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},YE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,asType:!1,entity:ai,parent:WE},HE={id:"endpointPathParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointPathParamsArgumentDeclaration"},zE={id:"endpointPathParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},ZE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:ai,asType:!1,parent:zE},KE={id:"endpointReachedTriggerActionDescriptorRef",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},ed={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:i.ValueDescriptor,name:"Request headers",dataType:jE,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:UE,autogeneration:null,valueAsType:null},required:!0,index:0,parentRelationType:A.FixedArguments,parent:KE},XE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},td={id:"endpointPathParamsArgumentDeclaration",type:i.ValueDescriptor,description:"A standarized text, without spaces that is added at the end of the domain and routes the request to a specific resource within the target server. For example: /api/users/123, /api/users/123/:name, /api/users/123/:name/:age.",version:1,name:"Path parameters",dataType:ZE,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:[],parent:HE,autogeneration:null,valueAsType:null},required:!0,index:1,parentRelationType:A.FixedArguments,parent:XE},QE={id:"endpointReachedTriggerActionDescriptorRefThree",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},nd={id:"endpointRequestQueryParamsArgumentDeclaration",version:1,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",type:i.ValueDescriptor,name:"Request query params",dataType:YE,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:[],parent:JE,autogeneration:null,valueAsType:null},required:!0,index:2,parentRelationType:A.FixedArguments,parent:QE},eR={id:"endpointReachedTriggerActionDescriptorRefFour",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},rd={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:i.ValueDescriptor,name:"Request body",dataType:qE,defaultValue:null,index:3,required:!0,parentRelationType:A.FixedArguments,parent:eR},tR={id:"endpointResponseCodeReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},nR={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:tR},rR={id:"endpointReturnStatementRef",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},id={id:"endpointResponseCodeReturnDeclaration",version:1,description:"A standarized number that represents the status of the response. 200 for OK, 404 for not found, 500 for server error, etc.",type:i.ValueDescriptor,name:"Response code",dataType:nR,defaultValue:null,required:!0,index:0,parentRelationType:A.FixedReturns,parent:rR},iR={id:"endpointResponseHeadersDataTypeRef",type:i.GenericReference,entityType:i.ValueDescriptor,entityId:"endpointResponseHeadersReturnDeclaration"},aR={id:"endpointResponseHeadersReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},sR={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:aR},oR={id:"endpointReturnStatementRefTwo",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},ad={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:i.ValueDescriptor,name:"Response headers",dataType:sR,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:iR,autogeneration:null,valueAsType:null},required:!1,index:1,parentRelationType:A.FixedReturns,parent:oR},lR={id:"endpointResponseBodyReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},dR={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:lR},cR={id:"endpointReturnStatementRefThree",type:i.GenericReference,entityType:i.ActionDescriptor,entityId:"endpointReturnStatement"},sd={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:i.ValueDescriptor,name:"Response body",dataType:dR,defaultValue:null,required:!1,index:2,parentRelationType:A.FixedReturns,parent:cR},uR={id:"endpointBuiltInBaseEntityRefFour",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},od={id:"endpointReachedTriggerActionDescriptor",type:i.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[ed,td,nd,rd],outputs:[id,ad,sd],error:null,parent:uR},ra={id:U.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:U.HTTP_ENDPOINT,type:i.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[BE,Xl,Ql],abstractMethods:[od],extends:[],methods:[]},ct=_[i.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,pR={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.identifier.id,entityType:i.Property},yR={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:i.GenericReference,entityId:ct.properties.identifier.id,entityType:i.Property},hR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:yR},ci={id:"relational-database-built-in-base-entity-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},vs={constant:!1,id:ct.properties.identifier.id,hidden:!1,required:!0,name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,defaultValue:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:null,parent:pR,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:hR,description:"The name of the main database inside of the server instance where the data will be stored.",parent:ci},JP={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:i.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:i.Property},fR={id:"relational-database-built-in-base-entity-username-property-ref-id",type:i.GenericReference,entityId:ct.properties.username.id,entityType:i.Property},mR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:fR},Is={constant:!1,hidden:!1,required:!0,id:ct.properties.username.id,name:"Username",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,defaultValue:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:ct.properties.username.id,entityType:i.Property},autogeneration:null,valueAsType:null},dataType:mR,description:"The username that will be used to connect to the database.",parent:ci},WP={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:i.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:i.Property},TR={id:"relational-database-built-in-base-entity-password-property-ref-id",type:i.GenericReference,entityId:ct.properties.password.id,entityType:i.Property},ER={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:TR},Ds={constant:!1,hidden:!1,required:!0,id:ct.properties.password.id,name:"Password",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,defaultValue:null,dataType:ER,description:"The password that will be used to connect to the database.",parent:ci},RR={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.minSize.id,entityType:i.Property},gR={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:i.GenericReference,entityId:ct.properties.minSize.id,entityType:i.Property},bR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:gR},Ss={constant:!1,hidden:!0,required:!0,id:ct.properties.minSize.id,name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,defaultValue:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:RR,autogeneration:null,valueAsType:null},dataType:bR,description:"The minimum size of the database in GB.",parent:ci},vR={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.default.id,entityType:i.Property},IR={id:"relational-database-built-in-base-entity-default-property-ref-id",type:i.GenericReference,entityId:ct.properties.default.id,entityType:i.Property},DR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:On,asType:!1,parent:IR},ld={constant:!1,hidden:!0,required:!0,id:ct.properties.default.id,name:"Default",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!1,parent:vR,autogeneration:null,valueAsType:null},dataType:DR,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:ci},SR={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:i.GenericReference,entityId:ct.properties.autoscaling.id,entityType:i.Property},OR={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:i.GenericReference,entityId:ct.properties.autoscaling.id,entityType:i.Property},PR={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:On,asType:!1,parent:SR},AR={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},dd={constant:!1,hidden:!0,required:!0,id:ct.properties.autoscaling.id,name:"Auto-scaling",version:1,type:i.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!1,parent:OR,autogeneration:null,valueAsType:null},dataType:PR,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:AR},un={id:U.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:U.RELATIONAL_DATABASE,type:i.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[vs,Is,Ds,Ss,ld,dd],abstractMethods:[],methods:[],extends:[]},CR={type:i.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:i.BuiltInBaseEntity,id:Gt.DeletePersistedEntity},cd={type:i.FunctionDeclaration,id:Gt.DeletePersistedEntity,name:Gt.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:CR,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},wR=_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties,YP={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:i.DataType},BR={id:"persisted-built-in-base-entity-database-property-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:i.Property},MR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:BR},_R={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},ui={constant:!1,hidden:!0,required:!0,id:wR.database.id,name:"Database",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:MR,description:"The database that the entity belongs to.",parent:_R},VR={id:"persisted-built-in-base-entity-primary-key-property-number-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},NR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-number-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:VR},LR={id:"persisted-built-in-base-entity-primary-key-property-string-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},GR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-string-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:LR},$R={id:"persisted-built-in-base-entity-primary-key-property-uuid-data-type-option-parent-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-data-type-id",entityType:i.DataType},FR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-uuid-data-type-option-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parentRelationType:et.OrDataTypeGroup,parent:$R},UR={id:"persisted-built-in-base-entity-primary-key-property-ref-id",type:i.GenericReference,entityId:"persisted-built-in-base-entity-primary-key-property-id",entityType:i.Property},xR={like:!1,inferred:!1,id:"persisted-built-in-base-entity-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:[FR,GR,NR],isList:!1,entity:null,asType:null,implementationChooseOne:!0,parent:UR},jR={id:"persisted-built-in-base-entity-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:U.PERSISTED_ENTITY,entityType:i.BuiltInBaseEntity},pi={constant:!1,hidden:!1,required:!0,id:wR.primaryKey.id,name:"Primary key",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:xR,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:jR},st={id:U.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:U.PERSISTED_ENTITY,type:i.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[ui,pi],methods:[cd],extends:[]},kR={type:i.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:i.BuiltInBaseEntity,id:Gt.SoftDeletePersistedEntity},HP={type:i.FunctionDeclaration,id:Gt.SoftDeletePersistedEntity,name:Gt.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:kR,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},qR={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:U.HTTP_ENDPOINT},ud={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:i.ActionDescriptor,description:"Executed when the cron job is triggered",inputs:[],error:null,outputs:[],parent:qR},JR=_[i.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,zP={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:i.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:i.DataType},WR={id:"cron-job-built-in-base-entity-expression-property-ref",type:i.GenericReference,entityId:JR.properties.expression.id,entityType:i.Property},ZP={like:!1,inferred:!1,id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:WR},YR={id:"cron-job-built-in-base-entity-ref",type:i.GenericReference,entityId:U.CRON_JOB,entityType:i.BuiltInBaseEntity},HR={constant:!1,hidden:!1,required:!0,id:JR.properties.expression.id,name:"Cron expression",version:1,type:i.Property,defaultValue:null,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:ZP,description:"The cron-job expression that defines when the cron-job job should be triggered. The expression should be in the format of a cron-job expression.",parent:YR},Os={id:U.CRON_JOB,version:1,description:"This entity represents a scheduled trigger. The action on this entity will be executed one the time set by the cron-job expression is reached.",name:U.CRON_JOB,type:i.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[HR],methods:[],abstractMethods:[ud],extends:[]},zR={type:i.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:i.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},pd={id:"execution-built-in-entity-abort-method-id",type:i.FunctionDeclaration,version:1,name:Gt.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:zR},Ps={id:U.EXECUTION,type:i.BuiltInBaseEntity,version:1,name:U.EXECUTION,description:"A reference to an ongoing execution of any entity that can be called. Eg: Operations, custom trigger calls, etc.",static:!1,abstract:!1,interactive:!0,extends:[],properties:[],methods:[pd],abstractMethods:[]},ZR=[ra,un,st,Os,Ps],KP=_[i.Condition]["not-empty"],KR={type:i.GenericReference,id:"not-empty-condition-ref",entityType:i.ActionDescriptor,entityId:Jt.NotEmpty},XR={id:KP.inputs.leftHand.id,type:i.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",defaultValue:null,dataType:null,required:!0,parentRelationType:A.FixedArguments,index:0,parent:KR},gr={type:i.ActionDescriptor,id:Jt.NotEmpty,version:1,name:Jt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[XR],outputs:[],error:null},QR={[Jt.NotEmpty]:gr},yi=_[i.Condition]["more-than-or-equal"],eg={type:i.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:i.ValueDescriptor,entityId:yi.inputs.leftHand.id},tg={type:i.DataType,id:yi.inputs.leftHand.dataType.id,version:1,entity:ee,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,parent:eg},ng={type:i.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:i.ActionDescriptor,entityId:qe.MoreThanOrEqual},rg={id:yi.inputs.leftHand.id,type:i.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",defaultValue:null,dataType:tg,required:!0,parentRelationType:A.FixedArguments,index:0,parent:ng},ig={type:i.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:i.ValueDescriptor,entityId:yi.inputs.rightHand.id},ag={type:i.DataType,id:yi.inputs.rightHand.dataType.id,version:1,entity:ee,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,parent:ig},sg={type:i.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:i.ActionDescriptor,entityId:qe.MoreThanOrEqual},og={id:yi.inputs.rightHand.id,type:i.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",defaultValue:null,dataType:ag,required:!0,parentRelationType:A.FixedArguments,index:1,parent:sg},hi={type:i.ActionDescriptor,id:qe.MoreThanOrEqual,version:1,name:qe.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[rg,og],outputs:[],error:null},lg={[qe.MoreThanOrEqual]:hi},dg={...QR,...lg},cg=Object.values(dg),As={type:i.ActionDescriptor,id:Dn.PROJECT_PUBLICATION_COMPLETED,version:1,name:Dn.PROJECT_PUBLICATION_COMPLETED,description:"The event that is triggered when the project has completed its publication and all its code and resurces are now deployed and ready to be used by the users",parent:null,inputs:[],outputs:[],error:null},ug={[Dn.PROJECT_PUBLICATION_COMPLETED]:As},pg=Object.values(ug),yd=_[i.ValueDescriptor][os.ActionOngoingProcessOutputValue],yg={type:i.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:i.ValueDescriptor,entityId:yd.id},hg={like:!1,inferred:!1,id:yd.dataType.id,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ps,asType:!1,isList:!1,parent:yg},Cs={id:yd.id,type:i.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",defaultValue:null,dataType:hg,required:!0,index:0,parent:null,parentRelationType:A.OngoingProcessExecution},fg=[Cs],mg=[...Op,...Lm,...OE,...ZR,...cg,...pg,...fg];var le;(function(r){r.assertEqual=a=>a;function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const s={};for(const o of a)s[o]=o;return s},r.getValidEnumValues=a=>{const s=r.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of s)o[l]=a[l];return r.objectValues(o)},r.objectValues=a=>r.objectKeys(a).map(function(s){return a[s]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&s.push(o);return s},r.find=(a,s)=>{for(const o of a)if(s(o))return o},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=n,r.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(le||(le={}));var hd;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(hd||(hd={}));const x=le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Hn=r=>{switch(typeof r){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(r)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(r)?x.array:r===null?x.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?x.promise:typeof Map<"u"&&r instanceof Map?x.map:typeof Set<"u"&&r instanceof Set?x.set:typeof Date<"u"&&r instanceof Date?x.date:x.object;default:return x.unknown}},N=le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),XP=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class wt extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let l=n,p=0;for(;p<o.path.length;){const u=o.path[p];p===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(o))):l[u]=l[u]||{_errors:[]},l=l[u],p++}}};return a(this),n}static assert(e){if(!(e instanceof wt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const a of this.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}wt.create=r=>new wt(r);const fi=(r,e)=>{let t;switch(r.code){case N.invalid_type:r.received===x.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case N.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,le.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:t=`Unrecognized key(s) in object: ${le.joinValues(r.keys,", ")}`;break;case N.invalid_union:t="Invalid input";break;case N.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${le.joinValues(r.options)}`;break;case N.invalid_enum_value:t=`Invalid enum value. Expected ${le.joinValues(r.options)}, received '${r.received}'`;break;case N.invalid_arguments:t="Invalid function arguments";break;case N.invalid_return_type:t="Invalid function return type";break;case N.invalid_date:t="Invalid date";break;case N.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:le.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case N.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case N.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case N.custom:t="Invalid input";break;case N.invalid_intersection_types:t="Intersection results could not be merged";break;case N.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case N.not_finite:t="Number must be finite";break;default:t=e.defaultError,le.assertNever(r)}return{message:t}};let Tg=fi;function QP(r){Tg=r}function ws(){return Tg}const Bs=r=>{const{data:e,path:t,errorMaps:n,issueData:a}=r,s=[...t,...a.path||[]],o={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let l="";const p=n.filter(u=>!!u).slice().reverse();for(const u of p)l=u(o,{data:e,defaultError:l}).message;return{...a,path:s,message:l}},eA=[];function F(r,e){const t=ws(),n=Bs({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===fi?void 0:fi].filter(a=>!!a)});r.common.issues.push(n)}class yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const a of t){if(a.status==="aborted")return z;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const a of t){const s=await a.key,o=await a.value;n.push({key:s,value:o})}return yt.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const a of t){const{key:s,value:o}=a;if(s.status==="aborted"||o.status==="aborted")return z;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}}const z=Object.freeze({status:"aborted"}),mi=r=>({status:"dirty",value:r}),gt=r=>({status:"valid",value:r}),fd=r=>r.status==="aborted",md=r=>r.status==="dirty",ia=r=>r.status==="valid",aa=r=>typeof Promise<"u"&&r instanceof Promise;function Ms(r,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(r):n?n.value:e.get(r)}function Eg(r,e,t,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t}typeof SuppressedError=="function"&&SuppressedError;var W;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(W||(W={}));var sa,oa;class pn{constructor(e,t,n,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Rg=(r,e)=>{if(ia(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new wt(r.common.issues);return this._error=t,this._error}}};function ne(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:a}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,l)=>{var p,u;const{message:h}=r;return o.code==="invalid_enum_value"?{message:h??l.defaultError}:typeof l.data>"u"?{message:(p=h??n)!==null&&p!==void 0?p:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(u=h??t)!==null&&u!==void 0?u:l.defaultError}},description:a}}class ie{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Hn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Hn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new yt,ctx:{common:e.parent.common,data:e.data,parsedType:Hn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(aa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const a={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return Rg(a,s)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Hn(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(aa(a)?a:Promise.resolve(a));return Rg(n,s)}refine(e,t){const n=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,s)=>{const o=e(a),l=()=>s.addIssue({code:N.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(p=>p?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,t){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof t=="function"?t(n,a):t),!1))}_refinement(e){return new nn({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return hn.create(this,this._def)}nullable(){return Xn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tn.create(this,this._def)}promise(){return gi.create(this,this._def)}or(e){return ua.create([this,e],this._def)}and(e){return pa.create(this,e,this._def)}transform(e){return new nn({...ne(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Ta({...ne(this._def),innerType:this,defaultValue:t,typeName:Y.ZodDefault})}brand(){return new Rd({typeName:Y.ZodBranded,type:this,...ne(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ea({...ne(this._def),innerType:this,catchValue:t,typeName:Y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ra.create(this,e)}readonly(){return ga.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tA=/^c[^\s-]{8,}$/i,nA=/^[0-9a-z]+$/,rA=/^[0-9A-HJKMNP-TV-Z]{26}$/,iA=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,aA=/^[a-z0-9_-]{21}$/i,sA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,oA=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Td;const dA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cA=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,uA=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pA=new RegExp(`^${gg}$`);function bg(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function yA(r){return new RegExp(`^${bg(r)}$`)}function vg(r){let e=`${gg}T${bg(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function hA(r,e){return!!((e==="v4"||!e)&&dA.test(r)||(e==="v6"||!e)&&cA.test(r))}class en extends ie{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.string,received:s.parsedType}),z}const n=new yt;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,l=e.data.length<s.value;(o||l)&&(a=this._getOrReturnCtx(e,a),o?F(a,{code:N.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&F(a,{code:N.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")oA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"email",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Td||(Td=new RegExp(lA,"u")),Td.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"emoji",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")iA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"uuid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")aA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"nanoid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")tA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"cuid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")nA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"cuid2",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")rA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"ulid",code:N.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),F(a,{validation:"url",code:N.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"regex",code:N.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?vg(s).test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?pA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?yA(s).test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{code:N.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?sA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"duration",code:N.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?hA(e.data,s.version)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"ip",code:N.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?uA.test(e.data)||(a=this._getOrReturnCtx(e,a),F(a,{validation:"base64",code:N.invalid_string,message:s.message}),n.dirty()):le.assertNever(s);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(a=>e.test(a),{validation:t,code:N.invalid_string,...W.errToObj(n)})}_addCheck(e){return new en({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...W.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...W.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...W.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...W.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...W.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...W.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...W.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...W.errToObj(t)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new en({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new en({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}en.create=r=>{var e;return new en({checks:[],typeName:Y.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...ne(r)})};function fA(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=t>n?t:n,s=parseInt(r.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class zn extends ie{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.number){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.number,received:s.parsedType}),z}let n;const a=new yt;for(const s of this._def.checks)s.kind==="int"?le.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:N.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?fA(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_finite,message:s.message}),a.dirty()):le.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,n,a){return new zn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:W.toString(a)}]})}_addCheck(e){return new zn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&le.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}zn.create=r=>new zn({checks:[],typeName:Y.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...ne(r)});class Zn extends ie{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==x.bigint){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.bigint,received:s.parsedType}),z}let n;const a=new yt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),F(n,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):le.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,n,a){return new Zn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:W.toString(a)}]})}_addCheck(e){return new Zn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Zn.create=r=>{var e;return new Zn({checks:[],typeName:Y.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...ne(r)})};class la extends ie{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==x.boolean){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.boolean,received:n.parsedType}),z}return gt(e.data)}}la.create=r=>new la({typeName:Y.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...ne(r)});class br extends ie{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_type,expected:x.date,received:s.parsedType}),z}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return F(s,{code:N.invalid_date}),z}const n=new yt;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),F(a,{code:N.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):le.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new br({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}br.create=r=>new br({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:Y.ZodDate,...ne(r)});class _s extends ie{_parse(e){if(this._getType(e)!==x.symbol){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.symbol,received:n.parsedType}),z}return gt(e.data)}}_s.create=r=>new _s({typeName:Y.ZodSymbol,...ne(r)});class da extends ie{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.undefined,received:n.parsedType}),z}return gt(e.data)}}da.create=r=>new da({typeName:Y.ZodUndefined,...ne(r)});class ca extends ie{_parse(e){if(this._getType(e)!==x.null){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.null,received:n.parsedType}),z}return gt(e.data)}}ca.create=r=>new ca({typeName:Y.ZodNull,...ne(r)});class Ti extends ie{constructor(){super(...arguments),this._any=!0}_parse(e){return gt(e.data)}}Ti.create=r=>new Ti({typeName:Y.ZodAny,...ne(r)});class vr extends ie{constructor(){super(...arguments),this._unknown=!0}_parse(e){return gt(e.data)}}vr.create=r=>new vr({typeName:Y.ZodUnknown,...ne(r)});class Bn extends ie{_parse(e){const t=this._getOrReturnCtx(e);return F(t,{code:N.invalid_type,expected:x.never,received:t.parsedType}),z}}Bn.create=r=>new Bn({typeName:Y.ZodNever,...ne(r)});class Vs extends ie{_parse(e){if(this._getType(e)!==x.undefined){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.void,received:n.parsedType}),z}return gt(e.data)}}Vs.create=r=>new Vs({typeName:Y.ZodVoid,...ne(r)});class tn extends ie{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),a=this._def;if(t.parsedType!==x.array)return F(t,{code:N.invalid_type,expected:x.array,received:t.parsedType}),z;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,l=t.data.length<a.exactLength.value;(o||l)&&(F(t,{code:o?N.too_big:N.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(F(t,{code:N.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(F(t,{code:N.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>a.type._parseAsync(new pn(t,o,t.path,l)))).then(o=>yt.mergeArray(n,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new pn(t,o,t.path,l)));return yt.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new tn({...this._def,minLength:{value:e,message:W.toString(t)}})}max(e,t){return new tn({...this._def,maxLength:{value:e,message:W.toString(t)}})}length(e,t){return new tn({...this._def,exactLength:{value:e,message:W.toString(t)}})}nonempty(e){return this.min(1,e)}}tn.create=(r,e)=>new tn({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...ne(e)});function Ei(r){if(r instanceof Ke){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=hn.create(Ei(n))}return new Ke({...r._def,shape:()=>e})}else return r instanceof tn?new tn({...r._def,type:Ei(r.element)}):r instanceof hn?hn.create(Ei(r.unwrap())):r instanceof Xn?Xn.create(Ei(r.unwrap())):r instanceof yn?yn.create(r.items.map(e=>Ei(e))):r}class Ke extends ie{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=le.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const u=this._getOrReturnCtx(e);return F(u,{code:N.invalid_type,expected:x.object,received:u.parsedType}),z}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Bn&&this._def.unknownKeys==="strip"))for(const u in a.data)o.includes(u)||l.push(u);const p=[];for(const u of o){const h=s[u],f=a.data[u];p.push({key:{status:"valid",value:u},value:h._parse(new pn(a,f,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof Bn){const u=this._def.unknownKeys;if(u==="passthrough")for(const h of l)p.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(u==="strict")l.length>0&&(F(a,{code:N.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const h of l){const f=a.data[h];p.push({key:{status:"valid",value:h},value:u._parse(new pn(a,f,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const h of p){const f=await h.key,R=await h.value;u.push({key:f,value:R,alwaysSet:h.alwaysSet})}return u}).then(u=>yt.mergeObjectSync(n,u)):yt.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new Ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var a,s,o,l;const p=(o=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(l=W.errToObj(e).message)!==null&&l!==void 0?l:p}:{message:p}}}:{}})}strip(){return new Ke({...this._def,unknownKeys:"strip"})}passthrough(){return new Ke({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ke({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ke({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ke({...this._def,catchall:e})}pick(e){const t={};return le.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Ke({...this._def,shape:()=>t})}omit(e){const t={};return le.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Ke({...this._def,shape:()=>t})}deepPartial(){return Ei(this)}partial(e){const t={};return le.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];e&&!e[n]?t[n]=a:t[n]=a.optional()}),new Ke({...this._def,shape:()=>t})}required(e){const t={};return le.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof hn;)s=s._def.innerType;t[n]=s}}),new Ke({...this._def,shape:()=>t})}keyof(){return Ig(le.objectKeys(this.shape))}}Ke.create=(r,e)=>new Ke({shape:()=>r,unknownKeys:"strip",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)}),Ke.strictCreate=(r,e)=>new Ke({shape:()=>r,unknownKeys:"strict",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)}),Ke.lazycreate=(r,e)=>new Ke({shape:r,unknownKeys:"strip",catchall:Bn.create(),typeName:Y.ZodObject,...ne(e)});class ua extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function a(s){for(const l of s)if(l.result.status==="valid")return l.result;for(const l of s)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const o=s.map(l=>new wt(l.ctx.common.issues));return F(t,{code:N.invalid_union,unionErrors:o}),z}if(t.common.async)return Promise.all(n.map(async s=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let s;const o=[];for(const p of n){const u={...t,common:{...t.common,issues:[]},parent:null},h=p._parseSync({data:t.data,path:t.path,parent:u});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(p=>new wt(p));return F(t,{code:N.invalid_union,unionErrors:l}),z}}get options(){return this._def.options}}ua.create=(r,e)=>new ua({options:r,typeName:Y.ZodUnion,...ne(e)});const Mn=r=>r instanceof ha?Mn(r.schema):r instanceof nn?Mn(r.innerType()):r instanceof fa?[r.value]:r instanceof Kn?r.options:r instanceof ma?le.objectValues(r.enum):r instanceof Ta?Mn(r._def.innerType):r instanceof da?[void 0]:r instanceof ca?[null]:r instanceof hn?[void 0,...Mn(r.unwrap())]:r instanceof Xn?[null,...Mn(r.unwrap())]:r instanceof Rd||r instanceof ga?Mn(r.unwrap()):r instanceof Ea?Mn(r._def.innerType):[];class Ns extends ie{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return F(t,{code:N.invalid_type,expected:x.object,received:t.parsedType}),z;const n=this.discriminator,a=t.data[n],s=this.optionsMap.get(a);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(F(t,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const a=new Map;for(const s of t){const o=Mn(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of o){if(a.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);a.set(l,s)}}return new Ns({typeName:Y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...ne(n)})}}function Ed(r,e){const t=Hn(r),n=Hn(e);if(r===e)return{valid:!0,data:r};if(t===x.object&&n===x.object){const a=le.objectKeys(e),s=le.objectKeys(r).filter(l=>a.indexOf(l)!==-1),o={...r,...e};for(const l of s){const p=Ed(r[l],e[l]);if(!p.valid)return{valid:!1};o[l]=p.data}return{valid:!0,data:o}}else if(t===x.array&&n===x.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<r.length;s++){const o=r[s],l=e[s],p=Ed(o,l);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===x.date&&n===x.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class pa extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=(s,o)=>{if(fd(s)||fd(o))return z;const l=Ed(s.value,o.value);return l.valid?((md(s)||md(o))&&t.dirty(),{status:t.value,value:l.data}):(F(n,{code:N.invalid_intersection_types}),z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>a(s,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}pa.create=(r,e,t)=>new pa({left:r,right:e,typeName:Y.ZodIntersection,...ne(t)});class yn extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.array)return F(n,{code:N.invalid_type,expected:x.array,received:n.parsedType}),z;if(n.data.length<this._def.items.length)return F(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),z;!this._def.rest&&n.data.length>this._def.items.length&&(F(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...n.data].map((o,l)=>{const p=this._def.items[l]||this._def.rest;return p?p._parse(new pn(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>yt.mergeArray(t,o)):yt.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new yn({...this._def,rest:e})}}yn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yn({items:r,typeName:Y.ZodTuple,rest:null,...ne(e)})};class ya extends ie{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.object)return F(n,{code:N.invalid_type,expected:x.object,received:n.parsedType}),z;const a=[],s=this._def.keyType,o=this._def.valueType;for(const l in n.data)a.push({key:s._parse(new pn(n,l,n.path,l)),value:o._parse(new pn(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?yt.mergeObjectAsync(t,a):yt.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof ie?new ya({keyType:e,valueType:t,typeName:Y.ZodRecord,...ne(n)}):new ya({keyType:en.create(),valueType:e,typeName:Y.ZodRecord,...ne(t)})}}class Ls extends ie{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.map)return F(n,{code:N.invalid_type,expected:x.map,received:n.parsedType}),z;const a=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([l,p],u)=>({key:a._parse(new pn(n,l,n.path,[u,"key"])),value:s._parse(new pn(n,p,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const p of o){const u=await p.key,h=await p.value;if(u.status==="aborted"||h.status==="aborted")return z;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(u.value,h.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const p of o){const u=p.key,h=p.value;if(u.status==="aborted"||h.status==="aborted")return z;(u.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(u.value,h.value)}return{status:t.value,value:l}}}}Ls.create=(r,e,t)=>new Ls({valueType:e,keyType:r,typeName:Y.ZodMap,...ne(t)});class Ir extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==x.set)return F(n,{code:N.invalid_type,expected:x.set,received:n.parsedType}),z;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(F(n,{code:N.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(F(n,{code:N.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const s=this._def.valueType;function o(p){const u=new Set;for(const h of p){if(h.status==="aborted")return z;h.status==="dirty"&&t.dirty(),u.add(h.value)}return{status:t.value,value:u}}const l=[...n.data.values()].map((p,u)=>s._parse(new pn(n,p,n.path,u)));return n.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new Ir({...this._def,minSize:{value:e,message:W.toString(t)}})}max(e,t){return new Ir({...this._def,maxSize:{value:e,message:W.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ir.create=(r,e)=>new Ir({valueType:r,minSize:null,maxSize:null,typeName:Y.ZodSet,...ne(e)});class Ri extends ie{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return F(t,{code:N.invalid_type,expected:x.function,received:t.parsedType}),z;function n(l,p){return Bs({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ws(),fi].filter(u=>!!u),issueData:{code:N.invalid_arguments,argumentsError:p}})}function a(l,p){return Bs({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ws(),fi].filter(u=>!!u),issueData:{code:N.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof gi){const l=this;return gt(async function(...p){const u=new wt([]),h=await l._def.args.parseAsync(p,s).catch(v=>{throw u.addIssue(n(p,v)),u}),f=await Reflect.apply(o,this,h);return await l._def.returns._def.type.parseAsync(f,s).catch(v=>{throw u.addIssue(a(f,v)),u})})}else{const l=this;return gt(function(...p){const u=l._def.args.safeParse(p,s);if(!u.success)throw new wt([n(p,u.error)]);const h=Reflect.apply(o,this,u.data),f=l._def.returns.safeParse(h,s);if(!f.success)throw new wt([a(h,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ri({...this._def,args:yn.create(e).rest(vr.create())})}returns(e){return new Ri({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Ri({args:e||yn.create([]).rest(vr.create()),returns:t||vr.create(),typeName:Y.ZodFunction,...ne(n)})}}class ha extends ie{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ha.create=(r,e)=>new ha({getter:r,typeName:Y.ZodLazy,...ne(e)});class fa extends ie{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return F(t,{received:t.data,code:N.invalid_literal,expected:this._def.value}),z}return{status:"valid",value:e.data}}get value(){return this._def.value}}fa.create=(r,e)=>new fa({value:r,typeName:Y.ZodLiteral,...ne(e)});function Ig(r,e){return new Kn({values:r,typeName:Y.ZodEnum,...ne(e)})}class Kn extends ie{constructor(){super(...arguments),sa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return F(t,{expected:le.joinValues(n),received:t.parsedType,code:N.invalid_type}),z}if(Ms(this,sa,"f")||Eg(this,sa,new Set(this._def.values),"f"),!Ms(this,sa,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return F(t,{received:t.data,code:N.invalid_enum_value,options:n}),z}return gt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Kn.create(e,{...this._def,...t})}exclude(e,t=this._def){return Kn.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}sa=new WeakMap,Kn.create=Ig;class ma extends ie{constructor(){super(...arguments),oa.set(this,void 0)}_parse(e){const t=le.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==x.string&&n.parsedType!==x.number){const a=le.objectValues(t);return F(n,{expected:le.joinValues(a),received:n.parsedType,code:N.invalid_type}),z}if(Ms(this,oa,"f")||Eg(this,oa,new Set(le.getValidEnumValues(this._def.values)),"f"),!Ms(this,oa,"f").has(e.data)){const a=le.objectValues(t);return F(n,{received:n.data,code:N.invalid_enum_value,options:a}),z}return gt(e.data)}get enum(){return this._def.values}}oa=new WeakMap,ma.create=(r,e)=>new ma({values:r,typeName:Y.ZodNativeEnum,...ne(e)});class gi extends ie{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&t.common.async===!1)return F(t,{code:N.invalid_type,expected:x.promise,received:t.parsedType}),z;const n=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return gt(n.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}gi.create=(r,e)=>new gi({type:r,typeName:Y.ZodPromise,...ne(e)});class nn extends ie{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:o=>{F(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const o=a.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return z;const p=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return p.status==="aborted"?z:p.status==="dirty"||t.value==="dirty"?mi(p.value):p});{if(t.value==="aborted")return z;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?z:l.status==="dirty"||t.value==="dirty"?mi(l.value):l}}if(a.type==="refinement"){const o=l=>{const p=a.refinement(l,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?z:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?z:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ia(o))return o;const l=a.transform(o.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ia(o)?Promise.resolve(a.transform(o.value,s)).then(l=>({status:t.value,value:l})):o);le.assertNever(a)}}nn.create=(r,e,t)=>new nn({schema:r,typeName:Y.ZodEffects,effect:e,...ne(t)}),nn.createWithPreprocess=(r,e,t)=>new nn({schema:e,effect:{type:"preprocess",transform:r},typeName:Y.ZodEffects,...ne(t)});class hn extends ie{_parse(e){return this._getType(e)===x.undefined?gt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hn.create=(r,e)=>new hn({innerType:r,typeName:Y.ZodOptional,...ne(e)});class Xn extends ie{_parse(e){return this._getType(e)===x.null?gt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xn.create=(r,e)=>new Xn({innerType:r,typeName:Y.ZodNullable,...ne(e)});class Ta extends ie{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===x.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ta.create=(r,e)=>new Ta({innerType:r,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ne(e)});class Ea extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return aa(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new wt(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new wt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ea.create=(r,e)=>new Ea({innerType:r,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ne(e)});class Gs extends ie{_parse(e){if(this._getType(e)!==x.nan){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:x.nan,received:n.parsedType}),z}return{status:"valid",value:e.data}}}Gs.create=r=>new Gs({typeName:Y.ZodNaN,...ne(r)});const mA=Symbol("zod_brand");class Rd extends ie{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ra extends ie{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?z:s.status==="dirty"?(t.dirty(),mi(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?z:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,t){return new Ra({in:e,out:t,typeName:Y.ZodPipeline})}}class ga extends ie{_parse(e){const t=this._def.innerType._parse(e),n=a=>(ia(a)&&(a.value=Object.freeze(a.value)),a);return aa(t)?t.then(a=>n(a)):n(t)}unwrap(){return this._def.innerType}}ga.create=(r,e)=>new ga({innerType:r,typeName:Y.ZodReadonly,...ne(e)});function Dg(r,e={},t){return r?Ti.create().superRefine((n,a)=>{var s,o;if(!r(n)){const l=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,p=(o=(s=l.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,u=typeof l=="string"?{message:l}:l;a.addIssue({code:"custom",...u,fatal:p})}}):Ti.create()}const TA={object:Ke.lazycreate};var Y;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Y||(Y={}));const EA=(r,e={message:`Input not instance of ${r.name}`})=>Dg(t=>t instanceof r,e),$s=en.create,gd=zn.create,RA=Gs.create,gA=Zn.create,bd=la.create,Sg=br.create,bA=_s.create,vA=da.create,Og=ca.create,IA=Ti.create,Fs=vr.create,DA=Bn.create,SA=Vs.create,OA=tn.create,Pg=Ke.create,PA=Ke.strictCreate,AA=ua.create,CA=Ns.create,wA=pa.create,BA=yn.create,Ag=ya.create,MA=Ls.create,_A=Ir.create,VA=Ri.create,NA=ha.create,LA=fa.create,Cg=Kn.create,GA=ma.create,$A=gi.create,wg=nn.create,FA=hn.create,UA=Xn.create,xA=nn.createWithPreprocess,jA=Ra.create;var y=Object.freeze({__proto__:null,defaultErrorMap:fi,setErrorMap:QP,getErrorMap:ws,makeIssue:Bs,EMPTY_PATH:eA,addIssueToContext:F,ParseStatus:yt,INVALID:z,DIRTY:mi,OK:gt,isAborted:fd,isDirty:md,isValid:ia,isAsync:aa,get util(){return le},get objectUtil(){return hd},ZodParsedType:x,getParsedType:Hn,ZodType:ie,datetimeRegex:vg,ZodString:en,ZodNumber:zn,ZodBigInt:Zn,ZodBoolean:la,ZodDate:br,ZodSymbol:_s,ZodUndefined:da,ZodNull:ca,ZodAny:Ti,ZodUnknown:vr,ZodNever:Bn,ZodVoid:Vs,ZodArray:tn,ZodObject:Ke,ZodUnion:ua,ZodDiscriminatedUnion:Ns,ZodIntersection:pa,ZodTuple:yn,ZodRecord:ya,ZodMap:Ls,ZodSet:Ir,ZodFunction:Ri,ZodLazy:ha,ZodLiteral:fa,ZodEnum:Kn,ZodNativeEnum:ma,ZodPromise:gi,ZodEffects:nn,ZodTransformer:nn,ZodOptional:hn,ZodNullable:Xn,ZodDefault:Ta,ZodCatch:Ea,ZodNaN:Gs,BRAND:mA,ZodBranded:Rd,ZodPipeline:Ra,ZodReadonly:ga,custom:Dg,Schema:ie,ZodSchema:ie,late:TA,get ZodFirstPartyTypeKind(){return Y},coerce:{string:r=>en.create({...r,coerce:!0}),number:r=>zn.create({...r,coerce:!0}),boolean:r=>la.create({...r,coerce:!0}),bigint:r=>Zn.create({...r,coerce:!0}),date:r=>br.create({...r,coerce:!0})},any:IA,array:OA,bigint:gA,boolean:bd,date:Sg,discriminatedUnion:CA,effect:wg,enum:Cg,function:VA,instanceof:EA,intersection:wA,lazy:NA,literal:LA,map:MA,nan:RA,nativeEnum:GA,never:DA,null:Og,nullable:UA,number:gd,object:Pg,oboolean:()=>bd().optional(),onumber:()=>gd().optional(),optional:FA,ostring:()=>$s().optional(),pipeline:jA,preprocess:xA,promise:$A,record:Ag,set:_A,strictObject:PA,string:$s,symbol:bA,transformer:wg,tuple:BA,undefined:vA,union:AA,unknown:Fs,void:SA,NEVER:z,ZodIssueCode:N,quotelessJson:XP,ZodError:wt});function Bg(r){var a,s,o;if(!(r!=null&&r.dataType))return Fs();const e=!r.required,t=r.dataType.isList||!1;let n=Fs();if(((a=r.dataType.entity)==null?void 0:a.type)===i.PrimitiveEntity)switch(r.dataType.entity.name){case C.String:n=$s();break;case C.KeyValue:n=Ag(Fs());break;case C.Number:n=gd();break;case C.Boolean:n=bd();break;case C.Date:n=Sg();break;case C.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);n=Cg(l);break}case C.Null:n=Og();break;case C.UUID:n=$s().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===i.DefinitionEntity)n=Mg(r.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=r.dataType.entity)==null?void 0:o.type}`);return e&&(n=n.nullable()),t&&(n=n.array()),n}function Mg(r){const e=Pg({});for(const t of r.properties){const n=Bg(t);e.shape[t.name]=n}return e}function _g(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function Vg(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function Ng(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function Lg(r){return r.rangeStart&&r.rangeEnd?Ng(r):r.rangeStart?_g(r):r.rangeEnd?Vg(r):new Date}function kA(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Gg={},Us={},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=JA;let js;const qA=new Uint8Array(16);function JA(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(qA)}var Qn={},Dr={},ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var WA=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;ks.default=WA,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.default=void 0;var YA=HA(ks);function HA(r){return r&&r.__esModule?r:{default:r}}function zA(r){return typeof r=="string"&&YA.default.test(r)}var ZA=zA;Dr.default=ZA,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.default=void 0,Qn.unsafeStringify=$g;var KA=XA(Dr);function XA(r){return r&&r.__esModule?r:{default:r}}const ut=[];for(let r=0;r<256;++r)ut.push((r+256).toString(16).slice(1));function $g(r,e=0){return ut[r[e+0]]+ut[r[e+1]]+ut[r[e+2]]+ut[r[e+3]]+"-"+ut[r[e+4]]+ut[r[e+5]]+"-"+ut[r[e+6]]+ut[r[e+7]]+"-"+ut[r[e+8]]+ut[r[e+9]]+"-"+ut[r[e+10]]+ut[r[e+11]]+ut[r[e+12]]+ut[r[e+13]]+ut[r[e+14]]+ut[r[e+15]]}function QA(r,e=0){const t=$g(r,e);if(!(0,KA.default)(t))throw TypeError("Stringified UUID is invalid");return t}var eC=QA;Qn.default=eC,Object.defineProperty(Us,"__esModule",{value:!0}),Us.default=void 0;var tC=rC(xs),nC=Qn;function rC(r){return r&&r.__esModule?r:{default:r}}let Fg,vd,Id=0,Dd=0;function iC(r,e,t){let n=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||Fg,o=r.clockseq!==void 0?r.clockseq:vd;if(s==null||o==null){const R=r.random||(r.rng||tC.default)();s==null&&(s=Fg=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=vd=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:Dd+1;const u=l-Id+(p-Dd)/1e4;if(u<0&&r.clockseq===void 0&&(o=o+1&16383),(u<0||l>Id)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Id=l,Dd=p,vd=o,l+=122192928e5;const h=((l&268435455)*1e4+p)%4294967296;a[n++]=h>>>24&255,a[n++]=h>>>16&255,a[n++]=h>>>8&255,a[n++]=h&255;const f=l/4294967296*1e4&268435455;a[n++]=f>>>8&255,a[n++]=f&255,a[n++]=f>>>24&15|16,a[n++]=f>>>16&255,a[n++]=o>>>8|128,a[n++]=o&255;for(let R=0;R<6;++R)a[n+R]=s[R];return e||(0,nC.unsafeStringify)(a)}var aC=iC;Us.default=aC;var qs={},er={},ba={};Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var sC=oC(Dr);function oC(r){return r&&r.__esModule?r:{default:r}}function lC(r){if(!(0,sC.default)(r))throw TypeError("Invalid UUID");let e;const t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var dC=lC;ba.default=dC,Object.defineProperty(er,"__esModule",{value:!0}),er.URL=er.DNS=void 0,er.default=hC;var cC=Qn,uC=pC(ba);function pC(r){return r&&r.__esModule?r:{default:r}}function yC(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const Ug="6ba7b810-9dad-11d1-80b4-00c04fd430c8";er.DNS=Ug;const xg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";er.URL=xg;function hC(r,e,t){function n(a,s,o,l){var p;if(typeof a=="string"&&(a=yC(a)),typeof s=="string"&&(s=(0,uC.default)(s)),((p=s)===null||p===void 0?void 0:p.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+a.length);if(u.set(s),u.set(a,s.length),u=t(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,o){l=l||0;for(let h=0;h<16;++h)o[l+h]=u[h];return o}return(0,cC.unsafeStringify)(u)}try{n.name=r}catch{}return n.DNS=Ug,n.URL=xg,n}var Js={};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=void 0;function fC(r){if(typeof r=="string"){const e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(let t=0;t<e.length;++t)r[t]=e.charCodeAt(t)}return mC(TC(EC(r),r.length*8))}function mC(r){const e=[],t=r.length*32,n="0123456789abcdef";for(let a=0;a<t;a+=8){const s=r[a>>5]>>>a%32&255,o=parseInt(n.charAt(s>>>4&15)+n.charAt(s&15),16);e.push(o)}return e}function jg(r){return(r+64>>>9<<4)+14+1}function TC(r,e){r[e>>5]|=128<<e%32,r[jg(e)-1]=e;let t=1732584193,n=-271733879,a=-1732584194,s=271733878;for(let o=0;o<r.length;o+=16){const l=t,p=n,u=a,h=s;t=ht(t,n,a,s,r[o],7,-680876936),s=ht(s,t,n,a,r[o+1],12,-389564586),a=ht(a,s,t,n,r[o+2],17,606105819),n=ht(n,a,s,t,r[o+3],22,-1044525330),t=ht(t,n,a,s,r[o+4],7,-176418897),s=ht(s,t,n,a,r[o+5],12,1200080426),a=ht(a,s,t,n,r[o+6],17,-1473231341),n=ht(n,a,s,t,r[o+7],22,-45705983),t=ht(t,n,a,s,r[o+8],7,1770035416),s=ht(s,t,n,a,r[o+9],12,-1958414417),a=ht(a,s,t,n,r[o+10],17,-42063),n=ht(n,a,s,t,r[o+11],22,-1990404162),t=ht(t,n,a,s,r[o+12],7,1804603682),s=ht(s,t,n,a,r[o+13],12,-40341101),a=ht(a,s,t,n,r[o+14],17,-1502002290),n=ht(n,a,s,t,r[o+15],22,1236535329),t=ft(t,n,a,s,r[o+1],5,-165796510),s=ft(s,t,n,a,r[o+6],9,-1069501632),a=ft(a,s,t,n,r[o+11],14,643717713),n=ft(n,a,s,t,r[o],20,-373897302),t=ft(t,n,a,s,r[o+5],5,-701558691),s=ft(s,t,n,a,r[o+10],9,38016083),a=ft(a,s,t,n,r[o+15],14,-660478335),n=ft(n,a,s,t,r[o+4],20,-405537848),t=ft(t,n,a,s,r[o+9],5,568446438),s=ft(s,t,n,a,r[o+14],9,-1019803690),a=ft(a,s,t,n,r[o+3],14,-187363961),n=ft(n,a,s,t,r[o+8],20,1163531501),t=ft(t,n,a,s,r[o+13],5,-1444681467),s=ft(s,t,n,a,r[o+2],9,-51403784),a=ft(a,s,t,n,r[o+7],14,1735328473),n=ft(n,a,s,t,r[o+12],20,-1926607734),t=mt(t,n,a,s,r[o+5],4,-378558),s=mt(s,t,n,a,r[o+8],11,-2022574463),a=mt(a,s,t,n,r[o+11],16,1839030562),n=mt(n,a,s,t,r[o+14],23,-35309556),t=mt(t,n,a,s,r[o+1],4,-1530992060),s=mt(s,t,n,a,r[o+4],11,1272893353),a=mt(a,s,t,n,r[o+7],16,-155497632),n=mt(n,a,s,t,r[o+10],23,-1094730640),t=mt(t,n,a,s,r[o+13],4,681279174),s=mt(s,t,n,a,r[o],11,-358537222),a=mt(a,s,t,n,r[o+3],16,-722521979),n=mt(n,a,s,t,r[o+6],23,76029189),t=mt(t,n,a,s,r[o+9],4,-640364487),s=mt(s,t,n,a,r[o+12],11,-421815835),a=mt(a,s,t,n,r[o+15],16,530742520),n=mt(n,a,s,t,r[o+2],23,-995338651),t=Tt(t,n,a,s,r[o],6,-198630844),s=Tt(s,t,n,a,r[o+7],10,1126891415),a=Tt(a,s,t,n,r[o+14],15,-1416354905),n=Tt(n,a,s,t,r[o+5],21,-57434055),t=Tt(t,n,a,s,r[o+12],6,1700485571),s=Tt(s,t,n,a,r[o+3],10,-1894986606),a=Tt(a,s,t,n,r[o+10],15,-1051523),n=Tt(n,a,s,t,r[o+1],21,-2054922799),t=Tt(t,n,a,s,r[o+8],6,1873313359),s=Tt(s,t,n,a,r[o+15],10,-30611744),a=Tt(a,s,t,n,r[o+6],15,-1560198380),n=Tt(n,a,s,t,r[o+13],21,1309151649),t=Tt(t,n,a,s,r[o+4],6,-145523070),s=Tt(s,t,n,a,r[o+11],10,-1120210379),a=Tt(a,s,t,n,r[o+2],15,718787259),n=Tt(n,a,s,t,r[o+9],21,-343485551),t=tr(t,l),n=tr(n,p),a=tr(a,u),s=tr(s,h)}return[t,n,a,s]}function EC(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(jg(e));for(let n=0;n<e;n+=8)t[n>>5]|=(r[n/8]&255)<<n%32;return t}function tr(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function RC(r,e){return r<<e|r>>>32-e}function Ws(r,e,t,n,a,s){return tr(RC(tr(tr(e,r),tr(n,s)),a),t)}function ht(r,e,t,n,a,s,o){return Ws(e&t|~e&n,r,e,a,s,o)}function ft(r,e,t,n,a,s,o){return Ws(e&n|t&~n,r,e,a,s,o)}function mt(r,e,t,n,a,s,o){return Ws(e^t^n,r,e,a,s,o)}function Tt(r,e,t,n,a,s,o){return Ws(t^(e|~n),r,e,a,s,o)}var gC=fC;Js.default=gC,Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=void 0;var bC=kg(er),vC=kg(Js);function kg(r){return r&&r.__esModule?r:{default:r}}var IC=(0,bC.default)("v3",48,vC.default);qs.default=IC;var Ys={},Hs={};Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.default=void 0;var DC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Hs.default=DC,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.default=void 0;var qg=Jg(Hs),SC=Jg(xs),OC=Qn;function Jg(r){return r&&r.__esModule?r:{default:r}}function PC(r,e,t){if(qg.default.randomUUID&&!e&&!r)return qg.default.randomUUID();r=r||{};const n=r.random||(r.rng||SC.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return(0,OC.unsafeStringify)(n)}var AC=PC;Ys.default=AC;var zs={},Zs={};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.default=void 0;function CC(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function Sd(r,e){return r<<e|r>>>32-e}function wC(r){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){const o=unescape(encodeURIComponent(r));r=[];for(let l=0;l<o.length;++l)r.push(o.charCodeAt(l))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);const n=r.length/4+2,a=Math.ceil(n/16),s=new Array(a);for(let o=0;o<a;++o){const l=new Uint32Array(16);for(let p=0;p<16;++p)l[p]=r[o*64+p*4]<<24|r[o*64+p*4+1]<<16|r[o*64+p*4+2]<<8|r[o*64+p*4+3];s[o]=l}s[a-1][14]=(r.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(r.length-1)*8&4294967295;for(let o=0;o<a;++o){const l=new Uint32Array(80);for(let v=0;v<16;++v)l[v]=s[o][v];for(let v=16;v<80;++v)l[v]=Sd(l[v-3]^l[v-8]^l[v-14]^l[v-16],1);let p=t[0],u=t[1],h=t[2],f=t[3],R=t[4];for(let v=0;v<80;++v){const I=Math.floor(v/20),D=Sd(p,5)+CC(I,u,h,f)+R+e[I]+l[v]>>>0;R=f,f=h,h=Sd(u,30)>>>0,u=p,p=D}t[0]=t[0]+p>>>0,t[1]=t[1]+u>>>0,t[2]=t[2]+h>>>0,t[3]=t[3]+f>>>0,t[4]=t[4]+R>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var BC=wC;Zs.default=BC,Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=void 0;var MC=Wg(er),_C=Wg(Zs);function Wg(r){return r&&r.__esModule?r:{default:r}}var VC=(0,MC.default)("v5",80,_C.default);zs.default=VC;var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.default=void 0;var NC="00000000-0000-0000-0000-000000000000";Ks.default=NC;var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.default=void 0;var LC=GC(Dr);function GC(r){return r&&r.__esModule?r:{default:r}}function $C(r){if(!(0,LC.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var FC=$C;Xs.default=FC,function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return o.default}});var e=h(Us),t=h(qs),n=h(Ys),a=h(zs),s=h(Ks),o=h(Xs),l=h(Dr),p=h(Qn),u=h(ba);function h(f){return f&&f.__esModule?f:{default:f}}}(Gg);function Od(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}Od.prototype.convert=function(r){var e,t,n,a={},s=this.srcAlphabet.length,o=this.dstAlphabet.length,l=r.length,p=typeof r=="string"?"":[];if(!this.isValid(r))throw new Error('Number "'+r+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return r;for(e=0;e<l;e++)a[e]=this.srcAlphabet.indexOf(r[e]);do{for(t=0,n=0,e=0;e<l;e++)t=t*s+a[e],t>=o?(a[n++]=parseInt(t/o,10),t=t%o):n>0&&(a[n++]=0);l=n,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(n!==0);return p},Od.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var UC=Od,xC=UC;function va(r,e){var t=new xC(r,e);return function(n){return t.convert(n)}}va.BIN="01",va.OCT="01234567",va.DEC="0123456789",va.HEX="0123456789abcdef";var jC=va;const{v4:Pd,validate:kC}=Gg,Qs=jC,Ad={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},qC={consistentLength:!0};let Cd;const Yg=(r,e,t)=>{const n=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?n:n.padStart(t.shortIdLength,t.paddingChar)},Hg=(r,e)=>{const n=e(r).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[n[1],n[2],n[3],n[4],n[5]].join("-")},JC=r=>Math.ceil(Math.log(2**128)/Math.log(r));var WC=(()=>{const r=(e,t)=>{const n=e||Ad.flickrBase58,a={...qC,...t};if([...new Set(Array.from(n))].length!==n.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const s=JC(n.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:n[0]},l=Qs(Qs.HEX,n),p=Qs(n,Qs.HEX),u=()=>Yg(Pd(),l,o),f={alphabet:n,fromUUID:R=>Yg(R,l,o),maxLength:s,generate:u,new:u,toUUID:R=>Hg(R,p),uuid:Pd,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const I=a.consistentLength?R.length===s:R.length<=s,D=R.split("").every(O=>n.includes(O));return v===!1?I&&D:I&&D&&kC(Hg(R,p))}};return Object.freeze(f),f};return r.constants=Ad,r.uuid=Pd,r.generate=()=>(Cd||(Cd=r(Ad.flickrBase58).generate),Cd()),r})();const eo=kA(WC);function zg(){return eo().uuid()}function Zg(r){return r.rangeStart+Math.random()}function Kg(r){const e=r.rangeEnd;return Math.random()*e}function Xg(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function Qg(r){return r.rangeStart&&r.rangeEnd?Xg(r):r.rangeStart?Zg(r):r.rangeEnd?Kg(r):Math.random()}function eb(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function tb(r){const e=r.rangeEnd;return Math.random().toString(36).substring(0,e)}function nb(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random().toString(36).substring(e,t)}function rb(r){return r.rangeStart&&r.rangeEnd?nb(r):r.rangeStart?eb(r):r.rangeEnd?tb(r):Math.random().toString(36)}function ib(r){return Math.random()>=.5}function YC(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case ze.CurrentDateAndTime:if(r.name===C.Date)return new Date;case ze.Random:{if(r.name===C.Date)return Lg(r.autogeneration);if(r.name===C.Number)return Qg(r.autogeneration);if(r.name===C.String)return rb(r.autogeneration);if(r.name===C.Boolean)return ib(r.autogeneration)}case ze.Unique:if(r.name===C.UUID)return zg();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const H="e7eb5382-3d99-44fd-972a-b8b1e819f6be",ab="global-user-variable-id",wd="last-executed-timestamp-variable-id",HC={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:i.ValueDescriptor},zC={id:"alternative-relational-database-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:i.Property},ZC={like:!1,inferred:!1,id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:zC},to={id:"alternative-relational-database-entity-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-id",entityType:i.DefinitionEntity},KC={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!1,implements:vs,static:!0,index:0,defaultValue:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:null,parent:HC,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:ZC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:to};i.GenericReference,i.ValueDescriptor;const XC={id:"alternative-relational-database-entity-username-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:i.Property},QC={like:!1,inferred:!1,id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:XC},ew={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:i.Property,private:!1,abstract:!1,implements:Is,static:!0,index:1,defaultValue:null,dataType:QC,description:"The username that will be used to connect to the database.",parent:to};i.GenericReference,i.ValueDescriptor;const tw={id:"alternative-relational-database-entity-password-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:i.Property},nw={like:!1,inferred:!1,id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:tw},rw={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:i.Property,private:!1,abstract:!1,implements:Ds,static:!0,index:2,defaultValue:null,dataType:nw,description:"The password that will be used to connect to the database.",parent:to},iw={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:i.ValueDescriptor},aw={id:"alternative-relational-database-entity-min-size-property-ref-id",type:i.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:i.Property},sw={like:!1,inferred:!1,id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:aw},ow={constant:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!1,implements:Ss,static:!0,index:3,defaultValue:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:iw,autogeneration:null,valueAsType:null},dataType:sw,description:"The minimum size of the database in GB.",parent:to},lw={id:"alternative-relational-database-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Bd={id:"alternative-relational-database-entity-id",type:i.DefinitionEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[KC,ew,rw,ow],methods:[],abstractMethods:[],extends:[],implements:[un],x:0,y:0,parent:lw},dw={id:"animal-prototype-database-property-ref-id",type:i.GenericReference,entityId:"animal-prototype-database-property-id",entityType:i.Property},cw={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"animal-prototype-database-property-id",entityType:i.Property},uw={like:!1,inferred:!1,id:"animal-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:dw},pw={id:"animal-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",entityType:i.DefinitionEntity},yw={constant:!1,hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Bd,autogeneration:null,parent:cw},dataType:uw,description:"The database that the entity belongs to.",parent:pw},hw={type:i.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:i.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},fw={like:!1,inferred:!1,id:"c1930577-9e79-48a6-8905-be24611015c1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:hw},mw={type:i.GenericReference,id:"animal-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970"},Tw={constant:!1,hidden:!1,required:!0,type:i.Property,id:"5cb617b0-92be-4dbe-a007-49093368d94f",version:1,name:"Name",description:"The name of the animal",defaultValue:null,implements:pi,static:!1,private:!1,index:0,dataType:fw,abstract:!1,parent:mw},Ew={type:i.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:i.Project,entityId:H},Rw={type:i.DefinitionEntity,id:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",version:1,name:"Animal",description:"A living creature that is not human",abstract:!1,static:!1,abstractMethods:[],properties:[yw,Tw],methods:[],extends:[],implements:[st],x:0,y:0,parent:Ew},Ia="base-table-entity",sb="base-table-entity-identifier-property-id";i.GenericReference,i.Property,i.GenericReference,i.Property;const gw={id:"base-table-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:sb,entityType:i.Property},bw={id:"base-table-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-identifier-property-id",entityType:i.Property},vw={like:!1,inferred:!1,id:"base-table-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:bw},Iw={id:"base-table-entity-identifier-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity};i.Property,i.LiteralValue,C.UUID,ze.Unique,i.GenericReference,i.Property;const Dw={id:"base-table-entity-deleted-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-deleted-at-property-id",entityType:i.Property},Sw={like:!1,inferred:!1,id:"base-table-entity-deleted-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Dw},Ow={id:"base-table-entity-deleted-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Pw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-deleted-at-property-id",name:"Deleted at",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,defaultValue:null,dataType:Sw,description:"The date and time when the entity was deleted.",parent:Ow};i.GenericReference,i.Property;const Aw={id:"base-table-entity-created-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-created-at-property-id",entityType:i.Property},Cw={like:!1,inferred:!1,id:"base-table-entity-created-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Aw},ww={id:"base-table-entity-created-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Bw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-created-at-property-id",name:"Created at",version:1,type:i.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,defaultValue:null,dataType:Cw,description:"The date and time when the entity was created.",parent:ww};i.GenericReference,i.Property;const Mw={id:"base-table-entity-updated-at-property-ref-id",type:i.GenericReference,entityId:"base-table-entity-updated-at-property-id",entityType:i.Property},_w={like:!1,inferred:!1,id:"base-table-entity-updated-at-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ln,asType:!1,parent:Mw},Vw={id:"base-table-entity-updated-at-property-parent-ref-id",type:i.GenericReference,entityId:Ia,entityType:i.DefinitionEntity},Nw={constant:!1,hidden:!0,required:!0,id:"base-table-entity-updated-at-property-id",name:"Updated at",version:1,type:i.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,defaultValue:null,dataType:_w,description:"The date and time when the entity was last updated.",parent:Vw},Lw={id:"base-table-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Ft={id:Ia,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:"Base database table format",type:i.DefinitionEntity,abstract:!0,static:!1,abstractMethods:[],implements:[],properties:[Pw,Bw,Nw],methods:[],extends:[],x:0,y:0,parent:Lw},Gw={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:i.Property},$w={id:"default-relational-database-entity-identifier-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:i.Property},Fw={like:!1,inferred:!1,id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:$w},bi={id:"default-relational-database-entity-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-id",entityType:i.DefinitionEntity},Uw={constant:!1,id:"default-relational-database-entity-identifier-property-id",hidden:!1,required:!0,name:"Identifier name",version:1,type:i.Property,private:!1,abstract:!1,implements:vs,static:!0,index:0,defaultValue:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"main",parent:Gw,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:Fw,description:"The name of the main database inside of the server instance where the data will be stored.",parent:bi};i.GenericReference,i.Property;const xw={id:"default-relational-database-entity-username-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:i.Property},jw={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:i.Property},kw={like:!1,inferred:!1,id:"default-relational-database-entity-username-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:xw},qw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:i.Property,private:!1,abstract:!1,implements:Is,defaultValue:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"root",parent:jw,autogeneration:null,valueAsType:null},static:!0,index:1,dataType:kw,description:"The username that will be used to connect to the database.",parent:bi};i.GenericReference,i.Property;const Jw={id:"default-relational-database-entity-password-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:i.Property},Ww={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:i.Property},Yw={like:!1,inferred:!1,id:"default-relational-database-entity-password-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:Jw},Hw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:i.Property,private:!1,abstract:!1,implements:Ds,static:!0,index:2,defaultValue:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"password",parent:Ww,autogeneration:null,valueAsType:null},dataType:Yw,description:"The password that will be used to connect to the database.",parent:bi},zw={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:i.Property},Zw={id:"default-relational-database-entity-min-size-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:i.Property},Kw={like:!1,inferred:!1,id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:Zw},Xw={constant:!1,hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:i.Property,private:!1,abstract:!1,implements:Ss,static:!0,index:3,defaultValue:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:6,parent:zw,autogeneration:null,valueAsType:null},dataType:Kw,description:"The minimum size of the database in GB.",parent:bi},Qw={id:"default-relational-database-entity-default-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:i.Property},eB={id:"default-relational-database-entity-default-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:i.Property},tB={like:!1,inferred:!1,id:"default-relational-database-entity-default-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:eB},nB={constant:!1,id:"default-relational-database-entity-default-property-id",hidden:!0,required:!0,name:"Default",description:"Whether this database is automatically picked by other entities as the default database.",version:1,type:i.Property,private:!1,abstract:!1,implements:ld,static:!0,index:4,dataType:tB,defaultValue:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!0,parent:Qw,autogeneration:null,valueAsType:null},parent:bi},rB={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:i.Property},iB={id:"default-relational-database-entity-autoscaling-property-ref-id",type:i.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:i.Property},aB={like:!1,inferred:!1,id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:ee,asType:!1,parent:iB},sB={constant:!1,id:"default-relational-database-entity-autoscaling-property-id",hidden:!1,required:!0,name:"Auto-scaling",version:1,type:i.Property,private:!1,abstract:!1,implements:dd,static:!0,index:5,defaultValue:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.Boolean,value:!0,parent:rB,autogeneration:null,valueAsType:null},dataType:aB,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:bi},oB={id:"default-relational-database-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Md={id:"default-relational-database-entity-id",type:i.DefinitionEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[nB,sB,Uw,qw,Hw,Xw],methods:[],abstractMethods:[],extends:[],implements:[un],x:0,y:0,parent:oB},lB={id:"user-prototype-database-property-data-type-ref-id",type:i.GenericReference,entityId:"user-prototype-database-property-id",entityType:i.Property},dB={id:"user-prototype-database-property-ref-id",type:i.GenericReference,entityId:"user-prototype-database-property-id",entityType:i.Property},cB={like:!1,inferred:!1,id:"user-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:dB},uB={id:"user-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:i.DefinitionEntity},pB={constant:!1,hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Md,autogeneration:null,parent:lB},dataType:cB,description:"The database that the entity belongs to.",parent:uB},yB={type:i.GenericReference,id:"user-prototype-parent-ref-id",entityType:i.Project,entityId:H},hB={id:"user-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"user-prototype-primary-key-property-id",entityType:i.Property},fB={id:"user-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"user-prototype-primary-key-property-id",entityType:i.Property},mB={like:!1,inferred:!1,id:"user-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:fB},TB={id:"user-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:i.DefinitionEntity},EB={constant:!1,hidden:!1,required:!0,id:"user-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:pi,static:!1,index:1,defaultValue:{id:"user-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:hB,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:mB,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:TB},_d={type:i.DefinitionEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[st,Ft],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[pB,EB],methods:[],x:0,y:0,parent:yB},RB={type:i.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:i.Property,entityId:"person-date-of-birth-property-id"},gB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ln,isList:!1,asType:!1,parent:RB},bB={type:i.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},vB={constant:!1,hidden:!1,required:!0,type:i.Property,id:"person-date-of-birth-property-id",version:1,name:"Date of birth",description:"The date of birth of the person",implements:null,private:!1,static:!1,index:0,defaultValue:null,dataType:gB,abstract:!1,parent:bB},IB={type:i.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:i.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},DB={like:!1,inferred:!1,id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:IB},SB={type:i.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:i.DefinitionEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},OB={constant:!1,hidden:!1,required:!0,type:i.Property,id:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7",version:1,name:"Name",description:"The name of the person",implements:null,private:!1,static:!1,index:0,defaultValue:null,dataType:DB,abstract:!1,parent:SB},PB={type:i.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:i.Project,entityId:H},bt={type:i.DefinitionEntity,id:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416",version:1,name:"Person",description:"A entity to store more information about a person than the user entity does, to split the responsibilities and keep it the logic clean.",properties:[OB,vB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[_d],x:0,y:0,parent:PB},AB={type:i.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},CB={type:i.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:i.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},wB={type:i.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:i.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},BB={type:i.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:i.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},MB={like:!1,inferred:!1,id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:BB},Vd={constant:!0,isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:i.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,defaultValue:null,dataType:MB,implements:null,readsValue:wB,required:!0,index:0,parent:CB},_B={type:i.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},VB={type:i.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:i.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},ob={type:i.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Vd],calledByError:[],calledByEntry:[_B],calledBySuccess:[],throws:null,x:0,y:0,parent:VB},NB={type:i.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:i.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},LB={like:!1,inferred:!1,id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:NB},lb={constant:!0,id:"500dee3a-3435-4453-9699-0d053f646523",type:i.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,defaultValue:null,dataType:LB,implements:null,required:!0,writesValues:[Vd],index:0,parent:AB},GB={type:i.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},db={type:i.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[lb],calls:[ob],returnStatements:[ob],index:0,collapsed:!1,private:!1,x:0,y:0,parent:GB},$B={type:i.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:i.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},FB={like:!1,inferred:!1,id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:$B},UB={type:i.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:i.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},xB={type:i.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},jB={constant:!0,required:!0,id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:i.VariableDeclaration,version:1,name:"Output Account Owner",description:null,defaultValue:null,dataType:FB,readsValue:UB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:xB},kB={type:i.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:i.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},qB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:i.OutputMap,version:1,declaration:Vd,defaultValue:null,writesValues:[jB],index:0,parent:kB},JB={type:i.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},WB={type:i.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},YB={type:i.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:i.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},HB={like:!1,inferred:!1,id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:YB},zB={type:i.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:i.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},ZB={type:i.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},KB={type:i.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:i.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},XB={type:i.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:i.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},cb={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:i.InputMap,version:1,declaration:lb,name:null,description:null,readsValue:XB,defaultValue:null,index:0,parent:KB},QB={constant:!0,required:!0,type:i.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,defaultValue:null,dataType:HB,readsValue:zB,writesValues:[cb],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:ZB},eM={type:i.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:db,inputs:[cb],outputs:[qB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[JB],calledBySuccess:[],parent:WB,error:null,x:0,y:0},tM={type:i.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:i.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},nM={like:!1,inferred:!1,id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,asType:!1,isList:!1,parent:tM},rM={type:i.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:i.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},iM={constant:!0,id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:i.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",defaultValue:null,dataType:nM,implements:null,required:!0,index:0,writesValues:[QB],parent:rM},aM={type:i.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},sM={type:i.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[iM],collapsed:!0,returnStatements:[],calls:[eM],private:!1,index:0,implements:null,x:0,y:0,parent:aM},oM={type:i.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:i.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},lM={like:!1,inferred:!1,id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:oM},dM={type:i.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},cM={constant:!1,hidden:!1,required:!0,type:i.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,defaultValue:null,implements:pi,static:!1,index:0,dataType:lM,abstract:!1,parent:dM},uM={type:i.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:i.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},pM={like:!1,inferred:!1,id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:uM},yM={type:i.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:i.DefinitionEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},hM={constant:!1,hidden:!1,required:!0,type:i.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,defaultValue:null,dataType:pM,implements:null,static:!1,private:!0,abstract:!1,parent:yM},fM={type:i.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:i.Project,entityId:H},vi={type:i.DefinitionEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[cM,hM],methods:[db,sM],extends:[],implements:[st,Ft],x:0,y:0,parent:fM},Da="bitcoin-api-response-id",ub="time-property-id",pb="disclaimer-property-id",yb="chart-name-property-id",hb="bpi-property-id",no="bpi-entity-id",fb="usd-property-id",mb="gbp-property-id",Tb="eur-property-id",Ii="currency-entity-id",Eb="currency-code-property-id",Rb="currency-symbol-property-id",gb="currency-rate-property-id",bb="currency-description-property-id",vb="currency-rate-number-property-id",mM={type:i.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:i.Property,entityId:Eb},TM={like:!1,inferred:!1,id:"code-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["USD","GBP","EUR"],parent:mM},EM={type:i.GenericReference,id:"code-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},RM={constant:!1,hidden:!1,required:!0,type:i.Property,id:Eb,version:1,name:"code",description:null,defaultValue:null,dataType:TM,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:EM},gM={type:i.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:i.Property,entityId:Rb},bM={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["$","£","€"],parent:gM},vM={type:i.GenericReference,id:"symbol-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},IM={constant:!1,hidden:!1,required:!0,type:i.Property,id:Rb,version:1,name:"symbol",description:null,index:0,defaultValue:null,dataType:bM,implements:null,static:!1,private:!1,abstract:!1,parent:vM},DM={type:i.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:i.Property,entityId:gb},SM={like:!1,inferred:!1,id:"rate-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:DM},OM={type:i.GenericReference,id:"rate-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},PM={constant:!1,hidden:!1,required:!0,type:i.Property,id:gb,version:1,name:"rate",description:null,index:0,defaultValue:null,dataType:SM,implements:null,static:!1,private:!1,abstract:!1,parent:OM},AM={type:i.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:i.Property,entityId:bb},CM={like:!1,inferred:!1,id:"description-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:AM},wM={type:i.GenericReference,id:"description-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},BM={constant:!1,hidden:!1,required:!0,type:i.Property,id:bb,version:1,name:"description",description:null,defaultValue:null,dataType:CM,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:wM},MM={type:i.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:i.Property,entityId:vb},_M={like:!1,inferred:!1,id:"rate-number-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:MM},VM={type:i.GenericReference,id:"rate-number-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Ii},NM={constant:!1,hidden:!1,required:!0,type:i.Property,id:vb,version:1,name:"rate_float",description:null,defaultValue:null,dataType:_M,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:VM},LM={type:i.GenericReference,id:"currency-prototype-parent-ref-id",entityType:i.Project,entityId:H},ro={type:i.DefinitionEntity,id:Ii,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[RM,IM,PM,BM,NM],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:LM},GM={type:i.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:i.Property,entityId:fb},$M={like:!1,inferred:!1,id:"usd-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:GM},FM={type:i.GenericReference,id:"usd-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},UM={constant:!1,hidden:!1,required:!0,id:fb,type:i.Property,version:1,name:"USD",description:null,index:0,dataType:$M,defaultValue:null,implements:null,static:!1,private:!1,abstract:!1,parent:FM},xM={type:i.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:i.Property,entityId:mb},jM={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:xM},kM={type:i.GenericReference,id:"gbp-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},qM={constant:!1,hidden:!1,required:!0,id:mb,type:i.Property,version:1,name:"GBP",description:null,index:0,dataType:jM,defaultValue:null,implements:null,static:!1,private:!1,abstract:!1,parent:kM},JM={type:i.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:i.Property,entityId:Tb},WM={like:!1,inferred:!1,id:"eur-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ro,isList:!1,asType:!1,parent:JM},YM={type:i.GenericReference,id:"eur-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:no},HM={constant:!1,hidden:!1,required:!0,id:Tb,type:i.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,defaultValue:null,dataType:WM,private:!1,abstract:!1,parent:YM},zM={type:i.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:i.Project,entityId:H},Ib={type:i.DefinitionEntity,id:no,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[UM,qM,HM],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:zM},ZM={type:i.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:i.Property,entityId:ub},KM={like:!1,inferred:!1,id:"time-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ai,isList:!1,asType:!1,parent:ZM},XM={type:i.GenericReference,id:"time-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},QM={constant:!1,hidden:!1,required:!0,type:i.Property,id:ub,version:1,name:"time",description:null,index:0,defaultValue:null,dataType:KM,implements:null,static:!1,private:!1,abstract:!1,parent:XM},e_={type:i.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:i.Property,entityId:pb},t_={like:!1,inferred:!1,id:"disclaimer-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:e_},n_={type:i.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},r_={constant:!1,hidden:!1,required:!0,type:i.Property,id:pb,version:1,name:"disclaimer",description:null,index:0,defaultValue:null,dataType:t_,implements:null,static:!1,private:!1,abstract:!1,parent:n_},i_={type:i.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:i.Property,entityId:yb},a_={like:!1,inferred:!1,id:"chart-name-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:i_},s_={type:i.GenericReference,id:"chart-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},o_={constant:!1,hidden:!1,required:!0,type:i.Property,id:yb,version:1,name:"chartName",description:null,index:0,defaultValue:null,dataType:a_,implements:null,static:!1,private:!1,abstract:!1,parent:s_},l_={type:i.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:i.Property,entityId:hb},d_={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ib,isList:!1,asType:!1,parent:l_},c_={type:i.GenericReference,id:"bpi-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:Da},u_={constant:!1,hidden:!1,required:!0,type:i.Property,id:hb,version:1,name:"bpi",description:null,implements:null,index:0,defaultValue:null,dataType:d_,static:!1,private:!1,abstract:!1,parent:c_},p_={type:i.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:i.Project,entityId:H},Db={type:i.DefinitionEntity,id:Da,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[QM,r_,o_,u_],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:p_},y_={type:i.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:i.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},h_={like:!1,inferred:!1,id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:y_},f_={type:i.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:i.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},m_={type:i.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:i.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},T_={like:!1,inferred:!1,id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:m_},E_={type:i.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:i.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Sb={constant:!0,isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",implements:null,defaultValue:null,dataType:T_,readsValue:E_,required:!0,index:0,parent:f_},R_={type:i.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},g_={constant:!0,id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:i.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,defaultValue:null,dataType:h_,writesValues:[Sb],required:!0,index:0,parent:R_},b_={type:i.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},v_={type:i.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},I_={type:i.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:i.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},Ob={type:i.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[Sb],calledByError:[],calledByEntry:[v_],calledBySuccess:[],throws:null,x:0,y:0,parent:I_},D_={type:i.FunctionDeclaration,id:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4",version:1,name:"Change owner of company",description:"Change the owner of the company to a new person",inputs:[g_],calls:[Ob],index:0,collapsed:!1,implements:null,returnStatements:[Ob],private:!1,x:0,y:0,parent:b_},S_={type:i.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},O_={type:i.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},P_={type:i.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:i.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},A_={type:i.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},C_={type:i.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:i.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},w_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,asType:!1,isList:!1,parent:C_},Nd={constant:!0,isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:i.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",defaultValue:null,dataType:w_,implements:null,readsValue:A_,required:!0,index:0,parent:P_},B_={type:i.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Ld={type:i.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[Nd],calledByError:[],calledByEntry:[],calledBySuccess:[S_,B_],throws:null,x:0,y:0,parent:O_},M_={type:i.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},__={type:i.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:i.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},Pb={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:i.InputMap,version:1,declaration:Ul,name:null,description:null,readsValue:__,defaultValue:null,parent:M_,index:2},V_={type:i.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:i.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},N_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,isList:!1,asType:!1,parent:V_},L_={type:i.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},G_={type:i.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:i.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},$_={type:i.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:i.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Ab={constant:!0,required:!0,type:i.VariableDeclaration,id:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a",version:1,name:"Is name registered",description:"Whether the company name is registered with the government company registry",defaultValue:null,dataType:N_,readsValue:G_,writesValues:[Nd],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[$_],successCalls:[Ld],errorCalls:[],internalCalls:[],x:0,y:0,parent:L_},F_={type:i.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:i.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},U_={type:i.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},x_={type:i.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:ys,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:i.LiteralValue,version:1,value:"https://api.publicapis.org/entries",name:C.String,valueAsType:null,parent:F_,autogeneration:null},index:1,parent:U_},j_={type:i.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},k_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:i.OutputMap,version:1,defaultValue:null,declaration:Es,index:2,writesValues:[Ab],parent:j_},q_={type:i.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},J_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:i.InputMap,version:1,declaration:ps,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:q_},W_={type:i.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Y_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:i.InputMap,version:1,name:null,description:null,declaration:hs,index:3,readsValue:null,defaultValue:null,parent:W_},H_={type:i.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},z_={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:i.InputMap,version:1,declaration:fs,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:H_},Z_={type:i.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},K_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:i.OutputMap,version:1,defaultValue:null,declaration:Ts,index:1,writesValues:[],parent:Z_},X_={type:i.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},Q_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:i.OutputMap,version:1,defaultValue:null,declaration:ms,index:0,writesValues:[],parent:X_},eV={type:i.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},tV={type:i.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},nV={type:i.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},rV={type:i.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},iV={type:i.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:i.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},aV={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:it,asType:!1,isList:!1,parent:iV},sV={type:i.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:i.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},Cb={constant:!0,isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:i.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:aV,defaultValue:null,implements:null,required:!0,readsValue:null,index:0,parent:sV},wb={type:i.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[rV],calledByEntry:[],calledBySuccess:[],throws:Cb,x:0,y:0,parent:nV},oV={type:i.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:i.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},lV={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:i.OutputMap,declaration:xl,defaultValue:null,version:1,writesValues:[Cb],index:0,parentRelationType:ri.Error,parent:oV},dV={type:i.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Xi,inputs:[J_,x_,Pb,Y_,z_],outputs:[Q_,K_,k_],process:null,calledByError:[],calledByEntry:[eV],calledBySuccess:[],successCalls:[Ld,Ab],errorCalls:[wb],error:lV,x:0,y:0,parent:tV},cV={type:i.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:i.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},uV={type:i.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},pV={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:i.InputMap,version:1,declaration:ds,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:i.LiteralValue,version:1,value:"?name=",name:C.String,parent:cV,valueAsType:null,autogeneration:null},index:0,parent:uV},yV={type:i.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},hV={type:i.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},fV={type:i.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:i.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},mV={like:!1,inferred:!1,id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:fV},TV={type:i.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:i.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},EV={type:i.GenericReference,id:"assembled-query-string-called-by-ref",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},Bb={constant:!0,required:!0,type:i.VariableDeclaration,id:"83e12ebb-c958-4dee-b750-8ab9930f0f4e",version:1,name:"Query string",description:"The final, assembled query string that will be used in the HTTP request to the government company registry",defaultValue:null,dataType:mV,readsValue:TV,writesValues:[Pb],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[EV],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:hV},RV={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:i.OutputMap,version:1,defaultValue:null,writesValues:[Bb],declaration:Zi,index:0,parent:yV},gV={type:i.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},bV={type:i.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},vV={type:i.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:i.ArgumentDeclaration},IV={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},Mb={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:i.InputMap,declaration:cs,name:null,description:null,readsValue:vV,defaultValue:null,index:1,parent:IV},DV={type:i.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:Ki,version:1,inputs:[Mb,pV],outputs:[RV],process:null,calledByError:[],calledByEntry:[gV],calledBySuccess:[],successCalls:[Bb],errorCalls:[],error:null,x:0,y:0,parent:bV},SV={type:i.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:i.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},OV={like:!1,inferred:!1,id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:SV},PV={type:i.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:i.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},_b={constant:!0,id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:i.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:OV,defaultValue:null,implements:null,required:!1,writesValues:[Mb],index:0,parent:PV},AV={type:i.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:i.Project,entityId:H},Vb={type:i.FunctionDeclaration,id:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d",version:1,name:"Check Gov Company Registry availability",description:"Check whether the company name is already registered in the government company registry, or it is available for a new company to use.",inputs:[_b],calls:[DV,dV],returnStatements:[Ld,wb],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:AV},CV={type:i.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:i.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},wV={type:i.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},BV={type:i.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},MV={type:i.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Nb={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:i.InputMap,declaration:_b,name:null,description:null,readsValue:BV,defaultValue:null,index:0,parent:MV},_V={type:i.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},VV={type:i.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:i.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},NV={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:On,asType:!1,isList:!1,parent:VV},LV={type:i.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:i.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},GV={type:i.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},$V={type:i.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:i.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Lb={constant:!0,required:!0,type:i.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",defaultValue:null,dataType:NV,readsValue:LV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[$V],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:GV},FV={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.OutputMap,version:1,declaration:Nd,defaultValue:null,writesValues:[Lb],index:0,parent:_V},UV={type:i.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:Vb,inputs:[Nb],outputs:[FV],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[CV],successCalls:[Lb],errorCalls:[],error:null,x:0,y:0,parent:wV},xV={type:i.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},jV={type:i.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},kV={type:i.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},qV={type:i.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:i.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},Gb={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:i.InputMap,declaration:gr.inputs[0],name:null,description:null,readsValue:kV,defaultValue:null,index:0,parent:qV},JV={type:i.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:gr,inputs:[Gb],calledByError:[],calledByEntry:[xV],calledBySuccess:[],successCalls:[UV],errorCalls:[],x:0,y:0,parent:jV},WV={type:i.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},YV={type:i.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:i.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},HV={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,asType:!1,isList:!1,parent:YV},zV={type:i.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},ZV={type:i.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:i.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},KV={type:i.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},$b={constant:!0,required:!0,type:i.VariableDeclaration,id:"9c928995-0dd5-4f97-9962-56b343bc8a45",version:1,name:"New bank account",description:"The new entity value representing the new bank account of the company",defaultValue:null,dataType:HV,readsValue:ZV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[KV],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:zV},XV={type:i.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:i.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},QV={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,asType:!1,isList:!1,parent:XV},eN={constant:!0,id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:i.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:QV,implements:null,defaultValue:null,required:!0,index:1,writesValues:[$b],parent:WV},tN={type:i.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},nN={type:i.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:i.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},rN={type:i.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:i.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},iN={like:!1,inferred:!1,id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:rN},aN={constant:!0,id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:i.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:iN,implements:null,defaultValue:null,required:!0,index:0,writesValues:[Gb,Nb],parent:nN},sN={type:i.FunctionDeclaration,id:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84",version:1,name:"Company changed event",description:"The event that is triggered when a company is changed",returnStatements:[],collapsed:!1,inputs:[aN,eN],calls:[JV,$b],index:1,private:!1,implements:null,x:0,y:0,parent:tN},oN={type:i.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},lN={type:i.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:i.Property,entityId:"employee-manager-property-id"},dN={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oN,isList:!1,asType:!1,parent:lN},cN={type:i.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},uN={constant:!1,required:!0,hidden:!1,type:i.Property,id:"employee-manager-property-id",version:1,name:"Manager",description:"The manager of the employee",index:0,implements:null,private:!1,static:!1,defaultValue:null,dataType:dN,abstract:!1,parent:cN},pN={type:i.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:i.Property,entityId:"employee-start-date-property-id"},yN={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ln,isList:!1,asType:!1,parent:pN},hN={type:i.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},fN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"employee-start-date-property-id",version:1,name:"Start date",description:"The date the employee started working in the company",index:0,private:!1,static:!1,defaultValue:null,implements:null,dataType:yN,abstract:!1,parent:hN},mN={type:i.GenericReference,id:"employee-department-property-ref-id",entityType:i.Property,entityId:"employee-department-property-id"},TN={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Pn,isList:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],parent:mN},EN={type:i.GenericReference,id:"employee-department-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"employee-entity-id"},RN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"employee-department-property-id",version:1,name:"Department",description:"The department the employee works in, from a list of departments in the company",index:0,defaultValue:null,implements:null,static:!1,private:!1,dataType:TN,abstract:!1,parent:EN},gN={type:i.GenericReference,id:"employee-prototype-parent-ref-id",entityType:i.Project,entityId:H},Yt={type:i.DefinitionEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[RN,fN,uN],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[bt],x:0,y:0,parent:gN},bN={type:i.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:i.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},vN={like:!1,inferred:!1,id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:bN},IN={type:i.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},DN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd",version:1,name:"Company Name",private:!1,static:!1,description:"The name of the company",index:0,defaultValue:null,implements:null,dataType:vN,abstract:!1,parent:IN},SN={type:i.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:i.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},ON={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vi,isList:!1,asType:!1,parent:SN},PN={type:i.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},Gd={constant:!1,hidden:!1,required:!0,type:i.Property,id:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",version:1,name:"Bank account",description:"The bank account of the company",index:1,implements:null,static:!1,private:!1,defaultValue:null,dataType:ON,abstract:!1,parent:PN},AN={type:i.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:i.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},CN={like:!1,inferred:!1,id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bt,isList:!1,asType:!1,parent:AN},wN={type:i.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},BN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"19a31727-1fba-40a5-be25-18e0f149d5cb",version:1,name:"Company Owner",description:"The person that owns the company",index:2,static:!1,implements:null,defaultValue:null,dataType:CN,private:!0,abstract:!1,parent:wN},MN={type:i.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:i.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},_N={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,isList:!0,asType:!1,parent:MN},VN={type:i.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:i.DefinitionEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},NN={constant:!1,hidden:!1,required:!0,type:i.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,defaultValue:null,dataType:_N,implements:null,private:!0,static:!1,abstract:!1,parent:VN},LN={id:"company-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"company-prototype-primary-key-property-id",entityType:i.Property},GN={id:"company-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"company-prototype-primary-key-property-id",entityType:i.Property},$N={like:!1,inferred:!1,id:"company-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:GN},FN={id:"company-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",entityType:i.DefinitionEntity},UN={constant:!1,hidden:!1,required:!0,id:"company-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:pi,static:!1,index:4,defaultValue:{id:"company-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:LN,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:$N,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:FN},xN={type:i.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:i.Project,entityId:H},Ht={type:i.DefinitionEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[DN,Gd,BN,NN,UN],static:!1,abstract:!1,abstractMethods:[],methods:[D_,sN],extends:[],implements:[st,Ft],x:0,y:0,parent:xN},jN={type:i.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:i.Project,entityId:H},$d={type:i.FunctionDeclaration,id:"0f89260c-8c58-4639-8629-d9ea5ab40ba7",version:1,name:"Show popup",description:null,inputs:[],calls:[],returnStatements:[],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:jN};i.GenericReference,i.DataType;const kN={id:"cron-job-entity-expression-property-ref-id",type:i.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:i.Property},qN={like:!1,inferred:!1,id:"cron-job-entity-expression-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:kN},JN={id:"cron-job-entity-ref-id",type:i.GenericReference,entityId:"cron-job-entity-id",entityType:i.DefinitionEntity},WN={constant:!1,hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:i.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",defaultValue:null,dataType:qN,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:JN},YN={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:i.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:i.FunctionDeclaration},HN={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:i.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:i.FunctionDeclaration},zN={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:i.FunctionCall,declaration:$d,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[YN],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:HN},ZN={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:i.GenericReference,entityId:"cron-job-entity-id",entityType:i.DefinitionEntity},KN={id:"cron-job-entity-trigger-func-decl-id",version:1,type:i.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:ud,calls:[zN],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:ZN},XN={id:"cron-job-entity-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},QN={id:"cron-job-entity-id",version:1,type:i.DefinitionEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[WN],static:!0,abstract:!1,abstractMethods:[],extends:[Os],implements:[],methods:[KN],x:0,y:0,parent:XN},eL={type:i.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:i.Project,entityId:H},tL={type:i.DefinitionEntity,id:"6f0908c2-09c6-4a8b-8f43-d2467fe6fb39",version:1,name:"Get bank all bank accounts",description:null,properties:[],static:!0,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[ra],x:0,y:0,parent:eL},io="f558fbf8-67de-4545-9804-6ae621e0b2d4",nL={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},rL={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},iL={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:J,asType:!1,parent:rL},aL={id:"getCompanyByIdEndpointReachedEntityEventRef",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},sL={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},oL={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},lL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:oL},dL={constant:!0,id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:i.ArgumentDeclaration,writesValues:[],name:"Request headers",defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:sL,autogeneration:null,valueAsType:null},dataType:lL,implements:ed,required:!0,index:0,parent:aL},cL={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},uL={constant:!0,id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:i.ArgumentDeclaration,description:"A standarized text, without spaces that is added at the end of the domain and routes the request to a specific resource within the target server. For example: /api/users/123, /api/users/123/:name, /api/users/123/:name/:age.",version:1,name:"Path parameters",writesValues:[],defaultValue:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:nL,autogeneration:null,valueAsType:null},dataType:iL,implements:td,required:!0,index:1,parent:cL},pL={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},yL={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},hL={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},fL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,asType:!1,entity:J,parent:hL},mL={constant:!0,id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration",version:1,description:"A text with standarized format, without spaces that is added at the end of the URL path, after the ? character. It contains data that might be used to process the request. For example: /api/users?name=John&age=30",type:i.ArgumentDeclaration,writesValues:[],name:"Request query params",defaultValue:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:yL,autogeneration:null,valueAsType:null},dataType:fL,implements:nd,required:!0,index:2,parent:pL},TL={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},EL={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},RL={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:EL},gL={constant:!0,id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:i.ArgumentDeclaration,writesValues:[],name:"Request body",defaultValue:null,dataType:RL,implements:rd,index:3,required:!0,parent:TL},bL={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},vL={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:bL},IL={id:"getCompanyByIdEndpointReturnStatementRef",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},DL={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseCodeReturnDeclaration",version:1,description:"A standarized number that represents the status of the response. 200 for OK, 404 for not found, 500 for server error, etc.",type:i.ReturnDeclaration,name:"Response code",defaultValue:null,dataType:vL,implements:id,readsValue:null,required:!0,index:0,parent:IL},SL={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},OL={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},PL={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,entity:it,asType:!1,parent:OL},AL={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},CL={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:i.ReturnDeclaration,name:"Response headers",defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.KeyValue,value:{},parent:SL,autogeneration:null,valueAsType:null},dataType:PL,implements:ad,readsValue:null,required:!0,index:1,parent:AL},wL={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:i.GenericReference,entityType:i.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},BL={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,asType:!1,entity:it,parent:wL},ML={id:"getCompanyByIdEndpointReturnStatementRefThree",type:i.GenericReference,entityType:i.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},_L={constant:!0,isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:i.ReturnDeclaration,name:"Response body",implements:sd,defaultValue:null,dataType:BL,readsValue:null,required:!0,index:2,parent:ML},VL={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:i.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:i.FunctionDeclaration},NL={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},LL={id:"getCompanyByIdEndpointReturnStatement",type:i.ReturnStatement,version:1,outputs:[DL,CL,_L],calledByError:[],calledByEntry:[VL],calledBySuccess:[],throws:null,x:0,y:0,parent:NL},GL={id:"endpointBuiltInBaseEntityRefFour",type:i.GenericReference,entityType:i.BuiltInBaseEntity,entityId:io},$L={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:i.FunctionDeclaration,inputs:[dL,uL,mL,gL],returnStatements:[LL],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:od,index:0,private:!1,x:0,y:0,parent:GL},FL={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointPathProperty"},UL={id:"getCompanyByIdEndpointPathPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointPathProperty"},xL={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:J,asType:!1,parent:UL},jL={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:i.GenericReference,entityType:i.DefinitionEntity,entityId:io},kL={constant:!1,id:"getCompanyByIdEndpointPathProperty",hidden:!1,required:!0,name:"Path",version:1,type:i.Property,private:!1,abstract:!1,static:!0,implements:Xl,defaultValue:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,name:C.String,value:"/company/{id}",parent:FL,valueAsType:null,autogeneration:null},dataType:xL,index:1,description:"Path to the endpoint, for example /api/users, or /api/users/{id}, or /api/users/{id}/:name. The path can contain parameters, which are defined by curly braces, and will be passed to the endpoint event as variables with the same name.",parent:jL},qL={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointMethodProperty"},JL={id:"getCompanyByIdEndpointMethodPropertyRef",type:i.GenericReference,entityType:i.Property,entityId:"getCompanyByIdEndpointMethodProperty"},WL={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Pn,isList:!0,asType:!1,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:JL},YL={id:"getCompanyByIdEndpointBaseEntityRefThree",type:i.GenericReference,entityType:i.DefinitionEntity,entityId:io},HL={constant:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:i.Property,private:!1,abstract:!1,static:!0,implements:Ql,index:0,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:i.LiteralValue,version:1,value:"GET",name:C.Enum,parent:qL,valueAsType:null,autogeneration:null},dataType:WL,description:null,parent:YL},zL={type:i.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:i.Project,entityId:H},ZL={type:i.DefinitionEntity,id:io,version:1,name:"Get given company data by id",description:null,properties:[kL,HL],methods:[$L],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[ra],x:0,y:0,parent:zL},KL={id:"plant-prototype-database-property-ref-id",type:i.GenericReference,entityId:"plant-prototype-database-property-id",entityType:i.Property},XL={id:"plant-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"plant-prototype-database-property-id",entityType:i.Property},QL={like:!1,inferred:!1,id:"plant-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:KL},e0={id:"plant-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"plant-entity-id",entityType:i.DefinitionEntity},t0={constant:!1,hidden:!1,required:!0,id:"plant-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"plant-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Bd,autogeneration:null,parent:XL},dataType:QL,description:"The database that the entity belongs to.",parent:e0},n0={type:i.GenericReference,id:"plant-name-property-ref-id",entityType:i.Property,entityId:"plant-name-property-id"},r0={like:!1,inferred:!1,id:"plant-name-property-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:n0},i0={type:i.GenericReference,id:"animal-name-property-parent-ref-id",entityType:i.DefinitionEntity,entityId:"plant-entity-id"},a0={constant:!1,hidden:!1,required:!0,type:i.Property,id:"plant-name-property-id",version:1,name:"Name",description:"The name of the plant",defaultValue:null,implements:null,static:!1,private:!1,index:0,dataType:r0,abstract:!1,parent:i0},s0={type:i.GenericReference,id:"plant-prototype-parent-ref-id",entityType:i.Project,entityId:H},o0={type:i.DefinitionEntity,id:"plant-entity-id",version:1,name:"Plant",description:"A living creature that is not an animal",abstract:!1,static:!1,abstractMethods:[],properties:[t0,a0],methods:[],extends:[],implements:[st],x:0,y:0,parent:s0},l0={id:"product-prototype-database-property-ref-id",type:i.GenericReference,entityId:"product-prototype-database-property-id",entityType:i.Property},d0={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:i.GenericReference,entityId:"product-prototype-database-property-id",entityType:i.Property},c0={like:!1,inferred:!1,id:"product-prototype-database-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:un,asType:!1,parent:l0},u0={id:"product-prototype-database-property-parent-ref-id",type:i.GenericReference,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",entityType:i.DefinitionEntity},p0={constant:!1,hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:i.Property,private:!1,abstract:!1,implements:ui,static:!0,index:0,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:i.LiteralValue,version:1,value:null,name:C.EntityTemplate,valueAsType:Md,autogeneration:null,parent:d0},dataType:c0,description:"The database that the entity belongs to.",parent:u0},y0={type:i.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:i.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},h0={like:!1,inferred:!1,id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:y0},f0={type:i.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:i.DefinitionEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},m0={constant:!1,hidden:!1,required:!0,type:i.Property,id:"d519c26a-15b8-40d8-ad09-13fa9342e9ba",version:1,name:"Name",description:"The name of the product",index:0,implements:null,static:!1,private:!1,defaultValue:null,dataType:h0,abstract:!1,parent:f0},T0={type:i.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:i.Project,entityId:H},E0={id:"product-prototype-primary-key-property-data-type-ref-id",type:i.GenericReference,entityId:"product-prototype-primary-key-property-id",entityType:i.Property},R0={id:"product-prototype-primary-key-property-ref-id",type:i.GenericReference,entityId:"product-prototype-primary-key-property-id",entityType:i.Property},g0={like:!1,inferred:!1,id:"product-prototype-primary-key-property-data-type-id",version:1,type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,entity:An,asType:!1,parent:R0},b0={id:"product-prototype-primary-key-property-parent-ref-id",type:i.GenericReference,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",entityType:i.DefinitionEntity},v0={constant:!1,hidden:!1,required:!0,id:"product-prototype-primary-key-property-id",name:"Identifier",version:1,type:i.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,defaultValue:{id:"product-prototype-primary-key-property-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.UUID,value:null,parent:E0,autogeneration:{type:ze.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},dataType:g0,description:"A property with a unique value for the entity, that can be used to identify the entity among other entities of the same type.",parent:b0},I0={type:i.DefinitionEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[st,Ft],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[v0,p0,m0],methods:[],x:0,y:0,parent:T0},Di="project-loaded-event-id",_n="get-bitcoin-price-http-call-operation-id",Fb="get-bitcoin-price-http-call-response-body-id",ao="validate-bitcoin-price-response-operation-ids",D0={type:i.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Fb},S0={type:i.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:i.Operation,entityId:ao},Ub={id:"validate-bitcoin-data-to-validate-input-map-id",type:i.InputMap,version:1,declaration:fr.inputs[1],name:null,description:null,readsValue:D0,defaultValue:null,index:0,parent:S0},O0={type:i.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},P0={type:i.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:i.Operation,entityId:ao},A0={id:"validate-bitcoin-type-to-match-input-map-id",type:i.InputMap,version:1,declaration:fr.inputs[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:i.LiteralValue,version:1,name:C.EntityTemplate,valueAsType:Db,value:null,parent:O0,autogeneration:null},index:0,parent:P0},C0={type:i.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:i.Operation,entityId:ao},w0={id:"validate-bitcoin-validated-entity-output-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:fr.outputs[0],writesValues:[],index:0,parent:C0},B0={type:i.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:i.GlobalEvent,entityId:Di},M0={type:i.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:i.Operation,entityId:_n},_0={type:i.Operation,id:ao,version:1,declaration:fr,inputs:[A0,Ub],outputs:[w0],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[M0],parent:B0},V0={type:i.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:i.FunctionCall,entityId:_n},N0={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:i.InputMap,declaration:ps,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:V0},L0={type:i.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:i.FunctionCall,entityId:_n},G0={type:i.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:i.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},$0={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:i.InputMap,declaration:ys,name:null,description:null,readsValue:null,defaultValue:{id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:i.LiteralValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:C.String,parent:G0,valueAsType:null,autogeneration:null},index:1,parent:L0},F0={type:i.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:i.FunctionCall,entityId:_n},U0={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:i.InputMap,declaration:hs,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:F0},x0={type:i.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:i.FunctionCall,entityId:_n},j0={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:i.InputMap,declaration:fs,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:x0},k0={type:i.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:i.FunctionCall,entityId:_n},q0={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:i.OutputMap,defaultValue:null,declaration:Ts,writesValues:[],index:1,parent:k0},J0={type:i.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:i.FunctionCall,entityId:_n},W0={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:i.OutputMap,defaultValue:null,declaration:ms,writesValues:[],index:0,parent:J0},Y0={type:i.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:i.FunctionCall,entityId:_n},H0={id:Fb,type:i.OutputMap,defaultValue:null,version:1,declaration:Es,writesValues:[Ub],index:2,parent:Y0},z0={type:i.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:i.GlobalEvent,entityId:Di},Z0={type:i.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:i.GlobalEvent,entityId:Di},K0={type:i.Operation,id:_n,version:1,declaration:Xi,inputs:[N0,$0,U0,j0],outputs:[W0,q0,H0],process:null,parent:Z0,calledByError:[],calledByEntry:[z0],calledBySuccess:[],successCalls:[_0],errorCalls:[],error:null,x:0,y:0},X0={type:i.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:i.GlobalEvent,entityId:Di},Q0={type:i.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:i.GlobalEvent,entityId:Di},e1={process:null,type:i.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:$d,inputs:[],outputs:[],calledByError:[],calledByEntry:[X0],calledBySuccess:[],parent:Q0,successCalls:[],errorCalls:[],error:null,x:0,y:0},t1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:i.GenericReference,entityType:i.Project,entityId:H},n1={type:i.GlobalEvent,id:Di,version:1,name:Dn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:As,parent:t1,inputs:[],calls:[e1,K0],x:0,y:0},Ut="abort-execution-func-declaration-id",Sa="abort-execution-func-exec-var-declaration-id",Fd="abort-execution-func-small-wait-op-id",Ud="abort-execution-func-long-wait-op-id",xb="abort-execution-func-long-wait-process-output-id",jb="abort-execution-func-exec-var-instance-write-id",kb="abort-execution-func-long-wait-return-stmt-id",qb="abort-execution-func-small-wait-return-stmt-id",r1="abort-execution-func-exec-var-instance-abort-call-id",xd="abort-execution-func-exec-var-instance-abort-internal-call-id",jd="abort-execution-func-exec-second-wait-op-id",i1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},a1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},s1={like:!1,inferred:!1,id:"short-wait-return-statement-returned-hello-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:i1},o1={type:i.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:i.ReturnStatement,entityId:qb},l1={constant:!0,isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:i.ReturnDeclaration,version:1,name:"Return 1",description:"A random string that is returned by the function",defaultValue:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:a1},dataType:s1,implements:null,readsValue:null,required:!0,index:0,parent:o1},d1={type:i.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:jd},c1={type:i.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},Jb={type:i.ReturnStatement,id:qb,version:1,outputs:[l1],calledByError:[],calledByEntry:[],calledBySuccess:[d1],throws:null,x:0,y:0,parent:c1},u1={type:i.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"second-wait-argument-map-id"},p1={type:i.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:i.Operation,entityId:jd},y1={id:"second-wait-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:i.LiteralValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:C.Number,parent:u1},index:0,parent:p1},h1={type:i.GenericReference,id:"small-wait-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},f1={type:i.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:i.InternalCall,entityId:xd},m1={id:jd,type:i.Operation,version:1,declaration:Rt,inputs:[y1],outputs:[],process:null,successCalls:[Jb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[f1],error:null,parent:h1},T1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:i.VariableInstance,entityId:jb},E1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:i.Operation,entityId:Fd},R1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},g1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id-2",entityType:i.VariableDeclaration,entityId:Sa},b1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:i.InternalCall,entityId:xd},v1={id:r1,type:i.VariableInstance,version:1,declaration:g1,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[b1],parent:R1},Wb={id:xd,type:i.InternalCall,version:1,inputs:[],outputs:[],declaration:pd,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[T1,E1],successCalls:[m1],errorCalls:[],error:null,index:0,parent:v1},I1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},D1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:i.VariableDeclaration,entityId:Sa},S1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:i.FunctionDeclaration,entityId:Ut},O1={type:i.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:Sa},P1={type:i.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:i.OutputMap,entityId:xb},kd={id:jb,type:i.VariableInstance,version:1,declaration:O1,inputs:[],outputs:[],defaultValue:null,calledByError:[],calledByEntry:[S1],calledBySuccess:[D1],successCalls:[Wb],errorCalls:[],x:0,y:0,readsValue:P1,writesValues:[],internalCalls:[],parent:I1},A1={type:i.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:Sa};i.GenericReference,i.DataType;const C1={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ps,version:1,asType:!1,isList:!1,parent:A1},w1={type:i.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},B1={type:i.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},M1={constant:!0,required:!0,id:Sa,type:i.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",defaultValue:null,dataType:C1,inputs:[],outputs:[],calledByError:[],calledByEntry:[B1],calledBySuccess:[],successCalls:[kd],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:w1},_1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},V1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},N1={like:!1,inferred:!1,id:"long-wait-return-statement-returned-hello-string-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,asType:!1,isList:!1,parent:_1},L1={type:i.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:i.ReturnStatement,entityId:kb},G1={constant:!0,isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:i.ReturnDeclaration,version:1,name:"Return 2",description:"A random string that is returned by the function",implements:null,defaultValue:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:V1},dataType:N1,readsValue:null,required:!0,index:0,parent:L1},$1={type:i.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:Ud},F1={type:i.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},Yb={type:i.ReturnStatement,id:kb,version:1,outputs:[G1],calledByError:[],calledByEntry:[],calledBySuccess:[$1],throws:null,x:0,y:0,parent:F1},U1={type:i.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"long-argument-map-id"},Hb={type:i.GenericReference,id:"long-argument-map-parent-ref-id",entityType:i.Operation,entityId:Ud},x1={id:"long-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:i.LiteralValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:C.Number,parent:U1},index:0,parent:Hb},j1={type:i.GenericReference,id:"long-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},k1={type:i.GenericReference,id:"long-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},q1={id:xb,type:i.OutputMap,version:1,defaultValue:null,declaration:Cs,writesValues:[kd],index:0,parent:Hb},J1={id:Ud,type:i.Operation,version:1,declaration:Rt,inputs:[x1],outputs:[],process:q1,successCalls:[Yb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[k1],calledBySuccess:[],error:null,parent:j1},W1={type:i.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"small-wait-argument-map-id"},Y1={type:i.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:i.Operation,entityId:Fd},H1={id:"small-wait-argument-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:i.LiteralValue,version:1,value:500,valueAsType:null,autogeneration:null,name:C.Number,parent:W1},index:0,parent:Y1},z1={type:i.GenericReference,id:"small-wait-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Ut},Z1={type:i.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:i.FunctionDeclaration,entityId:Ut},K1={id:Fd,type:i.Operation,version:1,declaration:Rt,inputs:[H1],outputs:[],process:null,successCalls:[Wb],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[Z1],calledBySuccess:[],error:null,parent:z1},X1={type:i.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:i.Project,entityId:H},zb={id:Ut,type:i.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[Yb,Jb],calls:[K1,M1,kd,J1],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:X1},Q1={type:i.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:i.Project,entityId:H},eG={id:"call-execution-abort-func-id",type:i.FunctionCall,version:1,declaration:zb,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:Q1},so="manual-hello-world-loop-func-decl-id",Zb="manual-hello-world-loop-func-return-statement-id",fn="manual-hello-world-loop-id",Oa="manual-hello-world-loop-body-id",qd="manual-hello-world-loop-break-statement-id",Pa="manual-hello-world-loop-current-iteration-number-output-map-id",Jd="manual-hello-world-loop-previous-iterations-results-output-map-id",Wd="assembled-hello-world-text-output-id",tG="assembled-hello-world-list-output-id",Aa="iteration-number-is-equal-or-greater-than-10-condition-id",oo="join-hello-world-and-number-operation-id",lo="append-string-to-list-operation-id",Kb="hello-world-loop-output-map-id",nG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:i.ReturnStatement,entityId:Zb},rG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:i.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},iG={like:!1,inferred:!1,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!0,asType:!1,parent:rG},aG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:i.OutputMap,entityId:Kb},Xb={constant:!0,isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:i.ReturnDeclaration,name:"Results",description:null,defaultValue:null,dataType:iG,implements:null,readsValue:aG,required:!0,index:0,parent:nG},sG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:i.Loop,entityId:fn},oG={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:i.FunctionDeclaration,entityId:so},Qb={type:i.ReturnStatement,id:Zb,version:1,outputs:[Xb],calledByError:[],calledByEntry:[],calledBySuccess:[sG],parent:oG,throws:null,x:0,y:0},lG={type:i.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:i.BreakStatement,entityId:qd},ev={constant:!0,isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration result",description:null,defaultValue:null,dataType:null,readsValue:null,implements:null,required:!0,index:0,parent:lG},dG={type:i.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Pa},cG={type:i.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:i.BreakStatement,entityId:qd},tv={constant:!0,isError:!1,id:"hello-world-loop-break-statement-counter-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration counter",description:null,implements:null,defaultValue:null,dataType:null,readsValue:dG,required:!0,index:1,parent:cG},uG={type:i.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:i.Condition,entityId:Aa},pG={type:i.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:i.Loop,entityId:fn},nv={type:i.BreakStatement,id:qd,version:1,outputs:[ev,tv],calledByError:[],calledByEntry:[],calledBySuccess:[uG],parent:pG,throws:null,x:0,y:0},yG={type:i.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:i.ContinueStatement,entityId:"hello-world-loop-continue-statement"},hG={type:i.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:i.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},fG={like:!1,inferred:!1,id:"hello-world-loop-continue-statement-output-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:hG},mG={type:i.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:i.OutputMap,entityId:Wd},rv={constant:!0,isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:i.ReturnDeclaration,name:"Iteration result",description:null,defaultValue:null,implements:null,dataType:fG,readsValue:mG,required:!0,index:0,parent:yG},TG={type:i.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:i.Condition,entityId:Aa},EG={type:i.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:i.Loop,entityId:fn},iv={type:i.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[rv],calledBySuccess:[],calledByError:[TG],calledByEntry:[],parent:EG,throws:null,x:0,y:0};i.GenericReference,i.InputMap;const RG={type:i.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:i.Operation,entityId:lo},gG={type:i.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Jd},av={id:"append-string-to-list-base-string-map-id",type:i.InputMap,version:1,declaration:Vl,name:null,description:null,readsValue:gG,defaultValue:null,index:0,parent:RG},bG={type:i.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:i.Operation,entityId:lo},vG={id:tG,type:i.OutputMap,version:1,defaultValue:null,writesValues:[ev],declaration:Zi,index:0,parent:bG},IG={type:i.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:i.Condition,entityId:Aa},DG={type:i.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Wd},SG={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:lo},sv={id:"latest-string-to-add-input-map-id",version:1,type:i.InputMap,declaration:Nl,name:null,description:null,readsValue:DG,defaultValue:null,index:1,parent:SG},OG={type:i.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:i.FunctionDeclaration,entityId:fn},PG={type:i.Operation,id:lo,declaration:us,version:1,inputs:[av,sv],outputs:[vG],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[IG],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:OG},AG={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:Oa},CG={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:i.Loop,entityId:fn},wG={type:i.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Pa},ov={type:i.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:i.Condition,entityId:Aa},BG={id:"current-iteration-number-to-check-map-id",version:1,type:i.InputMap,declaration:hi.inputs[0],name:null,description:null,readsValue:wG,index:0,defaultValue:null,parent:ov},MG={type:i.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:"max-num-iterations-value-map-id"},_G={id:"max-num-iterations-value-map-id",version:1,type:i.InputMap,declaration:hi.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:i.LiteralValue,version:1,name:C.Number,value:10,autogeneration:null,valueAsType:null,parent:MG},parent:ov},VG={type:i.Condition,id:Aa,version:1,declaration:hi,inputs:[BG,_G],calledByError:[],calledByEntry:[AG],calledBySuccess:[],successCalls:[nv,PG],errorCalls:[iv],x:0,y:0,parent:CG},NG={type:i.GenericReference,id:"base-string-map-ref-id",entityType:i.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},LG={type:i.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:i.Operation,entityId:oo},GG={id:"join-hello-world-and-number-base-string-map-id",type:i.InputMap,version:1,declaration:ds,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:i.LiteralValue,version:1,value:"Hello world ",name:C.String,parent:NG,valueAsType:null,autogeneration:null},index:0,parent:LG},$G={type:i.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:i.Operation,entityId:oo},FG={id:Wd,type:i.OutputMap,version:1,defaultValue:null,writesValues:[sv,rv],declaration:Zi,index:0,parent:$G},UG={type:i.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:Oa},xG={type:i.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Pa},jG={type:i.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:i.Operation,entityId:oo},lv={id:"current-iteration-number-input-map-id",version:1,type:i.InputMap,declaration:cs,name:null,description:null,readsValue:xG,defaultValue:null,index:1,parent:jG},kG={type:i.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:i.FunctionDeclaration,entityId:fn},qG={type:i.Operation,id:oo,declaration:Ki,version:1,inputs:[GG,lv],outputs:[FG],process:null,calledByError:[],calledByEntry:[UG],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:kG},JG={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:Jd,entityType:i.ArgumentDeclaration},WG={like:!1,inferred:!1,id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,entity:null,asType:!1,parent:JG},YG={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:i.GenericReference,entityId:Oa,entityType:i.FunctionDeclaration},HG={constant:!0,id:Jd,type:i.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,defaultValue:null,dataType:WG,implements:null,writesValues:[av],index:1,parent:YG},zG={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:i.GenericReference,entityId:Oa,entityType:i.FunctionDeclaration},ZG={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:i.GenericReference,entityId:Pa,entityType:i.ArgumentDeclaration};i.DataType;const KG={constant:!0,id:Pa,type:i.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,implements:jl,defaultValue:null,dataType:null,writesValues:[lv,tv],index:0,parent:zG},XG={id:"manual-flow-loop-body-parent-ref-id",type:i.GenericReference,entityId:fn,entityType:i.Loop},QG={id:Oa,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[KG,HG],calls:[VG,qG],implements:kl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:XG},e$={type:i.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:i.Loop,entityId:fn},dv={id:"hello-world-loop-iteration-result-inline-output-declaration-id",version:1,type:i.ValueDescriptor,name:"Iteration result",defaultValue:null,description:null,dataType:null,required:!0,parentRelationType:A.FixedReturns,index:0,parent:e$},t$={type:i.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:i.Loop,entityId:fn},n$={type:i.OutputMap,id:Kb,version:1,defaultValue:null,declaration:dv,writesValues:[Xb],index:0,parent:t$},r$={id:"manual-hello-world-loop-parent-ref-id",type:i.GenericReference,entityId:so,entityType:i.FunctionDeclaration},i$={id:"manual-hello-world-loop-called-by-ref-id",type:i.GenericReference,entityId:so,entityType:i.FunctionDeclaration},a$={id:fn,type:i.Loop,version:1,declaration:Rs,inputs:[],outputsDeclarations:[dv],outputs:[n$],body:QG,successCalls:[Qb],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[i$],calledBySuccess:[],breakStatements:[nv],continueStatements:[iv],x:0,y:0,parent:r$},s$={type:i.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},cv={type:i.FunctionDeclaration,id:so,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[a$],returnStatements:[Qb],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:s$},o$={type:i.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:i.Project,entityId:H},l$={id:"call-hello-world-loop-id",type:i.FunctionCall,version:1,declaration:cv,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:o$},Vn="company-dto-function-declaration-id",Yd="company-dto-func-declaration-argument-dcl-id",mn="company-dto-function-company-variable-id",nr="company-dto-function-company-dto-variable-id",Si="iterate-over-employee-list-loop-id",uv="iterate-over-employee-list-loop-employee-dto-output-map-id",Hd="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",co="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",pv="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",yv="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",hv="iterate-over-employee-list-continue-statement-id",uo="iterate-over-employee-list-loop-body-id",fv="company-dto-func-declaration-return-statement-id",mv="company-dto-func-declaration-return-decl-id",Tv="company-dto-func-declaration-company-variable-id-output-map-id",Ev="company-dto-func-declaration-company-variable-employess-output-map-id",Rv="company-dto-func-declaration-company-variable-name-output-map-id",d$="company-dto-func-declaration-company-dto-variable-input-map-id",c$="company-dto-func-declaration-company-dto-variable-employess-input-map-id",u$="company-dto-func-declaration-company-dto-variable-name-input-map-id",po="company-dto-func-declaration-owner-variable-id",p$="company-dto-func-declaration-company-dto-variable-owner-input-map-id",gv="company-dto-func-declaration-company-variable-owner-output-map-id",bv="company-dto-func-declaration-owner-variable-id-output-map-id",yo="company-dto-func-declaration-bank-account-variable-id",y$="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",vv="company-dto-func-declaration-company-variable-bank-account-output-map-id",Iv="company-dto-func-declaration-bank-account-variable-id-output-map-id",h$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:mv},f$={like:!1,inferred:!1,id:"company-dto-func-returned-company-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,parent:h$},m$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:fv},T$={type:i.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:nr},Dv={constant:!0,isError:!1,id:mv,type:i.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",defaultValue:null,implements:null,dataType:f$,readsValue:T$,required:!0,index:0,parent:m$},E$={type:i.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:i.Operation,entityId:nr},R$={type:i.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},zd={type:i.ReturnStatement,id:fv,version:1,outputs:[Dv],calledByError:[],calledByEntry:[],calledBySuccess:[E$],throws:null,x:0,y:0,parent:R$},g$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:bv},b$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Sv={id:p$,type:i.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:g$,parent:b$},v$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Iv},I$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Ov={id:y$,type:i.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:v$,parent:I$},D$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Rv},S$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Pv={id:u$,type:i.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:D$,parent:S$},O$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:uv},P$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Av={id:c$,type:i.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:O$,parent:P$},A$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Tv},C$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:nr},Cv={id:d$,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:A$,parent:C$},w$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},B$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:i.VariableDeclaration,entityId:yo},M$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:i.VariableDeclaration,entityId:po},_$={type:i.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:i.VariableDeclaration,entityId:Si},Zd={constant:!0,required:!0,id:nr,type:i.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[B$,M$,_$],successCalls:[zd],errorCalls:[],readsValue:null,writesValues:[Dv],inputs:[Cv,Pv,Ov,Sv,Av],outputs:[],internalCalls:[],parent:w$,x:0,y:0},Sr="employee-dto-func-declaration-id",Kd="employee-dto-func-declaration-argument-dcl-id",wv="employee-dto-func-declaration-return-statement-id",Bv="employee-dto-func-declaration-return-decl-id",Or="employee-dto-func-declaration-employee-variable-id",Pr="employee-dto-func-declaration-employee-dto-variable-id",ho="employee-dto-func-declaration-manager-variable-id",Mv="employee-dto-func-declaration-employee-variable-id-output-map-id",_v="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",Vv="employee-dto-func-declaration-employee-variable-department-output-map-id",Nv="employee-dto-func-declaration-employee-variable-manager-output-map-id",Lv="employee-dto-func-declaration-manager-variable-id-output-map-id",V$="employee-dto-func-declaration-employee-dto-variable-input-map-id",N$="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",L$="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",G$="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",$$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:Bv},F$={like:!1,inferred:!1,id:"employee-dto-func-returned-employee-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,parent:$$},U$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:wv},x$={type:i.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Gv={constant:!0,isError:!1,id:Bv,type:i.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",defaultValue:null,dataType:F$,implements:null,readsValue:x$,required:!0,index:0,parent:U$},j$={type:i.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:i.Operation,entityId:Pr},k$={type:i.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},Xd={type:i.ReturnStatement,id:wv,version:1,outputs:[Gv],calledByError:[],calledByEntry:[],calledBySuccess:[j$],throws:null,x:0,y:0,parent:k$},q$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Lv},J$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},$v={id:G$,type:i.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:q$,parent:J$},W$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Vv},Y$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Fv={id:L$,type:i.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:W$,parent:Y$},H$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:_v},z$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},Uv={id:N$,type:i.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:H$,parent:z$},Z$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:Mv},K$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pr},xv={id:V$,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:Z$,parent:K$},X$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},Q$={type:i.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:i.VariableDeclaration,entityId:ho},eF={constant:!0,required:!0,id:Pr,type:i.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[Q$],successCalls:[Xd],errorCalls:[],readsValue:null,writesValues:[Gv],inputs:[xv,Uv,Fv,$v],outputs:[],internalCalls:[],parent:X$,x:0,y:0},tF={type:i.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:ho},nF={id:Lv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[$v],parent:tF},rF={type:i.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:ho},iF={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:rF},aF={type:i.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:Nv},sF={type:i.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr};i.GenericReference,i.VariableDeclaration;const jv={constant:!0,required:!0,id:ho,type:i.VariableDeclaration,version:1,name:"Manager",description:"A variable holding an inherited manager",defaultValue:null,dataType:iF,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[eF],errorCalls:[],readsValue:aF,writesValues:[],inputs:[],outputs:[nF],internalCalls:[],parent:sF,x:0,y:0},oF={type:i.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},lF={id:Nv,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[2],index:3,writesValues:[jv],parent:oF},dF={type:i.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},cF={id:Vv,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[0],index:2,writesValues:[Fv],parent:dF},uF={type:i.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},pF={id:_v,type:i.OutputMap,version:1,defaultValue:null,declaration:bt.properties[1],index:1,writesValues:[Uv],parent:uF},yF={type:i.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},hF={id:Mv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[xv],parent:yF},fF={type:i.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Or},mF={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:fF},TF={type:i.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Sr},EF={type:i.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Kd},RF={type:i.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:i.FunctionDeclaration,entityId:Sr},kv={constant:!0,required:!0,id:Or,type:i.VariableDeclaration,version:1,name:"Company employee",dataType:mF,description:"A variable holding a company employee",calledByError:[],defaultValue:null,calledByEntry:[RF],calledBySuccess:[],successCalls:[jv],errorCalls:[],readsValue:EF,writesValues:[],inputs:[],outputs:[hF,pF,cF,lF],internalCalls:[],parent:TF,x:0,y:0},gF={type:i.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Kd,entityType:i.ArgumentDeclaration},bF={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:Yt,asType:!1,isList:!1,like:!1,inferred:!1,parent:gF},vF={type:i.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:Sr,entityType:i.FunctionDeclaration},IF={constant:!0,type:i.ArgumentDeclaration,id:Kd,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,defaultValue:null,dataType:bF,index:0,writesValues:[kv],parent:vF},DF={type:i.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},Qd={type:i.FunctionDeclaration,id:Sr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[IF],calls:[kv],implements:null,returnStatements:[Xd],collapsed:!1,private:!1,x:0,y:0,parent:DF},SF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:pv,entityType:i.ReturnDeclaration},OF={like:!1,inferred:!1,id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:SF},PF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:i.GenericReference,entityId:yv,entityType:i.OutputMap},AF={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:i.GenericReference,entityId:hv,entityType:i.ContinueStatement},qv={constant:!0,isError:!1,id:pv,type:i.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",defaultValue:null,readsValue:PF,dataType:OF,implements:null,required:!0,index:0,parent:AF},CF={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},wF={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},Jv={id:hv,type:i.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[CF],outputs:[qv],throws:null,x:0,y:0,parent:wF},BF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},MF={id:yv,type:i.OutputMap,version:1,defaultValue:null,declaration:Xd.outputs[0],writesValues:[qv],index:0,parent:BF},_F={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Hd,entityType:i.ArgumentDeclaration},VF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:i.GenericReference,entityId:co,entityType:i.FunctionCall},Wv={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Qd.inputs[0],readsValue:_F,index:0,defaultValue:null,parent:VF},NF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},LF={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},GF={id:co,type:i.FunctionCall,version:1,declaration:Qd,inputs:[Wv],process:null,outputs:[MF],calledByError:[],calledByEntry:[NF],calledBySuccess:[],successCalls:[Jv],errorCalls:[],error:null,x:0,y:0,parent:LF},$F={type:i.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Hd,entityType:i.ArgumentDeclaration},FF={like:!1,inferred:!1,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,isList:!1,asType:!1,parent:$F},UF={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:uo,entityType:i.FunctionDeclaration},xF={constant:!0,id:Hd,type:i.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",defaultValue:null,dataType:FF,required:!0,implements:gs,index:0,writesValues:[Wv],parent:UF},jF={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},kF={id:uo,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[xF],calls:[GF],implements:bs,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:jF},qF={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},JF={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Ev,entityType:i.OutputMap},Yv={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Wn.inputs[0],defaultValue:null,readsValue:JF,index:0,parent:qF},WF={id:"iterate-over-employee-list-loop-parent-ref-id",type:i.GenericReference,entityId:Vn,entityType:i.FunctionDeclaration},YF={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:i.GenericReference,entityId:Si,entityType:i.Loop},HF={id:uv,type:i.OutputMap,version:1,defaultValue:null,declaration:Wn.outputs[0],writesValues:[Av],index:0,parent:YF},zF={type:i.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:i.VariableDeclaration,entityId:mn},ZF={id:Si,type:i.Loop,version:1,declaration:Wn,inputs:[Yv],successCalls:[Zd],errorCalls:[],outputsDeclarations:[],outputs:[HF],body:kF,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[zF],breakStatements:[],continueStatements:[Jv],error:null,x:0,y:0,parent:WF},KF={type:i.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:yo},XF={id:Iv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Ov],parent:KF},QF={type:i.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:yo},eU={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:QF},tU={type:i.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:vv},nU={type:i.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn};i.GenericReference,i.VariableDeclaration;const Hv={constant:!0,required:!0,id:yo,type:i.VariableDeclaration,version:1,name:"Bank account",description:"A variable holding an inherited bank account",defaultValue:null,dataType:eU,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Zd],errorCalls:[],readsValue:tU,writesValues:[],inputs:[],outputs:[XF],internalCalls:[],parent:nU,x:0,y:0},rU={type:i.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:po},iU={id:bv,type:i.OutputMap,version:1,declaration:Ft.properties[0],index:0,defaultValue:null,writesValues:[Sv],parent:rU},aU={type:i.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:po},sU={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:aU},oU={type:i.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:gv},lU={type:i.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn};i.GenericReference,i.VariableDeclaration;const zv={constant:!0,required:!0,id:po,type:i.VariableDeclaration,version:1,name:"Owner",dataType:sU,description:"A variable holding an inherited owner",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Zd],errorCalls:[],readsValue:oU,writesValues:[],inputs:[],outputs:[iU],internalCalls:[],parent:lU,x:0,y:0},dU={type:i.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},cU={id:gv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[2],index:4,writesValues:[zv],parent:dU},uU={type:i.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},pU={id:vv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[2],index:3,writesValues:[Hv],parent:uU},yU={type:i.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},hU={id:Rv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[0],index:2,writesValues:[Pv],parent:yU},fU={type:i.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},mU={id:Ev,type:i.OutputMap,version:1,defaultValue:null,declaration:Ht.properties[3],index:1,writesValues:[Yv],parent:fU},TU={type:i.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},EU={id:Tv,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[Cv],parent:TU},RU={type:i.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:mn},gU={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:RU},bU={type:i.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:Vn},vU={type:i.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:Yd},IU={type:i.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:i.FunctionDeclaration,entityId:Vn},Zv={constant:!0,required:!0,id:mn,type:i.VariableDeclaration,version:1,name:"Company",dataType:gU,description:"A variable holding a company",defaultValue:null,calledByError:[],calledByEntry:[IU],calledBySuccess:[],successCalls:[Hv,zv,ZF],errorCalls:[],readsValue:vU,writesValues:[],inputs:[],outputs:[EU,mU,hU,pU,cU],internalCalls:[],parent:bU,x:0,y:0},DU={type:i.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Yd,entityType:i.ArgumentDeclaration},SU={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Ht,asType:!1,isList:!1,like:!1,inferred:!1,parent:DU},OU={type:i.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:Vn,entityType:i.FunctionDeclaration},PU={constant:!0,type:i.ArgumentDeclaration,id:Yd,version:1,name:"Company",description:"The company to create a DTO for",defaultValue:null,required:!0,implements:null,dataType:SU,index:0,writesValues:[Zv],parent:OU},AU={type:i.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:i.Project,entityId:H},ec={type:i.FunctionDeclaration,id:Vn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[PU],calls:[Zv],implements:null,index:null,returnStatements:[zd],collapsed:!1,private:!1,x:0,y:0,parent:AU},Ca="exec-in-parallel-operation-call-id",wa="exec-sequentially-operation-call-id",vt="concurrency-and-wait-function-declaration-id",Kv="concurrency-and-wait-return-statement-id",Xv="concurrency-and-wait-return-declaration-id",tc="exec-in-parallel-argument-map-id",Qv="exec-sequentially-argument-map-id",nc="wait-for-2-seconds-operation-id",eI="wait-for-2-seconds-argument-map-id",rc="map-company-dto-function-call-id",tI="map-company-dto-function-call-company-dto-output-map-id",fo="company-dto-variable-one-id",ic="company-dto-variable-one-instance-id",nI="company-dto-variable-two-id",CU={type:i.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:Xv},wU={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,asType:!1,isList:!1,parent:CU},BU={type:i.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:i.ReturnStatement,entityId:Kv},MU={type:i.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:nI},rI={constant:!0,isError:!1,id:Xv,type:i.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",defaultValue:null,dataType:wU,implements:null,readsValue:MU,required:!0,index:0,parent:BU},_U={type:i.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:i.Operation,entityId:nc},VU={type:i.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},iI={type:i.ReturnStatement,id:Kv,version:1,outputs:[rI],calledByError:[],calledByEntry:[],calledBySuccess:[_U],throws:null,x:0,y:0,parent:VU},NU={type:i.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:i.VariableInstance,entityId:ic},LU={type:i.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:i.VariableInstance,entityId:ic},GU={type:i.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},aI={constant:!0,required:!0,id:nI,type:i.VariableDeclaration,version:1,name:"Company DTO",description:null,defaultValue:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[NU],internalCalls:[],writesValues:[rI],readsValue:LU,x:0,y:0,parent:GU},$U={type:i.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:i.VariableDeclaration,entityId:fo},FU={type:i.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:fo},UU={type:i.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},xU={type:i.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:fo},sI={id:ic,type:i.VariableInstance,version:1,declaration:xU,inputs:[],outputs:[],successCalls:[aI],errorCalls:[],defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[$U],internalCalls:[],writesValues:[aI],readsValue:FU,x:0,y:0,parent:UU},jU={type:i.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:i.FunctionCall,entityId:rc},kU={type:i.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:i.OutputMap,entityId:tI},qU={type:i.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},oI={constant:!0,required:!0,id:fo,type:i.VariableDeclaration,version:1,name:"Company DTO",description:null,defaultValue:null,dataType:null,inputs:[],outputs:[],successCalls:[sI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[jU],internalCalls:[],writesValues:[sI],readsValue:kU,x:0,y:0,parent:qU},lI={type:i.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:i.FunctionCall,entityId:rc},JU={id:"map-company-dto-function-call-company-input-map-id",type:i.InputMap,version:1,declaration:ec.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:lI},WU={id:tI,type:i.OutputMap,version:1,defaultValue:null,declaration:zd.outputs[0],writesValues:[oI],index:0,parent:lI},YU={id:"map-company-dto-function-call-called-by-ref-id",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:vt},HU={id:"map-company-dto-function-call-parent-ref-id",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:vt},zU={id:rc,type:i.FunctionCall,version:1,declaration:ec,successCalls:[oI],process:null,errorCalls:[],inputs:[JU],outputs:[WU],calledByError:[],calledByEntry:[YU],calledBySuccess:[],parent:HU,x:0,y:0,error:null},ZU={type:i.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:wd},KU={type:i.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:i.VariableDeclaration,entityId:wd},XU={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:ln,version:1,asType:!1,isList:!1,parent:ZU},QU={type:i.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:i.Project,entityId:H},ac={constant:!0,required:!0,id:wd,type:i.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",defaultValue:{id:"last-timestamp-variable-default-value-id",type:i.LiteralValue,version:1,name:C.Date,value:null,autogeneration:{type:ze.CurrentDateAndTime,rangeStart:null,rangeEnd:null},valueAsType:null,parent:KU},dataType:XU,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:QU},e4={type:i.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:eI},t4={type:i.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:i.Operation,entityId:nc},n4={id:eI,type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:i.LiteralValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:C.Number,parent:e4},index:0,parent:t4},r4={type:i.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},i4={type:i.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:i.Operation,entityId:wa},a4={type:i.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:i.Operation,entityId:Ca},dI={id:nc,type:i.Operation,version:1,declaration:Qt,inputs:[n4],outputs:[],process:null,successCalls:[iI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[i4,a4],error:null,parent:r4},s4={type:i.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:i.InputMap,entityId:"wait-for-random-amount-input-map-id"},o4={type:i.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:i.Operation,entityId:"wait-for-random-amount-id"},l4={id:"wait-for-random-amount-input-map-id",type:i.InputMap,version:1,declaration:yr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:i.LiteralValue,version:1,value:null,valueAsType:null,autogeneration:{type:ze.Random,rangeStart:1e3,rangeEnd:4e3},name:C.Number,parent:s4},index:0,parent:o4},d4={type:i.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:i.Project,entityId:H},Oi={id:"wait-for-random-amount-id",type:i.Operation,version:1,declaration:Qt,inputs:[l4],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:d4},sc="list-of-functions-variable-id",c4={type:i.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-argument-parent-ref-id",entityType:i.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},u4={id:"list-of-functions-variable-action-descriptor-dynamic-argument-id",type:i.ValueDescriptor,version:1,name:"Any input value",description:"Any input value that can be passed to the action",defaultValue:null,index:0,required:!1,dataType:null,parent:c4},p4={type:i.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-return-parent-ref-id",entityType:i.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},y4={id:"list-of-functions-variable-action-descriptor-dynamic-return-id",type:i.ValueDescriptor,version:1,name:"Any output value",description:"Any output value that can be returned to the action",defaultValue:null,index:0,required:!1,dataType:null,parent:p4},h4={type:i.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:sc},f4={id:"list-of-functions-variable-action-descriptor-id",type:i.ActionDescriptor,version:1,name:"Action to execute",description:"An action of any type, to be executed. It can contain any number of inputs and outputs.",inputs:[u4],error:null,outputs:[y4],parent:null},m4={type:i.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:i.VariableDeclaration,entityId:sc},T4={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:f4,asType:!1,isList:!0,parent:h4},E4={type:i.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt};i.GenericReference,i.InputMap;const R4={type:i.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:i.InputMap,entityId:Qv},g4={type:i.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:i.InputMap,entityId:tc},cI={constant:!0,required:!0,id:sc,type:i.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:i.LiteralValue,version:1,name:C.ActionDescriptor,value:null,valueAsType:[Oi,Oi,Oi,Oi,Oi],autogeneration:null,parent:m4},dataType:T4,parent:E4,readsValue:null,writesValues:[R4,g4],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},b4={type:i.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:i.Operation,entityId:Ca},v4={type:i.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},I4={type:i.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:"exec-in-parallel-return-map-id"},D4={type:i.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:i.Operation,entityId:Ca},uI={id:"exec-in-parallel-result-variable-id",type:i.VariableInstance,version:1,declaration:ac,readsValue:I4,writesValues:[],defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[D4],successCalls:[],errorCalls:[],internalCalls:[],parent:v4,x:0,y:0},S4={id:"exec-in-parallel-return-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:Gl,writesValues:[uI],index:0,parent:b4},O4={type:i.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:i.Operation,entityId:Ca},P4={id:tc,type:i.InputMap,version:1,declaration:Ll,name:null,description:null,readsValue:cI,defaultValue:null,index:0,parent:O4},A4={type:i.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},C4={type:i.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:vt},w4={process:null,id:Ca,type:i.Operation,version:1,declaration:Qt,inputs:[P4],outputs:[S4],successCalls:[dI,uI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[C4],calledBySuccess:[],error:null,parent:A4},B4={type:i.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:i.Operation,entityId:wa},M4={type:i.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},_4={type:i.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:"exec-sequentially-return-map-id"},V4={type:i.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:i.Operation,entityId:wa},pI={id:"exec-sequentially-result-variable-id",type:i.VariableInstance,version:1,declaration:ac,readsValue:_4,defaultValue:null,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[V4],successCalls:[],errorCalls:[],internalCalls:[],parent:M4,x:0,y:0},N4={id:"exec-sequentially-return-map-id",type:i.OutputMap,version:1,defaultValue:null,declaration:Fl,writesValues:[pI],index:0,parent:B4},L4={type:i.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:i.Operation,entityId:wa},G4={id:Qv,type:i.InputMap,version:1,declaration:$l,name:null,description:null,readsValue:cI,defaultValue:null,index:0,parent:L4},$4={type:i.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:i.FunctionDeclaration,entityId:vt},F4={type:i.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:vt},U4={id:wa,type:i.Operation,version:1,declaration:wn,inputs:[G4],process:null,outputs:[N4],successCalls:[dI,pI],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[F4],calledBySuccess:[],error:null,parent:$4},x4={type:i.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:i.Project,entityId:H},j4={type:i.FunctionDeclaration,id:vt,version:1,name:"Execute with concurrency and wait",description:"Executes a hardcoded list of actions in parallel and waits for some time before ending the logic with some unrelated data payload as the result.",inputs:[],calls:[U4,w4,zU],returnStatements:[iI],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:x4},k4={type:i.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:i.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},q4={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ht,isList:!1,asType:!1,parent:k4},J4={type:i.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:i.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},W4={constant:!0,isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:i.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",defaultValue:null,implements:null,dataType:q4,readsValue:null,required:!0,index:0,parent:J4},Y4={type:i.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:i.FunctionDeclaration,entityId:"5059c093-eda2-4efc-b7b4-aaaadd4d44de"},H4={type:i.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:i.FunctionDeclaration,entityId:"5059c093-eda2-4efc-b7b4-aaaadd4d44de"},yI={type:i.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[W4],calledByError:[],calledByEntry:[H4],calledBySuccess:[],throws:null,x:0,y:0,parent:Y4},z4={type:i.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:i.Project,entityId:H},Z4={type:i.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[yI],index:null,implements:null,returnStatements:[yI],collapsed:!1,private:!1,x:0,y:0,parent:z4},oc="get-current-date-and-time-func-decl-id",hI="get-current-date-and-time-return-statement-id",lc="get-current-date-and-time-return-declaration-id",K4="get-current-date-and-time-return-declaration-data-type-id",X4={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:i.ReturnDeclaration,entityId:lc},Q4={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:i.ReturnDeclaration,entityId:lc},ex={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:K4,version:1,entity:ln,asType:!1,isList:!1,like:!1,inferred:!1,parent:Q4},tx={type:i.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:i.ReturnStatement,entityId:hI};i.ReturnDeclaration,i.LiteralValue,C.Date,ze.CurrentDateAndTime;const nx={type:i.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:oc},rx={type:i.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:i.FunctionDeclaration,entityId:oc};i.ReturnStatement;const ix={type:i.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:i.Project,entityId:H},ax={type:i.FunctionDeclaration,id:oc,version:1,name:"Get current date and time",description:"Generates and returns the current date and time at the time of the execution",inputs:[],calls:[],returnStatements:[],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:ix},fI="do-math-return-statement-id",dc="do-math-return-declaration-id",sx={type:i.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:i.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},ox={like:!1,inferred:!1,id:"do-math-func-var-to-return-one-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:sx},lx={type:i.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},dx={type:i.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:i.ReturnDeclaration,entityId:dc},cx={constant:!0,required:!0,type:i.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",defaultValue:null,dataType:ox,readsValue:null,writesValues:[dx],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:lx},ux={type:i.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:i.ReturnStatement,entityId:fI},px={type:i.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:i.ReturnDeclaration,entityId:dc},yx={like:!1,inferred:!1,id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:px},hx={constant:!0,isError:!1,id:dc,version:1,type:i.ReturnDeclaration,name:"Result",description:null,implements:null,defaultValue:null,dataType:yx,readsValue:cx,required:!0,index:0,parent:ux},fx={type:i.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},mx={type:i.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},mI={type:i.ReturnStatement,id:fI,version:1,outputs:[hx],calledByError:[],calledByEntry:[],calledBySuccess:[fx],parent:mx,throws:null,x:0,y:0},Tx={type:i.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:i.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},Ex={like:!1,inferred:!1,id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,asType:!1,isList:!1,parent:Tx},Rx={type:i.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},gx={type:i.GenericReference,id:"do-math-func-return-one-called-by",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},bx={type:i.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:i.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},TI={constant:!0,required:!0,type:i.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:Ex,description:null,defaultValue:null,readsValue:bx,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[gx],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:Rx},vx={type:i.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Ix={type:i.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:i.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},Dx={type:i.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:i.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},Sx={like:!1,inferred:!1,id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Dx},Ox={type:i.GenericReference,id:"do-math-func-return-two-called-by",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},EI={constant:!0,required:!0,type:i.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[Ox],successCalls:[],errorCalls:[],dataType:Sx,readsValue:Ix,writesValues:[],internalCalls:[],parent:vx,x:0,y:0},RI={type:i.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Px={type:i.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Ax={type:i.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Cx={type:i.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:i.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},gI={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:i.InputMap,declaration:Il,name:null,description:null,readsValue:Cx,defaultValue:null,index:0,parent:Ax},wx={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:i.OutputMap,version:1,defaultValue:null,declaration:Ol,writesValues:[TI,EI],index:0,parent:Px},Bx={type:i.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:i.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Mx={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:i.GenericReference,entityType:i.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},bI={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:i.InputMap,declaration:Dl,name:null,description:null,readsValue:Mx,defaultValue:null,index:1,parent:Bx},_x={type:i.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:ls,version:1,inputs:[gI,bI],outputs:[wx],calledByError:[],calledByEntry:[RI],calledBySuccess:[],process:null,successCalls:[mI,TI,EI],errorCalls:[],parent:RI,error:null,x:0,y:0},Vx={type:i.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:i.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},Nx={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:i.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:i.ArgumentDeclaration},vI={like:!1,inferred:!1,id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:Nx},Lx={type:i.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:i.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},Gx={type:i.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},$x={type:i.GenericReference,id:"do-math-func-var-called-by-ref",entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},II={constant:!0,required:!0,id:"72a338d8-0183-4ca2-8760-227517854595",type:i.VariableDeclaration,version:1,name:"Z",description:null,defaultValue:{id:"do-math-func-argument-two-default-value-id",type:i.LiteralValue,version:1,value:1,name:C.Number,valueAsType:null,autogeneration:null,parent:Vx},dataType:vI,inputs:[],outputs:[],calledByError:[],calledByEntry:[$x],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:Lx,writesValues:[bI],internalCalls:[],x:0,y:0,parent:Gx},Fx={entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:i.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},Ux={constant:!0,id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:i.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",defaultValue:null,dataType:vI,implements:null,writesValues:[II],required:!0,index:1,parent:Fx},xx={type:i.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:i.Project,entityId:H},jx={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:i.GenericReference,entityType:i.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},kx={type:i.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:i.VariableDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},qx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:i.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:i.ArgumentDeclaration},Jx={like:!1,inferred:!1,id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:qx},Wx={constant:!0,id:"d8895765-f705-457e-85fa-25d130926769",type:i.ArgumentDeclaration,version:1,name:"N",dataType:Jx,description:"The number to add",implements:null,defaultValue:{id:"do-math-func-argument-one-default-value-id",type:i.LiteralValue,version:1,value:5,name:C.Number,valueAsType:null,autogeneration:null,parent:kx},writesValues:[gI],required:!0,index:0,parent:jx},Yx={type:i.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[Wx,Ux],calls:[_x,II],implements:null,index:null,collapsed:!1,returnStatements:[mI],private:!1,x:0,y:0,parent:xx},It="replace-bank-account-in-company-func-declaration-id",cc="company-entity-to-modify-arg-declaration-id",uc="account-number-to-create-arg-decl-id",Pi="company-main-variable-id",Ai="search-person-by-id-id",DI="new-bank-account-owner-arg-decl-id",SI="search-person-by-id-output-declaration-id",pc="search-person-by-id-output-entity-map-id",Ba="person-not-empty-condition-id",mo="create-new-bank-account-instance-operation-id",OI="create-new-bank-account-instance-operation-output-entity-map-id",PI="company-bank-account-output-map-id",yc="old-bank-account-var-declaration-id",AI="old-bank-account-var-instance-id",CI="company-variable-instance-id",hc="delete-bank-account-internal-call-id",Ma="new-bank-account-data-variable-declaration-id",Hx={type:i.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},zx={type:i.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:i.InternalCall,entityId:hc},Zx={type:i.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:i.VariableDeclaration,entityId:Pi},Kx={type:i.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:i.VariableInstance,entityId:CI},Xx={type:i.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:OI},wI={type:i.InputMap,id:"bank-account-input-map-id",version:1,readsValue:Xx,declaration:Gd,name:null,description:null,index:0,defaultValue:null,parent:Kx},Qx={type:i.VariableInstance,id:CI,version:1,defaultValue:null,declaration:Zx,inputs:[wI],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[zx],successCalls:[],errorCalls:[],internalCalls:[],parent:Hx,readsValue:null,writesValues:[],x:0,y:0},ej={type:i.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},tj={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:vi,asType:!1,isList:!1,like:!1,inferred:!1,parent:ej},nj={type:i.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:PI},rj={type:i.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},ij={type:i.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:i.VariableDeclaration,entityId:Pi},aj={type:i.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:i.Operation,entityId:mo};i.GenericReference,i.VariableInstance;const sj={type:i.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:i.VariableDeclaration,entityId:yc},oj={type:i.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:i.VariableDeclaration,entityId:yc},lj={type:i.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:i.FunctionDeclaration,entityId:It},dj={type:i.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:i.InternalCall,entityId:hc},cj={type:i.VariableInstance,id:AI,version:1,defaultValue:null,declaration:oj,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[dj],errorCalls:[],parent:lj,readsValue:null,writesValues:[],x:0,y:0},BI={process:null,type:i.InternalCall,id:hc,version:1,declaration:cd,index:0,successCalls:[Qx],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[aj,sj],parent:cj},MI={constant:!0,required:!0,type:i.VariableDeclaration,id:yc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:tj,defaultValue:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[ij],successCalls:[BI],internalCalls:[],errorCalls:[],parent:rj,readsValue:nj,writesValues:[],x:0,y:0},uj={type:i.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},pj={type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Ht,asType:!1,isList:!1,like:!1,inferred:!1,parent:uj},yj={type:i.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:i.ArgumentDeclaration,entityId:cc},hj={type:i.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},fj={type:i.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:It},mj={type:i.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Pi},Tj={id:PI,version:1,type:i.OutputMap,defaultValue:null,declaration:Gd,index:0,parent:mj,writesValues:[MI]},_I={constant:!0,required:!0,type:i.VariableDeclaration,id:Pi,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",defaultValue:null,dataType:pj,inputs:[],outputs:[Tj],calledByError:[],calledByEntry:[fj],calledBySuccess:[],successCalls:[MI],errorCalls:[],parent:hj,internalCalls:[],readsValue:yj,writesValues:[],x:0,y:0},Ej={type:i.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ma},Rj={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:i.GenericReference,entityType:i.OutputMap,entityId:pc},VI={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:i.InputMap,declaration:null,name:"Account owner",description:null,readsValue:Rj,index:1,defaultValue:null,parent:Ej},gj={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:i.GenericReference,entityType:i.ArgumentDeclaration,entityId:uc},bj={type:i.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ma},NI={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:i.InputMap,declaration:null,name:"Account number",description:null,readsValue:gj,defaultValue:null,index:0,parent:bj},LI={type:i.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:i.Operation,entityId:mo},vj={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:i.InputMap,declaration:hr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:i.LiteralValue,name:C.EntityTemplate,value:null,valueAsType:vi,autogeneration:null},parent:LI},Ij={type:i.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:i.VariableDeclaration,entityId:Ma},GI={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:i.InputMap,declaration:hr.inputs[1],name:null,description:null,index:1,readsValue:Ij,defaultValue:null,parent:LI},Dj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:i.Operation,entityId:mo},Sj={id:OI,version:1,type:i.OutputMap,defaultValue:null,declaration:hr.outputs[0],index:0,writesValues:[wI],parent:Dj},Oj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.Condition,entityId:Ba},Pj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.VariableDeclaration,entityId:Ma},Aj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},$I={process:null,id:mo,type:i.Operation,version:1,declaration:hr,inputs:[vj,GI],error:null,outputs:[Sj],successCalls:[BI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[Pj,Oj],parent:Aj,x:0,y:0},Cj={type:i.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},wj={type:i.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:i.Condition,entityId:Ba},Bj={constant:!0,required:!0,id:Ma,type:i.VariableDeclaration,version:1,defaultValue:null,inputs:[NI,VI],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[GI],successCalls:[$I],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[wj],calledByEntry:[],x:0,y:0,parent:Cj},Mj={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:i.ReturnDeclaration},_j={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:i.ReturnDeclaration},Vj={like:!1,inferred:!1,id:"person-not-found-thrown-error-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:_j},Nj={id:"person-not-found-thrown-error-parent-ref-id",type:i.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:i.ReturnStatement},Lj={constant:!0,isError:!0,id:"person-not-found-thrown-error-id",type:i.ReturnDeclaration,version:1,dataType:Vj,name:"Person not found error",description:"If the person entity was not found this error is outputted",defaultValue:{id:"person-not-found-thrown-error-datatype-default-value-id",type:i.LiteralValue,version:1,value:"Person not found",name:C.String,parent:Mj,valueAsType:null,autogeneration:null},parent:Nj,implements:null,required:!0,index:0,readsValue:null},Gj={id:"person-not-found-error-return-statement-called-by-ref-id",type:i.GenericReference,entityId:Ba,entityType:i.Condition},$j={id:"person-not-found-error-return-statement-parent-ref-id",type:i.GenericReference,entityId:It,entityType:i.FunctionDeclaration},Fj={id:"person-not-found-error-return-statement-id",type:i.ReturnStatement,version:1,throws:Lj,outputs:[],calledBySuccess:[],calledByError:[Gj],calledByEntry:[],x:0,y:0,parent:$j},Uj={type:i.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:i.Search,entityId:Ai},xj={type:i.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},jj={type:i.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:i.OutputMap,entityId:pc},kj={type:i.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:i.Condition,entityId:Ba},FI={id:"person-entity-to-check-map-id",version:1,type:i.InputMap,declaration:gr.inputs[0],name:null,description:null,readsValue:jj,index:0,defaultValue:null,parent:kj},qj={type:i.Condition,id:Ba,version:1,declaration:gr,inputs:[FI],calledByError:[],calledByEntry:[],calledBySuccess:[Uj],successCalls:[Bj,$I],errorCalls:[Fj],x:0,y:0,parent:xj},Jj={type:i.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:i.ValueDescriptor,entityId:SI},Wj={like:!1,inferred:!1,id:"search-person-by-id-output-entity-declaration-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,asType:!1,entity:bt,parent:Jj},Yj={type:i.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:i.Search,entityId:Ai},UI={id:SI,type:i.ValueDescriptor,version:1,defaultValue:null,dataType:Wj,name:"Found person",description:"The person entity that was found",parent:Yj,required:!0,index:0},Hj={type:i.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:i.Search,entityId:Ai},zj={type:i.OutputMap,id:pc,version:1,defaultValue:null,declaration:UI,parent:Hj,writesValues:[FI,VI],index:0},Zj={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:i.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:i.ArgumentDeclaration};i.DataType;const Kj={type:i.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:i.Search,entityId:Ai},xI={id:"search-person-by-id-input-declaration-id",type:i.ValueDescriptor,version:1,dataType:null,defaultValue:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",parentRelationType:A.FixedArguments,index:0,required:!0,parent:Kj},Xj={type:i.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:i.Search,entityId:Ai},Qj={id:"search-person-by-id-input-map-reads-value-ref-id",type:i.GenericReference,entityId:DI,entityType:i.ArgumentDeclaration},jI={type:i.InputMap,id:"search-person-by-id-input-map",version:1,declaration:xI,name:null,description:null,readsValue:Qj,defaultValue:null,parent:Xj,index:0},e8="SELECT * FROM Person WHERE id = your_id;",t8={type:i.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:i.FunctionDeclaration,entityId:It},n8={type:i.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:i.FunctionDeclaration,entityId:It},r8={type:i.Search,id:Ai,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:e8,inputsDeclarations:[xI],inputs:[jI],outputsDeclarations:[UI],outputs:[zj],calledByError:[],calledByEntry:[n8],calledBySuccess:[],error:null,successCalls:[qj],errorCalls:[],parent:t8,x:0,y:0};i.GenericReference,i.DataType;const i8={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:uc,entityType:i.ArgumentDeclaration},a8={like:!1,inferred:!1,id:"account-number-to-create-arg-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:J,isList:!1,asType:!1,parent:i8},s8={entityType:i.FunctionDeclaration,entityId:It,type:i.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},o8={constant:!0,id:uc,type:i.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",defaultValue:null,dataType:a8,implements:null,writesValues:[NI],required:!0,index:1,parent:s8};i.GenericReference,i.DataType;const l8={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:i.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:i.ArgumentDeclaration},d8={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:An,isList:!1,asType:!1,parent:l8},c8={entityType:i.FunctionDeclaration,entityId:It,type:i.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},u8={constant:!0,id:DI,type:i.ArgumentDeclaration,version:1,name:"New account owner ID",description:"If it has changed, this is the new person entity, that owns of the bank account",defaultValue:null,dataType:d8,implements:null,writesValues:[jI],required:!1,index:1,parent:c8},p8={type:i.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:i.Project,entityId:H},y8={type:i.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:i.FunctionDeclaration,entityId:It};i.GenericReference,i.DataType;const h8={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:i.GenericReference,entityId:cc,entityType:i.ArgumentDeclaration},f8={like:!1,inferred:!1,id:"company-entity-to-modify-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ee,isList:!1,asType:!1,parent:h8},m8={constant:!0,id:cc,type:i.ArgumentDeclaration,version:1,name:"Company",defaultValue:null,dataType:f8,implements:null,description:"The company to replace the bank account for",writesValues:[_I],required:!0,index:0,parent:y8},T8={type:i.FunctionDeclaration,id:It,version:1,name:"Replace bank account",description:"This action takes an existing company and data to create a new bank account entity. It then creates a bank account, deletes the old one, and updates the company with the new bank account",inputs:[m8,o8,u8],index:null,implements:null,calls:[r8,_I],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:p8},E8={type:i.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:i.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},R8={type:i.FunctionDeclaration,version:1,id:"6bedb217-f844-4332-af72-9626b2a32511",name:"Some library main function",description:null,inputs:[],calls:[],implements:null,collapsed:!0,index:null,returnStatements:[],private:!1,parent:E8,x:0,y:0},g8={type:i.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:i.Project,entityId:H},b8={type:i.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:i.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},v8={type:i.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[R8],events:[],implements:b8,parent:g8,x:0,y:0},fc="global-counted-test-loop-id",kI="global-counted-test-loop-body-id",qI="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",I8={type:i.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:qI,entityType:i.ArgumentDeclaration},D8={like:!1,inferred:!1,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:I8},S8={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:kI,entityType:i.FunctionDeclaration},O8={constant:!0,id:qI,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:D8,implements:Zl,required:!0,index:0,writesValues:[],parent:S8},P8={id:"global-counted-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:fc,entityType:i.Loop},A8={id:kI,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[O8],calls:[],implements:Kl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:P8},Ci="random-company-employee-test-variable-id",mc="manager-global-variable-id",JI="global-user-instance-id",Tn="employee-mapped-dto-variable-id",Ar="employee-mapped-dto-variable-instance-id",WI="random-employee-id-output-map-id",YI="random-employee-birth-date-output-map-id",HI="random-employee-department-output-map-id",zI="random-employee-manager-output-map-id",ZI="manager-global-id-output-map-id",KI="global-user-instance-id-output-map-id",C8="employee-mapped-dto-requester-id-input-map-id",XI="employee-mapped-dto-now-timestamp-input-map-id",w8="employee-mapped-dto-id-input-map-id",B8="employee-mapped-dto-birth-date-input-map-id",M8="employee-mapped-dto-department-input-map-id",_8="employee-mapped-dto-manager-input-map-id",V8={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:i.GenericReference,entityId:fc,entityType:i.Loop};i.GenericReference,i.VariableDeclaration;const N8={id:"global-counted-test-loop-iteration-number-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:ta.inputs[0],defaultValue:null,readsValue:null,index:0,parent:V8},L8={id:"global-counted-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},G8={id:"global-counted-test-loop-called-by-success-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},QI={id:fc,type:i.Loop,version:1,declaration:ta,inputs:[N8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:A8,calledByError:[],calledByEntry:[],calledBySuccess:[G8],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:L8},Tc="global-object-keys-test-loop-id",eD="global-object-keys-test-loop-body-id",tD="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",$8={type:i.GenericReference,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:tD,entityType:i.ArgumentDeclaration},F8={like:!1,inferred:!1,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:$8},U8={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:eD,entityType:i.FunctionDeclaration},x8={constant:!0,id:tD,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:F8,implements:Yl,required:!0,index:0,writesValues:[],parent:U8},j8={id:"global-object-keys-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:Tc,entityType:i.Loop},k8={id:eD,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[x8],calls:[],implements:li,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:j8},q8={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:i.GenericReference,entityId:Tc,entityType:i.Loop},J8={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Tn,entityType:i.VariableDeclaration},nD={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:li.inputs[0],defaultValue:null,readsValue:J8,index:0,parent:q8},W8={id:"global-object-keys-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},Y8={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},H8={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:i.GenericReference,entityId:Tn,entityType:i.VariableDeclaration},Ec={id:Tc,type:i.Loop,version:1,declaration:li,inputs:[nD],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:k8,calledByError:[],calledByEntry:[],calledBySuccess:[H8,Y8],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:W8},Rc="global-object-values-test-loop-id",rD="global-object-values-test-loop-body-id",iD="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",z8={type:i.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:iD,entityType:i.ArgumentDeclaration},Z8={like:!1,inferred:!1,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:z8},K8={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:rD,entityType:i.FunctionDeclaration},X8={constant:!0,id:iD,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:Z8,implements:Hl,required:!0,index:0,writesValues:[],parent:K8},Q8={id:"global-object-values-test-loop-body-parent-ref-id",type:i.GenericReference,entityId:Rc,entityType:i.Loop},ek={id:rD,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[X8],calls:[],implements:di,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Q8},tk={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:i.GenericReference,entityId:Rc,entityType:i.Loop},nk={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableDeclaration},aD={id:"global-object-values-test-loop-iteration-object-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:di.inputs[0],defaultValue:null,readsValue:nk,index:0,parent:tk},rk={id:"global-object-values-test-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},ik={id:"global-object-values-test-loop-called-by-success-ref-id",type:i.GenericReference,entityId:Ar,entityType:i.VariableInstance},sD={id:Rc,type:i.Loop,version:1,declaration:di,inputs:[aD],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:ek,calledByError:[],calledByEntry:[],calledBySuccess:[ik],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:rk},gc="global-test-iterate-over-string-loop-id",bc="global-test-iterate-over-string-loop-body-id",To="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",oD="global-test-iterate-over-string-loop-iteration-list-input-map-id",ak={type:i.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:To,entityType:i.ArgumentDeclaration},sk={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:ak},ok={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:bc,entityType:i.FunctionDeclaration},lk={constant:!0,id:To,type:i.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",defaultValue:null,dataType:sk,implements:ql,required:!0,index:1,writesValues:[],parent:ok},dk={type:i.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:To,entityType:i.ArgumentDeclaration},ck={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:dk},uk={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:bc,entityType:i.FunctionDeclaration},pk={constant:!0,id:To,type:i.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",defaultValue:null,dataType:ck,implements:Jl,required:!0,index:0,writesValues:[],parent:uk},yk={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:i.GenericReference,entityId:gc,entityType:i.Loop},hk={id:bc,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[pk,lk],calls:[],implements:Wl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:yk},fk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:gc,entityType:i.Loop},mk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:i.GenericReference,entityId:oD,entityType:i.InputMap},Tk={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:i.LiteralValue,name:C.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:ze.Random,rangeStart:4,rangeEnd:5},parent:mk},Ek={id:oD,type:i.InputMap,version:1,name:null,description:null,declaration:ea.inputs[0],defaultValue:Tk,readsValue:null,index:0,parent:fk},Rk={id:"global-test-iterate-over-string-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},gk={id:gc,type:i.Loop,version:1,declaration:ea,inputs:[Ek],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:hk,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Rk},vc="iterate-over-list-loop-id",lD="iterate-over-list-loop-body-id",dD="iterate-over-list-loop-body-current-iteration-value-argument-declaration-id",bk={type:i.GenericReference,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:dD,entityType:i.ArgumentDeclaration},vk={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,parent:bk},Ik={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:i.GenericReference,entityId:lD,entityType:i.FunctionDeclaration},Dk={constant:!0,id:dD,type:i.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",defaultValue:null,dataType:vk,implements:gs,required:!0,index:0,writesValues:[],parent:Ik},Sk={id:"iterate-over-list-loop-body-parent-ref-id",type:i.GenericReference,entityId:vc,entityType:i.Loop},Ok={id:lD,type:i.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Dk],calls:[],implements:bs,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Sk},Pk={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:i.GenericReference,entityId:vc,entityType:i.Loop},Ak={id:"iterate-over-list-loop-iteration-list-input-map-id",type:i.InputMap,version:1,name:null,description:null,declaration:Wn.inputs[0],defaultValue:null,readsValue:null,index:0,parent:Pk},Ck={id:"iterate-over-list-loop-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},wk={id:vc,type:i.Loop,version:1,declaration:Wn,inputs:[Ak],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Ok,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Ck},Bk=`SELECT
|
|
2
2
|
Employee.identifier AS EmployeeID,
|
|
3
3
|
Employee.startDate AS startDate,
|
|
4
4
|
User.identifier AS userID,
|
|
@@ -21,7 +21,7 @@ WHERE
|
|
|
21
21
|
AND Employee.manager IS NOT NULL
|
|
22
22
|
OR (Employee.manager = User.identifier AND User.identifier IS NOT NULL)
|
|
23
23
|
ORDER BY Employee.startDate DESC, Employee.department ASC
|
|
24
|
-
LIMIT 10 OFFSET 0;`,Mk={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},_k={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:i.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:i.Search},lD={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:i.ValueDescriptor,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",defaultValue:null,dataType:null,required:!0,index:0,parent:_k},Vk={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:i.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:i.Search},Nk={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:i.OutputMap,version:1,defaultValue:null,declaration:lD,writesValues:[],index:0,parent:Vk},Lk={id:"find-companies-with-multiple-employees-and-bank-account",type:i.Search,version:1,name:"Find companies with multiple employees and a bank account",description:"This search statement finds companies with multiple employees and an existing bank account",inputsDeclarations:[],outputsDeclarations:[lD],inputs:[],outputs:[Nk],query:Bk,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:Mk},Gk={type:i.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:HI},$k={type:i.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},dD={id:_8,type:i.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:Gk,parent:$k},Fk={type:i.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:WI},Uk={type:i.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},cD={id:M8,type:i.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:Fk,parent:Uk},xk={type:i.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:JI},jk={type:i.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},uD={id:B8,type:i.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:xk,parent:jk},kk={type:i.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:qI},qk={type:i.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},pD={id:w8,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:kk,parent:qk},Jk={type:i.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:zI},Wk={type:i.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},yD={id:C8,type:i.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,index:0,readsValue:Jk,parent:Wk},Yk={type:i.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mc},Hk={id:HI,type:i.OutputMap,version:1,declaration:Ft.properties[0],defaultValue:null,index:0,writesValues:[dD],parent:Yk},zk={type:i.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:mc},Zk={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:zk},Kk={type:i.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:YI},Xk={type:i.GenericReference,id:"manager-variable-parent-ref-id",entityType:i.Project,entityId:H},hD={constant:!0,required:!0,id:mc,type:i.VariableDeclaration,version:1,name:"Manager",dataType:Zk,description:"A variable holding an inherited manager for testing purposes",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:Kk,writesValues:[],inputs:[],outputs:[Hk],internalCalls:[],parent:Xk,x:0,y:0},Qk={type:i.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},e9={id:YI,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[2],index:3,writesValues:[hD],parent:Qk},t9={type:i.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},n9={id:WI,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[0],index:2,writesValues:[cD],parent:t9},r9={type:i.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},i9={id:JI,type:i.OutputMap,version:1,defaultValue:null,declaration:bt.properties[1],index:1,writesValues:[uD],parent:r9},a9={type:i.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},s9={id:qI,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[pD],parent:a9},o9={type:i.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},l9={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:o9},d9={type:i.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:i.Project,entityId:H},c9={constant:!0,required:!0,id:Ci,type:i.VariableDeclaration,version:1,name:"Company employee",dataType:l9,description:"A variable holding a random company employee for testing purposes",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[s9,i9,n9,e9],internalCalls:[],parent:d9,x:0,y:0},u9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:ZI},p9={type:i.LiteralValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:C.Date,version:1,valueAsType:null,value:null,autogeneration:{type:ze.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:u9},y9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:i.VariableInstance,entityId:Ar},h9={id:ZI,type:i.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:p9,index:5,readsValue:null,parent:y9},f9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:i.VariableDeclaration,entityId:Tn},m9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:i.VariableDeclaration,entityId:Tn},T9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:i.Project,entityId:H},E9={id:Ar,type:i.VariableInstance,version:1,defaultValue:null,declaration:f9,calledByError:[],calledByEntry:[],calledBySuccess:[m9],successCalls:[Ec,iD,KI],errorCalls:[],readsValue:null,writesValues:[rD],inputs:[h9],outputs:[],internalCalls:[],parent:T9,x:0,y:0},R9={type:i.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:i.Project,entityId:H},g9={constant:!0,required:!0,id:Tn,type:i.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Ec,E9],errorCalls:[],readsValue:null,writesValues:[eD],inputs:[yD,pD,uD,cD,dD],outputs:[],internalCalls:[],parent:R9,x:0,y:0},b9={type:i.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:i.VariableDeclaration,entityId:rb},v9={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:_d,version:1,asType:!1,isList:!1,parent:b9},I9={type:i.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:i.Project,entityId:H},fD={constant:!0,required:!0,id:rb,type:i.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",defaultValue:null,dataType:v9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:I9},D9={type:i.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:i.VariableInstance,entityId:kI},S9={id:zI,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[yD],parent:D9},O9={type:i.GenericReference,id:"global-user-instance-parent-ref-id",entityType:i.Project,entityId:H},P9={id:kI,type:i.VariableInstance,version:1,defaultValue:null,declaration:fD,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[S9],internalCalls:[],parent:O9,x:0,y:0},A9={type:i.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:"is-test-environment-variable-dcl-id"},C9={type:i.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:i.VariableDeclaration,entityId:"is-test-environment-variable-dcl-id"},w9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:On,version:1,asType:!1,isList:!1,parent:A9},B9={type:i.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:i.Project,entityId:H},mD={constant:!0,required:!0,id:"is-test-environment-variable-dcl-id",type:i.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:C.Boolean,version:1,value:null,type:i.LiteralValue,autogeneration:{type:ze.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:C9},dataType:w9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:B9},M9={type:i.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:i.Project,entityId:H},_9={id:"is-test-environment-variable-instance-id",type:i.VariableInstance,version:1,defaultValue:null,declaration:mD,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:M9,x:0,y:0},TD={type:i.Project,id:H,version:1,name:"Mocked project to compile",description:"This project is used to test all sorts of features and edge cases. It is not meant to be used in production. Or to have any functionality that makes sense",projects:[v8],entities:[Md,Ft,_d,bt,I0,Yt,ro,bb,vb,vi,tL,Ht,ZL,Bd,Rw,o0,QN],functions:[j4,Yb,Qd,Z4,ax,lv,ec,$d,T8,Mb,Yx],events:[n1],variableDeclarations:[mD,fD,ac,c9,hD,g9],variableInstances:[_9,P9],conditions:[],operations:[Oi],functionCalls:[eG,l$],loops:[wk,Ec,iD,gk,KI],searches:[Lk]};var E=(r=>(r.Error="error",r.Warning="warning",r))(E||{}),B=(r=>(r.InvalidObjectStructure="invalid-object-structure",r.NameNotUniqueInScope="name-not-unique-in-scope",r.EmptyName="empty-name",r.MissingCaller="missing-caller",r.PropertyOverwrite="property-overwrite",r.MethodOverwrite="method-overwrite",r.NoOverlapWithImplementedSignature="no-overlap-with-implemented-signature",r.ReaderWriterIncompatibleDataType="reader-writer-incompatible-data-type",r.UnreachableEntity="unreachable-entity",r.InternalCallParentMissingDataType="internal-call-parent-missing-data-type",r.InternalCallParentDeclarationEntityInvalidType="internal-call-parent-declaration-entity-invalid-type",r.InternalCallDeclarationNotFoundInParentDatatypeEntity="internal-call-declaration-not-found-in-parent-datatype-entity",r.InternalCallDeclarationIsNotFunctionDeclaration="internal-call-declaration-is-not-function-declaration",r.InternalCallDeclarationNotInParentDatatypeEntity="internal-call-declaration-not-in-parent-datatype-entity",r))(B||{}),T=(r=>(r.RootReference="root-reference",r.ReferencedEntityNotFound="referenced-entity-not-found",r.EntityIdNotUnique="entity-id-not-unique",r.BuiltInEntityGenerated="built-in-entity-generated",r.BuiltInEntityUpdated="built-in-entity-updated",r.BuiltInEntityDeleted="built-in-entity-deleted",r.UnknownEntityType="unknown-entity-type",r.MissingTypeProperty="missing-type-property",r.MissingIdProperty="missing-id-property",r.BuiltInEntityParent="built-in-entity-parent",r.InvalidBuiltInEntityReference="invalid-built-in-entity-reference",r.RecommendedImplementAbstractEntityAction="recommended-implement-abstract-entity-action",r.RecommendedImplementOperationAction="recommended-implement-operation-action",r.RecommendedImplementFunctionCallAction="recommended-implement-function-call-action",r.RecommendedImplementVariableDeclarationAction="recommended-implement-variable-declaration-action",r.RecommendedImplementVariableInstanceAction="recommended-implement-variable-instance-action",r.RecommendedImplementConditionAction="recommended-implement-condition-action",r.InvalidReferenceObjectStructure="invalid-reference-object-structure",r.ContainsSingleButShouldBeReferenceList="contains-single-but-should-be-reference-list",r.ContainsListButShouldReferenceSingle="contains-list-but-should-reference-single",r.InvalidParentReference="invalid-parent-reference",r.InvalidImplementsReference="invalid-implements-reference",r.InvalidExtendsReference="invalid-extends-reference",r.InvalidGenerationActionPayload="invalid-generation-action-payload",r.InvalidReference="invalid-reference",r.InvalidInternalCallParentRelation="invalid-internal-call-parent-relation",r.InvalidUpdateEntityOperation="invalid-update-entity-operation",r.NewEntityWouldOverriteExisting="new-entity-would-overrite-existing",r.InvalidDownstreamPropertyOverride="invalid-downstream-property-override",r.UnrecognizedProperty="unrecognized-property",r.SelfReference="self-reference",r.DuplicateReference="duplicate-reference",r.CallerWithIncompatibleScope="caller-with-incompatible-scope",r.InvalidFunctionDeclarationForFunctionCall="invalid-function-declaration-for-function-call",r.InvalidInputMapDeclaration="invalid-input-map-declaration",r.InvalidActionDescriptorForOperation="invalid-action-descriptor-for-operation",r.InvalidActionDescriptorForCondition="invalid-action-descriptor-for-condition",r.InvalidActionDescriptorForLoop="invalid-action-descriptor-for-loop",r.InvalidInmutablePropertyOverride="invalid-inmutable-property-override",r.OutputOverwrite="output-overwrite",r.InputOverwrite="input-overwrite",r.IncompatibleScope="incompatible-scope",r.InvalidParentUpdate="invalid-parent-update",r.NonInteractiveEntityReferenced="non-interactive-entity-referenced",r.InvalidParentRelationType="invalid-parent-relation-type",r))(T||{}),G=(r=>(r.NoPrimaryKeyProperty="no-primary-key-property",r.ScopeWithoutLogic="scope-without-logic",r.ExtendingAbstractEntity="extending-abstract-entity",r.ImplementingNonAbstractEntity="implementing-non-abstract-entity",r.AbstractEntityWithNonAbstractMethods="abstract-entity-with-non-abstract-methods",r.AbstractEntityWithNonAbstractProperties="abstract-entity-with-non-abstract-properties",r.StaticEntityWithNonStaticProperties="static-entity-with-non-static-properties",r.NonStaticPropertyInStaticEntity="non-static-property-in-static-entity",r.AbstractPropertyInNonAbstractEntity="abstract-property-in-non-abstract-entity",r.AbstractMethodInNonAbstractEntity="abstract-method-in-non-abstract-entity",r.IncorrectEntityImplementation="incorrect-entity-implementation",r.IncorrectMethodImplementation="incorrect-method-implementation",r.IncorrectPropertyImplementation="incorrect-property-implementation",r.PropertyImplementsNonAbstact="property-implements-non-abstract",r.NonStaticPropertyImplementsStatic="non-static-property-implements-static",r.StaticPropertyImplementsNonStatic="static-property-implements-non-static",r.PropertyImplementsIncompatibleType="property-implements-incompatible-type",r.MissingPropertyImplementation="missing-property-implementation",r.MissingMethodImplementation="missing-method-implementation",r.NoProperties="no-properties",r.ReadingFromIncompatibleType="reading-from-incompatible-type",r.WritingToIncompatibleType="writing-to-incompatible-type",r.InvalidPropertiesCombination="invalid-properties-combination",r.DisconnectedCallableEntity="disconnected-callable-entity",r.VariableReadsValueAndInternalCall="variable-reads-value-and-internal-call",r.VariableWritesValuesAndInternalCall="variable-writes-values-and-internal-call",r.VariableHasInputsAndInternalCall="variable-has-inputs-and-internal-calls",r.VariableHasOutputsAndInternalCall="variable-has-outputs-and-internal-call",r.VariableIsCalledAndHasInternalCall="variable-is-called-and-has-internal-call",r.VariableCallsOthersAndHasInternalCall="variable-calls-others-and-has-internal-call",r))(G||{});class g{constructor(e){c(this,"id");c(this,"message");c(this,"issue");c(this,"severity");c(this,"code");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code}toEntityError(e){return this.code in B?new Cr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Cr{constructor(e){c(this,"id");c(this,"message");c(this,"issue");c(this,"severity");c(this,"code");c(this,"entity");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code,this.entity=e.entity}clone(){return new Cr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function V9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function Q(r){const e=r.entity.errors.find(n=>n.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Cr(r)}}function N9(r,e){const t=new Map;return r.forEach(n=>{t.set(n.id,n)}),e.forEach(n=>{t.set(n.id,n)}),Array.from(t.values())}function Be(r,e){const t=[];return e.forEach(n=>{const a=r.find(s=>s.id===n.id);a?t.push(a):t.push(n)}),t}const _a=y.union([y.string(),y.number(),y.boolean(),y.date()]),ED=y.enum([ze.CurrentDateAndTime,ze.Random,ze.Unique]),Eo=y.object({type:ED,rangeStart:_a.nullable(),rangeEnd:_a.nullable()}),Va=Eo.extend({type:y.literal(ze.Random),rangeStart:_a,rangeEnd:_a}),Ic=Eo.extend({type:y.literal(ze.Unique),rangeStart:y.null(),rangeEnd:y.null()}),RD=Eo.extend({type:y.literal(ze.CurrentDateAndTime),rangeStart:y.null(),rangeEnd:y.null()}),Ro=Va.extend({rangeStart:y.number().nullable(),rangeEnd:y.number().nullable()}),gD=Ro.extend({rangeStart:y.number(),rangeEnd:y.null()}),bD=Ro.extend({rangeStart:y.null(),rangeEnd:y.number()}),vD=Ro.extend({rangeStart:y.number(),rangeEnd:y.number()}),go=Va.extend({rangeStart:y.number().nullable(),rangeEnd:y.number().nullable()}),ID=go.extend({rangeStart:y.number(),rangeEnd:y.null()}),DD=go.extend({rangeStart:y.null(),rangeEnd:y.number()}),SD=go.extend({rangeStart:y.number(),rangeEnd:y.number()}),bo=Va.extend({rangeStart:y.date().nullable(),rangeEnd:y.date().nullable()}),OD=bo.extend({rangeStart:y.date(),rangeEnd:y.null()}),PD=bo.extend({rangeStart:y.null(),rangeEnd:y.date()}),AD=bo.extend({rangeStart:y.date(),rangeEnd:y.date()}),Dc=Va.extend({rangeStart:y.null(),rangeEnd:y.null()}),Sc=y.union([ID,DD,SD]),Oc=y.union([gD,bD,vD]),Pc=y.union([OD,PD,AD,RD]),Ac=y.union([Sc,Oc,Pc,Ic,Dc]);function Na(){return y.union([y.object({type:y.literal(i.ValueDescriptor)}),y.record(y.string(),y.any())])}function CD(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ValueDescriptor)})}function Cc(){return y.object({id:y.string(),type:y.literal(i.ValueDescriptor),name:y.string(),required:y.boolean()})}function L9(){return Cc().merge(y.object({version:y.number(),index:y.number()}))}function G9(){return Cc().merge(y.object({}))}function $9(){return y.object({dataType:_r(),parent:Br()})}function F9(){return L9().merge($9())}function vo(){return y.union([y.object({type:y.literal(i.PrimitiveEntity)}),y.record(y.string(),y.any())])}function Io(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.PrimitiveEntity)})}function Do(){return y.object({id:y.string(),type:y.literal(i.PrimitiveEntity),name:y.string(),description:y.string().nullable(),static:y.boolean(),abstract:y.boolean()})}function U9(){return Do().merge(y.object({version:y.number()}))}function x9(){return Do().merge(y.object({}))}function j9(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([vo(),wi()]))})}function k9(){return U9().merge(j9())}function wr(){return y.union([y.object({type:y.literal(i.Property)}),y.record(y.string(),y.any())])}function wD(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Property)})}function wc(){return y.object({id:y.string(),type:y.literal(i.Property),name:y.string(),description:y.string().nullable(),private:y.boolean(),static:y.boolean(),required:y.boolean(),abstract:y.boolean()})}function q9(){return wc().merge(y.object({version:y.number(),index:y.number()}))}function J9(){return wc().merge(y.object({}))}function W9(){return y.object({dataType:_r(),implements:wr().nullable(),parent:y.union([Lr(),Io(),So()])})}function Y9(){return q9().merge(W9())}function H9(){return y.enum([U.CRON_JOB,U.EXECUTION,U.HTTP_ENDPOINT,U.PERSISTED_ENTITY,U.RELATIONAL_DATABASE])}function wi(){return y.union([y.object({type:y.literal(i.BuiltInBaseEntity)}),y.record(y.string(),y.any())])}function So(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.BuiltInBaseEntity)})}function Bc(){return y.object({id:y.string(),version:y.number(),type:y.literal(i.BuiltInBaseEntity),name:H9(),description:y.string().nullable(),abstract:y.boolean(),static:y.boolean()})}function z9(){return Bc()}function Z9(){return Bc().merge(y.object({}))}function K9(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([wi(),vo()]))})}function X9(){return z9().merge(K9())}function En(){return y.union([y.object({type:y.literal(i.ActionDescriptor)}),y.record(y.string(),y.any())])}function Br(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ActionDescriptor)})}function Oo(){return y.object({id:y.string(),type:y.literal(i.ActionDescriptor),name:y.string(),description:y.string().nullable()})}function Q9(){return Oo().merge(y.object({version:y.number()}))}function e6(){return Oo().merge(y.object({}))}function t6(){return y.object({inputs:y.array(Na()),outputs:y.array(Na()),parent:y.union([Bt(),Lr(),So(),Io()]).nullable()})}function BD(){return Q9().merge(t6())}function Bi(){return y.union([y.object({type:y.literal(i.Loop)}),y.record(y.string(),y.any())])}function Rn(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Loop)})}function MD(){return y.object({id:y.string(),type:y.literal(i.Loop)})}function n6(){return MD().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function r6(){return MD().merge(y.object({declaration:y.union([y.string(),xt()])}))}function i6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),declaration:En(),inputs:y.array(rn()),outputs:y.array(Dt()),outputsDeclarations:y.array(Na()),successCalls:y.array(at()),errorCalls:y.array(at()),error:Dt(),body:xt(),parent:y.union([$n(),Bt()]),breakStatements:y.array(Ni()),continueStatements:y.array(Mi())})}function a6(){return n6().merge(i6())}function Mi(){return y.union([y.object({type:y.literal(i.ContinueStatement)}),y.record(y.string(),y.any())])}function _i(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ContinueStatement)})}function Mc(){return y.object({id:y.string(),type:y.literal(i.ContinueStatement)})}function s6(){return Mc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function o6(){return Mc().merge(y.object({}))}function l6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:Rn()})}function d6(){return s6().merge(l6())}function Mr(){return y.union([y.object({type:y.literal(i.ReturnStatement)}),y.record(y.string(),y.any())])}function Vi(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ReturnStatement)})}function _c(){return y.object({id:y.string(),type:y.literal(i.ReturnStatement)})}function c6(){return _c().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function u6(){return _c().merge(y.object({}))}function p6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:$n()})}function y6(){return c6().merge(p6())}function Nn(){return y.union([y.object({type:y.literal(i.ReturnDeclaration)}),y.record(y.string(),y.any())])}function _D(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ReturnDeclaration)})}function Vc(){return y.object({id:y.string(),type:y.literal(i.ReturnDeclaration),name:y.string(),description:y.string().nullable(),isError:y.boolean()})}function h6(){return Vc().merge(y.object({version:y.number(),index:y.number()}))}function f6(){return Vc().merge(y.object({}))}function m6(){return y.object({dataType:_r().nullable(),readsValue:xa().nullable(),parent:y.union([Vi(),Br(),Ln(),_i()])})}function T6(){return h6().merge(m6())}function Ni(){return y.union([y.object({type:y.literal(i.BreakStatement)}),y.record(y.string(),y.any())])}function Ln(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.BreakStatement)})}function Nc(){return y.object({id:y.string(),type:y.literal(i.BreakStatement)})}function E6(){return Nc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function R6(){return Nc().merge(y.object({}))}function g6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:Rn()})}function b6(){return E6().merge(g6())}function Dt(){return y.union([y.object({type:y.literal(i.OutputMap)}),y.record(y.string(),y.any())])}function Lc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.OutputMap)})}function Gc(){return y.object({id:y.string(),type:y.literal(i.OutputMap)})}function v6(){return Gc().merge(y.object({version:y.number(),index:y.number()}))}function I6(){return Gc().merge(y.object({}))}function D6(){return y.object({writesValues:y.array(Gn()),declaration:y.union([Nn(),wr()]),parent:y.union([$e(),Rn(),Ln()])})}function S6(){return v6().merge(D6())}function Li(){return y.union([y.object({type:y.literal(i.FunctionCall)}),y.record(y.string(),y.any())])}function La(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.FunctionCall)})}function $c(){return y.object({id:y.string(),type:y.literal(i.FunctionCall)})}function O6(){return $c().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function P6(){return $c().merge(y.object({}))}function A6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:xt(),inputs:y.array(rn()),outputs:y.array(Dt()),error:y.optional(Dt()),parent:y.union([$n(),Bt()])})}function C6(){return O6().merge(A6())}function w6(){return y.enum([qe.Equal,qe.NotEqual,qe.MoreThan,qe.MoreThanOrEqual,qe.LessThan,qe.LessThanOrEqual,qe.And,qe.Or,Jt.Empty,Jt.NotEmpty])}function Ga(){return y.union([y.object({type:y.literal(i.Condition)}),y.record(y.string(),y.any())])}function Po(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Condition)})}function Fc(){return y.object({id:y.string(),type:y.literal(i.Condition)})}function B6(){return Fc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function M6(){return Fc().merge(y.object({}))}function _6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),leftValue:rn(),rightValue:rn().nullable(),operator:w6(),parent:y.union([$n(),Bt()])})}function V6(){return B6().merge(_6())}function $a(){return y.union([y.object({type:y.literal(i.Search)}),y.record(y.string(),y.any())])}function Fa(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Search)})}function Uc(){return y.object({id:y.string(),type:y.literal(i.Search),name:y.string(),query:y.any(),description:y.string().nullable()})}function N6(){return Uc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function L6(){return Uc().merge(y.object({}))}function G6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),inputsDeclarations:y.array(Nr()),inputs:y.array(rn()),outputsDeclarations:y.array(Na()),outputs:y.array(Dt()),parent:y.union([$n(),Bt()]),error:Dt().nullable()})}function $6(){return N6().merge(G6())}function Ua(){return y.union([y.object({type:y.literal(i.InternalCall)}),y.record(y.string(),y.any())])}function xc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InternalCall)})}function jc(){return y.object({id:y.string(),type:y.literal(i.InternalCall),index:y.number()})}function F6(){return jc().merge(y.object({version:y.number(),index:y.number()}))}function U6(){return jc().merge(y.object({declaration:y.union([y.string(),xt()])}))}function x6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:xt(),inputs:y.array(rn()),outputs:y.array(Dt()),parent:rr(),error:y.optional(Dt())})}function j6(){return F6().merge(x6())}function rn(){return y.union([y.object({type:y.literal(i.InputMap)}),y.record(y.string(),y.any())])}function Ao(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InputMap)})}function kc(){return y.object({id:y.string(),type:y.literal(i.InputMap),name:y.string().nullable().optional(),description:y.string().nullable().optional()})}function k6(){return kc().merge(y.object({version:y.number(),index:y.number()}))}function q6(){return kc().merge(y.object({}))}function J6(){return y.object({defaultValue:qc().nullable(),declaration:y.union([Nr(),wr()]).nullable(),readsValue:xa().nullable(),parent:y.union([$e(),Ao(),Rn(),Ln()])})}function W6(){return k6().merge(J6())}function Gi(){return y.union([y.object({type:y.literal(i.Operation)}),y.record(y.string(),y.any())])}function $i(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Operation)})}function Co(){return y.object({id:y.string(),type:y.literal(i.Operation)})}function Y6(){return Co().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function H6(){return Co().merge(y.object({}))}function z6(){return Co().merge(y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:En(),inputs:y.array(rn()),outputs:y.array(Dt()),error:y.array(Dt()),parent:y.union([$n(),Bt()])}))}function Z6(){return Y6().merge(z6())}function wo(){return y.union([y.string(),y.number(),y.boolean(),y.null(),y.date()])}function VD(){return y.record(y.string(),wo())}function K6(){return y.array(y.union([wo(),VD()]))}function ND(){return y.union([wo(),VD(),K6()])}function LD(){return y.union([wo(),ND()])}function GD(){return y.enum([C.String,C.Number,C.Boolean,C.Null,C.Date,C.KeyValue,C.Enum,C.File,C.UUID,C.EntityTemplate,C.ActionDescriptor])}function X6(){return y.union([Lr(),$i(),ja()])}function Q6(){return y.object({id:y.string(),name:GD(),type:y.literal(i.LiteralValue),value:LD(),autogeneration:Ac.nullable()})}function e3(){return Q6().merge(y.object({}))}function an(){return y.object({id:y.string(),version:y.number(),name:GD(),type:y.literal(i.LiteralValue),value:LD(),valueAsType:X6().nullable(),autogeneration:Ac.nullable(),parent:y.union([Jc(),Ao()])})}function t3(){return an().extend({name:y.literal(C.String),value:y.string(),autogeneration:Sc.nullable()})}function n3(){return an().extend({name:y.literal(C.Number),value:y.number(),autogeneration:Oc.nullable()})}function r3(){return an().extend({name:y.literal(C.Boolean),value:y.boolean(),autogeneration:Dc.nullable()})}function i3(){return an().extend({name:y.literal(C.Null),value:y.null(),autogeneration:y.null()})}function a3(){return an().extend({name:y.literal(C.Date),value:y.date(),autogeneration:Pc.nullable()})}function s3(){return an().extend({name:y.literal(C.KeyValue),value:ND(),autogeneration:y.null()})}function o3(){return an().extend({name:y.literal(C.Enum),value:y.string(),autogeneration:y.null()})}function l3(){return an().extend({name:y.literal(C.File),value:y.string(),autogeneration:y.null()})}function d3(){return an().extend({name:y.literal(C.UUID),value:y.string(),autogeneration:Ic.nullable()})}function c3(){return an().extend({name:y.literal(C.EntityTemplate),value:Lr(),autogeneration:y.null()})}function u3(){return an().extend({name:y.literal(C.ActionDescriptor),value:ja(),autogeneration:y.null()})}function qc(){return y.union([t3(),n3(),r3(),i3(),a3(),s3(),o3(),l3(),d3(),c3(),u3()])}function _r(){return y.union([y.object({type:y.literal(i.DataType)}),y.record(y.string(),y.any())])}function Jc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.DataType)})}function Wc(){return y.object({id:y.string(),type:y.literal(i.DataType),isNullable:y.boolean(),isList:y.boolean(),constant:y.boolean(),asType:y.boolean(),options:y.array(y.string()).optional()})}function p3(){return Wc().merge(y.object({version:y.number()}))}function y3(){return Wc().merge(y.object({}))}function h3(){return y.object({defaultValue:qc().nullable(),entity:y.union([Fi(),wi(),vo(),En()]).nullable(),parent:y.union([wD(),UD(),CD()])})}function f3(){return p3().merge(h3())}function Yc(){return y.union([y.object({type:y.literal(i.VariableDeclaration)}),y.record(y.string(),y.any())])}function m3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.VariableDeclaration)})}function Hc(){return y.object({id:y.string(),type:y.literal(i.VariableDeclaration),name:y.string(),description:y.string().nullable()})}function T3(){return Hc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function E3(){return Hc().merge(y.object({}))}function R3(){return y.object({dataType:_r().nullable(),readsValue:xa().nullable(),writesValues:y.array(Gn()),inputs:y.array(rn()),outputs:y.array(Dt()),successCalls:y.array(at()),errorCalls:y.array(at()),internalCalls:y.array(Ua()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),parent:y.union([$n(),Bt()])})}function g3(){return T3().merge(R3())}function $D(){return y.union([y.object({type:y.literal(i.VariableInstance)}),y.record(y.string(),y.any())])}function b3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.VariableInstance)})}function zc(){return y.object({id:y.string(),type:y.literal(i.VariableInstance)})}function v3(){return zc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function I3(){return zc().merge(y.object({}))}function D3(){return y.object({declaration:Yc(),dataType:_r().nullable(),readsValue:xa().nullable(),writesValues:y.array(Gn()),inputs:y.array(rn()),outputs:y.array(Dt()),successCalls:y.array(at()),errorCalls:y.array(at()),internalCalls:y.array(Ua()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),parent:y.union([$n(),Bt()])})}function S3(){return v3().merge(D3())}function Zc(){return y.union([y.object({type:y.literal(i.InstalledProject)}),y.record(y.string(),y.any())])}function Bo(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InstalledProject)})}function O3(){return y.object({id:y.string(),type:y.literal(i.InstalledProject)})}function P3(){return y.object({version:y.number(),x:y.number(),y:y.number()})}function A3(){return y.object({})}function C3(){return y.object({implements:Bt(),description:y.string().nullable(),functions:y.array(xt()),events:y.array(Kc()),parent:Bt()})}function w3(){return P3().merge(C3())}function Kc(){return y.union([y.object({type:y.literal(i.GlobalEvent)}),y.record(y.string(),y.any())])}function B3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.GlobalEvent)})}function Mo(){return y.object({id:y.string(),type:y.literal(i.GlobalEvent),name:y.string(),collapsed:y.boolean()})}function M3(){return Mo().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function _3(){return Mo().merge(y.object({}))}function V3(){return Mo().merge(y.object({returnStatements:y.array(Mr()),implements:y.array(BD()),inputs:y.array(Nr()),calls:y.array(at()),parent:y.union([Bt(),Bo()])}))}function N3(){return M3().merge(V3())}function Vr(){return y.union([Yc(),$D()])}function rr(){return y.union([m3(),b3()])}function Gn(){return y.union([Vr(),rn(),Nn()])}function FD(){return y.union([rr(),Ao(),_D()])}function xa(){return y.union([Vr(),Nr(),Dt(),Gi(),Ua(),Li()])}function L3(){return y.union([rr(),Xc(),Lc(),$i(),xc(),La()])}function G3(){return y.union([Nr(),Dt(),Gn()])}function UD(){return y.union([Xc(),Lc(),FD()])}function _o(){return Kc()}function Vo(){return B3()}function No(){return y.union([Gi(),Li(),Ga(),$a(),Vr(),Ua(),Bi()])}function $e(){return y.union([$i(),La(),Po(),Fa(),rr(),xc(),Rn()])}function Lo(){return y.union([Gi(),Li(),Ga(),$a(),Vr(),Bi()])}function Go(){return y.union([$i(),La(),Po(),Fa(),rr(),Rn()])}function xD(){return y.union([No(),Mr(),Ni(),Mi()])}function at(){return y.union([$e(),Vi(),Ln(),_i()])}function jD(){return y.union([Lo(),Mr(),Ni(),Mi()])}function kD(){return y.union([Go(),Vi(),Ln(),_i()])}function ir(){return y.union([xt(),_o()])}function nt(){return y.union([ja(),Vo()])}function $3(){return y.union([No(),ir()])}function F3(){return y.union([$e(),nt()])}function U3(){return y.union([Lo(),ir()])}function x3(){return y.union([Go(),nt()])}function j3(){return y.union([xD(),ir()])}function k3(){return y.union([at(),nt()])}function q3(){return y.union([jD(),ir()])}function J3(){return y.union([kD(),nt()])}function W3(){return y.union([ir(),Bi()])}function $n(){return y.union([nt(),Rn()])}function Y3(){return y.union([No(),ir()])}function H3(){return y.union([$e(),nt()])}function z3(){return y.union([Lo(),ir()])}function Z3(){return y.union([Go(),nt()])}function K3(){return y.union([Mr(),Ni(),Mi()])}function X3(){return y.union([Vi(),Ln(),_i()])}function Q3(){return y.union([wi(),u5(),Zc(),Fi(),xt(),_o(),Vr(),rn(),Dt(),Ga(),Gi(),Li(),Nn(),Nr(),vo(),_r(),wr(),En(),Mr(),Mi(),Ni(),Bi(),$a(),En(),En(),Na(),Ua()])}function e5(){return y.union([So(),Bt(),Bo(),Lr(),ja(),Vo(),rr(),Ao(),Lc(),Po(),$i(),La(),_D(),Xc(),Io(),Jc(),wD(),Br(),Vi(),_i(),Ln(),Rn(),Fa(),Br(),Br(),CD(),xc()])}function t5(){return y.union([Zc(),Fi(),xt(),_o(),Vr(),Ga(),Gi(),Li(),Mr(),Mi(),Ni(),Bi(),$a()])}function n5(){return y.union([Bo(),Lr(),ja(),Vo(),rr(),Po(),$i(),La(),Vi(),_i(),Ln(),Rn(),Fa()])}function Nr(){return y.union([y.object({type:y.literal(i.ArgumentDeclaration)}),y.record(y.string(),y.any())])}function Xc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ArgumentDeclaration)})}function Qc(){return y.object({id:y.string(),type:y.literal(i.ArgumentDeclaration)})}function r5(){return Qc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function i5(){return Qc().merge(y.object({}))}function a5(){return y.object({dataType:_r().nullable(),writesValues:y.array(Gn()),parent:y.union([nt(),Br(),Br(),Fa(),Ln()])})}function s5(){return r5().merge(a5())}function xt(){return y.union([y.object({type:y.literal(i.FunctionDeclaration)}),y.record(y.string(),y.any())])}function ja(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.FunctionDeclaration)})}function eu(){return y.object({id:y.string(),type:y.literal(i.FunctionDeclaration),name:y.string(),description:y.string().nullable()})}function o5(){return eu().merge(y.object({version:y.number(),x:y.number(),y:y.number(),index:y.number().nullable()}))}function l5(){return eu()}function d5(){return y.object({inputs:y.array(Nr()),implements:En().nullable(),returnStatements:y.array(Mr()),parent:y.union([Bt(),Bo(),Lr(),Rn(),So(),Io()])})}function c5(){return o5().merge(d5())}function u5(){return y.union([y.object({type:y.literal(i.Project)}),y.record(y.string(),y.any())])}function Bt(){return y.object({entityType:y.literal(i.Project),entityId:y.string(),id:y.string(),type:y.literal(i.GenericReference)})}function tu(){return y.object({id:y.string(),type:y.literal(i.Project),name:y.string(),description:y.string().nullable()})}function p5(){return tu().merge(y.object({version:y.number()}))}function y5(){return tu()}function h5(){return y.object({entities:y.array(Fi()),functions:y.array(xt()),events:y.array(Kc()),projects:y.array(Zc()),variableDeclarations:y.array(Yc()),variableInstances:y.array($D()),conditions:y.array(Ga()),operations:y.array(Gi()),functionCalls:y.array(Li()),loops:y.array(Bi()),searches:y.array($a())})}function f5(){return p5().merge(h5())}function Fi(){return y.union([y.object({type:y.literal(i.DefinitionEntity)}),y.record(y.string(),y.any())])}function Lr(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.DefinitionEntity)})}function nu(){return y.object({id:y.string(),type:y.literal(i.DefinitionEntity),name:y.string(),description:y.string().nullable(),static:y.boolean(),abstract:y.boolean()})}function m5(){return nu().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function T5(){return nu().merge(y.object({}))}function E5(){return y.union([Bt(),Jc()])}function R5(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([Fi(),wi()])),implements:y.array(y.union([Fi(),wi()])),parent:E5()})}function g5(){return m5().merge(R5())}function b5(r){const e=g5(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>D5(r,h)),s=r.extends.flatMap(h=>S5(r,h)),o=P5(r),l=O5(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return Be(r.errors,p)}function v5(r,e){const t=e.properties.filter(s=>s.abstract),n=[];let a=[...r.properties];return t.forEach(s=>{const o=a.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id});o?a=a.filter(l=>l.id!==o.id):n.push(s)}),n}function I5(r,e){const t=e.abstractMethods,n=[];let a=[...r.methods];return t.forEach(s=>{const o=a.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id});o?a=a.filter(l=>l.id!==o.id):n.push(s)}),n}function D5(r,e){const t=[];if(!e.abstract){const h=Q({id:r.id+"--"+G.ImplementingNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:G.ImplementingNonAbstractEntity,entity:r});return t.push(h.error),t}const n=e.properties.filter(h=>h.abstract),a=[];let s=[...r.properties];n.forEach(h=>{const f=s.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});f?s=s.filter(R=>R.id!==f.id):a.push(h)}),a.length&&a.forEach(h=>{const f=Q({id:r.id+"--"+G.MissingPropertyImplementation+"--"+h.id,message:`Property "${h.name}" with id "${h.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${r.name}" with id "${r.id}" implements it`,issue:null,severity:E.Error,code:G.MissingPropertyImplementation,entity:r});t.push(f.error)});const o=[];let l=[...r.methods];e.abstractMethods.forEach(h=>{const f=l.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});f?l=l.filter(R=>R.id!==f.id):o.push(h)}),o.length&&o.forEach(h=>{const f=Q({id:r.id+"--"+G.MissingMethodImplementation+"--"+h.id,message:`Method "${h.name}" with id "${h.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${r.name}" with id "${r.id}" implements it`,issue:null,severity:E.Error,code:G.MissingMethodImplementation,entity:r});t.push(f.error)});const p=[];e.properties.forEach(h=>{const f=s.find(R=>R.name===h.name);f&&p.push([f,h])}),p.length&&p.forEach(([h])=>{const f=Q({id:r.id+"--"+B.PropertyOverwrite+"--"+h.id,message:`Property "${h.name}" with id "${h.id}" of entity "${r.name}" with id "${r.id}" overwrites the property with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.PropertyOverwrite,entity:r});t.push(f.error)});const u=[];return e.methods.forEach(h=>{const f=l.find(R=>R.name===h.name);f&&u.push([f,h])}),u.length&&u.forEach(([h])=>{const f=Q({id:r.id+"--"+B.MethodOverwrite+"--"+h.id,message:`Method "${h.name}" with id "${h.id}" of entity "${r.name}" with id "${r.id}" overwrites the method with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.MethodOverwrite,entity:r});t.push(f.error)}),t}function S5(r,e){const t=[],n=[];if(e.abstract){const s=Q({id:r.id+"--"+G.ExtendingAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:G.ExtendingAbstractEntity,entity:r});return t.push(s.error),t}r.properties.forEach(s=>{var l;const o=e.properties.find(p=>p.name===s.name);((l=s.implements)==null?void 0:l.id)!==(o==null?void 0:o.id)&&o&&n.push(s)}),n.length&&n.forEach(s=>{const o=Q({id:r.id+"--"+B.PropertyOverwrite,message:`Property "${s.name}" with id "${s.id}" of entity "${r.name}" with id "${r.id}" overwrites the property with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.PropertyOverwrite,entity:r});t.push(o.error)});const a=[];return r.methods.forEach(s=>{var l;const o=e.methods.find(p=>p.name===s.name);((l=s.implements)==null?void 0:l.id)!==(o==null?void 0:o.id)&&o&&a.push(s)}),a.length&&a.forEach(s=>{const o=Q({id:r.id+"--"+B.MethodOverwrite,message:`Method "${s.name}" with id "${s.id}" of entity "${r.name}" with id "${r.id}" overwrites the method with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.MethodOverwrite,entity:r});t.push(o.error)}),t}function O5(r){const e=[];if(!r.properties.length){const t=Q({id:r.id+"--"+G.NoProperties,message:"No properties implemented",issue:null,severity:E.Warning,code:G.NoProperties,entity:r});e.push(t.error)}return r.properties.forEach(t=>{t.validate()}),e}function P5(r){const e=[];if(r.abstract){if(r.methods.length){const t=Q({id:r.id+"--"+G.AbstractEntityWithNonAbstractMethods,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:E.Error,code:G.AbstractEntityWithNonAbstractMethods,entity:r});e.push(t.error)}if(r.properties.some(t=>!t.abstract)){const t=Q({id:r.id+"--"+G.AbstractEntityWithNonAbstractProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:E.Error,code:G.AbstractEntityWithNonAbstractProperties,entity:r});e.push(t.error),r.properties.forEach(n=>{if(!n.abstract){const a=Q({id:r.id+"--"+G.StaticEntityWithNonStaticProperties+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:E.Error,code:G.StaticEntityWithNonStaticProperties,entity:r});e.push(a.error)}})}}else{if(r.abstractMethods.length){const t=Q({id:r.id+"--"+G.AbstractPropertyInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract methods`,issue:null,severity:E.Error,code:G.AbstractPropertyInNonAbstractEntity,entity:r});e.push(t.error)}if(r.properties.some(t=>t.abstract)){const t=Q({id:r.id+"--"+G.AbstractMethodInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract properties`,issue:null,severity:E.Error,code:G.AbstractMethodInNonAbstractEntity,entity:r});e.push(t.error),r.properties.forEach(n=>{if(n.abstract){const a=Q({id:r.id+"--"+G.AbstractMethodInNonAbstractEntity+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:E.Error,code:G.AbstractMethodInNonAbstractEntity,entity:r});e.push(a.error)}})}}if(r.static&&r.properties.some(t=>!t.static)){const t=Q({id:r.id+"--"+G.StaticEntityWithNonStaticProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as static but has non-static properties`,issue:null,severity:E.Error,code:G.StaticEntityWithNonStaticProperties,entity:r});e.push(t.error),r.properties.forEach(n=>{if(!n.static){const a=Q({id:r.id+"--"+G.NonStaticPropertyInStaticEntity+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is not marked as static but the entity is marked as static`,issue:null,severity:E.Error,code:G.NonStaticPropertyInStaticEntity,entity:r});e.push(a.error)}})}return e}function A5(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var C5=class extends Error{constructor(e,t){super(e,t);c(this,"name");c(this,"details");this.name="ZodValidationError",this.details=w5(t)}toString(){return this.message}};function w5(r){if(r){const e=r.cause;if(A5(e))return e.issues}return[]}function B5(r){return r.length!==0}var M5=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function _5(r){return r.length===1?r[0].toString():r.reduce((e,t)=>{if(typeof t=="number")return e+"["+t.toString()+"]";if(t.includes('"'))return e+'["'+V5(t)+'"]';if(!M5.test(t))return e+'["'+t+'"]';const n=e.length===0?"":".";return e+n+t},"")}function V5(r){return r.replace(/"/g,'\\"')}var N5="; ",L5=99,qD="Validation error",G5=": ",$5=", or ";function F5(r={}){const{issueSeparator:e=N5,unionSeparator:t=$5,prefixSeparator:n=G5,prefix:a=qD,includePath:s=!0,maxIssuesInMessage:o=L5}=r;return l=>{const p=l.slice(0,o).map(u=>$o({issue:u,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return U5(p,a,n)}}function $o(r){const{issue:e,issueSeparator:t,unionSeparator:n,includePath:a}=r;if(e.code===N.invalid_union)return e.unionErrors.reduce((s,o)=>{const l=o.issues.map(p=>$o({issue:p,issueSeparator:t,unionSeparator:n,includePath:a})).join(t);return s.includes(l)||s.push(l),s},[]).join(n);if(e.code===N.invalid_arguments)return[e.message,...e.argumentsError.issues.map(s=>$o({issue:s,issueSeparator:t,unionSeparator:n,includePath:a}))].join(t);if(e.code===N.invalid_return_type)return[e.message,...e.returnTypeError.issues.map(s=>$o({issue:s,issueSeparator:t,unionSeparator:n,includePath:a}))].join(t);if(a&&B5(e.path)){if(e.path.length===1){const s=e.path[0];if(typeof s=="number")return`${e.message} at index ${s}`}return`${e.message} at "${_5(e.path)}"`}return e.message}function U5(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:qD}function x5(r,e={}){const n=j5(e)([r]);return new C5(n,{cause:new wt([r])})}function j5(r){return"messageBuilder"in r?r.messageBuilder:F5(r)}var JD="1.13.7",WD=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Fo=Array.prototype,ru=Object.prototype,YD=typeof Symbol<"u"?Symbol.prototype:null,k5=Fo.push,ka=Fo.slice,qa=ru.toString,q5=ru.hasOwnProperty,HD=typeof ArrayBuffer<"u",J5=typeof DataView<"u",W5=Array.isArray,zD=Object.keys,ZD=Object.create,KD=HD&&ArrayBuffer.isView,Y5=isNaN,H5=isFinite,XD=!{toString:null}.propertyIsEnumerable("toString"),QD=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],z5=Math.pow(2,53)-1;function Mt(r,e){return e=e==null?r.length-1:+e,function(){for(var t=Math.max(arguments.length-e,0),n=Array(t),a=0;a<t;a++)n[a]=arguments[a+e];switch(e){case 0:return r.call(this,n);case 1:return r.call(this,arguments[0],n);case 2:return r.call(this,arguments[0],arguments[1],n)}var s=Array(e+1);for(a=0;a<e;a++)s[a]=arguments[a];return s[e]=n,r.apply(this,s)}}function ar(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function Z5(r){return r===null}function eS(r){return r===void 0}function tS(r){return r===!0||r===!1||qa.call(r)==="[object Boolean]"}function K5(r){return!!(r&&r.nodeType===1)}function Et(r){var e="[object "+r+"]";return function(t){return qa.call(t)===e}}const iu=Et("String"),nS=Et("Number"),X5=Et("Date"),Q5=Et("RegExp"),e2=Et("Error"),rS=Et("Symbol"),iS=Et("ArrayBuffer");var aS=Et("Function"),t2=WD.document&&WD.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof t2!="function"&&(aS=function(r){return typeof r=="function"||!1});const St=aS,sS=Et("Object");var oS=J5&&(!/\[native code\]/.test(String(DataView))||sS(new DataView(new ArrayBuffer(8)))),au=typeof Map<"u"&&sS(new Map),n2=Et("DataView");function r2(r){return r!=null&&St(r.getInt8)&&iS(r.buffer)}const Uo=oS?r2:n2,Gr=W5||Et("Array");function sr(r,e){return r!=null&&q5.call(r,e)}var su=Et("Arguments");(function(){su(arguments)||(su=function(r){return sr(r,"callee")})})();const ou=su;function i2(r){return!rS(r)&&H5(r)&&!isNaN(parseFloat(r))}function lS(r){return nS(r)&&Y5(r)}function dS(r){return function(){return r}}function cS(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=z5}}function uS(r){return function(e){return e==null?void 0:e[r]}}const xo=uS("byteLength"),a2=cS(xo);var s2=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function o2(r){return KD?KD(r)&&!Uo(r):a2(r)&&s2.test(qa.call(r))}const pS=HD?o2:dS(!1),_t=uS("length");function l2(r){for(var e={},t=r.length,n=0;n<t;++n)e[r[n]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,r.push(a)}}}function yS(r,e){e=l2(e);var t=QD.length,n=r.constructor,a=St(n)&&n.prototype||ru,s="constructor";for(sr(r,s)&&!e.contains(s)&&e.push(s);t--;)s=QD[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function ot(r){if(!ar(r))return[];if(zD)return zD(r);var e=[];for(var t in r)sr(r,t)&&e.push(t);return XD&&yS(r,e),e}function Ja(r){if(r==null)return!0;var e=_t(r);return typeof e=="number"&&(Gr(r)||iu(r)||ou(r))?e===0:_t(ot(r))===0}function hS(r,e){var t=ot(e),n=t.length;if(r==null)return!n;for(var a=Object(r),s=0;s<n;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function Me(r){if(r instanceof Me)return r;if(!(this instanceof Me))return new Me(r);this._wrapped=r}Me.VERSION=JD,Me.prototype.value=function(){return this._wrapped},Me.prototype.valueOf=Me.prototype.toJSON=Me.prototype.value,Me.prototype.toString=function(){return String(this._wrapped)};function fS(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,xo(r))}var mS="[object DataView]";function lu(r,e,t,n){if(r===e)return r!==0||1/r===1/e;if(r==null||e==null)return!1;if(r!==r)return e!==e;var a=typeof r;return a!=="function"&&a!=="object"&&typeof e!="object"?!1:TS(r,e,t,n)}function TS(r,e,t,n){r instanceof Me&&(r=r._wrapped),e instanceof Me&&(e=e._wrapped);var a=qa.call(r);if(a!==qa.call(e))return!1;if(oS&&a=="[object Object]"&&Uo(r)){if(!Uo(e))return!1;a=mS}switch(a){case"[object RegExp]":case"[object String]":return""+r==""+e;case"[object Number]":return+r!=+r?+e!=+e:+r==0?1/+r===1/e:+r==+e;case"[object Date]":case"[object Boolean]":return+r==+e;case"[object Symbol]":return YD.valueOf.call(r)===YD.valueOf.call(e);case"[object ArrayBuffer]":case mS:return TS(fS(r),fS(e),t,n)}var s=a==="[object Array]";if(!s&&pS(r)){var o=xo(r);if(o!==xo(e))return!1;if(r.buffer===e.buffer&&r.byteOffset===e.byteOffset)return!0;s=!0}if(!s){if(typeof r!="object"||typeof e!="object")return!1;var l=r.constructor,p=e.constructor;if(l!==p&&!(St(l)&&l instanceof l&&St(p)&&p instanceof p)&&"constructor"in r&&"constructor"in e)return!1}t=t||[],n=n||[];for(var u=t.length;u--;)if(t[u]===r)return n[u]===e;if(t.push(r),n.push(e),s){if(u=r.length,u!==e.length)return!1;for(;u--;)if(!lu(r[u],e[u],t,n))return!1}else{var h=ot(r),f;if(u=h.length,ot(e).length!==u)return!1;for(;u--;)if(f=h[u],!(sr(e,f)&&lu(r[f],e[f],t,n)))return!1}return t.pop(),n.pop(),!0}function d2(r,e){return lu(r,e)}function Wa(r){if(!ar(r))return[];var e=[];for(var t in r)e.push(t);return XD&&yS(r,e),e}function du(r){var e=_t(r);return function(t){if(t==null)return!1;var n=Wa(t);if(_t(n))return!1;for(var a=0;a<e;a++)if(!St(t[r[a]]))return!1;return r!==gS||!St(t[cu])}}var cu="forEach",ES="has",uu=["clear","delete"],RS=["get",ES,"set"],c2=uu.concat(cu,RS),gS=uu.concat(RS),u2=["add"].concat(uu,cu,ES);const p2=au?du(c2):Et("Map"),y2=au?du(gS):Et("WeakMap"),h2=au?du(u2):Et("Set"),f2=Et("WeakSet");function Ui(r){for(var e=ot(r),t=e.length,n=Array(t),a=0;a<t;a++)n[a]=r[e[a]];return n}function m2(r){for(var e=ot(r),t=e.length,n=Array(t),a=0;a<t;a++)n[a]=[e[a],r[e[a]]];return n}function bS(r){for(var e={},t=ot(r),n=0,a=t.length;n<a;n++)e[r[t[n]]]=t[n];return e}function pu(r){var e=[];for(var t in r)St(r[t])&&e.push(t);return e.sort()}function yu(r,e){return function(t){var n=arguments.length;if(e&&(t=Object(t)),n<2||t==null)return t;for(var a=1;a<n;a++)for(var s=arguments[a],o=r(s),l=o.length,p=0;p<l;p++){var u=o[p];(!e||t[u]===void 0)&&(t[u]=s[u])}return t}}const vS=yu(Wa),jo=yu(ot),IS=yu(Wa,!0);function T2(){return function(){}}function DS(r){if(!ar(r))return{};if(ZD)return ZD(r);var e=T2();e.prototype=r;var t=new e;return e.prototype=null,t}function E2(r,e){var t=DS(r);return e&&jo(t,e),t}function R2(r){return ar(r)?Gr(r)?r.slice():vS({},r):r}function g2(r,e){return e(r),r}function SS(r){return Gr(r)?r:[r]}Me.toPath=SS;function Ya(r){return Me.toPath(r)}function hu(r,e){for(var t=e.length,n=0;n<t;n++){if(r==null)return;r=r[e[n]]}return t?r:void 0}function OS(r,e,t){var n=hu(r,Ya(e));return eS(n)?t:n}function b2(r,e){e=Ya(e);for(var t=e.length,n=0;n<t;n++){var a=e[n];if(!sr(r,a))return!1;r=r[a]}return!!t}function fu(r){return r}function Ha(r){return r=jo({},r),function(e){return hS(e,r)}}function mu(r){return r=Ya(r),function(e){return hu(e,r)}}function za(r,e,t){if(e===void 0)return r;switch(t??3){case 1:return function(n){return r.call(e,n)};case 3:return function(n,a,s){return r.call(e,n,a,s)};case 4:return function(n,a,s,o){return r.call(e,n,a,s,o)}}return function(){return r.apply(e,arguments)}}function PS(r,e,t){return r==null?fu:St(r)?za(r,e,t):ar(r)&&!Gr(r)?Ha(r):mu(r)}function Tu(r,e){return PS(r,e,1/0)}Me.iteratee=Tu;function Vt(r,e,t){return Me.iteratee!==Tu?Me.iteratee(r,e):PS(r,e,t)}function v2(r,e,t){e=Vt(e,t);for(var n=ot(r),a=n.length,s={},o=0;o<a;o++){var l=n[o];s[l]=e(r[l],l,r)}return s}function AS(){}function I2(r){return r==null?AS:function(e){return OS(r,e)}}function D2(r,e,t){var n=Array(Math.max(0,r));e=za(e,t,1);for(var a=0;a<r;a++)n[a]=e(a);return n}function Eu(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const Za=Date.now||function(){return new Date().getTime()};function CS(r){var e=function(s){return r[s]},t="(?:"+ot(r).join("|")+")",n=RegExp(t),a=RegExp(t,"g");return function(s){return s=s==null?"":""+s,n.test(s)?s.replace(a,e):s}}const wS={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},S2=CS(wS),O2=bS(wS),P2=CS(O2),A2=Me.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Ru=/(.)^/,C2={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},w2=/\\|'|\r|\n|\u2028|\u2029/g;function B2(r){return"\\"+C2[r]}var M2=/^\s*(\w|\$)+\s*$/;function _2(r,e,t){!e&&t&&(e=t),e=IS({},e,Me.templateSettings);var n=RegExp([(e.escape||Ru).source,(e.interpolate||Ru).source,(e.evaluate||Ru).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(n,function(u,h,f,R,v){return s+=r.slice(a,v).replace(w2,B2),a=v+u.length,h?s+=`'+
|
|
24
|
+
LIMIT 10 OFFSET 0;`,Mk={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:i.GenericReference,entityId:H,entityType:i.Project},_k={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:i.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:i.Search},cD={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:i.ValueDescriptor,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",defaultValue:null,dataType:null,required:!0,index:0,parent:_k},Vk={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:i.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:i.Search},Nk={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:i.OutputMap,version:1,defaultValue:null,declaration:cD,writesValues:[],index:0,parent:Vk},Lk={id:"find-companies-with-multiple-employees-and-bank-account",type:i.Search,version:1,name:"Find companies with multiple employees and a bank account",description:"This search statement finds companies with multiple employees and an existing bank account",inputsDeclarations:[],outputsDeclarations:[cD],inputs:[],outputs:[Nk],query:Bk,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:Mk},Gk={type:i.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:ZI},$k={type:i.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},uD={id:_8,type:i.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:Gk,parent:$k},Fk={type:i.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:HI},Uk={type:i.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},pD={id:M8,type:i.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:Fk,parent:Uk},xk={type:i.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:i.OutputMap,entityId:YI},jk={type:i.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},yD={id:B8,type:i.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:xk,parent:jk},kk={type:i.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:WI},qk={type:i.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},hD={id:w8,type:i.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:kk,parent:qk},Jk={type:i.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:i.OutputMap,entityId:KI},Wk={type:i.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Tn},fD={id:C8,type:i.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,index:0,readsValue:Jk,parent:Wk},Yk={type:i.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:mc},Hk={id:ZI,type:i.OutputMap,version:1,declaration:Ft.properties[0],defaultValue:null,index:0,writesValues:[uD],parent:Yk},zk={type:i.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:mc},Zk={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:zk},Kk={type:i.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:i.OutputMap,entityId:zI},Xk={type:i.GenericReference,id:"manager-variable-parent-ref-id",entityType:i.Project,entityId:H},mD={constant:!0,required:!0,id:mc,type:i.VariableDeclaration,version:1,name:"Manager",dataType:Zk,description:"A variable holding an inherited manager for testing purposes",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:Kk,writesValues:[],inputs:[],outputs:[Hk],internalCalls:[],parent:Xk,x:0,y:0},Qk={type:i.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},e9={id:zI,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[2],index:3,writesValues:[mD],parent:Qk},t9={type:i.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},n9={id:HI,type:i.OutputMap,version:1,defaultValue:null,declaration:Yt.properties[0],index:2,writesValues:[pD],parent:t9},r9={type:i.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},i9={id:YI,type:i.OutputMap,version:1,defaultValue:null,declaration:bt.properties[1],index:1,writesValues:[yD],parent:r9},a9={type:i.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},s9={id:WI,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[hD],parent:a9},o9={type:i.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:i.VariableDeclaration,entityId:Ci},l9={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Yt,asType:!1,isList:!1,parent:o9},d9={type:i.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:i.Project,entityId:H},c9={constant:!0,required:!0,id:Ci,type:i.VariableDeclaration,version:1,name:"Company employee",dataType:l9,description:"A variable holding a random company employee for testing purposes",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[s9,i9,n9,e9],internalCalls:[],parent:d9,x:0,y:0},u9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:i.InputMap,entityId:XI},p9={type:i.LiteralValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:C.Date,version:1,valueAsType:null,value:null,autogeneration:{type:ze.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:u9},y9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:i.VariableInstance,entityId:Ar},h9={id:XI,type:i.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:p9,index:5,readsValue:null,parent:y9},f9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:i.VariableDeclaration,entityId:Tn},m9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:i.VariableDeclaration,entityId:Tn},T9={type:i.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:i.Project,entityId:H},E9={id:Ar,type:i.VariableInstance,version:1,defaultValue:null,declaration:f9,calledByError:[],calledByEntry:[],calledBySuccess:[m9],successCalls:[Ec,sD,QI],errorCalls:[],readsValue:null,writesValues:[aD],inputs:[h9],outputs:[],internalCalls:[],parent:T9,x:0,y:0},R9={type:i.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:i.Project,entityId:H},g9={constant:!0,required:!0,id:Tn,type:i.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",defaultValue:null,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Ec,E9],errorCalls:[],readsValue:null,writesValues:[nD],inputs:[fD,hD,yD,pD,uD],outputs:[],internalCalls:[],parent:R9,x:0,y:0},b9={type:i.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:i.VariableDeclaration,entityId:ab},v9={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:_d,version:1,asType:!1,isList:!1,parent:b9},I9={type:i.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:i.Project,entityId:H},TD={constant:!0,required:!0,id:ab,type:i.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",defaultValue:null,dataType:v9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:I9},D9={type:i.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:i.VariableInstance,entityId:JI},S9={id:KI,type:i.OutputMap,version:1,defaultValue:null,declaration:Ft.properties[0],index:0,writesValues:[fD],parent:D9},O9={type:i.GenericReference,id:"global-user-instance-parent-ref-id",entityType:i.Project,entityId:H},P9={id:JI,type:i.VariableInstance,version:1,defaultValue:null,declaration:TD,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[S9],internalCalls:[],parent:O9,x:0,y:0},A9={type:i.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:i.VariableDeclaration,entityId:"is-test-environment-variable-dcl-id"},C9={type:i.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:i.VariableDeclaration,entityId:"is-test-environment-variable-dcl-id"},w9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:i.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:On,version:1,asType:!1,isList:!1,parent:A9},B9={type:i.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:i.Project,entityId:H},ED={constant:!0,required:!0,id:"is-test-environment-variable-dcl-id",type:i.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:C.Boolean,version:1,value:null,type:i.LiteralValue,autogeneration:{type:ze.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:C9},dataType:w9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:B9},M9={type:i.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:i.Project,entityId:H},_9={id:"is-test-environment-variable-instance-id",type:i.VariableInstance,version:1,defaultValue:null,declaration:ED,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:M9,x:0,y:0},RD={type:i.Project,id:H,version:1,name:"Mocked project to compile",description:"This project is used to test all sorts of features and edge cases. It is not meant to be used in production. Or to have any functionality that makes sense",projects:[v8],entities:[Md,Ft,_d,bt,I0,Yt,ro,Ib,Db,vi,tL,Ht,ZL,Bd,Rw,o0,QN],functions:[j4,zb,Qd,Z4,ax,cv,ec,$d,T8,Vb,Yx],events:[n1],variableDeclarations:[ED,TD,ac,c9,mD,g9],variableInstances:[_9,P9],conditions:[],operations:[Oi],functionCalls:[eG,l$],loops:[wk,Ec,sD,gk,QI],searches:[Lk]};var E=(r=>(r.Error="error",r.Warning="warning",r))(E||{}),B=(r=>(r.InvalidObjectStructure="invalid-object-structure",r.NameNotUniqueInScope="name-not-unique-in-scope",r.EmptyName="empty-name",r.MissingCaller="missing-caller",r.PropertyOverwrite="property-overwrite",r.MethodOverwrite="method-overwrite",r.NoOverlapWithImplementedSignature="no-overlap-with-implemented-signature",r.ReaderWriterIncompatibleDataType="reader-writer-incompatible-data-type",r.UnreachableEntity="unreachable-entity",r.InternalCallParentMissingDataType="internal-call-parent-missing-data-type",r.InternalCallParentDeclarationEntityInvalidType="internal-call-parent-declaration-entity-invalid-type",r.InternalCallDeclarationNotFoundInParentDatatypeEntity="internal-call-declaration-not-found-in-parent-datatype-entity",r.InternalCallDeclarationIsNotFunctionDeclaration="internal-call-declaration-is-not-function-declaration",r.InternalCallDeclarationNotInParentDatatypeEntity="internal-call-declaration-not-in-parent-datatype-entity",r))(B||{}),T=(r=>(r.RootReference="root-reference",r.ReferencedEntityNotFound="referenced-entity-not-found",r.EntityIdNotUnique="entity-id-not-unique",r.BuiltInEntityGenerated="built-in-entity-generated",r.BuiltInEntityUpdated="built-in-entity-updated",r.BuiltInEntityDeleted="built-in-entity-deleted",r.UnknownEntityType="unknown-entity-type",r.MissingTypeProperty="missing-type-property",r.MissingIdProperty="missing-id-property",r.BuiltInEntityParent="built-in-entity-parent",r.InvalidBuiltInEntityReference="invalid-built-in-entity-reference",r.RecommendedImplementAbstractEntityAction="recommended-implement-abstract-entity-action",r.RecommendedImplementOperationAction="recommended-implement-operation-action",r.RecommendedImplementFunctionCallAction="recommended-implement-function-call-action",r.RecommendedImplementVariableDeclarationAction="recommended-implement-variable-declaration-action",r.RecommendedImplementVariableInstanceAction="recommended-implement-variable-instance-action",r.RecommendedImplementConditionAction="recommended-implement-condition-action",r.InvalidReferenceObjectStructure="invalid-reference-object-structure",r.ContainsSingleButShouldBeReferenceList="contains-single-but-should-be-reference-list",r.ContainsListButShouldReferenceSingle="contains-list-but-should-reference-single",r.InvalidParentReference="invalid-parent-reference",r.InvalidImplementsReference="invalid-implements-reference",r.InvalidExtendsReference="invalid-extends-reference",r.InvalidGenerationActionPayload="invalid-generation-action-payload",r.InvalidReference="invalid-reference",r.InvalidInternalCallParentRelation="invalid-internal-call-parent-relation",r.InvalidUpdateEntityOperation="invalid-update-entity-operation",r.NewEntityWouldOverriteExisting="new-entity-would-overrite-existing",r.InvalidDownstreamPropertyOverride="invalid-downstream-property-override",r.UnrecognizedProperty="unrecognized-property",r.SelfReference="self-reference",r.DuplicateReference="duplicate-reference",r.CallerWithIncompatibleScope="caller-with-incompatible-scope",r.InvalidFunctionDeclarationForFunctionCall="invalid-function-declaration-for-function-call",r.InvalidInputMapDeclaration="invalid-input-map-declaration",r.InvalidActionDescriptorForOperation="invalid-action-descriptor-for-operation",r.InvalidActionDescriptorForCondition="invalid-action-descriptor-for-condition",r.InvalidActionDescriptorForLoop="invalid-action-descriptor-for-loop",r.InvalidInmutablePropertyOverride="invalid-inmutable-property-override",r.OutputOverwrite="output-overwrite",r.InputOverwrite="input-overwrite",r.IncompatibleScope="incompatible-scope",r.InvalidParentUpdate="invalid-parent-update",r.NonInteractiveEntityReferenced="non-interactive-entity-referenced",r.InvalidParentRelationType="invalid-parent-relation-type",r))(T||{}),G=(r=>(r.NoPrimaryKeyProperty="no-primary-key-property",r.ScopeWithoutLogic="scope-without-logic",r.ExtendingAbstractEntity="extending-abstract-entity",r.ImplementingNonAbstractEntity="implementing-non-abstract-entity",r.AbstractEntityWithNonAbstractMethods="abstract-entity-with-non-abstract-methods",r.AbstractEntityWithNonAbstractProperties="abstract-entity-with-non-abstract-properties",r.StaticEntityWithNonStaticProperties="static-entity-with-non-static-properties",r.NonStaticPropertyInStaticEntity="non-static-property-in-static-entity",r.AbstractPropertyInNonAbstractEntity="abstract-property-in-non-abstract-entity",r.AbstractMethodInNonAbstractEntity="abstract-method-in-non-abstract-entity",r.IncorrectEntityImplementation="incorrect-entity-implementation",r.IncorrectMethodImplementation="incorrect-method-implementation",r.IncorrectPropertyImplementation="incorrect-property-implementation",r.PropertyImplementsNonAbstact="property-implements-non-abstract",r.NonStaticPropertyImplementsStatic="non-static-property-implements-static",r.StaticPropertyImplementsNonStatic="static-property-implements-non-static",r.PropertyImplementsIncompatibleType="property-implements-incompatible-type",r.MissingPropertyImplementation="missing-property-implementation",r.MissingMethodImplementation="missing-method-implementation",r.NoProperties="no-properties",r.ReadingFromIncompatibleType="reading-from-incompatible-type",r.WritingToIncompatibleType="writing-to-incompatible-type",r.InvalidPropertiesCombination="invalid-properties-combination",r.DisconnectedCallableEntity="disconnected-callable-entity",r.VariableReadsValueAndInternalCall="variable-reads-value-and-internal-call",r.VariableWritesValuesAndInternalCall="variable-writes-values-and-internal-call",r.VariableHasInputsAndInternalCall="variable-has-inputs-and-internal-calls",r.VariableHasOutputsAndInternalCall="variable-has-outputs-and-internal-call",r.VariableIsCalledAndHasInternalCall="variable-is-called-and-has-internal-call",r.VariableCallsOthersAndHasInternalCall="variable-calls-others-and-has-internal-call",r))(G||{});class g{constructor(e){c(this,"id");c(this,"message");c(this,"issue");c(this,"severity");c(this,"code");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code}toEntityError(e){return this.code in B?new Cr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Cr{constructor(e){c(this,"id");c(this,"message");c(this,"issue");c(this,"severity");c(this,"code");c(this,"entity");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code,this.entity=e.entity}clone(){return new Cr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function V9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function Q(r){const e=r.entity.errors.find(n=>n.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Cr(r)}}function N9(r,e){const t=new Map;return r.forEach(n=>{t.set(n.id,n)}),e.forEach(n=>{t.set(n.id,n)}),Array.from(t.values())}function Be(r,e){const t=[];return e.forEach(n=>{const a=r.find(s=>s.id===n.id);a?t.push(a):t.push(n)}),t}const _a=y.union([y.string(),y.number(),y.boolean(),y.date()]),gD=y.enum([ze.CurrentDateAndTime,ze.Random,ze.Unique]),Eo=y.object({type:gD,rangeStart:_a.nullable(),rangeEnd:_a.nullable()}),Va=Eo.extend({type:y.literal(ze.Random),rangeStart:_a,rangeEnd:_a}),Ic=Eo.extend({type:y.literal(ze.Unique),rangeStart:y.null(),rangeEnd:y.null()}),bD=Eo.extend({type:y.literal(ze.CurrentDateAndTime),rangeStart:y.null(),rangeEnd:y.null()}),Ro=Va.extend({rangeStart:y.number().nullable(),rangeEnd:y.number().nullable()}),vD=Ro.extend({rangeStart:y.number(),rangeEnd:y.null()}),ID=Ro.extend({rangeStart:y.null(),rangeEnd:y.number()}),DD=Ro.extend({rangeStart:y.number(),rangeEnd:y.number()}),go=Va.extend({rangeStart:y.number().nullable(),rangeEnd:y.number().nullable()}),SD=go.extend({rangeStart:y.number(),rangeEnd:y.null()}),OD=go.extend({rangeStart:y.null(),rangeEnd:y.number()}),PD=go.extend({rangeStart:y.number(),rangeEnd:y.number()}),bo=Va.extend({rangeStart:y.date().nullable(),rangeEnd:y.date().nullable()}),AD=bo.extend({rangeStart:y.date(),rangeEnd:y.null()}),CD=bo.extend({rangeStart:y.null(),rangeEnd:y.date()}),wD=bo.extend({rangeStart:y.date(),rangeEnd:y.date()}),Dc=Va.extend({rangeStart:y.null(),rangeEnd:y.null()}),Sc=y.union([SD,OD,PD]),Oc=y.union([vD,ID,DD]),Pc=y.union([AD,CD,wD,bD]),Ac=y.union([Sc,Oc,Pc,Ic,Dc]);function Na(){return y.union([y.object({type:y.literal(i.ValueDescriptor)}),y.record(y.string(),y.any())])}function BD(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ValueDescriptor)})}function Cc(){return y.object({id:y.string(),type:y.literal(i.ValueDescriptor),name:y.string(),required:y.boolean()})}function L9(){return Cc().merge(y.object({version:y.number(),index:y.number()}))}function G9(){return Cc().merge(y.object({}))}function $9(){return y.object({dataType:_r(),parent:Br()})}function F9(){return L9().merge($9())}function vo(){return y.union([y.object({type:y.literal(i.PrimitiveEntity)}),y.record(y.string(),y.any())])}function Io(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.PrimitiveEntity)})}function Do(){return y.object({id:y.string(),type:y.literal(i.PrimitiveEntity),name:y.string(),description:y.string().nullable(),static:y.boolean(),abstract:y.boolean()})}function U9(){return Do().merge(y.object({version:y.number()}))}function x9(){return Do().merge(y.object({}))}function j9(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([vo(),wi()]))})}function k9(){return U9().merge(j9())}function wr(){return y.union([y.object({type:y.literal(i.Property)}),y.record(y.string(),y.any())])}function MD(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Property)})}function wc(){return y.object({id:y.string(),type:y.literal(i.Property),name:y.string(),description:y.string().nullable(),private:y.boolean(),static:y.boolean(),required:y.boolean(),abstract:y.boolean()})}function q9(){return wc().merge(y.object({version:y.number(),index:y.number()}))}function J9(){return wc().merge(y.object({}))}function W9(){return y.object({dataType:_r(),implements:wr().nullable(),parent:y.union([Lr(),Io(),So()])})}function Y9(){return q9().merge(W9())}function H9(){return y.enum([U.CRON_JOB,U.EXECUTION,U.HTTP_ENDPOINT,U.PERSISTED_ENTITY,U.RELATIONAL_DATABASE])}function wi(){return y.union([y.object({type:y.literal(i.BuiltInBaseEntity)}),y.record(y.string(),y.any())])}function So(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.BuiltInBaseEntity)})}function Bc(){return y.object({id:y.string(),version:y.number(),type:y.literal(i.BuiltInBaseEntity),name:H9(),description:y.string().nullable(),abstract:y.boolean(),static:y.boolean()})}function z9(){return Bc()}function Z9(){return Bc().merge(y.object({}))}function K9(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([wi(),vo()]))})}function X9(){return z9().merge(K9())}function En(){return y.union([y.object({type:y.literal(i.ActionDescriptor)}),y.record(y.string(),y.any())])}function Br(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ActionDescriptor)})}function Oo(){return y.object({id:y.string(),type:y.literal(i.ActionDescriptor),name:y.string(),description:y.string().nullable()})}function Q9(){return Oo().merge(y.object({version:y.number()}))}function e6(){return Oo().merge(y.object({}))}function t6(){return y.object({inputs:y.array(Na()),outputs:y.array(Na()),parent:y.union([Bt(),Lr(),So(),Io()]).nullable()})}function _D(){return Q9().merge(t6())}function Bi(){return y.union([y.object({type:y.literal(i.Loop)}),y.record(y.string(),y.any())])}function Rn(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Loop)})}function VD(){return y.object({id:y.string(),type:y.literal(i.Loop)})}function n6(){return VD().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function r6(){return VD().merge(y.object({declaration:y.union([y.string(),xt()])}))}function i6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),declaration:En(),inputs:y.array(rn()),outputs:y.array(Dt()),outputsDeclarations:y.array(Na()),successCalls:y.array(at()),errorCalls:y.array(at()),error:Dt(),body:xt(),parent:y.union([$n(),Bt()]),breakStatements:y.array(Ni()),continueStatements:y.array(Mi())})}function a6(){return n6().merge(i6())}function Mi(){return y.union([y.object({type:y.literal(i.ContinueStatement)}),y.record(y.string(),y.any())])}function _i(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ContinueStatement)})}function Mc(){return y.object({id:y.string(),type:y.literal(i.ContinueStatement)})}function s6(){return Mc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function o6(){return Mc().merge(y.object({}))}function l6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:Rn()})}function d6(){return s6().merge(l6())}function Mr(){return y.union([y.object({type:y.literal(i.ReturnStatement)}),y.record(y.string(),y.any())])}function Vi(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ReturnStatement)})}function _c(){return y.object({id:y.string(),type:y.literal(i.ReturnStatement)})}function c6(){return _c().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function u6(){return _c().merge(y.object({}))}function p6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:$n()})}function y6(){return c6().merge(p6())}function Nn(){return y.union([y.object({type:y.literal(i.ReturnDeclaration)}),y.record(y.string(),y.any())])}function ND(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ReturnDeclaration)})}function Vc(){return y.object({id:y.string(),type:y.literal(i.ReturnDeclaration),name:y.string(),description:y.string().nullable(),isError:y.boolean()})}function h6(){return Vc().merge(y.object({version:y.number(),index:y.number()}))}function f6(){return Vc().merge(y.object({}))}function m6(){return y.object({dataType:_r().nullable(),readsValue:xa().nullable(),parent:y.union([Vi(),Br(),Ln(),_i()])})}function T6(){return h6().merge(m6())}function Ni(){return y.union([y.object({type:y.literal(i.BreakStatement)}),y.record(y.string(),y.any())])}function Ln(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.BreakStatement)})}function Nc(){return y.object({id:y.string(),type:y.literal(i.BreakStatement)})}function E6(){return Nc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function R6(){return Nc().merge(y.object({}))}function g6(){return y.object({calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),outputs:y.array(Nn()),throws:y.optional(Nn()),parent:Rn()})}function b6(){return E6().merge(g6())}function Dt(){return y.union([y.object({type:y.literal(i.OutputMap)}),y.record(y.string(),y.any())])}function Lc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.OutputMap)})}function Gc(){return y.object({id:y.string(),type:y.literal(i.OutputMap)})}function v6(){return Gc().merge(y.object({version:y.number(),index:y.number()}))}function I6(){return Gc().merge(y.object({}))}function D6(){return y.object({writesValues:y.array(Gn()),declaration:y.union([Nn(),wr()]),parent:y.union([$e(),Rn(),Ln()])})}function S6(){return v6().merge(D6())}function Li(){return y.union([y.object({type:y.literal(i.FunctionCall)}),y.record(y.string(),y.any())])}function La(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.FunctionCall)})}function $c(){return y.object({id:y.string(),type:y.literal(i.FunctionCall)})}function O6(){return $c().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function P6(){return $c().merge(y.object({}))}function A6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:xt(),inputs:y.array(rn()),outputs:y.array(Dt()),error:y.optional(Dt()),parent:y.union([$n(),Bt()])})}function C6(){return O6().merge(A6())}function w6(){return y.enum([qe.Equal,qe.NotEqual,qe.MoreThan,qe.MoreThanOrEqual,qe.LessThan,qe.LessThanOrEqual,qe.And,qe.Or,Jt.Empty,Jt.NotEmpty])}function Ga(){return y.union([y.object({type:y.literal(i.Condition)}),y.record(y.string(),y.any())])}function Po(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Condition)})}function Fc(){return y.object({id:y.string(),type:y.literal(i.Condition)})}function B6(){return Fc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function M6(){return Fc().merge(y.object({}))}function _6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),leftValue:rn(),rightValue:rn().nullable(),operator:w6(),parent:y.union([$n(),Bt()])})}function V6(){return B6().merge(_6())}function $a(){return y.union([y.object({type:y.literal(i.Search)}),y.record(y.string(),y.any())])}function Fa(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Search)})}function Uc(){return y.object({id:y.string(),type:y.literal(i.Search),name:y.string(),query:y.any(),description:y.string().nullable()})}function N6(){return Uc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function L6(){return Uc().merge(y.object({}))}function G6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),inputsDeclarations:y.array(Nr()),inputs:y.array(rn()),outputsDeclarations:y.array(Na()),outputs:y.array(Dt()),parent:y.union([$n(),Bt()]),error:Dt().nullable()})}function $6(){return N6().merge(G6())}function Ua(){return y.union([y.object({type:y.literal(i.InternalCall)}),y.record(y.string(),y.any())])}function xc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InternalCall)})}function jc(){return y.object({id:y.string(),type:y.literal(i.InternalCall),index:y.number()})}function F6(){return jc().merge(y.object({version:y.number(),index:y.number()}))}function U6(){return jc().merge(y.object({declaration:y.union([y.string(),xt()])}))}function x6(){return y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:xt(),inputs:y.array(rn()),outputs:y.array(Dt()),parent:rr(),error:y.optional(Dt())})}function j6(){return F6().merge(x6())}function rn(){return y.union([y.object({type:y.literal(i.InputMap)}),y.record(y.string(),y.any())])}function Ao(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InputMap)})}function kc(){return y.object({id:y.string(),type:y.literal(i.InputMap),name:y.string().nullable().optional(),description:y.string().nullable().optional()})}function k6(){return kc().merge(y.object({version:y.number(),index:y.number()}))}function q6(){return kc().merge(y.object({}))}function J6(){return y.object({defaultValue:qc().nullable(),declaration:y.union([Nr(),wr()]).nullable(),readsValue:xa().nullable(),parent:y.union([$e(),Ao(),Rn(),Ln()])})}function W6(){return k6().merge(J6())}function Gi(){return y.union([y.object({type:y.literal(i.Operation)}),y.record(y.string(),y.any())])}function $i(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.Operation)})}function Co(){return y.object({id:y.string(),type:y.literal(i.Operation)})}function Y6(){return Co().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function H6(){return Co().merge(y.object({}))}function z6(){return Co().merge(y.object({successCalls:y.array(at()),errorCalls:y.array(at()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),writesValues:y.array(Gn()),declaration:En(),inputs:y.array(rn()),outputs:y.array(Dt()),error:y.array(Dt()),parent:y.union([$n(),Bt()])}))}function Z6(){return Y6().merge(z6())}function wo(){return y.union([y.string(),y.number(),y.boolean(),y.null(),y.date()])}function LD(){return y.record(y.string(),wo())}function K6(){return y.array(y.union([wo(),LD()]))}function GD(){return y.union([wo(),LD(),K6()])}function $D(){return y.union([wo(),GD()])}function FD(){return y.enum([C.String,C.Number,C.Boolean,C.Null,C.Date,C.KeyValue,C.Enum,C.File,C.UUID,C.EntityTemplate,C.ActionDescriptor])}function X6(){return y.union([Lr(),$i(),ja()])}function Q6(){return y.object({id:y.string(),name:FD(),type:y.literal(i.LiteralValue),value:$D(),autogeneration:Ac.nullable()})}function e3(){return Q6().merge(y.object({}))}function an(){return y.object({id:y.string(),version:y.number(),name:FD(),type:y.literal(i.LiteralValue),value:$D(),valueAsType:X6().nullable(),autogeneration:Ac.nullable(),parent:y.union([Jc(),Ao()])})}function t3(){return an().extend({name:y.literal(C.String),value:y.string(),autogeneration:Sc.nullable()})}function n3(){return an().extend({name:y.literal(C.Number),value:y.number(),autogeneration:Oc.nullable()})}function r3(){return an().extend({name:y.literal(C.Boolean),value:y.boolean(),autogeneration:Dc.nullable()})}function i3(){return an().extend({name:y.literal(C.Null),value:y.null(),autogeneration:y.null()})}function a3(){return an().extend({name:y.literal(C.Date),value:y.date(),autogeneration:Pc.nullable()})}function s3(){return an().extend({name:y.literal(C.KeyValue),value:GD(),autogeneration:y.null()})}function o3(){return an().extend({name:y.literal(C.Enum),value:y.string(),autogeneration:y.null()})}function l3(){return an().extend({name:y.literal(C.File),value:y.string(),autogeneration:y.null()})}function d3(){return an().extend({name:y.literal(C.UUID),value:y.string(),autogeneration:Ic.nullable()})}function c3(){return an().extend({name:y.literal(C.EntityTemplate),value:Lr(),autogeneration:y.null()})}function u3(){return an().extend({name:y.literal(C.ActionDescriptor),value:ja(),autogeneration:y.null()})}function qc(){return y.union([t3(),n3(),r3(),i3(),a3(),s3(),o3(),l3(),d3(),c3(),u3()])}function _r(){return y.union([y.object({type:y.literal(i.DataType)}),y.record(y.string(),y.any())])}function Jc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.DataType)})}function Wc(){return y.object({id:y.string(),type:y.literal(i.DataType),isNullable:y.boolean(),isList:y.boolean(),constant:y.boolean(),asType:y.boolean(),options:y.array(y.string()).optional()})}function p3(){return Wc().merge(y.object({version:y.number()}))}function y3(){return Wc().merge(y.object({}))}function h3(){return y.object({defaultValue:qc().nullable(),entity:y.union([Fi(),wi(),vo(),En()]).nullable(),parent:y.union([MD(),jD(),BD()])})}function f3(){return p3().merge(h3())}function Yc(){return y.union([y.object({type:y.literal(i.VariableDeclaration)}),y.record(y.string(),y.any())])}function m3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.VariableDeclaration)})}function Hc(){return y.object({id:y.string(),type:y.literal(i.VariableDeclaration),name:y.string(),description:y.string().nullable()})}function T3(){return Hc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function E3(){return Hc().merge(y.object({}))}function R3(){return y.object({dataType:_r().nullable(),readsValue:xa().nullable(),writesValues:y.array(Gn()),inputs:y.array(rn()),outputs:y.array(Dt()),successCalls:y.array(at()),errorCalls:y.array(at()),internalCalls:y.array(Ua()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),parent:y.union([$n(),Bt()])})}function g3(){return T3().merge(R3())}function UD(){return y.union([y.object({type:y.literal(i.VariableInstance)}),y.record(y.string(),y.any())])}function b3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.VariableInstance)})}function zc(){return y.object({id:y.string(),type:y.literal(i.VariableInstance)})}function v3(){return zc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function I3(){return zc().merge(y.object({}))}function D3(){return y.object({declaration:Yc(),dataType:_r().nullable(),readsValue:xa().nullable(),writesValues:y.array(Gn()),inputs:y.array(rn()),outputs:y.array(Dt()),successCalls:y.array(at()),errorCalls:y.array(at()),internalCalls:y.array(Ua()),calledBySuccess:y.array($e()),calledByError:y.array($e()),calledByEntry:y.array(nt()),parent:y.union([$n(),Bt()])})}function S3(){return v3().merge(D3())}function Zc(){return y.union([y.object({type:y.literal(i.InstalledProject)}),y.record(y.string(),y.any())])}function Bo(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.InstalledProject)})}function O3(){return y.object({id:y.string(),type:y.literal(i.InstalledProject)})}function P3(){return y.object({version:y.number(),x:y.number(),y:y.number()})}function A3(){return y.object({})}function C3(){return y.object({implements:Bt(),description:y.string().nullable(),functions:y.array(xt()),events:y.array(Kc()),parent:Bt()})}function w3(){return P3().merge(C3())}function Kc(){return y.union([y.object({type:y.literal(i.GlobalEvent)}),y.record(y.string(),y.any())])}function B3(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.GlobalEvent)})}function Mo(){return y.object({id:y.string(),type:y.literal(i.GlobalEvent),name:y.string(),collapsed:y.boolean()})}function M3(){return Mo().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function _3(){return Mo().merge(y.object({}))}function V3(){return Mo().merge(y.object({returnStatements:y.array(Mr()),implements:y.array(_D()),inputs:y.array(Nr()),calls:y.array(at()),parent:y.union([Bt(),Bo()])}))}function N3(){return M3().merge(V3())}function Vr(){return y.union([Yc(),UD()])}function rr(){return y.union([m3(),b3()])}function Gn(){return y.union([Vr(),rn(),Nn()])}function xD(){return y.union([rr(),Ao(),ND()])}function xa(){return y.union([Vr(),Nr(),Dt(),Gi(),Ua(),Li()])}function L3(){return y.union([rr(),Xc(),Lc(),$i(),xc(),La()])}function G3(){return y.union([Nr(),Dt(),Gn()])}function jD(){return y.union([Xc(),Lc(),xD()])}function _o(){return Kc()}function Vo(){return B3()}function No(){return y.union([Gi(),Li(),Ga(),$a(),Vr(),Ua(),Bi()])}function $e(){return y.union([$i(),La(),Po(),Fa(),rr(),xc(),Rn()])}function Lo(){return y.union([Gi(),Li(),Ga(),$a(),Vr(),Bi()])}function Go(){return y.union([$i(),La(),Po(),Fa(),rr(),Rn()])}function kD(){return y.union([No(),Mr(),Ni(),Mi()])}function at(){return y.union([$e(),Vi(),Ln(),_i()])}function qD(){return y.union([Lo(),Mr(),Ni(),Mi()])}function JD(){return y.union([Go(),Vi(),Ln(),_i()])}function ir(){return y.union([xt(),_o()])}function nt(){return y.union([ja(),Vo()])}function $3(){return y.union([No(),ir()])}function F3(){return y.union([$e(),nt()])}function U3(){return y.union([Lo(),ir()])}function x3(){return y.union([Go(),nt()])}function j3(){return y.union([kD(),ir()])}function k3(){return y.union([at(),nt()])}function q3(){return y.union([qD(),ir()])}function J3(){return y.union([JD(),nt()])}function W3(){return y.union([ir(),Bi()])}function $n(){return y.union([nt(),Rn()])}function Y3(){return y.union([No(),ir()])}function H3(){return y.union([$e(),nt()])}function z3(){return y.union([Lo(),ir()])}function Z3(){return y.union([Go(),nt()])}function K3(){return y.union([Mr(),Ni(),Mi()])}function X3(){return y.union([Vi(),Ln(),_i()])}function Q3(){return y.union([wi(),u5(),Zc(),Fi(),xt(),_o(),Vr(),rn(),Dt(),Ga(),Gi(),Li(),Nn(),Nr(),vo(),_r(),wr(),En(),Mr(),Mi(),Ni(),Bi(),$a(),En(),En(),Na(),Ua()])}function e5(){return y.union([So(),Bt(),Bo(),Lr(),ja(),Vo(),rr(),Ao(),Lc(),Po(),$i(),La(),ND(),Xc(),Io(),Jc(),MD(),Br(),Vi(),_i(),Ln(),Rn(),Fa(),Br(),Br(),BD(),xc()])}function t5(){return y.union([Zc(),Fi(),xt(),_o(),Vr(),Ga(),Gi(),Li(),Mr(),Mi(),Ni(),Bi(),$a()])}function n5(){return y.union([Bo(),Lr(),ja(),Vo(),rr(),Po(),$i(),La(),Vi(),_i(),Ln(),Rn(),Fa()])}function Nr(){return y.union([y.object({type:y.literal(i.ArgumentDeclaration)}),y.record(y.string(),y.any())])}function Xc(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.ArgumentDeclaration)})}function Qc(){return y.object({id:y.string(),type:y.literal(i.ArgumentDeclaration)})}function r5(){return Qc().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function i5(){return Qc().merge(y.object({}))}function a5(){return y.object({dataType:_r().nullable(),writesValues:y.array(Gn()),parent:y.union([nt(),Br(),Br(),Fa(),Ln()])})}function s5(){return r5().merge(a5())}function xt(){return y.union([y.object({type:y.literal(i.FunctionDeclaration)}),y.record(y.string(),y.any())])}function ja(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.FunctionDeclaration)})}function eu(){return y.object({id:y.string(),type:y.literal(i.FunctionDeclaration),name:y.string(),description:y.string().nullable()})}function o5(){return eu().merge(y.object({version:y.number(),x:y.number(),y:y.number(),index:y.number().nullable()}))}function l5(){return eu()}function d5(){return y.object({inputs:y.array(Nr()),implements:En().nullable(),returnStatements:y.array(Mr()),parent:y.union([Bt(),Bo(),Lr(),Rn(),So(),Io()])})}function c5(){return o5().merge(d5())}function u5(){return y.union([y.object({type:y.literal(i.Project)}),y.record(y.string(),y.any())])}function Bt(){return y.object({entityType:y.literal(i.Project),entityId:y.string(),id:y.string(),type:y.literal(i.GenericReference)})}function tu(){return y.object({id:y.string(),type:y.literal(i.Project),name:y.string(),description:y.string().nullable()})}function p5(){return tu().merge(y.object({version:y.number()}))}function y5(){return tu()}function h5(){return y.object({entities:y.array(Fi()),functions:y.array(xt()),events:y.array(Kc()),projects:y.array(Zc()),variableDeclarations:y.array(Yc()),variableInstances:y.array(UD()),conditions:y.array(Ga()),operations:y.array(Gi()),functionCalls:y.array(Li()),loops:y.array(Bi()),searches:y.array($a())})}function f5(){return p5().merge(h5())}function Fi(){return y.union([y.object({type:y.literal(i.DefinitionEntity)}),y.record(y.string(),y.any())])}function Lr(){return y.object({id:y.string(),type:y.literal(i.GenericReference),entityId:y.string(),entityType:y.literal(i.DefinitionEntity)})}function nu(){return y.object({id:y.string(),type:y.literal(i.DefinitionEntity),name:y.string(),description:y.string().nullable(),static:y.boolean(),abstract:y.boolean()})}function m5(){return nu().merge(y.object({version:y.number(),x:y.number(),y:y.number()}))}function T5(){return nu().merge(y.object({}))}function E5(){return y.union([Bt(),Jc()])}function R5(){return y.object({properties:y.array(wr()),methods:y.array(xt()),abstractMethods:y.array(En()),extends:y.array(y.union([Fi(),wi()])),implements:y.array(y.union([Fi(),wi()])),parent:E5()})}function g5(){return m5().merge(R5())}function b5(r){const e=g5(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>D5(r,h)),s=r.extends.flatMap(h=>S5(r,h)),o=P5(r),l=O5(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return Be(r.errors,p)}function v5(r,e){const t=e.properties.filter(s=>s.abstract),n=[];let a=[...r.properties];return t.forEach(s=>{const o=a.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id});o?a=a.filter(l=>l.id!==o.id):n.push(s)}),n}function I5(r,e){const t=e.abstractMethods,n=[];let a=[...r.methods];return t.forEach(s=>{const o=a.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id});o?a=a.filter(l=>l.id!==o.id):n.push(s)}),n}function D5(r,e){const t=[];if(!e.abstract){const h=Q({id:r.id+"--"+G.ImplementingNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:G.ImplementingNonAbstractEntity,entity:r});return t.push(h.error),t}const n=e.properties.filter(h=>h.abstract),a=[];let s=[...r.properties];n.forEach(h=>{const f=s.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});f?s=s.filter(R=>R.id!==f.id):a.push(h)}),a.length&&a.forEach(h=>{const f=Q({id:r.id+"--"+G.MissingPropertyImplementation+"--"+h.id,message:`Property "${h.name}" with id "${h.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${r.name}" with id "${r.id}" implements it`,issue:null,severity:E.Error,code:G.MissingPropertyImplementation,entity:r});t.push(f.error)});const o=[];let l=[...r.methods];e.abstractMethods.forEach(h=>{const f=l.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});f?l=l.filter(R=>R.id!==f.id):o.push(h)}),o.length&&o.forEach(h=>{const f=Q({id:r.id+"--"+G.MissingMethodImplementation+"--"+h.id,message:`Method "${h.name}" with id "${h.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${r.name}" with id "${r.id}" implements it`,issue:null,severity:E.Error,code:G.MissingMethodImplementation,entity:r});t.push(f.error)});const p=[];e.properties.forEach(h=>{const f=s.find(R=>R.name===h.name);f&&p.push([f,h])}),p.length&&p.forEach(([h])=>{const f=Q({id:r.id+"--"+B.PropertyOverwrite+"--"+h.id,message:`Property "${h.name}" with id "${h.id}" of entity "${r.name}" with id "${r.id}" overwrites the property with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.PropertyOverwrite,entity:r});t.push(f.error)});const u=[];return e.methods.forEach(h=>{const f=l.find(R=>R.name===h.name);f&&u.push([f,h])}),u.length&&u.forEach(([h])=>{const f=Q({id:r.id+"--"+B.MethodOverwrite+"--"+h.id,message:`Method "${h.name}" with id "${h.id}" of entity "${r.name}" with id "${r.id}" overwrites the method with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.MethodOverwrite,entity:r});t.push(f.error)}),t}function S5(r,e){const t=[],n=[];if(e.abstract){const s=Q({id:r.id+"--"+G.ExtendingAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:G.ExtendingAbstractEntity,entity:r});return t.push(s.error),t}r.properties.forEach(s=>{var l;const o=e.properties.find(p=>p.name===s.name);((l=s.implements)==null?void 0:l.id)!==(o==null?void 0:o.id)&&o&&n.push(s)}),n.length&&n.forEach(s=>{const o=Q({id:r.id+"--"+B.PropertyOverwrite,message:`Property "${s.name}" with id "${s.id}" of entity "${r.name}" with id "${r.id}" overwrites the property with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.PropertyOverwrite,entity:r});t.push(o.error)});const a=[];return r.methods.forEach(s=>{var l;const o=e.methods.find(p=>p.name===s.name);((l=s.implements)==null?void 0:l.id)!==(o==null?void 0:o.id)&&o&&a.push(s)}),a.length&&a.forEach(s=>{const o=Q({id:r.id+"--"+B.MethodOverwrite,message:`Method "${s.name}" with id "${s.id}" of entity "${r.name}" with id "${r.id}" overwrites the method with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:E.Error,code:B.MethodOverwrite,entity:r});t.push(o.error)}),t}function O5(r){const e=[];if(!r.properties.length){const t=Q({id:r.id+"--"+G.NoProperties,message:"No properties implemented",issue:null,severity:E.Warning,code:G.NoProperties,entity:r});e.push(t.error)}return r.properties.forEach(t=>{t.validate()}),e}function P5(r){const e=[];if(r.abstract){if(r.methods.length){const t=Q({id:r.id+"--"+G.AbstractEntityWithNonAbstractMethods,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:E.Error,code:G.AbstractEntityWithNonAbstractMethods,entity:r});e.push(t.error)}if(r.properties.some(t=>!t.abstract)){const t=Q({id:r.id+"--"+G.AbstractEntityWithNonAbstractProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:E.Error,code:G.AbstractEntityWithNonAbstractProperties,entity:r});e.push(t.error),r.properties.forEach(n=>{if(!n.abstract){const a=Q({id:r.id+"--"+G.StaticEntityWithNonStaticProperties+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:E.Error,code:G.StaticEntityWithNonStaticProperties,entity:r});e.push(a.error)}})}}else{if(r.abstractMethods.length){const t=Q({id:r.id+"--"+G.AbstractPropertyInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract methods`,issue:null,severity:E.Error,code:G.AbstractPropertyInNonAbstractEntity,entity:r});e.push(t.error)}if(r.properties.some(t=>t.abstract)){const t=Q({id:r.id+"--"+G.AbstractMethodInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract properties`,issue:null,severity:E.Error,code:G.AbstractMethodInNonAbstractEntity,entity:r});e.push(t.error),r.properties.forEach(n=>{if(n.abstract){const a=Q({id:r.id+"--"+G.AbstractMethodInNonAbstractEntity+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:E.Error,code:G.AbstractMethodInNonAbstractEntity,entity:r});e.push(a.error)}})}}if(r.static&&r.properties.some(t=>!t.static)){const t=Q({id:r.id+"--"+G.StaticEntityWithNonStaticProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as static but has non-static properties`,issue:null,severity:E.Error,code:G.StaticEntityWithNonStaticProperties,entity:r});e.push(t.error),r.properties.forEach(n=>{if(!n.static){const a=Q({id:r.id+"--"+G.NonStaticPropertyInStaticEntity+"--"+n.id,message:`Property "${n.name}" with id "${n.id}" of entity "${r.name}" with id "${r.id}" is not marked as static but the entity is marked as static`,issue:null,severity:E.Error,code:G.NonStaticPropertyInStaticEntity,entity:r});e.push(a.error)}})}return e}function A5(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var C5=class extends Error{constructor(e,t){super(e,t);c(this,"name");c(this,"details");this.name="ZodValidationError",this.details=w5(t)}toString(){return this.message}};function w5(r){if(r){const e=r.cause;if(A5(e))return e.issues}return[]}function B5(r){return r.length!==0}var M5=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function _5(r){return r.length===1?r[0].toString():r.reduce((e,t)=>{if(typeof t=="number")return e+"["+t.toString()+"]";if(t.includes('"'))return e+'["'+V5(t)+'"]';if(!M5.test(t))return e+'["'+t+'"]';const n=e.length===0?"":".";return e+n+t},"")}function V5(r){return r.replace(/"/g,'\\"')}var N5="; ",L5=99,WD="Validation error",G5=": ",$5=", or ";function F5(r={}){const{issueSeparator:e=N5,unionSeparator:t=$5,prefixSeparator:n=G5,prefix:a=WD,includePath:s=!0,maxIssuesInMessage:o=L5}=r;return l=>{const p=l.slice(0,o).map(u=>$o({issue:u,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return U5(p,a,n)}}function $o(r){const{issue:e,issueSeparator:t,unionSeparator:n,includePath:a}=r;if(e.code===N.invalid_union)return e.unionErrors.reduce((s,o)=>{const l=o.issues.map(p=>$o({issue:p,issueSeparator:t,unionSeparator:n,includePath:a})).join(t);return s.includes(l)||s.push(l),s},[]).join(n);if(e.code===N.invalid_arguments)return[e.message,...e.argumentsError.issues.map(s=>$o({issue:s,issueSeparator:t,unionSeparator:n,includePath:a}))].join(t);if(e.code===N.invalid_return_type)return[e.message,...e.returnTypeError.issues.map(s=>$o({issue:s,issueSeparator:t,unionSeparator:n,includePath:a}))].join(t);if(a&&B5(e.path)){if(e.path.length===1){const s=e.path[0];if(typeof s=="number")return`${e.message} at index ${s}`}return`${e.message} at "${_5(e.path)}"`}return e.message}function U5(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:WD}function x5(r,e={}){const n=j5(e)([r]);return new C5(n,{cause:new wt([r])})}function j5(r){return"messageBuilder"in r?r.messageBuilder:F5(r)}var YD="1.13.7",HD=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Fo=Array.prototype,ru=Object.prototype,zD=typeof Symbol<"u"?Symbol.prototype:null,k5=Fo.push,ka=Fo.slice,qa=ru.toString,q5=ru.hasOwnProperty,ZD=typeof ArrayBuffer<"u",J5=typeof DataView<"u",W5=Array.isArray,KD=Object.keys,XD=Object.create,QD=ZD&&ArrayBuffer.isView,Y5=isNaN,H5=isFinite,eS=!{toString:null}.propertyIsEnumerable("toString"),tS=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],z5=Math.pow(2,53)-1;function Mt(r,e){return e=e==null?r.length-1:+e,function(){for(var t=Math.max(arguments.length-e,0),n=Array(t),a=0;a<t;a++)n[a]=arguments[a+e];switch(e){case 0:return r.call(this,n);case 1:return r.call(this,arguments[0],n);case 2:return r.call(this,arguments[0],arguments[1],n)}var s=Array(e+1);for(a=0;a<e;a++)s[a]=arguments[a];return s[e]=n,r.apply(this,s)}}function ar(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function Z5(r){return r===null}function nS(r){return r===void 0}function rS(r){return r===!0||r===!1||qa.call(r)==="[object Boolean]"}function K5(r){return!!(r&&r.nodeType===1)}function Et(r){var e="[object "+r+"]";return function(t){return qa.call(t)===e}}const iu=Et("String"),iS=Et("Number"),X5=Et("Date"),Q5=Et("RegExp"),e2=Et("Error"),aS=Et("Symbol"),sS=Et("ArrayBuffer");var oS=Et("Function"),t2=HD.document&&HD.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof t2!="function"&&(oS=function(r){return typeof r=="function"||!1});const St=oS,lS=Et("Object");var dS=J5&&(!/\[native code\]/.test(String(DataView))||lS(new DataView(new ArrayBuffer(8)))),au=typeof Map<"u"&&lS(new Map),n2=Et("DataView");function r2(r){return r!=null&&St(r.getInt8)&&sS(r.buffer)}const Uo=dS?r2:n2,Gr=W5||Et("Array");function sr(r,e){return r!=null&&q5.call(r,e)}var su=Et("Arguments");(function(){su(arguments)||(su=function(r){return sr(r,"callee")})})();const ou=su;function i2(r){return!aS(r)&&H5(r)&&!isNaN(parseFloat(r))}function cS(r){return iS(r)&&Y5(r)}function uS(r){return function(){return r}}function pS(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=z5}}function yS(r){return function(e){return e==null?void 0:e[r]}}const xo=yS("byteLength"),a2=pS(xo);var s2=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function o2(r){return QD?QD(r)&&!Uo(r):a2(r)&&s2.test(qa.call(r))}const hS=ZD?o2:uS(!1),_t=yS("length");function l2(r){for(var e={},t=r.length,n=0;n<t;++n)e[r[n]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,r.push(a)}}}function fS(r,e){e=l2(e);var t=tS.length,n=r.constructor,a=St(n)&&n.prototype||ru,s="constructor";for(sr(r,s)&&!e.contains(s)&&e.push(s);t--;)s=tS[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function ot(r){if(!ar(r))return[];if(KD)return KD(r);var e=[];for(var t in r)sr(r,t)&&e.push(t);return eS&&fS(r,e),e}function Ja(r){if(r==null)return!0;var e=_t(r);return typeof e=="number"&&(Gr(r)||iu(r)||ou(r))?e===0:_t(ot(r))===0}function mS(r,e){var t=ot(e),n=t.length;if(r==null)return!n;for(var a=Object(r),s=0;s<n;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function Me(r){if(r instanceof Me)return r;if(!(this instanceof Me))return new Me(r);this._wrapped=r}Me.VERSION=YD,Me.prototype.value=function(){return this._wrapped},Me.prototype.valueOf=Me.prototype.toJSON=Me.prototype.value,Me.prototype.toString=function(){return String(this._wrapped)};function TS(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,xo(r))}var ES="[object DataView]";function lu(r,e,t,n){if(r===e)return r!==0||1/r===1/e;if(r==null||e==null)return!1;if(r!==r)return e!==e;var a=typeof r;return a!=="function"&&a!=="object"&&typeof e!="object"?!1:RS(r,e,t,n)}function RS(r,e,t,n){r instanceof Me&&(r=r._wrapped),e instanceof Me&&(e=e._wrapped);var a=qa.call(r);if(a!==qa.call(e))return!1;if(dS&&a=="[object Object]"&&Uo(r)){if(!Uo(e))return!1;a=ES}switch(a){case"[object RegExp]":case"[object String]":return""+r==""+e;case"[object Number]":return+r!=+r?+e!=+e:+r==0?1/+r===1/e:+r==+e;case"[object Date]":case"[object Boolean]":return+r==+e;case"[object Symbol]":return zD.valueOf.call(r)===zD.valueOf.call(e);case"[object ArrayBuffer]":case ES:return RS(TS(r),TS(e),t,n)}var s=a==="[object Array]";if(!s&&hS(r)){var o=xo(r);if(o!==xo(e))return!1;if(r.buffer===e.buffer&&r.byteOffset===e.byteOffset)return!0;s=!0}if(!s){if(typeof r!="object"||typeof e!="object")return!1;var l=r.constructor,p=e.constructor;if(l!==p&&!(St(l)&&l instanceof l&&St(p)&&p instanceof p)&&"constructor"in r&&"constructor"in e)return!1}t=t||[],n=n||[];for(var u=t.length;u--;)if(t[u]===r)return n[u]===e;if(t.push(r),n.push(e),s){if(u=r.length,u!==e.length)return!1;for(;u--;)if(!lu(r[u],e[u],t,n))return!1}else{var h=ot(r),f;if(u=h.length,ot(e).length!==u)return!1;for(;u--;)if(f=h[u],!(sr(e,f)&&lu(r[f],e[f],t,n)))return!1}return t.pop(),n.pop(),!0}function d2(r,e){return lu(r,e)}function Wa(r){if(!ar(r))return[];var e=[];for(var t in r)e.push(t);return eS&&fS(r,e),e}function du(r){var e=_t(r);return function(t){if(t==null)return!1;var n=Wa(t);if(_t(n))return!1;for(var a=0;a<e;a++)if(!St(t[r[a]]))return!1;return r!==vS||!St(t[cu])}}var cu="forEach",gS="has",uu=["clear","delete"],bS=["get",gS,"set"],c2=uu.concat(cu,bS),vS=uu.concat(bS),u2=["add"].concat(uu,cu,gS);const p2=au?du(c2):Et("Map"),y2=au?du(vS):Et("WeakMap"),h2=au?du(u2):Et("Set"),f2=Et("WeakSet");function Ui(r){for(var e=ot(r),t=e.length,n=Array(t),a=0;a<t;a++)n[a]=r[e[a]];return n}function m2(r){for(var e=ot(r),t=e.length,n=Array(t),a=0;a<t;a++)n[a]=[e[a],r[e[a]]];return n}function IS(r){for(var e={},t=ot(r),n=0,a=t.length;n<a;n++)e[r[t[n]]]=t[n];return e}function pu(r){var e=[];for(var t in r)St(r[t])&&e.push(t);return e.sort()}function yu(r,e){return function(t){var n=arguments.length;if(e&&(t=Object(t)),n<2||t==null)return t;for(var a=1;a<n;a++)for(var s=arguments[a],o=r(s),l=o.length,p=0;p<l;p++){var u=o[p];(!e||t[u]===void 0)&&(t[u]=s[u])}return t}}const DS=yu(Wa),jo=yu(ot),SS=yu(Wa,!0);function T2(){return function(){}}function OS(r){if(!ar(r))return{};if(XD)return XD(r);var e=T2();e.prototype=r;var t=new e;return e.prototype=null,t}function E2(r,e){var t=OS(r);return e&&jo(t,e),t}function R2(r){return ar(r)?Gr(r)?r.slice():DS({},r):r}function g2(r,e){return e(r),r}function PS(r){return Gr(r)?r:[r]}Me.toPath=PS;function Ya(r){return Me.toPath(r)}function hu(r,e){for(var t=e.length,n=0;n<t;n++){if(r==null)return;r=r[e[n]]}return t?r:void 0}function AS(r,e,t){var n=hu(r,Ya(e));return nS(n)?t:n}function b2(r,e){e=Ya(e);for(var t=e.length,n=0;n<t;n++){var a=e[n];if(!sr(r,a))return!1;r=r[a]}return!!t}function fu(r){return r}function Ha(r){return r=jo({},r),function(e){return mS(e,r)}}function mu(r){return r=Ya(r),function(e){return hu(e,r)}}function za(r,e,t){if(e===void 0)return r;switch(t??3){case 1:return function(n){return r.call(e,n)};case 3:return function(n,a,s){return r.call(e,n,a,s)};case 4:return function(n,a,s,o){return r.call(e,n,a,s,o)}}return function(){return r.apply(e,arguments)}}function CS(r,e,t){return r==null?fu:St(r)?za(r,e,t):ar(r)&&!Gr(r)?Ha(r):mu(r)}function Tu(r,e){return CS(r,e,1/0)}Me.iteratee=Tu;function Vt(r,e,t){return Me.iteratee!==Tu?Me.iteratee(r,e):CS(r,e,t)}function v2(r,e,t){e=Vt(e,t);for(var n=ot(r),a=n.length,s={},o=0;o<a;o++){var l=n[o];s[l]=e(r[l],l,r)}return s}function wS(){}function I2(r){return r==null?wS:function(e){return AS(r,e)}}function D2(r,e,t){var n=Array(Math.max(0,r));e=za(e,t,1);for(var a=0;a<r;a++)n[a]=e(a);return n}function Eu(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const Za=Date.now||function(){return new Date().getTime()};function BS(r){var e=function(s){return r[s]},t="(?:"+ot(r).join("|")+")",n=RegExp(t),a=RegExp(t,"g");return function(s){return s=s==null?"":""+s,n.test(s)?s.replace(a,e):s}}const MS={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},S2=BS(MS),O2=IS(MS),P2=BS(O2),A2=Me.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Ru=/(.)^/,C2={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},w2=/\\|'|\r|\n|\u2028|\u2029/g;function B2(r){return"\\"+C2[r]}var M2=/^\s*(\w|\$)+\s*$/;function _2(r,e,t){!e&&t&&(e=t),e=SS({},e,Me.templateSettings);var n=RegExp([(e.escape||Ru).source,(e.interpolate||Ru).source,(e.evaluate||Ru).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(n,function(u,h,f,R,v){return s+=r.slice(a,v).replace(w2,B2),a=v+u.length,h?s+=`'+
|
|
25
25
|
((__t=(`+h+`))==null?'':_.escape(__t))+
|
|
26
26
|
'`:f?s+=`'+
|
|
27
27
|
((__t=(`+f+`))==null?'':__t)+
|
|
@@ -33,12 +33,12 @@ __p+='`),u}),s+=`';
|
|
|
33
33
|
`,o="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
|
|
34
34
|
`+s+`return __p;
|
|
35
35
|
`;var l;try{l=new Function(o,"_",s)}catch(u){throw u.source=s,u}var p=function(u){return l.call(this,u,Me)};return p.source="function("+o+`){
|
|
36
|
-
`+s+"}",p}function V2(r,e,t){e=Ya(e);var n=e.length;if(!n)return St(t)?t.call(r):t;for(var a=0;a<n;a++){var s=r==null?void 0:r[e[a]];s===void 0&&(s=t,a=n),r=St(s)?s.call(r):s}return r}var N2=0;function L2(r){var e=++N2+"";return r?r+e:e}function G2(r){var e=Me(r);return e._chain=!0,e}function BS(r,e,t,n,a){if(!(n instanceof e))return r.apply(t,a);var s=DS(r.prototype),o=r.apply(s,a);return ar(o)?o:s}var xi=Mt(function(r,e){var t=xi.placeholder,n=function(){for(var a=0,s=e.length,o=Array(s),l=0;l<s;l++)o[l]=e[l]===t?arguments[a++]:e[l];for(;a<arguments.length;)o.push(arguments[a++]);return BS(r,n,this,this,o)};return n});xi.placeholder=Me;const MS=Mt(function(r,e,t){if(!St(r))throw new TypeError("Bind must be called on a function");var n=Mt(function(a){return BS(r,n,e,this,t.concat(a))});return n}),jt=cS(_t);function $r(r,e,t,n){if(n=n||[],!e&&e!==0)e=1/0;else if(e<=0)return n.concat(r);for(var a=n.length,s=0,o=_t(r);s<o;s++){var l=r[s];if(jt(l)&&(Gr(l)||ou(l)))if(e>1)$r(l,e-1,t,n),a=n.length;else for(var p=0,u=l.length;p<u;)n[a++]=l[p++];else t||(n[a++]=l)}return n}const $2=Mt(function(r,e){e=$r(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var n=e[t];r[n]=MS(r[n],r)}return r});function F2(r,e){var t=function(n){var a=t.cache,s=""+(e?e.apply(this,arguments):n);return sr(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const _S=Mt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),U2=xi(_S,Me,1);function x2(r,e,t){var n,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:Za(),n=null,o=r.apply(a,s),n||(a=s=null)},u=function(){var h=Za();!l&&t.leading===!1&&(l=h);var f=e-(h-l);return a=this,s=arguments,f<=0||f>e?(n&&(clearTimeout(n),n=null),l=h,o=r.apply(a,s),n||(a=s=null)):!n&&t.trailing!==!1&&(n=setTimeout(p,f)),o};return u.cancel=function(){clearTimeout(n),l=0,n=a=s=null},u}function j2(r,e,t){var n,a,s,o,l,p=function(){var h=Za()-a;e>h?n=setTimeout(p,e-h):(n=null,t||(o=r.apply(l,s)),n||(s=l=null))},u=Mt(function(h){return l=this,s=h,a=Za(),n||(n=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return u.cancel=function(){clearTimeout(n),n=s=l=null},u}function k2(r,e){return xi(e,r)}function gu(r){return function(){return!r.apply(this,arguments)}}function q2(){var r=arguments,e=r.length-1;return function(){for(var t=e,n=r[e].apply(this,arguments);t--;)n=r[t].call(this,n);return n}}function J2(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function VS(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const W2=xi(VS,2);function NS(r,e,t){e=Vt(e,t);for(var n=ot(r),a,s=0,o=n.length;s<o;s++)if(a=n[s],e(r[a],a,r))return a}function LS(r){return function(e,t,n){t=Vt(t,n);for(var a=_t(e),s=r>0?0:a-1;s>=0&&s<a;s+=r)if(t(e[s],s,e))return s;return-1}}const bu=LS(1),GS=LS(-1);function $S(r,e,t,n){t=Vt(t,n,1);for(var a=t(e),s=0,o=_t(r);s<o;){var l=Math.floor((s+o)/2);t(r[l])<a?s=l+1:o=l}return s}function FS(r,e,t){return function(n,a,s){var o=0,l=_t(n);if(typeof s=="number")r>0?o=s>=0?s:Math.max(s+l,o):l=s>=0?Math.min(s+1,l):s+l+1;else if(t&&s&&l)return s=t(n,a),n[s]===a?s:-1;if(a!==a)return s=e(ka.call(n,o,l),lS),s>=0?s+o:-1;for(s=r>0?o:l-1;s>=0&&s<l;s+=r)if(n[s]===a)return s;return-1}}const US=FS(1,bu,$S),Y2=FS(-1,GS);function vu(r,e,t){var n=jt(r)?bu:NS,a=n(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function H2(r,e){return vu(r,Ha(e))}function Fn(r,e,t){e=za(e,t);var n,a;if(jt(r))for(n=0,a=r.length;n<a;n++)e(r[n],n,r);else{var s=ot(r);for(n=0,a=s.length;n<a;n++)e(r[s[n]],s[n],r)}return r}function Fr(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=Array(a),o=0;o<a;o++){var l=n?n[o]:o;s[o]=e(r[l],l,r)}return s}function xS(r){var e=function(t,n,a,s){var o=!jt(t)&&ot(t),l=(o||t).length,p=r>0?0:l-1;for(s||(a=t[o?o[p]:p],p+=r);p>=0&&p<l;p+=r){var u=o?o[p]:p;a=n(a,t[u],u,t)}return a};return function(t,n,a,s){var o=arguments.length>=3;return e(t,za(n,s,4),a,o)}}const Iu=xS(1),jS=xS(-1);function ji(r,e,t){var n=[];return e=Vt(e,t),Fn(r,function(a,s,o){e(a,s,o)&&n.push(a)}),n}function z2(r,e,t){return ji(r,gu(Vt(e)),t)}function kS(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=0;s<a;s++){var o=n?n[s]:s;if(!e(r[o],o,r))return!1}return!0}function qS(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=0;s<a;s++){var o=n?n[s]:s;if(e(r[o],o,r))return!0}return!1}function Un(r,e,t,n){return jt(r)||(r=Ui(r)),(typeof t!="number"||n)&&(t=0),US(r,e,t)>=0}const Z2=Mt(function(r,e,t){var n,a;return St(e)?a=e:(e=Ya(e),n=e.slice(0,-1),e=e[e.length-1]),Fr(r,function(s){var o=a;if(!o){if(n&&n.length&&(s=hu(s,n)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function Du(r,e){return Fr(r,mu(e))}function K2(r,e){return ji(r,Ha(e))}function JS(r,e,t){var n=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=jt(r)?r:Ui(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s>n&&(n=s)}else e=Vt(e,t),Fn(r,function(u,h,f){o=e(u,h,f),(o>a||o===-1/0&&n===-1/0)&&(n=u,a=o)});return n}function X2(r,e,t){var n=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=jt(r)?r:Ui(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s<n&&(n=s)}else e=Vt(e,t),Fn(r,function(u,h,f){o=e(u,h,f),(o<a||o===1/0&&n===1/0)&&(n=u,a=o)});return n}var Q2=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function WS(r){return r?Gr(r)?ka.call(r):iu(r)?r.match(Q2):jt(r)?Fr(r,fu):Ui(r):[]}function YS(r,e,t){if(e==null||t)return jt(r)||(r=Ui(r)),r[Eu(r.length-1)];var n=WS(r),a=_t(n);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Eu(o,s),p=n[o];n[o]=n[l],n[l]=p}return n.slice(0,e)}function e7(r){return YS(r,1/0)}function t7(r,e,t){var n=0;return e=Vt(e,t),Du(Fr(r,function(a,s,o){return{value:a,index:n++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,l=s.criteria;if(o!==l){if(o>l||o===void 0)return 1;if(o<l||l===void 0)return-1}return a.index-s.index}),"value")}function ko(r,e){return function(t,n,a){var s=e?[[],[]]:{};return n=Vt(n,a),Fn(t,function(o,l){var p=n(o,l,t);r(s,o,p)}),s}}const n7=ko(function(r,e,t){sr(r,t)?r[t].push(e):r[t]=[e]}),r7=ko(function(r,e,t){r[t]=e}),i7=ko(function(r,e,t){sr(r,t)?r[t]++:r[t]=1}),a7=ko(function(r,e,t){r[t?0:1].push(e)},!0);function s7(r){return r==null?0:jt(r)?r.length:ot(r).length}function o7(r,e,t){return e in t}const HS=Mt(function(r,e){var t={},n=e[0];if(r==null)return t;St(n)?(e.length>1&&(n=za(n,e[1])),e=Wa(r)):(n=o7,e=$r(e,!1,!1),r=Object(r));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=r[o];n(l,o,r)&&(t[o]=l)}return t}),l7=Mt(function(r,e){var t=e[0],n;return St(t)?(t=gu(t),e.length>1&&(n=e[1])):(e=Fr($r(e,!1,!1),String),t=function(a,s){return!Un(e,s)}),HS(r,t,n)});function zS(r,e,t){return ka.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function Su(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:zS(r,r.length-e)}function qo(r,e,t){return ka.call(r,e==null||t?1:e)}function d7(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:qo(r,Math.max(0,r.length-e))}function c7(r){return ji(r,Boolean)}function u7(r,e){return $r(r,e,!1)}const ZS=Mt(function(r,e){return e=$r(e,!0,!0),ji(r,function(t){return!Un(e,t)})}),p7=Mt(function(r,e){return ZS(r,e)});function Ou(r,e,t,n){tS(e)||(n=t,t=e,e=!1),t!=null&&(t=Vt(t,n));for(var a=[],s=[],o=0,l=_t(r);o<l;o++){var p=r[o],u=t?t(p,o,r):p;e&&!t?((!o||s!==u)&&a.push(p),s=u):t?Un(s,u)||(s.push(u),a.push(p)):Un(a,p)||a.push(p)}return a}const y7=Mt(function(r){return Ou($r(r,!0,!0))});function h7(r){for(var e=[],t=arguments.length,n=0,a=_t(r);n<a;n++){var s=r[n];if(!Un(e,s)){var o;for(o=1;o<t&&Un(arguments[o],s);o++);o===t&&e.push(s)}}return e}function Pu(r){for(var e=r&&JS(r,_t).length||0,t=Array(e),n=0;n<e;n++)t[n]=Du(r,n);return t}const f7=Mt(Pu);function m7(r,e){for(var t={},n=0,a=_t(r);n<a;n++)e?t[r[n]]=e[n]:t[r[n][0]]=r[n][1];return t}function T7(r,e,t){e==null&&(e=r||0,r=0),t||(t=e<r?-1:1);for(var n=Math.max(Math.ceil((e-r)/t),0),a=Array(n),s=0;s<n;s++,r+=t)a[s]=r;return a}function E7(r,e){if(e==null||e<1)return[];for(var t=[],n=0,a=r.length;n<a;)t.push(ka.call(r,n,n+=e));return t}function Au(r,e){return r._chain?Me(e).chain():e}function KS(r){return Fn(pu(r),function(e){var t=Me[e]=r[e];Me.prototype[e]=function(){var n=[this._wrapped];return k5.apply(n,arguments),Au(this,t.apply(Me,n))}}),Me}Fn(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=Fo[r];Me.prototype[r]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(r==="shift"||r==="splice")&&t.length===0&&delete t[0]),Au(this,t)}}),Fn(["concat","join","slice"],function(r){var e=Fo[r];Me.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),Au(this,t)}});var XS=KS(Object.freeze(Object.defineProperty({__proto__:null,VERSION:JD,after:J2,all:kS,allKeys:Wa,any:qS,assign:jo,before:VS,bind:MS,bindAll:$2,chain:G2,chunk:E7,clone:R2,collect:Fr,compact:c7,compose:q2,constant:dS,contains:Un,countBy:i7,create:E2,debounce:j2,default:Me,defaults:IS,defer:U2,delay:_S,detect:vu,difference:ZS,drop:qo,each:Fn,escape:S2,every:kS,extend:vS,extendOwn:jo,filter:ji,find:vu,findIndex:bu,findKey:NS,findLastIndex:GS,findWhere:H2,first:Su,flatten:u7,foldl:Iu,foldr:jS,forEach:Fn,functions:pu,get:OS,groupBy:n7,has:b2,head:Su,identity:fu,include:Un,includes:Un,indexBy:r7,indexOf:US,initial:zS,inject:Iu,intersection:h7,invert:bS,invoke:Z2,isArguments:ou,isArray:Gr,isArrayBuffer:iS,isBoolean:tS,isDataView:Uo,isDate:X5,isElement:K5,isEmpty:Ja,isEqual:d2,isError:e2,isFinite:i2,isFunction:St,isMap:p2,isMatch:hS,isNaN:lS,isNull:Z5,isNumber:nS,isObject:ar,isRegExp:Q5,isSet:h2,isString:iu,isSymbol:rS,isTypedArray:pS,isUndefined:eS,isWeakMap:y2,isWeakSet:f2,iteratee:Tu,keys:ot,last:d7,lastIndexOf:Y2,map:Fr,mapObject:v2,matcher:Ha,matches:Ha,max:JS,memoize:F2,methods:pu,min:X2,mixin:KS,negate:gu,noop:AS,now:Za,object:m7,omit:l7,once:W2,pairs:m2,partial:xi,partition:a7,pick:HS,pluck:Du,property:mu,propertyOf:I2,random:Eu,range:T7,reduce:Iu,reduceRight:jS,reject:z2,rest:qo,restArguments:Mt,result:V2,sample:YS,select:ji,shuffle:e7,size:s7,some:qS,sortBy:t7,sortedIndex:$S,tail:qo,take:Su,tap:g2,template:_2,templateSettings:A2,throttle:x2,times:D2,toArray:WS,toPath:SS,transpose:Pu,unescape:P2,union:y7,uniq:Ou,unique:Ou,uniqueId:L2,unzip:Pu,values:Ui,where:K2,without:p7,wrap:k2,zip:f7},Symbol.toStringTag,{value:"Module"})));XS._=XS;function Jo(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Wo(r){return r.charAt(0).toLowerCase()+r.slice(1)}function QS(r,e){if(r.type!==i.Property||e.type!==i.Property)throw new Error(`Expected property entities for comparison. But got ${r.type} and ${e.type}.`);return r===e||r.id===e.id?!0:r.name!==e.name||r.static!==e.static||r.abstract!==e.abstract?!1:Zt(r.dataType,e.dataType).compatible}function eO(r,e){if(r.type!==i.DefinitionEntity||e.type!==i.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${r.type} and ${e.type}.`);if(r===e||r.id===e.id)return!0;if(r.properties.length!==e.properties.length)return!1;let t=[...e.properties];const n=[];for(let a=0;a<r.properties.length;a++){const s=r.properties[a];t.find(l=>{const p=QS(s,l);return p&&(t=t.filter(u=>u.id!==l.id)),p})||n.push(s)}return!(n.length>0)}var zt=(r=>(r.BothUnconstrained="both-unconstrained",r.AConstraintBUnconstrained="a-constraint-b-unconstrained",r.BConstraintAUnconstrained="b-constraint-a-unconstrained",r.Same="same",r.AIsListBIsNot="a-is-list-b-is-not",r.BIsListAIsNot="b-is-list-a-is-not",r.AIsNullableBIsNot="a-is-nullable-b-is-not",r.BIsNullableAIsNot="b-is-nullable-a-is-not",r.AIsTemplateBIsNot="a-is-template-b-is-not",r.BIsTemplateAIsNot="b-is-template-a-is-not",r.BothUntyped="both-untyped",r.AIsUntypedBIsNot="a-is-untyped-b-is-not",r.BIsUntypedAIsNot="b-is-untyped-a-is-not",r.TypeEntityMismatch="type-entity-mismatch",r.SameDefinitionEntities="same-definition-entities",r.CompatibleDefinitionEntities="compatible-definition-entities",r.IncompatibleDefinitionEntities="incompatible-definition-entities",r.SamePrimitiveEntities="same-primitive-entities",r.IncompatiblePrimitiveEntities="incompatible-primitive-entities",r.SameBuiltInBaseEntities="same-built-in-base-entities",r.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",r.CheckUnknown="check-unknown",r))(zt||{});function Zt(r,e){var t,n,a,s,o,l,p,u,h,f,R;if(r&&r.type!==i.DataType||e&&e.type!==i.DataType)throw new Error(`Expected data-type entities for comparison. But got ${r==null?void 0:r.type} and ${e==null?void 0:e.type}.`);if(r===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(r===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(r===e)return{compatible:!0,type:"same"};if(r.id===e.id)return{compatible:!0,type:"same"};if(r.isList!==e.isList)return{compatible:!1,type:r.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(r.asType!==e.asType)return{compatible:!1,type:r.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!r.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(r.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!r.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=r.entity)==null?void 0:t.type)!==((n=e.entity)==null?void 0:n.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=r.entity)==null?void 0:a.type)===i.DefinitionEntity){if(((s=r.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-definition-entities"};const v=eO(r.entity,e.entity);return{compatible:v,type:v?"compatible-definition-entities":"incompatible-definition-entities"}}return((l=r.entity)==null?void 0:l.type)===i.PrimitiveEntity?((p=r.entity)==null?void 0:p.id)===((u=e.entity)==null?void 0:u.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=r.entity)==null?void 0:h.type)===i.BuiltInBaseEntity?((f=r.entity)==null?void 0:f.id)===((R=e.entity)==null?void 0:R.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function R7(r){const e=r.project.builtInBaseEntities.find(a=>a.id===U.EXECUTION),t={id:r.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},n=b(t,r.project);return n.inferred=!0,n.sync(t),n.setParent(r),n.entity=e,n}function tO(r){return r.dataType?r.dataType:null}function Cu(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved?e:r.readsValue?gn(r.readsValue):null}function wu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved?r.dataType:r.readsValue?gn(r.readsValue):null}function nO(r){return gn(r.declaration)}function rO(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function Bu(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function iO(r){return(r==null?void 0:r.dataType)||null}function aO(r){return(r==null?void 0:r.dataType)||null}function gn(r){switch(r.type){case i.VariableDeclaration:return rO(r);case i.ArgumentDeclaration:return tO(r);case i.ReturnDeclaration:return wu(r);case i.VariableInstance:return nO(r);case i.InputMap:return Cu(r);case i.OutputMap:return Bu(r);case i.Property:return iO(r);case i.ValueDescriptor:return aO(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Yo(r){switch(r.type){case i.ArgumentDeclaration:return r.getDataType();case i.InputMap:return r.getDataType();case i.VariableDeclaration:return r.getDataType();case i.VariableInstance:return r.getDataType();case i.OutputMap:return r.getDataType();case i.ReturnDeclaration:return r.getDataType();case i.Property:return r.getDataType();case i.ValueDescriptor:return r.getDataType();default:return null}}function S(r){if(r){let e=null;return typeof r=="string"?e=r:r.entityId?e=r.entityId:r.type!==i.GenericReference&&(e=r.id),e}return null}function Ur(r){return r.declaration||r}function g7(r){return r.type===i.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function Mu(r,e){const t=[];if(r.type===i.Project)t.push(...r.variableDeclarations);else{const a=Pt(Ue(r)).filter(s=>s.type===i.VariableDeclaration);t.push(...a),r.parent&&(pt.includes(r.parent.type)||r.parent.type===i.Project)&&t.push(...Mu(r.parent))}return t}function b7(r){return r.split(/[\s-]+/).filter(n=>n.length>0).map((n,a)=>a===0?n.toLowerCase():n[0].toUpperCase()+n.slice(1).toLowerCase()).join("")}function v7(r){return r.split(/[\s-]+/).filter(n=>n.length>0).map(n=>n[0].toUpperCase()+n.slice(1).toLowerCase()).join("")}function sO(r){var e;return(e=r.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:e.map(t=>t.toLowerCase()).join("-")}function Ho(r){return sO(r).toLowerCase()}function Ka(r){var e,t;if(!r)return"Any data type";if(!r.entity){const n=r.isList;if(!((e=r.andChildrenGroup)!=null&&e.length)&&!((t=r.orChildrenGroup)!=null&&t.length))return n?"List of an any data type":"Any data type";let a="",s=!1,o=!1;return(r.andChildrenGroup||[]).forEach(l=>{const p=Ka(l),u=Wo(p);s&&(a+=" and "),l.isGroup?a+="("+u+")":s?a+=u:a+=p,s=!0,o=!0}),(r.orChildrenGroup||[]).forEach(l=>{const p=Ka(l),u=Wo(p);s&&(o&&(a+=","),a+=" or "),l.isGroup?a+="("+u+")":s?a+=u:a+=p,s=!0}),a}if(r.entity.type===i.PrimitiveEntity){let n=r.entity.name;switch(r.entity.name){case C.String:n="Text";break;case C.KeyValue:n="Data structure";break}return r.isList?`List of ${n}s`:`${n.slice(0,1).toUpperCase()}${n.slice(1)}`}else if(r.entity.type===i.DefinitionEntity){const n=w(r.entity,r.project);return r.isList?`List of ${n} entities`:n.slice(0,1).toUpperCase()+n.slice(1)}else if(r.entity.type===i.BuiltInBaseEntity){const n=lO(r.entity);return r.isList?`List of ${n} entities`:n.slice(0,1).toUpperCase()+n.slice(1)}else return r.isList?`List of ${r.entity.name} entities`:`${r.entity.name.slice(0,1).toUpperCase()+r.entity.name.slice(1)} entity`}function I7(r){if(!r)return"Any data type";const e=r.getDataType();return Ka(e)}function zo(r){switch(r.declaration.id){case qe.Equal:return"is equal to";case qe.NotEqual:return"is not equal to";case qe.MoreThan:return"is greater than";case qe.MoreThanOrEqual:return"is greater than or equal to";case qe.LessThan:return"is less than";case qe.LessThanOrEqual:return"is less than or equal to";case qe.And:return"and";case qe.Or:return"or";case Jt.Empty:return"is empty";case Jt.NotEmpty:return"is not empty"}}function oO(r){return r.includes(U.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(U.PERSISTED_ENTITY)?"Persisted entity":r.includes(U.CRON_JOB)?"Scheduled execution":r.includes(U.RELATIONAL_DATABASE)?"Relational database":"Entity"}function lO(r){switch(r.name){case U.HTTP_ENDPOINT:return"HTTP endpoint";case U.PERSISTED_ENTITY:return"Persisted entity";case U.CRON_JOB:return"Scheduled execution";case U.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function D7(r){const e=ap(r);if(!e){const t=ip(r);return t.includes(U.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(U.PERSISTED_ENTITY)?"Persisted entity":t.includes(U.CRON_JOB)?"Scheduled execution":t.includes(U.RELATIONAL_DATABASE)?"Relational database":w(r,r.project)+" entity"}return w(e,r.project)+" entity"}function dO(r){let e="Find ";return r.outputsDeclarations.forEach((t,n)=>{const a=Yo(t),s=Wo(a&&a.entity?w(a.entity,r.project):"unstructured data");n===0?e+=`${s} `:n===r.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function cO(r){switch(r.name){case C.String:return"Text";case C.Number:return"Number";case C.Boolean:return"Boolean";case C.KeyValue:return"Data structure";case C.UUID:return"Unique identifier";case C.Date:return"Date";case C.EntityTemplate:return"Entity as template";case C.Enum:return"Enumeration";case C.File:return"File";case C.Null:return"Empty";case C.ActionDescriptor:return"Action descriptor";case C.Untyped:return"Untyped";default:return r.name}}function uO(r){switch(r.id){case k.List:return"Loop over list items";case k.ManualFlow:return"Manual flow control loop";case k.ObjectKeys:return"Loop over object keys";case k.ObjectValues:return"Loop over object values";case k.Counted:return"Loop given number of times";case k.String:return"Loop over text characters";case Ge.Addition:return"Sum numbers";case Ge.Subtraction:return"Subtract numbers";case Ge.Multiplication:return"Multiply numbers";case Ge.Division:return"Divide numbers";case Ge.Remainder:return"Get remainder of numbers";case Ge.Exponentiation:return"Get exponent of numbers";case re.AddIndex:return"Add at index position";case re.DeleteFirst:return"Delete first character";case re.DeleteLast:return"Delete last character";case re.DeleteIndex:return"Delete at index position";case re.Join:return"Join texts";case re.ReplaceAllMatches:return"Replace all matches";case re.ReplaceFirst:return"Replace first match";case re.ReplaceLast:return"Replace last match";case re.Split:return"Split text";case re.ReplaceIndex:return"Replace at index position";case re.ReplaceSingleMatch:return"Replace single match";case re.GetFirst:return"Get first character";case re.GetLast:return"Get last character";case re.GetIndex:return"Get at index position";case re.Append:return"Add at the end";case re.Prepend:return"Add at the start";case Ve.Wait:return"Wait";case Ve.Parallel:return"Run in parallel";case Ve.Sequential:return"Run in sequence";case dt.HttpRequest:return"HTTP request";case Ne.CreateNewInstance:return"Create new copy of entity";case X.AddIndex:return"Add item at index position";case X.DeleteFirst:return"Delete first item";case X.DeleteLast:return"Delete last item";case X.DeleteIndex:return"Delete item at index position";case X.Join:return"Join lists";case X.ReplaceAllMatches:return"Replace all matches";case X.ReplaceFirst:return"Replace first match";case X.ReplaceLast:return"Replace last match";case X.Split:return"Split list";case X.ReplaceIndex:return"Replace at index position";case X.ReplaceSingleMatch:return"Replace single match";case X.GetFirst:return"Get first item";case X.GetLast:return"Get last item";case X.GetIndex:return"Get item at index position";case X.Append:return"Add item at the end";case X.Prepend:return"Add item at the start";case Dn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function w(r,e){var t;if(i.FunctionDeclaration===r.type){const n=r.name;if(Object.values(Gt).includes(n))switch(n){case Gt.AbortExecution:return"Abort execution";case Gt.DeletePersistedEntity:return"Delete persisted entity";case Gt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Jo(r.type).replaceAll("-"," ")}return n}if(i.BuiltInBaseEntity===r.type)return oO([r.name]);if(mp.includes(r.type)&&r.type!==i.ActionDescriptor)return r.name;switch(r.type){case i.Search:return dO(r);case i.Operation:case i.InternalCall:case i.Loop:const n=Lt(r.declaration,e);return w(n,e);case i.ActionDescriptor:return uO(r);case i.BreakStatement:const a=Lt(r.parent,e);return`Stop loop ${w(a,e)}`;case i.ContinueStatement:const s=Lt(r.parent,e);return`Execute next iteration of ${w(s,e)}`;case i.FunctionCall:return Lt(r.declaration,e).name;case i.Condition:{const l=r;if((t=r.inputs)!=null&&t.length){const p=w(l.inputs[0],l.project);if(l.inputs[1]){const u=l.inputs[1].declaration.name;return`If ${p} ${zo(l)} ${u}`}return`If ${p} ${zo(l)}`}else return`If ${zo(l)}`}case i.ReturnStatement:{const l=Lt(r.parent,e);return`Output of ${w(l,e)}`}case i.InputMap:if(r.declaration){const l=Lt(r.declaration,e);return w(l,e)||""}else return r.name||"";case i.VariableInstance:{const l=Lt(r.declaration,e);return w(l,e)||""}case i.OutputMap:if(r.declaration){const l=Lt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case i.PrimitiveEntity:case i.LiteralValue:return cO(r);default:return Jo(r.type).replaceAll("-"," ")}}function Zo(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=e.entities.filter(a=>a.name===r.name);return n.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in the project. Entity with id "${n[0].id}" has the same name.
|
|
36
|
+
`+s+"}",p}function V2(r,e,t){e=Ya(e);var n=e.length;if(!n)return St(t)?t.call(r):t;for(var a=0;a<n;a++){var s=r==null?void 0:r[e[a]];s===void 0&&(s=t,a=n),r=St(s)?s.call(r):s}return r}var N2=0;function L2(r){var e=++N2+"";return r?r+e:e}function G2(r){var e=Me(r);return e._chain=!0,e}function _S(r,e,t,n,a){if(!(n instanceof e))return r.apply(t,a);var s=OS(r.prototype),o=r.apply(s,a);return ar(o)?o:s}var xi=Mt(function(r,e){var t=xi.placeholder,n=function(){for(var a=0,s=e.length,o=Array(s),l=0;l<s;l++)o[l]=e[l]===t?arguments[a++]:e[l];for(;a<arguments.length;)o.push(arguments[a++]);return _S(r,n,this,this,o)};return n});xi.placeholder=Me;const VS=Mt(function(r,e,t){if(!St(r))throw new TypeError("Bind must be called on a function");var n=Mt(function(a){return _S(r,n,e,this,t.concat(a))});return n}),jt=pS(_t);function $r(r,e,t,n){if(n=n||[],!e&&e!==0)e=1/0;else if(e<=0)return n.concat(r);for(var a=n.length,s=0,o=_t(r);s<o;s++){var l=r[s];if(jt(l)&&(Gr(l)||ou(l)))if(e>1)$r(l,e-1,t,n),a=n.length;else for(var p=0,u=l.length;p<u;)n[a++]=l[p++];else t||(n[a++]=l)}return n}const $2=Mt(function(r,e){e=$r(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var n=e[t];r[n]=VS(r[n],r)}return r});function F2(r,e){var t=function(n){var a=t.cache,s=""+(e?e.apply(this,arguments):n);return sr(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const NS=Mt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),U2=xi(NS,Me,1);function x2(r,e,t){var n,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:Za(),n=null,o=r.apply(a,s),n||(a=s=null)},u=function(){var h=Za();!l&&t.leading===!1&&(l=h);var f=e-(h-l);return a=this,s=arguments,f<=0||f>e?(n&&(clearTimeout(n),n=null),l=h,o=r.apply(a,s),n||(a=s=null)):!n&&t.trailing!==!1&&(n=setTimeout(p,f)),o};return u.cancel=function(){clearTimeout(n),l=0,n=a=s=null},u}function j2(r,e,t){var n,a,s,o,l,p=function(){var h=Za()-a;e>h?n=setTimeout(p,e-h):(n=null,t||(o=r.apply(l,s)),n||(s=l=null))},u=Mt(function(h){return l=this,s=h,a=Za(),n||(n=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return u.cancel=function(){clearTimeout(n),n=s=l=null},u}function k2(r,e){return xi(e,r)}function gu(r){return function(){return!r.apply(this,arguments)}}function q2(){var r=arguments,e=r.length-1;return function(){for(var t=e,n=r[e].apply(this,arguments);t--;)n=r[t].call(this,n);return n}}function J2(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function LS(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const W2=xi(LS,2);function GS(r,e,t){e=Vt(e,t);for(var n=ot(r),a,s=0,o=n.length;s<o;s++)if(a=n[s],e(r[a],a,r))return a}function $S(r){return function(e,t,n){t=Vt(t,n);for(var a=_t(e),s=r>0?0:a-1;s>=0&&s<a;s+=r)if(t(e[s],s,e))return s;return-1}}const bu=$S(1),FS=$S(-1);function US(r,e,t,n){t=Vt(t,n,1);for(var a=t(e),s=0,o=_t(r);s<o;){var l=Math.floor((s+o)/2);t(r[l])<a?s=l+1:o=l}return s}function xS(r,e,t){return function(n,a,s){var o=0,l=_t(n);if(typeof s=="number")r>0?o=s>=0?s:Math.max(s+l,o):l=s>=0?Math.min(s+1,l):s+l+1;else if(t&&s&&l)return s=t(n,a),n[s]===a?s:-1;if(a!==a)return s=e(ka.call(n,o,l),cS),s>=0?s+o:-1;for(s=r>0?o:l-1;s>=0&&s<l;s+=r)if(n[s]===a)return s;return-1}}const jS=xS(1,bu,US),Y2=xS(-1,FS);function vu(r,e,t){var n=jt(r)?bu:GS,a=n(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function H2(r,e){return vu(r,Ha(e))}function Fn(r,e,t){e=za(e,t);var n,a;if(jt(r))for(n=0,a=r.length;n<a;n++)e(r[n],n,r);else{var s=ot(r);for(n=0,a=s.length;n<a;n++)e(r[s[n]],s[n],r)}return r}function Fr(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=Array(a),o=0;o<a;o++){var l=n?n[o]:o;s[o]=e(r[l],l,r)}return s}function kS(r){var e=function(t,n,a,s){var o=!jt(t)&&ot(t),l=(o||t).length,p=r>0?0:l-1;for(s||(a=t[o?o[p]:p],p+=r);p>=0&&p<l;p+=r){var u=o?o[p]:p;a=n(a,t[u],u,t)}return a};return function(t,n,a,s){var o=arguments.length>=3;return e(t,za(n,s,4),a,o)}}const Iu=kS(1),qS=kS(-1);function ji(r,e,t){var n=[];return e=Vt(e,t),Fn(r,function(a,s,o){e(a,s,o)&&n.push(a)}),n}function z2(r,e,t){return ji(r,gu(Vt(e)),t)}function JS(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=0;s<a;s++){var o=n?n[s]:s;if(!e(r[o],o,r))return!1}return!0}function WS(r,e,t){e=Vt(e,t);for(var n=!jt(r)&&ot(r),a=(n||r).length,s=0;s<a;s++){var o=n?n[s]:s;if(e(r[o],o,r))return!0}return!1}function Un(r,e,t,n){return jt(r)||(r=Ui(r)),(typeof t!="number"||n)&&(t=0),jS(r,e,t)>=0}const Z2=Mt(function(r,e,t){var n,a;return St(e)?a=e:(e=Ya(e),n=e.slice(0,-1),e=e[e.length-1]),Fr(r,function(s){var o=a;if(!o){if(n&&n.length&&(s=hu(s,n)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function Du(r,e){return Fr(r,mu(e))}function K2(r,e){return ji(r,Ha(e))}function YS(r,e,t){var n=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=jt(r)?r:Ui(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s>n&&(n=s)}else e=Vt(e,t),Fn(r,function(u,h,f){o=e(u,h,f),(o>a||o===-1/0&&n===-1/0)&&(n=u,a=o)});return n}function X2(r,e,t){var n=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=jt(r)?r:Ui(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s<n&&(n=s)}else e=Vt(e,t),Fn(r,function(u,h,f){o=e(u,h,f),(o<a||o===1/0&&n===1/0)&&(n=u,a=o)});return n}var Q2=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function HS(r){return r?Gr(r)?ka.call(r):iu(r)?r.match(Q2):jt(r)?Fr(r,fu):Ui(r):[]}function zS(r,e,t){if(e==null||t)return jt(r)||(r=Ui(r)),r[Eu(r.length-1)];var n=HS(r),a=_t(n);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Eu(o,s),p=n[o];n[o]=n[l],n[l]=p}return n.slice(0,e)}function e7(r){return zS(r,1/0)}function t7(r,e,t){var n=0;return e=Vt(e,t),Du(Fr(r,function(a,s,o){return{value:a,index:n++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,l=s.criteria;if(o!==l){if(o>l||o===void 0)return 1;if(o<l||l===void 0)return-1}return a.index-s.index}),"value")}function ko(r,e){return function(t,n,a){var s=e?[[],[]]:{};return n=Vt(n,a),Fn(t,function(o,l){var p=n(o,l,t);r(s,o,p)}),s}}const n7=ko(function(r,e,t){sr(r,t)?r[t].push(e):r[t]=[e]}),r7=ko(function(r,e,t){r[t]=e}),i7=ko(function(r,e,t){sr(r,t)?r[t]++:r[t]=1}),a7=ko(function(r,e,t){r[t?0:1].push(e)},!0);function s7(r){return r==null?0:jt(r)?r.length:ot(r).length}function o7(r,e,t){return e in t}const ZS=Mt(function(r,e){var t={},n=e[0];if(r==null)return t;St(n)?(e.length>1&&(n=za(n,e[1])),e=Wa(r)):(n=o7,e=$r(e,!1,!1),r=Object(r));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=r[o];n(l,o,r)&&(t[o]=l)}return t}),l7=Mt(function(r,e){var t=e[0],n;return St(t)?(t=gu(t),e.length>1&&(n=e[1])):(e=Fr($r(e,!1,!1),String),t=function(a,s){return!Un(e,s)}),ZS(r,t,n)});function KS(r,e,t){return ka.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function Su(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:KS(r,r.length-e)}function qo(r,e,t){return ka.call(r,e==null||t?1:e)}function d7(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:qo(r,Math.max(0,r.length-e))}function c7(r){return ji(r,Boolean)}function u7(r,e){return $r(r,e,!1)}const XS=Mt(function(r,e){return e=$r(e,!0,!0),ji(r,function(t){return!Un(e,t)})}),p7=Mt(function(r,e){return XS(r,e)});function Ou(r,e,t,n){rS(e)||(n=t,t=e,e=!1),t!=null&&(t=Vt(t,n));for(var a=[],s=[],o=0,l=_t(r);o<l;o++){var p=r[o],u=t?t(p,o,r):p;e&&!t?((!o||s!==u)&&a.push(p),s=u):t?Un(s,u)||(s.push(u),a.push(p)):Un(a,p)||a.push(p)}return a}const y7=Mt(function(r){return Ou($r(r,!0,!0))});function h7(r){for(var e=[],t=arguments.length,n=0,a=_t(r);n<a;n++){var s=r[n];if(!Un(e,s)){var o;for(o=1;o<t&&Un(arguments[o],s);o++);o===t&&e.push(s)}}return e}function Pu(r){for(var e=r&&YS(r,_t).length||0,t=Array(e),n=0;n<e;n++)t[n]=Du(r,n);return t}const f7=Mt(Pu);function m7(r,e){for(var t={},n=0,a=_t(r);n<a;n++)e?t[r[n]]=e[n]:t[r[n][0]]=r[n][1];return t}function T7(r,e,t){e==null&&(e=r||0,r=0),t||(t=e<r?-1:1);for(var n=Math.max(Math.ceil((e-r)/t),0),a=Array(n),s=0;s<n;s++,r+=t)a[s]=r;return a}function E7(r,e){if(e==null||e<1)return[];for(var t=[],n=0,a=r.length;n<a;)t.push(ka.call(r,n,n+=e));return t}function Au(r,e){return r._chain?Me(e).chain():e}function QS(r){return Fn(pu(r),function(e){var t=Me[e]=r[e];Me.prototype[e]=function(){var n=[this._wrapped];return k5.apply(n,arguments),Au(this,t.apply(Me,n))}}),Me}Fn(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=Fo[r];Me.prototype[r]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(r==="shift"||r==="splice")&&t.length===0&&delete t[0]),Au(this,t)}}),Fn(["concat","join","slice"],function(r){var e=Fo[r];Me.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),Au(this,t)}});var eO=QS(Object.freeze(Object.defineProperty({__proto__:null,VERSION:YD,after:J2,all:JS,allKeys:Wa,any:WS,assign:jo,before:LS,bind:VS,bindAll:$2,chain:G2,chunk:E7,clone:R2,collect:Fr,compact:c7,compose:q2,constant:uS,contains:Un,countBy:i7,create:E2,debounce:j2,default:Me,defaults:SS,defer:U2,delay:NS,detect:vu,difference:XS,drop:qo,each:Fn,escape:S2,every:JS,extend:DS,extendOwn:jo,filter:ji,find:vu,findIndex:bu,findKey:GS,findLastIndex:FS,findWhere:H2,first:Su,flatten:u7,foldl:Iu,foldr:qS,forEach:Fn,functions:pu,get:AS,groupBy:n7,has:b2,head:Su,identity:fu,include:Un,includes:Un,indexBy:r7,indexOf:jS,initial:KS,inject:Iu,intersection:h7,invert:IS,invoke:Z2,isArguments:ou,isArray:Gr,isArrayBuffer:sS,isBoolean:rS,isDataView:Uo,isDate:X5,isElement:K5,isEmpty:Ja,isEqual:d2,isError:e2,isFinite:i2,isFunction:St,isMap:p2,isMatch:mS,isNaN:cS,isNull:Z5,isNumber:iS,isObject:ar,isRegExp:Q5,isSet:h2,isString:iu,isSymbol:aS,isTypedArray:hS,isUndefined:nS,isWeakMap:y2,isWeakSet:f2,iteratee:Tu,keys:ot,last:d7,lastIndexOf:Y2,map:Fr,mapObject:v2,matcher:Ha,matches:Ha,max:YS,memoize:F2,methods:pu,min:X2,mixin:QS,negate:gu,noop:wS,now:Za,object:m7,omit:l7,once:W2,pairs:m2,partial:xi,partition:a7,pick:ZS,pluck:Du,property:mu,propertyOf:I2,random:Eu,range:T7,reduce:Iu,reduceRight:qS,reject:z2,rest:qo,restArguments:Mt,result:V2,sample:zS,select:ji,shuffle:e7,size:s7,some:WS,sortBy:t7,sortedIndex:US,tail:qo,take:Su,tap:g2,template:_2,templateSettings:A2,throttle:x2,times:D2,toArray:HS,toPath:PS,transpose:Pu,unescape:P2,union:y7,uniq:Ou,unique:Ou,uniqueId:L2,unzip:Pu,values:Ui,where:K2,without:p7,wrap:k2,zip:f7},Symbol.toStringTag,{value:"Module"})));eO._=eO;function Jo(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Wo(r){return r.charAt(0).toLowerCase()+r.slice(1)}function tO(r,e){if(r.type!==i.Property||e.type!==i.Property)throw new Error(`Expected property entities for comparison. But got ${r.type} and ${e.type}.`);return r===e||r.id===e.id?!0:r.name!==e.name||r.static!==e.static||r.abstract!==e.abstract?!1:Zt(r.dataType,e.dataType).compatible}function nO(r,e){if(r.type!==i.DefinitionEntity||e.type!==i.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${r.type} and ${e.type}.`);if(r===e||r.id===e.id)return!0;if(r.properties.length!==e.properties.length)return!1;let t=[...e.properties];const n=[];for(let a=0;a<r.properties.length;a++){const s=r.properties[a];t.find(l=>{const p=tO(s,l);return p&&(t=t.filter(u=>u.id!==l.id)),p})||n.push(s)}return!(n.length>0)}var zt=(r=>(r.BothUnconstrained="both-unconstrained",r.AConstraintBUnconstrained="a-constraint-b-unconstrained",r.BConstraintAUnconstrained="b-constraint-a-unconstrained",r.Same="same",r.AIsListBIsNot="a-is-list-b-is-not",r.BIsListAIsNot="b-is-list-a-is-not",r.AIsNullableBIsNot="a-is-nullable-b-is-not",r.BIsNullableAIsNot="b-is-nullable-a-is-not",r.AIsTemplateBIsNot="a-is-template-b-is-not",r.BIsTemplateAIsNot="b-is-template-a-is-not",r.BothUntyped="both-untyped",r.AIsUntypedBIsNot="a-is-untyped-b-is-not",r.BIsUntypedAIsNot="b-is-untyped-a-is-not",r.TypeEntityMismatch="type-entity-mismatch",r.SameDefinitionEntities="same-definition-entities",r.CompatibleDefinitionEntities="compatible-definition-entities",r.IncompatibleDefinitionEntities="incompatible-definition-entities",r.SamePrimitiveEntities="same-primitive-entities",r.IncompatiblePrimitiveEntities="incompatible-primitive-entities",r.SameBuiltInBaseEntities="same-built-in-base-entities",r.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",r.CheckUnknown="check-unknown",r))(zt||{});function Zt(r,e){var t,n,a,s,o,l,p,u,h,f,R;if(r&&r.type!==i.DataType||e&&e.type!==i.DataType)throw new Error(`Expected data-type entities for comparison. But got ${r==null?void 0:r.type} and ${e==null?void 0:e.type}.`);if(r===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(r===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(r===e)return{compatible:!0,type:"same"};if(r.id===e.id)return{compatible:!0,type:"same"};if(r.isList!==e.isList)return{compatible:!1,type:r.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(r.asType!==e.asType)return{compatible:!1,type:r.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!r.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(r.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!r.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=r.entity)==null?void 0:t.type)!==((n=e.entity)==null?void 0:n.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=r.entity)==null?void 0:a.type)===i.DefinitionEntity){if(((s=r.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-definition-entities"};const v=nO(r.entity,e.entity);return{compatible:v,type:v?"compatible-definition-entities":"incompatible-definition-entities"}}return((l=r.entity)==null?void 0:l.type)===i.PrimitiveEntity?((p=r.entity)==null?void 0:p.id)===((u=e.entity)==null?void 0:u.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=r.entity)==null?void 0:h.type)===i.BuiltInBaseEntity?((f=r.entity)==null?void 0:f.id)===((R=e.entity)==null?void 0:R.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function R7(r){const e=r.project.builtInBaseEntities.find(a=>a.id===U.EXECUTION),t={id:r.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},n=b(t,r.project);return n.inferred=!0,n.sync(t),n.setParent(r),n.entity=e,n}function rO(r){return r.dataType?r.dataType:null}function Cu(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved?e:r.readsValue?gn(r.readsValue):null}function wu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved?r.dataType:r.readsValue?gn(r.readsValue):null}function iO(r){return gn(r.declaration)}function aO(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function Bu(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function sO(r){return(r==null?void 0:r.dataType)||null}function oO(r){return(r==null?void 0:r.dataType)||null}function gn(r){switch(r.type){case i.VariableDeclaration:return aO(r);case i.ArgumentDeclaration:return rO(r);case i.ReturnDeclaration:return wu(r);case i.VariableInstance:return iO(r);case i.InputMap:return Cu(r);case i.OutputMap:return Bu(r);case i.Property:return sO(r);case i.ValueDescriptor:return oO(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Yo(r){switch(r.type){case i.ArgumentDeclaration:return r.getDataType();case i.InputMap:return r.getDataType();case i.VariableDeclaration:return r.getDataType();case i.VariableInstance:return r.getDataType();case i.OutputMap:return r.getDataType();case i.ReturnDeclaration:return r.getDataType();case i.Property:return r.getDataType();case i.ValueDescriptor:return r.getDataType();default:return null}}function S(r){if(r){let e=null;return typeof r=="string"?e=r:r.entityId?e=r.entityId:r.type!==i.GenericReference&&(e=r.id),e}return null}function Ur(r){return r.declaration||r}function g7(r){return r.type===i.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function Mu(r,e){const t=[];if(r.type===i.Project)t.push(...r.variableDeclarations);else{const a=Pt(Ue(r)).filter(s=>s.type===i.VariableDeclaration);t.push(...a),r.parent&&(pt.includes(r.parent.type)||r.parent.type===i.Project)&&t.push(...Mu(r.parent))}return t}function b7(r){return r.split(/[\s-]+/).filter(n=>n.length>0).map((n,a)=>a===0?n.toLowerCase():n[0].toUpperCase()+n.slice(1).toLowerCase()).join("")}function v7(r){return r.split(/[\s-]+/).filter(n=>n.length>0).map(n=>n[0].toUpperCase()+n.slice(1).toLowerCase()).join("")}function lO(r){var e;return(e=r.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:e.map(t=>t.toLowerCase()).join("-")}function Ho(r){return lO(r).toLowerCase()}function Ka(r){var e,t;if(!r)return"Any data type";if(!r.entity){const n=r.isList;if(!((e=r.andChildrenGroup)!=null&&e.length)&&!((t=r.orChildrenGroup)!=null&&t.length))return n?"List of an any data type":"Any data type";let a="",s=!1,o=!1;return(r.andChildrenGroup||[]).forEach(l=>{const p=Ka(l),u=Wo(p);s&&(a+=" and "),l.isGroup?a+="("+u+")":s?a+=u:a+=p,s=!0,o=!0}),(r.orChildrenGroup||[]).forEach(l=>{const p=Ka(l),u=Wo(p);s&&(o&&(a+=","),a+=" or "),l.isGroup?a+="("+u+")":s?a+=u:a+=p,s=!0}),a}if(r.entity.type===i.PrimitiveEntity){let n=r.entity.name;switch(r.entity.name){case C.String:n="Text";break;case C.KeyValue:n="Data structure";break}return r.isList?`List of ${n}s`:`${n.slice(0,1).toUpperCase()}${n.slice(1)}`}else if(r.entity.type===i.DefinitionEntity){const n=w(r.entity,r.project);return r.isList?`List of ${n} entities`:n.slice(0,1).toUpperCase()+n.slice(1)}else if(r.entity.type===i.BuiltInBaseEntity){const n=cO(r.entity);return r.isList?`List of ${n} entities`:n.slice(0,1).toUpperCase()+n.slice(1)}else return r.isList?`List of ${r.entity.name} entities`:`${r.entity.name.slice(0,1).toUpperCase()+r.entity.name.slice(1)} entity`}function I7(r){if(!r)return"Any data type";const e=r.getDataType();return Ka(e)}function zo(r){switch(r.declaration.id){case qe.Equal:return"is equal to";case qe.NotEqual:return"is not equal to";case qe.MoreThan:return"is greater than";case qe.MoreThanOrEqual:return"is greater than or equal to";case qe.LessThan:return"is less than";case qe.LessThanOrEqual:return"is less than or equal to";case qe.And:return"and";case qe.Or:return"or";case Jt.Empty:return"is empty";case Jt.NotEmpty:return"is not empty"}}function dO(r){return r.includes(U.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(U.PERSISTED_ENTITY)?"Persisted entity":r.includes(U.CRON_JOB)?"Scheduled execution":r.includes(U.RELATIONAL_DATABASE)?"Relational database":"Entity"}function cO(r){switch(r.name){case U.HTTP_ENDPOINT:return"HTTP endpoint";case U.PERSISTED_ENTITY:return"Persisted entity";case U.CRON_JOB:return"Scheduled execution";case U.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function D7(r){const e=op(r);if(!e){const t=sp(r);return t.includes(U.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(U.PERSISTED_ENTITY)?"Persisted entity":t.includes(U.CRON_JOB)?"Scheduled execution":t.includes(U.RELATIONAL_DATABASE)?"Relational database":w(r,r.project)+" entity"}return w(e,r.project)+" entity"}function uO(r){let e="Find ";return r.outputsDeclarations.forEach((t,n)=>{const a=Yo(t),s=Wo(a&&a.entity?w(a.entity,r.project):"unstructured data");n===0?e+=`${s} `:n===r.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function pO(r){switch(r.name){case C.String:return"Text";case C.Number:return"Number";case C.Boolean:return"Boolean";case C.KeyValue:return"Data structure";case C.UUID:return"Unique identifier";case C.Date:return"Date";case C.EntityTemplate:return"Entity as template";case C.Enum:return"Enumeration";case C.File:return"File";case C.Null:return"Empty";case C.ActionDescriptor:return"Action descriptor";case C.Untyped:return"Untyped";default:return r.name}}function yO(r){switch(r.id){case k.List:return"Loop over list items";case k.ManualFlow:return"Manual flow control loop";case k.ObjectKeys:return"Loop over object keys";case k.ObjectValues:return"Loop over object values";case k.Counted:return"Loop given number of times";case k.String:return"Loop over text characters";case Ge.Addition:return"Sum numbers";case Ge.Subtraction:return"Subtract numbers";case Ge.Multiplication:return"Multiply numbers";case Ge.Division:return"Divide numbers";case Ge.Remainder:return"Get remainder of numbers";case Ge.Exponentiation:return"Get exponent of numbers";case re.AddIndex:return"Add at index position";case re.DeleteFirst:return"Delete first character";case re.DeleteLast:return"Delete last character";case re.DeleteIndex:return"Delete at index position";case re.Join:return"Join texts";case re.ReplaceAllMatches:return"Replace all matches";case re.ReplaceFirst:return"Replace first match";case re.ReplaceLast:return"Replace last match";case re.Split:return"Split text";case re.ReplaceIndex:return"Replace at index position";case re.ReplaceSingleMatch:return"Replace single match";case re.GetFirst:return"Get first character";case re.GetLast:return"Get last character";case re.GetIndex:return"Get at index position";case re.Append:return"Add at the end";case re.Prepend:return"Add at the start";case Ve.Wait:return"Wait";case Ve.Parallel:return"Run in parallel";case Ve.Sequential:return"Run in sequence";case dt.HttpRequest:return"HTTP request";case Ne.CreateNewInstance:return"Create new copy of entity";case X.AddIndex:return"Add item at index position";case X.DeleteFirst:return"Delete first item";case X.DeleteLast:return"Delete last item";case X.DeleteIndex:return"Delete item at index position";case X.Join:return"Join lists";case X.ReplaceAllMatches:return"Replace all matches";case X.ReplaceFirst:return"Replace first match";case X.ReplaceLast:return"Replace last match";case X.Split:return"Split list";case X.ReplaceIndex:return"Replace at index position";case X.ReplaceSingleMatch:return"Replace single match";case X.GetFirst:return"Get first item";case X.GetLast:return"Get last item";case X.GetIndex:return"Get item at index position";case X.Append:return"Add item at the end";case X.Prepend:return"Add item at the start";case Dn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function w(r,e){var t;if(i.FunctionDeclaration===r.type){const n=r.name;if(Object.values(Gt).includes(n))switch(n){case Gt.AbortExecution:return"Abort execution";case Gt.DeletePersistedEntity:return"Delete persisted entity";case Gt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Jo(r.type).replaceAll("-"," ")}return n}if(i.BuiltInBaseEntity===r.type)return dO([r.name]);if(Ep.includes(r.type)&&r.type!==i.ActionDescriptor)return r.name;switch(r.type){case i.Search:return uO(r);case i.Operation:case i.InternalCall:case i.Loop:const n=Lt(r.declaration,e);return w(n,e);case i.ActionDescriptor:return yO(r);case i.BreakStatement:const a=Lt(r.parent,e);return`Stop loop ${w(a,e)}`;case i.ContinueStatement:const s=Lt(r.parent,e);return`Execute next iteration of ${w(s,e)}`;case i.FunctionCall:return Lt(r.declaration,e).name;case i.Condition:{const l=r;if((t=r.inputs)!=null&&t.length){const p=w(l.inputs[0],l.project);if(l.inputs[1]){const u=l.inputs[1].declaration.name;return`If ${p} ${zo(l)} ${u}`}return`If ${p} ${zo(l)}`}else return`If ${zo(l)}`}case i.ReturnStatement:{const l=Lt(r.parent,e);return`Output of ${w(l,e)}`}case i.InputMap:if(r.declaration){const l=Lt(r.declaration,e);return w(l,e)||""}else return r.name||"";case i.VariableInstance:{const l=Lt(r.declaration,e);return w(l,e)||""}case i.OutputMap:if(r.declaration){const l=Lt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case i.PrimitiveEntity:case i.LiteralValue:return pO(r);default:return Jo(r.type).replaceAll("-"," ")}}function Zo(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=e.entities.filter(a=>a.name===r.name);return n.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in the project. Entity with id "${n[0].id}" has the same name.
|
|
37
37
|
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null})),t}function _u(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=r.parent?S(r.parent):null;let a=e;n&&(a=e.get(n));const s=[];a.type===i.DefinitionEntity?s.push(...a.methods.map(l=>l)):a.type===i.Project?s.push(...a.functions.map(l=>l)):a.type===i.Loop?a.body&&s.push(a.body):a.type===i.InstalledProject&&s.push(...a.functions.map(l=>l));const o=s.filter(l=>l.name===r.name);return o.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in ${a.type===i.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${o[0].id}" has the same name.
|
|
38
38
|
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null})),t}function Vu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=r.parent&&Lt(r.parent,e)||e;if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${r.parent}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const s=Mu(n).filter(o=>o.name===r.name);s.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in its scope or higher scopes. Entity with id "${s[0].id}" has the same name.
|
|
39
39
|
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}return t}function Nu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=S(r.parent);if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(n);if(!a)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const o=a.properties.filter(l=>l.name===r.name);o.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique among all properties in the parent entity. Entity with id "${o[0].id}" has the same name.
|
|
40
|
-
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}}return t}function Lu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=S(r.parent);if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(n);if(!a)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const o=
|
|
41
|
-
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}}return t}function Gu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=S(r.parent);if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(n);if(!a)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const o=
|
|
40
|
+
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}}return t}function Lu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=S(r.parent);if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(n);if(!a)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const o=rp(a).filter(l=>l.name===r.name);o.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique among all inputs declared in the parent entity. Entity with id "${o[0].id}" has the same name.
|
|
41
|
+
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}}return t}function Gu(r,e){const t=[];r.name||t.push(new g({id:`${r.id}--${B.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:E.Error,code:B.EmptyName,issue:null}));const n=S(r.parent);if(!n)t.push(new g({id:`${r.id}--parent-reference--${T.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(n);if(!a)t.push(new g({id:`${r.id}--parent-reference--${T.ReferencedEntityNotFound}`,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null}));else{const o=gP(a).filter(l=>l.name===r.name);o.length&&t.push(new g({id:`${r.id}--${B.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique among all outputs declared in the parent entity. Entity with id "${o[0].id}" has the same name.
|
|
42
42
|
Please provide a unique 'name' string.`,severity:E.Error,code:B.NameNotUniqueInScope,issue:null}))}}return t}function S7(r,e){switch(r.type){case i.DefinitionEntity:return Zo(r,e);case i.FunctionDeclaration:return _u(r,e);case i.VariableDeclaration:return Vu(r,e);case i.Property:return Nu(r,e);case i.ArgumentDeclaration:return Lu(r,e);case i.ReturnDeclaration:return Gu(r,e);default:return[]}}function de(r,e,t){const a=`${Ho(r)}-${e}-id`;return t.instances[a]?M.UUID.uuid():a}function $u(r,e){let t="",n=null;if(r.parent){const s=e.get(r.parent);s&&(n=s)}let a="";return n&&(a=`${Ho(w(n,e))}-`),t=`${a}${Ho(w(r,e))}-id`,e.instances[t]?M.UUID.uuid():t}function Ye(r,e,t="uuid"){return t==="semantic"?de(w(r,e),r.type,e):M.UUID.uuid()}function O7(r){var o;const e=Y9(),t=r.toJSON();e.safeParse(t).success;const a=P7(r);(o=r.dataType)==null||o.validate();const s=[...a];if(r.id==="80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"){const l=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(r,r.project)}" with id "${r.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return s}function P7(r){const e=[];if(!r.implements)return e;const t=r.implements;if(!t.abstract){const a=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(t,r.project)}" with id "${t.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});e.push(a.error)}if(r.static&&!t.static){const a=Q({id:`${r.id}--${G.NonStaticPropertyImplementsStatic}`,message:`Static property "${w(r,r.project)}" with id "${r.id}" implements a non-static property "${w(t,r.project)}" with id "${t.id}".`,issue:null,severity:E.Error,code:G.NonStaticPropertyImplementsStatic,entity:r});e.push(a.error)}if(!r.static&&t.static){const a=Q({id:`${r.id}--${G.StaticPropertyImplementsNonStatic}`,message:`Non-static property "${w(r,r.project)}" with id "${r.id}" implements a static property "${w(t,r.project)}" with id "${t.id}".`,issue:null,severity:E.Error,code:G.StaticPropertyImplementsNonStatic,entity:r});e.push(a.error)}if(!Zt(r.dataType,t.dataType)){const a=Q({id:`${r.id}--${G.PropertyImplementsIncompatibleType}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a property "${w(t,r.project)}" with id "${t.id}" that has an incompatible data type.`,issue:null,severity:E.Error,code:G.PropertyImplementsIncompatibleType,entity:r});e.push(a.error)}return Be(r.errors,e)}function A7(r,e){const t=[];if(r.parent){const a=e.get(r.parent);if(!a)t.push(new g({id:`${r.id}--${r.parent}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${r.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}));else{const s=pr(a);if(s){const o=a!==s?`The entity of type '${r.type}' with id '${r.id}' have 'parent' with id '${r.parent}' because the entity belongs to a built-in '${s.type}' entity with id '${s.id}' (${w(s,a.project)}) higher up in the tree.`:`The entity of type '${r.type}' with id '${r.id}' have 'parent' with id '${r.parent}' because it is a built-in entity of type ${s.type}.`;t.push(new g({id:`${r.id}--${T.InvalidBuiltInEntityReference}`,code:T.InvalidBuiltInEntityReference,severity:E.Error,message:o,issue:null}))}else if(![i.DefinitionEntity].includes(a.type))t.push(new g({id:`${r.id}--${r.parent}--${T.InvalidParentReference}`,code:T.InvalidParentReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a parent reference that isn't pointing to an entity of type 'definition-entity'.`,issue:null}));else{const l=ur(a).filter(p=>!p.interactive);if(l.length){let p=l.length>1?`The entity of type '${r.type}' with id '${r.id}' can't be added to the 'parent' entity with id '${a.id}' because it extends or implements multiple '${i.BuiltInBaseEntity}' entities that are non-interactive ("${q(l.map(u=>w(u,u.project)),'", "','" and "')}").`:`The entity of type '${r.type}' with id '${r.id}' can't be added to the 'parent' entity with id '${a.id}' because it extends or implements a '${i.BuiltInBaseEntity}' entity that is non-interactive ("${w(l[0],l[0].project)}").`;p+=`
|
|
43
43
|
${dr}`,t.push(new g({id:`${r.id}--${T.NonInteractiveEntityReferenced}`,code:T.NonInteractiveEntityReferenced,severity:E.Error,message:p,issue:null}))}else if(r.implements){const p=e.get(r.implements);if(r.id===r.implements)return t.push(new g({id:`${r.id}--${r.implements}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at 'implements'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null})),t;if(!p)t.push(new g({id:`${r.id}--${r.implements}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${r.implements}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}));else{const u=a.properties.find(h=>{var f;return((f=h.implements)==null?void 0:f.id)===r.implements});u?t.push(new g({id:`${r.id}--${B.PropertyOverwrite}`,code:B.PropertyOverwrite,severity:E.Error,message:`The property with id "${r.id}" is trying to implement the property with id "${r.implements}", but the parent entity already has a property with id '${u.id}' that implements the same base property.`,issue:null})):[i.Property].includes(p.type)?p.abstract||t.push(new g({id:`${r.id}--${r.implements}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new g({id:`${r.id}--${r.implements}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an entity of type 'property'.`,issue:null}))}}}}}const n=tt(r,{},e);return t.push(...n.errors),t}const ce=class ce{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"private");c(this,"abstract");c(this,"index");c(this,"static");c(this,"required");c(this,"constant",!1);c(this,"type",i.Property);c(this,"hidden",!1);c(this,"defaultValue",null);c(this,"dataType",null);c(this,"implements",null);c(this,"project");c(this,"errors",[]);c(this,"parent");c(this,"initialized",!1);c(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.private=e.private,this.abstract=e.abstract,this.index=e.index,this.static=e.static,this.required=e.required||!1,this.hidden=e.hidden||!1,this.constant=e.constant||!1}static fromGenerationTarget(e,t){const n=S(e.parent),a=t.get(n);let s=null;if(e.implements){const p=S(e.implements);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:i.Property,index:a.properties.length,private:e.private||!1,abstract:e.abstract||!1,static:e.static||!1,required:e.required||!1,constant:e.constant||!1,hidden:!1,description:e.description,defaultValue:null,implements:s,dataType:null,parent:a},l=b(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=A7(n,t),o=Nu(n,t);return a.push(...s,...o,...je(n)),{errors:a,modifiedData:n}}get isExtendedProperty(){const e=this.parent.allBasePropertiesFromExtendedAndImplementedEntities.find(t=>t.name===this.name);return!!e&&e.id!==this.id&&!e.abstract}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
|
|
44
44
|
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`,issue:null})),(e.readsValue||e.writesValue)&&t.push(new g({id:`${this.id}--${B.InvalidObjectStructure}`,code:B.InvalidObjectStructure,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' is not a value reading or writing entity.
|
|
@@ -57,7 +57,7 @@ ${dr}`,issue:null}))}}}const o=n.parent&&t.get(n.parent)||t.getBuiltIn(n.parent)
|
|
|
57
57
|
The entitities of type '${q(h,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property so no 'parentRelationType' is needed.`,issue:null})),o.dataType)){const f=(p=o.dataType)==null?void 0:p.id;a.push(new g({id:`${e.id}--${T.NewEntityWouldOverriteExisting}`,code:T.NewEntityWouldOverriteExisting,severity:E.Error,message:`The entity with id '${e.id}' and type '${e.type}', cannot be added as a child to the entity with id '${n.parent}' and type '${u}', because it already has a 'data-type' child with id '${f}'.
|
|
58
58
|
The entitities of type '${q(h,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property. You can inspect the existing data-type entity with the 'describe_entity' action. Like so:
|
|
59
59
|
${bn({describe_entity:f})}
|
|
60
|
-
Alternatively you can update the entity with 'update' action. Or replace it by first removing it and then creating a new one.`,issue:null}))}u===i.DataType&&(!n.parentRelationType||!(n.parentRelationType===et.AndDataTypeGroup||n.parentRelationType===et.OrDataTypeGroup))&&a.push(new g({id:`${e.id}--${T.InvalidParentRelationType}`,code:T.InvalidParentRelationType,severity:E.Error,message:`The entity with id '${e.id}' and type '${e.type}', must have a 'parentRelationType' property set to either 'or-data-type-group' or 'and-data-type-group' when being added as a child to an entity of type 'data-type'.`,issue:null}))}return{errors:a,modifiedData:n}}get isGroup(){const e=[...this.andChildrenGroup||[],...this.orChildrenGroup||[]];if(e.length>1){let t=0;for(const n of e)if(n.isResolved&&(t++,t>1))return!0}return!1}get isResolved(){return[i.BuiltInBaseEntity,i.ActionDescriptor].includes(this.parent.type)||pr(this.parent)?!0:!(!this.entity&&!this.isGroup)}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.entity){const a=S(this.initialData.entity),s=this.project.get(a);s&&(s.type===i.DefinitionEntity&&s.parent===this||(this.setEntity(s),e.push(s)))}return{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.parent.type===i.DataType?this.parentRelationType===et.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===et.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.setDataType(this),e.push(this.parent),{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}removeChildGroup(e){if(this.andChildrenGroup){const t=this.andChildrenGroup.findIndex(n=>n.id===e.id);t!==-1&&this.andChildrenGroup.splice(t,1)}if(this.orChildrenGroup){const t=this.orChildrenGroup.findIndex(n=>n.id===e.id);t!==-1&&this.orChildrenGroup.splice(t,1)}return this}initChildren(){var e,t;if(this.initialized)return this;if(this.initialized=!0,this.initialData.entity)if(this.initialData.entity.type===i.GenericReference){const n=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=n}else this.entity=b(this.initialData.entity,this.project),((t=(e=this.initialData.entity)==null?void 0:e.parent)==null?void 0:t.id)===this.id&&this.entity.setParent(this),this.entity.type===i.DefinitionEntity&&this.entity.initChildren();return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a})),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a})),this.afterAllChildrenInitialized(),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.options=e.options||this.options,this.parentRelationType=e.parentRelationType||this.parentRelationType,this.isList=e.isList!==void 0?e.isList:this.isList,this.inferred=e.inferred!==void 0?e.inferred:this.inferred,this.like=e.like!==void 0?e.like:this.like,this.asType=e.asType!==void 0?e.asType:this.asType,this.implementationChooseOne=e.implementationChooseOne!==void 0?e.implementationChooseOne:this.implementationChooseOne,this}async load(e=V){return await pe.repository.load(this.id),this}async create(e=V){return await pe.repository.create(this.toShallowJSON()),this}async update(e=V){return await pe.repository.update(this.toShallowJSON()),this}async delete(e=V){return await pe.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}if(!e){this.parent.type===i.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===i.DataType){if(this.parentRelationType===et.AndDataTypeGroup){if(Array.isArray(s.andChildrenGroup)){const o=s.andChildrenGroup.findIndex(l=>l.id===this.id);o!==-1&&s.andChildrenGroup.splice(o,1)}}else if(this.parentRelationType===et.OrDataTypeGroup&&Array.isArray(s.orChildrenGroup)){const o=s.orChildrenGroup.findIndex(l=>l.id===this.id);o!==-1&&s.orChildrenGroup.splice(o,1)}}else this.parent.removeDataType();n.push(s)}return{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:n}=this.entity.restore({seenEntities:e});t.push(...n)}if(this.parent.type===i.DataType){const n=this.parent;Array.isArray(n.andChildrenGroup)&&n.andChildrenGroup.push(this)}if(this.parent.type===i.DataType){const n=this.parent;this.parentRelationType===et.AndDataTypeGroup?Array.isArray(n.andChildrenGroup)&&n.andChildrenGroup.push(this):this.parentRelationType===et.OrDataTypeGroup&&Array.isArray(n.orChildrenGroup)&&n.orChildrenGroup.push(this)}else{const n=this.parent;n.setDataType(this),t.push(n)}return{affected:t,self:this}}toFlat(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this,...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlat(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlat(e)))||[],...((s=this.entity)==null?void 0:s.toFlat(e))||[]])}toFlatIds(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlatIds(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatIds(e)))||[],...((s=this.entity)==null?void 0:s.toFlatIds(e))||[]])}toJSON(e=new Set){var t,n,a,s;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,options:this.options,isList:this.isList,asType:this.asType,like:this.like,inferred:this.inferred,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(o=>o.toJSON(e)))||null,orChildrenGroup:((n=this.orChildrenGroup)==null?void 0:n.map(o=>o.toJSON(e)))||null,entity:((a=this.entity)==null?void 0:a.parent)===this?this.entity.toJSON(e):((s=this.entity)==null?void 0:s.toReference())||null,parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l,p,u,h,f;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,options:this.options,isList:this.isList,asType:this.asType,like:this.like,inferred:this.inferred,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((p=this.andChildrenGroup)==null?void 0:p.map(R=>R.toJSONClone({...e,newId:null})))||null,orChildrenGroup:((u=this.orChildrenGroup)==null?void 0:u.map(R=>R.toJSONClone({...e,newId:null})))||null,entity:((h=this.entity)==null?void 0:h.parent)===this?this.entity.toJSONClone({...e,newId:null}):((f=this.entity)==null?void 0:f.toReference({seenEntityMaps:e.seenEntityMaps}))||null,parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s,o;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,isList:this.isList,options:this.options,asType:this.asType,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((a=this.andChildrenGroup)==null?void 0:a.map(l=>l.toReference(e)))||null,orChildrenGroup:((s=this.orChildrenGroup)==null?void 0:s.map(l=>l.toReference(e)))||null,entity:((o=this.entity)==null?void 0:o.toReference(e))||null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlatJSON(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatJSON(e)))||[],...((s=this.entity)==null?void 0:s.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,type:this.type,options:this.options,isList:this.isList,like:this.like,parentRelationType:this.parentRelationType,asType:this.asType,entity:((e=this.entity)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var n,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((n=this.andChildrenGroup)==null?void 0:n.flatMap(s=>s.toFlatGenerationTarget(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(s=>s.toFlatGenerationTarget(e)))||[],...this.entity&&this.entity.type==i.DefinitionEntity&&this.entity.parent===this&&this.entity.toFlatGenerationTarget(e)||[]])}clearErrors(){var e,t,n;return this.errors=[],(e=this.andChildrenGroup)==null||e.forEach(a=>a.clearErrors()),(t=this.orChildrenGroup)==null||t.forEach(a=>a.clearErrors()),this.inferred&&((n=this.entity)==null||n.clearErrors()),this}validate(){const e=M7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var v,I,D;let a=He(e,this),s=e||this.parent;const o=t||de(Ka(this),i.DataType,a),l=o.split("-id"),p=l[l.length-1||0]||o,u={id:o,version:1,type:i.DataType,isList:this.isList,asType:this.asType,options:this.options,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:null,orChildrenGroup:null,entity:null,parent:s.toReference()},h=ke(u,a);e&&h.setParent(e),n&&h.subscribe(),h.initChildren();const f=(v=this.andChildrenGroup)==null?void 0:v.map((O,$)=>O.clone(h,p+"-and-group-data-type-"+$+"-id",n)),R=(I=this.orChildrenGroup)==null?void 0:I.map((O,$)=>O.clone(h,p+"-or-group-data-type-"+$+"-id",n));if(h.andChildrenGroup=f||null,h.orChildrenGroup=R||null,this.entity&&this.entity.type===i.DefinitionEntity&&((D=this.entity)==null?void 0:D.parent)===this){const O=this.entity.clone(h,p+"-inferred-entity-id",n);h.setEntity(O)}else this.entity&&h.setEntity(this.entity);return h}merge(e){const t=[],n=[],a=[];if(this.asType!==(e==null?void 0:e.asType)&&(this.sync({asType:e==null?void 0:e.asType}),t.push(this)),this.isList!==!(e!=null&&e.isList)&&(this.sync({isList:e==null?void 0:e.isList}),t.push(this)),this.like!==(e==null?void 0:e.like)&&(this.sync({like:e==null?void 0:e.like}),t.push(this)),e!=null&&e.inferred){if(e.entity&&e.entity.type===i.DefinitionEntity&&e.entity.parent===e){const s=e.entity.clone(this,this.id+"--"+M.UUID.uuid()+"--inferred-entity-id",!0);this.setEntity(s),n.push(s)}else e.entity&&(this.setEntity(e.entity),t.push(this));this.inferred||(this.sync({inferred:!0}),t.push(this))}else if(this.inferred){if(this.sync({inferred:!1}),t.push(this),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:new Set});a.push(...o),s.push(...s)}e.entity!==this.entity&&(this.setEntity(e.entity),t.push(this))}else e.entity!==this.entity&&(this.setEntity(e.entity),t.push(this));return{updated:m(t),added:m(n),removed:m(a),self:this}}addToAndGroup(e){return this.andChildrenGroup||(this.andChildrenGroup=[]),this.andChildrenGroup.includes(e)||this.andChildrenGroup.push(e),this}addToOrGroup(e){return this.orChildrenGroup||(this.orChildrenGroup=[]),this.orChildrenGroup.includes(e)||this.orChildrenGroup.push(e),this}setEntity(e){return this.entity=e,this}isObject(){return!!this.entity&&(this.entity.type===i.DefinitionEntity||this.entity.name===C.KeyValue)}hasStrictObjectStructure(){var e;return this.isObject()&&((e=this.entity)==null?void 0:e.type)===i.DefinitionEntity}inferFromInputs(e){var t;if(!this.inferred)return this;if(!this.entity&&e.length){const n={id:this.id+"--"+M.UUID.uuid()+"--infered-entity",type:i.DefinitionEntity,version:1,name:w(this.parent,this.project)+" data type definition",description:((t=this.parent)==null?void 0:t.description)||null,static:!0,abstract:!1,properties:[],methods:[],extends:[],implements:[],abstractMethods:[],x:0,y:0,parent:this.toReference()},a=b(n,this.project);a.setParent(this),a.initChildren(),a.sync(n),this.setEntity(a)}return this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent!==this&&this.entity.setParent(this),this.entity&&this.entity.inferFromInputs(e),this.like||this.sync({like:!0}),this}};c(pe,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(pe,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),c(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"inferred"]),c(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),c(pe,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),c(pe,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),c(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let ki=pe;function V7(r){var l;const e=Z6(),t=r.toJSON();e.safeParse(t).success;const a=N7(r),s=kn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(r,r.project)}" with id "${r.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});o.push(p.error)}return r.outputs.forEach(p=>p.validate()),(l=r.error)==null||l.validate(),Be(r.errors,o)}function N7(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),Be(r.errors,e)}const ye=class ye{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",i.Operation);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"process",null);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"error",null);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let n=t;if(e.parent){const f=S(e.parent);n=t.get(f)}const a=S(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const R=S(f);return t.get(R)}),l=e.calledBySuccess.map(f=>{const R=S(f);return t.get(R)}),p=e.calledByError.map(f=>{const R=S(f);return t.get(R)}),u={id:e.id,version:1,type:i.Operation,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:n},h=b(u,t);return h.setParent(n),h.initChildren(),h}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[...pt,i.Project],optional:!0}},t);n=s.modifiedData,a.push(...s.errors,...je(n));const o=S(n.declaration);if(o){const l=IO(o,t);a.push(...l)}else{const l=`
|
|
60
|
+
Alternatively you can update the entity with 'update' action. Or replace it by first removing it and then creating a new one.`,issue:null}))}u===i.DataType&&(!n.parentRelationType||!(n.parentRelationType===et.AndDataTypeGroup||n.parentRelationType===et.OrDataTypeGroup))&&a.push(new g({id:`${e.id}--${T.InvalidParentRelationType}`,code:T.InvalidParentRelationType,severity:E.Error,message:`The entity with id '${e.id}' and type '${e.type}', must have a 'parentRelationType' property set to either 'or-data-type-group' or 'and-data-type-group' when being added as a child to an entity of type 'data-type'.`,issue:null}))}return{errors:a,modifiedData:n}}get isGroup(){const e=[...this.andChildrenGroup||[],...this.orChildrenGroup||[]];if(e.length>1){let t=0;for(const n of e)if(n.isResolved&&(t++,t>1))return!0}return!1}get isResolved(){return[i.BuiltInBaseEntity,i.ActionDescriptor].includes(this.parent.type)||pr(this.parent)?!0:!(!this.entity&&!this.isGroup)}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.entity){const a=S(this.initialData.entity),s=this.project.get(a);s&&(s.type===i.DefinitionEntity&&s.parent===this||(this.setEntity(s),e.push(s)))}return{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.parent.type===i.DataType?this.parentRelationType===et.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===et.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.setDataType(this),e.push(this.parent),{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}removeChildGroup(e){if(this.andChildrenGroup){const t=this.andChildrenGroup.findIndex(n=>n.id===e.id);t!==-1&&this.andChildrenGroup.splice(t,1)}if(this.orChildrenGroup){const t=this.orChildrenGroup.findIndex(n=>n.id===e.id);t!==-1&&this.orChildrenGroup.splice(t,1)}return this}initChildren(){var e,t;if(this.initialized)return this;if(this.initialized=!0,this.initialData.entity)if(this.initialData.entity.type===i.GenericReference){const n=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=n}else this.entity=b(this.initialData.entity,this.project),((t=(e=this.initialData.entity)==null?void 0:e.parent)==null?void 0:t.id)===this.id&&this.entity.setParent(this),this.entity.type===i.DefinitionEntity&&this.entity.initChildren();return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a})),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a})),this.afterAllChildrenInitialized(),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.options=e.options||this.options,this.parentRelationType=e.parentRelationType||this.parentRelationType,this.isList=e.isList!==void 0?e.isList:this.isList,this.inferred=e.inferred!==void 0?e.inferred:this.inferred,this.like=e.like!==void 0?e.like:this.like,this.asType=e.asType!==void 0?e.asType:this.asType,this.implementationChooseOne=e.implementationChooseOne!==void 0?e.implementationChooseOne:this.implementationChooseOne,this}async load(e=V){return await pe.repository.load(this.id),this}async create(e=V){return await pe.repository.create(this.toShallowJSON()),this}async update(e=V){return await pe.repository.update(this.toShallowJSON()),this}async delete(e=V){return await pe.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}if(!e){this.parent.type===i.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===i.DataType){if(this.parentRelationType===et.AndDataTypeGroup){if(Array.isArray(s.andChildrenGroup)){const o=s.andChildrenGroup.findIndex(l=>l.id===this.id);o!==-1&&s.andChildrenGroup.splice(o,1)}}else if(this.parentRelationType===et.OrDataTypeGroup&&Array.isArray(s.orChildrenGroup)){const o=s.orChildrenGroup.findIndex(l=>l.id===this.id);o!==-1&&s.orChildrenGroup.splice(o,1)}}else this.parent.removeDataType();n.push(s)}return{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:n}=this.entity.restore({seenEntities:e});t.push(...n)}if(this.parent.type===i.DataType){const n=this.parent;Array.isArray(n.andChildrenGroup)&&n.andChildrenGroup.push(this)}if(this.parent.type===i.DataType){const n=this.parent;this.parentRelationType===et.AndDataTypeGroup?Array.isArray(n.andChildrenGroup)&&n.andChildrenGroup.push(this):this.parentRelationType===et.OrDataTypeGroup&&Array.isArray(n.orChildrenGroup)&&n.orChildrenGroup.push(this)}else{const n=this.parent;n.setDataType(this),t.push(n)}return{affected:t,self:this}}toFlat(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this,...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlat(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlat(e)))||[],...((s=this.entity)==null?void 0:s.toFlat(e))||[]])}toFlatIds(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlatIds(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatIds(e)))||[],...((s=this.entity)==null?void 0:s.toFlatIds(e))||[]])}toJSON(e=new Set){var t,n,a,s;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,options:this.options,isList:this.isList,asType:this.asType,like:this.like,inferred:this.inferred,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(o=>o.toJSON(e)))||null,orChildrenGroup:((n=this.orChildrenGroup)==null?void 0:n.map(o=>o.toJSON(e)))||null,entity:((a=this.entity)==null?void 0:a.parent)===this?this.entity.toJSON(e):((s=this.entity)==null?void 0:s.toReference())||null,parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l,p,u,h,f;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,options:this.options,isList:this.isList,asType:this.asType,like:this.like,inferred:this.inferred,parentRelationType:this.parentRelationType,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((p=this.andChildrenGroup)==null?void 0:p.map(R=>R.toJSONClone({...e,newId:null})))||null,orChildrenGroup:((u=this.orChildrenGroup)==null?void 0:u.map(R=>R.toJSONClone({...e,newId:null})))||null,entity:((h=this.entity)==null?void 0:h.parent)===this?this.entity.toJSONClone({...e,newId:null}):((f=this.entity)==null?void 0:f.toReference({seenEntityMaps:e.seenEntityMaps}))||null,parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s,o;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,isList:this.isList,options:this.options,asType:this.asType,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:((a=this.andChildrenGroup)==null?void 0:a.map(l=>l.toReference(e)))||null,orChildrenGroup:((s=this.orChildrenGroup)==null?void 0:s.map(l=>l.toReference(e)))||null,entity:((o=this.entity)==null?void 0:o.toReference(e))||null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((n=this.andChildrenGroup)==null?void 0:n.flatMap(o=>o.toFlatJSON(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatJSON(e)))||[],...((s=this.entity)==null?void 0:s.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,type:this.type,options:this.options,isList:this.isList,like:this.like,parentRelationType:this.parentRelationType,asType:this.asType,entity:((e=this.entity)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var n,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((n=this.andChildrenGroup)==null?void 0:n.flatMap(s=>s.toFlatGenerationTarget(e)))||[],...((a=this.orChildrenGroup)==null?void 0:a.flatMap(s=>s.toFlatGenerationTarget(e)))||[],...this.entity&&this.entity.type==i.DefinitionEntity&&this.entity.parent===this&&this.entity.toFlatGenerationTarget(e)||[]])}clearErrors(){var e,t,n;return this.errors=[],(e=this.andChildrenGroup)==null||e.forEach(a=>a.clearErrors()),(t=this.orChildrenGroup)==null||t.forEach(a=>a.clearErrors()),this.inferred&&((n=this.entity)==null||n.clearErrors()),this}validate(){const e=M7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var v,I,D;let a=He(e,this),s=e||this.parent;const o=t||de(Ka(this),i.DataType,a),l=o.split("-id"),p=l[l.length-1||0]||o,u={id:o,version:1,type:i.DataType,isList:this.isList,asType:this.asType,options:this.options,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,implementationChooseOne:this.implementationChooseOne,andChildrenGroup:null,orChildrenGroup:null,entity:null,parent:s.toReference()},h=ke(u,a);e&&h.setParent(e),n&&h.subscribe(),h.initChildren();const f=(v=this.andChildrenGroup)==null?void 0:v.map((O,$)=>O.clone(h,p+"-and-group-data-type-"+$+"-id",n)),R=(I=this.orChildrenGroup)==null?void 0:I.map((O,$)=>O.clone(h,p+"-or-group-data-type-"+$+"-id",n));if(h.andChildrenGroup=f||null,h.orChildrenGroup=R||null,this.entity&&this.entity.type===i.DefinitionEntity&&((D=this.entity)==null?void 0:D.parent)===this){const O=this.entity.clone(h,p+"-inferred-entity-id",n);h.setEntity(O)}else this.entity&&h.setEntity(this.entity);return h}merge(e){const t=[],n=[],a=[];if(this.asType!==(e==null?void 0:e.asType)&&(this.sync({asType:e==null?void 0:e.asType}),t.push(this)),this.isList!==!(e!=null&&e.isList)&&(this.sync({isList:e==null?void 0:e.isList}),t.push(this)),this.like!==(e==null?void 0:e.like)&&(this.sync({like:e==null?void 0:e.like}),t.push(this)),e!=null&&e.inferred){if(e.entity&&e.entity.type===i.DefinitionEntity&&e.entity.parent===e){const s=e.entity.clone(this,this.id+"--"+M.UUID.uuid()+"--inferred-entity-id",!0);this.setEntity(s),n.push(s)}else e.entity&&(this.setEntity(e.entity),t.push(this));this.inferred||(this.sync({inferred:!0}),t.push(this))}else if(this.inferred){if(this.sync({inferred:!1}),t.push(this),this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:new Set});a.push(...o),s.push(...s)}e.entity!==this.entity&&(this.setEntity(e.entity),t.push(this))}else e.entity!==this.entity&&(this.setEntity(e.entity),t.push(this));return{updated:m(t),added:m(n),removed:m(a),self:this}}addToAndGroup(e){return this.andChildrenGroup||(this.andChildrenGroup=[]),this.andChildrenGroup.includes(e)||this.andChildrenGroup.push(e),this}addToOrGroup(e){return this.orChildrenGroup||(this.orChildrenGroup=[]),this.orChildrenGroup.includes(e)||this.orChildrenGroup.push(e),this}setEntity(e){return this.entity=e,this}isObject(){return!!this.entity&&(this.entity.type===i.DefinitionEntity||this.entity.name===C.KeyValue)}hasStrictObjectStructure(){var e;return this.isObject()&&((e=this.entity)==null?void 0:e.type)===i.DefinitionEntity}inferFromInputs(e){var t;if(!this.inferred)return this;if(!this.entity&&e.length){const n={id:this.id+"--"+M.UUID.uuid()+"--infered-entity",type:i.DefinitionEntity,version:1,name:w(this.parent,this.project)+" data type definition",description:((t=this.parent)==null?void 0:t.description)||null,static:!0,abstract:!1,properties:[],methods:[],extends:[],implements:[],abstractMethods:[],x:0,y:0,parent:this.toReference()},a=b(n,this.project);a.setParent(this),a.initChildren(),a.sync(n),this.setEntity(a)}return this.entity&&this.entity.type===i.DefinitionEntity&&this.entity.parent!==this&&this.entity.setParent(this),this.entity&&this.entity.inferFromInputs(e),this.like||this.sync({like:!0}),this}};c(pe,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(pe,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),c(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"inferred"]),c(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),c(pe,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),c(pe,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),c(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let ki=pe;function V7(r){var l;const e=Z6(),t=r.toJSON();e.safeParse(t).success;const a=N7(r),s=kn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(r,r.project)}" with id "${r.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});o.push(p.error)}return r.outputs.forEach(p=>p.validate()),(l=r.error)==null||l.validate(),Be(r.errors,o)}function N7(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),Be(r.errors,e)}const ye=class ye{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",i.Operation);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"process",null);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"error",null);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let n=t;if(e.parent){const f=S(e.parent);n=t.get(f)}const a=S(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const R=S(f);return t.get(R)}),l=e.calledBySuccess.map(f=>{const R=S(f);return t.get(R)}),p=e.calledByError.map(f=>{const R=S(f);return t.get(R)}),u={id:e.id,version:1,type:i.Operation,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:n},h=b(u,t);return h.setParent(n),h.initChildren(),h}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[...pt,i.Project],optional:!0}},t);n=s.modifiedData,a.push(...s.errors,...je(n));const o=S(n.declaration);if(o){const l=SO(o,t);a.push(...l)}else{const l=`
|
|
61
61
|
All built-in 'action-descriptor' entity ids are:
|
|
62
62
|
- ${t.operationDeclarations.map(p=>`${p.id} (${w(p,t)})`).join(`
|
|
63
63
|
- `)}.
|
|
@@ -95,7 +95,7 @@ ${$}`,issue:null}))}}}}return a.push(...s.errors,...o,...je(n)),{errors:a,modifi
|
|
|
95
95
|
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`,issue:null})),{errors:t,modifiedData:n}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.readsValue){const a=S(this.initialData.readsValue),s=this.project.get(a);s&&(this.setValueWriter(s),e.push(s))}if(this.initialData.implements){const a=S(this.initialData.implements),s=this.project.get(a);s&&(this.setImplements(s),e.push(s))}return qn.hydrateReadsValue(this),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){var a;const e=[this],t=[],n=[];return this.isError?this.parent.throws=this:this.parent.addOutputDeclaration(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),{updated:m(e),added:m(t),removed:m(n),self:this}}propagateChanges(){const e=[this],t=[],n=[];if(this.parent&&[i.BreakStatement,i.ContinueStatement].includes(this.parent.type)){const a=this.parent.parent,{updated:s,added:o,removed:l}=a.syncChildren();e.push(...s),t.push(...o),n.push(...l)}return{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}setImplements(e){return this.implements=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=b(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.dataType&&(this.dataType=b(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this.initialData.implements){const e=b(this.initialData.implements,this.project);this.implements=e}return qn.initReadsValue(this),this.afterAllChildrenInitialized(),this}setValueWriter(e){return this.readsValue=e,this}removeValueWriter(){return this.readsValue=null,this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.index=e.index||(e.index!==0?this.index:0),this.name=e.name||this.name,this.description=e.description||this.description,this.required=e.required||this.required,this.isError=e.isError||this.isError,this.constant=e.constant!==void 0?e.constant:this.constant,this.required=e.required!==void 0?e.required:this.required,this}async load(e=V){return await me.repository.load(this.id),this}async create(e=V){return await me.repository.create(this.toShallowJSON()),this}async update(e=V){return await me.repository.update(this.toShallowJSON()),this}async delete(e=V){return await me.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.defaultValue){const{affected:s,removed:o}=this.defaultValue.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}if(this.dataType){const s=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s.affected),a.push(...s.removed)}return{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.defaultValue){const{affected:n}=this.defaultValue.restore({seenEntities:e});t.push(...n)}if(this.dataType){const n=this.dataType.restore({seenEntities:e});t.push(...n.affected)}return{affected:[],self:this}}toFlat(e=new Set){var n,a,s;return e.has(this.id)?[]:(e.add(this.id),[this,...((n=this.defaultValue)==null?void 0:n.toFlat(e))||[],...((a=this.readsValue)==null?void 0:a.toFlat(e))||[],...((s=this.dataType)==null?void 0:s.toFlat(e))||[]])}toFlatIds(e=new Set){var n,a;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((n=this.defaultValue)==null?void 0:n.toFlatIds(e))||[],...((a=this.dataType)==null?void 0:a.toFlatIds(e))||[]])}toJSON(e=new Set){var t,n,a,s;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,constant:!0,isError:this.isError,defaultValue:((t=this.defaultValue)==null?void 0:t.toJSON(e))||null,dataType:((n=this.dataType)==null?void 0:n.toJSON(e))||null,implements:((a=this.implements)==null?void 0:a.toJSON(e))||null,readsValue:((s=this.readsValue)==null?void 0:s.toJSON(e))||null,parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l,p,u,h,f;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,constant:!0,isError:this.isError,defaultValue:((p=this.defaultValue)==null?void 0:p.toJSONClone({...e,newId:null}))||null,dataType:((u=this.dataType)==null?void 0:u.toJSONClone({...e,newId:null}))||null,implements:((h=this.implements)==null?void 0:h.toJSONClone({...e,newId:null}))||null,readsValue:((f=this.readsValue)==null?void 0:f.toReference({seenEntityMaps:e.seenEntityMaps}))||null,parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s,o,l;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,constant:!0,isError:this.isError,defaultValue:((a=this.defaultValue)==null?void 0:a.toReference(e))||null,readsValue:((s=this.readsValue)==null?void 0:s.toReference(e))||null,implements:((o=this.implements)==null?void 0:o.toReference(e))||null,dataType:((l=this.dataType)==null?void 0:l.toReference(e))||null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){var n,a;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((n=this.defaultValue)==null?void 0:n.toFlatJSON(e))||[],...((a=this.dataType)==null?void 0:a.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,isError:this.isError,readsValue:(e=this.readsValue)==null?void 0:e.id,required:this.required,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var n,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((n=this.defaultValue)==null?void 0:n.toFlatGenerationTarget(e))||[],...((a=this.dataType)==null?void 0:a.toFlatGenerationTarget(e))||[]])}clearErrors(){var e,t;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),(t=this.dataType)==null||t.clearErrors(),this}validate(){const e=x7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t,n;return[...this.errors,...((t=this.defaultValue)==null?void 0:t.getErrors())||[],...((n=this.dataType)==null?void 0:n.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){return this.defaultValue||null}setDefaultValue(e){return this.defaultValue=e,this}clone(e=null,t=null,n=!0){var R,v;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.ReturnDeclaration,a);s.dataType=null;const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(R=this.dataType)==null?void 0:R.clone(u,p+"--data-type-id",n);u.dataType=h||null;const f=(v=this.defaultValue)==null?void 0:v.clone(u,p+"-default-value-id",n);return u.defaultValue=f||null,u}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}inferDataType(){const e=wu(this);if(e){const t=e.clone(this);t&&(t.inferred=!0,this.setDataType(t))}return this}getCounterparts(){let e=[];if([i.BreakStatement,i.ContinueStatement].includes(this.parent.type)){const t=this.parent.parent;e=[...t.breakStatements,...t.continueStatements].flatMap(s=>s.outputs).filter(s=>w(s,this.project)===w(this,this.project)&&s.id!==this.id)}else if(this.parent.type===i.ReturnStatement&&[i.FunctionDeclaration,i.GlobalEvent].includes(this.parent.parent.type)&&this.parent.parent.implements){const n=this.parent.parent.returnStatements.flatMap(a=>a.outputs);this.implements?e=n.filter(s=>{var o;return this.implements.id===((o=s.implements)==null?void 0:o.id)}):e=n.filter(s=>w(s,this.project)===w(this,this.project)&&s.id!==this.id)}return e}inferDataTypeFromCounterparts(){var n,a;const e=this.getCounterparts(),t=e.find(s=>{var o;return(o=s.dataType)==null?void 0:o.isResolved});if(t)this.setDataType(t.dataType);else for(let s=0;s<e.length;s++){const o=e[s];if((!o.dataType||!o.dataType.isResolved||(n=o.dataType)!=null&&n.inferred)&&o.readsValue&&o.inferDataType(),(a=o.dataType)!=null&&a.isResolved){this.setDataType(o.dataType);break}}return this}getDataType(){var e;return(!this.dataType||!this.dataType.isResolved||(e=this.dataType)!=null&&e.inferred)&&this.readsValue?this.inferDataType():this.inferDataTypeFromCounterparts(),this.dataType}};c(me,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(me,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),c(me,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(me,"BASE_PROPERTIES",[...me.MUTABLE_BASE_PROPERTIES,...me.INMUTABLE_BASE_PROPERTIES]),c(me,"MUTABLE_META_PROPERTIES",[...me.MUTABLE_BASE_PROPERTIES,"index"]),c(me,"INMUTABLE_META_PROPERTIES",[...me.INMUTABLE_BASE_PROPERTIES]),c(me,"META_PROPERTIES",[...me.MUTABLE_META_PROPERTIES,...me.INMUTABLE_META_PROPERTIES]),c(me,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(me,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(me,"UPSTREAM_PROPERTIES",[...me.MUTABLE_UPSTREAM_PROPERTIES,...me.INMUTABLE_UPSTREAM_PROPERTIES]),c(me,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType","defaultValue"]),c(me,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(me,"DOWNSTREAM_PROPERTIES",[...me.MUTABLE_DOWNSTREAM_PROPERTIES,...me.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(me,"PROPERTIES",[...me.META_PROPERTIES,...me.UPSTREAM_PROPERTIES,...me.DOWNSTREAM_PROPERTIES]);let kt=me;function j7(r){var o;const e=$6(),t=r.toJSON();e.safeParse(t).success,r.inputsDeclarations.forEach(l=>l.validate()),r.inputs.forEach(l=>l.validate()),r.outputsDeclarations.forEach(l=>l.validate()),r.outputs.forEach(l=>l.validate()),(o=r.error)==null||o.validate();const s=[...kn(r)];if(r.id==="search-person-by-id-id"){const l=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(r,r.project)}" with id "${r.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return Be(r.errors,s)}const _e=class _e{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"query","");c(this,"type",i.Search);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"inputsDeclarations",[]);c(this,"inputs",[]);c(this,"outputsDeclarations",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"error",null);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y,this.name=e.name,this.query=e.query,this.description=e.description}static fromGenerationTarget(e,t){let n=t;if(e.parent){const u=S(e.parent);n=t.get(u)}const a=e.calledByEntry.map(u=>{const h=S(u);return t.get(h)}),s=e.calledBySuccess.map(u=>{const h=S(u);return t.get(h)}),o=e.calledByError.map(u=>{const h=S(u);return t.get(h)}),l={id:e.id,version:1,type:i.Search,name:e.name,description:e.description,query:e.query,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputsDeclarations:[],inputs:[],outputsDeclarations:[],outputs:[],error:null,x:0,y:0,parent:n},p=b(l,t);return p.setParent(n),p.initChildren(),p}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[...pt,i.Project],optional:!0}},t);return n=s.modifiedData,a.push(...s.errors,...je(n)),{errors:a,modifiedData:n}}get resultsAsList(){const e=this.outputsDeclarations[0];if(e){const t=e.getDataType();return t?t.isList===!0:!0}return!0}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
96
96
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
97
97
|
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addEntryCaller(o),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addSuccessCaller(o),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addErrorCaller(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];this.initialized=!0;const{updated:a,added:s,removed:o}=this.syncInputMaps();return e.push(...a),t.push(...s),n.push(...o),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.parent===this.project&&this.project.addSearch(this),this.successCalls.forEach(a=>{a.addSuccessCaller(this),e.push(a)}),this.errorCalls.forEach(a=>{a.addErrorCaller(this),e.push(a)}),this.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),this.calledBySuccess.forEach(a=>{a.addSuccessCall(this),e.push(a)}),this.calledByError.forEach(a=>{a.addErrorCall(this),e.push(a)}),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(a=>a.id===e.id);t>-1&&this.inputs.splice(t,1);const n=this.inputsDeclarations.findIndex(a=>{var s;return a.id===((s=e.declaration)==null?void 0:s.id)});return n>-1&&this.inputsDeclarations.splice(n,1),this}addInput(e){return this.inputs.includes(e)?this:(this.inputs.push(e),this)}addInputDeclaration(e){return this.inputsDeclarations.includes(e)?this:(this.inputsDeclarations.push(e),this.syncInputMaps(),this)}removeInputDeclaration(e){const t=this.inputsDeclarations.findIndex(n=>n.id===e.id);return t>-1&&this.inputsDeclarations.splice(t,1),this}addOutputDeclaration(e){return this.outputsDeclarations.includes(e)?this:(this.outputsDeclarations.push(e),this)}removeOutputDeclaration(e){const t=this.outputsDeclarations.findIndex(n=>n.id===e.id);return t>-1&&this.outputsDeclarations.splice(t,1),this}addOutput(e){return this.outputs.includes(e)?this:(this.outputs.push(e),this)}removeOutput(e){const t=this.outputs.findIndex(n=>n.id===e.id);return t>-1&&this.outputs.splice(t,1),this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.find(t=>t.id===e.id)||this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.find(t=>t.id===e.id)||this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const n=this.errorCalls.findIndex(a=>a.id===e.id);return n>-1&&this.errorCalls.splice(n,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.successCalls=this.initialData.successCalls.map(e=>{const t=b(e,this.project);return[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=b(e,this.project);return t.addErrorCaller(this),[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputsDeclarations=this.initialData.inputsDeclarations.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs=this.initialData.inputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputsDeclarations=this.initialData.outputsDeclarations.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=b(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.afterAllChildrenInitialized(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this.name=e.name||this.name,this.description=e.description||this.description,e.query!==void 0&&(this.query=e.query),this}async load(e=V){return await _e.repository.load(this.id),this}async create(e=V){return await _e.repository.create(this.toShallowJSON()),this}async update(e=V){return await _e.repository.update(this.toShallowJSON()),this}async delete(e=V){return await _e.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.inputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.outputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{n.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{n.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{n.push(s),s.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputsDeclarations.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.inputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.outputsDeclarations.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(n=>{t.push(n),n.addSuccessCaller(this)}),this.errorCalls.forEach(n=>{t.push(n),n.addErrorCaller(this)}),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(n=>n.toFlat(e)),...this.errorCalls.flatMap(n=>n.toFlat(e)),...this.inputs.flatMap(n=>n.toFlat(e)),...this.inputsDeclarations.flatMap(n=>n.toFlat(e)),...this.outputs.flatMap(n=>n.toFlat(e)),...this.outputsDeclarations.flatMap(n=>n.toFlat(e)),...this.calledBy.flatMap(n=>n.toFlat(e)),...this.error?this.error.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.successCalls.flatMap(n=>n.toFlatIds(e)),...this.errorCalls.flatMap(n=>n.toFlatIds(e)),...this.inputs.flatMap(n=>n.toFlatIds(e)),...this.inputsDeclarations.flatMap(n=>n.toFlatIds(e)),...this.outputs.flatMap(n=>n.toFlatIds(e)),...this.outputsDeclarations.flatMap(n=>n.toFlatIds(e)),...this.calledBy.flatMap(n=>n.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[]])}toJSON(e=new Set){var t;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,query:this.query,description:this.description,x:this.x,y:this.y,successCalls:this.successCalls.map(n=>n.toJSON()),errorCalls:this.errorCalls.map(n=>n.toJSON()),calledBySuccess:this.calledBySuccess.map(n=>n.toReference()),calledByError:this.calledByError.map(n=>n.toReference()),calledByEntry:this.calledByEntry.map(n=>n.toReference()),inputsDeclarations:this.inputsDeclarations.map(n=>n.toJSON()),inputs:this.inputs.map(n=>n.toJSON()),outputsDeclarations:this.outputsDeclarations.map(n=>n.toJSON()),outputs:this.outputs.map(n=>n.toJSON()),error:((t=this.error)==null?void 0:t.toJSON())||null,parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l,p;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:1,type:i.Search,name:this.name,query:this.query,description:this.description,x:this.x,y:this.y,successCalls:this.successCalls.map(u=>u.toJSONClone({...e,newId:null})),errorCalls:this.errorCalls.map(u=>u.toJSONClone({...e,newId:null})),calledBySuccess:this.calledBySuccess.map(u=>u.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(u=>u.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(u=>u.toReference({seenEntityMaps:e.seenEntityMaps})),inputsDeclarations:this.inputsDeclarations.map(u=>u.toJSONClone({...e,newId:null})),inputs:this.inputs.map(u=>u.toJSONClone({...e,newId:null})),outputsDeclarations:this.outputsDeclarations.map(u=>u.toJSONClone({...e,newId:null})),outputs:this.outputs.map(u=>u.toJSONClone({...e,newId:null})),error:((p=this.error)==null?void 0:p.toJSONClone({...e,newId:null}))||null,parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,query:this.query,x:this.x,y:this.y,inputs:this.inputs.map(a=>a.toReference(e)),inputsDeclarations:this.inputsDeclarations.map(a=>a.toReference(e)),outputs:this.outputs.map(a=>a.toReference(e)),outputsDeclarations:this.outputsDeclarations.map(a=>a.toReference(e)),successCalls:this.successCalls.map(a=>a.toReference(e)),errorCalls:this.errorCalls.map(a=>a.toReference(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference(e)),calledByError:this.calledByError.map(a=>a.toReference(e)),calledByEntry:this.calledByEntry.map(a=>a.toReference(e)),error:this.error?this.error.toReference(e):null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(n=>n.toFlatJSON(e)),...this.errorCalls.flatMap(n=>n.toFlatJSON(e)),...this.inputs.flatMap(n=>n.toFlatJSON(e)),...this.inputsDeclarations.flatMap(n=>n.toFlatJSON(e)),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.outputsDeclarations.flatMap(n=>n.toFlatJSON(e)),...this.calledBy.flatMap(n=>n.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===i.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,query:this.query,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.successCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.inputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.inputsDeclarations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.outputsDeclarations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.inputsDeclarations.forEach(t=>t.clearErrors()),this.inputs.forEach(t=>t.clearErrors()),this.outputs.forEach(t=>t.clearErrors()),this.successCalls.forEach(t=>t.clearErrors()),this.errorCalls.forEach(t=>t.clearErrors()),(e=this.error)==null||e.clearErrors(),this}validate(){const e=j7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputsDeclarations.flatMap(t=>t.getErrors()),...this.inputs.flatMap(t=>t.getErrors()),...this.outputsDeclarations.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.error?this.error.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var I,D,O,$;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.Search,a);s.inputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(I=this.inputsDeclarations)==null?void 0:I.map((j,K)=>j.clone(this,p+"-input-declaration-"+K+"-id",n));u.inputsDeclarations=h;const f=(D=this.outputsDeclarations)==null?void 0:D.map((j,K)=>j.clone(this,p+"-output-declaration-"+K+"-id",n));u.outputsDeclarations=f;const R=(O=this.inputs)==null?void 0:O.map((j,K)=>j.clone(u,p+"-input-map-"+K+"-id",n));u.inputs=R;const v=($=this.outputs)==null?void 0:$.map((j,K)=>j.clone(u,p+"-output-map-"+K+"-id",n));return u.outputs=v,this.error&&(u.error=this.error.clone(u,p+"-error-map-id",n)),u}syncInputMaps(){const e=[],t=[],n=[];return this.inputsDeclarations.forEach(a=>{if(!this.inputs.find(o=>{var l;return((l=o.declaration)==null?void 0:l.id)===a.id})){const o={id:this.id+"--"+M.UUID.uuid(),version:1,type:i.InputMap,declaration:a.toJSON(),readsValue:null,defaultValue:null,index:this.inputs.length,name:null,description:null,parent:this.toReference()},l=b(o,this.project);l.setParent(this),l.initChildren(),l.addSelfToProject(),e.push(this),t.push(l)}}),this.inputs.forEach(a=>{if(!this.inputsDeclarations.find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const{affected:o,removed:l}=a.remove();e.push(...o),n.push(...l)}}),{updated:m(e),added:m(t),removed:m(n),self:this}}};c(_e,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(_e,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),c(_e,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(_e,"BASE_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,..._e.INMUTABLE_BASE_PROPERTIES]),c(_e,"MUTABLE_META_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,"x","y"]),c(_e,"INMUTABLE_META_PROPERTIES",[..._e.INMUTABLE_BASE_PROPERTIES]),c(_e,"META_PROPERTIES",[..._e.MUTABLE_META_PROPERTIES,..._e.INMUTABLE_META_PROPERTIES]),c(_e,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(_e,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(_e,"UPSTREAM_PROPERTIES",[..._e.MUTABLE_UPSTREAM_PROPERTIES,..._e.INMUTABLE_UPSTREAM_PROPERTIES]),c(_e,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),c(_e,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(_e,"DOWNSTREAM_PROPERTIES",[..._e.MUTABLE_DOWNSTREAM_PROPERTIES,..._e.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(_e,"PROPERTIES",[...kt.META_PROPERTIES,...kt.UPSTREAM_PROPERTIES,...kt.DOWNSTREAM_PROPERTIES]);let Yr=_e;function k7(r){const e=w3(),t=r.toJSON();e.safeParse(t).success,r.functions.forEach(s=>s.validate()),r.events.forEach(s=>s.validate());const a=[];return Be(r.errors,a)}const Pe=class Pe{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"type",i.InstalledProject);c(this,"implements");c(this,"functions",[]);c(this,"events",[]);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=e.x,this.y=e.y,this.implements=e.implements}static fromGenerationTarget(e,t){const n=t,a={id:e.id,version:1,name:e.name,type:i.InstalledProject,description:e.description,functions:[],events:[],implements:{entityId:e.implements,entityType:i.Project,type:i.GenericReference,id:M.UUID.uuid()},x:0,y:0,parent:n},s=b(a,t);return s.setParent(n),s.initChildren(),s}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[];return a.push(...je(n)),{errors:a,modifiedData:n}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an installed project, must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.functions=this.initialData.functions.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.afterAllChildrenInitialized(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await Pe.repository.load(this.id),this}async create(e=V){return await Pe.repository.create(this.toShallowJSON()),this}async update(e=V){return await Pe.repository.update(this.toShallowJSON()),this}async delete(e=V){return await Pe.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.functions.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!1,seenEntities:t});n.push(...o),a.push(...l)}),this.events.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!1,seenEntities:t});n.push(...o),a.push(...l)}),{affected:[],removed:[]})}restore({seenEntities:e}={seenEntities:new Set}){return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.functions.forEach(t=>{t.restore({seenEntities:e})}),this.events.forEach(t=>{t.restore({seenEntities:e})}),{affected:[],self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.functions.flatMap(n=>n.toFlat(e)),...this.events.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.functions.flatMap(n=>n.toFlatIds(e)),...this.events.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,implements:this.implements,functions:this.functions.map(t=>t.toJSON(e)),events:this.events.map(t=>t.toJSON(e)),parent:this.parent.toReference(),x:this.x,y:this.y})}toJSONClone(e=L){var n,a,s,o,l;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,implements:this.implements,functions:this.functions.map(p=>p.toJSONClone({...e,newId:null})),events:this.events.map(p=>p.toJSONClone({...e,newId:null})),parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps}),x:this.x,y:this.y})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,implements:this.implements,functions:this.functions.map(a=>a.toReference(e)),events:this.events.map(a=>a.toReference(e)),parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.functions.flatMap(n=>n.toFlatJSON(e)),...this.events.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,description:this.description,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.functions.flatMap(n=>n.toFlatGenerationTarget(e)),...this.events.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this}validate(){const e=k7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var R,v;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.InstalledProject,a);s.functions=[],s.events=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e&&u.setParent(e),n&&u.subscribe(),u.initChildren();const h=(R=this.functions)==null?void 0:R.map((I,D)=>I.clone(u,p+"-exported-function-declaration-"+D+"-id",n));u.functions=h;const f=(v=this.events)==null?void 0:v.map((I,D)=>I.clone(u,p+"-exported-event-"+D+"-id",n));return u.events=f,u}};c(Pe,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(Pe,"MUTABLE_BASE_PROPERTIES",[]),c(Pe,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),c(Pe,"BASE_PROPERTIES",[...Pe.MUTABLE_BASE_PROPERTIES,...Pe.INMUTABLE_BASE_PROPERTIES]),c(Pe,"MUTABLE_META_PROPERTIES",["x","y"]),c(Pe,"INMUTABLE_META_PROPERTIES",[...Pe.INMUTABLE_BASE_PROPERTIES]),c(Pe,"META_PROPERTIES",[...Pe.MUTABLE_META_PROPERTIES,...Pe.INMUTABLE_META_PROPERTIES]),c(Pe,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(Pe,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),c(Pe,"UPSTREAM_PROPERTIES",[...Pe.MUTABLE_UPSTREAM_PROPERTIES,...Pe.INMUTABLE_UPSTREAM_PROPERTIES]),c(Pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),c(Pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Pe,"DOWNSTREAM_PROPERTIES",[...Pe.MUTABLE_DOWNSTREAM_PROPERTIES,...Pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Pe,"PROPERTIES",[...Pe.META_PROPERTIES,...Pe.UPSTREAM_PROPERTIES,...Pe.DOWNSTREAM_PROPERTIES]);let Hr=Pe;function q7(r){var l;const e=j6(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(p=>p.validate()),r.outputs.forEach(p=>p.validate()),(l=r.error)==null||l.validate();const a=kn(r),s=J7(r),o=[...a,...s];return Be(r.errors,o)}function J7(r){const e=[],t=Yo(r.parent),n=t==null?void 0:t.entity;if(!n)e.push(Q({id:`${r.id}--${B.InternalCallParentMissingDataType}`,code:B.InternalCallParentMissingDataType,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${r.declaration}".`,issue:null,entity:r}).error);else if(![i.DefinitionEntity,i.BuiltInBaseEntity,i.PrimitiveEntity].includes(n.type))e.push(Q({id:`${r.id}--${B.InternalCallParentDeclarationEntityInvalidType}`,code:B.InternalCallParentDeclarationEntityInvalidType,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", belongs to a variable whose data type 'entity' is not a definition entity, built-in base entity or primitive entity.
|
|
98
|
-
This variable's data-type has an 'entity' field that references an entity with id '${n.id}' and of type '${n.type}'.`,issue:null,entity:r}).error);else{const a=
|
|
98
|
+
This variable's data-type has an 'entity' field that references an entity with id '${n.id}' and of type '${n.type}'.`,issue:null,entity:r}).error);else{const a=lp(n),s=[];[i.DefinitionEntity,i.BuiltInBaseEntity,i.PrimitiveEntity].includes(n.type)&&s.push(...n.getAllInteractiveMethods());let o="";a?n.methods.length?o=`
|
|
99
99
|
All 'function-declaration' entities attached as methods to the parent data-type 'entity' field, available to be called as 'internal-calls' in this variable are:
|
|
100
100
|
- ${n.methods.map(u=>u.id).join(`
|
|
101
101
|
- `)}
|
|
@@ -107,7 +107,7 @@ Built-in entity types can't have methods attached to them by the user. They are
|
|
|
107
107
|
This variable's data-type 'entity' is a definition entity which extends or implements a non-interactive 'built-in-base-entity'.s`:n.type===i.BuiltInBaseEntity&&(o=`
|
|
108
108
|
This variable's data-type 'entity' is a non-interactive 'built-in-base-entity'.s`);const l=s.find(p=>p.id===r.declaration.id);l?l.type!==i.FunctionDeclaration&&e.push(Q({id:`${r.id}--${B.InternalCallDeclarationIsNotFunctionDeclaration}`,code:B.InternalCallDeclarationIsNotFunctionDeclaration,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", points to a 'declaration' that isn't a 'function-declaration' entity.
|
|
109
109
|
The declaration of the internal-call must be a 'function-declaration' entity which exists as a method in the entity of the data-type of the parent variable.${o}`,issue:null,entity:r}).error):e.push(Q({id:`${r.id}--${B.InternalCallDeclarationNotFoundInParentDatatypeEntity}`,code:B.InternalCallDeclarationNotFoundInParentDatatypeEntity,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) with id "${r.declaration}".${o}`,issue:null,entity:r}).error)}return e}const Te=class Te{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"index");c(this,"type",i.InternalCall);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"process",null);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"error",null);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"parent");c(this,"project");c(this,"errors",[]);c(this,"initialized",!1);c(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version}static fromGenerationTarget(e,t){const n=S(e.parent),a=t.get(n),s=S(e.declaration),o=t.get(s),l=e.calledByEntry.map(R=>{const v=S(R);return t.get(v)}),p=e.calledBySuccess.map(R=>{const v=S(R);return t.get(v)}),u=e.calledByError.map(R=>{const v=S(R);return t.get(v)}),h={id:e.id,version:1,type:i.InternalCall,index:a.internalCalls.length,declaration:o.toReference(),calledByEntry:l,calledBySuccess:p,calledByError:u,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,parent:a},f=b(h,t);return f.setParent(a),f.initChildren(),f}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:Fe}},t);n=s.modifiedData;const o=S(n.parent),l=t.get(o);if(l){const p=Yo(l),u=p==null?void 0:p.entity;if(!u)a.push(new g({id:`${n.id}--${B.InternalCallParentMissingDataType}`,code:B.InternalCallParentMissingDataType,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${n.declaration}".`,issue:null}));else if(![i.DefinitionEntity,i.BuiltInBaseEntity,i.PrimitiveEntity].includes(u.type))a.push(new g({id:`${n.id}--${B.InternalCallParentDeclarationEntityInvalidType}`,code:B.InternalCallParentDeclarationEntityInvalidType,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type 'entity' is not a definition entity, built-in base entity or primitive entity.
|
|
110
|
-
This variable's data-type has an 'entity' field that references an entity with id '${u.id}' and of type '${u.type}'.`,issue:null}));else{const h=
|
|
110
|
+
This variable's data-type has an 'entity' field that references an entity with id '${u.id}' and of type '${u.type}'.`,issue:null}));else{const h=lp(u);let f="";h?u.methods.length?f=`
|
|
111
111
|
All 'function-declaration' entities attached as methods to the parent data-type 'entity' field, available to be called as 'internal-calls' in this variable are:
|
|
112
112
|
- ${u.methods.map(D=>D.id).join(`
|
|
113
113
|
- `)}
|
|
@@ -138,7 +138,7 @@ Any value reads can be done with that input-map instead.
|
|
|
138
138
|
You can't edit input-map entities as they need to match their argument declarations, so you can only modify the 'readsValue' property so it reads the value from an external entity, or the 'defaultValue' so it has a hard-coded one.`,issue:null}));else if(Fe.includes(o.type)){const R=Ur(o).dataType,v=R==null?void 0:R.entity;v&&v.type===i.ActionDescriptor?a.push(new g({id:`${n.id}--${B.NoOverlapWithImplementedSignature}`,code:B.NoOverlapWithImplementedSignature,severity:E.Error,message:`Entity of type '${i.InputMap}' with id '${n.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The data type of the 'variable-declaration' is a 'action-descriptor' entity.
|
|
139
139
|
This means it can hold a function-call or operation as its value, to be executed programatically.
|
|
140
140
|
Input maps can only be added to variables which hold an entity with properties.`,issue:null})):v&&!(R!=null&&R.inferred)&&(v.properties.find(D=>D.id===l.id)||a.push(new g({id:`${n.id}--${B.NoOverlapWithImplementedSignature}`,code:B.NoOverlapWithImplementedSignature,severity:E.Error,message:`Entity of type '${i.InputMap}' with id '${n.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The 'declaration' with '${l.id}' of the 'input-map' does not exist in the entity of the 'data-type'.
|
|
141
|
-
The entity of the data-type has the following properties that can be reads as input maps, ids: '${q(v.properties.map(D=>D.id),"', '","' and '")}'`,issue:null})))}else if(Je.filter(h=>Fe.includes(h)).includes(o.type)){const f=
|
|
141
|
+
The entity of the data-type has the following properties that can be reads as input maps, ids: '${q(v.properties.map(D=>D.id),"', '","' and '")}'`,issue:null})))}else if(Je.filter(h=>Fe.includes(h)).includes(o.type)){const f=rp(o),R=f.find(I=>I.id===n.declaration),v=`The parent entity has the following argument declarations that can be referenced by input-maps, ids: '${q(f.map(I=>I.id),"', '","' and '")}'`;R||a.push(new g({id:`${n.id}--${B.NoOverlapWithImplementedSignature}`,code:B.NoOverlapWithImplementedSignature,severity:E.Error,message:`Entity of type '${i.InputMap}' with id '${n.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent entity does not have an 'argument-declaration' with id '${n.declaration}'.
|
|
142
142
|
You can't add an input-map to an entity that doesn't have a matching 'argument-declaration'.
|
|
143
143
|
${v}`,issue:null}))}}return a.push(...s.errors,...je(n)),{errors:a,modifiedData:n}}validateGeneratedUpdate(e){const t=[];let n=JSON.parse(JSON.stringify(e));const a=Qa(n,this);return n=a.modifiedData,t.push(...a.errors),n.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
|
|
144
144
|
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`,issue:null})),{errors:t,modifiedData:n}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.readsValue){const a=S(this.initialData.readsValue),s=this.project.get(a);s&&(this.setValueWriter(s),e.push(s))}if(this.initialData.declaration){const a=S(this.initialData.declaration),s=this.project.get(a);s&&(this.setDeclaration(s),e.push(s))}return qn.hydrateReadsValue(this),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){var a,s;const e=[this],t=[],n=[];if(this.parent.addInput(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),Fe.includes(this.parent.type)&&((s=this.parent.getDataType())!=null&&s.inferred)){const o=this.parent.type===i.VariableDeclaration?this.parent:this.parent.declaration;o.inferDataTypeAndSyncInstancesInputsAndOutputs(),e.push(o,...o.variableInstances)}return{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}setDeclaration(e){return this.declaration=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=b(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.declaration&&(this.declaration=b(this.initialData.declaration,this.project)),qn.initReadsValue(this),this.afterAllChildrenInitialized(),this)}setValueWriter(e){return this.readsValue=e,this}removeValueWriter(){return this.readsValue=null,this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.index=e.index||(e.index!==0?this.index:0),this.name=e.name||this.name,this.description=e.description||this.description,this}async load(e=V){return await Ee.repository.load(this.id),this}async create(e=V){return await Ee.repository.create(this.toShallowJSON()),this}async update(e=V){return await Ee.repository.update(this.toShallowJSON()),this}async delete(e=V){return await Ee.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.defaultValue){const{affected:s,removed:o}=this.defaultValue.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}return this.readsValue&&(n.push(this.readsValue),this.readsValue.removeValueReader(this)),this.defaultValue&&(n.push(this.defaultValue),this.defaultValue.remove({ignoreUpstream:!0,seenEntities:t})),e||(n.push(this.parent),this.parent.removeInput(this)),{affected:n,removed:a}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.defaultValue){const{affected:n}=this.defaultValue.restore({seenEntities:e});t.push(...n)}return this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.defaultValue&&(t.push(this.defaultValue),this.defaultValue.restore({seenEntities:e})),t.push(this.parent),this.parent.addInput(this),{affected:t,self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.defaultValue?this.defaultValue.toFlat(e):[],...this.declaration?this.declaration.toFlat(e):[],...this.readsValue?this.readsValue.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.defaultValue?this.defaultValue.toFlatIds(e):[],...this.defaultValue?this.defaultValue.toFlatIds(e):[]])}toJSON(e=new Set){var t,n,a;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,index:this.index,name:this.name,description:this.description,defaultValue:((t=this.defaultValue)==null?void 0:t.toJSON(e))||null,declaration:((n=this.declaration)==null?void 0:n.toJSON(e))||null,readsValue:((a=this.readsValue)==null?void 0:a.toReference())||null,parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l,p,u,h,f,R,v;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,index:this.index,name:this.name,description:this.description,defaultValue:((p=this.defaultValue)==null?void 0:p.toJSONClone({...e,newId:null}))||null,declaration:(u=this.declaration)!=null&&u.id&&this.project.getBuiltIn((h=this.declaration)==null?void 0:h.id)?(f=this.declaration)==null?void 0:f.toJSON(e.seenEntities):((R=this.declaration)==null?void 0:R.toJSONClone({...e,newId:null}))||null,readsValue:((v=this.readsValue)==null?void 0:v.toReference({seenEntityMaps:e.seenEntityMaps}))||null,parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s,o;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,defaultValue:((a=this.defaultValue)==null?void 0:a.toReference(e))||null,declaration:((s=this.declaration)==null?void 0:s.toReference(e))||null,readsValue:((o=this.readsValue)==null?void 0:o.toReference(e))||null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.defaultValue?this.defaultValue.toFlatJSON(e):[],...this.defaultValue?this.defaultValue.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name||void 0,description:this.description||void 0,type:this.type,declaration:((e=this.declaration)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.defaultValue?this.defaultValue.toFlatGenerationTarget(e):[],...this.defaultValue?this.defaultValue.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),this}validate(){const e=W7(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...((t=this.defaultValue)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return this.defaultValue||((e=this.declaration)==null?void 0:e.defaultValue)||null}setDefaultValue(e){return this.defaultValue=e,this}clone(e=null,t=null,n=!0){var f;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.InputMap,a);s.defaultValue=null;const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(f=this.defaultValue)==null?void 0:f.clone(u,p+"--default-value-id",n);return u.defaultValue=h||null,u}getDataType(){var t;if(this.parent.type===i.Operation)return this.parent.declaration.inferInputMapDataType(this);if(Fe.includes(this.parent.type)){const n=Ur(this.parent),a=n.getDataType();(!a||a.inferred)&&n.inferDataTypeAndSyncInstancesInputsAndOutputs()}const e=(t=this.declaration)==null?void 0:t.getDataType();if(!e){const n=gn(this);if(n)return n}return e||null}};c(Ee,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(Ee,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(Ee,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Ee,"BASE_PROPERTIES",[...Ee.MUTABLE_BASE_PROPERTIES,...Ee.INMUTABLE_BASE_PROPERTIES]),c(Ee,"MUTABLE_META_PROPERTIES",[...Ee.MUTABLE_BASE_PROPERTIES,"index"]),c(Ee,"INMUTABLE_META_PROPERTIES",[...Ee.INMUTABLE_BASE_PROPERTIES]),c(Ee,"META_PROPERTIES",[...Ee.MUTABLE_META_PROPERTIES,...Ee.INMUTABLE_META_PROPERTIES]),c(Ee,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(Ee,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),c(Ee,"UPSTREAM_PROPERTIES",[...Ee.MUTABLE_UPSTREAM_PROPERTIES,...Ee.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),c(Ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ee,"DOWNSTREAM_PROPERTIES",[...Ee.MUTABLE_DOWNSTREAM_PROPERTIES,...Ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ee,"PROPERTIES",[...Ee.META_PROPERTIES,...Ee.UPSTREAM_PROPERTIES,...Ee.DOWNSTREAM_PROPERTIES]);let xn=Ee;class Y7 extends xn{constructor(t,n){super(t,n);c(this,"declaration",null);c(this,"parent");c(this,"errors",[])}toJSON(t=new Set){return super.toJSON(t)}}class H7 extends xn{constructor(t,n){super(t,n);c(this,"name",null);c(this,"description",null);c(this,"declaration");c(this,"parent");c(this,"errors",[])}toJSON(t=new Set){return super.toJSON(t)}}function z7(r){const e=S6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-return-map-id"){const s=Q({id:`${r.id}--${G.PropertyImplementsNonAbstact}`,message:`Property "${w(r,r.project)}" with id "${r.id}" implements a non-abstract property "${w(r,r.project)}" with id "${r.id}".`,issue:null,severity:E.Error,code:G.PropertyImplementsNonAbstact,entity:r});a.push(s.error)}return Be(r.errors,a)}const Re=class Re{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"index");c(this,"type",i.OutputMap);c(this,"parentRelationType");c(this,"defaultValue",null);c(this,"declaration");c(this,"writesValues",[]);c(this,"dataType");c(this,"project");c(this,"errors",[]);c(this,"parent");c(this,"initialized",!1);c(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.index=e.index,this.parentRelationType=e.parentRelationType}static fromGenerationTarget(e,t){const n=S(e.parent),a=t.get(n);let s;if(e.declaration){const p=S(e.declaration);s=t.get(p)}const o={id:e.id,version:1,type:i.OutputMap,index:(a.outputs||[]).length,defaultValue:null,declaration:s,writesValues:[],parent:a},l=b(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var l;let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:Je.filter(p=>p!==i.Condition)},declaration:{list:!1,types:[i.ReturnDeclaration,i.Property]}},t);n=s.modifiedData;const o=t.get(n.parent);if(o&&Je.filter(p=>p!==i.Condition).includes(o.type)){const p=o.outputs.find(u=>u.declaration.id===S(n.declaration));if(p)a.push(new g({id:`${n.id}--${T.OutputOverwrite}`,code:T.OutputOverwrite,severity:E.Error,message:`Entity of type '${i.OutputMap}' with id '${n.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent already has an output-map with id '${p.id}' that points to the same base 'return-declaration'.
|
|
@@ -192,7 +192,7 @@ You shouldn't have to manually update a 'parent' property.
|
|
|
192
192
|
Specifically for return statements the parent needs to always be the 'function-declaration' or 'global-event' that contains it.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addEntryCaller(o),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addSuccessCaller(o),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addErrorCaller(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),this.calledBySuccess.forEach(a=>{a.addSuccessCall(this),e.push(a)}),this.calledByError.forEach(a=>{a.addErrorCall(this),e.push(a)}),this.parent.addReturnStatement(this),e.push(this.parent),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}addOutputDeclaration(e){return this.outputs.find(t=>t.id===e.id)||this.outputs.push(e),this}removeOutputDeclaration(e){return this.outputs=this.outputs.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.outputs=this.initialData.outputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=b(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.afterAllChildrenInitialized(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await rt.repository.load(this.id),this}async create(e=V){return await rt.repository.create(this.toShallowJSON()),this}async update(e=V){return await rt.repository.update(this.toShallowJSON()),this}async delete(e=V){return await rt.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}return this.parent.removeReturnStatement(this),e||this.calledBy.forEach(s=>{n.push(s),s.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:n}=this.throws.restore({seenEntities:e});t.push(...n)}return this.parent.addReturnStatement(this),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(n=>n.toFlat(e)),...this.throws?this.throws.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.outputs.flatMap(n=>n.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(e=new Set){var t,n;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(a=>a.toReference()),calledByError:this.calledByError.map(a=>a.toReference()),calledByEntry:this.calledByEntry.map(a=>a.toReference()),outputs:this.outputs.map(a=>a.toJSON(e)),parent:((t=this.parent)==null?void 0:t.toReference())||null,throws:((n=this.throws)==null?void 0:n.toJSON(e))||null})}toJSONClone(e=L){var n,a,s,o,l,p,u;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),outputs:this.outputs.map(h=>h.toJSONClone({...e,newId:null})),parent:((p=this.parent)==null?void 0:p.toReference({seenEntityMaps:e.seenEntityMaps}))||null,throws:((u=this.throws)==null?void 0:u.toJSONClone({...e,newId:null}))||null})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(o=>o.toReference(e)),calledBySuccess:this.calledBySuccess.map(o=>o.toReference(e)),calledByError:this.calledByError.map(o=>o.toReference(e)),calledByEntry:this.calledByEntry.map(o=>o.toReference(e)),throws:((a=this.throws)==null?void 0:a.toReference(e))||null,parent:((s=this.parent)==null?void 0:s.toReference(e))||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.throws?this.throws.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.throws?this.throws.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.outputs.forEach(t=>t.clearErrors()),(e=this.throws)==null||e.clearErrors(),this}validate(){const e=tq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.outputs.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var f;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.ReturnStatement,a);s.outputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(f=this.outputs)==null?void 0:f.map((R,v)=>R.clone(u,p+"-return-declaration-"+v+"-id",n));return u.outputs=h,this.throws&&(u.throws=this.throws.clone(u,p+"-throws-id",n)),u}};c(rt,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(rt,"MUTABLE_BASE_PROPERTIES",[]),c(rt,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(rt,"BASE_PROPERTIES",[...Ot.MUTABLE_BASE_PROPERTIES,...Ot.INMUTABLE_BASE_PROPERTIES]),c(rt,"MUTABLE_META_PROPERTIES",["x","y"]),c(rt,"INMUTABLE_META_PROPERTIES",[...Ot.INMUTABLE_BASE_PROPERTIES]),c(rt,"META_PROPERTIES",[...Ot.MUTABLE_META_PROPERTIES,...Ot.INMUTABLE_META_PROPERTIES]),c(rt,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(rt,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(rt,"UPSTREAM_PROPERTIES",[...Ot.MUTABLE_UPSTREAM_PROPERTIES,...Ot.INMUTABLE_UPSTREAM_PROPERTIES]),c(rt,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(rt,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(rt,"DOWNSTREAM_PROPERTIES",[...Ot.MUTABLE_DOWNSTREAM_PROPERTIES,...Ot.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(rt,"PROPERTIES",[...kt.META_PROPERTIES,...kt.UPSTREAM_PROPERTIES,...kt.DOWNSTREAM_PROPERTIES]);let Zr=rt;function rq(r){var s;const e=b6(),t=r.toJSON();e.safeParse(t).success,r.outputs.forEach(o=>o.validate()),(s=r.throws)==null||s.validate();const a=[];return Be(r.errors,a)}const Ce=class Ce{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",i.BreakStatement);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"throws",null);c(this,"project");c(this,"errors",[]);c(this,"parent");c(this,"initialized",!1);c(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){const n=S(e.parent),a=t.get(n),s=e.calledByEntry.map(h=>{const f=S(h);return t.get(f)}),o=e.calledBySuccess.map(h=>{const f=S(h);return t.get(f)}),l=e.calledByError.map(h=>{const f=S(h);return t.get(f)}),p={id:e.id,version:1,type:i.BreakStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:l,calledByEntry:s,throws:null,parent:a},u=b(p,t);return u.setParent(a),u.initChildren(),u}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[i.Loop]}},t);return n=s.modifiedData,a.push(...s.errors,...je(n)),{errors:a,modifiedData:n}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
193
193
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
194
194
|
You shouldn't have to manually update a 'parent' property.
|
|
195
|
-
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addCall(this),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addSuccessCall(this),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addErrorCall(this),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.parent.addBreakStatement(this),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),this.calledBySuccess.forEach(a=>{a.addSuccessCall(this),e.push(a)}),this.calledByError.forEach(a=>{a.addErrorCall(this),e.push(a)}),this.parent.addBreakStatement(this),e.push(this.parent),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}addOutputDeclaration(e){return this.outputs.find(t=>t.id===e.id)||this.outputs.push(e),this}removeOutputDeclaration(e){return this.outputs=this.outputs.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.outputs=this.initialData.outputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=b(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.afterAllChildrenInitialized(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await Ce.repository.load(this.id),this}async create(e=V){return await Ce.repository.create(this.toShallowJSON()),this}async update(e=V){return await Ce.repository.update(this.toShallowJSON()),this}async delete(e=V){return await Ce.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}return this.parent.removeBreakStatement(this),e||this.calledBy.forEach(s=>{n.push(s),s.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:n}=this.throws.restore({seenEntities:e});t.push(...n)}return this.parent.addBreakStatement(this),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(n=>n.toFlat(e)),...this.throws?this.throws.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.outputs.flatMap(n=>n.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(e=new Set){var t,n;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(a=>a.toJSON(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference()),calledByError:this.calledByError.map(a=>a.toReference()),calledByEntry:this.calledByEntry.map(a=>a.toReference()),parent:((t=this.parent)==null?void 0:t.toReference())||null,throws:((n=this.throws)==null?void 0:n.toJSON(e))||null})}toJSONClone(e=L){var n,a,s,o,l,p,u;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(h=>h.toJSONClone({...e,newId:null})),calledBySuccess:this.calledBySuccess.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),parent:((p=this.parent)==null?void 0:p.toReference({seenEntityMaps:e.seenEntityMaps}))||null,throws:((u=this.throws)==null?void 0:u.toJSONClone({...e,newId:null}))||null})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(o=>o.toReference(e)),calledBySuccess:this.calledBySuccess.map(o=>o.toReference(e)),calledByError:this.calledByError.map(o=>o.toReference(e)),calledByEntry:this.calledByEntry.map(o=>o.toReference(e)),throws:((a=this.throws)==null?void 0:a.toReference(e))||null,parent:((s=this.parent)==null?void 0:s.toReference(e))||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.throws?this.throws.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.throws?this.throws.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.outputs.forEach(t=>t.clearErrors()),(e=this.throws)==null||e.clearErrors(),this}validate(){const e=rq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.outputs.flatMap(t=>t.getErrors()),...this.throws?this.throws.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var f;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.BreakStatement,a);s.outputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(f=this.outputs)==null?void 0:f.map((R,v)=>R.clone(u,p+"-return-declaration-"+v+"-id",n));return u.outputs=h,this.throws&&(u.throws=this.throws.clone(u,p+"-throws-id",n)),u}};c(Ce,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(Ce,"MUTABLE_BASE_PROPERTIES",[]),c(Ce,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Ce,"BASE_PROPERTIES",[...Ce.MUTABLE_BASE_PROPERTIES,...Ce.INMUTABLE_BASE_PROPERTIES]),c(Ce,"MUTABLE_META_PROPERTIES",["x","y"]),c(Ce,"INMUTABLE_META_PROPERTIES",[...Ce.INMUTABLE_BASE_PROPERTIES]),c(Ce,"META_PROPERTIES",[...Ce.MUTABLE_META_PROPERTIES,...Ce.INMUTABLE_META_PROPERTIES]),c(Ce,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(Ce,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(Ce,"UPSTREAM_PROPERTIES",[...Ce.MUTABLE_UPSTREAM_PROPERTIES,...Ce.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ce,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(Ce,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ce,"DOWNSTREAM_PROPERTIES",[...Ce.MUTABLE_DOWNSTREAM_PROPERTIES,...Ce.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ce,"PROPERTIES",[...Ce.META_PROPERTIES,...Ce.UPSTREAM_PROPERTIES,...Ce.DOWNSTREAM_PROPERTIES]);let Yi=Ce;function iq(r){const e=BD(),t=r.toJSON();e.safeParse(t).success,r.inputs.flatMap(s=>s.validate()),r.outputs.flatMap(s=>s.validate());const a=[];return Be(r.errors,a)}var pO=(r=>(r.Success="success",r.Error="error",r.Break="break",r.Continue="continue",r.Return="return",r))(pO||{});const ve=class ve{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"implementation",null);c(this,"parent",null);c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);c(this,"autoexecutable",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description}static fromGenerationTarget(e,t){let n=null;if(e.parent){const o=S(e.parent);n=t.get(o)}const a={id:e.id,version:1,name:e.name,type:i.ActionDescriptor,description:e.description,inputs:[],outputs:[],error:null,parent:n},s=b(a,t);return n&&s.setParent(n),s.initChildren(),s}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[i.DefinitionEntity,i.DataType]}},t);n=s.modifiedData;const o=n.parent?t.get(n.parent):null;if(o&&o.type===i.DefinitionEntity){const l=o,u=ur(l).filter(h=>!h.interactive);if(u.length){let h=u.length>1?`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${l.id}' because it extends or implements multiple '${i.BuiltInBaseEntity}' entities that are non-interactive ("${q(u.map(f=>w(f,f.project)),'", "','" and "')}").`:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${l.id}' because it extends or implements a '${i.BuiltInBaseEntity}' entity that is non-interactive ("${w(u[0],u[0].project)}").`;h+=`
|
|
195
|
+
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addCall(this),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addSuccessCall(this),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(o.addErrorCall(this),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.parent.addBreakStatement(this),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];return this.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),this.calledBySuccess.forEach(a=>{a.addSuccessCall(this),e.push(a)}),this.calledByError.forEach(a=>{a.addErrorCall(this),e.push(a)}),this.parent.addBreakStatement(this),e.push(this.parent),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}addOutputDeclaration(e){return this.outputs.find(t=>t.id===e.id)||this.outputs.push(e),this}removeOutputDeclaration(e){return this.outputs=this.outputs.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.outputs=this.initialData.outputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=b(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.afterAllChildrenInitialized(),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await Ce.repository.load(this.id),this}async create(e=V){return await Ce.repository.create(this.toShallowJSON()),this}async update(e=V){return await Ce.repository.update(this.toShallowJSON()),this}async delete(e=V){return await Ce.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});n.push(...s),a.push(...o)}return this.parent.removeBreakStatement(this),e||this.calledBy.forEach(s=>{n.push(s),s.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:n}=this.throws.restore({seenEntities:e});t.push(...n)}return this.parent.addBreakStatement(this),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(n=>n.toFlat(e)),...this.throws?this.throws.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.outputs.flatMap(n=>n.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(e=new Set){var t,n;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(a=>a.toJSON(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference()),calledByError:this.calledByError.map(a=>a.toReference()),calledByEntry:this.calledByEntry.map(a=>a.toReference()),parent:((t=this.parent)==null?void 0:t.toReference())||null,throws:((n=this.throws)==null?void 0:n.toJSON(e))||null})}toJSONClone(e=L){var n,a,s,o,l,p,u;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(h=>h.toJSONClone({...e,newId:null})),calledBySuccess:this.calledBySuccess.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),parent:((p=this.parent)==null?void 0:p.toReference({seenEntityMaps:e.seenEntityMaps}))||null,throws:((u=this.throws)==null?void 0:u.toJSONClone({...e,newId:null}))||null})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n,a,s;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(o=>o.toReference(e)),calledBySuccess:this.calledBySuccess.map(o=>o.toReference(e)),calledByError:this.calledByError.map(o=>o.toReference(e)),calledByEntry:this.calledByEntry.map(o=>o.toReference(e)),throws:((a=this.throws)==null?void 0:a.toReference(e))||null,parent:((s=this.parent)==null?void 0:s.toReference(e))||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.throws?this.throws.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.throws?this.throws.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.outputs.forEach(t=>t.clearErrors()),(e=this.throws)==null||e.clearErrors(),this}validate(){const e=rq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.outputs.flatMap(t=>t.getErrors()),...this.throws?this.throws.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var f;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.BreakStatement,a);s.outputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(f=this.outputs)==null?void 0:f.map((R,v)=>R.clone(u,p+"-return-declaration-"+v+"-id",n));return u.outputs=h,this.throws&&(u.throws=this.throws.clone(u,p+"-throws-id",n)),u}};c(Ce,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(Ce,"MUTABLE_BASE_PROPERTIES",[]),c(Ce,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Ce,"BASE_PROPERTIES",[...Ce.MUTABLE_BASE_PROPERTIES,...Ce.INMUTABLE_BASE_PROPERTIES]),c(Ce,"MUTABLE_META_PROPERTIES",["x","y"]),c(Ce,"INMUTABLE_META_PROPERTIES",[...Ce.INMUTABLE_BASE_PROPERTIES]),c(Ce,"META_PROPERTIES",[...Ce.MUTABLE_META_PROPERTIES,...Ce.INMUTABLE_META_PROPERTIES]),c(Ce,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(Ce,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(Ce,"UPSTREAM_PROPERTIES",[...Ce.MUTABLE_UPSTREAM_PROPERTIES,...Ce.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ce,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(Ce,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ce,"DOWNSTREAM_PROPERTIES",[...Ce.MUTABLE_DOWNSTREAM_PROPERTIES,...Ce.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ce,"PROPERTIES",[...Ce.META_PROPERTIES,...Ce.UPSTREAM_PROPERTIES,...Ce.DOWNSTREAM_PROPERTIES]);let Yi=Ce;function iq(r){const e=_D(),t=r.toJSON();e.safeParse(t).success,r.inputs.flatMap(s=>s.validate()),r.outputs.flatMap(s=>s.validate());const a=[];return Be(r.errors,a)}var hO=(r=>(r.Success="success",r.Error="error",r.Break="break",r.Continue="continue",r.Return="return",r))(hO||{});const ve=class ve{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"implementation",null);c(this,"parent",null);c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);c(this,"autoexecutable",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description}static fromGenerationTarget(e,t){let n=null;if(e.parent){const o=S(e.parent);n=t.get(o)}const a={id:e.id,version:1,name:e.name,type:i.ActionDescriptor,description:e.description,inputs:[],outputs:[],error:null,parent:n},s=b(a,t);return n&&s.setParent(n),s.initChildren(),s}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[i.DefinitionEntity,i.DataType]}},t);n=s.modifiedData;const o=n.parent?t.get(n.parent):null;if(o&&o.type===i.DefinitionEntity){const l=o,u=ur(l).filter(h=>!h.interactive);if(u.length){let h=u.length>1?`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${l.id}' because it extends or implements multiple '${i.BuiltInBaseEntity}' entities that are non-interactive ("${q(u.map(f=>w(f,f.project)),'", "','" and "')}").`:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${l.id}' because it extends or implements a '${i.BuiltInBaseEntity}' entity that is non-interactive ("${w(u[0],u[0].project)}").`;h+=`
|
|
196
196
|
${dr}`,a.push(new g({id:`${e.id}--${T.NonInteractiveEntityReferenced}`,code:T.NonInteractiveEntityReferenced,severity:E.Error,message:h,issue:null}))}}else if(o&&o.type===i.DataType){const l=o;l.entity&&a.push(new g({id:`${e.id}--${T.NewEntityWouldOverriteExisting}`,code:T.NewEntityWouldOverriteExisting,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${l.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
|
|
197
197
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
198
198
|
${bn({describe_entity:l.entity.id})}
|
|
@@ -222,21 +222,21 @@ ${lr}`,severity:E.Error,code:T.InvalidInmutablePropertyOverride,issue:null}))),t
|
|
|
222
222
|
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:E.Error,code:T.InvalidInmutablePropertyOverride,issue:null})),n=!0)}),(a.DOWNSTREAM_PROPERTIES||[]).forEach(O=>{r[O]&&!Ja(r[O])&&(t.push(new g({id:`${e.id}--${T.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${O}" set directly. It is a downstream property that points to a downstream nested entity.
|
|
223
223
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
224
224
|
To modify '${O}', target the entity that it points to and its equivalent property.`,severity:E.Error,code:T.InvalidDownstreamPropertyOverride,issue:null})),n=!0)}),(a.INMUTABLE_UPSTREAM_PROPERTIES||[]).forEach(O=>{r[O]&&!Ja(r[O])&&(t.push(new g({id:`${e.id}--${T.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${O}" updated. It is an inmutable property that is set only when the entity is created.
|
|
225
|
-
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:E.Error,code:T.InvalidInmutablePropertyOverride,issue:null})),n=!0)});const D=a.PROPERTIES||[];D.length>0&&Object.keys(r).forEach(O=>{D.includes(O)||t.push(new g({id:`${e.id}--${T.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${O}" that will be ignored.`,severity:E.Warning,code:T.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:n?Ko(e):""};const s=
|
|
225
|
+
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:E.Error,code:T.InvalidInmutablePropertyOverride,issue:null})),n=!0)});const D=a.PROPERTIES||[];D.length>0&&Object.keys(r).forEach(O=>{D.includes(O)||t.push(new g({id:`${e.id}--${T.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${O}" that will be ignored.`,severity:E.Warning,code:T.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:n?Ko(e):""};const s=fO(e),o=s==null?void 0:s.partial(),l=o==null?void 0:o.safeParse(r),p={...r,id:e.id,type:e.type},u=Fu(p,l);if(t.push(...u),t.length)return{errors:t,modifiedData:null,messageAddition:n?Ko(e):""};const f=e.validateGeneratedUpdate(r);return{errors:[...t,...f.errors],modifiedData:f.modifiedData,messageAddition:n?Ko(e):""}}function fO(r){switch(r.type){case i.LiteralValue:return Do();case i.DefinitionEntity:return nu();case i.PrimitiveEntity:return Do();case i.FunctionDeclaration:return eu();case i.GlobalEvent:return Mo();case i.DataType:return Wc();case i.Property:return wc();case i.FunctionCall:return $c();case i.Condition:return Fc();case i.Operation:return Co();case i.VariableDeclaration:return Hc();case i.VariableInstance:return zc();case i.OutputMap:return Gc();case i.ReturnDeclaration:return Vc();case i.ArgumentDeclaration:return Qc();case i.InputMap:return kc();case i.Project:return tu();case i.InstalledProject:return O3();case i.ActionDescriptor:return Oo();case i.ReturnStatement:return _c();case i.Loop:return Oo();case i.Search:return Uc();case i.ValueDescriptor:return Cc();case i.BuiltInBaseEntity:return Bc();case i.InternalCall:return jc();case i.ContinueStatement:return Mc();case i.BreakStatement:return Nc();default:return null}}function mO(r){switch(r.type){case i.LiteralValue:return e3();case i.DefinitionEntity:return T5();case i.PrimitiveEntity:return x9();case i.FunctionDeclaration:return l5();case i.GlobalEvent:return _3();case i.DataType:return y3();case i.Property:return J9();case i.FunctionCall:return P6();case i.Condition:return M6();case i.Operation:return H6();case i.VariableDeclaration:return E3();case i.VariableInstance:return I3();case i.OutputMap:return I6();case i.ReturnDeclaration:return f6();case i.ArgumentDeclaration:return i5();case i.InputMap:return q6();case i.Project:return y5();case i.InstalledProject:return A3();case i.ActionDescriptor:return e6();case i.ReturnStatement:return u6();case i.Loop:return r6();case i.Search:return L6();case i.ValueDescriptor:return G9();case i.BuiltInBaseEntity:return Z9();case i.InternalCall:return U6();case i.ContinueStatement:return o6();case i.BreakStatement:return R6();default:return null}}function Xo(r){const e=[];ar(r)||e.push(new g({id:`${r}--${T.InvalidReferenceObjectStructure}`,message:`Reference object with id "${r}" is not an object. References should be objects with exactly 4 properties: 'entityId', 'entityType', 'id', and 'type'.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null}));const t=r.id||"reference-to--"+(r.entityId||"unknown"),n=`Reference object ${r.id?`with id "${r.id}"`:`to entity with id "${r.entityId}" and type "${r.entityType}"`}`;return r.entityId||e.push(new g({id:`${t}--${T.InvalidReferenceObjectStructure}`,message:`${n} is missing an 'entityId' property.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null})),r.entityType||e.push(new g({id:`${t}--${T.InvalidReferenceObjectStructure}`,message:`${n} is missing an 'entityType' property.`,severity:E.Error,code:T.InvalidReferenceObjectStructure,issue:null})),r.id||e.push(new g({id:`${t}--${T.MissingIdProperty}`,message:`${n} is missing an 'id' property.`,severity:E.Error,code:T.MissingIdProperty,issue:null})),r.type||e.push(new g({id:`${t}--${T.MissingTypeProperty}`,message:`${n} is missing a 'type' property.`,severity:E.Error,code:T.MissingTypeProperty,issue:null})),e}function Fu(r,e){return e.success?[]:e.error.issues.map(t=>new g({id:`${r.id}--${B.InvalidObjectStructure}`,message:`Entity of type "${r.type}" and with id "${r.id}", has an invalid structure: ${x5(t).toString().replace("Validation error: ","")}`,severity:E.Error,code:B.InvalidObjectStructure,issue:t}))}function je(r,e){const t=[],n=mO(r);if(n){const s=n.safeParse(r);t.push(...Fu(r,s))}const a=hl(r.type);if(a){(a.DOWNSTREAM_PROPERTIES||[]).forEach(l=>{r[l]&&!Ja(r[l])&&t.push(new g({id:`${r.id}--${T.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${r.type}" with id "${r.id}" cannot have the property "${l}" set directly. It is a downstream property that points to a downstream nested entity.
|
|
226
226
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
227
227
|
To modify '${l}', target the entity that it points to and its equivalent property.`,severity:E.Error,code:T.InvalidDownstreamPropertyOverride,issue:null}))});const o=a.PROPERTIES||[];o.length>0&&Object.keys(r).forEach(l=>{o.includes(l)||t.push(new g({id:`${r.id}--${T.UnrecognizedProperty}`,message:`Entity of type "${r.type}" with id "${r.id}" has an unrecognized property "${l}" that will be ignored.`,severity:E.Warning,code:T.UnrecognizedProperty,issue:null}))})}return t}function lq(r,e){const t=[];if(!r.parent)return t;const n=e.get(r.parent);return n?(Jn.includes(n==null?void 0:n.type)?t.push(new g({id:`${r.id}--${T.BuiltInEntityParent}`,message:`Entity of type "${r.type}" with id "${r.id}" cannot have the parent with id "${n.id}", because it is a built in entity. Built in entities cannot be modified.`,severity:E.Error,code:T.BuiltInEntityParent,issue:null})):n.type===i.ActionDescriptor&&e.get(r.parent)&&t.push(new g({id:`${r.id}--${T.BuiltInEntityParent}`,message:`Entity of type "${r.type}" with id "${r.id}" cannot have the parent with id "${n.id}", because it is a built in entity. Built in entities cannot be modified. Action descriptors are only sometimes built in, other times they are managed by the user.`,severity:E.Error,code:T.BuiltInEntityParent,issue:null})),t):[]}function Uu(r,e,t){const n=[],a=r[e.key];if(!a)return n.push(new g({id:`${r.id}--${e.key}--${B.InvalidObjectStructure}`,message:`Entity of type "${r.type}" with id "${r.id}" is missing a reference to a "${e.key}" entity. The '${e.key}' property of a "${r.type}" entity can be ${q(e.types,", "," or ")}.`,severity:E.Error,code:B.InvalidObjectStructure,issue:null})),{entityState:null,errors:n};let s=null;if(typeof a=="string")s=a;else{const l=Xo(a);n.push(...l),l.length===0&&(s=a.entityId)}if(!s)return{entityState:null,errors:n};if(r.id===s)return n.push(new g({id:`${r.id}--${s}--${T.SelfReference}`,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at '${e.key}'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,severity:E.Error,code:T.SelfReference,issue:null})),{entityState:null,errors:n};const o=t.get(s)||t.getBuiltIn(s);return o?e.types.includes(o.type)||n.push(new g({id:`${r.id}--${s}--${T.InvalidReference}`,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to "${s}" at '${e.key}' that isn't pointing to an entity of type '${q(e.types,"', '","' or '")}'.`,severity:E.Error,code:T.InvalidReference,issue:null})):n.push(new g({id:`${r.id}--${s}--${T.ReferencedEntityNotFound}`,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${s}" at '${e.key}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null})),{entityState:o,errors:n}}function Qo(r,e,t){const n=[],a=r[e];return a?Array.isArray(a)?{entities:a.map(o=>{let l=null;if(typeof o=="string")l=o;else{const u=Xo(o);n.push(...u),u.length===0&&(l=o.entityId)}if(!l)return{entityState:null,errors:[new g({id:`${r.id}--${e}--${T.InvalidReference}`,message:`Entity of type "${r.type}" with id "${r.id}", has a missing reference at '${e}'. A reference needs to be a 'id' string of an existing entity in the project.`,severity:E.Error,code:T.InvalidReference,issue:null})]};const p=t.get(l)||t.getBuiltIn(l);return p?{entityState:p,errors:[]}:(n.push(new g({id:`${r.id}--${l}--${T.ReferencedEntityNotFound}`,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${l}" at '${e}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:E.Error,code:T.ReferencedEntityNotFound,issue:null})),{entityState:null,errors:n})}),errors:[]}:(n.push(new g({id:`${r.id}--${e}--${B.InvalidObjectStructure}`,message:`Entity of type "${r.type}" with id "${r.id}" has an invalid structure for the "${e}" property. It should be an array of references.`,severity:E.Error,code:B.InvalidObjectStructure,issue:null})),{entities:[],errors:n}):(n.push(new g({id:`${r.id}--${e}--${B.InvalidObjectStructure}`,message:`Entity of type "${r.type}" with id "${r.id}" is missing a list of references to "${e}" entities.`,severity:E.Error,code:B.InvalidObjectStructure,issue:null})),{entities:[],errors:n})}function xu(r,e,t){const n=[],a=Uu(r,e,t);if(a.errors.length>0)return a.errors;if(a.entityState){const s=a.entityState;e.types.includes(s.type)||n.push(new g({id:`${r.id}--${s.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to "${e.key}" that isn't pointing to an entity of type '${q(e.types,"', '","' or '")}'.`,issue:null})),r.id===s.id&&n.push(new g({id:`${r.id}--${s.id}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at '${e.key}'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}))}return n}function q(r,e,t){const n=[...r||[]].filter(a=>!!a);if(n.length===1)return n[0];if(n.length===2)return n.join(t);{const a=n.pop();return`${n.join(e)}${t}${a}`}}const or=`Pass-through callable entities are entities that need to be called by another caller, then they execute some internal logic and when finished, it can call other callable entities with the "calledBySuccess" property or "calledByError" property based on whether their internal execution was successful or an error ocurred respectively.
|
|
228
|
-
All pass-through callable entities are: ${q(Je,", "," and ")}.`,Xa=`Entry point entities are the entities which start the execution of a logic chain. They are ${q(We,", "," and ")}. They aren't explicitly called by any entities. Rather, they can be called implicitly by the system, or as a function-call somewhere else in the case of a function-declaration. `,
|
|
228
|
+
All pass-through callable entities are: ${q(Je,", "," and ")}.`,Xa=`Entry point entities are the entities which start the execution of a logic chain. They are ${q(We,", "," and ")}. They aren't explicitly called by any entities. Rather, they can be called implicitly by the system, or as a function-call somewhere else in the case of a function-declaration. `,TO=`Caller entities are entities that can call other entities. Regarless of whether they are entry-point entities or pass-through callable entities. All caller entity types are: ${q(on,", "," and ")}.`,dq=`Callable entities are entities that can be called by other entities. They can be called by an entry-point, a success caller, or an error caller.
|
|
229
229
|
All callable entity types are: ${q(Xt,", "," and ")}.`,lr=`Caller to callee relationships can be updated with the 'add_caller' and 'remove_caller' generation action with the properties: 'callerEntityId', a 'calleeEntityId'. For adding a caller, you can optionally add a boolean property 'fromError' (if the caller calls when an error occured in its execution).
|
|
230
230
|
Either of these two actions will only affect the one relationship between the given caller and callee and ignore any others present in either entity.`,ju=`Break and continue statements need to have exactly one 'return-declaration' entity each. It represents the result of the current iteration of the loop. It can have any name and have any 'data-type' but it needs to be identical among all statements in the same loop.
|
|
231
231
|
Meaning, if the return declaration in one 'break-statement' is named 'result' and has a 'data-type' of 'number', all other 'break-statements' and 'continue-statements' in the same loop need to have a 'return-declaration' with the same name and 'data-type'.`,cq=`Return statements need to be identical inside the same scope. For example if a 'return-statement' belongs to a function, with multiple branches of logic, leading to multiple 'return-statement' entities, all of them need to have the exact same amount of 'return-declaration' entities, sharing the same name and an equivalent 'data-type' entity.
|
|
232
232
|
Furthermore, some 'function-declarations' and all 'global-events' might be implementing a base 'action-descriptor' entity, which defines exactly the shape and number of the return declarations.`,ku=`A variable without a data type which reads an-untyped object value, or has object properties written into it as input-map writes, will infere its data-type. This means that a 'data-type' will be created, with an implicitly declared 'definition-entity' as its 'entity' property, defining the structure of the object.
|
|
233
|
-
This data type entity is what will define which properties are available to be read from the variable or any of its instances as 'output-map' entities.`,dr=`Entities of type '${i.BuiltInBaseEntity}' that have the 'interactive' property set to false cannot be used programmatically during runtime. They can't be used as data types or instanciated in variables. Their methods can't be called by the code, and are only called by the system in the background. Their properties' values are constant and set only once when declared. They also can't be extended with unrecognized properties or methods that aren't part of the base out-of-the-box entity.`,qu=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${q(Sn,"', '","' and '")}'.`,
|
|
233
|
+
This data type entity is what will define which properties are available to be read from the variable or any of its instances as 'output-map' entities.`,dr=`Entities of type '${i.BuiltInBaseEntity}' that have the 'interactive' property set to false cannot be used programmatically during runtime. They can't be used as data types or instanciated in variables. Their methods can't be called by the code, and are only called by the system in the background. Their properties' values are constant and set only once when declared. They also can't be extended with unrecognized properties or methods that aren't part of the base out-of-the-box entity.`,qu=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${q(Sn,"', '","' and '")}'.`,EO=`Entities that write values to other entities, can be connected with entities that read values from them. Value writing entity types are: '${q(Ze,"', '","' and '")}'.`,Ju=`A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.
|
|
234
234
|
A 'property' can have a default value through its nested 'data-type' entity.
|
|
235
235
|
The 'property' entity only represents the data field in the declaration, and it can't write or read values.
|
|
236
|
-
When a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.`,el=`Some entities can hold values during runtime, they often can be given a hardcoded "default value" either directly or on their declarations, and can be connected to other entities that write or read values to and from them. Entities that can hold values are: '${q(
|
|
236
|
+
When a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.`,el=`Some entities can hold values during runtime, they often can be given a hardcoded "default value" either directly or on their declarations, and can be connected to other entities that write or read values to and from them. Entities that can hold values are: '${q(hp,"', '","' and '")}'.
|
|
237
237
|
Some entities with values can both write and read values, while others can only do one of the two.
|
|
238
238
|
${qu}
|
|
239
|
-
${
|
|
239
|
+
${EO}.
|
|
240
240
|
${Ju}`,Wu=`To establish a connection of a reader and writter value during the generation process you can use the 'connect_values' generation action, like so:
|
|
241
241
|
\`\`\`json
|
|
242
242
|
{
|
|
@@ -256,7 +256,7 @@ ${typeof r=="string"?r:JSON.stringify(r,null,2)}
|
|
|
256
256
|
...All the properties you want to update
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
}`;return bn(n)}default:return""}}function
|
|
259
|
+
}`;return bn(n)}default:return""}}function RO(r,e){const t=JSON.parse(JSON.stringify(r)),n=[];if(We.includes(e.type))n.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Warning,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to an entry-point entity at 'calledBySuccess' with id "${e.id}".
|
|
260
260
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
261
261
|
${Xa}
|
|
262
262
|
We have moved the reference to 'calledByEntry' for you.`,issue:null})),t.calledByEntry.push(e.id),t.calledBySuccess=t.calledBySuccess.filter(a=>a!==e.id);else if(xe.includes(e.type)){const a=e.calledBy||[],s=a.length?`
|
|
@@ -267,7 +267,7 @@ Termination entities are ${q(xe,", "," and ")}.${s}`,issue:null}))}else if(!Je.i
|
|
|
267
267
|
${or}`,issue:null}));else if(!on.includes(e.type))return n.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a caller entity at 'calledBySuccess' with id "${e.id}" that isn't a caller entity.
|
|
268
268
|
All caller entity types are: ${q(on,", "," and ")}.
|
|
269
269
|
For the 'calledBySuccess' property, you specifically need to reference a pass-through callable entity.
|
|
270
|
-
${or}`,issue:null})),{errors:n,modifiedData:t};return{errors:n,modifiedData:t}}function
|
|
270
|
+
${or}`,issue:null})),{errors:n,modifiedData:t};return{errors:n,modifiedData:t}}function gO(r,e){const t=[];if(We.includes(e.type))t.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to an entry-point entity at 'calledByError' with id "${e.id}".
|
|
271
271
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
272
272
|
${Xa}`,issue:null}));else if(xe.includes(e.type)){const n=e.calledBy||[],a=n.length?`
|
|
273
273
|
|
|
@@ -277,7 +277,7 @@ Termination entities are ${q(xe,", "," and ")}.${a}`,issue:null}))}else if(!Je.i
|
|
|
277
277
|
${or}`,issue:null}));else if(!on.includes(e.type))return t.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a caller entity at 'calledByError' with id "${e.id}" that isn't a caller entity.
|
|
278
278
|
All caller entity types are: ${q(on,", "," and ")}.
|
|
279
279
|
For the 'calledByError' property, you specifically need to reference a pass-through callable entity.
|
|
280
|
-
${or}`,issue:null})),t;return t}function
|
|
280
|
+
${or}`,issue:null})),t;return t}function bO(r,e){const t=[];if(xe.includes(e.type)){const n=e.calledBy||[],a=n.length?`
|
|
281
281
|
|
|
282
282
|
This ${e.type} is called by ${q(n.map(s=>`${s.type} with id "${s.id}"`),", "," and ")} entities. You can reference ${n.length>1?"one of them":"it"} instead to execute this entity before the end of the logic.`:"";t.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a '${e.type}' entity at 'calledByEntry' with id "${e.id}".
|
|
283
283
|
${e.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
@@ -288,18 +288,18 @@ ${Xa}.
|
|
|
288
288
|
We have moved the reference to 'calledBySuccess' for you.`,issue:null}));else if(!on.includes(e.type))return t.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a caller entity at 'calledByEntry' with id "${e.id}" that isn't a caller entity.
|
|
289
289
|
All caller entity types are: ${q(on,", "," and ")}.
|
|
290
290
|
For the 'calledByEntry' property, you specifically need to reference a pass-through callable entity.
|
|
291
|
-
${or}`,issue:null})),t;return t}function
|
|
291
|
+
${or}`,issue:null})),t;return t}function vO(r,e){const t=[];let n=JSON.parse(JSON.stringify(r));if(Xt.includes(n.type)){if(n.calledBySuccess){const s=Qo(n,"calledBySuccess",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=RO(n,o.entityState);n=l.modifiedData,t.push(...l.errors)}):t.push(...s.errors)}if(n.calledByError){const s=Qo(n,"calledByError",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=gO(n,o.entityState);t.push(...l)}):t.push(...s.errors)}if(n.calledByEntry){const s=Qo(n,"calledByEntry",e);s.errors.length===0?(s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=bO(n,o.entityState);t.push(...l)}),t.push(...t)):t.push(...s.errors)}const a=[...n.calledBySuccess||[],...n.calledByError||[],...n.calledByEntry||[]];if(a.length){const s=[...new Set(a)];a.length!==s.length&&t.push(new g({id:`${n.id}--${T.DuplicateReference}`,code:T.DuplicateReference,severity:E.Warning,message:`Entity of type "${n.type}" with id "${n.id}" has duplicate caller references. Each caller reference should be unique. Duplicate caller reference will be ignored.`,issue:null}));const o=At(n,e);n.type===i.ReturnStatement&&o&&!We.includes(o.type)?t.push(new g({id:`${n.id}--${T.IncompatibleScope}`,code:T.IncompatibleScope,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" has an explicitly set parent, but it isn't a '${q(We,"', '","' or '")}' entity. A return statement's parent should always be resolved to a function declaration or global event.${tl}`,issue:null})):n.type===i.ContinueStatement&&o&&o.type!==i.Loop?t.push(new g({id:`${n.id}--${T.IncompatibleScope}`,code:T.IncompatibleScope,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" has an explicitly set parent, but it isn't a '${i.Loop}' entity. A continue statement's parent should always be resolved to a loop entity.${tl}`,issue:null})):n.type===i.BreakStatement&&o&&o.type!==i.Loop&&t.push(new g({id:`${n.id}--${T.IncompatibleScope}`,code:T.IncompatibleScope,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" has an explicitly set parent, but it isn't a '${i.Loop}' entity. A break statement's parent should always be resolved to a loop entity.${tl}`,issue:null}));const l=[],p=[];let u=null;if(s.forEach(h=>{const f=e.get(h);if(!f){t.push(new g({id:`${n.id}--${h}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a caller entity with id "${h}" that doesn't exist in the project.`,issue:null}));return}const R=At(f,e);if(o)ns(o,R,e)?(xe.includes(n.type)&&((n.calledBySuccess||[]).find(I=>I===f.id)?(f.successCalls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
292
292
|
The new termination statement is redundant because both entities would be called from the same parent caller branch "successCalls", at the same time.`,issue:null})):(n.calledByError||[]).find(I=>I===f.id)?(f.errorCalls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
293
293
|
The new termination statement is redundant because both entities would be called from the same parent caller branch "errorCalls", at the same time.`,issue:null})):(n.calledByEntry||[]).find(I=>I===f.id)&&(f.calls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
294
294
|
The new termination statement is redundant because both entities would be called from the same parent caller branch (entry-point), at the same time.`,issue:null}))),l.push({caller:f,scope:R})):p.push({caller:f,scope:R,errors:[new g({id:`${n.id}--${f.id}--${T.CallerWithIncompatibleScope}`,code:T.CallerWithIncompatibleScope,severity:E.Warning,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that is in a different scope. The caller entity should be in the same scope or a higher valid scope. Or all callers should share the global project scope with the entity they call.`,issue:null})]});else if(!u)u=R;else{const{compatible:v}=ns(u,R,e);v?(xe.includes(n.type)&&((n.calledBySuccess||[]).find(I=>I===f.id)?(f.successCalls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
295
295
|
The new termination statement is redundant because both entities would be called from the same parent caller branch "successCalls", at the same time.`,issue:null})):(n.calledByError||[]).find(I=>I===f.id)?(f.errorCalls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
296
296
|
The new termination statement is redundant because both entities would be called from the same parent caller branch "errorCalls", at the same time.`,issue:null})):(n.calledByEntry||[]).find(I=>I===f.id)&&(f.calls||[]).find(O=>xe.includes(O.type))&&t.push(new g({id:`${n.id}--${f.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Error,message:`Entity of type "${n.type}" with id "${n.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
297
|
-
The new termination statement is redundant because both entities would be called from the same parent caller branch (entry-point), at the same time.`,issue:null}))),l.push({caller:f,scope:R})):p.push({caller:f,scope:R,errors:[new g({id:`${n.id}--${f.id}--${T.CallerWithIncompatibleScope}`,code:T.CallerWithIncompatibleScope,severity:E.Warning,message:`Entity of type "${n.type}" with id "${n.id}" has multiple caller, but not all of them have compatible scopes. Caller of type "${f.type}" with id "${f.id}" is in a different scope than caller of type "${u.type}" with id "${u.id}". All callers should be in the same scope or a higher valid scope. Or all callers should share the global project scope.`,issue:null})]})}}),p.length)p.forEach(h=>{t.push(...h.errors)});else if(l.length&&!o&&vl.includes(n.type)){const h=l.filter(f=>f.scope!==e);if(h.length){const f=
|
|
297
|
+
The new termination statement is redundant because both entities would be called from the same parent caller branch (entry-point), at the same time.`,issue:null}))),l.push({caller:f,scope:R})):p.push({caller:f,scope:R,errors:[new g({id:`${n.id}--${f.id}--${T.CallerWithIncompatibleScope}`,code:T.CallerWithIncompatibleScope,severity:E.Warning,message:`Entity of type "${n.type}" with id "${n.id}" has multiple caller, but not all of them have compatible scopes. Caller of type "${f.type}" with id "${f.id}" is in a different scope than caller of type "${u.type}" with id "${u.id}". All callers should be in the same scope or a higher valid scope. Or all callers should share the global project scope.`,issue:null})]})}}),p.length)p.forEach(h=>{t.push(...h.errors)});else if(l.length&&!o&&vl.includes(n.type)){const h=l.filter(f=>f.scope!==e);if(h.length){const f=BP(h.map(R=>R.scope));n.parent=f.id}else n.parent=e.id}}else{let s=`Entity of type "${n.type}" with id "${n.id}" isn't called by any other entity. Callable entities only get executed if they have a list of references from either 'calledByEntry', 'calledBySuccess' or 'calledByError'.
|
|
298
298
|
To add a caller, use the 'add_caller' action with the properties: 'callerEntityId', a 'calleeEntityId', and optionally a boolean 'fromError' (if the caller calls when an error occured in its execution).`;n.type===i.ReturnStatement?s+=`
|
|
299
299
|
Return statements need to have a caller when created, since their purpose is to terminate a call chain.`:n.type===i.ContinueStatement?s+=`
|
|
300
300
|
Continue statements need to have a caller when created, since they are used to skip the rest of the current iteration of a loop and can't be detached from a call chain.`:n.type===i.BreakStatement&&(s+=`
|
|
301
301
|
Break statements need to have a caller when created, since they are used to exit a loop and can't be detached from a call chain.`),s+=`
|
|
302
|
-
${
|
|
302
|
+
${TO}`,xe.includes(n.type)||(s+=`
|
|
303
303
|
It is recommended to have a caller reference already at the moment of creation in the payload of the generation action.`),t.push(new g({id:`${n.id}--${B.MissingCaller}`,code:B.MissingCaller,severity:xe.includes(n.type)?E.Error:E.Warning,message:s,issue:null}))}}return{errors:t,modifiedData:n}}function Yu(r,e){const t=[];if(e.type===i.LiteralValue){const o=e.parent;let l=!1;if(o.type===i.InputMap)t.push(new g({id:`${r.id}--${e.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to a value writting entity at 'readsValue' with id "${e.id}" that is a literal value entity. Literal value entities aren't value writting entities.
|
|
304
304
|
All value writting entity types are: ${q(Ze,", "," and ")}.
|
|
305
305
|
|
|
@@ -322,7 +322,7 @@ ${Ju}`,issue:null})):a.push(new g({id:`${o.id}--${T.InvalidReference}`,code:T.In
|
|
|
322
322
|
${qu}`,issue:null})),delete s.readsValue);o.writesValues&&(Ze.includes(o.type)?a.push(new g({id:`${o.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Warning,message:`Entity of type "${o.type}" with id "${o.id}" has a 'writesValues' property. This property is managed by the downstream entity, the value reader, and should not be present in the payload of the generation action.
|
|
323
323
|
${Wu}`,issue:null})):a.push(new g({id:`${o.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Warning,message:`Entity of type "${o.type}" with id "${o.id}" has a 'writesValues' property. This property is managed by the downstream entity, the value reader, and should not be present in the payload of the generation action.
|
|
324
324
|
${el}
|
|
325
|
-
${Wu}`,issue:null})),delete s.writesValues);const p=
|
|
325
|
+
${Wu}`,issue:null})),delete s.writesValues);const p=vO(o,t);delete s.calledByError,delete s.calledBySuccess,delete s.calledByEntry,a.push(...p.errors),o=p.modifiedData}const l=Object.entries(s);for(const[p,u]of l){const h=u.types,f=u.optional,R=o[p];if(!R){f||a.push(new g({id:`${o.id}--${p}--${B.InvalidObjectStructure}`,code:B.InvalidObjectStructure,severity:E.Error,message:`Entity of type "${o.type}" with id "${o.id}" is missing a reference to a "${p}" entity. The '${p}' property of a "${o.type}" entity can be ${q(h,", "," or ")}`,issue:null}));continue}if(u.list)if(Array.isArray(R))for(const v of R){const I=xu(o,{key:p,types:h,optional:f},t);a.push(...I)}else{a.push(new g({id:`${o.id}--${p}--${T.ContainsSingleButShouldBeReferenceList}`,code:T.ContainsSingleButShouldBeReferenceList,severity:E.Error,message:`Entity of type "${o.type}" with id "${o.id}", should have a property "${p}" which is a list, but it isn't.`,issue:null}));continue}else if(Array.isArray(R)){a.push(new g({id:`${o.id}--${p}--${T.ContainsListButShouldReferenceSingle}`,code:T.ContainsListButShouldReferenceSingle,severity:E.Error,message:`Entity of type "${o.type}" with id "${o.id}", should have a property "${p}" which holds a single reference, but it is a list.`,issue:null}));continue}else{const v=xu(o,{key:p,types:h,optional:f},t);a.push(...v)}}return{errors:a,modifiedData:o}}function pq(r,e,t="calledBy"){const n=[];if(!r)return[];const a=e.get(r);if(!a)return n.push(new g({id:`${r}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity with id "${r}" referenced in '${t}' property not found in the project. Perhaps it should be created first? Perhaps it is the wrong ID?`,issue:null})),n;if([...Je,...We].includes(a.type))return[];if(xe.includes(a.type)){const s=a.calledBy||[],o=s.length?`
|
|
326
326
|
|
|
327
327
|
This ${a.type} is called by ${q(s.map(l=>`${l.type} with id "${l.id}"`),", "," and ")} entities. You can reference ${s.length>1?"one of them":"it"} instead to execute this entity before the end of the logic.`:"";n.push(new g({id:`last-action--${a.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}'.
|
|
328
328
|
${a.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
@@ -346,7 +346,7 @@ All value writting entity types are: ${q(Ze,", "," and ")}.
|
|
|
346
346
|
|
|
347
347
|
This data type entity belongs to a ${s.type} entity with id "${s.id}". ${s.type} entities are value writting entities. Is that what you meant to reference?`,issue:null})):t.push(new g({id:`last-action--${n.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`The 'readsValue' property references an entity with id "${n.id}" that is a literal value entity. Literal value entities can't be referenced as value writting entities.
|
|
348
348
|
All value writting entity types are: ${q(Ze,", "," and ")}.`,issue:null}))}else Ze.includes(n.type)||t.push(new g({id:`last-action--${n.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`The 'readsValue' property references an entity with id "${n.id}" that isn't a value writting entity.
|
|
349
|
-
All value writting entity types are: ${q(Ze,", "," and ")}.`,issue:null}));return t}function
|
|
349
|
+
All value writting entity types are: ${q(Ze,", "," and ")}.`,issue:null}));return t}function IO(r){return r.functions.length?`All global 'function-declaration' entity ids are:
|
|
350
350
|
- ${r.functions.map(t=>`${t.id} (${w(t,r)})`).join(`
|
|
351
351
|
- `)}.`:"The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities."}function nl(r){return`All reserved action decriptor ids for '${i.GlobalEvent}' entities are:
|
|
352
352
|
- ${r.globalEventActionDescriptors.map(e=>`${e.id} (${w(e,r)})`).join(`
|
|
@@ -356,7 +356,7 @@ All value writting entity types are: ${q(Ze,", "," and ")}.`,issue:null}));retur
|
|
|
356
356
|
- ${r.operationDeclarations.map(e=>`${e.id} (${w(e,r)})`).join(`
|
|
357
357
|
- `)}`}function il(r){return`All reserved action decriptor ids for '${i.Condition}' entities are:
|
|
358
358
|
- ${r.conditionDeclarations.map(e=>`${e.id} (${w(e,r)})`).join(`
|
|
359
|
-
- `)}`}function
|
|
359
|
+
- `)}`}function DO(r,e){const t=[];if(!r)return[];const n=e.get(r),a=IO(e);if(!n)t.push(new g({id:`last-action--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity with id '${r}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}));else if(n.type===i.ActionDescriptor)t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunctionCall}`,code:T.InvalidFunctionDeclarationForFunctionCall,severity:E.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${r}' which is of type '${n.type}' entity. If you meant to reference an 'action-descriptor', you can use the 'implement_operation' generation action instead.
|
|
360
360
|
Otherwise, if you were trying to implement a 'function-call' from a globally declarated 'function-declaration':
|
|
361
361
|
${a}`,issue:null}));else if(n.type!==i.FunctionDeclaration)t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunctionCall}`,code:T.InvalidFunctionDeclarationForFunctionCall,severity:E.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${r}' which is of type '${n.type}' entity. Only 'function-declaration' entities can be implemented as function calls.
|
|
362
362
|
${a}`,issue:null}));else if(n.parent.type===i.DefinitionEntity){const o=ur(n.parent).filter(p=>!p.interactive);let l="";o.length&&(l=`
|
|
@@ -365,7 +365,7 @@ ${dr}`),t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunction
|
|
|
365
365
|
If you want to call a method of a definition entity, use a '${i.InternalCall}' entity on any variable which is an instance of that definition entity.
|
|
366
366
|
${a}${l}`,issue:null}))}else n.parent.type===i.Loop?t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunctionCall}`,code:T.InvalidFunctionDeclarationForFunctionCall,severity:E.Error,message:`The function declaration entity with id '${r}' is the body of the 'loop' with id '${n.parent.id}'. Only globally declared, standalone functions can be implemented as function calls.
|
|
367
367
|
If you want to execute the logic of a loop's body you can call the loop entity itself anf the body will be executed once for each iteration.
|
|
368
|
-
${a}`,issue:null})):n.parent.type!==i.Project&&t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunctionCall}`,code:T.InvalidFunctionDeclarationForFunctionCall,severity:E.Error,message:`The function declaration entity with id '${r}' has a 'parent' entity which isn't the root project. Only globally declared, standalone functions can be implemented as function calls.${a}`,issue:null}));return t}function
|
|
368
|
+
${a}`,issue:null})):n.parent.type!==i.Project&&t.push(new g({id:`last-action--${T.InvalidFunctionDeclarationForFunctionCall}`,code:T.InvalidFunctionDeclarationForFunctionCall,severity:E.Error,message:`The function declaration entity with id '${r}' has a 'parent' entity which isn't the root project. Only globally declared, standalone functions can be implemented as function calls.${a}`,issue:null}));return t}function SO(r,e){const t=[];if(!r)return[];const n=e.getBuiltIn(r),a=`
|
|
369
369
|
All built-in 'action-descriptor' entities that define 'operation' entity, are (IDs):
|
|
370
370
|
- ${e.operationDeclarations.map(s=>`${s.id} (${w(s,e)}).`).join(`
|
|
371
371
|
- `)}
|
|
@@ -376,7 +376,7 @@ All built-in 'action-descriptor' entities that define 'condition' entity, are (I
|
|
|
376
376
|
`;return n?n.type===i.FunctionDeclaration?t.push(new g({id:`last-action--${T.InvalidActionDescriptorForCondition}`,code:T.InvalidActionDescriptorForCondition,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):n.type===i.ActionDescriptor?e.conditionDeclarations.find(o=>o.id===r)||t.push(new g({id:`last-action--${T.InvalidActionDescriptorForOperation}`,code:T.InvalidActionDescriptorForOperation,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity but it isn't one of the allowed condition descriptors.${a}`,issue:null})):n.type!==i.ActionDescriptor&&t.push(new g({id:`last-action--${T.InvalidActionDescriptorForCondition}`,code:T.InvalidActionDescriptorForCondition,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):t.push(new g({id:`last-action--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function Tq(r,e){const t=[];if(!r)return[];const n=e.getBuiltIn(r),a=`
|
|
377
377
|
All built-in 'action-descriptor' entities that define 'loop' entity, are (IDs):
|
|
378
378
|
- ${e.loopDeclarations.map(s=>`${s.id} (${w(s,e)}).`).join(`
|
|
379
|
-
- `)}`;return n?n.type===i.FunctionDeclaration?t.push(new g({id:`last-action--${T.InvalidActionDescriptorForLoop}`,code:T.InvalidActionDescriptorForLoop,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):n.type===i.ActionDescriptor?e.loopDeclarations.find(o=>o.id===r)||t.push(new g({id:`last-action--${T.InvalidActionDescriptorForOperation}`,code:T.InvalidActionDescriptorForOperation,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):n.type!==i.ActionDescriptor&&t.push(new g({id:`last-action--${T.InvalidActionDescriptorForLoop}`,code:T.InvalidActionDescriptorForLoop,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new g({id:`last-action--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function
|
|
379
|
+
- `)}`;return n?n.type===i.FunctionDeclaration?t.push(new g({id:`last-action--${T.InvalidActionDescriptorForLoop}`,code:T.InvalidActionDescriptorForLoop,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):n.type===i.ActionDescriptor?e.loopDeclarations.find(o=>o.id===r)||t.push(new g({id:`last-action--${T.InvalidActionDescriptorForOperation}`,code:T.InvalidActionDescriptorForOperation,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):n.type!==i.ActionDescriptor&&t.push(new g({id:`last-action--${T.InvalidActionDescriptorForLoop}`,code:T.InvalidActionDescriptorForLoop,severity:E.Error,message:`The entity with id '${r}' is of type '${n.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new g({id:`last-action--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function OO(r,e,t){var p,u,h,f;if(t.compatible)return"";const n=`entity of type "${r.type}" with id "${r.id}"`,a=`entity with id "${r.id}"`,s=`entity of type "${e.type}" with id "${e.id}"`,o=`entity with id "${e.id}"`,l=Jo(`${n} and ${s} have incompatible data types and cannot be connected as value-reader and value-writter.`);return t.type===zt.AIsListBIsNot?`${l}
|
|
380
380
|
${a} is a list, but ${o} is not. A list can't be connected to a single value.`:t.type===zt.BIsListAIsNot?`${l}
|
|
381
381
|
${a} is not a list, but ${o} is. A single value can't be connected to a list.`:t.type===zt.AIsNullableBIsNot?`${l}
|
|
382
382
|
${a} is nullable, but ${o} is not. A nullable value can't be connected to a non-nullable value since an empty value might be incorrectly provided.`:t.type===zt.BIsNullableAIsNot?`${l}
|
|
@@ -386,21 +386,21 @@ ${a} is not a template, but ${o} is. A data type that provides an entity as a "t
|
|
|
386
386
|
Their 'entity' property is of different types. They must be of the same type to be connected. For example, the 'entity' can be a '${i.DefinitionEntity}' or a '${i.PrimitiveEntity}'.`:t.type===zt.IncompatibleDefinitionEntities?`${l}
|
|
387
387
|
Both point to definition entities, but they are not compatible to be connected. They must be either the same definition entity, or a definition entity that has equivalent shape, which includes the same properties all with compatible data types with the properties in the counterpart entity.`:t.type===zt.IncompatiblePrimitiveEntities?`${l}
|
|
388
388
|
${a} is of primitive type '${((p=r.getDataType())==null?void 0:p.entity).name}' and ${o} is of primitive type '${((u=e.getDataType())==null?void 0:u.entity).name}'. They must be of the same primitive type to be connected.`:t.type===zt.IncompatibleBuiltInBaseEntities?`${l}
|
|
389
|
-
Both point to a built-in-base-entity. But${a} is of built-in base type '${((h=r.getDataType())==null?void 0:h.entity).name}' and ${o} is of built-in base type '${((f=e.getDataType())==null?void 0:f.entity).name}'. They must be of the same built-in base type to be connected.`:l}function Qa(r,e){const t=[];if(r.readsValue){const n=e.project.get(S(r.readsValue));if(e.project.getBuiltIn(S(r.readsValue)))t.push(new g({id:`${e.id}--${T.InvalidBuiltInEntityReference}`,code:T.InvalidBuiltInEntityReference,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to a built-in entity with id '${r.readsValue}'. Only user-created entities can be referenced.`,issue:null}));else if(!n)t.push(new g({id:`${e.id}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${r.readsValue}' because the entity was not found in the project state.`,issue:null}));else{const s=pr(n);if(s)t.push(new g({id:`${e.id}--${T.InvalidBuiltInEntityReference}`,code:T.InvalidBuiltInEntityReference,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${r.readsValue}' because the entity belongs to a built-in '${s.type}' entity with id '${s.id}' (${w(s,e.project)}) higher up in the tree.`,issue:null}));else{const o=Yu({...e.toGenerationTarget(),...r},n);t.push(...o);const l=Zt(e.getDataType(),n.getDataType());l.compatible||t.push(new g({id:`${e.id}--${B.ReaderWriterIncompatibleDataType}`,code:B.ReaderWriterIncompatibleDataType,severity:E.Error,message:
|
|
389
|
+
Both point to a built-in-base-entity. But${a} is of built-in base type '${((h=r.getDataType())==null?void 0:h.entity).name}' and ${o} is of built-in base type '${((f=e.getDataType())==null?void 0:f.entity).name}'. They must be of the same built-in base type to be connected.`:l}function Qa(r,e){const t=[];if(r.readsValue){const n=e.project.get(S(r.readsValue));if(e.project.getBuiltIn(S(r.readsValue)))t.push(new g({id:`${e.id}--${T.InvalidBuiltInEntityReference}`,code:T.InvalidBuiltInEntityReference,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to a built-in entity with id '${r.readsValue}'. Only user-created entities can be referenced.`,issue:null}));else if(!n)t.push(new g({id:`${e.id}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${r.readsValue}' because the entity was not found in the project state.`,issue:null}));else{const s=pr(n);if(s)t.push(new g({id:`${e.id}--${T.InvalidBuiltInEntityReference}`,code:T.InvalidBuiltInEntityReference,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${r.readsValue}' because the entity belongs to a built-in '${s.type}' entity with id '${s.id}' (${w(s,e.project)}) higher up in the tree.`,issue:null}));else{const o=Yu({...e.toGenerationTarget(),...r},n);t.push(...o);const l=Zt(e.getDataType(),n.getDataType());l.compatible||t.push(new g({id:`${e.id}--${B.ReaderWriterIncompatibleDataType}`,code:B.ReaderWriterIncompatibleDataType,severity:E.Error,message:OO(e,n,l),issue:null}))}}}return{errors:t,modifiedData:r}}function kn(r){const e=[];if(r.parent===r.project)!r.calledBy.length&&r.type!==i.VariableDeclaration&&e.push(new Cr({id:`${r.id}--${G.DisconnectedCallableEntity}`,code:G.DisconnectedCallableEntity,severity:E.Warning,message:`This '${r.type}' entity "${w(r,r.project)}" with id "${r.id}" is globally declared and isn't called by any other entity.
|
|
390
390
|
Globally declared callable entities will not be part of any logic execution when the project is published.
|
|
391
391
|
To useful to the project when it is published, entities need to be called by a chain of logic that traces itself back to an entry point. Entry points can be either '${i.GlobalEvent}' or '${i.FunctionDeclaration}'.
|
|
392
392
|
The only use for declaring global callable entities is for a 'variable-declaration' entity to be available globally in the project's scope, since its instances can be used inside lower scopes.
|
|
393
393
|
Or for a logic that the user is going to manually test themselves by clicking on the user-interface.`,issue:null,entity:r}));else{const t=rs(r);if(!t.reachable){let n=`This '${r.type}' entity "${w(r,r.project)}" with id "${r.id}" is not reachable from the project's closest entry point '${t.entryPoint.type}' "${w(t.entryPoint,r.project)}".`;n+=`
|
|
394
394
|
This is because there are termination statements in the call chain before reaching this '${r.type}'.
|
|
395
395
|
If a caller entity calls a termination statement, it will always prevent all other calls from executing.`;let a=`
|
|
396
|
-
This '${r.type}' is blocked `;t.blocks.forEach((s,o)=>{const l=s.blockedByCaller,p=s.blockedByCalling;o===0?a+="by ":o===t.blocks.length-1&&(a+="and by "),a+=`its ancestor "${w(l,r.project)}" with id "${l.id}" that calls a '${p.type}' entity with id "${p.id}"`,o<t.blocks.length-1?a+=", ":a+="."}),e.push(new Cr({id:`${r.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Warning,message:`${n}${a}`,issue:null,entity:r}))}}return Be(r.errors,e)}function Hu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=Q({id:`${r.id}--${G.VariableReadsValueAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" reads a value. A variable with internal calls can't read a value.`,issue:null,severity:E.Error,code:G.VariableReadsValueAndInternalCall,entity:r});e.push(t.error)}if(r.writesValues.length){const t=Q({id:`${r.id}--${G.VariableWritesValuesAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" writes values. A variable with internal calls can't write a value.`,issue:null,severity:E.Error,code:G.VariableWritesValuesAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedInputs().length){const t=Q({id:`${r.id}--${G.VariableHasInputsAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" has inputs. A variable with internal calls can't have inputs.`,issue:null,severity:E.Error,code:G.VariableHasInputsAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedOutputs().length){const t=Q({id:`${r.id}--${G.VariableHasOutputsAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" has outputs. A variable with internal calls can't have outputs.`,issue:null,severity:E.Error,code:G.VariableHasOutputsAndInternalCall,entity:r});e.push(t.error)}if(r.calledBy.length){const t=Q({id:`${r.id}--${G.VariableIsCalledAndHasInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" is called by other entities. A variable with internal calls can't be called by other entities.`,issue:null,severity:E.Error,code:G.VariableIsCalledAndHasInternalCall,entity:r});e.push(t.error)}if([...r.successCalls,...r.errorCalls].length){const t=Q({id:`${r.id}--${G.VariableCallsOthersAndHasInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" calls other entities. A variable with internal calls can't call other entities.`,issue:null,severity:E.Error,code:G.VariableCallsOthersAndHasInternalCall,entity:r});e.push(t.error)}return e}function Eq(r){var o;const e=C6(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(l=>l.validate()),r.outputs.forEach(l=>l.validate()),(o=r.error)==null||o.validate();const s=[...kn(r)];return Be(r.errors,s)}const we=class we{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",i.FunctionCall);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"process",null);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"error",null);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let n=t;if(e.parent){const f=S(e.parent);n=t.get(f)}const a=S(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const R=S(f);return t.get(R)}),l=e.calledBySuccess.map(f=>{const R=S(f);return t.get(R)}),p=e.calledByError.map(f=>{const R=S(f);return t.get(R)}),u={id:e.id,version:1,type:i.FunctionCall,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:n},h=b(u,t);return h.setParent(n),h.initChildren(),h}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[...pt,i.Project],optional:!0}},t);n=s.modifiedData,a.push(...s.errors,...je(n));const o=S(n.declaration);if(o){const l=
|
|
396
|
+
This '${r.type}' is blocked `;t.blocks.forEach((s,o)=>{const l=s.blockedByCaller,p=s.blockedByCalling;o===0?a+="by ":o===t.blocks.length-1&&(a+="and by "),a+=`its ancestor "${w(l,r.project)}" with id "${l.id}" that calls a '${p.type}' entity with id "${p.id}"`,o<t.blocks.length-1?a+=", ":a+="."}),e.push(new Cr({id:`${r.id}--${B.UnreachableEntity}`,code:B.UnreachableEntity,severity:E.Warning,message:`${n}${a}`,issue:null,entity:r}))}}return Be(r.errors,e)}function Hu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=Q({id:`${r.id}--${G.VariableReadsValueAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" reads a value. A variable with internal calls can't read a value.`,issue:null,severity:E.Error,code:G.VariableReadsValueAndInternalCall,entity:r});e.push(t.error)}if(r.writesValues.length){const t=Q({id:`${r.id}--${G.VariableWritesValuesAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" writes values. A variable with internal calls can't write a value.`,issue:null,severity:E.Error,code:G.VariableWritesValuesAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedInputs().length){const t=Q({id:`${r.id}--${G.VariableHasInputsAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" has inputs. A variable with internal calls can't have inputs.`,issue:null,severity:E.Error,code:G.VariableHasInputsAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedOutputs().length){const t=Q({id:`${r.id}--${G.VariableHasOutputsAndInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" has outputs. A variable with internal calls can't have outputs.`,issue:null,severity:E.Error,code:G.VariableHasOutputsAndInternalCall,entity:r});e.push(t.error)}if(r.calledBy.length){const t=Q({id:`${r.id}--${G.VariableIsCalledAndHasInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" is called by other entities. A variable with internal calls can't be called by other entities.`,issue:null,severity:E.Error,code:G.VariableIsCalledAndHasInternalCall,entity:r});e.push(t.error)}if([...r.successCalls,...r.errorCalls].length){const t=Q({id:`${r.id}--${G.VariableCallsOthersAndHasInternalCall}`,message:`Variable "${w(r,r.project)}" with id "${r.id}" calls other entities. A variable with internal calls can't call other entities.`,issue:null,severity:E.Error,code:G.VariableCallsOthersAndHasInternalCall,entity:r});e.push(t.error)}return e}function Eq(r){var o;const e=C6(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(l=>l.validate()),r.outputs.forEach(l=>l.validate()),(o=r.error)==null||o.validate();const s=[...kn(r)];return Be(r.errors,s)}const we=class we{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",i.FunctionCall);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"process",null);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"error",null);c(this,"parent");c(this,"errors",[]);c(this,"project");c(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let n=t;if(e.parent){const f=S(e.parent);n=t.get(f)}const a=S(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const R=S(f);return t.get(R)}),l=e.calledBySuccess.map(f=>{const R=S(f);return t.get(R)}),p=e.calledByError.map(f=>{const R=S(f);return t.get(R)}),u={id:e.id,version:1,type:i.FunctionCall,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:n},h=b(u,t);return h.setParent(n),h.initChildren(),h}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=tt(n,{parent:{list:!1,types:[...pt,i.Project],optional:!0}},t);n=s.modifiedData,a.push(...s.errors,...je(n));const o=S(n.declaration);if(o){const l=DO(o,t);a.push(...l)}else{const l=t.functions.length?`
|
|
397
397
|
All global 'function-declaration' entity ids are:
|
|
398
398
|
- ${t.functions.map(p=>`${p.id} (${w(p,t)})`).join(`
|
|
399
399
|
- `)}.`:`
|
|
400
400
|
The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities.`;a.push(new g({id:`${n.id}--${T.InvalidReference}`,code:T.InvalidReference,severity:E.Error,message:`Entity of type "${i.FunctionCall}" with id "${n.id}", has an invalid reference at the 'declaration' property. The 'declaration' property must be a valid reference to an 'function-declaration' entity.
|
|
401
401
|
References can either be an ID string or an object with exacly four properties: 'id', 'entityId', 'entityType', 'type'.${l}`,issue:null}))}return{errors:a,modifiedData:n}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
402
402
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
403
|
-
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.declaration){const a=S(this.initialData.declaration),s=this.project.get(a);s&&(this.setDeclaration(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addEntryCaller(o),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addSuccessCaller(o),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addErrorCaller(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];this.initialized=!0;const{updated:a,added:s,removed:o}=this.syncMissingFixedInputs(),{updated:l,added:p,removed:u}=this.syncMissingFixedOutputs();return e.push(...a,...l),t.push(...s,...p),n.push(...o,...u),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){var a;const e=[this],t=[],n=[];return this.parent===this.project&&this.project.addFunctionCall(this),(a=this.process)==null||a.writesValues.forEach(s=>{s.setValueWriter(this.process),e.push(s)}),this.successCalls.forEach(s=>{s.addSuccessCaller(this),e.push(s)}),this.errorCalls.forEach(s=>{s.addErrorCaller(this),e.push(s)}),this.calledBySuccess.forEach(s=>{s.addSuccessCall(this),e.push(s)}),this.calledByError.forEach(s=>{s.addErrorCall(this),e.push(s)}),this.calledByEntry.forEach(s=>{s.addCall(this),e.push(s)}),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(n=>n.id===e.id);return t>-1&&this.inputs.splice(t,1),this}addInput(e){return this.inputs.includes(e)?this:(this.inputs.push(e),this)}addOutput(e){return this.outputs.includes(e)?this:(this.outputs.push(e),this)}removeOutput(e){const t=this.outputs.findIndex(n=>n.id===e.id);return t>-1&&this.outputs.splice(t,1),this}addValueReader(e){var t;return(t=this.process)==null||t.addValueReader(e),this}removeValueReader(e){var t;return(t=this.process)==null||t.removeValueReader(e),this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.find(t=>t.id===e.id)||this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.find(t=>t.id===e.id)||this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const n=this.errorCalls.findIndex(a=>a.id===e.id);return n>-1&&this.errorCalls.splice(n,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}setDeclaration(e){return this.declaration=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===i.FunctionDeclaration){const e=b(this.initialData.declaration,this.project);this.declaration=e}else{const e=S(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=b(e,this.project);return t.addSuccessCaller(this),[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=b(e,this.project);return t.addErrorCaller(this),[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=b(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=b(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.afterAllChildrenInitialized(),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await we.repository.load(this.id),this}async create(e=V){return await we.repository.create(this.toShallowJSON()),this}async update(e=V){return await we.repository.update(this.toShallowJSON()),this}async delete(e=V){return await we.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.process){const{affected:o,removed:l}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});n.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});n.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{n.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{n.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{n.push(o),o.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.process){const{affected:n}=this.process.restore({seenEntities:e});t.push(...n)}return this.inputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(n=>{t.push(n),n.addSuccessCaller(this)}),this.errorCalls.forEach(n=>{t.push(n),n.addErrorCaller(this)}),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(n=>n.toFlat(e)),...this.errorCalls.flatMap(n=>n.toFlat(e)),...this.inputs.flatMap(n=>n.toFlat(e)),...this.outputs.flatMap(n=>n.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.error?this.error.toFlat(e):[],...this.calledBy.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.successCalls.flatMap(n=>n.toFlatIds(e)),...this.errorCalls.flatMap(n=>n.toFlatIds(e)),...this.inputs.flatMap(n=>n.toFlatIds(e)),...this.outputs.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){var t,n;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(a=>a.toJSON(e)),errorCalls:this.errorCalls.map(a=>a.toJSON(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference()),calledByError:this.calledByError.map(a=>a.toReference()),calledByEntry:this.calledByEntry.map(a=>a.toReference()),process:(t=this.process)==null?void 0:t.toJSON(e),declaration:this.declaration.toJSON(e),inputs:this.inputs.map(a=>a.toJSON(e)),outputs:this.outputs.map(a=>a.toJSON(e)),parent:this.parent.toReference(),error:(n=this.error)==null?void 0:n.toJSON(e)})}toJSONClone(e=L){var n,a,s,o,l,p,u;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(h=>h.toJSONClone({...e,newId:null})),errorCalls:this.errorCalls.map(h=>h.toJSONClone({...e,newId:null})),calledBySuccess:this.calledBySuccess.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),process:(p=this.process)==null?void 0:p.toJSONClone({...e,newId:null}),declaration:this.declaration.toJSONClone({...e,newId:null}),inputs:this.inputs.map(h=>h.toJSONClone({...e,newId:null})),outputs:this.outputs.map(h=>h.toJSONClone({...e,newId:null})),error:(u=this.error)==null?void 0:u.toJSONClone({...e,newId:null}),parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,process:this.process?this.process.toReference(e):null,inputs:this.inputs.map(a=>a.toReference(e)),outputs:this.outputs.map(a=>a.toReference(e)),declaration:this.declaration.toReference(e),successCalls:this.successCalls.map(a=>a.toReference(e)),errorCalls:this.errorCalls.map(a=>a.toReference(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference(e)),calledByError:this.calledByError.map(a=>a.toReference(e)),calledByEntry:this.calledByEntry.map(a=>a.toReference(e)),error:this.error?this.error.toReference(e):null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(n=>n.toFlatJSON(e)),...this.errorCalls.flatMap(n=>n.toFlatJSON(e)),...this.inputs.flatMap(n=>n.toFlatJSON(e)),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.process?this.process.toFlatJSON(e):[],...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===i.Project?void 0:this.parent.id;return{id:this.id,version:this.version,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.successCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.inputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.process?this.process.toFlatGenerationTarget(e):[],...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(n=>n.clearErrors()),this.outputs.forEach(n=>n.clearErrors()),this.successCalls.forEach(n=>n.clearErrors()),this.errorCalls.forEach(n=>n.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=Eq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var R,v;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.FunctionCall,a);s.inputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(R=this.inputs)==null?void 0:R.map((I,D)=>I.clone(u,p+"-input-map-"+D+"-id",n));u.inputs=h;const f=(v=this.outputs)==null?void 0:v.map((I,D)=>I.clone(u,p+"-output-map-"+D+"-id",n));return u.outputs=f,this.error&&(u.error=this.error.clone(u,p+"-error-map-id",n)),this.process&&(u.process=this.process.clone(u,p+"-process-id",n)),u}removeUnrecognizedInputs(){const e=[],t=[],n=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const o=a.remove();n.push(...o.removed),e.push(...o.affected)}}),{updated:m(e),added:m(t),removed:m(n),self:this}}removeUnrecognizedOutputs(){const e=[],t=[],n=[];return this.outputs.forEach(a=>{if(!this.declaration.getUniqueReturnDeclarations().find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const o=a.remove();n.push(...o.removed),e.push(...o.affected)}}),{updated:m(e),added:m(t),removed:m(n),self:this}}syncMissingFixedInputs(){const e=[],t=[],n=[],a=this.declaration.inputs.filter(p=>!this.inputs.find(u=>u.declaration.id===p.id));this.inputs.sort((p,u)=>p.index-u.index),a.forEach(p=>{this.inputs.forEach(f=>{f.index>=p.index&&f.sync({index:f.index+1})});const u={id:M.UUID.uuid(),version:1,type:i.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=b(u,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject(),t.push(h)}),this.inputs.sort((p,u)=>p.index-u.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),n.push(...l),{updated:m(e),added:m(t),removed:m(n),self:this}}syncMissingFixedOutputs(){const e=[],t=[],n=[],a=[];this.outputs=this.initialData.outputs.map(u=>{const h=b(u,this.project);return a.push(h.index),h.setParent(this),h.initChildren(),h});const s=this.declaration.getUniqueReturnDeclarations().filter(u=>!this.outputs.find(h=>h.declaration.id===u.id));this.outputs.sort((u,h)=>u.index-h.index),s.forEach((u,h)=>{this.outputs.forEach(I=>{I.index>=u.index&&I.index++});const f=a.includes(u.index)?this.outputs.length-1+h:u.index,R={id:M.UUID.uuid(),version:1,type:i.OutputMap,declaration:u.toJSON(),defaultValue:null,writesValues:[],index:f,parent:this.toReference()},v=b(R,this.project);v.setParent(this),v.initChildren(),v.addSelfToProject()}),this.outputs.sort((u,h)=>u.index-h.index);const{updated:o,added:l,removed:p}=this.removeUnrecognizedOutputs();return e.push(...o),t.push(...l),n.push(...p),{updated:m(e),added:m(t),removed:m(n),self:this}}};c(we,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(we,"MUTABLE_BASE_PROPERTIES",[]),c(we,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(we,"BASE_PROPERTIES",[...we.MUTABLE_BASE_PROPERTIES,...we.INMUTABLE_BASE_PROPERTIES]),c(we,"MUTABLE_META_PROPERTIES",["x","y"]),c(we,"INMUTABLE_META_PROPERTIES",[...we.INMUTABLE_BASE_PROPERTIES]),c(we,"META_PROPERTIES",[...we.MUTABLE_META_PROPERTIES,...we.INMUTABLE_META_PROPERTIES]),c(we,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(we,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),c(we,"UPSTREAM_PROPERTIES",[...we.MUTABLE_UPSTREAM_PROPERTIES,...we.INMUTABLE_UPSTREAM_PROPERTIES]),c(we,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),c(we,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(we,"DOWNSTREAM_PROPERTIES",[...we.MUTABLE_DOWNSTREAM_PROPERTIES,...we.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(we,"PROPERTIES",[...we.META_PROPERTIES,...we.UPSTREAM_PROPERTIES,...we.DOWNSTREAM_PROPERTIES]);let Xr=we;function SO(r){var e;switch(r.id){case _["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const t=r.project.entities.filter(p=>!!p.implements.find(u=>u.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(t.find(p=>!!p.properties.find(u=>{var h;return u.implements&&u.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((h=u.getDefaultValue())==null?void 0:h.value)===!0}))){const u=t[0].properties.find(f=>f.implements&&f.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),h=u==null?void 0:u.defaultValue;if(h)h.value=!0;else if(u!=null&&u.dataType){const f=(e=u==null?void 0:u.dataType)==null?void 0:e.id.split("-id")[0],R=b({id:f+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:u==null?void 0:u.dataType.toReference()},r.project);return R.setParent(u==null?void 0:u.dataType),R.initChildren(),R.addSelfToProject(),{newEntities:[R]}}return{newEntities:[]}}const a=r.project.get(_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),s=al(a,"Main database");if(s.errors.length>0)return{newEntities:[]};const o=s.implemented.properties.find(p=>p.implements&&p.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),l=o==null?void 0:o.defaultValue;if(l)l.value=!0;else if(o!=null&&o.dataType){const p=o==null?void 0:o.dataType.id.split("-id")[0],u=b({id:p+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:o==null?void 0:o.dataType.toReference()},r.project);u.setParent(o==null?void 0:o.dataType),u.initChildren(),u.addSelfToProject()}return{newEntities:[s.implemented]}}}return{newEntities:[]}}function OO(r){return r.implements.filter(t=>t.type===i.BuiltInBaseEntity).map(t=>{switch(t.id){case _["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=r.project.entities.filter(l=>l.implements.find(p=>p.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(l=>!!l.properties.find(p=>{var u;return p.implements&&p.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((u=p.getDefaultValue())==null?void 0:u.value)===!0}));if(!a)return{newEntities:[]};const s=r.properties.find(l=>l.implements&&l.implements.id===_["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id),o=s==null?void 0:s.defaultValue;if(s&&(s!=null&&s.dataType)&&!o){const l=s==null?void 0:s.dataType.id.split("-id")[0],p=b({id:l+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:null,valueAsType:a,parent:s==null?void 0:s.dataType.toReference()},r.project);return p.setParent(s==null?void 0:s.dataType),p.initChildren(),p.addSelfToProject(),{newEntities:[p]}}return{newEntities:[]}}}}),{newEntities:[]}}function al(r,e,t){const n=t||de(e,i.DefinitionEntity,r.project),a=n.split("-id"),s=a[a.length-1||0]||n,o={id:n,version:1,name:e,type:i.DefinitionEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[r],x:0,y:0,parent:r.project},l=Zo(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=SO(r),u=b(o,r.project);u.setParent(r.project),u.initChildren();const h=r.properties.map(v=>{const I=s+"-"+de(w(v,r.project),i.Property,r.project),D=v.clone(u,I);return D.abstract=!1,D.implements=v,D.setParent(u),u.addProperty(D),D}),f=r.abstractMethods.map(v=>{const I=s+de(v.name,i.FunctionDeclaration,r.project),D=v.implementAsFunctionDeclaration(I),O={id:I+"-parent-ref-id",type:i.GenericReference,entityId:n,entityType:i.DefinitionEntity},$={...D,implements:v,parent:O},j=b($,r.project);return u.addMethod(j),j.setParent(u),j.initChildren(),j.implements=v,j});o.properties=h,o.methods=f;const R=OO(u);return{implemented:u,errors:[],entitiesChanges:{new:[u,...p.newEntities,...R.newEntities],updated:[u],deleted:[]}}}function zu(r,e){return e.entities.find(a=>{const s=a.properties,o=s.map(f=>f.name),l=r.every(f=>o.includes(f)),p=o.filter(f=>!r.includes(f)),u=s.every(f=>!p.includes(f.name)||!f.required);return l&&u})||null}function PO(r,e,t=et.OrDataTypeGroup){const n=[],a=[],s=[],l={id:e.id+"--nested-data-type-id-"+r.id,version:1,type:i.DataType,entity:r.toJSON(),isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:t,parent:e.toReference()},p=b(l,r.project);return a.push(p),p.setParent(e),p.initChildren(),p.setEntity(r),p.addSelfToProject(),{updated:m(n),added:m(a),removed:m(s),self:p}}function Zu(r,e,t,n){const a=[],s=[],o=[];switch(typeof r){case"string":let l=!1;const p=new Date(r);if(p instanceof Date&&!isNaN(p.valueOf())&&(l=!0),l){const u=e.project.getBuiltIn(_[i.PrimitiveEntity][C.Date].id);e.setEntity(u);break}else{const u=e.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id);e.setEntity(u);break}case"number":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}else if(Array.isArray(r))if(e.sync({isList:!0}),r.length>0){const u=r.slice(0,5).filter(f=>f!==void 0);if(u.every(f=>typeof f==typeof u[0])&&(typeof u[0]!="object"||u[0]===null))switch(typeof u[0]){case"string":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}else{const f=[];let R=!1;u.forEach((I,D)=>{if(Array.isArray(I)&&(R=!0),typeof I=="object"&&!Array.isArray(I)&&I!==null){const O=sl(I,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+D},n);O.hasCreated&&f.push(O.changeSet.self),a.push(...O.changeSet.updated),s.push(...O.changeSet.added),o.push(...O.changeSet.removed)}});const v=m(f);if(!v.length&&!R){u.forEach(I=>{const D={id:M.UUID.uuid(),version:1,type:i.DataType,entity:null,isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:et.OrDataTypeGroup,parent:e.toReference()},O=b(D,e.project);switch(O.setParent(e),O.initChildren(),O.addSelfToProject(),typeof I){case"string":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id));break;case"number":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):u.forEach((I,D)=>{if(typeof I=="object"&&!Array.isArray(I)&&I!==null){const O=zu(Object.keys(I),e.project);if(O){const $=PO(O||v[0],e,et.OrDataTypeGroup);a.push(...$.updated),s.push(...$.added),o.push(...$.removed)}}else{const O={id:e.id+"--or-child-data-type-id--"+D,version:1,type:i.DataType,entity:null,isList:Array.isArray(I),asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:et.OrDataTypeGroup,parent:e.toReference()},$=b(O,e.project);$.setParent(e),$.initChildren(),$.addSelfToProject();const j=Zu(I,$,{...t,id:e.id+"--or-child-data-type-entity-id-"+D},n);a.push(...j.updated),s.push(...j.added),o.push(...j.removed)}})}}else{const u=sl(r[0],e.project,{...t},n);e.setEntity(u.changeSet.self),a.push(...u.changeSet.updated),s.push(...u.changeSet.added),o.push(...u.changeSet.removed);break}else{const u=sl(r,e.project,{...t},n);e.setEntity(u.changeSet.self),a.push(...u.changeSet.updated),s.push(...u.changeSet.added),o.push(...u.changeSet.removed);break}}return{updated:m(a),added:m(s),removed:m(o),self:e}}function sl(r,e,t,n){const a=[],s=[],o=[],l=Object.keys(r),p=zu(l,e);if(p)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],self:p}};const u=n?t.name+" of "+n.name:t.name,f={id:t.id||de(u,i.DefinitionEntity,e),version:1,name:u,type:i.DefinitionEntity,description:t.description||null,static:t.static||!1,abstract:t.abstract||!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[],x:0,y:0,parent:e.toReference()},R=b(f,e);return R.setParent(e),R.initChildren(),R.addSelfToProject(),s.push(R),l.forEach((v,I)=>{const D=de(u+" "+v,i.Property,e),O={id:D,version:1,name:v,type:i.Property,description:null,static:!1,abstract:!1,defaultValue:null,constant:!1,dataType:null,implements:null,index:I,hidden:!1,private:!1,required:!0,parent:R.toReference()},$=b(O,e);$.setParent(R),$.initChildren(),$.addSelfToProject(),s.push($);const j=r[v],oe={id:D+"--data-type-id",version:1,type:i.DataType,entity:null,isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parent:$.toReference()},ae=b(oe,e);ae.setParent($),ae.initChildren(),ae.addSelfToProject(),s.push(ae);const Xe=Zu(j,ae,{...t,name:v,id:D+"--data-type-entity-id"},n||R);a.push(...Xe.updated),s.push(...Xe.added),o.push(...Xe.removed)}),{hasCreated:!0,changeSet:{updated:m(a),added:m(s),removed:m(o),self:R}}}function ol(r,e){const t=Qr(r);if(t.length===0)return{list:[],last:null};let n=null;return{list:t.flatMap(s=>{if(s===e)return n=s,[s];const o=ol(s,e);return o.last&&(n=o.last),[s,...o.list]}),last:n}}function AO(r,e,t=new Set){const n=cr(r),a=cr(e),s=n.filter(p=>!a.includes(p)),o=n.filter(p=>a.includes(p)),l=s.reduce((p,u)=>t.has(u.id)?p:(t.add(u.id),m([...p,...AO(u,e,t)])),[]);return m([...o,...l])}function es(r,e){const t=ol(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function Rq(r,e){return!!ol(r,e).last}function gq(r){if(We.includes(r.type))return r;if([...Xt,i.VariableDeclaration].includes(r.type)){const e=r.parent;return We.includes(e.type)?e:null}return null}function Ku(r,e){if(!r||!e)throw new Error("Both entities must be defined to find a common ancestor");if(r===e)return r;const t=r.parent;if(t){if(t===e)return e;if(t.type===i.Project)return null}else return null;const n=e.parent;if(n){if(n===r)return r;if(n.type===i.Project)return null}else return null;return Ku(t,n)}function lt(r){if(ss.includes(r.type)){if(r.type===i.FunctionDeclaration){const e=r.parent;if(e.type===i.DefinitionEntity)return e;if(e.type===i.Loop)return e}return r}else{const e=r.parent;return e?lt(e):null}}function ll(r,e){const t=ts(r,e);if(!t)return null;if(ss.includes(t.type)){if(t.type===i.FunctionDeclaration){const n=ts(t.parent,e);if(n){if(n.type===i.DefinitionEntity)return n;if(n.type===i.Loop)return n}}return t}else{const n=t.parent?ts(t.parent,e):null;return n?ll(n,e):null}}function CO(r){if(!r)return null;if(Xt.includes(r.type))return r;const e=r.parent;return e?CO(e):null}function wO(r){if(!r)return null;if(Je.includes(r.type))return r;const e=r.parent;return e?wO(e):null}function BO(r){if(!r)return null;if(on.includes(r.type))return r;const e=r.parent;return e?BO(e):null}function bq(r){return r.type===i.VariableDeclaration?[r]:Je.includes(r.type)?[...r.inputs,...r.outputs||[]]:xe.includes(r.type)?r.outputs:ii.includes(r.type)||r.type===i.FunctionDeclaration?r.inputs:[]}function vq(r){const e=cr(r),t=[],n=[];fp.includes(r.type)&&t.push(...Xu(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Xt.includes(s.type)&&!o?(n.push(s),!1):!0});return t.sort((s,o)=>es(o,s)?-1:0),n.sort((s,o)=>es(o,s)?-1:0),[...t,...n,...a]}function MO(r){return[...r].sort((e,t)=>es(t,e)?-1:0)}function Iq(r){const e=MO(r),t=[];return e.forEach(n=>{const a=t[t.length-1];if(a){const s=a[a.length-1];es(n,s)?t.push([n]):a.push(n)}else t.push([n])}),t}function Pt(r){const e=r.map(t=>lt(t));return m(e)}function Xu(r){return Je.includes(r.type)?[...Pt(r.successCalls),...Pt(r.errorCalls)]:We.includes(r.type)?Pt(r.calls):[]}function Dq(r,e){return Xu(r).includes(e)}function Qu(r){return r.writesValues||[]}function Sq(r,e){return Qu(r).includes(e)}function _O(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function Oq(r){return r.writesValues}function VO(r=[]){return r.map(_O).filter(e=>!!e)}function dl(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function NO(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function LO(r){return Fe.includes(r.type)?r:null}function GO(r){return r.writesValues.map(LO).filter(e=>!!e)}function $O(r=[]){return r.reduce((e,t)=>t.type===i.OutputMap?[...e,...GO(t)]:e,[])}function Ue(r){return Je.includes(r.type)?[...vn(Pt(r.successCalls)),...vn(Pt(r.errorCalls))]:We.includes(r.type)?vn(Pt(r.calls)):[]}function Pq(r){return Je.includes(r.type)?[...vn(Pt(r.successCalls)),...vn(Pt(r.errorCalls))]:We.includes(r.type)?vn(Pt(r.calls)):[]}function FO(r,e=new Set){return r.writesValues.filter(n=>Fe.includes(n.type)&&!e.has(n.id)).reduce((n,a)=>e.has(a.id)?n:[...n,...Se(a,e)],[])}function UO(r,e=new Set){var n;return(((n=r.readsValue)==null?void 0:n.writesValues)||[]).filter(a=>Fe.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...Se(s,e)],[])}function Se(r,e=new Set){if(e.has(r.id))return[];if(r.type===i.ReturnStatement)return NO(r.outputs).reduce((n,a)=>[...n,...Se(a,e)],[]);if(r.type===i.FunctionCall||r.type===i.Operation||r.type===i.Condition)return[...Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]),...VO(r.inputs),...$O(r.outputs)].reduce((s,o)=>[...s,...Se(o,e)],[]);if(ii.includes(r.type)){const t=dl(r.inputs),a=Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Se(o,e)],[])}if(r.type===i.FunctionDeclaration){const t=[...dl(r.inputs)],a=Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Se(o)],[])}if(Fe.includes(r.type)){e.add(r.id);const n=Ue(r).reduce((a,s)=>{const o=lt(s);return[...a,...Se(o||s,e)]},[]);return[r,...n,...UO(r,e),...FO(r,e)]}return[]}function Nt(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...cr(r).reduce((a,s)=>[...a,s,...Nt(s,e)],[])])}function vn(r){return r.reduce((e,t)=>t.type===i.ReturnStatement||t.type===i.ContinueStatement||t.type===i.BreakStatement?[...e,t]:[...e,t,...Ue(t)],[])}function xO(r){const e=r.entities||[],t=[...e,...r.functions||[],...r.events||[],...r.projects||[]],n=e.reduce((p,u)=>[...p,...u.properties],[]),a=e.reduce((p,u)=>[...p,...u.methods],[]),s=a.reduce((p,u)=>[...p,...dl(u.inputs),...vn(Pt(u.calls)),...u.returnStatements],[]),o=r.functions.reduce((p,u)=>[...p,...vn(Pt(u.calls)),...u.returnStatements],[]),l=r.events.reduce((p,u)=>[...p,...vn(Pt(u.calls)),...u.returnStatements],[]);return[...t,...n,...a,...s,...o,...l]}function jO(r,e){return e.filter(n=>{if(!n)return!1;switch(n.type){case i.FunctionCall:return n.inputs.find(a=>a.id===r.id)!==void 0||n.outputs.find(a=>a.id===r.id)!==void 0;case i.Condition:return n.successCalls.find(a=>a.id===r.id)!==void 0||n.errorCalls.find(a=>a.id===r.id)!==void 0||n.inputs.find(a=>a.id===r.id)!==void 0;case i.Operation:return n.outputs.find(a=>a.id===r.id)!==void 0;case i.VariableDeclaration:return Je.includes(r.type)?TP(r).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===n.id})!==void 0:!1;case i.DefinitionEntity:return n.properties.find(a=>a.id===r.id)!==void 0||n.methods.find(a=>a.id===r.id)!==void 0;case i.FunctionDeclaration:return n.inputs.find(a=>a.id===r.id)!==void 0||(n.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===r.id)!==void 0;default:return!1}})}function Aq(r){const e=xO(r.project);return jO(r,e)}function ts(r,e){return r?typeof r=="string"?e[r]:r.type===i.GenericReference?e[r.entityId]:e[r.id]?e[r.id]:null:null}function kO(r,e){const t=[];if(Xt.includes(r.type)){qt(r).forEach(s=>{const o=ll(s,e);o&&t.push(o)});const a=[...r.inputs||[],...r.outputs||[]].map(s=>{const o=ts(s,e);return o?RP(o,e):null}).filter(s=>s!==null);t.push(...m(a))}if(Fe.includes(r.type)){const n=ul(r);n&&t.push(n)}return m(t)}function Qr(r){const e=[];if(Xt.includes(r.type)){r.calledBy.forEach(a=>{const s=lt(a);s&&e.push(s)});const n=[...r.inputs||[],...r.outputs||[]].map(a=>ul(a)).filter(a=>a!==null);e.push(...m(n))}if(Fe.includes(r.type)){const t=ul(r);t&&e.push(t)}return m(e)}function qt(r){return[...r.calledByEntry||[],...r.calledByError||[],...r.calledBySuccess||[]]}function qO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ActionDescriptor)throw new Error("Entity must be an action descriptor to be flattened");return[r,...r.inputs.flatMap(n=>P(n,e,t)),...r.outputs.flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function JO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ArgumentDeclaration)throw new Error("Entity must be an argument declaration to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e):[],...r.writesValues.flatMap(n=>P(n,e,t)),...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function WO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.BreakStatement)throw new Error("Entity must be a break statement to be flattened");return[r,...r.outputs.flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function YO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.BuiltInBaseEntity)throw new Error("Entity must be a built-in base entity to be flattened");return[r,...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t)),...(r.extends||[]).flatMap(n=>P(n,e,t))]}function HO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Condition)throw new Error("Entity must be a condition to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function zO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ContinueStatement)throw new Error("Entity must be a continue statement to be flattened");return[r,...r.outputs.flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function ZO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.DefinitionEntity)throw new Error("Entity must be a definition entity to be flattened");return[r,...(r.extends||[]).flatMap(n=>P(n,e,t)),...(r.implements||[]).flatMap(n=>P(n,e,t)),...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function KO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.DataType)throw new Error("Entity must be a data type to be flattened");return[r,...(r.andChildrenGroup||[]).flatMap(n=>P(n,e,t)),...(r.orChildrenGroup||[]).flatMap(n=>P(n,e,t)),...r.entity?P(r.entity,e,t):[],...r.parent?P(r.parent,e,t):[]]}function XO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.FunctionCall)throw new Error("Entity must be a function call to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function QO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.FunctionDeclaration)throw new Error("Entity must be a function declaration to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.returnStatements||[]).flatMap(n=>P(n,e,t)),...(r.calls||[]).flatMap(n=>P(n,e,t)),...r.implements?P(r.implements,e,t):[],...r.parent?P(r.parent,e,t):[]]}function eP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.GlobalEvent)throw new Error("Entity must be a global event to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.calls||[]).flatMap(n=>P(n,e,t)),...(r.returnStatements||[]).flatMap(n=>P(n,e,t)),...r.implements?P(r.implements,e,t):[],...r.parent?P(r.parent,e,t):[]]}function tP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InputMap)throw new Error("Entity must be an input map to be flattened");return[r,...r.readsValue?P(r.readsValue,e,t):[],...r.declaration?P(r.declaration,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.parent?P(r.parent,e,t):[]]}function nP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InstalledProject)throw new Error("Entity must be an installed project to be flattened");return[r,...(r.functions||[]).flatMap(n=>P(n,e,t)),...(r.events||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function rP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InternalCall)throw new Error("Entity must be an internal call to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...r.parent?P(r.parent,e,t):[]]}function iP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.LiteralValue)throw new Error("Entity must be a literal value to be flattened");return[r,...r.valueAsType?Array.isArray(r.valueAsType)?r.valueAsType.flatMap(n=>P(n,e,t)):P(r.valueAsType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function aP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Loop)throw new Error("Entity must be a loop to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...r.body?P(r.body,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...(r.breakStatements||[]).flatMap(n=>P(n,e,t)),...(r.continueStatements||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function sP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Operation)throw new Error("Entity must be an operation to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function oP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.OutputMap)throw new Error("Entity must be an output map to be flattened");return[r,...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.declaration?P(r.declaration,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.parent?P(r.parent,e,t):[]]}function lP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.PrimitiveEntity)throw new Error("Entity must be a primitive entity to be flattened");return[r,...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t))]}function dP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Project)throw new Error("Entity must be a project to be flattened");return[r,...(r.entities||[]).flatMap(n=>P(n,e,t)),...(r.functions||[]).flatMap(n=>P(n,e,t)),...(r.events||[]).flatMap(n=>P(n,e,t)),...(r.projects||[]).flatMap(n=>P(n,e,t)),...(r.variableDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.variableInstances||[]).flatMap(n=>P(n,e,t)),...(r.operations||[]).flatMap(n=>P(n,e,t)),...(r.conditions||[]).flatMap(n=>P(n,e,t)),...(r.functionCalls||[]).flatMap(n=>P(n,e,t)),...(r.projects||[]).flatMap(n=>P(n,e,t)),...(r.loops||[]).flatMap(n=>P(n,e,t)),...(r.searches||[]).flatMap(n=>P(n,e,t))]}function cP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Property)throw new Error("Entity must be a property to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function uP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ReturnDeclaration)throw new Error("Entity must be a return declaration to be flattened");return[r,...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function pP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ReturnStatement)throw new Error("Entity must be a return statement to be flattened");return[r,...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function yP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Search)throw new Error("Entity must be a search to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputsDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputsDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function hP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ValueDescriptor)throw new Error("Entity must be a value descriptor to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function fP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.VariableDeclaration)throw new Error("Entity must be a variable declaration to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.internalCalls||[]).flatMap(n=>P(n,e,t)),...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function mP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.VariableInstance)throw new Error("Entity must be a variable instance to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.internalCalls||[]).flatMap(n=>P(n,e,t)),...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.declaration?P(r.declaration,e,t):[],...r.parent?P(r.parent,e,t):[]]}function ep(){const r=new Set;return hg.flatMap(t=>P(t,r)).map(t=>t.id)}function P(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(!r)throw new Error("Entity must be defined to be flattened");if(r.type===i.GenericReference)return[];if(t.ignoreBuiltInBaseEntities&&(Jn.includes(r.type)||ep().includes(r.id)))return[];if(e.has(r.id))return[];switch(r.type){case i.FunctionCall:return XO(r,e,t);case i.Operation:return sP(r,e,t);case i.Condition:return HO(r,e,t);case i.Loop:return aP(r,e,t);case i.Search:return yP(r,e,t);case i.GlobalEvent:return eP(r,e,t);case i.ReturnStatement:return pP(r,e,t);case i.ContinueStatement:return zO(r,e,t);case i.BreakStatement:return WO(r,e,t);case i.VariableDeclaration:return fP(r,e,t);case i.DefinitionEntity:return ZO(r,e,t);case i.FunctionDeclaration:return QO(r,e,t);case i.Project:return dP(r,e,t);case i.ActionDescriptor:return qO(r,e,t);case i.ArgumentDeclaration:return JO(r,e,t);case i.ReturnDeclaration:return uP(r,e,t);case i.ValueDescriptor:return hP(r,e,t);case i.InputMap:return tP(r,e,t);case i.OutputMap:return oP(r,e,t);case i.DataType:return KO(r,e,t);case i.InstalledProject:return nP(r,e,t);case i.InternalCall:return rP(r,e,t);case i.LiteralValue:return iP(r,e,t);case i.Property:return cP(r,e,t);case i.VariableInstance:return mP(r,e,t);case i.BuiltInBaseEntity:return t.ignoreBuiltInBaseEntities?[]:YO(r,e,t);case i.PrimitiveEntity:return t.ignoreBuiltInBaseEntities?[]:lP(r,e,t)}return[]}function cl(r,e){if(Jn.includes(r.type))return new Set;const t=kO(r,e),n=new Set(t.map(a=>a.id));if(r.type===i.LiteralValue&&r.valueAsType&&(Array.isArray(r.valueAsType)?r.valueAsType.forEach(a=>{n.add(a.id)}):n.add(r.valueAsType.id)),r.type===i.DataType&&r.entity&&(r.entity.type===i.DefinitionEntity?(r.entity.parent.entityId||r.entity.parent.id)!==r.id&&n.add(r.entity.id):n.add(r.entity.id)),yp.includes(r.type)){const a=r.parent;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(hp.includes(r.type)){const a=r.implements;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(gl.includes(r.type)){const a=r.declaration;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(Sn.includes(r.type)){const a=r.readsValue;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(Xt.includes(r.type)){const a=[...r.calledBySuccess||[],...r.calledByEntry||[],...r.calledByError||[]];a.length&&a.forEach(s=>{s.type===i.GenericReference?n.add(s.entityId):n.add(s.id)})}return n}function tp(r){return r.type===i.FunctionCall||r.type===i.InternalCall||[i.Operation,i.Condition,i.Loop].includes(r.type)?r.declaration.inputs:r.type===i.FunctionDeclaration||ii.includes(r.type)?r.inputs:r.type===i.Search?r.inputsDeclarations:[]}function Cq(r,e){return e.type===i.Condition?e.inputs.find(t=>t.declaration.id===r.id):e.type===i.FunctionCall||e.type===i.Operation?e.inputs.find(t=>t.declaration.id===r.id):null}function TP(r){return Je.includes(r.type)?r.inputs:[]}function EP(r){var e;return r.type===i.FunctionCall?((e=r.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[i.Operation,i.Condition,i.Loop].includes(r.type)?r.declaration.outputs:r.type===i.Search?r.outputsDeclarations:xe.includes(r.type)?r.outputs:[]}function wq(r,e){return e.type===i.Condition?null:e.type===i.FunctionCall||e.type===i.Operation?e.outputs.find(t=>t.declaration.id===r.id):null}function Bq(r){return r.type===i.Condition?[]:Je.includes(r.type)?r.outputs:[]}function ul(r){const e=r.readsValue;return e?lt(e):null}function RP(r,e){const t=r.readsValue;return t?ll(t,e):null}function gP(r){const e=r.internalCalls||[];return m(Pt(m(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function Hi(r){const e=Qu(r),t=[];return e.forEach(n=>{if(Fe.includes(n.type))t.push(n);else if(Sn.includes(n.type)){const a=n.parent;t.push(a)}}),t}function m(r){const e=new Set;return r.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function cr(r,e=!1){const t=[];if(r.type===i.Project&&t.push(...(r==null?void 0:r.entities)||[],...(r==null?void 0:r.functions)||[],...(r==null?void 0:r.variableDeclarations)||[],...(r==null?void 0:r.variableInstances)||[],...(r==null?void 0:r.searches)||[],...(r==null?void 0:r.loops)||[],...(r==null?void 0:r.operations)||[],...(r==null?void 0:r.conditions)||[],...(r==null?void 0:r.functionCalls)||[],...(r==null?void 0:r.events)||[],...(r==null?void 0:r.projects)||[]),pt.includes(r.type)&&t.push(...(r==null?void 0:r.detachedChildren)||[]),r.type===i.DefinitionEntity){const n=[...r.suggestedMethods,...r.methods].flatMap(a=>a.collapsed&&e?[]:cr(a));t.push(...n)}if(r.type===i.Condition){const n=r.successCalls.map(s=>lt(s)),a=r.errorCalls.map(s=>lt(s));t.push(...n,...a)}if(ii.includes(r.type)){if(r.collapsed&&e)return[];const n=r.inputs.map(s=>Hi(s)).flat(),a=r.calls.map(s=>lt(s));t.push(...m(n),...a)}if(Je.includes(r.type)&&r.type!==i.Condition&&r.type!==i.Loop){const n=r==null?void 0:r.outputs.map(o=>Hi(o)).flat(),a=r.successCalls.map(o=>lt(o)),s=r.errorCalls.map(o=>lt(o));t.push(...m(n),...a,...s)}if(Fe.includes(r.type)){const n=Hi(r),a=gP(r);t.push(...n,...a)}if(r.type===i.Loop){const n=r.outputs.map(o=>Hi(o)).flat();if(r.body){const o=cr(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>lt(o)),s=r.successCalls.map(o=>lt(o));t.push(...m(n),...s,...a)}if(r.type===i.FunctionDeclaration){if(r.collapsed&&e)return[];const n=r.inputs.map(s=>Hi(s)).flat(),a=r.calls.map(s=>lt(s));t.push(...m(n),...a)}return m(t)}function bP(r,e=!1){const t=cr(r,e),n=[...t,...t.reduce((a,s)=>[...a,...bP(s,e)],[])];return m(n)}function vP(r){const e=Qr(r),t=[...e,...e.reduce((n,a)=>[...n,...vP(a)],[])];return m(t)}function pl(r){return r.implements.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,i.DefinitionEntity,...pl(t),...yl(t)]:[...e,t.name],[])}function yl(r){return r.extends.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,i.DefinitionEntity,...yl(t),...pl(t)]:[...e,t.name],[])}function np(r){return r.extends.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,t,...np(t),...rp(t)]:[...e,t],[])}function rp(r){return r.implements.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,t,...rp(t),...np(t)]:[...e,t],[])}function ip(r){return[...yl(r),...pl(r)].filter((t,n,a)=>a.indexOf(t)===n)}function IP(r){return r.implements.length===0&&r.extends.length===0?null:r.implements.find(n=>n.type===i.BuiltInBaseEntity&&n.name===U.PERSISTED_ENTITY)?r:[...r.implements,...r.extends].reduce((n,a)=>{if(a.type===i.DefinitionEntity){const s=IP(a);if(s)return s}return n},null)}function Mq(r){const e=r.extends.find(t=>t.type===i.BuiltInBaseEntity);return e&&e.type===i.BuiltInBaseEntity?e:null}function _q(r){const e=r.implements.find(t=>t.type===i.BuiltInBaseEntity);return e&&e.type===i.BuiltInBaseEntity?e:null}function ap(r){const e=r.extends.find(t=>t.type===i.DefinitionEntity);return e&&e.type===i.DefinitionEntity?e:null}function ur(r){const e=[...r.implements,...r.extends].reduce((t,n)=>n.type===i.BuiltInBaseEntity?[...t,n]:n.type===i.DefinitionEntity?[...t,...ur(n)]:t,[]);return m(e)}function sp(r){return r.type===i.PrimitiveEntity?!0:r.type===i.BuiltInBaseEntity?r.interactive:!ur(r).find(n=>!n.interactive)}function Vq(r){return r.parent===r.project&&r.project.variableDeclarations.includes(r)}function op(r){return r.parent!==r.project?!1:i.VariableDeclaration===r.type?r.project.variableDeclarations.includes(r):i.VariableInstance===r.type?r.project.variableInstances.includes(r):i.FunctionCall===r.type?r.project.functionCalls.includes(r):i.Condition===r.type?r.project.conditions.includes(r):i.Operation===r.type?r.project.operations.includes(r):i.Loop===r.type?r.project.loops.includes(r):i.Search===r.type?r.project.searches.includes(r):!1}function DP(r){if([...We,i.DefinitionEntity,i.InstalledProject,i.Project].includes(r.type)||op(r))return!1;const e=Qr(r);return e.length===0?!0:e.some(t=>DP(t))}function lp(r){return[...We,i.DefinitionEntity,i.InstalledProject,i.Project].includes(r.type)||op(r)?!1:Qr(r).length===0}function SP(r,e=0){if(lp(r)){const t=Qr(r);return t.length===0?r:t.map(a=>SP(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function OP(r){const e=[];if(lp(r))e.push(r);else return[];return Qr(r).forEach(n=>{e.push(...OP(n))}),e}function PP(r){return r.type===i.FunctionDeclaration&&r.parent!==r.project&&!![i.DefinitionEntity,i.Loop,i.InstalledProject].includes(r.parent.type)}function Nq(r,e){const t=new Map;return r.forEach(n=>{t.set(n.id,n)}),e.forEach(n=>{t.set(n.id,n)}),Array.from(t.values())}function hl(r){switch(r){case i.DefinitionEntity:return ei;case i.FunctionDeclaration:return jr;case i.VariableDeclaration:return sn;case i.VariableInstance:return Wr;case i.FunctionCall:return Xr;case i.Operation:return kr;case i.Condition:return Jr;case i.ReturnStatement:return Zr;case i.Loop:return qr;case i.Search:return Yr;case i.InputMap:return xn;case i.OutputMap:return jn;case i.ArgumentDeclaration:return zr;case i.ReturnDeclaration:return kt;case i.Property:return xr;case i.InstalledProject:return Hr;case i.Project:return M;case i.BuiltInBaseEntity:return In;default:return null}}function At(r,e){if(pt.includes(r.type))return r;if(Jn.includes(r.type))return null;const t=r.parent;if(!t)return null;if(t.type===i.GenericReference){const n=S(t);if(!n)return null;const a=e.get(n);return a?At(a,e):null}else return t===e?e:At(t,e)}function dp(r,e){if(Jn.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Lt(r.parent,e);return t?t===e?pt.includes(r.type)?r:null:t.type===i.DefinitionEntity?r:dp(t,e):null}function fl(r,e,t){if(r===e||e===t||r===t)return!1;const n=At(e.parent,t);return n===r?!0:fl(n,e,t)}var ml=(r=>(r.SameBothLocal="same-both-local",r.AInB="a-in-b",r.BInA="b-in-a",r.ParallelInCommonParent="parallel-in-common-parent",r.ParallelInProject="parallel-in-project",r.AIsGlobalBIsNot="a-is-global-b-is-not",r.BIsGlobalAIsNot="b-is-global-a-is-not",r.SameBothGlobal="same-both-global",r))(ml||{});function ns(r,e,t){const n=At(r,t),a=At(e,t);if(!n)throw new Error("Could not find scope owner for the entity: "+r.id);if(!a)throw new Error("Could not find scope owner for the entity: "+e.id);if(n===a&&n.type!==i.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:n};if(n===a&&n.type===i.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:n};if(n.type===i.Project&&a.type!==i.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:n};if(n.type!==i.Project&&a.type===i.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(fl(n,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:n};if(fl(a,n,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=Ku(n,a);return l===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:l}:l?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:At(l,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function AP(r,e,t){const n=ns(r,e,t);if(!n.compatible||n.type!=="same-both-local")return null;if(r===e)return r;let a=At(r.parent,t);if(a){if(a===e)return e;if(a.type===i.Project)return r}else return r;for(;a;){if(a){if(a===e)return e;if(a.type===i.Project)return r}else return r;a=At(a.parent,t)}let s=At(e.parent,t);if(s){if(s===r)return r;if(s.type===i.Project)return e}else return e;for(;s;){if(s){if(s===r)return r;if(s.type===i.Project)return e}else return e;s=At(s.parent,t)}return null}function CP(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,n)=>{const a=AP(t,n,n.project);return!a||a===n?t:n},r[0])}function Lt(r,e){if(!r)return null;let t;return typeof r=="string"?t=r:r.type===i.GenericReference?t=S(r):t=r.id,t===e.id?e:e.get(t)}function pr(r){if(!r)return null;if(Jn.includes(r.type))return r;if(r.type===i.Project)return null;if(r.project.getBuiltIn(r.id))return r;const e=r.parent;return!e||e.type===i.Project?null:pr(e)}function Lq(r,e){var t;if(r.readsValue){const n=Lt(r.readsValue,e.project);e.setValueWriter(n),n.addValueReader(e)}else r.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function rs(r){const e=[];function t(s,o){return e.some(l=>l.blockedByCaller===s&&l.blockedByCalling===o)}function n(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=dp(r,r.project);return r.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))});let l;if(Je.includes(s.type)&&(l=s),l){const p=rs(l);p.reachable||Ue(r).find(f=>f===s)||p.blocks.forEach(f=>{n(s,f.blockedByCalling)})}}),r.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))});let l;if(Je.includes(s.type)&&(l=s),l){const p=rs(l);p.reachable||Ue(r).find(f=>f===s)||p.blocks.forEach(f=>{n(s,f.blockedByCalling)})}}),r.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))}),s===a)return;let l;if(s.type===i.FunctionDeclaration){const p=lt(s);if(p.type===i.DefinitionEntity)return;p.type===i.Loop&&(l=p)}if(l){const p=rs(l);p.reachable||p.blocks.forEach(u=>{n(s,u.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function Gq(r){return ss.includes(r.type)?r.type===i.FunctionDeclaration?!PP(r):!0:!1}function $q(r){if(i.ActionDescriptor===r.type){if(r.project.operationDeclarations.find(s=>s.id===r.id))return i.Operation;if(r.project.globalEventActionDescriptors.find(s=>s.id===r.id))return i.GlobalEvent;if(r.project.loopDeclarations.find(s=>s.id===r.id))return i.Loop;if(r.project.conditionDeclarations.find(s=>s.id===r.id))return i.Condition}return r.type}function zi(r,e){if(r.type!==i.DefinitionEntity||r.abstract)return!1;const t=ap(r)||r;return!!ip(t).includes(e)}function Fq(r){const e=[];return r.entities.forEach(t=>{if(zi(t,U.PERSISTED_ENTITY)){e.push(t);return}}),m(e)}function Uq(r){const e=[];return r.entities.forEach(t=>{if(zi(t,U.RELATIONAL_DATABASE)){e.push(t);return}}),m(e)}function xq(r){return r.type!==i.DefinitionEntity||r.abstract||!zi(r,U.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>{var n;return((n=t.implements)==null?void 0:n.id)===_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.primaryKey.id&&!t.abstract}))||null}function jq(r){if(r.type!==i.DefinitionEntity)return[];if(r.abstract)return[];if(!zi(r,U.PERSISTED_ENTITY))return[];const e=[],t=r.properties.filter(n=>{var a;return((a=n.implements)==null?void 0:a.id)!==_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.database.id&&!n.abstract});return e.push(...t),e}function kq(r){var t;if(!r||r.type!==i.DefinitionEntity||!zi(r,U.PERSISTED_ENTITY))return null;const e=r.properties.find(n=>{var a;return((a=n.implements)==null?void 0:a.id)===_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.database.id});return(t=e==null?void 0:e.getDefaultValue())==null?void 0:t.valueAsType}function He(r,e){var n;if(!Tp.includes(e.type)||!r)return e.project||null;let t=e.project;return r.type===i.Project?t=r:((n=e.project)==null?void 0:n.id)!==r.project.id&&(t=r.project),t}function qq(r,e){const t=[];if(r.parent)if(r.id===r.parent)t.push(new g({id:`${r.id}--${r.parent}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at 'parent'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));else{const n=e.get(r.parent);n?[i.Project,i.DataType].includes(n.type)||t.push(new g({id:`${r.id}--${r.parent}--${T.InvalidParentReference}`,code:T.InvalidParentReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`,issue:null})):t.push(new g({id:`${r.id}--${r.parent}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${r.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return r.implements&&Array.isArray(r.implements)?r.implements.forEach(n=>{if(r.id===n){t.push(new g({id:`${r.id}--${n}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at one of the 'implements' references. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));return}const a=e.get(n);a?[i.DefinitionEntity,i.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new g({id:`${r.id}--${n}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}):t.push(new g({id:`${r.id}--${B.InvalidObjectStructure}`,code:B.InvalidObjectStructure,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' property that isn't an array.`,issue:null})),r.extends&&Array.isArray(r.extends)&&r.extends.forEach(n=>{const a=e.get(n);a?[i.DefinitionEntity,i.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new g({id:`${r.id}--${n}--${T.InvalidExtendsReference}`,code:T.InvalidExtendsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to a non-abstract entity. Did you want to use the property 'implements', which holds a list of references to absract entities, instead?`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.InvalidExtendsReference}`,code:T.InvalidExtendsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}),t}const De=class De{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"static");c(this,"abstract");c(this,"type",i.DefinitionEntity);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"implements",[]);c(this,"project");c(this,"errors",[]);c(this,"parent");c(this,"initialized",!1);c(this,"suggestedProperties",[]);c(this,"suggestedMethods",[]);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=e.x,this.y=e.y,this.static=e.static,this.abstract=e.abstract}static fromGenerationTarget(e,t){let n=t;if(e.parent){const p=S(e.parent);n=t.get(p)}const a=[];e.implements&&e.implements.forEach(p=>{a.push(t.get(p)||t.getBuiltIn(p))});const s=[];e.extends&&e.extends.forEach(p=>{s.push(t.get(p)||t.getBuiltIn(p))});const o={id:e.id,version:1,name:e.name,type:i.DefinitionEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:n},l=b(o,t);return l.setParent(n),l.initChildren(),l}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=qq(n,t),o=Zo(n,t);a.push(...s,...o,...je(n));const l=n.parent?t.get(n.parent):null;if(l&&l.type===i.DataType){const p=l;p.entity&&a.push(new g({id:`${e.id}--${T.NewEntityWouldOverriteExisting}`,code:T.NewEntityWouldOverriteExisting,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${p.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
|
|
403
|
+
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}if(this.initialData.declaration){const a=S(this.initialData.declaration),s=this.project.get(a);s&&(this.setDeclaration(s),e.push(s))}return this.initialData.calledByEntry.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addEntryCaller(o),e.push(o))}),this.initialData.calledBySuccess.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addSuccessCaller(o),e.push(o))}),this.initialData.calledByError.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addErrorCaller(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];this.initialized=!0;const{updated:a,added:s,removed:o}=this.syncMissingFixedInputs(),{updated:l,added:p,removed:u}=this.syncMissingFixedOutputs();return e.push(...a,...l),t.push(...s,...p),n.push(...o,...u),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){var a;const e=[this],t=[],n=[];return this.parent===this.project&&this.project.addFunctionCall(this),(a=this.process)==null||a.writesValues.forEach(s=>{s.setValueWriter(this.process),e.push(s)}),this.successCalls.forEach(s=>{s.addSuccessCaller(this),e.push(s)}),this.errorCalls.forEach(s=>{s.addErrorCaller(this),e.push(s)}),this.calledBySuccess.forEach(s=>{s.addSuccessCall(this),e.push(s)}),this.calledByError.forEach(s=>{s.addErrorCall(this),e.push(s)}),this.calledByEntry.forEach(s=>{s.addCall(this),e.push(s)}),{updated:m(e),added:m(t),removed:m(n),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(n=>n.id===e.id);return t>-1&&this.inputs.splice(t,1),this}addInput(e){return this.inputs.includes(e)?this:(this.inputs.push(e),this)}addOutput(e){return this.outputs.includes(e)?this:(this.outputs.push(e),this)}removeOutput(e){const t=this.outputs.findIndex(n=>n.id===e.id);return t>-1&&this.outputs.splice(t,1),this}addValueReader(e){var t;return(t=this.process)==null||t.addValueReader(e),this}removeValueReader(e){var t;return(t=this.process)==null||t.removeValueReader(e),this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.find(t=>t.id===e.id)||this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.find(t=>t.id===e.id)||this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const n=this.errorCalls.findIndex(a=>a.id===e.id);return n>-1&&this.errorCalls.splice(n,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}setDeclaration(e){return this.declaration=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===i.FunctionDeclaration){const e=b(this.initialData.declaration,this.project);this.declaration=e}else{const e=S(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=b(e,this.project);return t.addSuccessCaller(this),[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=b(e,this.project);return t.addErrorCaller(this),[i.BreakStatement,i.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==i.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=b(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=b(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.afterAllChildrenInitialized(),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await we.repository.load(this.id),this}async create(e=V){return await we.repository.create(this.toShallowJSON()),this}async update(e=V){return await we.repository.update(this.toShallowJSON()),this}async delete(e=V){return await we.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const n=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.process){const{affected:o,removed:l}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});n.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});n.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{n.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{n.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{n.push(o),o.removeCall(this)}),{affected:m(n),removed:m(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.process){const{affected:n}=this.process.restore({seenEntities:e});t.push(...n)}return this.inputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(n=>{t.push(n),n.addSuccessCaller(this)}),this.errorCalls.forEach(n=>{t.push(n),n.addErrorCaller(this)}),this.calledBySuccess.forEach(n=>{t.push(n),n.addSuccessCall(this)}),this.calledByError.forEach(n=>{t.push(n),n.addErrorCall(this)}),this.calledByEntry.forEach(n=>{t.push(n),n.addCall(this)}),{affected:m(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(n=>n.toFlat(e)),...this.errorCalls.flatMap(n=>n.toFlat(e)),...this.inputs.flatMap(n=>n.toFlat(e)),...this.outputs.flatMap(n=>n.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.error?this.error.toFlat(e):[],...this.calledBy.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.successCalls.flatMap(n=>n.toFlatIds(e)),...this.errorCalls.flatMap(n=>n.toFlatIds(e)),...this.inputs.flatMap(n=>n.toFlatIds(e)),...this.outputs.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){var t,n;return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(a=>a.toJSON(e)),errorCalls:this.errorCalls.map(a=>a.toJSON(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference()),calledByError:this.calledByError.map(a=>a.toReference()),calledByEntry:this.calledByEntry.map(a=>a.toReference()),process:(t=this.process)==null?void 0:t.toJSON(e),declaration:this.declaration.toJSON(e),inputs:this.inputs.map(a=>a.toJSON(e)),outputs:this.outputs.map(a=>a.toJSON(e)),parent:this.parent.toReference(),error:(n=this.error)==null?void 0:n.toJSON(e)})}toJSONClone(e=L){var n,a,s,o,l,p,u;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(h=>h.toJSONClone({...e,newId:null})),errorCalls:this.errorCalls.map(h=>h.toJSONClone({...e,newId:null})),calledBySuccess:this.calledBySuccess.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByError:this.calledByError.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),calledByEntry:this.calledByEntry.map(h=>h.toReference({seenEntityMaps:e.seenEntityMaps})),process:(p=this.process)==null?void 0:p.toJSONClone({...e,newId:null}),declaration:this.declaration.toJSONClone({...e,newId:null}),inputs:this.inputs.map(h=>h.toJSONClone({...e,newId:null})),outputs:this.outputs.map(h=>h.toJSONClone({...e,newId:null})),error:(u=this.error)==null?void 0:u.toJSONClone({...e,newId:null}),parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,x:this.x,y:this.y,process:this.process?this.process.toReference(e):null,inputs:this.inputs.map(a=>a.toReference(e)),outputs:this.outputs.map(a=>a.toReference(e)),declaration:this.declaration.toReference(e),successCalls:this.successCalls.map(a=>a.toReference(e)),errorCalls:this.errorCalls.map(a=>a.toReference(e)),calledBySuccess:this.calledBySuccess.map(a=>a.toReference(e)),calledByError:this.calledByError.map(a=>a.toReference(e)),calledByEntry:this.calledByEntry.map(a=>a.toReference(e)),error:this.error?this.error.toReference(e):null,parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(n=>n.toFlatJSON(e)),...this.errorCalls.flatMap(n=>n.toFlatJSON(e)),...this.inputs.flatMap(n=>n.toFlatJSON(e)),...this.outputs.flatMap(n=>n.toFlatJSON(e)),...this.process?this.process.toFlatJSON(e):[],...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===i.Project?void 0:this.parent.id;return{id:this.id,version:this.version,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.successCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.inputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.outputs.flatMap(n=>n.toFlatGenerationTarget(e)),...this.process?this.process.toFlatGenerationTarget(e):[],...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(n=>n.clearErrors()),this.outputs.forEach(n=>n.clearErrors()),this.successCalls.forEach(n=>n.clearErrors()),this.errorCalls.forEach(n=>n.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=Eq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var R,v;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.FunctionCall,a);s.inputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e?u.setParent(e):u.setParent(this.parent),n&&u.subscribe(),u.initChildren();const h=(R=this.inputs)==null?void 0:R.map((I,D)=>I.clone(u,p+"-input-map-"+D+"-id",n));u.inputs=h;const f=(v=this.outputs)==null?void 0:v.map((I,D)=>I.clone(u,p+"-output-map-"+D+"-id",n));return u.outputs=f,this.error&&(u.error=this.error.clone(u,p+"-error-map-id",n)),this.process&&(u.process=this.process.clone(u,p+"-process-id",n)),u}removeUnrecognizedInputs(){const e=[],t=[],n=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const o=a.remove();n.push(...o.removed),e.push(...o.affected)}}),{updated:m(e),added:m(t),removed:m(n),self:this}}removeUnrecognizedOutputs(){const e=[],t=[],n=[];return this.outputs.forEach(a=>{if(!this.declaration.getUniqueReturnDeclarations().find(o=>{var l;return o.id===((l=a.declaration)==null?void 0:l.id)})){const o=a.remove();n.push(...o.removed),e.push(...o.affected)}}),{updated:m(e),added:m(t),removed:m(n),self:this}}syncMissingFixedInputs(){const e=[],t=[],n=[],a=this.declaration.inputs.filter(p=>!this.inputs.find(u=>u.declaration.id===p.id));this.inputs.sort((p,u)=>p.index-u.index),a.forEach(p=>{this.inputs.forEach(f=>{f.index>=p.index&&f.sync({index:f.index+1})});const u={id:M.UUID.uuid(),version:1,type:i.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=b(u,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject(),t.push(h)}),this.inputs.sort((p,u)=>p.index-u.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),n.push(...l),{updated:m(e),added:m(t),removed:m(n),self:this}}syncMissingFixedOutputs(){const e=[],t=[],n=[],a=[];this.outputs=this.initialData.outputs.map(u=>{const h=b(u,this.project);return a.push(h.index),h.setParent(this),h.initChildren(),h});const s=this.declaration.getUniqueReturnDeclarations().filter(u=>!this.outputs.find(h=>h.declaration.id===u.id));this.outputs.sort((u,h)=>u.index-h.index),s.forEach((u,h)=>{this.outputs.forEach(I=>{I.index>=u.index&&I.index++});const f=a.includes(u.index)?this.outputs.length-1+h:u.index,R={id:M.UUID.uuid(),version:1,type:i.OutputMap,declaration:u.toJSON(),defaultValue:null,writesValues:[],index:f,parent:this.toReference()},v=b(R,this.project);v.setParent(this),v.initChildren(),v.addSelfToProject()}),this.outputs.sort((u,h)=>u.index-h.index);const{updated:o,added:l,removed:p}=this.removeUnrecognizedOutputs();return e.push(...o),t.push(...l),n.push(...p),{updated:m(e),added:m(t),removed:m(n),self:this}}};c(we,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(we,"MUTABLE_BASE_PROPERTIES",[]),c(we,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(we,"BASE_PROPERTIES",[...we.MUTABLE_BASE_PROPERTIES,...we.INMUTABLE_BASE_PROPERTIES]),c(we,"MUTABLE_META_PROPERTIES",["x","y"]),c(we,"INMUTABLE_META_PROPERTIES",[...we.INMUTABLE_BASE_PROPERTIES]),c(we,"META_PROPERTIES",[...we.MUTABLE_META_PROPERTIES,...we.INMUTABLE_META_PROPERTIES]),c(we,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(we,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),c(we,"UPSTREAM_PROPERTIES",[...we.MUTABLE_UPSTREAM_PROPERTIES,...we.INMUTABLE_UPSTREAM_PROPERTIES]),c(we,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),c(we,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(we,"DOWNSTREAM_PROPERTIES",[...we.MUTABLE_DOWNSTREAM_PROPERTIES,...we.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(we,"PROPERTIES",[...we.META_PROPERTIES,...we.UPSTREAM_PROPERTIES,...we.DOWNSTREAM_PROPERTIES]);let Xr=we;function zu(r){return r&&typeof r.then=="function"}class Zu{constructor(e){c(this,"order",[]);c(this,"flatRecord",{});c(this,"onGoingVisits",{});this.flatten(e),this.orderEntities()}flatten(e){const t=new Set(np()),n=m(P(e,t,{ignoreBuiltInBaseEntities:!0})),a=new Set;for(const s of n)this.flatRecord[s.id]=s,a.add(s.id);this.order=Array.from(a)}moveEntityAfterDependencies(e){const t=cl(e,this.flatRecord);for(const n of t){const a=this.order.indexOf(n),s=this.order.indexOf(e.id);if(a>s)return this.order.splice(s,1),this.order.splice(a,0,e.id),!0}return!1}orderEntities(){let e=!1;for(let t=0;t<this.order.length;t++){const n=this.order[t],a=this.flatRecord[n];if(this.moveEntityAfterDependencies(a)){e=!0;break}}e&&this.orderEntities()}getUpstreamOngoingDependenciesVisits(e,t){const n=cl(this.flatRecord[e],this.flatRecord),a={};return Object.entries(this.onGoingVisits[t]||{}).forEach(([s,o])=>{Array.from(n).includes(s)&&(a[s]=o)}),a}getDownstreamOngoingDependenciesVisits(e,t){const n=Object.keys(this.onGoingVisits[t]||{}),a=new Set(n.flatMap(o=>Array.from(cl(this.flatRecord[o],this.flatRecord)))),s={};return Array.from(a).forEach(o=>{o===e&&(s[o]=this.onGoingVisits[t][o])}),s}async settlePromises(e,t){const n=Object.values(e);n.length&&await Promise.all(n),Object.keys(e).forEach(a=>{delete this.onGoingVisits[t][a]})}visit(e){const t=this.order;for(const n of t)e(this.flatRecord[n]);return this}reverseVisit(e){const t=this.order.slice().reverse();for(const n of t)e(this.flatRecord[n]);return this}async visitAsync(e){const t=this.order,n=Math.random().toString(36).substring(7);this.onGoingVisits[n]={};for(const a of t){const s=this.getUpstreamOngoingDependenciesVisits(a,n);Object.keys(s).length&&await this.settlePromises(s,n);const o=e(this.flatRecord[a]);zu(o)&&(this.onGoingVisits[n][a]=o)}return await this.settlePromises(this.onGoingVisits[n],n),this.onGoingVisits[n]={},this}async reverseVisitAsync(e){const t=this.order.slice().reverse(),n=Math.random().toString(36).substring(7);this.onGoingVisits[n]={};for(const a of t){const s=this.getDownstreamOngoingDependenciesVisits(a,n);Object.keys(s).length&&await this.settlePromises(s,n);const o=e(this.flatRecord[a]);zu(o)&&(this.onGoingVisits[n][a]=o)}return await this.settlePromises(this.onGoingVisits[n],n),this.onGoingVisits[n]={},this}}function PO(r){var e;switch(r.id){case _["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const t=r.project.entities.filter(p=>!!p.implements.find(u=>u.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(t.find(p=>!!p.properties.find(u=>{var h;return u.implements&&u.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((h=u.getDefaultValue())==null?void 0:h.value)===!0}))){const u=t[0].properties.find(f=>f.implements&&f.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),h=u==null?void 0:u.defaultValue;if(h)h.value=!0;else if(u!=null&&u.dataType){const f=(e=u==null?void 0:u.dataType)==null?void 0:e.id.split("-id")[0],R=b({id:f+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:u==null?void 0:u.dataType.toReference()},r.project);return R.setParent(u==null?void 0:u.dataType),R.initChildren(),R.addSelfToProject(),{newEntities:[R]}}return{newEntities:[]}}const a=r.project.get(_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),s=al(a,"Main database");if(s.errors.length>0)return{newEntities:[]};const o=s.implemented.properties.find(p=>p.implements&&p.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),l=o==null?void 0:o.defaultValue;if(l)l.value=!0;else if(o!=null&&o.dataType){const p=o==null?void 0:o.dataType.id.split("-id")[0],u=b({id:p+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:o==null?void 0:o.dataType.toReference()},r.project);u.setParent(o==null?void 0:o.dataType),u.initChildren(),u.addSelfToProject()}return{newEntities:[s.implemented]}}}return{newEntities:[]}}function AO(r){return r.implements.filter(t=>t.type===i.BuiltInBaseEntity).map(t=>{switch(t.id){case _["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=r.project.entities.filter(l=>l.implements.find(p=>p.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(l=>!!l.properties.find(p=>{var u;return p.implements&&p.implements.id===_["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((u=p.getDefaultValue())==null?void 0:u.value)===!0}));if(!a)return{newEntities:[]};const s=r.properties.find(l=>l.implements&&l.implements.id===_["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id),o=s==null?void 0:s.defaultValue;if(s&&(s!=null&&s.dataType)&&!o){const l=s==null?void 0:s.dataType.id.split("-id")[0],p=b({id:l+"-default-value-id",version:1,type:i.LiteralValue,name:C.EntityTemplate,autogeneration:null,value:null,valueAsType:a,parent:s==null?void 0:s.dataType.toReference()},r.project);return p.setParent(s==null?void 0:s.dataType),p.initChildren(),p.addSelfToProject(),{newEntities:[p]}}return{newEntities:[]}}}}),{newEntities:[]}}function al(r,e,t){const n=t||de(e,i.DefinitionEntity,r.project),a=n.split("-id"),s=a[a.length-1||0]||n,o={id:n,version:1,name:e,type:i.DefinitionEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[r],x:0,y:0,parent:r.project},l=Zo(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=PO(r),u=b(o,r.project);u.setParent(r.project),u.initChildren();const h=r.properties.map(v=>{const I=s+"-"+de(w(v,r.project),i.Property,r.project),D=v.clone(u,I);return D.abstract=!1,D.implements=v,D.setParent(u),u.addProperty(D),D}),f=r.abstractMethods.map(v=>{const I=s+de(v.name,i.FunctionDeclaration,r.project),D=v.implementAsFunctionDeclaration(I),O={id:I+"-parent-ref-id",type:i.GenericReference,entityId:n,entityType:i.DefinitionEntity},$={...D,implements:v,parent:O},j=b($,r.project);return u.addMethod(j),j.setParent(u),j.initChildren(),j.implements=v,j});o.properties=h,o.methods=f;const R=AO(u);return{implemented:u,errors:[],entitiesChanges:{new:[u,...p.newEntities,...R.newEntities],updated:[u],deleted:[]}}}function Ku(r,e){return e.entities.find(a=>{const s=a.properties,o=s.map(f=>f.name),l=r.every(f=>o.includes(f)),p=o.filter(f=>!r.includes(f)),u=s.every(f=>!p.includes(f.name)||!f.required);return l&&u})||null}function CO(r,e,t=et.OrDataTypeGroup){const n=[],a=[],s=[],l={id:e.id+"--nested-data-type-id-"+r.id,version:1,type:i.DataType,entity:r.toJSON(),isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:t,parent:e.toReference()},p=b(l,r.project);return a.push(p),p.setParent(e),p.initChildren(),p.setEntity(r),p.addSelfToProject(),{updated:m(n),added:m(a),removed:m(s),self:p}}function Xu(r,e,t,n){const a=[],s=[],o=[];switch(typeof r){case"string":let l=!1;const p=new Date(r);if(p instanceof Date&&!isNaN(p.valueOf())&&(l=!0),l){const u=e.project.getBuiltIn(_[i.PrimitiveEntity][C.Date].id);e.setEntity(u);break}else{const u=e.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id);e.setEntity(u);break}case"number":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}else if(Array.isArray(r))if(e.sync({isList:!0}),r.length>0){const u=r.slice(0,5).filter(f=>f!==void 0);if(u.every(f=>typeof f==typeof u[0])&&(typeof u[0]!="object"||u[0]===null))switch(typeof u[0]){case"string":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}else{const f=[];let R=!1;u.forEach((I,D)=>{if(Array.isArray(I)&&(R=!0),typeof I=="object"&&!Array.isArray(I)&&I!==null){const O=sl(I,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+D},n);O.hasCreated&&f.push(O.changeSet.self),a.push(...O.changeSet.updated),s.push(...O.changeSet.added),o.push(...O.changeSet.removed)}});const v=m(f);if(!v.length&&!R){u.forEach(I=>{const D={id:M.UUID.uuid(),version:1,type:i.DataType,entity:null,isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:et.OrDataTypeGroup,parent:e.toReference()},O=b(D,e.project);switch(O.setParent(e),O.initChildren(),O.addSelfToProject(),typeof I){case"string":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.String].id));break;case"number":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Number].id));break;case"boolean":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Boolean].id));break;case"object":O.setEntity(O.project.getBuiltIn(_[i.PrimitiveEntity][C.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):u.forEach((I,D)=>{if(typeof I=="object"&&!Array.isArray(I)&&I!==null){const O=Ku(Object.keys(I),e.project);if(O){const $=CO(O||v[0],e,et.OrDataTypeGroup);a.push(...$.updated),s.push(...$.added),o.push(...$.removed)}}else{const O={id:e.id+"--or-child-data-type-id--"+D,version:1,type:i.DataType,entity:null,isList:Array.isArray(I),asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parentRelationType:et.OrDataTypeGroup,parent:e.toReference()},$=b(O,e.project);$.setParent(e),$.initChildren(),$.addSelfToProject();const j=Xu(I,$,{...t,id:e.id+"--or-child-data-type-entity-id-"+D},n);a.push(...j.updated),s.push(...j.added),o.push(...j.removed)}})}}else{const u=sl(r[0],e.project,{...t},n);e.setEntity(u.changeSet.self),a.push(...u.changeSet.updated),s.push(...u.changeSet.added),o.push(...u.changeSet.removed);break}else{const u=sl(r,e.project,{...t},n);e.setEntity(u.changeSet.self),a.push(...u.changeSet.updated),s.push(...u.changeSet.added),o.push(...u.changeSet.removed);break}}return{updated:m(a),added:m(s),removed:m(o),self:e}}function sl(r,e,t,n){const a=[],s=[],o=[],l=Object.keys(r),p=Ku(l,e);if(p)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],self:p}};const u=n?t.name+" of "+n.name:t.name,f={id:t.id||de(u,i.DefinitionEntity,e),version:1,name:u,type:i.DefinitionEntity,description:t.description||null,static:t.static||!1,abstract:t.abstract||!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[],x:0,y:0,parent:e.toReference()},R=b(f,e);return R.setParent(e),R.initChildren(),R.addSelfToProject(),s.push(R),l.forEach((v,I)=>{const D=de(u+" "+v,i.Property,e),O={id:D,version:1,name:v,type:i.Property,description:null,static:!1,abstract:!1,defaultValue:null,constant:!1,dataType:null,implements:null,index:I,hidden:!1,private:!1,required:!0,parent:R.toReference()},$=b(O,e);$.setParent(R),$.initChildren(),$.addSelfToProject(),s.push($);const j=r[v],oe={id:D+"--data-type-id",version:1,type:i.DataType,entity:null,isList:!1,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,parent:$.toReference()},ae=b(oe,e);ae.setParent($),ae.initChildren(),ae.addSelfToProject(),s.push(ae);const Xe=Xu(j,ae,{...t,name:v,id:D+"--data-type-entity-id"},n||R);a.push(...Xe.updated),s.push(...Xe.added),o.push(...Xe.removed)}),{hasCreated:!0,changeSet:{updated:m(a),added:m(s),removed:m(o),self:R}}}function ol(r,e){const t=Qr(r);if(t.length===0)return{list:[],last:null};let n=null;return{list:t.flatMap(s=>{if(s===e)return n=s,[s];const o=ol(s,e);return o.last&&(n=o.last),[s,...o.list]}),last:n}}function wO(r,e,t=new Set){const n=cr(r),a=cr(e),s=n.filter(p=>!a.includes(p)),o=n.filter(p=>a.includes(p)),l=s.reduce((p,u)=>t.has(u.id)?p:(t.add(u.id),m([...p,...wO(u,e,t)])),[]);return m([...o,...l])}function es(r,e){const t=ol(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function Rq(r,e){return!!ol(r,e).last}function gq(r){if(We.includes(r.type))return r;if([...Xt,i.VariableDeclaration].includes(r.type)){const e=r.parent;return We.includes(e.type)?e:null}return null}function Qu(r,e){if(!r||!e)throw new Error("Both entities must be defined to find a common ancestor");if(r===e)return r;const t=r.parent;if(t){if(t===e)return e;if(t.type===i.Project)return null}else return null;const n=e.parent;if(n){if(n===r)return r;if(n.type===i.Project)return null}else return null;return Qu(t,n)}function lt(r){if(ss.includes(r.type)){if(r.type===i.FunctionDeclaration){const e=r.parent;if(e.type===i.DefinitionEntity)return e;if(e.type===i.Loop)return e}return r}else{const e=r.parent;return e?lt(e):null}}function ll(r,e){const t=ts(r,e);if(!t)return null;if(ss.includes(t.type)){if(t.type===i.FunctionDeclaration){const n=ts(t.parent,e);if(n){if(n.type===i.DefinitionEntity)return n;if(n.type===i.Loop)return n}}return t}else{const n=t.parent?ts(t.parent,e):null;return n?ll(n,e):null}}function BO(r){if(!r)return null;if(Xt.includes(r.type))return r;const e=r.parent;return e?BO(e):null}function MO(r){if(!r)return null;if(Je.includes(r.type))return r;const e=r.parent;return e?MO(e):null}function _O(r){if(!r)return null;if(on.includes(r.type))return r;const e=r.parent;return e?_O(e):null}function bq(r){return r.type===i.VariableDeclaration?[r]:Je.includes(r.type)?[...r.inputs,...r.outputs||[]]:xe.includes(r.type)?r.outputs:ii.includes(r.type)||r.type===i.FunctionDeclaration?r.inputs:[]}function vq(r){const e=cr(r),t=[],n=[];Tp.includes(r.type)&&t.push(...ep(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Xt.includes(s.type)&&!o?(n.push(s),!1):!0});return t.sort((s,o)=>es(o,s)?-1:0),n.sort((s,o)=>es(o,s)?-1:0),[...t,...n,...a]}function VO(r){return[...r].sort((e,t)=>es(t,e)?-1:0)}function Iq(r){const e=VO(r),t=[];return e.forEach(n=>{const a=t[t.length-1];if(a){const s=a[a.length-1];es(n,s)?t.push([n]):a.push(n)}else t.push([n])}),t}function Pt(r){const e=r.map(t=>lt(t));return m(e)}function ep(r){return Je.includes(r.type)?[...Pt(r.successCalls),...Pt(r.errorCalls)]:We.includes(r.type)?Pt(r.calls):[]}function Dq(r,e){return ep(r).includes(e)}function tp(r){return r.writesValues||[]}function Sq(r,e){return tp(r).includes(e)}function NO(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function Oq(r){return r.writesValues}function LO(r=[]){return r.map(NO).filter(e=>!!e)}function dl(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function GO(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function $O(r){return Fe.includes(r.type)?r:null}function FO(r){return r.writesValues.map($O).filter(e=>!!e)}function UO(r=[]){return r.reduce((e,t)=>t.type===i.OutputMap?[...e,...FO(t)]:e,[])}function Ue(r){return Je.includes(r.type)?[...vn(Pt(r.successCalls)),...vn(Pt(r.errorCalls))]:We.includes(r.type)?vn(Pt(r.calls)):[]}function Pq(r){return Je.includes(r.type)?[...vn(Pt(r.successCalls)),...vn(Pt(r.errorCalls))]:We.includes(r.type)?vn(Pt(r.calls)):[]}function xO(r,e=new Set){return r.writesValues.filter(n=>Fe.includes(n.type)&&!e.has(n.id)).reduce((n,a)=>e.has(a.id)?n:[...n,...Se(a,e)],[])}function jO(r,e=new Set){var n;return(((n=r.readsValue)==null?void 0:n.writesValues)||[]).filter(a=>Fe.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...Se(s,e)],[])}function Se(r,e=new Set){if(e.has(r.id))return[];if(r.type===i.ReturnStatement)return GO(r.outputs).reduce((n,a)=>[...n,...Se(a,e)],[]);if(r.type===i.FunctionCall||r.type===i.Operation||r.type===i.Condition)return[...Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]),...LO(r.inputs),...UO(r.outputs)].reduce((s,o)=>[...s,...Se(o,e)],[]);if(ii.includes(r.type)){const t=dl(r.inputs),a=Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Se(o,e)],[])}if(r.type===i.FunctionDeclaration){const t=[...dl(r.inputs)],a=Ue(r).reduce((s,o)=>{const l=lt(o);return[...s,...Se(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Se(o)],[])}if(Fe.includes(r.type)){e.add(r.id);const n=Ue(r).reduce((a,s)=>{const o=lt(s);return[...a,...Se(o||s,e)]},[]);return[r,...n,...jO(r,e),...xO(r,e)]}return[]}function Nt(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...cr(r).reduce((a,s)=>[...a,s,...Nt(s,e)],[])])}function vn(r){return r.reduce((e,t)=>t.type===i.ReturnStatement||t.type===i.ContinueStatement||t.type===i.BreakStatement?[...e,t]:[...e,t,...Ue(t)],[])}function kO(r){const e=r.entities||[],t=[...e,...r.functions||[],...r.events||[],...r.projects||[]],n=e.reduce((p,u)=>[...p,...u.properties],[]),a=e.reduce((p,u)=>[...p,...u.methods],[]),s=a.reduce((p,u)=>[...p,...dl(u.inputs),...vn(Pt(u.calls)),...u.returnStatements],[]),o=r.functions.reduce((p,u)=>[...p,...vn(Pt(u.calls)),...u.returnStatements],[]),l=r.events.reduce((p,u)=>[...p,...vn(Pt(u.calls)),...u.returnStatements],[]);return[...t,...n,...a,...s,...o,...l]}function qO(r,e){return e.filter(n=>{if(!n)return!1;switch(n.type){case i.FunctionCall:return n.inputs.find(a=>a.id===r.id)!==void 0||n.outputs.find(a=>a.id===r.id)!==void 0;case i.Condition:return n.successCalls.find(a=>a.id===r.id)!==void 0||n.errorCalls.find(a=>a.id===r.id)!==void 0||n.inputs.find(a=>a.id===r.id)!==void 0;case i.Operation:return n.outputs.find(a=>a.id===r.id)!==void 0;case i.VariableDeclaration:return Je.includes(r.type)?RP(r).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===n.id})!==void 0:!1;case i.DefinitionEntity:return n.properties.find(a=>a.id===r.id)!==void 0||n.methods.find(a=>a.id===r.id)!==void 0;case i.FunctionDeclaration:return n.inputs.find(a=>a.id===r.id)!==void 0||(n.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===r.id)!==void 0;default:return!1}})}function Aq(r){const e=kO(r.project);return qO(r,e)}function ts(r,e){return r?typeof r=="string"?e[r]:r.type===i.GenericReference?e[r.entityId]:e[r.id]?e[r.id]:null:null}function JO(r,e){const t=[];if(Xt.includes(r.type)){qt(r).forEach(s=>{const o=ll(s,e);o&&t.push(o)});const a=[...r.inputs||[],...r.outputs||[]].map(s=>{const o=ts(s,e);return o?bP(o,e):null}).filter(s=>s!==null);t.push(...m(a))}if(Fe.includes(r.type)){const n=ul(r);n&&t.push(n)}return m(t)}function Qr(r){const e=[];if(Xt.includes(r.type)){r.calledBy.forEach(a=>{const s=lt(a);s&&e.push(s)});const n=[...r.inputs||[],...r.outputs||[]].map(a=>ul(a)).filter(a=>a!==null);e.push(...m(n))}if(Fe.includes(r.type)){const t=ul(r);t&&e.push(t)}return m(e)}function qt(r){return[...r.calledByEntry||[],...r.calledByError||[],...r.calledBySuccess||[]]}function WO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ActionDescriptor)throw new Error("Entity must be an action descriptor to be flattened");return[r,...r.inputs.flatMap(n=>P(n,e,t)),...r.outputs.flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function YO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ArgumentDeclaration)throw new Error("Entity must be an argument declaration to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e):[],...r.writesValues.flatMap(n=>P(n,e,t)),...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function HO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.BreakStatement)throw new Error("Entity must be a break statement to be flattened");return[r,...r.outputs.flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function zO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.BuiltInBaseEntity)throw new Error("Entity must be a built-in base entity to be flattened");return[r,...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t)),...(r.extends||[]).flatMap(n=>P(n,e,t))]}function ZO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Condition)throw new Error("Entity must be a condition to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function KO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ContinueStatement)throw new Error("Entity must be a continue statement to be flattened");return[r,...r.outputs.flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function XO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.DefinitionEntity)throw new Error("Entity must be a definition entity to be flattened");return[r,...(r.extends||[]).flatMap(n=>P(n,e,t)),...(r.implements||[]).flatMap(n=>P(n,e,t)),...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function QO(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.DataType)throw new Error("Entity must be a data type to be flattened");return[r,...(r.andChildrenGroup||[]).flatMap(n=>P(n,e,t)),...(r.orChildrenGroup||[]).flatMap(n=>P(n,e,t)),...r.entity?P(r.entity,e,t):[],...r.parent?P(r.parent,e,t):[]]}function eP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.FunctionCall)throw new Error("Entity must be a function call to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function tP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.FunctionDeclaration)throw new Error("Entity must be a function declaration to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.returnStatements||[]).flatMap(n=>P(n,e,t)),...(r.calls||[]).flatMap(n=>P(n,e,t)),...r.implements?P(r.implements,e,t):[],...r.parent?P(r.parent,e,t):[]]}function nP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.GlobalEvent)throw new Error("Entity must be a global event to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.calls||[]).flatMap(n=>P(n,e,t)),...(r.returnStatements||[]).flatMap(n=>P(n,e,t)),...r.implements?P(r.implements,e,t):[],...r.parent?P(r.parent,e,t):[]]}function rP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InputMap)throw new Error("Entity must be an input map to be flattened");return[r,...r.readsValue?P(r.readsValue,e,t):[],...r.declaration?P(r.declaration,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.parent?P(r.parent,e,t):[]]}function iP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InstalledProject)throw new Error("Entity must be an installed project to be flattened");return[r,...(r.functions||[]).flatMap(n=>P(n,e,t)),...(r.events||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function aP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.InternalCall)throw new Error("Entity must be an internal call to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...r.parent?P(r.parent,e,t):[]]}function sP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.LiteralValue)throw new Error("Entity must be a literal value to be flattened");return[r,...r.valueAsType?Array.isArray(r.valueAsType)?r.valueAsType.flatMap(n=>P(n,e,t)):P(r.valueAsType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function oP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Loop)throw new Error("Entity must be a loop to be flattened");return[r,...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...r.body?P(r.body,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...(r.breakStatements||[]).flatMap(n=>P(n,e,t)),...(r.continueStatements||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function lP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Operation)throw new Error("Entity must be an operation to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...r.process?P(r.process,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function dP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.OutputMap)throw new Error("Entity must be an output map to be flattened");return[r,...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.declaration?P(r.declaration,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.parent?P(r.parent,e,t):[]]}function cP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.PrimitiveEntity)throw new Error("Entity must be a primitive entity to be flattened");return[r,...(r.properties||[]).flatMap(n=>P(n,e,t)),...(r.methods||[]).flatMap(n=>P(n,e,t)),...(r.abstractMethods||[]).flatMap(n=>P(n,e,t))]}function uP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Project)throw new Error("Entity must be a project to be flattened");return[r,...(r.entities||[]).flatMap(n=>P(n,e,t)),...(r.functions||[]).flatMap(n=>P(n,e,t)),...(r.events||[]).flatMap(n=>P(n,e,t)),...(r.projects||[]).flatMap(n=>P(n,e,t)),...(r.variableDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.variableInstances||[]).flatMap(n=>P(n,e,t)),...(r.operations||[]).flatMap(n=>P(n,e,t)),...(r.conditions||[]).flatMap(n=>P(n,e,t)),...(r.functionCalls||[]).flatMap(n=>P(n,e,t)),...(r.projects||[]).flatMap(n=>P(n,e,t)),...(r.loops||[]).flatMap(n=>P(n,e,t)),...(r.searches||[]).flatMap(n=>P(n,e,t))]}function pP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Property)throw new Error("Entity must be a property to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function yP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ReturnDeclaration)throw new Error("Entity must be a return declaration to be flattened");return[r,...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function hP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ReturnStatement)throw new Error("Entity must be a return statement to be flattened");return[r,...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.throws?P(r.throws,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function fP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.Search)throw new Error("Entity must be a search to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputsDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputsDeclarations||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...r.error?P(r.error,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.parent?P(r.parent,e,t):[]]}function mP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.ValueDescriptor)throw new Error("Entity must be a value descriptor to be flattened");return[r,...r.defaultValue?P(r.defaultValue,e,t):[],...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function TP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.VariableDeclaration)throw new Error("Entity must be a variable declaration to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.internalCalls||[]).flatMap(n=>P(n,e,t)),...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.dataType?P(r.dataType,e,t):[],...r.parent?P(r.parent,e,t):[]]}function EP(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(e.has(r.id))return[];if(e.add(r.id),r.type!==i.VariableInstance)throw new Error("Entity must be a variable instance to be flattened");return[r,...(r.successCalls||[]).flatMap(n=>P(n,e,t)),...(r.errorCalls||[]).flatMap(n=>P(n,e,t)),...(r.inputs||[]).flatMap(n=>P(n,e,t)),...(r.outputs||[]).flatMap(n=>P(n,e,t)),...(r.internalCalls||[]).flatMap(n=>P(n,e,t)),...(r.writesValues||[]).flatMap(n=>P(n,e,t)),...r.readsValue?P(r.readsValue,e,t):[],...r.defaultValue?P(r.defaultValue,e,t):[],...(qt(r)||[]).flatMap(n=>P(n,e,t)),...r.declaration?P(r.declaration,e,t):[],...r.parent?P(r.parent,e,t):[]]}function np(){const r=new Set;return mg.flatMap(t=>P(t,r)).map(t=>t.id)}function P(r,e=new Set,t={ignoreBuiltInBaseEntities:!1}){if(!r)throw new Error("Entity must be defined to be flattened");if(r.type===i.GenericReference)return[];if(t.ignoreBuiltInBaseEntities&&(Jn.includes(r.type)||np().includes(r.id)))return[];if(e.has(r.id))return[];switch(r.type){case i.FunctionCall:return eP(r,e,t);case i.Operation:return lP(r,e,t);case i.Condition:return ZO(r,e,t);case i.Loop:return oP(r,e,t);case i.Search:return fP(r,e,t);case i.GlobalEvent:return nP(r,e,t);case i.ReturnStatement:return hP(r,e,t);case i.ContinueStatement:return KO(r,e,t);case i.BreakStatement:return HO(r,e,t);case i.VariableDeclaration:return TP(r,e,t);case i.DefinitionEntity:return XO(r,e,t);case i.FunctionDeclaration:return tP(r,e,t);case i.Project:return uP(r,e,t);case i.ActionDescriptor:return WO(r,e,t);case i.ArgumentDeclaration:return YO(r,e,t);case i.ReturnDeclaration:return yP(r,e,t);case i.ValueDescriptor:return mP(r,e,t);case i.InputMap:return rP(r,e,t);case i.OutputMap:return dP(r,e,t);case i.DataType:return QO(r,e,t);case i.InstalledProject:return iP(r,e,t);case i.InternalCall:return aP(r,e,t);case i.LiteralValue:return sP(r,e,t);case i.Property:return pP(r,e,t);case i.VariableInstance:return EP(r,e,t);case i.BuiltInBaseEntity:return t.ignoreBuiltInBaseEntities?[]:zO(r,e,t);case i.PrimitiveEntity:return t.ignoreBuiltInBaseEntities?[]:cP(r,e,t)}return[]}function cl(r,e){if(Jn.includes(r.type))return new Set;const t=JO(r,e),n=new Set(t.map(a=>a.id));if(r.type===i.LiteralValue&&r.valueAsType&&(Array.isArray(r.valueAsType)?r.valueAsType.forEach(a=>{n.add(a.id)}):n.add(r.valueAsType.id)),r.type===i.DataType&&r.entity&&(r.entity.type===i.DefinitionEntity?(r.entity.parent.entityId||r.entity.parent.id)!==r.id&&n.add(r.entity.id):n.add(r.entity.id)),fp.includes(r.type)){const a=r.parent;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(mp.includes(r.type)){const a=r.implements;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(gl.includes(r.type)){const a=r.declaration;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(Sn.includes(r.type)){const a=r.readsValue;a&&(a.type===i.GenericReference?n.add(a.entityId):n.add(a.id))}if(Xt.includes(r.type)){const a=[...r.calledBySuccess||[],...r.calledByEntry||[],...r.calledByError||[]];a.length&&a.forEach(s=>{s.type===i.GenericReference?n.add(s.entityId):n.add(s.id)})}return n}function rp(r){return r.type===i.FunctionCall||r.type===i.InternalCall||[i.Operation,i.Condition,i.Loop].includes(r.type)?r.declaration.inputs:r.type===i.FunctionDeclaration||ii.includes(r.type)?r.inputs:r.type===i.Search?r.inputsDeclarations:[]}function Cq(r,e){return e.type===i.Condition?e.inputs.find(t=>t.declaration.id===r.id):e.type===i.FunctionCall||e.type===i.Operation?e.inputs.find(t=>t.declaration.id===r.id):null}function RP(r){return Je.includes(r.type)?r.inputs:[]}function gP(r){var e;return r.type===i.FunctionCall?((e=r.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[i.Operation,i.Condition,i.Loop].includes(r.type)?r.declaration.outputs:r.type===i.Search?r.outputsDeclarations:xe.includes(r.type)?r.outputs:[]}function wq(r,e){return e.type===i.Condition?null:e.type===i.FunctionCall||e.type===i.Operation?e.outputs.find(t=>t.declaration.id===r.id):null}function Bq(r){return r.type===i.Condition?[]:Je.includes(r.type)?r.outputs:[]}function ul(r){const e=r.readsValue;return e?lt(e):null}function bP(r,e){const t=r.readsValue;return t?ll(t,e):null}function vP(r){const e=r.internalCalls||[];return m(Pt(m(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function Hi(r){const e=tp(r),t=[];return e.forEach(n=>{if(Fe.includes(n.type))t.push(n);else if(Sn.includes(n.type)){const a=n.parent;t.push(a)}}),t}function m(r){const e=new Set;return r.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function cr(r,e=!1){const t=[];if(r.type===i.Project&&t.push(...(r==null?void 0:r.entities)||[],...(r==null?void 0:r.functions)||[],...(r==null?void 0:r.variableDeclarations)||[],...(r==null?void 0:r.variableInstances)||[],...(r==null?void 0:r.searches)||[],...(r==null?void 0:r.loops)||[],...(r==null?void 0:r.operations)||[],...(r==null?void 0:r.conditions)||[],...(r==null?void 0:r.functionCalls)||[],...(r==null?void 0:r.events)||[],...(r==null?void 0:r.projects)||[]),pt.includes(r.type)&&t.push(...(r==null?void 0:r.detachedChildren)||[]),r.type===i.DefinitionEntity){const n=[...r.suggestedMethods,...r.methods].flatMap(a=>a.collapsed&&e?[]:cr(a));t.push(...n)}if(r.type===i.Condition){const n=r.successCalls.map(s=>lt(s)),a=r.errorCalls.map(s=>lt(s));t.push(...n,...a)}if(ii.includes(r.type)){if(r.collapsed&&e)return[];const n=r.inputs.map(s=>Hi(s)).flat(),a=r.calls.map(s=>lt(s));t.push(...m(n),...a)}if(Je.includes(r.type)&&r.type!==i.Condition&&r.type!==i.Loop){const n=r==null?void 0:r.outputs.map(o=>Hi(o)).flat(),a=r.successCalls.map(o=>lt(o)),s=r.errorCalls.map(o=>lt(o));t.push(...m(n),...a,...s)}if(Fe.includes(r.type)){const n=Hi(r),a=vP(r);t.push(...n,...a)}if(r.type===i.Loop){const n=r.outputs.map(o=>Hi(o)).flat();if(r.body){const o=cr(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>lt(o)),s=r.successCalls.map(o=>lt(o));t.push(...m(n),...s,...a)}if(r.type===i.FunctionDeclaration){if(r.collapsed&&e)return[];const n=r.inputs.map(s=>Hi(s)).flat(),a=r.calls.map(s=>lt(s));t.push(...m(n),...a)}return m(t)}function IP(r,e=!1){const t=cr(r,e),n=[...t,...t.reduce((a,s)=>[...a,...IP(s,e)],[])];return m(n)}function DP(r){const e=Qr(r),t=[...e,...e.reduce((n,a)=>[...n,...DP(a)],[])];return m(t)}function pl(r){return r.implements.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,i.DefinitionEntity,...pl(t),...yl(t)]:[...e,t.name],[])}function yl(r){return r.extends.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,i.DefinitionEntity,...yl(t),...pl(t)]:[...e,t.name],[])}function ip(r){return r.extends.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,t,...ip(t),...ap(t)]:[...e,t],[])}function ap(r){return r.implements.reduce((e,t)=>t.type===i.DefinitionEntity?[...e,t,...ap(t),...ip(t)]:[...e,t],[])}function sp(r){return[...yl(r),...pl(r)].filter((t,n,a)=>a.indexOf(t)===n)}function SP(r){return r.implements.length===0&&r.extends.length===0?null:r.implements.find(n=>n.type===i.BuiltInBaseEntity&&n.name===U.PERSISTED_ENTITY)?r:[...r.implements,...r.extends].reduce((n,a)=>{if(a.type===i.DefinitionEntity){const s=SP(a);if(s)return s}return n},null)}function Mq(r){const e=r.extends.find(t=>t.type===i.BuiltInBaseEntity);return e&&e.type===i.BuiltInBaseEntity?e:null}function _q(r){const e=r.implements.find(t=>t.type===i.BuiltInBaseEntity);return e&&e.type===i.BuiltInBaseEntity?e:null}function op(r){const e=r.extends.find(t=>t.type===i.DefinitionEntity);return e&&e.type===i.DefinitionEntity?e:null}function ur(r){const e=[...r.implements,...r.extends].reduce((t,n)=>n.type===i.BuiltInBaseEntity?[...t,n]:n.type===i.DefinitionEntity?[...t,...ur(n)]:t,[]);return m(e)}function lp(r){return r.type===i.PrimitiveEntity?!0:r.type===i.BuiltInBaseEntity?r.interactive:!ur(r).find(n=>!n.interactive)}function Vq(r){return r.parent===r.project&&r.project.variableDeclarations.includes(r)}function dp(r){return r.parent!==r.project?!1:i.VariableDeclaration===r.type?r.project.variableDeclarations.includes(r):i.VariableInstance===r.type?r.project.variableInstances.includes(r):i.FunctionCall===r.type?r.project.functionCalls.includes(r):i.Condition===r.type?r.project.conditions.includes(r):i.Operation===r.type?r.project.operations.includes(r):i.Loop===r.type?r.project.loops.includes(r):i.Search===r.type?r.project.searches.includes(r):!1}function OP(r){if([...We,i.DefinitionEntity,i.InstalledProject,i.Project].includes(r.type)||dp(r))return!1;const e=Qr(r);return e.length===0?!0:e.some(t=>OP(t))}function cp(r){return[...We,i.DefinitionEntity,i.InstalledProject,i.Project].includes(r.type)||dp(r)?!1:Qr(r).length===0}function PP(r,e=0){if(cp(r)){const t=Qr(r);return t.length===0?r:t.map(a=>PP(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function AP(r){const e=[];if(cp(r))e.push(r);else return[];return Qr(r).forEach(n=>{e.push(...AP(n))}),e}function CP(r){return r.type===i.FunctionDeclaration&&r.parent!==r.project&&!![i.DefinitionEntity,i.Loop,i.InstalledProject].includes(r.parent.type)}function Nq(r,e){const t=new Map;return r.forEach(n=>{t.set(n.id,n)}),e.forEach(n=>{t.set(n.id,n)}),Array.from(t.values())}function hl(r){switch(r){case i.DefinitionEntity:return ei;case i.FunctionDeclaration:return jr;case i.VariableDeclaration:return sn;case i.VariableInstance:return Wr;case i.FunctionCall:return Xr;case i.Operation:return kr;case i.Condition:return Jr;case i.ReturnStatement:return Zr;case i.Loop:return qr;case i.Search:return Yr;case i.InputMap:return xn;case i.OutputMap:return jn;case i.ArgumentDeclaration:return zr;case i.ReturnDeclaration:return kt;case i.Property:return xr;case i.InstalledProject:return Hr;case i.Project:return M;case i.BuiltInBaseEntity:return In;default:return null}}function At(r,e){if(pt.includes(r.type))return r;if(Jn.includes(r.type))return null;const t=r.parent;if(!t)return null;if(t.type===i.GenericReference){const n=S(t);if(!n)return null;const a=e.get(n);return a?At(a,e):null}else return t===e?e:At(t,e)}function up(r,e){if(Jn.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Lt(r.parent,e);return t?t===e?pt.includes(r.type)?r:null:t.type===i.DefinitionEntity?r:up(t,e):null}function fl(r,e,t){if(r===e||e===t||r===t)return!1;const n=At(e.parent,t);return n===r?!0:fl(n,e,t)}var ml=(r=>(r.SameBothLocal="same-both-local",r.AInB="a-in-b",r.BInA="b-in-a",r.ParallelInCommonParent="parallel-in-common-parent",r.ParallelInProject="parallel-in-project",r.AIsGlobalBIsNot="a-is-global-b-is-not",r.BIsGlobalAIsNot="b-is-global-a-is-not",r.SameBothGlobal="same-both-global",r))(ml||{});function ns(r,e,t){const n=At(r,t),a=At(e,t);if(!n)throw new Error("Could not find scope owner for the entity: "+r.id);if(!a)throw new Error("Could not find scope owner for the entity: "+e.id);if(n===a&&n.type!==i.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:n};if(n===a&&n.type===i.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:n};if(n.type===i.Project&&a.type!==i.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:n};if(n.type!==i.Project&&a.type===i.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(fl(n,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:n};if(fl(a,n,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=Qu(n,a);return l===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:l}:l?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:At(l,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function wP(r,e,t){const n=ns(r,e,t);if(!n.compatible||n.type!=="same-both-local")return null;if(r===e)return r;let a=At(r.parent,t);if(a){if(a===e)return e;if(a.type===i.Project)return r}else return r;for(;a;){if(a){if(a===e)return e;if(a.type===i.Project)return r}else return r;a=At(a.parent,t)}let s=At(e.parent,t);if(s){if(s===r)return r;if(s.type===i.Project)return e}else return e;for(;s;){if(s){if(s===r)return r;if(s.type===i.Project)return e}else return e;s=At(s.parent,t)}return null}function BP(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,n)=>{const a=wP(t,n,n.project);return!a||a===n?t:n},r[0])}function Lt(r,e){if(!r)return null;let t;return typeof r=="string"?t=r:r.type===i.GenericReference?t=S(r):t=r.id,t===e.id?e:e.get(t)}function pr(r){if(!r)return null;if(Jn.includes(r.type))return r;if(r.type===i.Project)return null;if(r.project.getBuiltIn(r.id))return r;const e=r.parent;return!e||e.type===i.Project?null:pr(e)}function Lq(r,e){var t;if(r.readsValue){const n=Lt(r.readsValue,e.project);e.setValueWriter(n),n.addValueReader(e)}else r.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function rs(r){const e=[];function t(s,o){return e.some(l=>l.blockedByCaller===s&&l.blockedByCalling===o)}function n(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=up(r,r.project);return r.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))});let l;if(Je.includes(s.type)&&(l=s),l){const p=rs(l);p.reachable||Ue(r).find(f=>f===s)||p.blocks.forEach(f=>{n(s,f.blockedByCalling)})}}),r.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))});let l;if(Je.includes(s.type)&&(l=s),l){const p=rs(l);p.reachable||Ue(r).find(f=>f===s)||p.blocks.forEach(f=>{n(s,f.blockedByCalling)})}}),r.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{xe.includes(p.type)&&p!==r&&(Ue(r).find(f=>f===p)||n(s,p))}),s===a)return;let l;if(s.type===i.FunctionDeclaration){const p=lt(s);if(p.type===i.DefinitionEntity)return;p.type===i.Loop&&(l=p)}if(l){const p=rs(l);p.reachable||p.blocks.forEach(u=>{n(s,u.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function Gq(r){return ss.includes(r.type)?r.type===i.FunctionDeclaration?!CP(r):!0:!1}function $q(r){if(i.ActionDescriptor===r.type){if(r.project.operationDeclarations.find(s=>s.id===r.id))return i.Operation;if(r.project.globalEventActionDescriptors.find(s=>s.id===r.id))return i.GlobalEvent;if(r.project.loopDeclarations.find(s=>s.id===r.id))return i.Loop;if(r.project.conditionDeclarations.find(s=>s.id===r.id))return i.Condition}return r.type}function zi(r,e){if(r.type!==i.DefinitionEntity||r.abstract)return!1;const t=op(r)||r;return!!sp(t).includes(e)}function Fq(r){const e=[];return r.entities.forEach(t=>{if(zi(t,U.PERSISTED_ENTITY)){e.push(t);return}}),m(e)}function Uq(r){const e=[];return r.entities.forEach(t=>{if(zi(t,U.RELATIONAL_DATABASE)){e.push(t);return}}),m(e)}function xq(r){return r.type!==i.DefinitionEntity||r.abstract||!zi(r,U.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>{var n;return((n=t.implements)==null?void 0:n.id)===_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.primaryKey.id&&!t.abstract}))||null}function jq(r){if(r.type!==i.DefinitionEntity)return[];if(r.abstract)return[];if(!zi(r,U.PERSISTED_ENTITY))return[];const e=[],t=r.properties.filter(n=>{var a;return((a=n.implements)==null?void 0:a.id)!==_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.database.id&&!n.abstract});return e.push(...t),e}function kq(r){var t;if(!r||r.type!==i.DefinitionEntity||!zi(r,U.PERSISTED_ENTITY))return null;const e=r.properties.find(n=>{var a;return((a=n.implements)==null?void 0:a.id)===_[i.BuiltInBaseEntity][U.PERSISTED_ENTITY].properties.database.id});return(t=e==null?void 0:e.getDefaultValue())==null?void 0:t.valueAsType}function He(r,e){var n;if(!Rp.includes(e.type)||!r)return e.project||null;let t=e.project;return r.type===i.Project?t=r:((n=e.project)==null?void 0:n.id)!==r.project.id&&(t=r.project),t}function qq(r,e){const t=[];if(r.parent)if(r.id===r.parent)t.push(new g({id:`${r.id}--${r.parent}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at 'parent'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));else{const n=e.get(r.parent);n?[i.Project,i.DataType].includes(n.type)||t.push(new g({id:`${r.id}--${r.parent}--${T.InvalidParentReference}`,code:T.InvalidParentReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`,issue:null})):t.push(new g({id:`${r.id}--${r.parent}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${r.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return r.implements&&Array.isArray(r.implements)?r.implements.forEach(n=>{if(r.id===n){t.push(new g({id:`${r.id}--${n}--${T.SelfReference}`,code:T.SelfReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at one of the 'implements' references. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null}));return}const a=e.get(n);a?[i.DefinitionEntity,i.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new g({id:`${r.id}--${n}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.InvalidImplementsReference}`,code:T.InvalidImplementsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}):t.push(new g({id:`${r.id}--${B.InvalidObjectStructure}`,code:B.InvalidObjectStructure,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' property that isn't an array.`,issue:null})),r.extends&&Array.isArray(r.extends)&&r.extends.forEach(n=>{const a=e.get(n);a?[i.DefinitionEntity,i.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new g({id:`${r.id}--${n}--${T.InvalidExtendsReference}`,code:T.InvalidExtendsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to a non-abstract entity. Did you want to use the property 'implements', which holds a list of references to absract entities, instead?`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.InvalidExtendsReference}`,code:T.InvalidExtendsReference,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to an entity of type 'definition-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new g({id:`${r.id}--${n}--${T.ReferencedEntityNotFound}`,code:T.ReferencedEntityNotFound,severity:E.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${n}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}),t}const De=class De{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"x");c(this,"y");c(this,"static");c(this,"abstract");c(this,"type",i.DefinitionEntity);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"implements",[]);c(this,"project");c(this,"errors",[]);c(this,"parent");c(this,"initialized",!1);c(this,"suggestedProperties",[]);c(this,"suggestedMethods",[]);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=e.x,this.y=e.y,this.static=e.static,this.abstract=e.abstract}static fromGenerationTarget(e,t){let n=t;if(e.parent){const p=S(e.parent);n=t.get(p)}const a=[];e.implements&&e.implements.forEach(p=>{a.push(t.get(p)||t.getBuiltIn(p))});const s=[];e.extends&&e.extends.forEach(p=>{s.push(t.get(p)||t.getBuiltIn(p))});const o={id:e.id,version:1,name:e.name,type:i.DefinitionEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:n},l=b(o,t);return l.setParent(n),l.initChildren(),l}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[],s=qq(n,t),o=Zo(n,t);a.push(...s,...o,...je(n));const l=n.parent?t.get(n.parent):null;if(l&&l.type===i.DataType){const p=l;p.entity&&a.push(new g({id:`${e.id}--${T.NewEntityWouldOverriteExisting}`,code:T.NewEntityWouldOverriteExisting,severity:E.Error,message:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${p.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
|
|
404
404
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
405
405
|
${bn({describe_entity:p.entity.id})}
|
|
406
|
-
Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:a,modifiedData:n}}get allBasePropertiesFromExtendedAndImplementedEntities(){return m([...this.extends.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[]),...this.implements.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[])])}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[]),...this.implements.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])].filter(e=>!!e.abstract))}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.extends.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addExtension(o),e.push(o))}),this.initialData.implements.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addImplementation(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.syncImplementationProperties(),this.addExtendedProperties(),this.addSuggestions(),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];if(this.parent.type===i.DataType){const a=this.parent;a.entity=this,e.push(a)}else this.project.addDefinitionEntity(this);return{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}addExtension(e){return this.extends.includes(e)||this.extends.push(e),this}removeExtension(e){return this.extends=this.extends.filter(t=>t.id!==e.id),this}addImplementation(e){return this.implements.includes(e)||this.implements.push(e),this}removeImplementation(e){return this.implements=this.implements.filter(t=>t.id!==e.id),this}removeProperty(e){return this.properties=this.properties.filter(t=>t.id!==e.id),this}addMethod(e){return this.methods.includes(e)||(this.methods.push(e),this.suggestedMethods=this.suggestedMethods.filter(t=>t.name!==e.name)),this}removeMethod(e){return this.methods=this.methods.filter(t=>t.id!==e.id),this}addProperty(e){return this.properties.includes(e)||(this.properties.push(e),this.suggestedProperties=this.suggestedProperties.filter(t=>t.name!==e.name)),this}addSuggestedProperty(e){return this.suggestedProperties.includes(e)||this.suggestedProperties.push(e),this}addSuggestedMethod(e){return this.suggestedMethods.includes(e)||this.suggestedMethods.push(e),this}removeSuggestedProperty(e){return this.suggestedProperties=this.suggestedProperties.filter(t=>t.id!==e.id),this}removeSuggestedMethod(e){return this.suggestedMethods=this.suggestedMethods.filter(t=>t.id!==e.id),this}addAbstractMethod(e){return this.abstractMethods.includes(e)||this.abstractMethods.push(e),this}removeAbstractMethod(e){return this.abstractMethods=this.abstractMethods.filter(t=>t.id!==e.id),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.properties=this.initialData.properties.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>b(e,this.project)),this.implements=this.initialData.implements.map(e=>b(e,this.project)),this.afterAllChildrenInitialized(),this)}syncImplementationProperties(){const e=this.properties,t=this.implementedPropertiesFromOriginalParents,n=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...e];return t.filter(s=>!n.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id})).forEach(s=>{if(this.properties.find(u=>{var h;return((h=u.implements)==null?void 0:h.id)===s.id}))return;const l=this.properties.find(u=>u.name===s.name&&!!u.abstract&&!u.implements);if(l){l.implements=s,l.abstract=!1;return}const p=s.clone(this,M.UUID.uuid());p.initChildren(),p.implements=s,p.abstract=!1,this.addProperty(p)}),this}addExtendedProperties(){const e=this.properties,t=this.extendedPropertiesFromOriginalParents,n=t.filter(s=>t.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id})?!1:!s.abstract),a=new Set(e.map(s=>s.name));return n.forEach(s=>{if(a.has(s.name))return;a.add(s.name);const o=s.clone(this,M.UUID.uuid());o.initChildren(),this.addProperty(o)}),this}addSuggestions(){return this.implements.forEach(e=>{v5(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=b(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),I5(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),l=b(o,this.project);if(l.suggestion=!0,l.setParent(this),l.initChildren(),l.inputs.forEach(p=>{p.suggestion=!0}),l.returnStatements.length){const p=l.returnStatements[0];p.suggestion=!0,p.outputs.forEach(u=>{u.suggestion=!0})}this.addSuggestedMethod(l)})}),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.static=e.static||this.static,this.abstract=e.abstract||this.abstract,this}async load(e=V){return await De.repository.load(this.id),this}async create(e=V){return await De.repository.create(this.toShallowJSON()),this}async update(e=V){return await De.repository.update(this.toShallowJSON()),this}async delete(e=V){return await De.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.properties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.methods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),{affected:m(n),removed:m(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.properties.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),{affected:m(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(n=>n.toFlat(e)),...this.implements.flatMap(n=>n.toFlat(e)),...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(n=>n.toFlatIds(e)),...this.implements.flatMap(n=>n.toFlatIds(e)),...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),implements:this.implements.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e)),parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:1,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(p=>p.toJSONClone({...e,newId:null})),methods:this.methods.map(p=>p.toJSONClone({...e,newId:null})),abstractMethods:this.abstractMethods.map(p=>p.toJSONClone({...e,newId:null})),implements:this.implements.map(p=>p.type===i.BuiltInBaseEntity?p.toJSON():p.toJSONClone({...e,newId:null})),extends:this.extends.map(p=>p.type===i.BuiltInBaseEntity?p.toJSON():p.toJSONClone({...e,newId:null})),parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,name:this.name,description:this.description,type:this.type,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(a=>a.toReference(e)),methods:this.methods.map(a=>a.toReference(e)),abstractMethods:this.abstractMethods.map(a=>a.toReference(e)),implements:this.implements.map(a=>a.toReference(e)),extends:this.extends.map(a=>a.toReference(e)),parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e)),...this.implements.flatMap(n=>n.toFlatJSON(e)),...this.extends.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===i.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:this.extends.map(t=>t.id),implements:this.implements.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.implements.filter(n=>n.type===i.DefinitionEntity).flatMap(n=>n.toFlatGenerationTarget(e)),...this.implements.filter(n=>n.type===i.DefinitionEntity).flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){return this.errors=b5(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var v,I,D;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.DefinitionEntity,a);s.properties=[],s.methods=[],s.abstractMethods=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e&&u.setParent(e),n&&u.subscribe(),u.initChildren();const h=(v=this.properties)==null?void 0:v.map((O,$)=>O.clone(u,p+"-property-"+$+"-id",n));u.properties=h;const f=(I=this.methods)==null?void 0:I.map((O,$)=>O.clone(u,p+"-method-"+$+"-id",n));u.methods=f;const R=(D=this.abstractMethods)==null?void 0:D.map((O,$)=>O.clone(u,p+"-abstract-method-"+$+"-id",n));return u.abstractMethods=R,u}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return al(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(n=>n.type===i.DefinitionEntity||n.type===i.BuiltInBaseEntity&&n.interactive);return m([...this.methods,...this.extends.flatMap(n=>n.getAllInteractiveMethods()),...e.flatMap(n=>n.getAllInteractiveMethods())])}inferFromInputs(e){if(this.parent.type!==i.DataType||!this.parent.inferred)return this;const t=[];e.forEach(s=>{t.find(l=>w(l,this.project)===w(s,this.project))||t.push(s)});const n=this.properties.filter(s=>!s.getDataType());t.forEach(s=>{const o=n.find(f=>w(f,this.project)===w(s,this.project));if(!o)return;const p=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),u=gn(p),h=u==null?void 0:u.clone(o,o.id+"--"+M.UUID.uuid()+"--data-type",!0);h&&o.setDataType(h),s.setDeclaration(o)});const a=[];return t.forEach(s=>{if(!s.declaration){a.push(s);return}}),a.length===0?this:(a.forEach(s=>{const o=this.properties.find(v=>w(v,this.project)===w(s,this.project));if(o){if(s.setDeclaration(o),!o.getDataType()){const I=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),D=gn(I),O=D==null?void 0:D.clone(o,o.id+"--"+M.UUID.uuid()+"--data-type",!0);O&&o.setDataType(O)}return}const l={id:s.id+"--"+M.UUID.uuid()+"--inferred-property",type:i.Property,version:1,name:w(s,this.project),description:s.description,defaultValue:null,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,constant:!0,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=b(l,this.project);p.setParent(this),p.initChildren();const h=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),f=gn(h),R=f==null?void 0:f.clone(p,l.id+"--"+M.UUID.uuid()+"--data-type",!0);return R&&p.setDataType(R),this.addProperty(p),s.setDeclaration(p),p}),this)}};c(De,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(De,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),c(De,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(De,"BASE_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,...De.INMUTABLE_BASE_PROPERTIES]),c(De,"MUTABLE_META_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,"x","y"]),c(De,"INMUTABLE_META_PROPERTIES",[...De.INMUTABLE_BASE_PROPERTIES]),c(De,"META_PROPERTIES",[...De.MUTABLE_META_PROPERTIES,...De.INMUTABLE_META_PROPERTIES]),c(De,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),c(De,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(De,"UPSTREAM_PROPERTIES",[...De.MUTABLE_UPSTREAM_PROPERTIES,...De.INMUTABLE_UPSTREAM_PROPERTIES]),c(De,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),c(De,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(De,"DOWNSTREAM_PROPERTIES",[...De.MUTABLE_DOWNSTREAM_PROPERTIES,...De.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(De,"PROPERTIES",[...De.META_PROPERTIES,...De.UPSTREAM_PROPERTIES,...De.DOWNSTREAM_PROPERTIES]);let ei=De;function Jq(r){const e=X9(),t=r.toJSON();e.safeParse(t).success;const a=[];return Be(r.errors,a)}const as=class as{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.BuiltInBaseEntity);c(this,"abstract",!1);c(this,"static");c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"interactive",!1);c(this,"errors",[]);c(this,"project");this.initialData=this.initialData||e,this.project=this.project||t,this.id=this.id||e.id,this.version=this.version||e.version,this.name=this.name||e.name,this.static=this.static||e.static,this.interactive=this.interactive||e.interactive,this.abstract=e.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(n=>b(n,this.project))}get allBasePropertiesFromExtendedAndImplementedEntities(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...n]},[]))}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])])}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(e=V){return await as.repository.load(this.id),this}remove(e={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e)),...this.extends.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e)),...this.extends.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e))})}toReference(e=L){return{id:this.id+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(e=L){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(t=>t.toReference()),methods:this.methods.map(t=>t.toReference()),abstractMethods:this.abstractMethods.map(t=>t.toReference()),extends:this.extends.map(t=>t.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=Jq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}implement(e,t){return al(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(n=>n.type===i.BuiltInBaseEntity&&n.interactive||n.type===i.PrimitiveEntity).forEach(n=>{n instanceof as&&e.push(...n.getAllInteractiveMethods())})),m(e)}};c(as,"repository",{load:async e=>null});let In=as;function Wq(r){const e=k9(),t=r.toJSON();e.safeParse(t).success;const a=[];return Be(r.errors,a)}const El=class El{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.PrimitiveEntity);c(this,"static");c(this,"abstract");c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.static=e.static,this.abstract=e.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.parent=this,a})}get allBasePropertiesFromExtendedAndImplementedEntities(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...n]},[]))}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])])}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(e=V){return await El.repository.load(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e))})}toReference(e=L){return{id:this.id+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(e=L){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(t=>t.toReference()),methods:this.methods.map(t=>t.toReference()),abstractMethods:this.abstractMethods.map(t=>t.toReference()),extends:this.extends.map(t=>t.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=Wq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(n=>n.type===i.BuiltInBaseEntity&&n.interactive||n.type===i.PrimitiveEntity).forEach(n=>{n instanceof In&&e.push(...n.getAllInteractiveMethods())}),m(e)}};c(El,"repository",{load:async e=>null});let Kt=El;function ke(r,e){if(!r)throw new Error("Entity is null");const t=e.get(r.id);switch(r.type){case i.LiteralValue:return t||new Wi(r,e);case i.DefinitionEntity:return t||new ei(r,e);case i.PrimitiveEntity:return t||new Kt(r,e);case i.FunctionDeclaration:return t||new jr(r,e);case i.GlobalEvent:return t||new qi(r,e);case i.DataType:return t||new ki(r,e);case i.Property:return t||new xr(r,e);case i.FunctionCall:return t||new Xr(r,e);case i.Condition:return t||new Jr(r,e);case i.Operation:return t||new kr(r,e);case i.VariableDeclaration:return t||new sn(r,e);case i.VariableInstance:return t||new Wr(r,e);case i.OutputMap:return t||new jn(r,e);case i.ReturnDeclaration:return t||new kt(r,e);case i.ArgumentDeclaration:return t||new zr(r,e);case i.InputMap:return t||new xn(r,e);case i.Project:return t||new M(r);case i.InstalledProject:return t||new Hr(r,e);case i.ActionDescriptor:return t||new se(r,e);case i.ReturnStatement:return t||new Zr(r,e);case i.Loop:return t||new qr(r,e);case i.Search:return t||new Yr(r,e);case i.ValueDescriptor:return t||new Kr(r,e);case i.BuiltInBaseEntity:return t||new In(r,e);case i.InternalCall:return t||new Ji(r,e);case i.ContinueStatement:return t||new Ot(r,e);case i.BreakStatement:return t||new Yi(r,e);case i.GenericReference:return e.get(r.entityId);default:throw new Error("Invalid entity type: "+r.type)}}function b(r,e){if(!r)throw new Error("Entity is null");const t=ke(r,e);return t.subscribe(),t}function Yq(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case i.LiteralValue:return Wi.fromGenerationTarget(r,e);case i.DefinitionEntity:return ei.fromGenerationTarget(r,e);case i.FunctionDeclaration:return jr.fromGenerationTarget(r,e);case i.GlobalEvent:return qi.fromGenerationTarget(r,e);case i.DataType:return ki.fromGenerationTarget(r,e);case i.Property:return xr.fromGenerationTarget(r,e);case i.FunctionCall:return Xr.fromGenerationTarget(r,e);case i.Condition:return Jr.fromGenerationTarget(r,e);case i.Operation:return kr.fromGenerationTarget(r,e);case i.VariableDeclaration:return sn.fromGenerationTarget(r,e);case i.VariableInstance:return Wr.fromGenerationTarget(r,e);case i.OutputMap:return jn.fromGenerationTarget(r,e);case i.ReturnDeclaration:return kt.fromGenerationTarget(r,e);case i.ArgumentDeclaration:return zr.fromGenerationTarget(r,e);case i.InputMap:return xn.fromGenerationTarget(r,e);case i.InstalledProject:return Hr.fromGenerationTarget(r,e);case i.ReturnStatement:return Zr.fromGenerationTarget(r,e);case i.Loop:return qr.fromGenerationTarget(r,e);case i.Search:return Yr.fromGenerationTarget(r,e);case i.ActionDescriptor:return se.fromGenerationTarget(r,e);case i.ValueDescriptor:return Kr.fromGenerationTarget(r,e);case i.InternalCall:return Ji.fromGenerationTarget(r,e);case i.ContinueStatement:return Ot.fromGenerationTarget(r,e);case i.BreakStatement:return Yi.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const L={seenEntityMaps:new Map,seenEntities:new Set};class wP{constructor(){c(this,"initialData")}}const V={cascade:!1},BP={load:async r=>null},Hq={create:async r=>r,update:async r=>r,delete:async r=>{},...BP};class zq{}class Zq extends wP{}class Kq{}class Xq{}class Qq{}class cp{}class eJ extends cp{}class tJ extends cp{}class nJ{}class qn{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==i.GenericReference)e.readsValue=b(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===i.GenericReference){const t=Lt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;pt.includes(t.type)||(t=t.parent);const n=e.type===i.InputMap&&e.parent.type===i.Loop;n&&(t=e.parent.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),!n&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):n||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}static hydrateReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==i.GenericReference)e.readsValue=b(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===i.GenericReference){const t=Lt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;pt.includes(t.type)||(t=t.parent);const n=e.type===i.InputMap&&e.parent.type===i.Loop;n&&(t=e.parent.parent),e.readsValue.setParent(t),!n&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):n||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class is{static initWritesValues(e,t){const n=e.initialData.writesValues.reduce((s,o)=>{if(o.type===i.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const l=b(o,e.project);return l.setValueWriter(e),Fe.includes(l.type)&&(l.setParent(t),l.initChildren()),[...s,l]},[]),a=[...e.writesValues];return e.writesValues=m([...a,...n]),e.writesValues}}class rJ{}const te=class te{constructor(e){c(this,"initialData");c(this,"id");c(this,"version");c(this,"type",i.Project);c(this,"name",null);c(this,"description",null);c(this,"x");c(this,"y");c(this,"entities",[]);c(this,"projects",[]);c(this,"functions",[]);c(this,"events",[]);c(this,"variableDeclarations",[]);c(this,"variableInstances",[]);c(this,"conditions",[]);c(this,"operations",[]);c(this,"functionCalls",[]);c(this,"loops",[]);c(this,"searches",[]);c(this,"primitives",[]);c(this,"builtInBaseEntities",[]);c(this,"operationDeclarations",[]);c(this,"globalEventActionDescriptors",[]);c(this,"loopDeclarations",[]);c(this,"loopDeclarationsBodies",[]);c(this,"conditionDeclarations",[]);c(this,"valueDescriptors",[]);c(this,"dataTypes",[]);c(this,"project");c(this,"instances",{});c(this,"builtInInstances",{});c(this,"errors",[]);c(this,"references",[]);c(this,"initialized",!1);this.initialData=e,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=0,this.y=0,this.instances[this.id]=this;try{(!te.UUID||te.UUID.isBackup)&&(te.UUID=eo==null?void 0:eo()),te.UUID||(te.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:t=>t})}catch(t){console.error("Error initializing UUID module",t),te.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:n=>n}}}static injectUUIDModule(e){te.UUID=e}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[];return a.push(...je(n)),{errors:a,modifiedData:n}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async n=>{await t.init(this),n(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];return{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.validate(),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[],t=[],n=[];return{updated:m(e),added:m(t),removed:m(n),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(e){return this.operationDeclarations.includes(e)}isGlobalEventActionDescriptor(e){return this.globalEventActionDescriptors.includes(e)}isLoopDeclaration(e){return this.loopDeclarations.includes(e)}isConditionDeclaration(e){return this.conditionDeclarations.includes(e)}initChildren(){return this.initialized?this:(this.initialized=!0,this.entities=this.initialData.entities.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.afterAllChildrenInitialized(),this)}subscribeInstance(e){return(!this.instances[e.id]||this.instances[e.id]!==e)&&(this.instances[e.id]=e),this}subscribeBuiltInInstance(e){return(!this.builtInInstances[e.id]||this.builtInInstances[e.id]!==e)&&(this.builtInInstances[e.id]=e),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(e){return delete this.instances[e.id],this}findSubscribedInstance(e){return this.instances[e.id]||null}findSubscribedBuiltInInstance(e){return this.builtInInstances[e.id]||null}get(e){return this.instances[e]||this.builtInInstances[e]||null}getManaged(e){return this.instances[e]||null}getBuiltIn(e){return this.builtInInstances[e]||null}findSubscribedInstanceFromReference(e){return this.instances[e.entityId]||null}findSubscribedBuiltInInstanceFromReference(e){return this.builtInInstances[e.entityId]||null}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await te.repository.load(this.id),this}async create(e=V){return await te.repository.create(this.toShallowJSON()),this}async update(e=V){return await te.repository.update(this.toShallowJSON()),this}async delete(e=V){return await te.repository.delete(this.id),this}remove({ignoreUpstream:e}={ignoreUpstream:!1}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}getAllBuiltInIds(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlatIds(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlatIds(e)),...this.operationDeclarations.flatMap(t=>t.toFlatIds(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlatIds(e)),...this.loopDeclarations.flatMap(t=>t.toFlatIds(e)),...this.conditionDeclarations.flatMap(t=>t.toFlatIds(e)),...this.valueDescriptors.flatMap(t=>t.toFlatIds(e)),...this.dataTypes.flatMap(t=>t.toFlatIds(e))]}getAllBuiltIn(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlat(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlat(e)),...this.operationDeclarations.flatMap(t=>t.toFlat(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlat(e)),...this.loopDeclarations.flatMap(t=>t.toFlat(e)),...this.conditionDeclarations.flatMap(t=>t.toFlat(e)),...this.valueDescriptors.flatMap(t=>t.toFlat(e)),...this.dataTypes.flatMap(t=>t.toFlat(e))]}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlat(e)),...this.functions.flatMap(n=>n.toFlat(e)),...this.events.flatMap(n=>n.toFlat(e)),...this.projects.flatMap(n=>n.toFlat(e)),...this.variableDeclarations.flatMap(n=>n.toFlat(e)),...this.variableInstances.flatMap(n=>n.toFlat(e)),...this.conditions.flatMap(n=>n.toFlat(e)),...this.operations.flatMap(n=>n.toFlat(e)),...this.functionCalls.flatMap(n=>n.toFlat(e)),...this.loops.flatMap(n=>n.toFlat(e)),...this.searches.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(t=>t.toJSON(e)),variableDeclarations:this.variableDeclarations.map(t=>t.toJSON(e)),variableInstances:this.variableInstances.map(t=>t.toJSON(e)),conditions:this.conditions.map(t=>t.toJSON(e)),operations:this.operations.map(t=>t.toJSON(e)),loops:this.loops.map(t=>t.toJSON(e)),searches:this.searches.map(t=>t.toJSON(e)),functions:this.functions.map(t=>t.toJSON(e)),events:this.events.map(t=>t.toJSON(e)),projects:this.projects.map(t=>t.toJSON(e)),functionCalls:this.functionCalls.map(t=>t.toJSON(e))})}toJSONClone(e={uuidStrategy:"uuid"}){const t=new Map,n=new Set,a=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(s=>{if(a.includes(s)){t.set(s,s);return}t.set(s,te.UUID.uuid())}),n.add(this.id),{id:t.get(this.id),version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),projects:this.projects.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),variableDeclarations:this.variableDeclarations.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),variableInstances:this.variableInstances.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),conditions:this.conditions.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),operations:this.operations.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),functions:this.functions.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),events:this.events.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),functionCalls:this.functionCalls.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),loops:this.loops.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),searches:this.searches.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null}))}}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+te.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(a=>a.toReference(e)),functions:this.functions.map(a=>a.toReference(e)),events:this.events.map(a=>a.toReference(e)),projects:this.projects.map(a=>a.toReference(e)),variableDeclarations:this.variableDeclarations.map(a=>a.toReference(e)),variableInstances:this.variableInstances.map(a=>a.toReference(e)),conditions:this.conditions.map(a=>a.toReference(e)),operations:this.operations.map(a=>a.toReference(e)),functionCalls:this.functionCalls.map(a=>a.toReference(e)),loops:this.loops.map(a=>a.toReference(e)),searches:this.searches.map(a=>a.toReference(e))}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlatJSON(e)),...this.functions.flatMap(n=>n.toFlatJSON(e)),...this.events.flatMap(n=>n.toFlatJSON(e)),...this.projects.flatMap(n=>n.toFlatJSON(e)),...this.variableDeclarations.flatMap(n=>n.toFlatJSON(e)),...this.variableInstances.flatMap(n=>n.toFlatJSON(e)),...this.conditions.flatMap(n=>n.toFlatJSON(e)),...this.operations.flatMap(n=>n.toFlatJSON(e)),...this.functionCalls.flatMap(n=>n.toFlatJSON(e)),...this.loops.flatMap(n=>n.toFlatJSON(e)),...this.searches.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlatGenerationTarget(e)),...this.functions.flatMap(n=>n.toFlatGenerationTarget(e)),...this.events.flatMap(n=>n.toFlatGenerationTarget(e)),...this.projects.flatMap(n=>n.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(n=>n.toFlatGenerationTarget(e)),...this.conditions.flatMap(n=>n.toFlatGenerationTarget(e)),...this.operations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.loops.flatMap(n=>n.toFlatGenerationTarget(e)),...this.searches.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.entities.forEach(e=>e.clearErrors()),this.projects.forEach(e=>e.clearErrors()),this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this.variableDeclarations.forEach(e=>e.clearErrors()),this.variableInstances.forEach(e=>e.clearErrors()),this.conditions.forEach(e=>e.clearErrors()),this.operations.forEach(e=>e.clearErrors()),this.functionCalls.forEach(e=>e.clearErrors()),this.loops.forEach(e=>e.clearErrors()),this.searches.forEach(e=>e.clearErrors()),this}validate(){const e=f5(),t=this.toJSON();return e.safeParse(t),this.validateChildren(),{success:!0,error:null,data:t}}validateChildren(){this.entities.forEach(e=>e.validate()),this.projects.forEach(e=>e.validate()),this.functions.forEach(e=>e.validate()),this.events.forEach(e=>e.validate()),this.variableDeclarations.forEach(e=>e.validate()),this.variableInstances.forEach(e=>e.validate()),this.conditions.forEach(e=>e.validate()),this.operations.forEach(e=>e.validate()),this.functionCalls.forEach(e=>e.validate()),this.loops.forEach(e=>e.validate()),this.searches.forEach(e=>e.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(t=>t.getErrors()),...this.projects.flatMap(t=>t.getErrors()),...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors()),...this.variableDeclarations.flatMap(t=>t.getErrors()),...this.variableInstances.flatMap(t=>t.getErrors()),...this.conditions.flatMap(t=>t.getErrors()),...this.operations.flatMap(t=>t.getErrors()),...this.functionCalls.flatMap(t=>t.getErrors()),...this.loops.flatMap(t=>t.getErrors()),...this.searches.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(e){return this.entities.find(t=>t.id===e)||null}addDefinitionEntityFromTransfer(e){const t=b(e,this);return this.addDefinitionEntity(t),t}addDefinitionEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=b(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=b(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=b(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=b(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=b(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=b(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=b(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=b(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=b(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=b(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeDefinitionEntity(e){const t=this.entities.findIndex(n=>n.id===e.id);if(t>-1){const n=this.entities[t];return this.entities.splice(t,1),n}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(n=>n.id===e.id);if(t>-1){const n=this.functions[t];return this.functions.splice(t,1),n}return null}removeExternalProject(e){const t=this.projects.findIndex(n=>n.id===e.id);if(t>-1){const n=this.projects[t];return this.projects.splice(t,1),n}return null}removeGlobalEvent(e){const t=this.events.findIndex(n=>n.id===e.id);if(t>-1){const n=this.events[t];return this.events.splice(t,1),n}return null}removeTopLevelVariableDeclaration(e){if(e.type!==i.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(n=>n.id===e.id);if(t>-1){const n=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),n}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(t=>t.methods)]}getFunctionDeclaration(e){return this.functions.find(t=>t.id===e)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.functionCalls.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.operations.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.functionCalls.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.conditions.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.conditions.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.operations.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.functionCalls.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.conditions.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.operations.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.loops.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.searches.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return m([...this.variableDeclarations,...this.getEntryPoints().reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(n=>{if(!n.declaration){const a=n.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(l=>l.id===s);o&&n.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===U.PERSISTED_ENTITY)||null}};c(te,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),c(te,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(te,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(te,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(te,"BASE_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,...te.INMUTABLE_BASE_PROPERTIES]),c(te,"MUTABLE_META_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,"x","y"]),c(te,"INMUTABLE_META_PROPERTIES",[...te.INMUTABLE_BASE_PROPERTIES]),c(te,"META_PROPERTIES",[...te.MUTABLE_META_PROPERTIES,...te.INMUTABLE_META_PROPERTIES]),c(te,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(te,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),c(te,"UPSTREAM_PROPERTIES",[...te.MUTABLE_UPSTREAM_PROPERTIES,...te.INMUTABLE_UPSTREAM_PROPERTIES]),c(te,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),c(te,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(te,"DOWNSTREAM_PROPERTIES",[...te.MUTABLE_DOWNSTREAM_PROPERTIES,...te.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(te,"PROPERTIES",[...te.META_PROPERTIES,...te.UPSTREAM_PROPERTIES,...te.DOWNSTREAM_PROPERTIES]);let M=te;class MP extends se{constructor(t){super(Qt,t);c(this,"id",Ve.Parallel);c(this,"name",Ve.Parallel);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Qt);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Qt.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Qt.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Qt.error?b(Qt.error,this.project):null}}class _P extends se{constructor(t){super(Rt,t);c(this,"id",Rt.id);c(this,"name",Rt.name);c(this,"description",Rt.description);c(this,"version",Rt.version);c(this,"autoexecutable",!1);c(this,"initialData",Rt);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Rt.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Rt.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Rt.error?b(Rt.error,this.project):null}}class VP extends se{constructor(t){super(wn,t);c(this,"id",Ve.Sequential);c(this,"name",Ve.Sequential);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",wn);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=wn.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=wn.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=wn.error?b(wn.error,this.project):null}}class iJ extends se{constructor(e){super(Xi,e)}}class aJ extends se{constructor(e){super(hr,e)}}class sJ extends se{constructor(t){super(fr,t);c(this,"autoexecutable",!0)}getEntityToMatchInputMap(t){return t.inputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(t){return t.inputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(t){return t.outputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].outputs.outputEntity.id})||null}getEntityToMatch(t){let n=null;if(t.readsValue){const s=t.readsValue.getDataType();s&&s.entity&&s.entity.type===i.DefinitionEntity&&(n=s.entity)}const a=t.getDefaultValue();return!n&&a&&a.valueAsType&&!Array.isArray(a.valueAsType)&&a.valueAsType.type===i.DefinitionEntity&&(n=a.valueAsType),n}syncOperationInstance(t){const n=this.getEntityToMatchInputMap(t);n&&this.syncEntityToMatchInputMapDataType(n);const a=this.getDataToValidateInputMap(t);a&&this.syncDataToValidateInputMapDataType(a);const s=this.getOutputDataOutputMap(t);return s&&this.syncOutputDataOutputMapDataType(s),t}syncEntityToMatchInputMapDataType(t){var a,s,o;if(((a=t.declaration)==null?void 0:a.id)!==_.operation[Ne.Validate].inputs.entityToMatch.id)return null;if(!t.dataType){const l={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:null,like:!0,inferred:!0,parent:t.toReference()},p=b(l,t.project);p.setParent(t),p.initChildren(),t.setDataType(p)}(s=t.dataType)==null||s.sync({inferred:!0,like:!1,asType:!0});const n=this.getEntityToMatch(t);return(o=t.dataType)==null||o.setEntity(n),t.dataType}syncDataToValidateInputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==_.operation[Ne.Validate].inputs.dataToValidate.id)return null;const n=this.getEntityToMatchInputMap(t.parent);if(!n||!this.getEntityToMatch(n))return null;if(!t.dataType){const u={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,like:!0,inferred:!0,parent:t.toReference()},h=b(u,t.project);h.setParent(t),h.initChildren(),t.setDataType(h)}(l=t.dataType)==null||l.sync({inferred:!0,like:!0,asType:!1});const s=this.getEntityToMatch(n);return(p=t.dataType)==null||p.setEntity(s),t.dataType}syncOutputDataOutputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==_.operation[Ne.Validate].outputs.outputEntity.id)return null;const n=this.getEntityToMatchInputMap(t.parent);if(!n||!this.getEntityToMatch(n))return null;if(!t.dataType){const u={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,like:!0,inferred:!0,parent:t.toReference()},h=b(u,t.project);h.setParent(t),h.initChildren(),t.setDataType(h)}(l=t.dataType)==null||l.sync({inferred:!0,like:!0,asType:!1});const s=this.getEntityToMatch(n);return(p=t.dataType)==null||p.setEntity(s),t.dataType}inferInputMapDataType(t){var n,a;return((n=t.declaration)==null?void 0:n.id)===_.operation[Ne.Validate].inputs.entityToMatch.id?this.syncEntityToMatchInputMapDataType(t):((a=t.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.dataToValidate.id?this.syncDataToValidateInputMapDataType(t):null}inferOutputMapDataType(t){var n;return((n=t.declaration)==null?void 0:n.id)===_.operation[Ne.Validate].outputs.outputEntity.id?this.syncOutputDataOutputMapDataType(t):null}}class oJ extends se{constructor(e){super(wl,e)}}class lJ extends se{constructor(e){super(Ml,e)}}class dJ extends se{constructor(e){super(_l,e)}}class cJ extends se{constructor(e){super(us,e)}}class uJ extends se{constructor(e){super(ls,e)}}class pJ extends se{constructor(e){super(Ki,e)}}function yJ(r){const e=[new VP(r),new MP(r),new _P(r),new iJ(r),new aJ(r),new sJ(r),new cJ(r),new oJ(r),new dJ(r),new lJ(r),new uJ(r),new pJ(r),new se(Cl,r),new se(Al,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class NP extends In{constructor(t){super(st,t);c(this,"initialData");c(this,"id",U.PERSISTED_ENTITY);c(this,"version",1);c(this,"name",U.PERSISTED_ENTITY);c(this,"description",st.description);c(this,"type",i.BuiltInBaseEntity);c(this,"abstract",st.abstract);c(this,"static",st.static);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=st,this.project=t,this.id=st.id,this.version=st.version,this.name=st.name,this.static=st.static,this.abstract=st.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(n=>b(n,this.project))}}function hJ(r){const e=[new NP(r),new In(ra,r),new In(un,r),new In(Os,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function fJ(r){const e=[new Kt(J,r),new Kt(On,r),new Kt(ee,r),new Kt(it,r),new Kt(Pn,r),new Kt(ln,r),new Kt(An,r),new Kt(ai,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function mJ(r){const e=[new se(As,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function TJ(r){const e=[new se(ta,r),new se(Wn,r),new se(ea,r),new se(li,r),new se(di,r),new se(Rs,r)];e.forEach(n=>{n.initChildren(),r.subscribeBuiltInInstance(n)}),r.loopDeclarations=e;const t=[new se(Kl,r),new se(bs,r),new se(Wl,r),new se(kT,r),new se(lE,r),new se(kl,r)];return t.forEach(n=>{n.initChildren(),r.subscribeBuiltInInstance(n)}),r.loopDeclarationsBodies=t,e}function EJ(r){const e=[new Kr(Cs,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function RJ(r){const e=[new se(gr,r),new se(hi,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}function LP(r){return r&&typeof r.then=="function"}class GP{constructor(e){c(this,"order",[]);c(this,"flatRecord",{});c(this,"onGoingVisits",{});this.flatten(e),this.orderEntities()}flatten(e){const t=new Set(ep()),n=m(P(e,t,{ignoreBuiltInBaseEntities:!0})),a=new Set;for(const s of n)this.flatRecord[s.id]=s,a.add(s.id);this.order=Array.from(a)}moveEntityAfterDependencies(e){const t=cl(e,this.flatRecord);for(const n of t){const a=this.order.indexOf(n),s=this.order.indexOf(e.id);if(a>s)return this.order.splice(s,1),this.order.splice(a,0,e.id),!0}return!1}orderEntities(){let e=!1;for(let t=0;t<this.order.length;t++){const n=this.order[t],a=this.flatRecord[n];if(this.moveEntityAfterDependencies(a)){e=!0;break}}e&&this.orderEntities()}getUpstreamOngoingDependenciesVisits(e,t){const n=cl(this.flatRecord[e],this.flatRecord),a={};return Object.entries(this.onGoingVisits[t]||{}).forEach(([s,o])=>{Array.from(n).includes(s)&&(a[s]=o)}),a}getDownstreamOngoingDependenciesVisits(e,t){const n=Object.keys(this.onGoingVisits[t]||{}),a=new Set(n.flatMap(o=>Array.from(cl(this.flatRecord[o],this.flatRecord)))),s={};return Array.from(a).forEach(o=>{o===e&&(s[o]=this.onGoingVisits[t][o])}),s}async settlePromises(e,t){const n=Object.values(e);n.length&&await Promise.all(n),Object.keys(e).forEach(a=>{delete this.onGoingVisits[t][a]})}visit(e){const t=this.order;for(const n of t)e(this.flatRecord[n]);return this}reverseVisit(e){const t=this.order.slice().reverse();for(const n of t)e(this.flatRecord[n]);return this}async visitAsync(e){const t=this.order,n=Math.random().toString(36).substring(7);this.onGoingVisits[n]={};for(const a of t){const s=this.getUpstreamOngoingDependenciesVisits(a,n);Object.keys(s).length&&await this.settlePromises(s,n);const o=e(this.flatRecord[a]);LP(o)&&(this.onGoingVisits[n][a]=o)}return await this.settlePromises(this.onGoingVisits[n],n),this.onGoingVisits[n]={},this}async reverseVisitAsync(e){const t=this.order.slice().reverse(),n=Math.random().toString(36).substring(7);this.onGoingVisits[n]={};for(const a of t){const s=this.getDownstreamOngoingDependenciesVisits(a,n);Object.keys(s).length&&await this.settlePromises(s,n);const o=e(this.flatRecord[a]);LP(o)&&(this.onGoingVisits[n][a]=o)}return await this.settlePromises(this.onGoingVisits[n],n),this.onGoingVisits[n]={},this}}const ti={},Tl={};async function gJ(r,e={}){const t={...TD};return t.id=r.id,e.empty?{data:{id:r.id,type:i.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function up(r){const e=new M(r);return fJ(e),hJ(e),yJ(e),mJ(e),TJ(e),EJ(e),RJ(e),e.getAllBuiltIn().forEach(n=>{e.builtInInstances[n.id]||(e.builtInInstances[n.id]=n,delete e.instances[n.id])}),e}function bJ(r){const e=new Map,t=r.getAllBuiltInIds();Object.keys(r.instances).forEach(a=>{if(t.includes(a)){e.set(a,a);return}e.set(a,M.UUID.uuid())});const n=up(r.toShallowJSON({seenEntityMaps:e}));return new GP(r).visit(a=>{const s=b(a.toShallowJSON({seenEntityMaps:e}),n);s.hydrateAncestors(),s.addSelfToProject()}).visit(a=>{const s=n.get(e.get(a.id));s&&s.afterAllChildrenInitialized()}),n.afterAllChildrenInitialized(),n}function $P(r){const e=up(r);return new GP(r).visit(t=>{const n=b(t,e);n.hydrateAncestors(),n.addSelfToProject()}).visit(t=>{const n=e.get(t.id);n&&n.afterAllChildrenInitialized()}),e.afterAllChildrenInitialized(),e}async function vJ(r,e={}){if(r.id&&ti[r.id])return ti[r.id];if(r.id&&Tl[r.id])return await Tl[r.id],ti[r.id];const t=gJ(r,e);r.id&&(Tl[r.id]=t);const n=await t;if(n.data){const a=$P(n.data);return ti[r.id]=a,r.id&&delete Tl[r.id],a}return null}function IJ(r){return ti[r.id]&&delete ti[r.id],null}const DJ="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Wu,d.ALL_BUILT_IN_BASE_ENTITIES=HR,d.ALL_BUILT_IN_CONDITION_ENTITIES=lg,d.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=cg,d.ALL_BUILT_IN_LOOP_ENTITIES=DE,d.ALL_BUILT_IN_OPERATION_ENTITIES=Vm,d.ALL_BUILT_IN_PRIMITIVE_ENTITIES=Dp,d.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=hg,d.ALL_BUILT_IN_VALUE_DESCRIPTORS=yg,d.ActionDescriptorState=se,d.ActionInputMapState=H7,d.ActionOutputMapState=K7,d.AppendToListOperationInputIds=Mh,d.AppendToListOperationOutputIds=_h,d.ArgumentDeclarationState=zr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ju,d.BUILT_IN_BASE_ENTITY_IDS=_,d.BUILT_IN_ENTITY_TYPES=Jn,d.BaseCanvasDraggableState=Kq,d.BaseEntityNames=U,d.BaseState=Zq,d.BaseValueDescriptorIds=os,d.BreakStatementState=Yi,d.BuiltInBaseEntityState=In,d.CACHED_PROJECTS_BY_ID=ti,d.CALLABLE_ENTITIES_EXPLANATION=dq,d.CALLABLE_TYPES=Xt,d.CALLER_ENTITIES_EXPLANATION=fO,d.CALLER_TYPES=on,d.CALLS_UPDATE_EXPLANATION=lr,d.COMPARISON_CONDITIONS=sg,d.CONDITIONS=og,d.CUSTOM_ENTITY_OPERATIONS=Xf,d.CallableEntityClass=Qq,d.CallerEntityClass=cp,d.ChildEntityState=Xq,d.ComparisonOperatorTypes=qe,d.ConditionState=Jr,d.ContinueStatementState=Ot,d.CreateNewInputIds=Of,d.CreateNewOutputIds=Pf,d.DRAGGABLE_CALLABLE_TYPES=vl,d.DRAGGABLE_CALLER_TYPES=fp,d.DRAGGABLE_ELEMENT_TYPES=ss,d.DRAGGABLE_EXECUTABLE_TYPES=xP,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=bl,d.DataTypeCompatibilityTypes=zt,d.DataTypeParentChildRelation=et,d.DataTypeState=ki,d.DefinitionEntityState=ei,d.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Hq,d.ENTITIES_WITH_VALLUES_EXPLANATION=el,d.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=V,d.ENTITY_RECUSION_OPTIONS_DEFAULTS=L,d.ENTITY_TYPES=jP,d.ENTITY_WITH_DECLARATION_TYPES=FP,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=pt,d.ENTITY_WITH_NAMES_TYPES=mp,d.ENTITY_WITH_PARENT_TYPES=yp,d.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=gl,d.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=hp,d.ENTITY_WITH_VALUE_TYPES=pp,d.ENTRY_POINT_ENTITIES_EXPLANATION=Xa,d.ENTRY_POINT_TYPES=We,d.EVENT_TYPES=ii,d.EXECUTABLE_TYPES=UP,d.EXECUTION_OPERATIONS=Sf,d.EntityError=Cr,d.EntityErrorSeverity=E,d.EntityGenerationError=g,d.EntityGenerationErrorCode=T,d.EntityInstanceErrorCode=G,d.EntityOperations=Ne,d.EntityType=i,d.EntityWithLogicScopeClass=rJ,d.EntityWithValueClass=nJ,d.EntryPointEntityClass=eJ,d.ExecutionOperations=Ve,d.ExecutionTerminationType=pO,d.FunctionCallState=Xr,d.FunctionDeclarationState=jr,d.GLOBAL_EVENT_DECLARATIONS=dg,d.GetLastInListOperationInputIds=gh,d.GetLastInListOperationOutputIds=bh,d.GlobalEventNames=Dn,d.GlobalEventState=qi,d.HTTPOperations=dt,d.HTTP_OPERATIONS=Mm,d.InputMapState=xn,d.InstalledProjectState=Hr,d.InternalCallState=Ji,d.JoinListOperationInputIds=Uy,d.JoinListOperationOutputIds=xy,d.LIST_OPERATIONS=Wh,d.ListOperations=X,d.LiteralValueState=Wi,d.LoopState=qr,d.LoopTypes=k,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=dr,d.NUMBER_OPERATIONS=ey,d.NumberOperations=Ge,d.OPERATION_DECLARATIONS=_m,d.OperationState=kr,d.OutputMapParentChildRelation=ri,d.OutputMapState=jn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=tl,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=or,d.PASS_THROUGH_CALLABLE_TYPES=Je,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Ju,d.ParallelExecutionOperation=MP,d.PassThroughCallableEntityClass=tJ,d.PersistedEntity=NP,d.PersistedEntityMethods=Gt,d.PrimitiveEntityState=Kt,d.PrimitiveTypes=C,d.ProjectState=M,d.PropertyState=xr,d.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=BP,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=cq,d.ReturnDeclarationState=kt,d.ReturnStatementState=Zr,d.STANDALONE_CONDITIONS=KR,d.STRING_OPERATIONS=Fy,d.ScopeCompatibilityType=ml,d.SearchState=Yr,d.SequentialExecutionOperation=VP,d.SequentialExecutionOperationInputIds=pf,d.SequentialExecutionOperationOutputIds=yf,d.SharedEntityErrorCode=B,d.SharedStateFunctionality=wP,d.SplitListOperationInputIds=nh,d.SplitListOperationOutputIds=rh,d.StandaloneOperatorTypes=Jt,d.StringOperations=re,d.TERMINATION_TYPES=xe,d.USER_MANAGED_ENTITY_TYPES=Tp,d.UserManagedEntityStateFunctionality=zq,d.VALUE_READING_ENTITIES_EXPLANATION=qu,d.VALUE_READING_TYPES=Sn,d.VALUE_WRITING_ENTITIES_EXPLANATION=mO,d.VALUE_WRITING_TYPES=Ze,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=ku,d.VARIABLE_TYPES=Fe,d.ValueAutogenerationType=ze,d.ValueDescriptorParentChildRelation=A,d.ValueDescriptorState=Kr,d.ValueReadingEntityClass=qn,d.ValueWritingEntityClass=is,d.VariableDeclarationState=sn,d.VariableInputMapState=Y7,d.VariableInstanceState=Wr,d.VariableOutputMapState=Z7,d.WaitOperation=_P,d.WaitOperationInputIds=af,d.WaitOperationOutputIds=sf,d.appendToListOperation=us,d.appendToListOperationElementToAppendArgument=Nl,d.appendToListOperationElementToAppendArgumentParentRef=xh,d.appendToListOperationElementToAppendArgumentRef=Lh,d.appendToListOperationError=Jh,d.appendToListOperationErrorParentRef=qh,d.appendToListOperationListArgument=Vl,d.appendToListOperationListArgumentParentRef=Uh,d.appendToListOperationListArgumentRef=Vh,d.appendToListOperationListDataType=Nh,d.appendToListOperationResultListDataType=Fh,d.appendToListOperationResultListReturn=kh,d.appendToListOperationResultListReturnParentRef=jh,d.appendToListOperationResultListReturnRef=$h,d.appendToListOperationSecondListDataType=Gh,d.asGenerationActionExample=bn,d.booleanPrototype=On,d.capitalizeFirstLetter=Jo,d.checkAreDataTypesCompatible=Zt,d.checkAreDefinitionEntitiesCompatibleAsDataType=eO,d.checkArePropertiesCompatibleAsDataType=QS,d.checkIsBranchDependentButNotDirectlyOnBranch=es,d.checkIsBranchDependentOnBranch=Rq,d.checkIsCallableEntityReachable=rs,d.checkIsCanvasEntity=Gq,d.checkIsDetachedBranch=DP,d.checkIsDetachedBranchShallow=lp,d.checkIsGlobalVariable=Vq,d.checkIsGloballyDeclared=op,d.checkIsMethod=PP,d.checkIsNestedScope=fl,d.checkScopeCompatibility=ns,d.cloneProject=bJ,d.countedLoopActionDescriptor=ta,d.countedLoopActionDescriptorDynamicReturnDeclaration=mE,d.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=fE,d.countedLoopActionDescriptorStringArgumentDeclaration=hE,d.countedLoopActionDescriptorStringArgumentDeclarationDataType=pE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=cE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=dE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=uE,d.countedLoopActionDescriptorStringArgumentDeclarationParentRef=yE,d.countedLoopBodyActionDescriptor=Kl,d.countedLoopBodyActionDescriptorAnyDynamicArgument=bE,d.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=gE,d.countedLoopBodyActionDescriptorAnyDynamicReturn=IE,d.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=vE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Zl,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=EE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=TE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=RE,d.createDefinitionEntityFromJSONObject=sl,d.createEntityError=Q,d.createNestedDataTypeForEntity=PO,d.createNewInstanceOperation=hr,d.createNewInstanceOperationEntityToInstanciateArgument=Nf,d.createNewInstanceOperationEntityToInstanciateArgumentRef=Mf,d.createNewInstanceOperationEntityToInstanciateDataType=_f,d.createNewInstanceOperationError=Ff,d.createNewInstanceOperationErrorParentRef=$f,d.createNewInstanceOperationNewEntityDataArgument=Bf,d.createNewInstanceOperationNewEntityDataArgumentDataType=wf,d.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=Cf,d.createNewInstanceOperationNewEntityDataArgumentParentRef=Af,d.createNewInstanceOperationOutputEntityDeclaration=Gf,d.createNewInstanceOperationOutputEntityDeclarationParentRef=Lf,d.createNewInstanceOperationRef=Vf,d.createSemanticId=de,d.createStateFromGenerationTargetType=Yq,d.createStateFromType=ke,d.createStateFromTypeAndSubscribe=b,d.cronJobBuiltInBaseEntity=Os,d.cronJobBuiltInBaseEntityExpressionProperty=WR,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=zP,d.cronJobBuiltInBaseEntityExpressionPropertyRef=qR,d.cronJobBuiltInBaseEntityRef=JR,d.cronJobTriggeredFunctionDeclarationBlueprint=ud,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=jR,d.dataTypeCompatibilityToErrorExplanation=DO,d.datePrototype=ln,d.dateValueAutogenerationSchema=Pc,d.definitionEntityToZodSchema=wg,d.deletePersistedEntityMethod=cd,d.deletePersistedEntityMethodParentRef=PR,d.deleteRootProject=IJ,d.endpointBuiltInBaseEntity=ra,d.endpointBuiltInBaseEntityRef=AE,d.endpointBuiltInBaseEntityRefFour=dR,d.endpointBuiltInBaseEntityRefThree=GE,d.endpointBuiltInBaseEntityRefTwo=_E,d.endpointBuiltInCorsProperty=CE,d.endpointBuiltInCorsPropertyDataType=PE,d.endpointBuiltInCorsPropertyDataTypeRef=SE,d.endpointBuiltInCorsPropertyRef=OE,d.endpointBuiltInMethodProperty=Ql,d.endpointBuiltInMethodPropertyDataType=LE,d.endpointBuiltInMethodPropertyDataTypeRef=VE,d.endpointBuiltInMethodPropertyRef=NE,d.endpointBuiltInPathProperty=Xl,d.endpointBuiltInPathPropertyDataType=ME,d.endpointBuiltInPathPropertyDataTypeRef=wE,d.endpointBuiltInPathPropertyRef=BE,d.endpointPathParamsArgumentDeclaration=td,d.endpointPathParamsArgumentDeclarationRef=YE,d.endpointPathParamsVariableDataType=HE,d.endpointPathParamsVariableDataTypeRef=WE,d.endpointReachedTriggerActionDescriptor=od,d.endpointReachedTriggerActionDescriptorRef=zE,d.endpointReachedTriggerActionDescriptorRefFour=XE,d.endpointReachedTriggerActionDescriptorRefThree=KE,d.endpointReachedTriggerActionDescriptorRefTwo=ZE,d.endpointRequestBodyArgumentDeclaration=rd,d.endpointRequestBodyArgumentDeclarationRef=xE,d.endpointRequestBodyVariableDataType=jE,d.endpointRequestHeadersArgumentDeclaration=ed,d.endpointRequestHeadersArgumentDeclarationRef=FE,d.endpointRequestHeadersVariableDataType=UE,d.endpointRequestHeadersVariableDataTypeRef=$E,d.endpointRequestQueryParamsArgumentDeclaration=nd,d.endpointRequestQueryParamsArgumentDeclarationRef=qE,d.endpointRequestQueryParamsVariableDataType=JE,d.endpointRequestQueryParamsVariableDataTypeRef=kE,d.endpointResponseBodyDataType=oR,d.endpointResponseBodyReturnDeclaration=sd,d.endpointResponseBodyReturnDeclarationRef=sR,d.endpointResponseCodeDataType=eR,d.endpointResponseCodeReturnDeclaration=id,d.endpointResponseCodeReturnDeclarationRef=QE,d.endpointResponseHeadersDataType=iR,d.endpointResponseHeadersDataTypeRef=nR,d.endpointResponseHeadersReturnDeclaration=ad,d.endpointResponseHeadersReturnDeclarationRef=rR,d.endpointReturnStatementRef=tR,d.endpointReturnStatementRefThree=lR,d.endpointReturnStatementRefTwo=aR,d.enrichFromKnownEntities=ts,d.enumOptionsProperty=Ip,d.enumOptionsPropertyDataType=bp,d.enumOptionsPropertyDataTypeRef=Rp,d.enumOptionsPropertyRef=gp,d.enumPrototype=Pn,d.enumPrototypeRef=vp,d.executionBuiltInBaseEntity=Ps,d.executionBuiltInEntityAbortMethod=pd,d.executionBuiltInEntityAbortMethodParentRef=YR,d.filterOutDuplicateEntities=m,d.filterOutDuplicateErrors=V9,d.findEntityFromKeys=zu,d.findReferenceToSelfInList=jO,d.findReferencesToSelfInProject=Aq,d.flattenActionDescriptor=qO,d.flattenArgumentDeclaration=JO,d.flattenBreakStatement=WO,d.flattenBuiltInBaseEntity=YO,d.flattenCalls=vn,d.flattenCanvasAncestorsUntil=ol,d.flattenCondition=HO,d.flattenContinueStatement=zO,d.flattenDataType=KO,d.flattenDefinitionEntity=ZO,d.flattenDefinitionEntityExtensionAndImplementationTypes=ip,d.flattenDefinitionEntityExtensionTypes=yl,d.flattenDefinitionEntityExtensions=np,d.flattenDefinitionEntityImplementations=rp,d.flattenDefinitionEntityImplementionTypes=pl,d.flattenDerivedCanvasEntities=Nt,d.flattenDetachedBranch=OP,d.flattenElementCalls=Ue,d.flattenElementCallsOnTheSameScope=Pq,d.flattenEntity=P,d.flattenFunctionCall=XO,d.flattenFunctionDeclaration=QO,d.flattenGlobalEvent=eP,d.flattenInputMap=tP,d.flattenInstalledProject=nP,d.flattenInternalCall=rP,d.flattenLiteralValue=iP,d.flattenLoop=aP,d.flattenOperation=sP,d.flattenOutputMap=oP,d.flattenPrimitiveEntity=lP,d.flattenProject=dP,d.flattenProjectElements=xO,d.flattenProperty=cP,d.flattenRelatedCanvasElementsOnTheLeft=vP,d.flattenRelatedCanvasElementsOnTheRight=bP,d.flattenReturnDeclaration=uP,d.flattenReturnStatement=pP,d.flattenSearch=yP,d.flattenValueDescriptor=hP,d.flattenVariableDeclaration=fP,d.flattenVariableInstance=mP,d.flattenVariableReads=UO,d.flattenVariableWrites=FO,d.flattenVariables=Se,d.fromZodParseToEntityGenerationErrors=Fu,d.generate=YC,d.generateActionExample=uq,d.generateExecutionDataType=R7,d.generateIdFromStrategy=Ye,d.generateMutablePropertiesExplanation=Ko,d.generateRandomBoolean=nb,d.generateRandomDate=Vg,d.generateRandomDateAfter=Bg,d.generateRandomDateBefore=Mg,d.generateRandomDateBetweenRange=_g,d.generateRandomNumber=Kg,d.generateRandomNumberAfter=Hg,d.generateRandomNumberBefore=zg,d.generateRandomNumberBetweenRange=Zg,d.generateRandomText=tb,d.generateRandomTextAfter=Xg,d.generateRandomTextBefore=Qg,d.generateRandomTextBetweenRange=eb,d.generateUniqueUUID=Yg,d.getAllActionDescriptorsForConditions=il,d.getAllActionDescriptorsForGlobalEvents=nl,d.getAllActionDescriptorsForLoops=rl,d.getAllActionDescriptorsForOperations=fq,d.getAllBuiltInEntityIds=ep,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=bO,d.getBaseBuiltInEntities=ur,d.getBaseSchemaBasedOnType=yO,d.getBuiltInEntityOwner=pr,d.getCallableEntityReferenceSchema=at,d.getCallableEntityTypeSchema=xD,d.getCalledBy=qt,d.getCallerEntityReferenceSchema=F3,d.getCallerEntityTypeSchema=$3,d.getCalls=Xu,d.getCanvasEntitiesDerivedFromInternalCalls=gP,d.getCanvasEntitiesDerivedFromWrites=Hi,d.getCanvasEntityDerivedFromValueReadingEntity=ul,d.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=RP,d.getCanvasEntityReferenceSchema=n5,d.getCanvasEntityTypeSchema=t5,d.getChildrenEntityWithValues=bq,d.getColumnProperties=jq,d.getCommonAncestor=Ku,d.getCommonChildren=AO,d.getDatabaseEntities=Uq,d.getDatabaseEntity=kq,d.getDeclaration=Ur,d.getDeepestScope=CP,d.getDefinitionEntityExtends=zi,d.getDraggableCallableEntityReferenceSchema=kD,d.getDraggableCallableEntityTypeSchema=jD,d.getDraggableCallerEntityReferenceSchema=x3,d.getDraggableCallerEntityTypeSchema=U3,d.getDraggableExecutableEntityReferenceSchema=J3,d.getDraggableExecutableEntityTypeSchema=q3,d.getDraggablePassThroughCallableEntityReferenceSchema=Go,d.getDraggablePassThroughCallableEntityTypeSchema=Lo,d.getDraggablePlayableEntityReferenceSchema=Z3,d.getDraggablePlayableEntityTypeSchema=z3,d.getEntityArgumentDeclarations=tp,d.getEntityInputMaps=TP,d.getEntityOutputMaps=Bq,d.getEntityReferenceSchema=e5,d.getEntityReturnDeclarations=EP,d.getEntityTypeSchema=Q3,d.getEntityWithLogicScopeReferenceSchema=$n,d.getEntityWithLogicScopeTypeSchema=W3,d.getEntityWithValueReferenceSchema=UD,d.getEntityWithValueTypeSchema=G3,d.getEntryPointEntityReferenceSchema=nt,d.getEntryPointEntityTypeSchema=ir,d.getEventEntityReferenceSchema=Vo,d.getEventEntityTypeSchema=_o,d.getExecutableEntityReferenceSchema=k3,d.getExecutableEntityTypeSchema=j3,d.getExtendedBuiltInEntity=Mq,d.getExtendedDefinitionEntity=ap,d.getGenerationTargetSchemaBasedOnType=hO,d.getHeadIfPartOfDetachedBranch=SP,d.getHighestScope=AP,d.getImplementedBuiltInEntity=_q,d.getIsInteractive=sp,d.getLastInListOperation=_l,d.getLastInListOperationError=Bh,d.getLastInListOperationErrorParentRef=wh,d.getLastInListOperationInputListArgument=Ph,d.getLastInListOperationInputListArgumentParentRef=Oh,d.getLastInListOperationInputListArgumentRef=vh,d.getLastInListOperationInputListDataType=Ih,d.getLastInListOperationOutputElementDataType=Sh,d.getLastInListOperationOutputElementReturn=Ch,d.getLastInListOperationOutputElementReturnParentRef=Ah,d.getLastInListOperationOutputElementReturnRef=Dh,d.getLinkedEntitiesFromArgumentDeclaration=Oq,d.getLowestPersistedEntityImplementation=IP,d.getParentCallableEntity=CO,d.getParentCallerEntity=BO,d.getParentCanvasEntities=Pt,d.getParentCanvasEntity=lt,d.getParentCanvasEntityFromTransfer=ll,d.getParentEntryPoint=gq,d.getParentPassthroughCallableEntity=wO,d.getPassThroughCallableEntityReferenceSchema=$e,d.getPassThroughCallableEntityTypeSchema=No,d.getPeristedEntities=Fq,d.getPlayableEntityReferenceSchema=H3,d.getPlayableEntityTypeSchema=Y3,d.getProject=vJ,d.getPrototypeByType=hl,d.getReferenceEntityId=S,d.getReferencedEntitiesStateOrErrors=Qo,d.getReferencedEntityStateOrErrors=Uu,d.getRelatedCanvasElementsOnTheLeft=Qr,d.getRelatedCanvasElementsOnTheLeftFromTransfer=kO,d.getRelatedCanvasElementsOnTheRight=cr,d.getRootEntryPointScopeOwner=dp,d.getScopeOwner=At,d.getTerminationReferenceSchema=X3,d.getTerminationTypeSchema=K3,d.getUpstreamDependencyIds=cl,d.getUsedArgFromDeclaration=Cq,d.getUsedReturnFromDeclaration=wq,d.getValueReadingEntityReferenceSchema=FD,d.getValueReadingEntityTypeSchema=Gn,d.getValueWritingEntityReferenceSchema=L3,d.getValueWritingEntityTypeSchema=xa,d.getVariableFromInputMapping=_O,d.getVariableFromReturnVariablePointer=LO,d.getVariableReferenceSchema=rr,d.getVariableTypeSchema=Vr,d.getVariablesFromArgumentDeclarations=dl,d.getVariablesFromInputMaps=VO,d.getVariablesFromOutputMapping=GO,d.getVariablesFromOutputMaps=$O,d.getVariablesFromReturnDeclarations=NO,d.getVariablesInSameOrHigherScope=Mu,d.getWrites=Qu,d.groupCallsBasedOnParallelizableExecution=Iq,d.handleAfterEntityImplementationSideEffects=OO,d.handleBeforeEntityImplementationSideEffects=SO,d.httpRequestBodyArgument=fs,d.httpRequestBodyArgumentRef=um,d.httpRequestBodyDataType=pm,d.httpRequestHeadersArgument=hs,d.httpRequestHeadersArgumentRef=dm,d.httpRequestHeadersDataType=cm,d.httpRequestMethodArgument=ps,d.httpRequestMethodArgumentRef=om,d.httpRequestMethodDataType=lm,d.httpRequestMethodDataTypeRef=am,d.httpRequestOperation=Xi,d.httpRequestOperationErrorValueDescriptor=xl,d.httpRequestOperationErrorValueDescriptorDatatype=Bm,d.httpRequestOperationErrorValueDescriptorRef=wm,d.httpRequestOperationRef=Om,d.httpRequestOperationRefEight=Am,d.httpRequestOperationRefFive=Dm,d.httpRequestOperationRefFour=Im,d.httpRequestOperationRefNine=Cm,d.httpRequestOperationRefSeven=Pm,d.httpRequestOperationRefSix=Sm,d.httpRequestOperationRefThree=vm,d.httpRequestOperationRefTwo=bm,d.httpRequestQueryParamsArgument=Ul,d.httpRequestQueryParamsArgumentRef=rm,d.httpRequestQueryParamsDataType=im,d.httpRequestVariableURLArgument=ys,d.httpRequestVariableURLArgumentRef=tm,d.httpRequestVariableURLDataType=nm,d.httpRequestVariableURLDataTypeRef=Qf,d.httpResponseBodyReturnDataType=gm,d.httpResponseBodyReturnDataTypeRef=Em,d.httpResponseBodyReturnReturn=Es,d.httpResponseBodyReturnReturnRef=Rm,d.httpResponseCodeDataType=hm,d.httpResponseCodeReturn=ms,d.httpResponseCodeReturnRef=ym,d.httpResponseHeadersDataType=Tm,d.httpResponseHeadersDataTypeRef=fm,d.httpResponseHeadersReturn=Ts,d.httpResponseHeadersReturnRef=mm,d.implement=al,d.inferArgumentDeclarationDataType=tO,d.inferDataType=gn,d.inferInputMapDataType=Cu,d.inferOutputMapDataType=Bu,d.inferPropertyDataType=iO,d.inferReturnDeclarationDataType=wu,d.inferValueDescriptorDataType=aO,d.inferVariableDeclarationDataType=rO,d.inferVariableInstanceDataType=nO,d.initBaseProjectEntity=up,d.initProject=$P,d.iterateOverListActionDescriptorListArgumentDeclaration=uT,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=dT,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=lT,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=cT,d.iterateOverListLoopActionDescriptor=Wn,d.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=yT,d.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=pT,d.iterateOverListLoopBodyActionDescriptor=bs,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=vT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=bT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=DT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=IT,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=gs,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=fT,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=hT,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=mT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=gT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=ET,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=TT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=RT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=CT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=PT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=OT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=AT,d.iterateOverObjectKeysLoopActionDescriptor=li,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=BT,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=wT,d.iterateOverObjectKeysLoopBodyActionDescriptor=kT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=UT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=FT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=jT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=xT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Yl,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=_T,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=MT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=VT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=$T,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=LT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=NT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=GT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=HT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=WT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=JT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=YT,d.iterateOverObjectValuesLoopActionDescriptor=di,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=ZT,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=zT,d.iterateOverObjectValuesLoopBodyActionDescriptor=lE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=aE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=iE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=oE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=sE,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Hl,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=XT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=KT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=QT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=rE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=tE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=eE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=nE,d.iterateOverStringActionDescriptorDynamicReturnDeclaration=Zm,d.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=zm,d.iterateOverStringActionDescriptorStringArgumentDeclaration=Hm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Wm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Jm,d.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Ym,d.iterateOverStringLoopActionDescriptor=ea,d.iterateOverStringLoopBodyActionDescriptor=Wl,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=iT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=rT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=sT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=aT,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=ql,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Xm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Km,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Qm,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Jl,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=tT,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=eT,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=nT,d.joinListOperation=wl,d.joinListOperationError=th,d.joinListOperationErrorParentRef=eh,d.joinListOperationFirstListArgument=zy,d.joinListOperationFirstListArgumentParentRef=Hy,d.joinListOperationFirstListArgumentRef=jy,d.joinListOperationFirstListDataType=ky,d.joinListOperationResultListDataType=Yy,d.joinListOperationResultListReturn=Qy,d.joinListOperationResultListReturnParentRef=Xy,d.joinListOperationResultListReturnRef=Wy,d.joinListOperationSecondListArgument=Ky,d.joinListOperationSecondListArgumentParentRef=Zy,d.joinListOperationSecondListArgumentRef=qy,d.joinListOperationSecondListDataType=Jy,d.joinListWithLastSeparator=q,d.joinStringsOperation=Ki,d.joinStringsOperationDynamicStringArgument=by,d.joinStringsOperationDynamicStringArgumentParentRef=gy,d.joinStringsOperationDynamicStringArgumentRef=Ey,d.joinStringsOperationDynamicStringDataType=Ry,d.joinStringsOperationError=Ty,d.joinStringsOperationErrorParentRef=my,d.joinStringsOperationFirstStringArgument=ds,d.joinStringsOperationFirstStringArgumentParentRef=oy,d.joinStringsOperationFirstStringArgumentRef=ty,d.joinStringsOperationFirstStringDataType=ny,d.joinStringsOperationResultStringDataType=sy,d.joinStringsOperationResultStringReturn=Zi,d.joinStringsOperationResultStringReturnParentRef=fy,d.joinStringsOperationResultStringReturnRef=ay,d.joinStringsOperationSecondStringArgument=cs,d.joinStringsOperationSecondStringArgumentParentRef=hy,d.joinStringsOperationSecondStringArgumentRef=ry,d.joinStringsOperationSecondStringDataType=iy,d.joinStringsOperationSeparatorStringArgument=yy,d.joinStringsOperationSeparatorStringArgumentParentRef=py,d.joinStringsOperationSeparatorStringArgumentRef=ly,d.joinStringsOperationSeparatorStringDataType=uy,d.joinStringsOperationSeparatorStringDataTypeDefaultValue=cy,d.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=dy,d.keyValuePrototype=ai,d.lowercaseFirstLetter=Wo,d.manualFlowActionDescriptorDeclarationArgumentDeclaration=jl,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=$m,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=Gm,d.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=Fm,d.manualFlowLoopActionDescriptor=Rs,d.manualFlowLoopActionDescriptorDynamicReturnDeclaration=Lm,d.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Nm,d.manualFlowLoopBodyActionDescriptor=kl,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=xm,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Um,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=km,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=jm,d.mapActionDescriptorToTypeItRepresents=$q,d.mergeEntityErrorsList=N9,d.mergeListOfEntities=Nq,d.methodDefaultValue=sm,d.mockClientProject=TD,d.moreThanOrEqualCondition=hi,d.moreThanOrEqualConditionLeftHandArgument=tg,d.moreThanOrEqualConditionLeftHandArgumentDataType=QR,d.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=XR,d.moreThanOrEqualConditionLeftHandArgumentParentRef=eg,d.moreThanOrEqualConditionRightHandArgument=ag,d.moreThanOrEqualConditionRightHandArgumentDataType=rg,d.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=ng,d.moreThanOrEqualConditionRightHandArgumentParentRef=ig,d.notEmptyCondition=gr,d.notEmptyConditionArgument=ZR,d.notEmptyConditionRef=zR,d.nullPrototype=Ep,d.numberAdditionOperation=ls,d.numberAdditionOperationDynamicSummandArgument=Gp,d.numberAdditionOperationDynamicSummandArgumentType=Lp,d.numberAdditionOperationDynamicSummandArgumentTypeParentRef=Np,d.numberAdditionOperationError=Vp,d.numberAdditionOperationErrorParentRef=_p,d.numberAdditionOperationFirstNumberArgument=Il,d.numberAdditionOperationFirstNumberArgumentRef=Sp,d.numberAdditionOperationFirstNumberDataType=Op,d.numberAdditionOperationRef=Bp,d.numberAdditionOperationRefThree=Sl,d.numberAdditionOperationRefTwo=Mp,d.numberAdditionOperationResultNumberDataType=wp,d.numberAdditionOperationResultNumberReturn=Ol,d.numberAdditionOperationResultNumberReturnRef=Cp,d.numberAdditionOperationSecondNumberArgument=Dl,d.numberAdditionOperationSecondNumberArgumentRef=Pp,d.numberAdditionOperationSecondNumberDataType=Ap,d.numberPrototype=ee,d.numberSubtractionOperation=Al,d.numberSubtractionOperationDynamicSubtrahendArgument=Qp,d.numberSubtractionOperationDynamicSubtrahendArgumentType=Xp,d.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Kp,d.numberSubtractionOperationError=Zp,d.numberSubtractionOperationErrorParentRef=zp,d.numberSubtractionOperationFirstNumberArgument=qp,d.numberSubtractionOperationFirstNumberArgumentRef=$p,d.numberSubtractionOperationFirstNumberDataType=Fp,d.numberSubtractionOperationRef=Pl,d.numberSubtractionOperationRefThree=Yp,d.numberSubtractionOperationRefTwo=Jp,d.numberSubtractionOperationResultNumberDataType=kp,d.numberSubtractionOperationResultNumberReturn=Hp,d.numberSubtractionOperationResultNumberReturnRef=jp,d.numberSubtractionOperationSecondNumberArgument=Wp,d.numberSubtractionOperationSecondNumberArgumentRef=Up,d.numberSubtractionOperationSecondNumberDataType=xp,d.numberValueAutogenerationSchema=Oc,d.parallelExecutionOperation=Qt,d.parallelExecutionOperationError=rf,d.parallelExecutionOperationErrorParentRef=nf,d.parallelExecutionOperationListOfExecutionResultsDataType=Qh,d.parallelExecutionOperationListOfExecutionResultsReturn=Gl,d.parallelExecutionOperationListOfExecutionResultsReturnRef=Xh,d.parallelExecutionOperationListOfFunctionsArgument=Ll,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Kh,d.parallelExecutionOperationListOfFunctionsArgumentRef=Zh,d.parallelExecutionOperationListOfFunctionsBlueprint=zh,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=Hh,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=Yh,d.parallelExecutionOperationRef=ef,d.parallelExecutionOperationRefThree=tf,d.persistedBuiltInBaseEntity=st,d.persistedBuiltInBaseEntityDatabaseProperty=ui,d.persistedBuiltInBaseEntityDatabasePropertyDataType=wR,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=YP,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=BR,d.persistedBuiltInBaseEntityDatabasePropertyRef=CR,d.persistedBuiltInBaseEntityPrimaryKeyProperty=pi,d.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=FR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=_R,d.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=MR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=UR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=$R,d.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=NR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=VR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=GR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=LR,d.processOutputGlobalValueDescriptorDataType=pg,d.processOutputGlobalValueDescriptorReturn=Cs,d.processOutputGlobalValueDescriptorReturnRef=ug,d.projectPublicationCompletedGlobalEvent=As,d.propertyToZodSchema=Cg,d.relationalDatabaseBuiltInBaseEntity=un,d.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=dd,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=SR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=DR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=OR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=IR,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=ld,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=vR,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=gR,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=bR,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=vs,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=pR,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=cR,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=uR,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Ss,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=RR,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=TR,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=ER,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=Ds,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=mR,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=WP,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=fR,d.relationalDatabaseBuiltInBaseEntityRef=ci,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=Is,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=hR,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=JP,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=yR,d.resolveActionDescriptorName=uO,d.resolveBaseEntityName=oO,d.resolveBuiltInBaseEntityDataTypeLabel=lO,d.resolveClonedEntityProject=He,d.resolveConditionOperatorLabel=zo,d.resolveDataType=Yo,d.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Zu,d.resolveDataTypeLabel=Ka,d.resolveDefinitionEntityDataTypeLabel=D7,d.resolveEntityDataTypeLabel=I7,d.resolveEntityName=w,d.resolveFirstCallsSecond=Dq,d.resolveFirstWritesSecond=Sq,d.resolvePrimaryKeyProperty=xq,d.resolvePrimitiveEntityName=cO,d.resolveSearchName=dO,d.resolveVariableScope=g7,d.sequentialExecutionOperation=wn,d.sequentialExecutionOperationError=Df,d.sequentialExecutionOperationErrorParentRef=If,d.sequentialExecutionOperationListOfExecutionResultsDataType=gf,d.sequentialExecutionOperationListOfExecutionResultsReturn=Fl,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=vf,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=Rf,d.sequentialExecutionOperationListOfFunctionsArgument=$l,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Ef,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=bf,d.sequentialExecutionOperationListOfFunctionsArgumentRef=Tf,d.sequentialExecutionOperationListOfFunctionsBlueprint=mf,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=ff,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=hf,d.softDeletePersistedEntityMethod=HP,d.softDeletePersistedEntityMethodParentRef=xR,d.sortCallsBasedOnExecutionDependencies=MO,d.sortChildrenEntitiesBasedOnExecutionDependencies=vq,d.splitListOperation=Ml,d.splitListOperationError=Rh,d.splitListOperationErrorParentRef=Eh,d.splitListOperationFirstOutputListDataType=lh,d.splitListOperationFirstOutputListReturn=hh,d.splitListOperationFirstOutputListReturnParentRef=yh,d.splitListOperationFirstOutputListReturnRef=Bl,d.splitListOperationInputListArgument=ch,d.splitListOperationInputListArgumentParentRef=dh,d.splitListOperationInputListArgumentRef=ih,d.splitListOperationInputListDataType=ah,d.splitListOperationSecondOutputListDataType=fh,d.splitListOperationSecondOutputListReturn=Th,d.splitListOperationSecondOutputListReturnParentRef=mh,d.splitListOperationSplitIndexArgument=ph,d.splitListOperationSplitIndexArgumentParentRef=uh,d.splitListOperationSplitIndexArgumentRef=sh,d.splitListOperationSplitIndexDataType=oh,d.splitStringOperation=Cl,d.splitStringOperationError=$y,d.splitStringOperationErrorParentRef=Gy,d.splitStringOperationFirstPartResultStringDataType=Py,d.splitStringOperationFirstPartResultStringReturn=Ly,d.splitStringOperationFirstPartResultStringReturnParentRef=Ny,d.splitStringOperationFirstPartResultStringReturnRef=Oy,d.splitStringOperationIndexArgument=_y,d.splitStringOperationIndexArgumentParentRef=My,d.splitStringOperationIndexArgumentRef=Dy,d.splitStringOperationIndexDataType=Sy,d.splitStringOperationSecondPartResultStringDataType=Cy,d.splitStringOperationSecondPartResultStringReturn=kP,d.splitStringOperationSecondPartResultStringReturnParentRef=Vy,d.splitStringOperationSecondPartResultStringReturnRef=Ay,d.splitStringOperationStringArgument=By,d.splitStringOperationStringArgumentParentRef=wy,d.splitStringOperationStringArgumentRef=vy,d.splitStringOperationStringDataType=Iy,d.stringPrototype=J,d.stringValueAutogenerationSchema=Sc,d.suggestNewIdForEntity=$u,d.test_primitive_entities_export=DJ,d.toCamelCase=b7,d.toEntityState=Lt,d.toKebabCase=sO,d.toLowerCaseKebabCase=Ho,d.toPascalCase=v7,d.untypedDataPrototype=it,d.updateErrorsList=Be,d.updateValueReader=Lq,d.urlDefaultValue=em,d.uuidPrototype=An,d.validateArgumentDeclarationName=Lu,d.validateCalledByErrorIdInAction=yq,d.validateCalledByIdInAction=pq,d.validateCallers=gO,d.validateConditionEntityDeclaration=mq,d.validateDataOperation=fr,d.validateDataOperationDataToValidateArgument=kf,d.validateDataOperationDataToValidateArgumentParentRef=jf,d.validateDataOperationDataToValidateArgumentRef=Uf,d.validateDataOperationDataToValidateDataType=xf,d.validateDataOperationEntityToMatchTypeArgument=Yf,d.validateDataOperationEntityToMatchTypeArgumentParentRef=Wf,d.validateDataOperationEntityToMatchTypeArgumentRef=qf,d.validateDataOperationEntityToMatchTypeDataType=Jf,d.validateDataOperationError=Kf,d.validateDataOperationErrorParentRef=Zf,d.validateDataOperationOutputEntityDeclaration=zf,d.validateDataOperationOutputEntityDeclarationParentRef=Hf,d.validateDefinitionEntityName=Zo,d.validateEntryCaller=RO,d.validateErrorCaller=EO,d.validateFunctionCallDeclaration=vO,d.validateFunctionDeclarationName=_u,d.validateGeneratedEntityParentIsNotBuiltInEntity=lq,d.validateGeneration=sq,d.validateGenerationTarget=je,d.validateGenerationUpdate=oq,d.validateLoopEntityDeclaration=Tq,d.validateName=S7,d.validateOperationEntityDeclaration=IO,d.validatePropertyName=Nu,d.validateReachability=kn,d.validateReadsValueInActionPayload=hq,d.validateReferenceObject=Xo,d.validateReferenceToOne=xu,d.validateReferences=tt,d.validateReturnDeclarationName=Gu,d.validateSuccessCaller=TO,d.validateValueReaderGenerationUpdate=Qa,d.validateValueWritter=Yu,d.validateVariableDeclarationName=Vu,d.validateVariableInternalCallUse=Hu,d.valueAutogenerationCurrentDateAndTimeSchema=RD,d.valueAutogenerationGenericSchema=Eo,d.valueAutogenerationOptions=Ac,d.valueAutogenerationOptionsSchema=ED,d.valueAutogenerationRandomBooleanSchema=Dc,d.valueAutogenerationRandomDateBetweenSchema=AD,d.valueAutogenerationRandomDateFromSchema=OD,d.valueAutogenerationRandomDateSchema=bo,d.valueAutogenerationRandomDateUntilSchema=PD,d.valueAutogenerationRandomNumberBetweenSchema=vD,d.valueAutogenerationRandomNumberFromSchema=gD,d.valueAutogenerationRandomNumberSchema=Ro,d.valueAutogenerationRandomNumberUntilSchema=bD,d.valueAutogenerationRandomSchema=Va,d.valueAutogenerationRandomTextBetweenSchema=SD,d.valueAutogenerationRandomTextFromSchema=ID,d.valueAutogenerationRandomTextSchema=go,d.valueAutogenerationRandomTextUntilSchema=DD,d.valueAutogenerationRangeValueTypesSchema=_a,d.valueAutogenerationUniqueSchema=Ic,d.waitOperation=Rt,d.waitOperationMillisecondsNumberArgument=yr,d.waitOperationMillisecondsNumberArgumentRef=of,d.waitOperationMillisecondsNumberDataType=lf,d.waitOperationOperationError=uf,d.waitOperationOperationErrorParentRef=cf,d.waitOperationRef=df,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
406
|
+
Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:a,modifiedData:n}}get allBasePropertiesFromExtendedAndImplementedEntities(){return m([...this.extends.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[]),...this.implements.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[])])}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[]),...this.implements.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])].filter(e=>!!e.abstract))}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new g({id:`${this.id}--${T.InvalidParentUpdate}`,code:T.InvalidParentUpdate,severity:E.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on an '${this.type}', must be the root project as it is a globally declared entity.`,issue:null})),{errors:t,modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];if(this.initialData.parent){const a=S(this.initialData.parent),s=this.project.get(a);s&&(this.setParent(s),e.push(s))}return this.initialData.extends.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addExtension(o),e.push(o))}),this.initialData.implements.forEach(a=>{const s=S(a),o=this.project.get(s);o&&(this.addImplementation(o),e.push(o))}),{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.syncImplementationProperties(),this.addExtendedProperties(),this.addSuggestions(),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[this],t=[],n=[];if(this.parent.type===i.DataType){const a=this.parent;a.entity=this,e.push(a)}else this.project.addDefinitionEntity(this);return{updated:m(e),added:m(t),removed:m(n),self:this}}setParent(e){return this.parent=e,this}addExtension(e){return this.extends.includes(e)||this.extends.push(e),this}removeExtension(e){return this.extends=this.extends.filter(t=>t.id!==e.id),this}addImplementation(e){return this.implements.includes(e)||this.implements.push(e),this}removeImplementation(e){return this.implements=this.implements.filter(t=>t.id!==e.id),this}removeProperty(e){return this.properties=this.properties.filter(t=>t.id!==e.id),this}addMethod(e){return this.methods.includes(e)||(this.methods.push(e),this.suggestedMethods=this.suggestedMethods.filter(t=>t.name!==e.name)),this}removeMethod(e){return this.methods=this.methods.filter(t=>t.id!==e.id),this}addProperty(e){return this.properties.includes(e)||(this.properties.push(e),this.suggestedProperties=this.suggestedProperties.filter(t=>t.name!==e.name)),this}addSuggestedProperty(e){return this.suggestedProperties.includes(e)||this.suggestedProperties.push(e),this}addSuggestedMethod(e){return this.suggestedMethods.includes(e)||this.suggestedMethods.push(e),this}removeSuggestedProperty(e){return this.suggestedProperties=this.suggestedProperties.filter(t=>t.id!==e.id),this}removeSuggestedMethod(e){return this.suggestedMethods=this.suggestedMethods.filter(t=>t.id!==e.id),this}addAbstractMethod(e){return this.abstractMethods.includes(e)||this.abstractMethods.push(e),this}removeAbstractMethod(e){return this.abstractMethods=this.abstractMethods.filter(t=>t.id!==e.id),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.properties=this.initialData.properties.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=b(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>b(e,this.project)),this.implements=this.initialData.implements.map(e=>b(e,this.project)),this.afterAllChildrenInitialized(),this)}syncImplementationProperties(){const e=this.properties,t=this.implementedPropertiesFromOriginalParents,n=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...e];return t.filter(s=>!n.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id})).forEach(s=>{if(this.properties.find(u=>{var h;return((h=u.implements)==null?void 0:h.id)===s.id}))return;const l=this.properties.find(u=>u.name===s.name&&!!u.abstract&&!u.implements);if(l){l.implements=s,l.abstract=!1;return}const p=s.clone(this,M.UUID.uuid());p.initChildren(),p.implements=s,p.abstract=!1,this.addProperty(p)}),this}addExtendedProperties(){const e=this.properties,t=this.extendedPropertiesFromOriginalParents,n=t.filter(s=>t.find(l=>{var p;return((p=l.implements)==null?void 0:p.id)===s.id})?!1:!s.abstract),a=new Set(e.map(s=>s.name));return n.forEach(s=>{if(a.has(s.name))return;a.add(s.name);const o=s.clone(this,M.UUID.uuid());o.initChildren(),this.addProperty(o)}),this}addSuggestions(){return this.implements.forEach(e=>{v5(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=b(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),I5(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),l=b(o,this.project);if(l.suggestion=!0,l.setParent(this),l.initChildren(),l.inputs.forEach(p=>{p.suggestion=!0}),l.returnStatements.length){const p=l.returnStatements[0];p.suggestion=!0,p.outputs.forEach(u=>{u.suggestion=!0})}this.addSuggestedMethod(l)})}),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.static=e.static||this.static,this.abstract=e.abstract||this.abstract,this}async load(e=V){return await De.repository.load(this.id),this}async create(e=V){return await De.repository.create(this.toShallowJSON()),this}async update(e=V){return await De.repository.update(this.toShallowJSON()),this}async delete(e=V){return await De.repository.delete(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const n=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.properties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.methods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});n.push(...o),a.push(...l)}),{affected:m(n),removed:m(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.properties.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(n=>{const{affected:a}=n.restore({seenEntities:e});t.push(...a)}),{affected:m(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(n=>n.toFlat(e)),...this.implements.flatMap(n=>n.toFlat(e)),...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(n=>n.toFlatIds(e)),...this.implements.flatMap(n=>n.toFlatIds(e)),...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),implements:this.implements.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e)),parent:this.parent.toReference()})}toJSONClone(e=L){var n,a,s,o,l;let t;return(n=e.seenEntityMaps)!=null&&n.has(this.id)?t=e.seenEntityMaps.get(this.id):(t=e.newId||Ye(this,this.project,e.uuidStrategy),e.seenEntityMaps&&e.seenEntityMaps.set(this.id,t)),(a=e.seenEntities)!=null&&a.has(t)||(s=e.seenEntities)!=null&&s.has(this.id)?this.toReference({seenEntityMaps:e.seenEntityMaps}):((o=e.seenEntities)==null||o.add(t),(l=e.seenEntities)==null||l.add(this.id),{id:t,version:1,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(p=>p.toJSONClone({...e,newId:null})),methods:this.methods.map(p=>p.toJSONClone({...e,newId:null})),abstractMethods:this.abstractMethods.map(p=>p.toJSONClone({...e,newId:null})),implements:this.implements.map(p=>p.type===i.BuiltInBaseEntity?p.toJSON():p.toJSONClone({...e,newId:null})),extends:this.extends.map(p=>p.type===i.BuiltInBaseEntity?p.toJSON():p.toJSONClone({...e,newId:null})),parent:this.parent.toReference({seenEntityMaps:e.seenEntityMaps})})}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,name:this.name,description:this.description,type:this.type,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(a=>a.toReference(e)),methods:this.methods.map(a=>a.toReference(e)),abstractMethods:this.abstractMethods.map(a=>a.toReference(e)),implements:this.implements.map(a=>a.toReference(e)),extends:this.extends.map(a=>a.toReference(e)),parent:this.parent.toReference(e)}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e)),...this.implements.flatMap(n=>n.toFlatJSON(e)),...this.extends.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===i.Project?void 0:this.parent.id;return{id:this.id,name:this.name,description:this.description,type:this.type,static:this.static,abstract:this.abstract,extends:this.extends.map(t=>t.id),implements:this.implements.map(t=>t.id),parent:e}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.implements.filter(n=>n.type===i.DefinitionEntity).flatMap(n=>n.toFlatGenerationTarget(e)),...this.implements.filter(n=>n.type===i.DefinitionEntity).flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){return this.errors=b5(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e=null,t=null,n=!0){var v,I,D;let a=He(e,this);const s=this.toJSON(),o=t||de(w(this,this.project),i.DefinitionEntity,a);s.properties=[],s.methods=[],s.abstractMethods=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const u=ke(s,a);e&&u.setParent(e),n&&u.subscribe(),u.initChildren();const h=(v=this.properties)==null?void 0:v.map((O,$)=>O.clone(u,p+"-property-"+$+"-id",n));u.properties=h;const f=(I=this.methods)==null?void 0:I.map((O,$)=>O.clone(u,p+"-method-"+$+"-id",n));u.methods=f;const R=(D=this.abstractMethods)==null?void 0:D.map((O,$)=>O.clone(u,p+"-abstract-method-"+$+"-id",n));return u.abstractMethods=R,u}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return al(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(n=>n.type===i.DefinitionEntity||n.type===i.BuiltInBaseEntity&&n.interactive);return m([...this.methods,...this.extends.flatMap(n=>n.getAllInteractiveMethods()),...e.flatMap(n=>n.getAllInteractiveMethods())])}inferFromInputs(e){if(this.parent.type!==i.DataType||!this.parent.inferred)return this;const t=[];e.forEach(s=>{t.find(l=>w(l,this.project)===w(s,this.project))||t.push(s)});const n=this.properties.filter(s=>!s.getDataType());t.forEach(s=>{const o=n.find(f=>w(f,this.project)===w(s,this.project));if(!o)return;const p=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),u=gn(p),h=u==null?void 0:u.clone(o,o.id+"--"+M.UUID.uuid()+"--data-type",!0);h&&o.setDataType(h),s.setDeclaration(o)});const a=[];return t.forEach(s=>{if(!s.declaration){a.push(s);return}}),a.length===0?this:(a.forEach(s=>{const o=this.properties.find(v=>w(v,this.project)===w(s,this.project));if(o){if(s.setDeclaration(o),!o.getDataType()){const I=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),D=gn(I),O=D==null?void 0:D.clone(o,o.id+"--"+M.UUID.uuid()+"--data-type",!0);O&&o.setDataType(O)}return}const l={id:s.id+"--"+M.UUID.uuid()+"--inferred-property",type:i.Property,version:1,name:w(s,this.project),description:s.description,defaultValue:null,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,constant:!0,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=b(l,this.project);p.setParent(this),p.initChildren();const h=Ur(s.parent).getMasterInputWithValueWritterFromAllInstances(s),f=gn(h),R=f==null?void 0:f.clone(p,l.id+"--"+M.UUID.uuid()+"--data-type",!0);return R&&p.setDataType(R),this.addProperty(p),s.setDeclaration(p),p}),this)}};c(De,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(De,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),c(De,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(De,"BASE_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,...De.INMUTABLE_BASE_PROPERTIES]),c(De,"MUTABLE_META_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,"x","y"]),c(De,"INMUTABLE_META_PROPERTIES",[...De.INMUTABLE_BASE_PROPERTIES]),c(De,"META_PROPERTIES",[...De.MUTABLE_META_PROPERTIES,...De.INMUTABLE_META_PROPERTIES]),c(De,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),c(De,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(De,"UPSTREAM_PROPERTIES",[...De.MUTABLE_UPSTREAM_PROPERTIES,...De.INMUTABLE_UPSTREAM_PROPERTIES]),c(De,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),c(De,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(De,"DOWNSTREAM_PROPERTIES",[...De.MUTABLE_DOWNSTREAM_PROPERTIES,...De.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(De,"PROPERTIES",[...De.META_PROPERTIES,...De.UPSTREAM_PROPERTIES,...De.DOWNSTREAM_PROPERTIES]);let ei=De;function Jq(r){const e=X9(),t=r.toJSON();e.safeParse(t).success;const a=[];return Be(r.errors,a)}const as=class as{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.BuiltInBaseEntity);c(this,"abstract",!1);c(this,"static");c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"interactive",!1);c(this,"errors",[]);c(this,"project");this.initialData=this.initialData||e,this.project=this.project||t,this.id=this.id||e.id,this.version=this.version||e.version,this.name=this.name||e.name,this.static=this.static||e.static,this.interactive=this.interactive||e.interactive,this.abstract=e.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(n=>b(n,this.project))}get allBasePropertiesFromExtendedAndImplementedEntities(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...n]},[]))}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])])}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(e=V){return await as.repository.load(this.id),this}remove(e={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e)),...this.extends.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e)),...this.extends.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e))})}toReference(e=L){return{id:this.id+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(e=L){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(t=>t.toReference()),methods:this.methods.map(t=>t.toReference()),abstractMethods:this.abstractMethods.map(t=>t.toReference()),extends:this.extends.map(t=>t.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=Jq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}implement(e,t){return al(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(n=>n.type===i.BuiltInBaseEntity&&n.interactive||n.type===i.PrimitiveEntity).forEach(n=>{n instanceof as&&e.push(...n.getAllInteractiveMethods())})),m(e)}};c(as,"repository",{load:async e=>null});let In=as;function Wq(r){const e=k9(),t=r.toJSON();e.safeParse(t).success;const a=[];return Be(r.errors,a)}const El=class El{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",i.PrimitiveEntity);c(this,"static");c(this,"abstract");c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.static=e.static,this.abstract=e.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.parent=this,a})}get allBasePropertiesFromExtendedAndImplementedEntities(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...n]},[]))}get extendedPropertiesFromOriginalParents(){return m(this.extends.reduce((e,t)=>{const n=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...n]},[]))}get implementedPropertiesFromOriginalParents(){return m([...this.extends.reduce((e,t)=>{const n=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!n.find(o=>o.name===s.name));return[...n,...a,...e]},[])])}get extendedProperties(){return this.properties.filter(e=>e.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(e=>!e.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async load(e=V){return await El.repository.load(this.id),this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.properties.flatMap(n=>n.toFlat(e)),...this.methods.flatMap(n=>n.toFlat(e)),...this.abstractMethods.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(n=>n.toFlatIds(e)),...this.methods.flatMap(n=>n.toFlatIds(e)),...this.abstractMethods.flatMap(n=>n.toFlatIds(e))])}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(t=>t.toJSON(e)),methods:this.methods.map(t=>t.toJSON(e)),abstractMethods:this.abstractMethods.map(t=>t.toJSON(e)),extends:this.extends.map(t=>t.toJSON(e))})}toReference(e=L){return{id:this.id+"--"+M.UUID.uuid()+"--ref",type:i.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(e=L){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(t=>t.toReference()),methods:this.methods.map(t=>t.toReference()),abstractMethods:this.abstractMethods.map(t=>t.toReference()),extends:this.extends.map(t=>t.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(n=>n.toFlatJSON(e)),...this.methods.flatMap(n=>n.toFlatJSON(e)),...this.abstractMethods.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(e=>e.id)}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(n=>n.toFlatGenerationTarget(e)),...this.methods.flatMap(n=>n.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.properties.forEach(e=>e.clearErrors()),this.methods.forEach(e=>e.clearErrors()),this.abstractMethods.forEach(e=>e.clearErrors()),this}validate(){const e=Wq(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(t=>t.getErrors()),...this.methods.flatMap(t=>t.getErrors()),...this.abstractMethods.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(n=>n.type===i.BuiltInBaseEntity&&n.interactive||n.type===i.PrimitiveEntity).forEach(n=>{n instanceof In&&e.push(...n.getAllInteractiveMethods())}),m(e)}};c(El,"repository",{load:async e=>null});let Kt=El;function ke(r,e){if(!r)throw new Error("Entity is null");const t=e.get(r.id);switch(r.type){case i.LiteralValue:return t||new Wi(r,e);case i.DefinitionEntity:return t||new ei(r,e);case i.PrimitiveEntity:return t||new Kt(r,e);case i.FunctionDeclaration:return t||new jr(r,e);case i.GlobalEvent:return t||new qi(r,e);case i.DataType:return t||new ki(r,e);case i.Property:return t||new xr(r,e);case i.FunctionCall:return t||new Xr(r,e);case i.Condition:return t||new Jr(r,e);case i.Operation:return t||new kr(r,e);case i.VariableDeclaration:return t||new sn(r,e);case i.VariableInstance:return t||new Wr(r,e);case i.OutputMap:return t||new jn(r,e);case i.ReturnDeclaration:return t||new kt(r,e);case i.ArgumentDeclaration:return t||new zr(r,e);case i.InputMap:return t||new xn(r,e);case i.Project:return t||new M(r);case i.InstalledProject:return t||new Hr(r,e);case i.ActionDescriptor:return t||new se(r,e);case i.ReturnStatement:return t||new Zr(r,e);case i.Loop:return t||new qr(r,e);case i.Search:return t||new Yr(r,e);case i.ValueDescriptor:return t||new Kr(r,e);case i.BuiltInBaseEntity:return t||new In(r,e);case i.InternalCall:return t||new Ji(r,e);case i.ContinueStatement:return t||new Ot(r,e);case i.BreakStatement:return t||new Yi(r,e);case i.GenericReference:return e.get(r.entityId);default:throw new Error("Invalid entity type: "+r.type)}}function b(r,e){if(!r)throw new Error("Entity is null");const t=ke(r,e);return t.subscribe(),t}function Yq(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case i.LiteralValue:return Wi.fromGenerationTarget(r,e);case i.DefinitionEntity:return ei.fromGenerationTarget(r,e);case i.FunctionDeclaration:return jr.fromGenerationTarget(r,e);case i.GlobalEvent:return qi.fromGenerationTarget(r,e);case i.DataType:return ki.fromGenerationTarget(r,e);case i.Property:return xr.fromGenerationTarget(r,e);case i.FunctionCall:return Xr.fromGenerationTarget(r,e);case i.Condition:return Jr.fromGenerationTarget(r,e);case i.Operation:return kr.fromGenerationTarget(r,e);case i.VariableDeclaration:return sn.fromGenerationTarget(r,e);case i.VariableInstance:return Wr.fromGenerationTarget(r,e);case i.OutputMap:return jn.fromGenerationTarget(r,e);case i.ReturnDeclaration:return kt.fromGenerationTarget(r,e);case i.ArgumentDeclaration:return zr.fromGenerationTarget(r,e);case i.InputMap:return xn.fromGenerationTarget(r,e);case i.InstalledProject:return Hr.fromGenerationTarget(r,e);case i.ReturnStatement:return Zr.fromGenerationTarget(r,e);case i.Loop:return qr.fromGenerationTarget(r,e);case i.Search:return Yr.fromGenerationTarget(r,e);case i.ActionDescriptor:return se.fromGenerationTarget(r,e);case i.ValueDescriptor:return Kr.fromGenerationTarget(r,e);case i.InternalCall:return Ji.fromGenerationTarget(r,e);case i.ContinueStatement:return Ot.fromGenerationTarget(r,e);case i.BreakStatement:return Yi.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const L={seenEntityMaps:new Map,seenEntities:new Set};class MP{constructor(){c(this,"initialData")}}const V={cascade:!1},_P={load:async r=>null},Hq={create:async r=>r,update:async r=>r,delete:async r=>{},..._P};class zq{}class Zq extends MP{}class Kq{}class Xq{}class Qq{}class pp{}class eJ extends pp{}class tJ extends pp{}class nJ{}class qn{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==i.GenericReference)e.readsValue=b(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===i.GenericReference){const t=Lt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;pt.includes(t.type)||(t=t.parent);const n=e.type===i.InputMap&&e.parent.type===i.Loop;n&&(t=e.parent.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),!n&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):n||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}static hydrateReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==i.GenericReference)e.readsValue=b(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===i.GenericReference){const t=Lt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;pt.includes(t.type)||(t=t.parent);const n=e.type===i.InputMap&&e.parent.type===i.Loop;n&&(t=e.parent.parent),e.readsValue.setParent(t),!n&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):n||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class is{static initWritesValues(e,t){const n=e.initialData.writesValues.reduce((s,o)=>{if(o.type===i.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const l=b(o,e.project);return l.setValueWriter(e),Fe.includes(l.type)&&(l.setParent(t),l.initChildren()),[...s,l]},[]),a=[...e.writesValues];return e.writesValues=m([...a,...n]),e.writesValues}}class rJ{}const te=class te{constructor(e){c(this,"initialData");c(this,"id");c(this,"version");c(this,"type",i.Project);c(this,"name",null);c(this,"description",null);c(this,"x");c(this,"y");c(this,"entities",[]);c(this,"projects",[]);c(this,"functions",[]);c(this,"events",[]);c(this,"variableDeclarations",[]);c(this,"variableInstances",[]);c(this,"conditions",[]);c(this,"operations",[]);c(this,"functionCalls",[]);c(this,"loops",[]);c(this,"searches",[]);c(this,"primitives",[]);c(this,"builtInBaseEntities",[]);c(this,"operationDeclarations",[]);c(this,"globalEventActionDescriptors",[]);c(this,"loopDeclarations",[]);c(this,"loopDeclarationsBodies",[]);c(this,"conditionDeclarations",[]);c(this,"valueDescriptors",[]);c(this,"dataTypes",[]);c(this,"project");c(this,"instances",{});c(this,"builtInInstances",{});c(this,"errors",[]);c(this,"references",[]);c(this,"initialized",!1);this.initialData=e,this.id=e.id,this.version=e.version,this.name=e.name,this.description=e.description,this.x=0,this.y=0,this.instances[this.id]=this;try{(!te.UUID||te.UUID.isBackup)&&(te.UUID=eo==null?void 0:eo()),te.UUID||(te.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:t=>t})}catch(t){console.error("Error initializing UUID module",t),te.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:n=>n}}}static injectUUIDModule(e){te.UUID=e}static validateGenerationTarget(e,t){let n=JSON.parse(JSON.stringify(e));const a=[];return a.push(...je(n)),{errors:a,modifiedData:n}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async n=>{await t.init(this),n(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}hydrateAncestors(){const e=[],t=[],n=[];return{updated:m(e),added:m(t),removed:m(n),self:this}}afterAllChildrenInitialized(){const e=[],t=[],n=[];return this.initialized=!0,this.validate(),{updated:m(e),added:m(t),removed:m(n),self:this}}addSelfToProject(){const e=[],t=[],n=[];return{updated:m(e),added:m(t),removed:m(n),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(e){return this.operationDeclarations.includes(e)}isGlobalEventActionDescriptor(e){return this.globalEventActionDescriptors.includes(e)}isLoopDeclaration(e){return this.loopDeclarations.includes(e)}isConditionDeclaration(e){return this.conditionDeclarations.includes(e)}initChildren(){return this.initialized?this:(this.initialized=!0,this.entities=this.initialData.entities.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=b(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.afterAllChildrenInitialized(),this)}subscribeInstance(e){return(!this.instances[e.id]||this.instances[e.id]!==e)&&(this.instances[e.id]=e),this}subscribeBuiltInInstance(e){return(!this.builtInInstances[e.id]||this.builtInInstances[e.id]!==e)&&(this.builtInInstances[e.id]=e),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(e){return delete this.instances[e.id],this}findSubscribedInstance(e){return this.instances[e.id]||null}findSubscribedBuiltInInstance(e){return this.builtInInstances[e.id]||null}get(e){return this.instances[e]||this.builtInInstances[e]||null}getManaged(e){return this.instances[e]||null}getBuiltIn(e){return this.builtInInstances[e]||null}findSubscribedInstanceFromReference(e){return this.instances[e.entityId]||null}findSubscribedBuiltInInstanceFromReference(e){return this.builtInInstances[e.entityId]||null}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.x=e.x||this.x,this.y=e.y||this.y,this}async load(e=V){return await te.repository.load(this.id),this}async create(e=V){return await te.repository.create(this.toShallowJSON()),this}async update(e=V){return await te.repository.update(this.toShallowJSON()),this}async delete(e=V){return await te.repository.delete(this.id),this}remove({ignoreUpstream:e}={ignoreUpstream:!1}){return{affected:[],removed:[]}}restore({seenEntities:e}={seenEntities:new Set}){return{affected:[],self:this}}getAllBuiltInIds(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlatIds(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlatIds(e)),...this.operationDeclarations.flatMap(t=>t.toFlatIds(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlatIds(e)),...this.loopDeclarations.flatMap(t=>t.toFlatIds(e)),...this.conditionDeclarations.flatMap(t=>t.toFlatIds(e)),...this.valueDescriptors.flatMap(t=>t.toFlatIds(e)),...this.dataTypes.flatMap(t=>t.toFlatIds(e))]}getAllBuiltIn(){const e=new Set;return[...this.primitives.flatMap(t=>t.toFlat(e)),...this.builtInBaseEntities.flatMap(t=>t.toFlat(e)),...this.operationDeclarations.flatMap(t=>t.toFlat(e)),...this.globalEventActionDescriptors.flatMap(t=>t.toFlat(e)),...this.loopDeclarations.flatMap(t=>t.toFlat(e)),...this.conditionDeclarations.flatMap(t=>t.toFlat(e)),...this.valueDescriptors.flatMap(t=>t.toFlat(e)),...this.dataTypes.flatMap(t=>t.toFlat(e))]}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlat(e)),...this.functions.flatMap(n=>n.toFlat(e)),...this.events.flatMap(n=>n.toFlat(e)),...this.projects.flatMap(n=>n.toFlat(e)),...this.variableDeclarations.flatMap(n=>n.toFlat(e)),...this.variableInstances.flatMap(n=>n.toFlat(e)),...this.conditions.flatMap(n=>n.toFlat(e)),...this.operations.flatMap(n=>n.toFlat(e)),...this.functionCalls.flatMap(n=>n.toFlat(e)),...this.loops.flatMap(n=>n.toFlat(e)),...this.searches.flatMap(n=>n.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(e=new Set){return e.has(this.id)?this.toReference():(e.add(this.id),{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(t=>t.toJSON(e)),variableDeclarations:this.variableDeclarations.map(t=>t.toJSON(e)),variableInstances:this.variableInstances.map(t=>t.toJSON(e)),conditions:this.conditions.map(t=>t.toJSON(e)),operations:this.operations.map(t=>t.toJSON(e)),loops:this.loops.map(t=>t.toJSON(e)),searches:this.searches.map(t=>t.toJSON(e)),functions:this.functions.map(t=>t.toJSON(e)),events:this.events.map(t=>t.toJSON(e)),projects:this.projects.map(t=>t.toJSON(e)),functionCalls:this.functionCalls.map(t=>t.toJSON(e))})}toJSONClone(e={uuidStrategy:"uuid"}){const t=new Map,n=new Set,a=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(s=>{if(a.includes(s)){t.set(s,s);return}t.set(s,te.UUID.uuid())}),n.add(this.id),{id:t.get(this.id),version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),projects:this.projects.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),variableDeclarations:this.variableDeclarations.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),variableInstances:this.variableInstances.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),conditions:this.conditions.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),operations:this.operations.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),functions:this.functions.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),events:this.events.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),functionCalls:this.functionCalls.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),loops:this.loops.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null})),searches:this.searches.map(s=>s.toJSONClone({...e,seenEntityMaps:t,seenEntities:n,newId:null}))}}toReference(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t+"--"+te.UUID.uuid()+"--ref",type:i.GenericReference,entityId:t,entityType:this.type}}toShallowJSON(e=L){var n;let t=this.id;return(n=e.seenEntityMaps)!=null&&n.has(this.id)&&(t=e.seenEntityMaps.get(this.id)),{id:t,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(a=>a.toReference(e)),functions:this.functions.map(a=>a.toReference(e)),events:this.events.map(a=>a.toReference(e)),projects:this.projects.map(a=>a.toReference(e)),variableDeclarations:this.variableDeclarations.map(a=>a.toReference(e)),variableInstances:this.variableInstances.map(a=>a.toReference(e)),conditions:this.conditions.map(a=>a.toReference(e)),operations:this.operations.map(a=>a.toReference(e)),functionCalls:this.functionCalls.map(a=>a.toReference(e)),loops:this.loops.map(a=>a.toReference(e)),searches:this.searches.map(a=>a.toReference(e))}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlatJSON(e)),...this.functions.flatMap(n=>n.toFlatJSON(e)),...this.events.flatMap(n=>n.toFlatJSON(e)),...this.projects.flatMap(n=>n.toFlatJSON(e)),...this.variableDeclarations.flatMap(n=>n.toFlatJSON(e)),...this.variableInstances.flatMap(n=>n.toFlatJSON(e)),...this.conditions.flatMap(n=>n.toFlatJSON(e)),...this.operations.flatMap(n=>n.toFlatJSON(e)),...this.functionCalls.flatMap(n=>n.toFlatJSON(e)),...this.loops.flatMap(n=>n.toFlatJSON(e)),...this.searches.flatMap(n=>n.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(n=>n.toFlatGenerationTarget(e)),...this.functions.flatMap(n=>n.toFlatGenerationTarget(e)),...this.events.flatMap(n=>n.toFlatGenerationTarget(e)),...this.projects.flatMap(n=>n.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(n=>n.toFlatGenerationTarget(e)),...this.conditions.flatMap(n=>n.toFlatGenerationTarget(e)),...this.operations.flatMap(n=>n.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(n=>n.toFlatGenerationTarget(e)),...this.loops.flatMap(n=>n.toFlatGenerationTarget(e)),...this.searches.flatMap(n=>n.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.entities.forEach(e=>e.clearErrors()),this.projects.forEach(e=>e.clearErrors()),this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this.variableDeclarations.forEach(e=>e.clearErrors()),this.variableInstances.forEach(e=>e.clearErrors()),this.conditions.forEach(e=>e.clearErrors()),this.operations.forEach(e=>e.clearErrors()),this.functionCalls.forEach(e=>e.clearErrors()),this.loops.forEach(e=>e.clearErrors()),this.searches.forEach(e=>e.clearErrors()),this}validate(){const e=f5(),t=this.toJSON();return e.safeParse(t),this.validateChildren(),{success:!0,error:null,data:t}}validateChildren(){this.entities.forEach(e=>e.validate()),this.projects.forEach(e=>e.validate()),this.functions.forEach(e=>e.validate()),this.events.forEach(e=>e.validate()),this.variableDeclarations.forEach(e=>e.validate()),this.variableInstances.forEach(e=>e.validate()),this.conditions.forEach(e=>e.validate()),this.operations.forEach(e=>e.validate()),this.functionCalls.forEach(e=>e.validate()),this.loops.forEach(e=>e.validate()),this.searches.forEach(e=>e.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(t=>t.getErrors()),...this.projects.flatMap(t=>t.getErrors()),...this.functions.flatMap(t=>t.getErrors()),...this.events.flatMap(t=>t.getErrors()),...this.variableDeclarations.flatMap(t=>t.getErrors()),...this.variableInstances.flatMap(t=>t.getErrors()),...this.conditions.flatMap(t=>t.getErrors()),...this.operations.flatMap(t=>t.getErrors()),...this.functionCalls.flatMap(t=>t.getErrors()),...this.loops.flatMap(t=>t.getErrors()),...this.searches.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(e){return this.entities.find(t=>t.id===e)||null}addDefinitionEntityFromTransfer(e){const t=b(e,this);return this.addDefinitionEntity(t),t}addDefinitionEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=b(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=b(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=b(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=b(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=b(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=b(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=b(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=b(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=b(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=b(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeDefinitionEntity(e){const t=this.entities.findIndex(n=>n.id===e.id);if(t>-1){const n=this.entities[t];return this.entities.splice(t,1),n}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(n=>n.id===e.id);if(t>-1){const n=this.functions[t];return this.functions.splice(t,1),n}return null}removeExternalProject(e){const t=this.projects.findIndex(n=>n.id===e.id);if(t>-1){const n=this.projects[t];return this.projects.splice(t,1),n}return null}removeGlobalEvent(e){const t=this.events.findIndex(n=>n.id===e.id);if(t>-1){const n=this.events[t];return this.events.splice(t,1),n}return null}removeTopLevelVariableDeclaration(e){if(e.type!==i.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(n=>n.id===e.id);if(t>-1){const n=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),n}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(t=>t.methods)]}getFunctionDeclaration(e){return this.functions.find(t=>t.id===e)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.functionCalls.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.operations.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.functionCalls.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.conditions.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.conditions.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.operations.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.loops.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[]),...this.searches.reduce((t,n)=>{const a=Ue(n);return[...t,...a.filter(s=>s.type===i.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.functionCalls.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.conditions.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.operations.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.loops.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[]),...this.searches.reduce((t,n)=>{const a=Se(n);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return m([...this.variableDeclarations,...this.getEntryPoints().reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,n)=>{const s=Se(n).filter(o=>o.type===i.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(n=>{if(!n.declaration){const a=n.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(l=>l.id===s);o&&n.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===U.PERSISTED_ENTITY)||null}};c(te,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),c(te,"repository",{create:async e=>e,update:async e=>e,delete:async e=>{},load:async e=>null}),c(te,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(te,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(te,"BASE_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,...te.INMUTABLE_BASE_PROPERTIES]),c(te,"MUTABLE_META_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,"x","y"]),c(te,"INMUTABLE_META_PROPERTIES",[...te.INMUTABLE_BASE_PROPERTIES]),c(te,"META_PROPERTIES",[...te.MUTABLE_META_PROPERTIES,...te.INMUTABLE_META_PROPERTIES]),c(te,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(te,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),c(te,"UPSTREAM_PROPERTIES",[...te.MUTABLE_UPSTREAM_PROPERTIES,...te.INMUTABLE_UPSTREAM_PROPERTIES]),c(te,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),c(te,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(te,"DOWNSTREAM_PROPERTIES",[...te.MUTABLE_DOWNSTREAM_PROPERTIES,...te.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(te,"PROPERTIES",[...te.META_PROPERTIES,...te.UPSTREAM_PROPERTIES,...te.DOWNSTREAM_PROPERTIES]);let M=te;class VP extends se{constructor(t){super(Qt,t);c(this,"id",Ve.Parallel);c(this,"name",Ve.Parallel);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Qt);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Qt.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Qt.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Qt.error?b(Qt.error,this.project):null}}class NP extends se{constructor(t){super(Rt,t);c(this,"id",Rt.id);c(this,"name",Rt.name);c(this,"description",Rt.description);c(this,"version",Rt.version);c(this,"autoexecutable",!1);c(this,"initialData",Rt);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Rt.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Rt.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Rt.error?b(Rt.error,this.project):null}}class LP extends se{constructor(t){super(wn,t);c(this,"id",Ve.Sequential);c(this,"name",Ve.Sequential);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",wn);c(this,"type",i.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=wn.inputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=wn.outputs.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.error=wn.error?b(wn.error,this.project):null}}class iJ extends se{constructor(e){super(Xi,e)}}class aJ extends se{constructor(e){super(hr,e)}}class sJ extends se{constructor(t){super(fr,t);c(this,"autoexecutable",!0)}getEntityToMatchInputMap(t){return t.inputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(t){return t.inputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(t){return t.outputs.find(n=>{var a;return((a=n.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].outputs.outputEntity.id})||null}getEntityToMatch(t){let n=null;if(t.readsValue){const s=t.readsValue.getDataType();s&&s.entity&&s.entity.type===i.DefinitionEntity&&(n=s.entity)}const a=t.getDefaultValue();return!n&&a&&a.valueAsType&&!Array.isArray(a.valueAsType)&&a.valueAsType.type===i.DefinitionEntity&&(n=a.valueAsType),n}syncOperationInstance(t){const n=this.getEntityToMatchInputMap(t);n&&this.syncEntityToMatchInputMapDataType(n);const a=this.getDataToValidateInputMap(t);a&&this.syncDataToValidateInputMapDataType(a);const s=this.getOutputDataOutputMap(t);return s&&this.syncOutputDataOutputMapDataType(s),t}syncEntityToMatchInputMapDataType(t){var a,s,o;if(((a=t.declaration)==null?void 0:a.id)!==_.operation[Ne.Validate].inputs.entityToMatch.id)return null;if(!t.dataType){const l={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:null,like:!0,inferred:!0,parent:t.toReference()},p=b(l,t.project);p.setParent(t),p.initChildren(),t.setDataType(p)}(s=t.dataType)==null||s.sync({inferred:!0,like:!1,asType:!0});const n=this.getEntityToMatch(t);return(o=t.dataType)==null||o.setEntity(n),t.dataType}syncDataToValidateInputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==_.operation[Ne.Validate].inputs.dataToValidate.id)return null;const n=this.getEntityToMatchInputMap(t.parent);if(!n||!this.getEntityToMatch(n))return null;if(!t.dataType){const u={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,like:!0,inferred:!0,parent:t.toReference()},h=b(u,t.project);h.setParent(t),h.initChildren(),t.setDataType(h)}(l=t.dataType)==null||l.sync({inferred:!0,like:!0,asType:!1});const s=this.getEntityToMatch(n);return(p=t.dataType)==null||p.setEntity(s),t.dataType}syncOutputDataOutputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==_.operation[Ne.Validate].outputs.outputEntity.id)return null;const n=this.getEntityToMatchInputMap(t.parent);if(!n||!this.getEntityToMatch(n))return null;if(!t.dataType){const u={id:t.id+"--"+M.UUID.uuid()+"--infered-data-type",version:1,type:i.DataType,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,like:!0,inferred:!0,parent:t.toReference()},h=b(u,t.project);h.setParent(t),h.initChildren(),t.setDataType(h)}(l=t.dataType)==null||l.sync({inferred:!0,like:!0,asType:!1});const s=this.getEntityToMatch(n);return(p=t.dataType)==null||p.setEntity(s),t.dataType}inferInputMapDataType(t){var n,a;return((n=t.declaration)==null?void 0:n.id)===_.operation[Ne.Validate].inputs.entityToMatch.id?this.syncEntityToMatchInputMapDataType(t):((a=t.declaration)==null?void 0:a.id)===_.operation[Ne.Validate].inputs.dataToValidate.id?this.syncDataToValidateInputMapDataType(t):null}inferOutputMapDataType(t){var n;return((n=t.declaration)==null?void 0:n.id)===_.operation[Ne.Validate].outputs.outputEntity.id?this.syncOutputDataOutputMapDataType(t):null}}class oJ extends se{constructor(e){super(wl,e)}}class lJ extends se{constructor(e){super(Ml,e)}}class dJ extends se{constructor(e){super(_l,e)}}class cJ extends se{constructor(e){super(us,e)}}class uJ extends se{constructor(e){super(ls,e)}}class pJ extends se{constructor(e){super(Ki,e)}}function yJ(r){const e=[new LP(r),new VP(r),new NP(r),new iJ(r),new aJ(r),new sJ(r),new cJ(r),new oJ(r),new dJ(r),new lJ(r),new uJ(r),new pJ(r),new se(Cl,r),new se(Al,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class GP extends In{constructor(t){super(st,t);c(this,"initialData");c(this,"id",U.PERSISTED_ENTITY);c(this,"version",1);c(this,"name",U.PERSISTED_ENTITY);c(this,"description",st.description);c(this,"type",i.BuiltInBaseEntity);c(this,"abstract",st.abstract);c(this,"static",st.static);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=st,this.project=t,this.id=st.id,this.version=st.version,this.name=st.name,this.static=st.static,this.abstract=st.abstract,this.properties=this.initialData.properties.map(n=>{const a=b(n,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const a=b(n,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(n=>b(n,this.project))}}function hJ(r){const e=[new GP(r),new In(ra,r),new In(un,r),new In(Os,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function fJ(r){const e=[new Kt(J,r),new Kt(On,r),new Kt(ee,r),new Kt(it,r),new Kt(Pn,r),new Kt(ln,r),new Kt(An,r),new Kt(ai,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function mJ(r){const e=[new se(As,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function TJ(r){const e=[new se(ta,r),new se(Wn,r),new se(ea,r),new se(li,r),new se(di,r),new se(Rs,r)];e.forEach(n=>{n.initChildren(),r.subscribeBuiltInInstance(n)}),r.loopDeclarations=e;const t=[new se(Kl,r),new se(bs,r),new se(Wl,r),new se(JT,r),new se(cE,r),new se(kl,r)];return t.forEach(n=>{n.initChildren(),r.subscribeBuiltInInstance(n)}),r.loopDeclarationsBodies=t,e}function EJ(r){const e=[new Kr(Cs,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function RJ(r){const e=[new se(gr,r),new se(hi,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}const ti={},Tl={};async function gJ(r,e={}){const t={...RD};return t.id=r.id,e.empty?{data:{id:r.id,type:i.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function yp(r){const e=new M(r);return fJ(e),hJ(e),yJ(e),mJ(e),TJ(e),EJ(e),RJ(e),e.getAllBuiltIn().forEach(n=>{e.builtInInstances[n.id]||(e.builtInInstances[n.id]=n,delete e.instances[n.id])}),e}function bJ(r){const e=new Map,t=r.getAllBuiltInIds();Object.keys(r.instances).forEach(a=>{if(t.includes(a)){e.set(a,a);return}e.set(a,M.UUID.uuid())});const n=yp(r.toShallowJSON({seenEntityMaps:e}));return new Zu(r).visit(a=>{const s=b(a.toShallowJSON({seenEntityMaps:e}),n);s.hydrateAncestors(),s.addSelfToProject()}).visit(a=>{const s=n.get(e.get(a.id));s&&s.afterAllChildrenInitialized()}),n.afterAllChildrenInitialized(),n}function $P(r){const e=yp(r);return new Zu(r).visit(t=>{const n=b(t,e);n.hydrateAncestors(),n.addSelfToProject()}).visit(t=>{const n=e.get(t.id);n&&n.afterAllChildrenInitialized()}),e.afterAllChildrenInitialized(),e}async function vJ(r,e={}){if(r.id&&ti[r.id])return ti[r.id];if(r.id&&Tl[r.id])return await Tl[r.id],ti[r.id];const t=gJ(r,e);r.id&&(Tl[r.id]=t);const n=await t;if(n.data){const a=$P(n.data);return ti[r.id]=a,r.id&&delete Tl[r.id],a}return null}function IJ(r){return ti[r.id]&&delete ti[r.id],null}const DJ="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Wu,d.ALL_BUILT_IN_BASE_ENTITIES=ZR,d.ALL_BUILT_IN_CONDITION_ENTITIES=cg,d.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=pg,d.ALL_BUILT_IN_LOOP_ENTITIES=OE,d.ALL_BUILT_IN_OPERATION_ENTITIES=Lm,d.ALL_BUILT_IN_PRIMITIVE_ENTITIES=Op,d.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=mg,d.ALL_BUILT_IN_VALUE_DESCRIPTORS=fg,d.ActionDescriptorState=se,d.ActionInputMapState=H7,d.ActionOutputMapState=K7,d.AppendToListOperationInputIds=Vh,d.AppendToListOperationOutputIds=Nh,d.ArgumentDeclarationState=zr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ju,d.BUILT_IN_BASE_ENTITY_IDS=_,d.BUILT_IN_ENTITY_TYPES=Jn,d.BaseCanvasDraggableState=Kq,d.BaseEntityNames=U,d.BaseState=Zq,d.BaseValueDescriptorIds=os,d.BreakStatementState=Yi,d.BuiltInBaseEntityState=In,d.CACHED_PROJECTS_BY_ID=ti,d.CALLABLE_ENTITIES_EXPLANATION=dq,d.CALLABLE_TYPES=Xt,d.CALLER_ENTITIES_EXPLANATION=TO,d.CALLER_TYPES=on,d.CALLS_UPDATE_EXPLANATION=lr,d.COMPARISON_CONDITIONS=lg,d.CONDITIONS=dg,d.CUSTOM_ENTITY_OPERATIONS=em,d.CallableEntityClass=Qq,d.CallerEntityClass=pp,d.ChildEntityState=Xq,d.ComparisonOperatorTypes=qe,d.ConditionState=Jr,d.ContinueStatementState=Ot,d.CreateNewInputIds=Af,d.CreateNewOutputIds=Cf,d.DRAGGABLE_CALLABLE_TYPES=vl,d.DRAGGABLE_CALLER_TYPES=Tp,d.DRAGGABLE_ELEMENT_TYPES=ss,d.DRAGGABLE_EXECUTABLE_TYPES=xP,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=bl,d.DataTypeCompatibilityTypes=zt,d.DataTypeParentChildRelation=et,d.DataTypeState=ki,d.DefinitionEntityState=ei,d.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Hq,d.ENTITIES_WITH_VALLUES_EXPLANATION=el,d.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=V,d.ENTITY_RECUSION_OPTIONS_DEFAULTS=L,d.ENTITY_TYPES=jP,d.ENTITY_WITH_DECLARATION_TYPES=FP,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=pt,d.ENTITY_WITH_NAMES_TYPES=Ep,d.ENTITY_WITH_PARENT_TYPES=fp,d.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=gl,d.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=mp,d.ENTITY_WITH_VALUE_TYPES=hp,d.ENTRY_POINT_ENTITIES_EXPLANATION=Xa,d.ENTRY_POINT_TYPES=We,d.EVENT_TYPES=ii,d.EXECUTABLE_TYPES=UP,d.EXECUTION_OPERATIONS=Pf,d.EntityError=Cr,d.EntityErrorSeverity=E,d.EntityGenerationError=g,d.EntityGenerationErrorCode=T,d.EntityInstanceErrorCode=G,d.EntityOperations=Ne,d.EntityType=i,d.EntityWithLogicScopeClass=rJ,d.EntityWithValueClass=nJ,d.EntryPointEntityClass=eJ,d.ExecutionOperations=Ve,d.ExecutionTerminationType=hO,d.FunctionCallState=Xr,d.FunctionDeclarationState=jr,d.GLOBAL_EVENT_DECLARATIONS=ug,d.GetLastInListOperationInputIds=vh,d.GetLastInListOperationOutputIds=Ih,d.GlobalEventNames=Dn,d.GlobalEventState=qi,d.HTTPOperations=dt,d.HTTP_OPERATIONS=Vm,d.InputMapState=xn,d.InstalledProjectState=Hr,d.InternalCallState=Ji,d.JoinListOperationInputIds=jy,d.JoinListOperationOutputIds=ky,d.LIST_OPERATIONS=Hh,d.ListOperations=X,d.LiteralValueState=Wi,d.LoopState=qr,d.LoopTypes=k,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=dr,d.NUMBER_OPERATIONS=ny,d.NumberOperations=Ge,d.OPERATION_DECLARATIONS=Nm,d.OperationState=kr,d.OutputMapParentChildRelation=ri,d.OutputMapState=jn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=tl,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=or,d.PASS_THROUGH_CALLABLE_TYPES=Je,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Ju,d.ParallelExecutionOperation=VP,d.PassThroughCallableEntityClass=tJ,d.PersistedEntity=GP,d.PersistedEntityMethods=Gt,d.PrimitiveEntityState=Kt,d.PrimitiveTypes=C,d.ProjectState=M,d.PropertyState=xr,d.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=_P,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=cq,d.ReturnDeclarationState=kt,d.ReturnStatementState=Zr,d.STANDALONE_CONDITIONS=QR,d.STRING_OPERATIONS=xy,d.ScopeCompatibilityType=ml,d.SearchState=Yr,d.SequentialExecutionOperation=LP,d.SequentialExecutionOperationInputIds=hf,d.SequentialExecutionOperationOutputIds=ff,d.SharedEntityErrorCode=B,d.SharedStateFunctionality=MP,d.SplitListOperationInputIds=ih,d.SplitListOperationOutputIds=ah,d.StandaloneOperatorTypes=Jt,d.StringOperations=re,d.TERMINATION_TYPES=xe,d.Traverser=Zu,d.USER_MANAGED_ENTITY_TYPES=Rp,d.UserManagedEntityStateFunctionality=zq,d.VALUE_READING_ENTITIES_EXPLANATION=qu,d.VALUE_READING_TYPES=Sn,d.VALUE_WRITING_ENTITIES_EXPLANATION=EO,d.VALUE_WRITING_TYPES=Ze,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=ku,d.VARIABLE_TYPES=Fe,d.ValueAutogenerationType=ze,d.ValueDescriptorParentChildRelation=A,d.ValueDescriptorState=Kr,d.ValueReadingEntityClass=qn,d.ValueWritingEntityClass=is,d.VariableDeclarationState=sn,d.VariableInputMapState=Y7,d.VariableInstanceState=Wr,d.VariableOutputMapState=Z7,d.WaitOperation=NP,d.WaitOperationInputIds=of,d.WaitOperationOutputIds=lf,d.appendToListOperation=us,d.appendToListOperationElementToAppendArgument=Nl,d.appendToListOperationElementToAppendArgumentParentRef=kh,d.appendToListOperationElementToAppendArgumentRef=$h,d.appendToListOperationError=Yh,d.appendToListOperationErrorParentRef=Wh,d.appendToListOperationListArgument=Vl,d.appendToListOperationListArgumentParentRef=jh,d.appendToListOperationListArgumentRef=Lh,d.appendToListOperationListDataType=Gh,d.appendToListOperationResultListDataType=xh,d.appendToListOperationResultListReturn=Jh,d.appendToListOperationResultListReturnParentRef=qh,d.appendToListOperationResultListReturnRef=Uh,d.appendToListOperationSecondListDataType=Fh,d.asGenerationActionExample=bn,d.booleanPrototype=On,d.capitalizeFirstLetter=Jo,d.checkAreDataTypesCompatible=Zt,d.checkAreDefinitionEntitiesCompatibleAsDataType=nO,d.checkArePropertiesCompatibleAsDataType=tO,d.checkIsBranchDependentButNotDirectlyOnBranch=es,d.checkIsBranchDependentOnBranch=Rq,d.checkIsCallableEntityReachable=rs,d.checkIsCanvasEntity=Gq,d.checkIsDetachedBranch=OP,d.checkIsDetachedBranchShallow=cp,d.checkIsGlobalVariable=Vq,d.checkIsGloballyDeclared=dp,d.checkIsMethod=CP,d.checkIsNestedScope=fl,d.checkScopeCompatibility=ns,d.cloneProject=bJ,d.countedLoopActionDescriptor=ta,d.countedLoopActionDescriptorDynamicReturnDeclaration=EE,d.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=TE,d.countedLoopActionDescriptorStringArgumentDeclaration=mE,d.countedLoopActionDescriptorStringArgumentDeclarationDataType=hE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=pE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=uE,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=yE,d.countedLoopActionDescriptorStringArgumentDeclarationParentRef=fE,d.countedLoopBodyActionDescriptor=Kl,d.countedLoopBodyActionDescriptorAnyDynamicArgument=IE,d.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=vE,d.countedLoopBodyActionDescriptorAnyDynamicReturn=SE,d.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=DE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Zl,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=gE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=RE,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=bE,d.createDefinitionEntityFromJSONObject=sl,d.createEntityError=Q,d.createNestedDataTypeForEntity=CO,d.createNewInstanceOperation=hr,d.createNewInstanceOperationEntityToInstanciateArgument=Gf,d.createNewInstanceOperationEntityToInstanciateArgumentRef=Vf,d.createNewInstanceOperationEntityToInstanciateDataType=Nf,d.createNewInstanceOperationError=xf,d.createNewInstanceOperationErrorParentRef=Uf,d.createNewInstanceOperationNewEntityDataArgument=_f,d.createNewInstanceOperationNewEntityDataArgumentDataType=Mf,d.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=Bf,d.createNewInstanceOperationNewEntityDataArgumentParentRef=wf,d.createNewInstanceOperationOutputEntityDeclaration=Ff,d.createNewInstanceOperationOutputEntityDeclarationParentRef=$f,d.createNewInstanceOperationRef=Lf,d.createSemanticId=de,d.createStateFromGenerationTargetType=Yq,d.createStateFromType=ke,d.createStateFromTypeAndSubscribe=b,d.cronJobBuiltInBaseEntity=Os,d.cronJobBuiltInBaseEntityExpressionProperty=HR,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=zP,d.cronJobBuiltInBaseEntityExpressionPropertyRef=WR,d.cronJobBuiltInBaseEntityRef=YR,d.cronJobTriggeredFunctionDeclarationBlueprint=ud,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=qR,d.dataTypeCompatibilityToErrorExplanation=OO,d.datePrototype=ln,d.dateValueAutogenerationSchema=Pc,d.definitionEntityToZodSchema=Mg,d.deletePersistedEntityMethod=cd,d.deletePersistedEntityMethodParentRef=CR,d.deleteRootProject=IJ,d.endpointBuiltInBaseEntity=ra,d.endpointBuiltInBaseEntityRef=wE,d.endpointBuiltInBaseEntityRefFour=uR,d.endpointBuiltInBaseEntityRefThree=FE,d.endpointBuiltInBaseEntityRefTwo=NE,d.endpointBuiltInCorsProperty=BE,d.endpointBuiltInCorsPropertyDataType=CE,d.endpointBuiltInCorsPropertyDataTypeRef=PE,d.endpointBuiltInCorsPropertyRef=AE,d.endpointBuiltInMethodProperty=Ql,d.endpointBuiltInMethodPropertyDataType=$E,d.endpointBuiltInMethodPropertyDataTypeRef=LE,d.endpointBuiltInMethodPropertyRef=GE,d.endpointBuiltInPathProperty=Xl,d.endpointBuiltInPathPropertyDataType=VE,d.endpointBuiltInPathPropertyDataTypeRef=ME,d.endpointBuiltInPathPropertyRef=_E,d.endpointPathParamsArgumentDeclaration=td,d.endpointPathParamsArgumentDeclarationRef=zE,d.endpointPathParamsVariableDataType=ZE,d.endpointPathParamsVariableDataTypeRef=HE,d.endpointReachedTriggerActionDescriptor=od,d.endpointReachedTriggerActionDescriptorRef=KE,d.endpointReachedTriggerActionDescriptorRefFour=eR,d.endpointReachedTriggerActionDescriptorRefThree=QE,d.endpointReachedTriggerActionDescriptorRefTwo=XE,d.endpointRequestBodyArgumentDeclaration=rd,d.endpointRequestBodyArgumentDeclarationRef=kE,d.endpointRequestBodyVariableDataType=qE,d.endpointRequestHeadersArgumentDeclaration=ed,d.endpointRequestHeadersArgumentDeclarationRef=xE,d.endpointRequestHeadersVariableDataType=jE,d.endpointRequestHeadersVariableDataTypeRef=UE,d.endpointRequestQueryParamsArgumentDeclaration=nd,d.endpointRequestQueryParamsArgumentDeclarationRef=WE,d.endpointRequestQueryParamsVariableDataType=YE,d.endpointRequestQueryParamsVariableDataTypeRef=JE,d.endpointResponseBodyDataType=dR,d.endpointResponseBodyReturnDeclaration=sd,d.endpointResponseBodyReturnDeclarationRef=lR,d.endpointResponseCodeDataType=nR,d.endpointResponseCodeReturnDeclaration=id,d.endpointResponseCodeReturnDeclarationRef=tR,d.endpointResponseHeadersDataType=sR,d.endpointResponseHeadersDataTypeRef=iR,d.endpointResponseHeadersReturnDeclaration=ad,d.endpointResponseHeadersReturnDeclarationRef=aR,d.endpointReturnStatementRef=rR,d.endpointReturnStatementRefThree=cR,d.endpointReturnStatementRefTwo=oR,d.enrichFromKnownEntities=ts,d.enumOptionsProperty=Sp,d.enumOptionsPropertyDataType=Ip,d.enumOptionsPropertyDataTypeRef=bp,d.enumOptionsPropertyRef=vp,d.enumPrototype=Pn,d.enumPrototypeRef=Dp,d.executionBuiltInBaseEntity=Ps,d.executionBuiltInEntityAbortMethod=pd,d.executionBuiltInEntityAbortMethodParentRef=zR,d.filterOutDuplicateEntities=m,d.filterOutDuplicateErrors=V9,d.findEntityFromKeys=Ku,d.findReferenceToSelfInList=qO,d.findReferencesToSelfInProject=Aq,d.flattenActionDescriptor=WO,d.flattenArgumentDeclaration=YO,d.flattenBreakStatement=HO,d.flattenBuiltInBaseEntity=zO,d.flattenCalls=vn,d.flattenCanvasAncestorsUntil=ol,d.flattenCondition=ZO,d.flattenContinueStatement=KO,d.flattenDataType=QO,d.flattenDefinitionEntity=XO,d.flattenDefinitionEntityExtensionAndImplementationTypes=sp,d.flattenDefinitionEntityExtensionTypes=yl,d.flattenDefinitionEntityExtensions=ip,d.flattenDefinitionEntityImplementations=ap,d.flattenDefinitionEntityImplementionTypes=pl,d.flattenDerivedCanvasEntities=Nt,d.flattenDetachedBranch=AP,d.flattenElementCalls=Ue,d.flattenElementCallsOnTheSameScope=Pq,d.flattenEntity=P,d.flattenFunctionCall=eP,d.flattenFunctionDeclaration=tP,d.flattenGlobalEvent=nP,d.flattenInputMap=rP,d.flattenInstalledProject=iP,d.flattenInternalCall=aP,d.flattenLiteralValue=sP,d.flattenLoop=oP,d.flattenOperation=lP,d.flattenOutputMap=dP,d.flattenPrimitiveEntity=cP,d.flattenProject=uP,d.flattenProjectElements=kO,d.flattenProperty=pP,d.flattenRelatedCanvasElementsOnTheLeft=DP,d.flattenRelatedCanvasElementsOnTheRight=IP,d.flattenReturnDeclaration=yP,d.flattenReturnStatement=hP,d.flattenSearch=fP,d.flattenValueDescriptor=mP,d.flattenVariableDeclaration=TP,d.flattenVariableInstance=EP,d.flattenVariableReads=jO,d.flattenVariableWrites=xO,d.flattenVariables=Se,d.fromZodParseToEntityGenerationErrors=Fu,d.generate=YC,d.generateActionExample=uq,d.generateExecutionDataType=R7,d.generateIdFromStrategy=Ye,d.generateMutablePropertiesExplanation=Ko,d.generateRandomBoolean=ib,d.generateRandomDate=Lg,d.generateRandomDateAfter=_g,d.generateRandomDateBefore=Vg,d.generateRandomDateBetweenRange=Ng,d.generateRandomNumber=Qg,d.generateRandomNumberAfter=Zg,d.generateRandomNumberBefore=Kg,d.generateRandomNumberBetweenRange=Xg,d.generateRandomText=rb,d.generateRandomTextAfter=eb,d.generateRandomTextBefore=tb,d.generateRandomTextBetweenRange=nb,d.generateUniqueUUID=zg,d.getAllActionDescriptorsForConditions=il,d.getAllActionDescriptorsForGlobalEvents=nl,d.getAllActionDescriptorsForLoops=rl,d.getAllActionDescriptorsForOperations=fq,d.getAllBuiltInEntityIds=np,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=IO,d.getBaseBuiltInEntities=ur,d.getBaseSchemaBasedOnType=fO,d.getBuiltInEntityOwner=pr,d.getCallableEntityReferenceSchema=at,d.getCallableEntityTypeSchema=kD,d.getCalledBy=qt,d.getCallerEntityReferenceSchema=F3,d.getCallerEntityTypeSchema=$3,d.getCalls=ep,d.getCanvasEntitiesDerivedFromInternalCalls=vP,d.getCanvasEntitiesDerivedFromWrites=Hi,d.getCanvasEntityDerivedFromValueReadingEntity=ul,d.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=bP,d.getCanvasEntityReferenceSchema=n5,d.getCanvasEntityTypeSchema=t5,d.getChildrenEntityWithValues=bq,d.getColumnProperties=jq,d.getCommonAncestor=Qu,d.getCommonChildren=wO,d.getDatabaseEntities=Uq,d.getDatabaseEntity=kq,d.getDeclaration=Ur,d.getDeepestScope=BP,d.getDefinitionEntityExtends=zi,d.getDraggableCallableEntityReferenceSchema=JD,d.getDraggableCallableEntityTypeSchema=qD,d.getDraggableCallerEntityReferenceSchema=x3,d.getDraggableCallerEntityTypeSchema=U3,d.getDraggableExecutableEntityReferenceSchema=J3,d.getDraggableExecutableEntityTypeSchema=q3,d.getDraggablePassThroughCallableEntityReferenceSchema=Go,d.getDraggablePassThroughCallableEntityTypeSchema=Lo,d.getDraggablePlayableEntityReferenceSchema=Z3,d.getDraggablePlayableEntityTypeSchema=z3,d.getEntityArgumentDeclarations=rp,d.getEntityInputMaps=RP,d.getEntityOutputMaps=Bq,d.getEntityReferenceSchema=e5,d.getEntityReturnDeclarations=gP,d.getEntityTypeSchema=Q3,d.getEntityWithLogicScopeReferenceSchema=$n,d.getEntityWithLogicScopeTypeSchema=W3,d.getEntityWithValueReferenceSchema=jD,d.getEntityWithValueTypeSchema=G3,d.getEntryPointEntityReferenceSchema=nt,d.getEntryPointEntityTypeSchema=ir,d.getEventEntityReferenceSchema=Vo,d.getEventEntityTypeSchema=_o,d.getExecutableEntityReferenceSchema=k3,d.getExecutableEntityTypeSchema=j3,d.getExtendedBuiltInEntity=Mq,d.getExtendedDefinitionEntity=op,d.getGenerationTargetSchemaBasedOnType=mO,d.getHeadIfPartOfDetachedBranch=PP,d.getHighestScope=wP,d.getImplementedBuiltInEntity=_q,d.getIsInteractive=lp,d.getLastInListOperation=_l,d.getLastInListOperationError=_h,d.getLastInListOperationErrorParentRef=Mh,d.getLastInListOperationInputListArgument=Ch,d.getLastInListOperationInputListArgumentParentRef=Ah,d.getLastInListOperationInputListArgumentRef=Dh,d.getLastInListOperationInputListDataType=Sh,d.getLastInListOperationOutputElementDataType=Ph,d.getLastInListOperationOutputElementReturn=Bh,d.getLastInListOperationOutputElementReturnParentRef=wh,d.getLastInListOperationOutputElementReturnRef=Oh,d.getLinkedEntitiesFromArgumentDeclaration=Oq,d.getLowestPersistedEntityImplementation=SP,d.getParentCallableEntity=BO,d.getParentCallerEntity=_O,d.getParentCanvasEntities=Pt,d.getParentCanvasEntity=lt,d.getParentCanvasEntityFromTransfer=ll,d.getParentEntryPoint=gq,d.getParentPassthroughCallableEntity=MO,d.getPassThroughCallableEntityReferenceSchema=$e,d.getPassThroughCallableEntityTypeSchema=No,d.getPeristedEntities=Fq,d.getPlayableEntityReferenceSchema=H3,d.getPlayableEntityTypeSchema=Y3,d.getProject=vJ,d.getPrototypeByType=hl,d.getReferenceEntityId=S,d.getReferencedEntitiesStateOrErrors=Qo,d.getReferencedEntityStateOrErrors=Uu,d.getRelatedCanvasElementsOnTheLeft=Qr,d.getRelatedCanvasElementsOnTheLeftFromTransfer=JO,d.getRelatedCanvasElementsOnTheRight=cr,d.getRootEntryPointScopeOwner=up,d.getScopeOwner=At,d.getTerminationReferenceSchema=X3,d.getTerminationTypeSchema=K3,d.getUpstreamDependencyIds=cl,d.getUsedArgFromDeclaration=Cq,d.getUsedReturnFromDeclaration=wq,d.getValueReadingEntityReferenceSchema=xD,d.getValueReadingEntityTypeSchema=Gn,d.getValueWritingEntityReferenceSchema=L3,d.getValueWritingEntityTypeSchema=xa,d.getVariableFromInputMapping=NO,d.getVariableFromReturnVariablePointer=$O,d.getVariableReferenceSchema=rr,d.getVariableTypeSchema=Vr,d.getVariablesFromArgumentDeclarations=dl,d.getVariablesFromInputMaps=LO,d.getVariablesFromOutputMapping=FO,d.getVariablesFromOutputMaps=UO,d.getVariablesFromReturnDeclarations=GO,d.getVariablesInSameOrHigherScope=Mu,d.getWrites=tp,d.groupCallsBasedOnParallelizableExecution=Iq,d.handleAfterEntityImplementationSideEffects=AO,d.handleBeforeEntityImplementationSideEffects=PO,d.httpRequestBodyArgument=fs,d.httpRequestBodyArgumentRef=ym,d.httpRequestBodyDataType=hm,d.httpRequestHeadersArgument=hs,d.httpRequestHeadersArgumentRef=um,d.httpRequestHeadersDataType=pm,d.httpRequestMethodArgument=ps,d.httpRequestMethodArgumentRef=dm,d.httpRequestMethodDataType=cm,d.httpRequestMethodDataTypeRef=om,d.httpRequestOperation=Xi,d.httpRequestOperationErrorValueDescriptor=xl,d.httpRequestOperationErrorValueDescriptorDatatype=_m,d.httpRequestOperationErrorValueDescriptorRef=Mm,d.httpRequestOperationRef=Am,d.httpRequestOperationRefEight=wm,d.httpRequestOperationRefFive=Om,d.httpRequestOperationRefFour=Sm,d.httpRequestOperationRefNine=Bm,d.httpRequestOperationRefSeven=Cm,d.httpRequestOperationRefSix=Pm,d.httpRequestOperationRefThree=Dm,d.httpRequestOperationRefTwo=Im,d.httpRequestQueryParamsArgument=Ul,d.httpRequestQueryParamsArgumentRef=am,d.httpRequestQueryParamsDataType=sm,d.httpRequestVariableURLArgument=ys,d.httpRequestVariableURLArgumentRef=rm,d.httpRequestVariableURLDataType=im,d.httpRequestVariableURLDataTypeRef=tm,d.httpResponseBodyReturnDataType=vm,d.httpResponseBodyReturnDataTypeRef=gm,d.httpResponseBodyReturnReturn=Es,d.httpResponseBodyReturnReturnRef=bm,d.httpResponseCodeDataType=mm,d.httpResponseCodeReturn=ms,d.httpResponseCodeReturnRef=fm,d.httpResponseHeadersDataType=Rm,d.httpResponseHeadersDataTypeRef=Tm,d.httpResponseHeadersReturn=Ts,d.httpResponseHeadersReturnRef=Em,d.implement=al,d.inferArgumentDeclarationDataType=rO,d.inferDataType=gn,d.inferInputMapDataType=Cu,d.inferOutputMapDataType=Bu,d.inferPropertyDataType=sO,d.inferReturnDeclarationDataType=wu,d.inferValueDescriptorDataType=oO,d.inferVariableDeclarationDataType=aO,d.inferVariableInstanceDataType=iO,d.initBaseProjectEntity=yp,d.initProject=$P,d.isPromise=zu,d.iterateOverListActionDescriptorListArgumentDeclaration=yT,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=uT,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=cT,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=pT,d.iterateOverListLoopActionDescriptor=Wn,d.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=fT,d.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=hT,d.iterateOverListLoopBodyActionDescriptor=bs,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=DT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=IT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=OT,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=ST,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=gs,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=TT,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=mT,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=ET,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=vT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=gT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=RT,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=bT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=BT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=CT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=AT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=wT,d.iterateOverObjectKeysLoopActionDescriptor=li,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=_T,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=MT,d.iterateOverObjectKeysLoopBodyActionDescriptor=JT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=jT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=xT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=qT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=kT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Yl,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=NT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=VT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=LT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=UT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=$T,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=GT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=FT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=ZT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=HT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=YT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=zT,d.iterateOverObjectValuesLoopActionDescriptor=di,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=XT,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=KT,d.iterateOverObjectValuesLoopBodyActionDescriptor=cE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=oE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=sE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=dE,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=lE,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Hl,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=eE,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=QT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=tE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=aE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=rE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=nE,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=iE,d.iterateOverStringActionDescriptorDynamicReturnDeclaration=Xm,d.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Km,d.iterateOverStringActionDescriptorStringArgumentDeclaration=Zm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Hm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Ym,d.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=zm,d.iterateOverStringLoopActionDescriptor=ea,d.iterateOverStringLoopBodyActionDescriptor=Wl,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=sT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=aT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=lT,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=oT,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=ql,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=eT,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Qm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=tT,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Jl,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=rT,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=nT,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=iT,d.joinListOperation=wl,d.joinListOperationError=rh,d.joinListOperationErrorParentRef=nh,d.joinListOperationFirstListArgument=Ky,d.joinListOperationFirstListArgumentParentRef=Zy,d.joinListOperationFirstListArgumentRef=qy,d.joinListOperationFirstListDataType=Jy,d.joinListOperationResultListDataType=zy,d.joinListOperationResultListReturn=th,d.joinListOperationResultListReturnParentRef=eh,d.joinListOperationResultListReturnRef=Hy,d.joinListOperationSecondListArgument=Qy,d.joinListOperationSecondListArgumentParentRef=Xy,d.joinListOperationSecondListArgumentRef=Wy,d.joinListOperationSecondListDataType=Yy,d.joinListWithLastSeparator=q,d.joinStringsOperation=Ki,d.joinStringsOperationDynamicStringArgument=Iy,d.joinStringsOperationDynamicStringArgumentParentRef=vy,d.joinStringsOperationDynamicStringArgumentRef=gy,d.joinStringsOperationDynamicStringDataType=by,d.joinStringsOperationError=Ry,d.joinStringsOperationErrorParentRef=Ey,d.joinStringsOperationFirstStringArgument=ds,d.joinStringsOperationFirstStringArgumentParentRef=dy,d.joinStringsOperationFirstStringArgumentRef=ry,d.joinStringsOperationFirstStringDataType=iy,d.joinStringsOperationResultStringDataType=ly,d.joinStringsOperationResultStringReturn=Zi,d.joinStringsOperationResultStringReturnParentRef=Ty,d.joinStringsOperationResultStringReturnRef=oy,d.joinStringsOperationSecondStringArgument=cs,d.joinStringsOperationSecondStringArgumentParentRef=my,d.joinStringsOperationSecondStringArgumentRef=ay,d.joinStringsOperationSecondStringDataType=sy,d.joinStringsOperationSeparatorStringArgument=fy,d.joinStringsOperationSeparatorStringArgumentParentRef=hy,d.joinStringsOperationSeparatorStringArgumentRef=cy,d.joinStringsOperationSeparatorStringDataType=yy,d.joinStringsOperationSeparatorStringDataTypeDefaultValue=py,d.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=uy,d.keyValuePrototype=ai,d.lowercaseFirstLetter=Wo,d.manualFlowActionDescriptorDeclarationArgumentDeclaration=jl,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=Um,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=Fm,d.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=xm,d.manualFlowLoopActionDescriptor=Rs,d.manualFlowLoopActionDescriptorDynamicReturnDeclaration=$m,d.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Gm,d.manualFlowLoopBodyActionDescriptor=kl,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=km,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=jm,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Jm,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=qm,d.mapActionDescriptorToTypeItRepresents=$q,d.mergeEntityErrorsList=N9,d.mergeListOfEntities=Nq,d.methodDefaultValue=lm,d.mockClientProject=RD,d.moreThanOrEqualCondition=hi,d.moreThanOrEqualConditionLeftHandArgument=rg,d.moreThanOrEqualConditionLeftHandArgumentDataType=tg,d.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=eg,d.moreThanOrEqualConditionLeftHandArgumentParentRef=ng,d.moreThanOrEqualConditionRightHandArgument=og,d.moreThanOrEqualConditionRightHandArgumentDataType=ag,d.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=ig,d.moreThanOrEqualConditionRightHandArgumentParentRef=sg,d.notEmptyCondition=gr,d.notEmptyConditionArgument=XR,d.notEmptyConditionRef=KR,d.nullPrototype=gp,d.numberAdditionOperation=ls,d.numberAdditionOperationDynamicSummandArgument=Fp,d.numberAdditionOperationDynamicSummandArgumentType=$p,d.numberAdditionOperationDynamicSummandArgumentTypeParentRef=Gp,d.numberAdditionOperationError=Lp,d.numberAdditionOperationErrorParentRef=Np,d.numberAdditionOperationFirstNumberArgument=Il,d.numberAdditionOperationFirstNumberArgumentRef=Pp,d.numberAdditionOperationFirstNumberDataType=Ap,d.numberAdditionOperationRef=_p,d.numberAdditionOperationRefThree=Sl,d.numberAdditionOperationRefTwo=Vp,d.numberAdditionOperationResultNumberDataType=Mp,d.numberAdditionOperationResultNumberReturn=Ol,d.numberAdditionOperationResultNumberReturnRef=Bp,d.numberAdditionOperationSecondNumberArgument=Dl,d.numberAdditionOperationSecondNumberArgumentRef=Cp,d.numberAdditionOperationSecondNumberDataType=wp,d.numberPrototype=ee,d.numberSubtractionOperation=Al,d.numberSubtractionOperationDynamicSubtrahendArgument=ty,d.numberSubtractionOperationDynamicSubtrahendArgumentType=ey,d.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Qp,d.numberSubtractionOperationError=Xp,d.numberSubtractionOperationErrorParentRef=Kp,d.numberSubtractionOperationFirstNumberArgument=Wp,d.numberSubtractionOperationFirstNumberArgumentRef=Up,d.numberSubtractionOperationFirstNumberDataType=xp,d.numberSubtractionOperationRef=Pl,d.numberSubtractionOperationRefThree=zp,d.numberSubtractionOperationRefTwo=Yp,d.numberSubtractionOperationResultNumberDataType=Jp,d.numberSubtractionOperationResultNumberReturn=Zp,d.numberSubtractionOperationResultNumberReturnRef=qp,d.numberSubtractionOperationSecondNumberArgument=Hp,d.numberSubtractionOperationSecondNumberArgumentRef=jp,d.numberSubtractionOperationSecondNumberDataType=kp,d.numberValueAutogenerationSchema=Oc,d.parallelExecutionOperation=Qt,d.parallelExecutionOperationError=sf,d.parallelExecutionOperationErrorParentRef=af,d.parallelExecutionOperationListOfExecutionResultsDataType=tf,d.parallelExecutionOperationListOfExecutionResultsReturn=Gl,d.parallelExecutionOperationListOfExecutionResultsReturnRef=ef,d.parallelExecutionOperationListOfFunctionsArgument=Ll,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Qh,d.parallelExecutionOperationListOfFunctionsArgumentRef=Xh,d.parallelExecutionOperationListOfFunctionsBlueprint=Kh,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=Zh,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=zh,d.parallelExecutionOperationRef=nf,d.parallelExecutionOperationRefThree=rf,d.persistedBuiltInBaseEntity=st,d.persistedBuiltInBaseEntityDatabaseProperty=ui,d.persistedBuiltInBaseEntityDatabasePropertyDataType=MR,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=YP,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=_R,d.persistedBuiltInBaseEntityDatabasePropertyRef=BR,d.persistedBuiltInBaseEntityPrimaryKeyProperty=pi,d.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=xR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=NR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=VR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=jR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=UR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=GR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=LR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=FR,d.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=$R,d.processOutputGlobalValueDescriptorDataType=hg,d.processOutputGlobalValueDescriptorReturn=Cs,d.processOutputGlobalValueDescriptorReturnRef=yg,d.projectPublicationCompletedGlobalEvent=As,d.propertyToZodSchema=Bg,d.relationalDatabaseBuiltInBaseEntity=un,d.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=dd,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=PR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=OR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=AR,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=SR,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=ld,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=DR,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=vR,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=IR,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=vs,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=hR,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=pR,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=yR,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Ss,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=bR,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=RR,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=gR,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=Ds,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=ER,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=WP,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=TR,d.relationalDatabaseBuiltInBaseEntityRef=ci,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=Is,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=mR,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=JP,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=fR,d.resolveActionDescriptorName=yO,d.resolveBaseEntityName=dO,d.resolveBuiltInBaseEntityDataTypeLabel=cO,d.resolveClonedEntityProject=He,d.resolveConditionOperatorLabel=zo,d.resolveDataType=Yo,d.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Xu,d.resolveDataTypeLabel=Ka,d.resolveDefinitionEntityDataTypeLabel=D7,d.resolveEntityDataTypeLabel=I7,d.resolveEntityName=w,d.resolveFirstCallsSecond=Dq,d.resolveFirstWritesSecond=Sq,d.resolvePrimaryKeyProperty=xq,d.resolvePrimitiveEntityName=pO,d.resolveSearchName=uO,d.resolveVariableScope=g7,d.sequentialExecutionOperation=wn,d.sequentialExecutionOperationError=Of,d.sequentialExecutionOperationErrorParentRef=Sf,d.sequentialExecutionOperationListOfExecutionResultsDataType=vf,d.sequentialExecutionOperationListOfExecutionResultsReturn=Fl,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=Df,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=bf,d.sequentialExecutionOperationListOfFunctionsArgument=$l,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=gf,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=If,d.sequentialExecutionOperationListOfFunctionsArgumentRef=Rf,d.sequentialExecutionOperationListOfFunctionsBlueprint=Ef,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=Tf,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=mf,d.softDeletePersistedEntityMethod=HP,d.softDeletePersistedEntityMethodParentRef=kR,d.sortCallsBasedOnExecutionDependencies=VO,d.sortChildrenEntitiesBasedOnExecutionDependencies=vq,d.splitListOperation=Ml,d.splitListOperationError=bh,d.splitListOperationErrorParentRef=gh,d.splitListOperationFirstOutputListDataType=ch,d.splitListOperationFirstOutputListReturn=mh,d.splitListOperationFirstOutputListReturnParentRef=fh,d.splitListOperationFirstOutputListReturnRef=Bl,d.splitListOperationInputListArgument=ph,d.splitListOperationInputListArgumentParentRef=uh,d.splitListOperationInputListArgumentRef=sh,d.splitListOperationInputListDataType=oh,d.splitListOperationSecondOutputListDataType=Th,d.splitListOperationSecondOutputListReturn=Rh,d.splitListOperationSecondOutputListReturnParentRef=Eh,d.splitListOperationSplitIndexArgument=hh,d.splitListOperationSplitIndexArgumentParentRef=yh,d.splitListOperationSplitIndexArgumentRef=lh,d.splitListOperationSplitIndexDataType=dh,d.splitStringOperation=Cl,d.splitStringOperationError=Uy,d.splitStringOperationErrorParentRef=Fy,d.splitStringOperationFirstPartResultStringDataType=Cy,d.splitStringOperationFirstPartResultStringReturn=$y,d.splitStringOperationFirstPartResultStringReturnParentRef=Gy,d.splitStringOperationFirstPartResultStringReturnRef=Ay,d.splitStringOperationIndexArgument=Ny,d.splitStringOperationIndexArgumentParentRef=Vy,d.splitStringOperationIndexArgumentRef=Oy,d.splitStringOperationIndexDataType=Py,d.splitStringOperationSecondPartResultStringDataType=By,d.splitStringOperationSecondPartResultStringReturn=kP,d.splitStringOperationSecondPartResultStringReturnParentRef=Ly,d.splitStringOperationSecondPartResultStringReturnRef=wy,d.splitStringOperationStringArgument=_y,d.splitStringOperationStringArgumentParentRef=My,d.splitStringOperationStringArgumentRef=Dy,d.splitStringOperationStringDataType=Sy,d.stringPrototype=J,d.stringValueAutogenerationSchema=Sc,d.suggestNewIdForEntity=$u,d.test_primitive_entities_export=DJ,d.toCamelCase=b7,d.toEntityState=Lt,d.toKebabCase=lO,d.toLowerCaseKebabCase=Ho,d.toPascalCase=v7,d.untypedDataPrototype=it,d.updateErrorsList=Be,d.updateValueReader=Lq,d.urlDefaultValue=nm,d.uuidPrototype=An,d.validateArgumentDeclarationName=Lu,d.validateCalledByErrorIdInAction=yq,d.validateCalledByIdInAction=pq,d.validateCallers=vO,d.validateConditionEntityDeclaration=mq,d.validateDataOperation=fr,d.validateDataOperationDataToValidateArgument=Jf,d.validateDataOperationDataToValidateArgumentParentRef=qf,d.validateDataOperationDataToValidateArgumentRef=jf,d.validateDataOperationDataToValidateDataType=kf,d.validateDataOperationEntityToMatchTypeArgument=zf,d.validateDataOperationEntityToMatchTypeArgumentParentRef=Hf,d.validateDataOperationEntityToMatchTypeArgumentRef=Wf,d.validateDataOperationEntityToMatchTypeDataType=Yf,d.validateDataOperationError=Qf,d.validateDataOperationErrorParentRef=Xf,d.validateDataOperationOutputEntityDeclaration=Kf,d.validateDataOperationOutputEntityDeclarationParentRef=Zf,d.validateDefinitionEntityName=Zo,d.validateEntryCaller=bO,d.validateErrorCaller=gO,d.validateFunctionCallDeclaration=DO,d.validateFunctionDeclarationName=_u,d.validateGeneratedEntityParentIsNotBuiltInEntity=lq,d.validateGeneration=sq,d.validateGenerationTarget=je,d.validateGenerationUpdate=oq,d.validateLoopEntityDeclaration=Tq,d.validateName=S7,d.validateOperationEntityDeclaration=SO,d.validatePropertyName=Nu,d.validateReachability=kn,d.validateReadsValueInActionPayload=hq,d.validateReferenceObject=Xo,d.validateReferenceToOne=xu,d.validateReferences=tt,d.validateReturnDeclarationName=Gu,d.validateSuccessCaller=RO,d.validateValueReaderGenerationUpdate=Qa,d.validateValueWritter=Yu,d.validateVariableDeclarationName=Vu,d.validateVariableInternalCallUse=Hu,d.valueAutogenerationCurrentDateAndTimeSchema=bD,d.valueAutogenerationGenericSchema=Eo,d.valueAutogenerationOptions=Ac,d.valueAutogenerationOptionsSchema=gD,d.valueAutogenerationRandomBooleanSchema=Dc,d.valueAutogenerationRandomDateBetweenSchema=wD,d.valueAutogenerationRandomDateFromSchema=AD,d.valueAutogenerationRandomDateSchema=bo,d.valueAutogenerationRandomDateUntilSchema=CD,d.valueAutogenerationRandomNumberBetweenSchema=DD,d.valueAutogenerationRandomNumberFromSchema=vD,d.valueAutogenerationRandomNumberSchema=Ro,d.valueAutogenerationRandomNumberUntilSchema=ID,d.valueAutogenerationRandomSchema=Va,d.valueAutogenerationRandomTextBetweenSchema=PD,d.valueAutogenerationRandomTextFromSchema=SD,d.valueAutogenerationRandomTextSchema=go,d.valueAutogenerationRandomTextUntilSchema=OD,d.valueAutogenerationRangeValueTypesSchema=_a,d.valueAutogenerationUniqueSchema=Ic,d.waitOperation=Rt,d.waitOperationMillisecondsNumberArgument=yr,d.waitOperationMillisecondsNumberArgumentRef=df,d.waitOperationMillisecondsNumberDataType=cf,d.waitOperationOperationError=yf,d.waitOperationOperationErrorParentRef=pf,d.waitOperationRef=uf,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|