@elyx-code/project-logic-tree 0.0.6094 → 0.0.6095
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 +4336 -4337
- package/dist/index.umd.cjs +37 -37
- package/dist/tree/state/built-in-base-entity/built-in-base-entity.d.ts +1 -1
- package/dist/tree/state/custom-entity/custom-entity.d.ts +1 -1
- package/dist/tree/state/primitive-entity/primitive-entity.d.ts +1 -1
- package/dist/tree/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(d=typeof globalThis<"u"?globalThis:d||self,n(d["@elyx-code/project-logic-tree"]={}))})(this,function(d){"use strict";var Z7=Object.defineProperty;var K7=(d,n,V)=>n in d?Z7(d,n,{enumerable:!0,configurable:!0,writable:!0,value:V}):d[n]=V;var c=(d,n,V)=>(K7(d,typeof n!="symbol"?n+"":n,V),V);var n=(r=>(r.CustomEntity="custom-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.PrimitiveValue="primitive-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))(n||{}),V=(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))(V||{}),Je=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(Je||{}),I=(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))(I||{}),Qo=(r=>(r.DataTypeLiteralValue="data-type-literal-value",r))(Qo||{}),Te=(r=>(r.Addition="addition",r.Subtraction="subtraction",r.Multiplication="multiplication",r.Division="division",r.Remainder="remainder",r.Exponentiation="exponentiation",r))(Te||{}),K=(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))(K||{}),H=(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))(H||{}),le=(r=>(r.Parallel="parallel",r.Sequential="sequential",r.Wait="wait",r))(le||{}),ce=(r=>(r.CreateNewInstance="create-new-instance",r.Validate="validate",r))(ce||{}),tt=(r=>(r.HttpRequest="base-http-request",r))(tt||{}),$e=(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))($e||{}),Vt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Vt||{}),$=(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))($||{}),O=(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))(O||{}),Ze=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(Ze||{}),yn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(yn||{}),Ct=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Ct||{}),Yr=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(Yr||{});const Nn=[n.VariableDeclaration,n.VariableInstance,n.InputMap,n.ReturnDeclaration],xe=[n.VariableDeclaration,n.VariableInstance,n.ArgumentDeclaration,n.OutputMap],Hu=[...Nn,...xe],Fe=[n.VariableDeclaration,n.VariableInstance],Hr=[n.GlobalEvent],je=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.InternalCall,n.Loop],el=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.Loop],Ue=[n.FunctionDeclaration,...Hr],Mn=[...je,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],tl=[...el,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],hn=[...je,...Ue],zu=[...el,...Ue],yA=[...Mn,...Ue],hA=[...tl,...Ue],dt=[...Ue,n.Loop],Ve=[n.ReturnStatement,n.BreakStatement,n.ContinueStatement],fA=[n.CustomEntity,n.BuiltInBaseEntity,n.Project,n.InstalledProject,n.GlobalEvent,n.DataType,n.FunctionCall,n.FunctionDeclaration,n.ActionDescriptor,n.ValueDescriptor,n.ArgumentDeclaration,n.InputMap,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.ReturnDeclaration,n.OutputMap,n.PrimitiveEntity,n.PrimitiveValue,n.Property,n.Operation,n.Condition,n.VariableDeclaration,n.VariableInstance,n.Search,n.Loop,n.InternalCall],nl=[n.CustomEntity,n.GlobalEvent,n.FunctionDeclaration,n.FunctionCall,n.VariableDeclaration,n.VariableInstance,n.Operation,n.Condition,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.InstalledProject,n.Loop,n.Search],Zu=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor],zr=[n.BuiltInBaseEntity,n.PrimitiveEntity],mA=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.GlobalEvent,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor,n.InputMap,n.OutputMap,n.FunctionCall,n.Operation,n.Condition,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.VariableInstance,n.PrimitiveValue,n.InternalCall];var rl=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(rl||{});const B={[n.PrimitiveEntity]:{[I.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[I.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[I.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[I.KeyValue]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[I.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"}}}}},[I.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[I.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[I.Null]:{id:"7d698f34-5a89-4aab-846b-07ef3843b8c4",properties:{}},[I.Untyped]:{id:"4044a018-818e-49d7-bf9a-c3dd1fff2102",properties:{}}},[n.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[n.BuiltInBaseEntity]:{[V.KEY_VALUE_PARAM]:{id:V.KEY_VALUE_PARAM},[V.HTTP_ENDPOINT]:{id:V.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"}}},[V.PERSISTED_ENTITY]:{id:V.PERSISTED_ENTITY,properties:{database:{id:"persisted-built-in-base-entity-database-property-id"}}},[V.RELATIONAL_DATABASE]:{id:V.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"}}},[V.CRON_JOB]:{id:V.CRON_JOB,properties:{expression:{id:"cron-job-built-in-base-entity-expression-property-id"}}}},[n.Operation]:{[K.Join]:{id:K.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"}}},[K.Split]:{id:K.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"}}},[Te.Addition]:{id:Te.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"}}},[Te.Subtraction]:{id:Te.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"}}},[tt.HttpRequest]:{id:tt.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"}}},[ce.Validate]:{id:ce.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"}}},[le.Parallel]:{id:le.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"}}}},[n.Loop]:{[$.List]:{id:$.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"}}}},[$.String]:{id:$.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"}}}},[$.ObjectKeys]:{id:$.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"}}}},[$.ObjectValues]:{id:$.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"}}}},[$.ManualFlow]:{id:$.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"}}}},[$.Counted]:{id:$.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"}}}}},[n.Condition]:{[$e.MoreThanOrEqual]:{id:$e.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"}}}},[Vt.NotEmpty]:{id:Vt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[n.GlobalEvent]:{[yn.PROJECT_PUBLICATION_COMPLETED]:{id:yn.PROJECT_PUBLICATION_COMPLETED}}},Lt=B[n.PrimitiveEntity],x={type:n.PrimitiveEntity,id:Lt.string.id,description:"A string of characters.",version:1,name:I.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Vn={type:n.PrimitiveEntity,id:Lt.boolean.id,description:"A 'true' or 'false' value.",version:1,name:I.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},X={type:n.PrimitiveEntity,id:Lt.number.id,description:"A number value.",version:1,name:I.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},TA={type:n.PrimitiveEntity,id:Lt.null.id,description:"An explicitly empty value.",version:1,name:I.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ke={type:n.PrimitiveEntity,id:Lt.untyped.id,description:"Data of any type that isn't known in advance.",version:1,name:I.Untyped,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ku={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:n.GenericReference,entityId:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",entityType:n.DataType},Xu={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:n.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:n.Property},Qu={like:!1,inferred:!1,id:Lt.enum.properties.options.dataType.id,version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:Lt.enum.properties.options.dataType.defaultValue.id,type:n.PrimitiveValue,version:1,name:I.KeyValue,autogeneration:null,value:[],valueAsType:null,parent:Ku},parent:Xu},ep={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:n.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:n.PrimitiveEntity},tp={primary:!1,hidden:!1,required:!0,id:Lt.enum.properties.options.id,name:"Options",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Qu,description:"Options for the enum. Each option is a text value.",parent:ep},Ln={type:n.PrimitiveEntity,id:Lt.enum.id,description:"A set of text options to choose from.",version:1,name:I.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[tp],methods:[]},fn={type:n.PrimitiveEntity,id:Lt.date.id,description:"A date and time value.",version:1,name:I.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},za={type:n.PrimitiveEntity,id:Lt.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:I.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[x],properties:[],methods:[]},Li={type:n.PrimitiveEntity,id:Lt[I.KeyValue].id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:I.KeyValue,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Qt=B[n.Operation][Te.Addition],np={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Qt.inputs.firstSummand.id,entityType:n.ValueDescriptor},rp={like:!1,inferred:!1,id:"number-addition-first-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:np},ip={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Qt.inputs.secondSummand.id,entityType:n.ValueDescriptor},ap={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ip},sp={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Qt.outputs.result.id,entityType:n.ValueDescriptor},op={like:!1,inferred:!1,id:Qt.outputs.result.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:sp},lp={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Addition,entityType:n.ActionDescriptor},il={id:Qt.inputs.firstSummand.id,type:n.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",dataType:rp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:lp},cp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Addition,entityType:n.ActionDescriptor},al={id:Qt.inputs.secondSummand.id,type:n.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",dataType:ap,required:!0,parentRelationType:O.FixedArguments,index:1,parent:cp},sl={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Addition,entityType:n.ActionDescriptor},ol={parentRelationType:O.FixedReturns,id:Qt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:op,required:!0,index:0,parent:sl},dp={type:n.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Te.Addition,entityType:n.ActionDescriptor},up={parentRelationType:O.FixedReturns,id:Qt.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:dp},pp={type:n.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:Qt.inputs.dynamicSummand.id,entityType:n.ValueDescriptor},yp={like:!1,inferred:!1,id:"number-addition-operation-dynamic-summand-argument-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pp},hp={parentRelationType:O.DynamicArgument,id:Qt.inputs.dynamicSummand.id,type:n.ValueDescriptor,description:"A number to add",version:1,name:"Summand",dataType:yp,required:!0,index:2,parent:sl},Za={id:Te.Addition,type:n.ActionDescriptor,description:"Sum numbers",version:1,name:Te.Addition,inputs:[il,al,hp],error:up,outputs:[ol],parent:null},en=B[n.Operation][Te.Subtraction],fp={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:en.inputs.minuend.id,entityType:n.ValueDescriptor},mp={like:!1,inferred:!1,id:"number-subtraction-first-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:fp},Tp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:en.inputs.subtrahend.id,entityType:n.ValueDescriptor},Ep={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Tp},bp={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:en.outputs.result.id,entityType:n.ValueDescriptor},Rp={like:!1,inferred:!1,id:en.outputs.result.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bp},ll={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Subtraction,entityType:n.ActionDescriptor},gp={id:en.inputs.minuend.id,type:n.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",dataType:mp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ll},vp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Ip={id:en.inputs.subtrahend.id,type:n.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",dataType:Ep,required:!0,parentRelationType:O.FixedArguments,index:1,parent:vp},Dp={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Pp={parentRelationType:O.FixedReturns,id:en.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",dataType:Rp,required:!0,index:0,parent:Dp},Ap={type:n.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Op={parentRelationType:O.FixedReturns,id:en.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Ap},Sp={type:n.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:en.inputs.dynamicSubtrahend.id,entityType:n.ValueDescriptor},Cp={like:!1,inferred:!1,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Sp},Bp={id:en.inputs.dynamicSubtrahend.id,type:n.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",dataType:Cp,required:!0,parentRelationType:O.DynamicArgument,index:2,parent:ll},cl={id:Te.Subtraction,type:n.ActionDescriptor,description:"Substract numbers",version:1,name:Te.Subtraction,inputs:[gp,Ip,Bp],error:Op,outputs:[Pp],parent:null},wp={[Te.Addition]:Za,[Te.Subtraction]:cl},Jt=B[n.Operation][K.Join],_p={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},Np={like:!1,inferred:!1,id:"join-strings-first-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:_p},Mp={type:n.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Jt.inputs.second.id,entityType:n.ValueDescriptor},Vp={like:!1,inferred:!1,id:"join-strings-second-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Mp},Lp={type:n.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Jt.outputs.result.id,entityType:n.ValueDescriptor},Gp={like:!1,inferred:!1,id:"join-strings-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Lp},$p={type:n.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Ka={id:Jt.inputs.first.id,type:n.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.",dataType:Np,parentRelationType:O.FixedArguments,required:!0,index:1,parent:$p},Fp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},Up={type:n.GenericReference,id:"join-strings-separator-string-data-type-default-value-parent-ref",entityId:"join-strings-separator-string-data-type-id",entityType:n.DataType},xp={parentRelationType:null,type:n.PrimitiveValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:I.String,value:"",valueAsType:null,autogeneration:null,parent:Up},jp={like:!1,inferred:!1,id:"join-strings-separator-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:xp,constant:!1,parent:Fp},kp={type:n.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},qp={id:Jt.inputs.separator.id,type:n.ValueDescriptor,version:1,name:"Separator",description:"The text value that will be inserted between each of the values that are joined.",dataType:jp,parentRelationType:O.FixedArguments,required:!1,index:0,parent:kp},Jp={type:n.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Xa={id:Jt.inputs.second.id,type:n.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.",dataType:Vp,parentRelationType:O.FixedArguments,required:!0,index:2,parent:Jp},Wp={type:n.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Gi={parentRelationType:O.FixedReturns,id:Jt.outputs.result.id,type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:Gp,required:!0,index:0,parent:Wp},Yp={type:n.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Hp={parentRelationType:O.FixedReturns,id:Jt.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Yp},zp={type:n.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Jt.inputs.dynamicString.id,entityType:n.ValueDescriptor},Zp={like:!1,inferred:!1,id:"join-strings-dynamic-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:zp},Kp={type:n.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Xp={id:Jt.inputs.dynamicString.id,type:n.ValueDescriptor,version:1,name:"Text",description:"Text to join to the previous ones. Its value will be at the end of the resulting text.",dataType:Zp,parentRelationType:O.DynamicArgument,required:!0,index:3,parent:Kp},$i={id:K.Join,type:n.ActionDescriptor,version:1,name:K.Join,description:"Join text values together, to form a single resulting text value.",inputs:[qp,Ka,Xa,Xp],outputs:[Gi],error:Hp,parent:null},mn=B[n.Operation][K.Split],Qp={type:n.GenericReference,id:"split-string-string-argument-declaration",entityId:mn.inputs.stringValue.id,entityType:n.ValueDescriptor},ey={like:!1,inferred:!1,id:"split-string-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Qp},ty={type:n.GenericReference,id:"split-string-index-argument-declaration",entityId:mn.inputs.indexLocation.id,entityType:n.ValueDescriptor},ny={like:!1,inferred:!1,id:"split-string-index-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ty},ry={type:n.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:mn.outputs.firstPartResult.id,entityType:n.ValueDescriptor},iy={like:!1,inferred:!1,id:"split-string-first-part-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ry},ay={type:n.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:mn.outputs.secondPartResult.id,entityType:n.ValueDescriptor},sy={like:!1,inferred:!1,id:"split-string-second-part-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ay},oy={type:n.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},ly={id:mn.inputs.stringValue.id,type:n.ValueDescriptor,version:1,name:"Text value",description:"The text value that will be split into two at the given index location.",dataType:ey,parentRelationType:O.FixedArguments,required:!0,index:0,parent:oy},cy={type:n.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},dy={id:mn.inputs.indexLocation.id,type:n.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.",dataType:ny,parentRelationType:O.FixedArguments,required:!0,index:1,parent:cy},uy={type:n.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},EA={parentRelationType:O.FixedReturns,id:mn.outputs.secondPartResult.id,type:n.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",dataType:sy,required:!0,index:1,parent:uy},py={type:n.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},yy={parentRelationType:O.FixedReturns,id:mn.outputs.firstPartResult.id,type:n.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",dataType:iy,required:!0,index:0,parent:py},hy={type:n.GenericReference,id:"split-string-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},fy={parentRelationType:O.FixedReturns,id:mn.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:hy},dl={id:K.Split,type:n.ActionDescriptor,version:1,name:K.Split,description:"Split a text into two, at the given index location.",inputs:[ly,dy],outputs:[yy],error:fy,parent:null},my={[K.Join]:$i,[K.Split]:dl};var Ty=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(Ty||{}),Ey=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(Ey||{});const by={type:n.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:n.ValueDescriptor},Ry={like:!1,inferred:!1,id:"join-list-first-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:by},gy={type:n.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:n.ValueDescriptor},vy={like:!1,inferred:!1,id:"join-list-second-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:gy},Iy={type:n.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:n.ValueDescriptor},Dy={like:!1,inferred:!1,id:"join-list-result-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Iy},Py={type:n.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},Ay={id:"join-list-first-list-argument-declaration",type:n.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.",dataType:Ry,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Py},Oy={type:n.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},Sy={id:"join-list-second-list-argument-declaration",type:n.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.",dataType:vy,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Oy},Cy={type:n.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},By={parentRelationType:O.FixedReturns,id:"join-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:Dy,required:!0,index:0,parent:Cy},wy={type:n.GenericReference,id:"join-list-operation-error-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},_y={parentRelationType:O.FixedReturns,id:"join-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:wy},ul={id:H.Join,type:n.ActionDescriptor,version:1,name:H.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[Ay,Sy],error:_y,outputs:[By],parent:null};var Ny=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(Ny||{}),My=(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))(My||{});const Vy={type:n.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:n.ValueDescriptor},Ly={like:!1,inferred:!1,id:"split-list-operation-input-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Vy},Gy={type:n.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:n.ValueDescriptor},$y={like:!1,inferred:!1,id:"split-list-operation-split-index-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gy},pl={type:n.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:n.ValueDescriptor},Fy={like:!1,inferred:!1,id:"split-list-operation-first-output-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:pl},Uy={type:n.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},xy={id:"list-to-split-argument-declaration",type:n.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",dataType:Ly,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Uy},jy={type:n.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},ky={id:"split-list-index-argument-declaration",type:n.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.",dataType:$y,parentRelationType:O.FixedArguments,required:!0,index:1,parent:jy},qy={type:n.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},Jy={parentRelationType:O.FixedReturns,id:"split-list-first-output-list-return-delaration",type:n.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",dataType:Fy,required:!0,index:0,parent:qy},Wy={like:!1,inferred:!1,id:"split-list-operation-second-output-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:pl},Yy={type:n.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},Hy={parentRelationType:O.FixedReturns,id:"split-list-second-output-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",dataType:Wy,required:!0,index:0,parent:Yy},zy={type:n.GenericReference,id:"split-list-operation-error-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},Zy={parentRelationType:O.FixedReturns,id:"split-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:zy},yl={id:H.Split,type:n.ActionDescriptor,version:1,name:H.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:[xy,ky],outputs:[Jy,Hy],error:Zy,parent:null};var Ky=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(Ky||{}),Xy=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(Xy||{});const Qy={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:n.ValueDescriptor},eh={like:!1,inferred:!1,id:"get-last-in-list-input-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Qy},th={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:n.ValueDescriptor},nh={like:!1,inferred:!1,id:"get-last-in-list-output-element-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:th},rh={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},ih={id:"get-last-in-list-input-list-argument-declaration",type:n.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",dataType:eh,parentRelationType:O.FixedArguments,required:!0,index:0,parent:rh},ah={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},sh={parentRelationType:O.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:n.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",dataType:nh,required:!0,index:0,parent:ah},oh={type:n.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},lh={parentRelationType:O.FixedReturns,id:"get-last-in-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:oh},hl={id:H.GetLast,type:n.ActionDescriptor,version:1,name:H.GetLast,description:"Outputs the last element of a given list.",inputs:[ih],outputs:[sh],error:lh,parent:null};var ch=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(ch||{}),dh=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(dh||{});const uh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:n.ValueDescriptor},ph={like:!1,inferred:!1,id:"append-to-list-lsit-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:uh},yh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:n.ValueDescriptor},hh={like:!1,inferred:!1,id:"append-to-list-second-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:yh},fh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:n.ValueDescriptor},mh={like:!1,inferred:!1,id:"append-to-list-result-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:fh},Th={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},fl={id:"append-to-list-lsit-argument-declaration",type:n.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",dataType:ph,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Th},Eh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},ml={id:"append-to-list-element-to-append-argument-declaration",type:n.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",dataType:hh,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Eh},bh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},Rh={parentRelationType:O.FixedReturns,id:"append-to-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:mh,required:!0,index:0,parent:bh},gh={type:n.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},vh={parentRelationType:O.FixedReturns,id:"append-to-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:gh},Qa={id:H.Append,type:n.ActionDescriptor,version:1,name:H.Append,description:"Adds a given element to the end of a list value.",inputs:[fl,ml],error:vh,outputs:[Rh],parent:null},Ih={[H.Join]:ul,[H.Split]:yl,[H.GetLast]:hl,[H.Append]:Qa},Zr=B[n.Operation][le.Parallel],Dh={id:"parallel-execution-list-of-functions-blueprint-dynamic-output-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Ph={id:"parallel-execution-list-of-functions-blueprint-dynamic-input-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Ah={id:"parallel-execution-list-of-functions-blueprint-id",type:n.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:[Ph],outputs:[Dh],error:null,parent:null},Oh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Zr.inputs.listOfActions.id,entityType:n.ValueDescriptor},Sh={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ah,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Oh},Ch={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Zr.outputs.results.id,entityType:n.ValueDescriptor},Bh={like:!1,inferred:!1,id:Zr.outputs.results.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ch},wh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:le.Parallel,entityType:n.ActionDescriptor},Tl={id:Zr.inputs.listOfActions.id,type:n.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Sh,required:!0,index:0,parent:wh,parentRelationType:O.FixedArguments},_h={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:le.Parallel,entityType:n.ActionDescriptor},El={id:Zr.outputs.results.id,type:n.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:Bh,required:!0,index:0,parent:_h,parentRelationType:O.FixedReturns},Nh={type:n.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:le.Parallel,entityType:n.ActionDescriptor},Mh={id:Zr.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Nh,parentRelationType:O.ReturnedError},Wt={id:le.Parallel,type:n.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:le.Parallel,inputs:[Tl],outputs:[El],error:Mh,parent:null};var Vh=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(Vh||{}),Lh=(r=>(r.Error="wait-operation-error-return-delaration",r))(Lh||{});const Gh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:n.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},$h={like:!1,inferred:!1,id:"wait-milliseconds-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gh},Fh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:n.ActionDescriptor,entityId:le.Wait},nr={id:"wait-milliseconds-number-argument-declaration",type:n.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",dataType:$h,required:!0,index:0,parent:Fh,parentRelationType:O.FixedArguments},Uh={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:le.Wait,entityType:n.ActionDescriptor},xh={id:"wait-operation-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Uh,parentRelationType:O.ReturnedError},ut={id:le.Wait,type:n.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:le.Wait,inputs:[nr],outputs:[],error:xh,parent:null};var jh=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(jh||{}),kh=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(kh||{});const qh={id:"sequential-execution-list-of-functions-blueprint-dynamic-output-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Jh={id:"sequential-execution-list-of-functions-blueprint-dynamic-input-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Wh={id:"sequential-execution-list-of-functions-blueprint-id",type:n.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:[Jh],outputs:[qh],error:null,parent:null},Yh={type:n.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:n.ValueDescriptor},Hh={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Wh,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Yh},zh={type:n.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:n.ValueDescriptor},Zh={like:!1,inferred:!1,id:"sequential-execution-list-of-execution-results-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:zh},Kh={type:n.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},bl={id:"sequential-execution-list-of-functions-argument-declaration",type:n.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Hh,required:!0,index:0,parent:Kh,parentRelationType:O.FixedArguments},Xh={type:n.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},Rl={id:"sequential-execution-result-return-delaration",type:n.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:Zh,required:!0,index:0,parent:Xh,parentRelationType:O.FixedReturns},Qh={type:n.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},ef={id:"sequential-execution-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Qh,parentRelationType:O.ReturnedError},Tn={id:le.Sequential,type:n.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:le.Sequential,inputs:[bl],outputs:[Rl],error:ef,parent:null},tf={[le.Parallel]:Wt,[le.Wait]:ut,[le.Sequential]:Tn};var nf=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(nf||{}),rf=(r=>(r.Error="create-new-instance-error-return-delaration",r))(rf||{});const af={type:n.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},sf={type:n.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:n.ValueDescriptor},of={like:!1,inferred:!1,id:"new-entity-data-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:sf},lf={id:"new-entity-data-argument-declaration",type:n.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:of,required:!0,parentRelationType:O.FixedArguments,index:1,parent:af},cf={type:n.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},df={like:!1,inferred:!1,id:"entity-to-instanciate-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:cf},uf={type:n.GenericReference,id:"create-new-instance-operation-ref",entityType:n.ActionDescriptor,entityId:ce.CreateNewInstance},pf={id:"entity-to-instanciate-argument-declaration",type:n.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",dataType:df,required:!0,parentRelationType:O.FixedArguments,index:0,parent:uf},yf={type:n.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},hf={parentRelationType:O.FixedReturns,id:"create-new-instance-output-entity-declaration",type:n.ValueDescriptor,version:1,dataType:null,name:"Created entity",description:"The entity that was created",parent:yf,required:!0,index:0},ff={type:n.GenericReference,id:"create-new-instance-error-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},mf={parentRelationType:O.FixedReturns,id:"create-new-instance-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:ff},rr={id:ce.CreateNewInstance,type:n.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:ce.CreateNewInstance,inputs:[pf,lf],outputs:[hf],error:mf,parent:null},Kr=B[n.Operation][ce.Validate],Tf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Kr.inputs.dataToValidate.id},Ef={like:!1,inferred:!1,id:"validate-data-operation-data-to-validate-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Tf},bf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},Rf={id:Kr.inputs.dataToValidate.id,type:n.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:Ef,required:!0,parentRelationType:O.FixedArguments,index:0,parent:bf},gf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Kr.inputs.entityToMatch.id},vf={like:!1,inferred:!1,id:"validate-data-operation-entity-to-match-type-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:gf},If={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},Df={id:Kr.inputs.entityToMatch.id,type:n.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:vf,required:!0,index:0,parentRelationType:O.FixedArguments,parent:If},Pf={type:n.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Af={id:Kr.outputs.outputEntity.id,type:n.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",parent:Pf,required:!0,index:0,parentRelationType:O.FixedReturns},Of={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Sf={id:Kr.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Of,parentRelationType:O.ReturnedError},ir={id:ce.Validate,type:n.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:ce.Validate,inputs:[Df,Rf],outputs:[Af],error:Sf,parent:null},Cf={[ce.CreateNewInstance]:rr,[ce.Validate]:ir},Xe=B[n.Operation]["base-http-request"],Bf={type:n.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:n.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},wf={parentRelationType:null,id:"http-request-url-default-value-id",type:n.PrimitiveValue,version:1,value:"https://some-url.com",name:I.String,valueAsType:null,parent:Bf,autogeneration:null},_f={type:n.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Xe.inputs.url.id,entityType:n.ValueDescriptor},Nf={like:!1,inferred:!1,id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:wf,constant:!1,parent:_f},Mf={type:n.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Xe.inputs.query.id,entityType:n.ValueDescriptor},Vf={like:!1,inferred:!1,id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Mf},Lf={type:n.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:n.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},Gf={parentRelationType:null,id:"http-request-method-default-value-id",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,valueAsType:null,parent:Lf,autogeneration:null},$f={type:n.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Xe.inputs.method.id,entityType:n.ValueDescriptor},Ff={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:Gf,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:$f},Uf={type:n.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Xe.inputs.headers.id,entityType:n.ValueDescriptor},xf={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Uf},jf={type:n.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Xe.inputs.body.id,entityType:n.ValueDescriptor},kf={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jf},qf={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Xe.outputs.code.id},Jf={like:!1,inferred:!1,id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qf},Wf={type:n.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:n.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},Yf={type:n.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:n.ValueDescriptor,entityId:Xe.outputs.headers.id},Hf={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"http-response-headers-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:I.KeyValue,parent:Wf,valueAsType:null,autogeneration:null},constant:!1,parent:Yf},zf={type:n.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:n.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},Zf={type:n.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:n.ValueDescriptor,entityId:Xe.outputs.body.id},Kf={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"http-response-body-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:I.KeyValue,parent:zf,valueAsType:null,autogeneration:null},constant:!1,parent:Zf},Xf={type:n.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},es={id:Xe.inputs.method.id,type:n.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",dataType:Ff,required:!1,index:0,parentRelationType:O.FixedArguments,parent:Xf},Qf={type:n.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ts={id:Xe.inputs.url.id,type:n.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:Nf,required:!1,index:1,parentRelationType:O.FixedArguments,parent:Qf},em={type:n.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},gl={id:Xe.inputs.query.id,type:n.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",dataType:Vf,required:!1,index:2,parentRelationType:O.FixedArguments,parent:em},tm={type:n.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ns={id:Xe.inputs.headers.id,type:n.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",dataType:xf,required:!1,index:3,parent:tm,parentRelationType:O.FixedArguments},nm={type:n.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},rs={id:Xe.inputs.body.id,type:n.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:kf,required:!1,index:4,parentRelationType:O.FixedArguments,parent:nm},rm={type:n.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},is={id:Xe.outputs.code.id,type:n.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",dataType:Jf,required:!0,index:0,parentRelationType:O.FixedReturns,parent:rm},im={type:n.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},as={parentRelationType:O.FixedReturns,id:Xe.outputs.headers.id,type:n.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",dataType:Hf,required:!0,index:1,parent:im},am={type:n.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ss={parentRelationType:O.FixedReturns,id:Xe.outputs.body.id,type:n.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",dataType:Kf,required:!0,index:2,parent:am},sm={type:n.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},om={type:n.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:n.ValueDescriptor,entityId:Xe.outputs.error.id},lm={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:om},vl={parentRelationType:O.ReturnedError,id:Xe.outputs.error.id,type:n.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:lm,required:!0,index:0,parent:sm},Fi={type:n.ActionDescriptor,id:tt.HttpRequest,name:tt.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:[es,ts,gl,ns,rs],outputs:[is,as,ss],error:vl,parent:null},cm={[tt.HttpRequest]:Fi},bA={...my,...wp,...Ih,...tf,...Cf,...cm},RA=B[n.Loop]["manual-flow-loop"],dm={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ManualFlow,entityType:n.ActionDescriptor},um={id:RA.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:dm,parentRelationType:O.DynamicReturn},Il={id:$.ManualFlow,type:n.ActionDescriptor,version:1,name:$.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:[um],error:null,parent:null},Ui=B[n.Loop]["manual-flow-loop"],pm={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"manual-flow-loop-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},ym={like:!1,inferred:!1,id:"manual-flow-loop-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:pm},hm={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},Dl={id:Ui.body.inputs.iterationNumber.id,type:n.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.",dataType:ym,required:!0,index:0,parentRelationType:O.FixedArguments,parent:hm},fm={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},mm={id:"manual-flow-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:1,parentRelationType:O.DynamicArgument,parent:fm},Tm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},Em={id:"manual-flow-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:Tm},Pl={id:Ui.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[Dl,mm],outputs:[Em],error:null,parent:null},bm=B[n.Loop]["list-loop"],Rm={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:n.ValueDescriptor},gm={like:!1,inferred:!1,id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:Rm},vm={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},Im={id:bm.inputs.list.id,type:n.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:gm,index:0,parent:vm,parentRelationType:O.FixedArguments},Dm={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},Pm={id:bm.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:Dm,parentRelationType:O.DynamicReturn},ar={id:$.List,type:n.ActionDescriptor,version:1,name:$.List,description:"Iterates over a list of entities",inputs:[Im],outputs:[Pm],error:null,parent:null},sr=B[n.Loop]["list-loop"],Am={id:"iterate-over-list-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},Om={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:Am},Sm={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},os={id:sr.body.inputs.currentValue.id,type:n.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.",dataType:Om,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Sm},Cm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},Bm={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:Cm},wm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},_m={id:sr.body.inputs.iterationNumber.id,type:n.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.",dataType:Bm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:wm},Nm={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Mm={id:"iterate-over-list-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:Nm},Vm={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Lm={id:"iterate-over-list-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:Vm},ls={id:sr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[_m,os,Mm],outputs:[Lm],error:null,parent:null},Gm=B[n.Loop]["string-loop"],$m={id:"iterate-over-string-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},Fm={like:!1,inferred:!1,id:"iterate-over-string-loop-string-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:$m},Um={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},xm={id:Gm.inputs.string.id,type:n.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",required:!0,dataType:Fm,index:0,parent:Um,parentRelationType:O.FixedArguments},jm={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},km={id:Gm.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:jm,parentRelationType:O.DynamicReturn},cs={id:$.String,type:n.ActionDescriptor,version:1,name:$.String,description:"Iterates over a string of entities",inputs:[xm],outputs:[km],error:null,parent:null},or=B[n.Loop]["string-loop"],qm={id:"iterate-over-string-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},Jm={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:qm},Wm={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Al={id:or.body.inputs.currentValue.id,type:n.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.",dataType:Jm,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Wm},Ym={id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},Hm={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:Ym},zm={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Ol={id:or.body.inputs.iterationNumber.id,type:n.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.",dataType:Hm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:zm},Zm={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Km={id:"iterate-over-string-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:Zm},Xm={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Qm={id:"iterate-over-string-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:Xm},Sl={id:or.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Ol,Al,Km],outputs:[Qm],error:null,parent:null},eT=B[n.Loop]["object-keys-loop"],tT={id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-object-argument-declaration-id",entityType:n.ValueDescriptor},nT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:null,parent:tT},rT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},iT={id:eT.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:nT,index:0,parent:rT,parentRelationType:O.FixedArguments},aT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},sT={id:eT.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:aT,parentRelationType:O.DynamicReturn},xi={id:$.ObjectKeys,type:n.ActionDescriptor,version:1,name:$.ObjectKeys,description:"Iterates over a object of entities",inputs:[iT],outputs:[sT],error:null,parent:null},lr=B[n.Loop]["object-keys-loop"],oT={id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},lT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:oT},cT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},Cl={id:lr.body.inputs.currentValue.id,type:n.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.",dataType:lT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:cT},dT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},uT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:dT},pT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},yT={id:lr.body.inputs.iterationNumber.id,type:n.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.",dataType:uT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:pT},hT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},fT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:hT},mT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},TT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:mT},ET={id:lr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[yT,Cl,fT],outputs:[TT],error:null,parent:null},bT=B[n.Loop]["object-values-loop"],RT={id:"iterate-over-object-values-loop-object-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-object-argument-declaration-id",entityType:n.ValueDescriptor},gT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-object-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:null,parent:RT},vT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},IT={id:bT.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:gT,index:0,parent:vT,parentRelationType:O.FixedArguments},DT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},PT={id:bT.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:DT,parentRelationType:O.DynamicReturn},ji={id:$.ObjectValues,type:n.ActionDescriptor,version:1,name:$.ObjectValues,description:"Iterates over a object of entities",inputs:[IT],outputs:[PT],error:null,parent:null},cr=B[n.Loop]["object-values-loop"],AT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},OT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:null,isNullable:!1,constant:!1,entity:null,asType:null,like:!1,inferred:!1,defaultValue:null,parent:AT},ST={id:"iterate-over-object-values-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},Bl={id:cr.body.inputs.currentValue.id,type:n.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.",dataType:OT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:ST},CT={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},BT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:CT},wT={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},_T={id:cr.body.inputs.iterationNumber.id,type:n.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.",dataType:BT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:wT},NT={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},MT={id:"iterate-over-object-values-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:NT},VT={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},LT={id:"iterate-over-object-values-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:VT},GT={id:cr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[_T,Bl,MT],outputs:[LT],error:null,parent:null},$T=B[n.Loop]["counted-loop"],FT={id:"counted-loop-string-argument-declaration-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-data-type-id",entityType:n.DataType},UT={parentRelationType:null,id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:n.PrimitiveValue,name:I.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:FT},xT={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},jT={like:!1,inferred:!1,id:"counted-loop-string-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:UT,parent:xT},kT={id:"counted-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},qT={id:$T.inputs.number.id,type:n.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:jT,index:0,parent:kT,parentRelationType:O.FixedArguments},JT={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},WT={id:$T.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:JT,parentRelationType:O.DynamicReturn},ds={id:$.Counted,type:n.ActionDescriptor,version:1,name:$.Counted,description:"Iterates a given number of times",inputs:[qT],outputs:[WT],error:null,parent:null},ki=B[n.Loop]["counted-loop"],YT={id:"counted-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},HT={like:!1,inferred:!1,id:"counted-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:YT},zT={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},wl={id:ki.body.inputs.iterationNumber.id,type:n.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.",dataType:HT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:zT},ZT={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},KT={id:"counted-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:1,parentRelationType:O.DynamicArgument,parent:ZT},XT={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},QT={id:"counted-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:XT},_l={id:ki.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[wl,KT],outputs:[QT],error:null,parent:null},qi=B[n.BuiltInBaseEntity][V.HTTP_ENDPOINT].properties,eE={id:"endpointBuiltInCorsPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},tE={id:"endpointBuiltInCorsPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:qi.cors.id},nE={like:!1,inferred:!1,id:"endpointBuiltInCorsPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:["*"],parent:eE,autogeneration:null,valueAsType:null},parent:tE},rE={id:"endpointBuiltInBaseEntityRef",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},iE={primary:!1,hidden:!0,required:!0,id:qi.cors.id,name:"Allowed origins",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:nE,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:rE},aE={id:"endpointBuiltInPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInPathPropertyDataType"},sE={id:"endpointBuiltInPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:qi.path.id},oE={like:!1,inferred:!1,id:"endpointBuiltInPathPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.String,value:"/",parent:aE,autogeneration:null,valueAsType:null},parent:sE},lE={id:"endpointBuiltInBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Nl={primary:!1,hidden:!1,required:!0,id:qi.path.id,name:"Path",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:oE,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:lE},cE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},dE={id:"endpointBuiltInMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"endpointBuiltInMethodProperty"},uE={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ln,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,parent:cE,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:dE},pE={id:"endpointBuiltInBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Ml={primary:!1,hidden:!1,required:!0,id:qi.method.id,name:"Method",version:1,type:n.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:uE,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:pE},yE={id:"endpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestHeadersVariableDataType"},hE={id:"endpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},fE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:yE,autogeneration:null,valueAsType:null},parent:hE},mE={id:"endpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},TE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:mE},EE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},bE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},RE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:Li,defaultValue:{parentRelationType:null,id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:[],parent:EE,autogeneration:null,valueAsType:null},parent:bE},gE={id:"endpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointPathParamsVariableDataType"},vE={id:"endpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},IE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Li,asType:!1,defaultValue:{parentRelationType:null,id:"endpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:[],parent:gE,autogeneration:null,valueAsType:null},parent:vE},DE={id:"endpointReachedTriggerActionDescriptorRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Vl={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:n.ValueDescriptor,name:"Request headers",dataType:fE,required:!0,index:0,parentRelationType:O.FixedArguments,parent:DE},PE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ll={id:"endpointPathParamsArgumentDeclaration",type:n.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:IE,required:!0,index:1,parentRelationType:O.FixedArguments,parent:PE},AE={id:"endpointReachedTriggerActionDescriptorRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Gl={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:n.ValueDescriptor,name:"Request query params",dataType:RE,required:!0,index:2,parentRelationType:O.FixedArguments,parent:AE},OE={id:"endpointReachedTriggerActionDescriptorRefFour",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},$l={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ValueDescriptor,name:"Request body",dataType:TE,index:3,required:!0,parentRelationType:O.FixedArguments,parent:OE},SE={id:"endpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},CE={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:SE},BE={id:"endpointReturnStatementRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Fl={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:n.ValueDescriptor,name:"Response code",dataType:CE,required:!0,index:0,parentRelationType:O.FixedReturns,parent:BE},wE={id:"endpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointResponseHeadersDataType"},_E={id:"endpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},NE={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"endpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:wE,autogeneration:null,valueAsType:null},parent:_E},ME={id:"endpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Ul={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:n.ValueDescriptor,name:"Response headers",dataType:NE,required:!1,index:1,parentRelationType:O.FixedReturns,parent:ME},VE={id:"endpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},LE={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:VE},GE={id:"endpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},xl={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ValueDescriptor,name:"Response body",dataType:LE,required:!1,index:2,parentRelationType:O.FixedReturns,parent:GE},$E={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},jl={id:"endpointReachedTriggerActionDescriptor",type:n.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[Vl,Ll,Gl,$l],outputs:[Fl,Ul,xl],error:null,parent:$E},us={id:V.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:V.HTTP_ENDPOINT,type:n.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[iE,Nl,Ml],abstractMethods:[jl],extends:[],methods:[]},Gt=B[n.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,FE={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-identifier-property-data-type-id",entityType:n.DataType},UE={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:Gt.properties.identifier.id,entityType:n.Property},gA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:null,parent:FE,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:UE},Xr={id:"relational-database-built-in-base-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},ps={primary:!0,hidden:!1,required:!0,id:Gt.properties.identifier.id,name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:gA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Xr},vA={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:n.DataType},xE={id:"relational-database-built-in-base-entity-username-property-ref-id",type:n.GenericReference,entityId:Gt.properties.username.id,entityType:n.Property},IA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-username-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-id",entityType:n.DataType},autogeneration:null,valueAsType:null},parent:xE},ys={primary:!1,hidden:!1,required:!0,id:Gt.properties.username.id,name:"Username",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:IA,description:"The username that will be used to connect to the database.",parent:Xr},DA={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:n.DataType},jE={id:"relational-database-built-in-base-entity-password-property-ref-id",type:n.GenericReference,entityId:Gt.properties.password.id,entityType:n.Property},PA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:jE},hs={primary:!1,hidden:!1,required:!0,id:Gt.properties.password.id,name:"Password",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:PA,description:"The password that will be used to connect to the database.",parent:Xr},kE={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-min-size-property-data-type-id",entityType:n.DataType},qE={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:n.GenericReference,entityId:Gt.properties.minSize.id,entityType:n.Property},AA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:kE,autogeneration:null,valueAsType:null},parent:qE},fs={primary:!1,hidden:!0,required:!0,id:Gt.properties.minSize.id,name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:AA,description:"The minimum size of the database in GB.",parent:Xr},JE={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-default-property-data-type-id",entityType:n.DataType},WE={id:"relational-database-built-in-base-entity-default-property-ref-id",type:n.GenericReference,entityId:Gt.properties.default.id,entityType:n.Property},OA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Vn,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-default-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!1,parent:JE,autogeneration:null,valueAsType:null},parent:WE},kl={primary:!1,hidden:!0,required:!0,id:Gt.properties.default.id,name:"Default",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:OA,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Xr},YE={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:Gt.properties.autoscaling.id,entityType:n.Property},HE={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",entityType:n.DataType},SA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Vn,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!1,parent:HE,autogeneration:null,valueAsType:null},parent:YE},zE={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},ql={primary:!1,hidden:!0,required:!0,id:Gt.properties.autoscaling.id,name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:SA,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:zE},En={id:V.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:V.RELATIONAL_DATABASE,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[ps,ys,hs,fs,kl,ql],abstractMethods:[],methods:[],extends:[]},ZE={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.DeletePersistedEntity},Jl={type:n.FunctionDeclaration,id:Ct.DeletePersistedEntity,name:Ct.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:ZE,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},CA=B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties,BA={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:n.DataType},KE={id:"persisted-built-in-base-entity-database-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:n.Property},wA={like:!1,inferred:!1,id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:En,asType:!1,defaultValue:null,parent:KE},XE={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},Qr={primary:!1,hidden:!0,required:!0,id:CA.database.id,name:"Database",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:wA,description:"The database that the entity belongs to.",parent:XE},vt={id:V.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:V.PERSISTED_ENTITY,type:n.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[Qr],methods:[Jl],extends:[]},QE={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.SoftDeletePersistedEntity},_A={type:n.FunctionDeclaration,id:Ct.SoftDeletePersistedEntity,name:Ct.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:QE,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},eb={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Wl={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:n.ActionDescriptor,description:"Executed when the cron job is triggered",inputs:[],error:null,outputs:[],parent:eb},tb=B[n.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,NA={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:n.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:n.DataType},nb={id:"cron-job-built-in-base-entity-expression-property-ref",type:n.GenericReference,entityId:tb.properties.expression.id,entityType:n.Property},MA={like:!1,inferred:!1,id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:nb},rb={id:"cron-job-built-in-base-entity-ref",type:n.GenericReference,entityId:V.CRON_JOB,entityType:n.BuiltInBaseEntity},ib={primary:!1,hidden:!1,required:!0,id:tb.properties.expression.id,name:"Cron expression",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:MA,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:rb},Yl={id:V.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:V.CRON_JOB,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[ib],methods:[],abstractMethods:[Wl],extends:[]},ab={type:n.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:n.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Hl={id:"execution-built-in-entity-abort-method-id",type:n.FunctionDeclaration,version:1,name:Ct.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:ab},zl={id:V.EXECUTION,type:n.BuiltInBaseEntity,version:1,name:V.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:[Hl],abstractMethods:[]},VA=B[n.Condition]["not-empty"],sb={type:n.GenericReference,id:"not-empty-condition-ref",entityType:n.ActionDescriptor,entityId:Vt.NotEmpty},ob={id:VA.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",dataType:null,required:!0,parentRelationType:O.FixedArguments,index:0,parent:sb},dr={type:n.ActionDescriptor,id:Vt.NotEmpty,version:1,name:Vt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[ob],outputs:[],error:null},lb={[Vt.NotEmpty]:dr},ei=B[n.Condition]["more-than-or-equal"],cb={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:ei.inputs.leftHand.id},db={type:n.DataType,id:ei.inputs.leftHand.dataType.id,version:1,entity:X,defaultValue:null,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,isNullable:!1,constant:!1,asType:!1,parent:cb},ub={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},pb={id:ei.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:db,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ub},yb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:ei.inputs.rightHand.id},hb={type:n.DataType,id:ei.inputs.rightHand.dataType.id,version:1,entity:X,defaultValue:null,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,isNullable:!1,constant:!1,asType:!1,parent:yb},fb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},mb={id:ei.inputs.rightHand.id,type:n.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:hb,required:!0,parentRelationType:O.FixedArguments,index:1,parent:fb},ti={type:n.ActionDescriptor,id:$e.MoreThanOrEqual,version:1,name:$e.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[pb,mb],outputs:[],error:null},Tb={[$e.MoreThanOrEqual]:ti},LA={...lb,...Tb},ms={type:n.ActionDescriptor,id:yn.PROJECT_PUBLICATION_COMPLETED,version:1,name:yn.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},GA={[yn.PROJECT_PUBLICATION_COMPLETED]:ms},Zl=B[n.ValueDescriptor][rl.ActionOngoingProcessOutputValue],Eb={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Zl.id},bb={like:!1,inferred:!1,id:Zl.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zl,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Eb},Kl={id:Zl.id,type:n.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:bb,required:!0,index:0,parent:null,parentRelationType:O.OngoingProcessExecution};var ne;(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 i(a,s=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(ne||(ne={}));var Xl;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Xl||(Xl={}));const G=ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gn=r=>{switch(typeof r){case"undefined":return G.undefined;case"string":return G.string;case"number":return isNaN(r)?G.nan:G.number;case"boolean":return G.boolean;case"function":return G.function;case"bigint":return G.bigint;case"symbol":return G.symbol;case"object":return Array.isArray(r)?G.array:r===null?G.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?G.promise:typeof Map<"u"&&r instanceof Map?G.map:typeof Set<"u"&&r instanceof Set?G.set:typeof Date<"u"&&r instanceof Date?G.date:G.object;default:return G.unknown}},w=ne.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"]),$A=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class It extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};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},i={_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)i._errors.push(t(o));else{let l=i,p=0;for(;p<o.path.length;){const y=o.path[p];p===o.path.length-1?(l[y]=l[y]||{_errors:[]},l[y]._errors.push(t(o))):l[y]=l[y]||{_errors:[]},l=l[y],p++}}};return a(this),i}static assert(e){if(!(e instanceof It))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},i=[];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))):i.push(e(a));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}}It.create=r=>new It(r);const ni=(r,e)=>{let t;switch(r.code){case w.invalid_type:r.received===G.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case w.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,ne.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:t=`Unrecognized key(s) in object: ${ne.joinValues(r.keys,", ")}`;break;case w.invalid_union:t="Invalid input";break;case w.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${ne.joinValues(r.options)}`;break;case w.invalid_enum_value:t=`Invalid enum value. Expected ${ne.joinValues(r.options)}, received '${r.received}'`;break;case w.invalid_arguments:t="Invalid function arguments";break;case w.invalid_return_type:t="Invalid function return type";break;case w.invalid_date:t="Invalid date";break;case w.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}"`:ne.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case w.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 w.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 w.custom:t="Invalid input";break;case w.invalid_intersection_types:t="Intersection results could not be merged";break;case w.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case w.not_finite:t="Number must be finite";break;default:t=e.defaultError,ne.assertNever(r)}return{message:t}};let Rb=ni;function FA(r){Rb=r}function Ts(){return Rb}const Es=r=>{const{data:e,path:t,errorMaps:i,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=i.filter(y=>!!y).slice().reverse();for(const y of p)l=y(o,{data:e,defaultError:l}).message;return{...a,path:s,message:l}},UA=[];function L(r,e){const t=Ts(),i=Es({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ni?void 0:ni].filter(a=>!!a)});r.common.issues.push(i)}class rt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const i=[];for(const a of t){if(a.status==="aborted")return J;a.status==="dirty"&&e.dirty(),i.push(a.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const i=[];for(const a of t){const s=await a.key,o=await a.value;i.push({key:s,value:o})}return rt.mergeObjectSync(e,i)}static mergeObjectSync(e,t){const i={};for(const a of t){const{key:s,value:o}=a;if(s.status==="aborted"||o.status==="aborted")return J;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}}const J=Object.freeze({status:"aborted"}),ri=r=>({status:"dirty",value:r}),pt=r=>({status:"valid",value:r}),Ql=r=>r.status==="aborted",ec=r=>r.status==="dirty",Ji=r=>r.status==="valid",Wi=r=>typeof Promise<"u"&&r instanceof Promise;function bs(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)}function gb(r,e,t,i,a){if(i==="m")throw new TypeError("Private method is not writable");if(i==="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 i==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t}typeof SuppressedError=="function"&&SuppressedError;var j;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(j||(j={}));var Yi,Hi;class tn{constructor(e,t,i,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,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 vb=(r,e)=>{if(Ji(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 It(r.common.issues);return this._error=t,this._error}}};function Z(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:a}=r;if(e&&(t||i))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,y;const{message:h}=r;return o.code==="invalid_enum_value"?{message:h??l.defaultError}:typeof l.data>"u"?{message:(p=h??i)!==null&&p!==void 0?p:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(y=h??t)!==null&&y!==void 0?y:l.defaultError}},description:a}}class Q{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 Gn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new rt,ctx:{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Wi(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 i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;const a={common:{issues:[],async:(i=t==null?void 0:t.async)!==null&&i!==void 0?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return vb(a,s)}async parseAsync(e,t){const i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){const i={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:Gn(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(Wi(a)?a:Promise.resolve(a));return vb(i,s)}refine(e,t){const i=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:w.custom,...i(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((i,a)=>e(i)?!0:(a.addIssue(typeof t=="function"?t(i,a):t),!1))}_refinement(e){return new zt({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return rn.create(this,this._def)}nullable(){return xn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ht.create(this,this._def)}promise(){return oi.create(this,this._def)}or(e){return Xi.create([this,e],this._def)}and(e){return Qi.create(this,e,this._def)}transform(e){return new zt({...Z(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ia({...Z(this._def),innerType:this,defaultValue:t,typeName:q.ZodDefault})}brand(){return new rc({typeName:q.ZodBranded,type:this,...Z(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new aa({...Z(this._def),innerType:this,catchValue:t,typeName:q.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return sa.create(this,e)}readonly(){return oa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xA=/^c[^\s-]{8,}$/i,jA=/^[0-9a-z]+$/,kA=/^[0-9A-HJKMNP-TV-Z]{26}$/,qA=/^[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,JA=/^[a-z0-9_-]{21}$/i,WA=/^[-+]?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)?)??$/,YA=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tc;const zA=/^(?:(?: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])$/,ZA=/^(([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})))$/,KA=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ib="((\\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])))",XA=new RegExp(`^${Ib}$`);function Db(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 QA(r){return new RegExp(`^${Db(r)}$`)}function Pb(r){let e=`${Ib}T${Db(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 eO(r,e){return!!((e==="v4"||!e)&&zA.test(r)||(e==="v6"||!e)&&ZA.test(r))}class Yt extends Q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==G.string){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.string,received:s.parsedType}),J}const i=new rt;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.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?L(a,{code:w.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&L(a,{code:w.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")YA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"email",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")tc||(tc=new RegExp(HA,"u")),tc.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"emoji",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")qA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"uuid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")JA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"nanoid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")xA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"cuid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")jA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"cuid2",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")kA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"ulid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),L(a,{validation:"url",code:w.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"regex",code:w.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.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),L(a,{code:w.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Pb(s).test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?XA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?QA(s).test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?WA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"duration",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?eO(e.data,s.version)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"ip",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?KA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"base64",code:w.invalid_string,message:s.message}),i.dirty()):ne.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(a=>e.test(a),{validation:t,code:w.invalid_string,...j.errToObj(i)})}_addCheck(e){return new Yt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...j.errToObj(e)})}url(e){return this._addCheck({kind:"url",...j.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...j.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...j.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...j.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...j.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...j.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...j.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...j.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...j.errToObj(e)})}datetime(e){var t,i;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:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...j.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,...j.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...j.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...j.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...j.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...j.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...j.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...j.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...j.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...j.errToObj(t)})}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new Yt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Yt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Yt({...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}}Yt.create=r=>{var e;return new Yt({checks:[],typeName:q.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};function tO(r,e){const t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=t>i?t:i,s=parseInt(r.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class $n extends Q{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)!==G.number){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.number,received:s.parsedType}),J}let i;const a=new rt;for(const s of this._def.checks)s.kind==="int"?ne.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),L(i,{code:w.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.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)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?tO(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_finite,message:s.message}),a.dirty()):ne.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,i,a){return new $n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new $n({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.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"&&ne.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$n.create=r=>new $n({checks:[],typeName:q.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class Fn extends Q{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)!==G.bigint){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.bigint,received:s.parsedType}),J}let i;const a=new rt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.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)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):ne.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,i,a){return new Fn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Fn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.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}}Fn.create=r=>{var e;return new Fn({checks:[],typeName:q.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};class zi extends Q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==G.boolean){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.boolean,received:i.parsedType}),J}return pt(e.data)}}zi.create=r=>new zi({typeName:q.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class ur extends Q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==G.date){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.date,received:s.parsedType}),J}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_date}),J}const i=new rt;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):ne.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ur({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:j.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}}ur.create=r=>new ur({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:q.ZodDate,...Z(r)});class Rs extends Q{_parse(e){if(this._getType(e)!==G.symbol){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.symbol,received:i.parsedType}),J}return pt(e.data)}}Rs.create=r=>new Rs({typeName:q.ZodSymbol,...Z(r)});class Zi extends Q{_parse(e){if(this._getType(e)!==G.undefined){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.undefined,received:i.parsedType}),J}return pt(e.data)}}Zi.create=r=>new Zi({typeName:q.ZodUndefined,...Z(r)});class Ki extends Q{_parse(e){if(this._getType(e)!==G.null){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.null,received:i.parsedType}),J}return pt(e.data)}}Ki.create=r=>new Ki({typeName:q.ZodNull,...Z(r)});class ii extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return pt(e.data)}}ii.create=r=>new ii({typeName:q.ZodAny,...Z(r)});class pr extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return pt(e.data)}}pr.create=r=>new pr({typeName:q.ZodUnknown,...Z(r)});class bn extends Q{_parse(e){const t=this._getOrReturnCtx(e);return L(t,{code:w.invalid_type,expected:G.never,received:t.parsedType}),J}}bn.create=r=>new bn({typeName:q.ZodNever,...Z(r)});class gs extends Q{_parse(e){if(this._getType(e)!==G.undefined){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.void,received:i.parsedType}),J}return pt(e.data)}}gs.create=r=>new gs({typeName:q.ZodVoid,...Z(r)});class Ht extends Q{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),a=this._def;if(t.parsedType!==G.array)return L(t,{code:w.invalid_type,expected:G.array,received:t.parsedType}),J;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,l=t.data.length<a.exactLength.value;(o||l)&&(L(t,{code:o?w.too_big:w.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}),i.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(L(t,{code:w.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(L(t,{code:w.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>a.type._parseAsync(new tn(t,o,t.path,l)))).then(o=>rt.mergeArray(i,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new tn(t,o,t.path,l)));return rt.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new Ht({...this._def,minLength:{value:e,message:j.toString(t)}})}max(e,t){return new Ht({...this._def,maxLength:{value:e,message:j.toString(t)}})}length(e,t){return new Ht({...this._def,exactLength:{value:e,message:j.toString(t)}})}nonempty(e){return this.min(1,e)}}Ht.create=(r,e)=>new Ht({type:r,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...Z(e)});function ai(r){if(r instanceof ke){const e={};for(const t in r.shape){const i=r.shape[t];e[t]=rn.create(ai(i))}return new ke({...r._def,shape:()=>e})}else return r instanceof Ht?new Ht({...r._def,type:ai(r.element)}):r instanceof rn?rn.create(ai(r.unwrap())):r instanceof xn?xn.create(ai(r.unwrap())):r instanceof nn?nn.create(r.items.map(e=>ai(e))):r}class ke extends Q{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=ne.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==G.object){const y=this._getOrReturnCtx(e);return L(y,{code:w.invalid_type,expected:G.object,received:y.parsedType}),J}const{status:i,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof bn&&this._def.unknownKeys==="strip"))for(const y in a.data)o.includes(y)||l.push(y);const p=[];for(const y of o){const h=s[y],m=a.data[y];p.push({key:{status:"valid",value:y},value:h._parse(new tn(a,m,a.path,y)),alwaysSet:y in a.data})}if(this._def.catchall instanceof bn){const y=this._def.unknownKeys;if(y==="passthrough")for(const h of l)p.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(y==="strict")l.length>0&&(L(a,{code:w.unrecognized_keys,keys:l}),i.dirty());else if(y!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const y=this._def.catchall;for(const h of l){const m=a.data[h];p.push({key:{status:"valid",value:h},value:y._parse(new tn(a,m,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const y=[];for(const h of p){const m=await h.key,R=await h.value;y.push({key:m,value:R,alwaysSet:h.alwaysSet})}return y}).then(y=>rt.mergeObjectSync(i,y)):rt.mergeObjectSync(i,p)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var a,s,o,l;const p=(o=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,t,i).message)!==null&&o!==void 0?o:i.defaultError;return t.code==="unrecognized_keys"?{message:(l=j.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:q.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ke({...this._def,catchall:e})}pick(e){const t={};return ne.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}omit(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}deepPartial(){return ai(this)}partial(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{const a=this.shape[i];e&&!e[i]?t[i]=a:t[i]=a.optional()}),new ke({...this._def,shape:()=>t})}required(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof rn;)s=s._def.innerType;t[i]=s}}),new ke({...this._def,shape:()=>t})}keyof(){return Ab(ne.objectKeys(this.shape))}}ke.create=(r,e)=>new ke({shape:()=>r,unknownKeys:"strip",catchall:bn.create(),typeName:q.ZodObject,...Z(e)}),ke.strictCreate=(r,e)=>new ke({shape:()=>r,unknownKeys:"strict",catchall:bn.create(),typeName:q.ZodObject,...Z(e)}),ke.lazycreate=(r,e)=>new ke({shape:r,unknownKeys:"strip",catchall:bn.create(),typeName:q.ZodObject,...Z(e)});class Xi extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i=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 It(l.ctx.common.issues));return L(t,{code:w.invalid_union,unionErrors:o}),J}if(t.common.async)return Promise.all(i.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 i){const y={...t,common:{...t.common,issues:[]},parent:null},h=p._parseSync({data:t.data,path:t.path,parent:y});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:y}),y.common.issues.length&&o.push(y.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(p=>new It(p));return L(t,{code:w.invalid_union,unionErrors:l}),J}}get options(){return this._def.options}}Xi.create=(r,e)=>new Xi({options:r,typeName:q.ZodUnion,...Z(e)});const Rn=r=>r instanceof ta?Rn(r.schema):r instanceof zt?Rn(r.innerType()):r instanceof na?[r.value]:r instanceof Un?r.options:r instanceof ra?ne.objectValues(r.enum):r instanceof ia?Rn(r._def.innerType):r instanceof Zi?[void 0]:r instanceof Ki?[null]:r instanceof rn?[void 0,...Rn(r.unwrap())]:r instanceof xn?[null,...Rn(r.unwrap())]:r instanceof rc||r instanceof oa?Rn(r.unwrap()):r instanceof aa?Rn(r._def.innerType):[];class vs extends Q{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.object)return L(t,{code:w.invalid_type,expected:G.object,received:t.parsedType}),J;const i=this.discriminator,a=t.data[i],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}):(L(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){const a=new Map;for(const s of t){const o=Rn(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 vs({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...Z(i)})}}function nc(r,e){const t=Gn(r),i=Gn(e);if(r===e)return{valid:!0,data:r};if(t===G.object&&i===G.object){const a=ne.objectKeys(e),s=ne.objectKeys(r).filter(l=>a.indexOf(l)!==-1),o={...r,...e};for(const l of s){const p=nc(r[l],e[l]);if(!p.valid)return{valid:!1};o[l]=p.data}return{valid:!0,data:o}}else if(t===G.array&&i===G.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=nc(o,l);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===G.date&&i===G.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Qi extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Ql(s)||Ql(o))return J;const l=nc(s.value,o.value);return l.valid?((ec(s)||ec(o))&&t.dirty(),{status:t.value,value:l.data}):(L(i,{code:w.invalid_intersection_types}),J)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>a(s,o)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Qi.create=(r,e,t)=>new Qi({left:r,right:e,typeName:q.ZodIntersection,...Z(t)});class nn extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.array)return L(i,{code:w.invalid_type,expected:G.array,received:i.parsedType}),J;if(i.data.length<this._def.items.length)return L(i,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&i.data.length>this._def.items.length&&(L(i,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...i.data].map((o,l)=>{const p=this._def.items[l]||this._def.rest;return p?p._parse(new tn(i,o,i.path,l)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>rt.mergeArray(t,o)):rt.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new nn({...this._def,rest:e})}}nn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new nn({items:r,typeName:q.ZodTuple,rest:null,...Z(e)})};class ea extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.object)return L(i,{code:w.invalid_type,expected:G.object,received:i.parsedType}),J;const a=[],s=this._def.keyType,o=this._def.valueType;for(const l in i.data)a.push({key:s._parse(new tn(i,l,i.path,l)),value:o._parse(new tn(i,i.data[l],i.path,l)),alwaysSet:l in i.data});return i.common.async?rt.mergeObjectAsync(t,a):rt.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof Q?new ea({keyType:e,valueType:t,typeName:q.ZodRecord,...Z(i)}):new ea({keyType:Yt.create(),valueType:e,typeName:q.ZodRecord,...Z(t)})}}class Is extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.map)return L(i,{code:w.invalid_type,expected:G.map,received:i.parsedType}),J;const a=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([l,p],y)=>({key:a._parse(new tn(i,l,i.path,[y,"key"])),value:s._parse(new tn(i,p,i.path,[y,"value"]))}));if(i.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const p of o){const y=await p.key,h=await p.value;if(y.status==="aborted"||h.status==="aborted")return J;(y.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(y.value,h.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const p of o){const y=p.key,h=p.value;if(y.status==="aborted"||h.status==="aborted")return J;(y.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(y.value,h.value)}return{status:t.value,value:l}}}}Is.create=(r,e,t)=>new Is({valueType:e,keyType:r,typeName:q.ZodMap,...Z(t)});class yr extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.set)return L(i,{code:w.invalid_type,expected:G.set,received:i.parsedType}),J;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(L(i,{code:w.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(L(i,{code:w.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 y=new Set;for(const h of p){if(h.status==="aborted")return J;h.status==="dirty"&&t.dirty(),y.add(h.value)}return{status:t.value,value:y}}const l=[...i.data.values()].map((p,y)=>s._parse(new tn(i,p,i.path,y)));return i.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new yr({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new yr({...this._def,maxSize:{value:e,message:j.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}yr.create=(r,e)=>new yr({valueType:r,minSize:null,maxSize:null,typeName:q.ZodSet,...Z(e)});class si extends Q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.function)return L(t,{code:w.invalid_type,expected:G.function,received:t.parsedType}),J;function i(l,p){return Es({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ts(),ni].filter(y=>!!y),issueData:{code:w.invalid_arguments,argumentsError:p}})}function a(l,p){return Es({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ts(),ni].filter(y=>!!y),issueData:{code:w.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof oi){const l=this;return pt(async function(...p){const y=new It([]),h=await l._def.args.parseAsync(p,s).catch(v=>{throw y.addIssue(i(p,v)),y}),m=await Reflect.apply(o,this,h);return await l._def.returns._def.type.parseAsync(m,s).catch(v=>{throw y.addIssue(a(m,v)),y})})}else{const l=this;return pt(function(...p){const y=l._def.args.safeParse(p,s);if(!y.success)throw new It([i(p,y.error)]);const h=Reflect.apply(o,this,y.data),m=l._def.returns.safeParse(h,s);if(!m.success)throw new It([a(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new si({...this._def,args:nn.create(e).rest(pr.create())})}returns(e){return new si({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new si({args:e||nn.create([]).rest(pr.create()),returns:t||pr.create(),typeName:q.ZodFunction,...Z(i)})}}class ta extends Q{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})}}ta.create=(r,e)=>new ta({getter:r,typeName:q.ZodLazy,...Z(e)});class na extends Q{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:e.data}}get value(){return this._def.value}}na.create=(r,e)=>new na({value:r,typeName:q.ZodLiteral,...Z(e)});function Ab(r,e){return new Un({values:r,typeName:q.ZodEnum,...Z(e)})}class Un extends Q{constructor(){super(...arguments),Yi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return L(t,{expected:ne.joinValues(i),received:t.parsedType,code:w.invalid_type}),J}if(bs(this,Yi,"f")||gb(this,Yi,new Set(this._def.values),"f"),!bs(this,Yi,"f").has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return L(t,{received:t.data,code:w.invalid_enum_value,options:i}),J}return pt(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 Un.create(e,{...this._def,...t})}exclude(e,t=this._def){return Un.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}Yi=new WeakMap,Un.create=Ab;class ra extends Q{constructor(){super(...arguments),Hi.set(this,void 0)}_parse(e){const t=ne.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==G.string&&i.parsedType!==G.number){const a=ne.objectValues(t);return L(i,{expected:ne.joinValues(a),received:i.parsedType,code:w.invalid_type}),J}if(bs(this,Hi,"f")||gb(this,Hi,new Set(ne.getValidEnumValues(this._def.values)),"f"),!bs(this,Hi,"f").has(e.data)){const a=ne.objectValues(t);return L(i,{received:i.data,code:w.invalid_enum_value,options:a}),J}return pt(e.data)}get enum(){return this._def.values}}Hi=new WeakMap,ra.create=(r,e)=>new ra({values:r,typeName:q.ZodNativeEnum,...Z(e)});class oi extends Q{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.promise&&t.common.async===!1)return L(t,{code:w.invalid_type,expected:G.promise,received:t.parsedType}),J;const i=t.parsedType===G.promise?t.data:Promise.resolve(t.data);return pt(i.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}oi.create=(r,e)=>new oi({type:r,typeName:q.ZodPromise,...Z(e)});class zt extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:o=>{L(i,o),o.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const o=a.transform(i.data,s);if(i.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return J;const p=await this._def.schema._parseAsync({data:l,path:i.path,parent:i});return p.status==="aborted"?J:p.status==="dirty"||t.value==="dirty"?ri(p.value):p});{if(t.value==="aborted")return J;const l=this._def.schema._parseSync({data:o,path:i.path,parent:i});return l.status==="aborted"?J:l.status==="dirty"||t.value==="dirty"?ri(l.value):l}}if(a.type==="refinement"){const o=l=>{const p=a.refinement(l,s);if(i.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(i.common.async===!1){const l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?J:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(l=>l.status==="aborted"?J:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(a.type==="transform")if(i.common.async===!1){const o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Ji(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:i.data,path:i.path,parent:i}).then(o=>Ji(o)?Promise.resolve(a.transform(o.value,s)).then(l=>({status:t.value,value:l})):o);ne.assertNever(a)}}zt.create=(r,e,t)=>new zt({schema:r,typeName:q.ZodEffects,effect:e,...Z(t)}),zt.createWithPreprocess=(r,e,t)=>new zt({schema:e,effect:{type:"preprocess",transform:r},typeName:q.ZodEffects,...Z(t)});class rn extends Q{_parse(e){return this._getType(e)===G.undefined?pt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rn.create=(r,e)=>new rn({innerType:r,typeName:q.ZodOptional,...Z(e)});class xn extends Q{_parse(e){return this._getType(e)===G.null?pt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xn.create=(r,e)=>new xn({innerType:r,typeName:q.ZodNullable,...Z(e)});class ia extends Q{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===G.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ia.create=(r,e)=>new ia({innerType:r,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});class aa extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Wi(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}aa.create=(r,e)=>new aa({innerType:r,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});class Ds extends Q{_parse(e){if(this._getType(e)!==G.nan){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.nan,received:i.parsedType}),J}return{status:"valid",value:e.data}}}Ds.create=r=>new Ds({typeName:q.ZodNaN,...Z(r)});const nO=Symbol("zod_brand");class rc extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}}class sa extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?J:s.status==="dirty"?(t.dirty(),ri(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?J:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(e,t){return new sa({in:e,out:t,typeName:q.ZodPipeline})}}class oa extends Q{_parse(e){const t=this._def.innerType._parse(e),i=a=>(Ji(a)&&(a.value=Object.freeze(a.value)),a);return Wi(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}oa.create=(r,e)=>new oa({innerType:r,typeName:q.ZodReadonly,...Z(e)});function Ob(r,e={},t){return r?ii.create().superRefine((i,a)=>{var s,o;if(!r(i)){const l=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,p=(o=(s=l.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,y=typeof l=="string"?{message:l}:l;a.addIssue({code:"custom",...y,fatal:p})}}):ii.create()}const rO={object:ke.lazycreate};var q;(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"})(q||(q={}));const iO=(r,e={message:`Input not instance of ${r.name}`})=>Ob(t=>t instanceof r,e),Ps=Yt.create,ic=$n.create,aO=Ds.create,sO=Fn.create,ac=zi.create,Sb=ur.create,oO=Rs.create,lO=Zi.create,Cb=Ki.create,cO=ii.create,As=pr.create,dO=bn.create,uO=gs.create,pO=Ht.create,Bb=ke.create,yO=ke.strictCreate,hO=Xi.create,fO=vs.create,mO=Qi.create,TO=nn.create,wb=ea.create,EO=Is.create,bO=yr.create,RO=si.create,gO=ta.create,vO=na.create,_b=Un.create,IO=ra.create,DO=oi.create,Nb=zt.create,PO=rn.create,AO=xn.create,OO=zt.createWithPreprocess,SO=sa.create;var u=Object.freeze({__proto__:null,defaultErrorMap:ni,setErrorMap:FA,getErrorMap:Ts,makeIssue:Es,EMPTY_PATH:UA,addIssueToContext:L,ParseStatus:rt,INVALID:J,DIRTY:ri,OK:pt,isAborted:Ql,isDirty:ec,isValid:Ji,isAsync:Wi,get util(){return ne},get objectUtil(){return Xl},ZodParsedType:G,getParsedType:Gn,ZodType:Q,datetimeRegex:Pb,ZodString:Yt,ZodNumber:$n,ZodBigInt:Fn,ZodBoolean:zi,ZodDate:ur,ZodSymbol:Rs,ZodUndefined:Zi,ZodNull:Ki,ZodAny:ii,ZodUnknown:pr,ZodNever:bn,ZodVoid:gs,ZodArray:Ht,ZodObject:ke,ZodUnion:Xi,ZodDiscriminatedUnion:vs,ZodIntersection:Qi,ZodTuple:nn,ZodRecord:ea,ZodMap:Is,ZodSet:yr,ZodFunction:si,ZodLazy:ta,ZodLiteral:na,ZodEnum:Un,ZodNativeEnum:ra,ZodPromise:oi,ZodEffects:zt,ZodTransformer:zt,ZodOptional:rn,ZodNullable:xn,ZodDefault:ia,ZodCatch:aa,ZodNaN:Ds,BRAND:nO,ZodBranded:rc,ZodPipeline:sa,ZodReadonly:oa,custom:Ob,Schema:Q,ZodSchema:Q,late:rO,get ZodFirstPartyTypeKind(){return q},coerce:{string:r=>Yt.create({...r,coerce:!0}),number:r=>$n.create({...r,coerce:!0}),boolean:r=>zi.create({...r,coerce:!0}),bigint:r=>Fn.create({...r,coerce:!0}),date:r=>ur.create({...r,coerce:!0})},any:cO,array:pO,bigint:sO,boolean:ac,date:Sb,discriminatedUnion:fO,effect:Nb,enum:_b,function:RO,instanceof:iO,intersection:mO,lazy:gO,literal:vO,map:EO,nan:aO,nativeEnum:IO,never:dO,null:Cb,nullable:AO,number:ic,object:Bb,oboolean:()=>ac().optional(),onumber:()=>ic().optional(),optional:PO,ostring:()=>Ps().optional(),pipeline:SO,preprocess:OO,promise:DO,record:wb,set:bO,strictObject:yO,string:Ps,symbol:oO,transformer:Nb,tuple:TO,undefined:lO,union:hO,unknown:As,void:uO,NEVER:J,ZodIssueCode:w,quotelessJson:$A,ZodError:It});function Mb(r){var a,s,o;if(!(r!=null&&r.dataType))return As();const e=r.dataType.isNullable||!1,t=r.dataType.isList||!1;let i=As();if(((a=r.dataType.entity)==null?void 0:a.type)===n.PrimitiveEntity)switch(r.dataType.entity.name){case I.String:i=Ps();break;case I.KeyValue:i=wb(As());break;case I.Number:i=ic();break;case I.Boolean:i=ac();break;case I.Date:i=Sb();break;case I.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);i=_b(l);break}case I.Null:i=Cb();break;case I.UUID:i=Ps().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===n.CustomEntity)i=Vb(r.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=r.dataType.entity)==null?void 0:o.type}`);return e&&(i=i.nullable()),t&&(i=i.array()),i}function Vb(r){const e=Bb({});for(const t of r.properties){const i=Mb(t);e.shape[t.name]=i}return e}function Lb(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function Gb(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function $b(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function Fb(r){return r.rangeStart&&r.rangeEnd?$b(r):r.rangeStart?Lb(r):r.rangeEnd?Gb(r):new Date}function CO(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ub={},Os={},Ss={};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=wO;let Cs;const BO=new Uint8Array(16);function wO(){if(!Cs&&(Cs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cs(BO)}var jn={},hr={},Bs={};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var _O=/^(?:[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;Bs.default=_O,Object.defineProperty(hr,"__esModule",{value:!0}),hr.default=void 0;var NO=MO(Bs);function MO(r){return r&&r.__esModule?r:{default:r}}function VO(r){return typeof r=="string"&&NO.default.test(r)}var LO=VO;hr.default=LO,Object.defineProperty(jn,"__esModule",{value:!0}),jn.default=void 0,jn.unsafeStringify=xb;var GO=$O(hr);function $O(r){return r&&r.__esModule?r:{default:r}}const nt=[];for(let r=0;r<256;++r)nt.push((r+256).toString(16).slice(1));function xb(r,e=0){return nt[r[e+0]]+nt[r[e+1]]+nt[r[e+2]]+nt[r[e+3]]+"-"+nt[r[e+4]]+nt[r[e+5]]+"-"+nt[r[e+6]]+nt[r[e+7]]+"-"+nt[r[e+8]]+nt[r[e+9]]+"-"+nt[r[e+10]]+nt[r[e+11]]+nt[r[e+12]]+nt[r[e+13]]+nt[r[e+14]]+nt[r[e+15]]}function FO(r,e=0){const t=xb(r,e);if(!(0,GO.default)(t))throw TypeError("Stringified UUID is invalid");return t}var UO=FO;jn.default=UO,Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=void 0;var xO=kO(Ss),jO=jn;function kO(r){return r&&r.__esModule?r:{default:r}}let jb,sc,oc=0,lc=0;function qO(r,e,t){let i=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||jb,o=r.clockseq!==void 0?r.clockseq:sc;if(s==null||o==null){const R=r.random||(r.rng||xO.default)();s==null&&(s=jb=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=sc=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:lc+1;const y=l-oc+(p-lc)/1e4;if(y<0&&r.clockseq===void 0&&(o=o+1&16383),(y<0||l>oc)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");oc=l,lc=p,sc=o,l+=122192928e5;const h=((l&268435455)*1e4+p)%4294967296;a[i++]=h>>>24&255,a[i++]=h>>>16&255,a[i++]=h>>>8&255,a[i++]=h&255;const m=l/4294967296*1e4&268435455;a[i++]=m>>>8&255,a[i++]=m&255,a[i++]=m>>>24&15|16,a[i++]=m>>>16&255,a[i++]=o>>>8|128,a[i++]=o&255;for(let R=0;R<6;++R)a[i+R]=s[R];return e||(0,jO.unsafeStringify)(a)}var JO=qO;Os.default=JO;var ws={},kn={},la={};Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var WO=YO(hr);function YO(r){return r&&r.__esModule?r:{default:r}}function HO(r){if(!(0,WO.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 zO=HO;la.default=zO,Object.defineProperty(kn,"__esModule",{value:!0}),kn.URL=kn.DNS=void 0,kn.default=eS;var ZO=jn,KO=XO(la);function XO(r){return r&&r.__esModule?r:{default:r}}function QO(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const kb="6ba7b810-9dad-11d1-80b4-00c04fd430c8";kn.DNS=kb;const qb="6ba7b811-9dad-11d1-80b4-00c04fd430c8";kn.URL=qb;function eS(r,e,t){function i(a,s,o,l){var p;if(typeof a=="string"&&(a=QO(a)),typeof s=="string"&&(s=(0,KO.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 y=new Uint8Array(16+a.length);if(y.set(s),y.set(a,s.length),y=t(y),y[6]=y[6]&15|e,y[8]=y[8]&63|128,o){l=l||0;for(let h=0;h<16;++h)o[l+h]=y[h];return o}return(0,ZO.unsafeStringify)(y)}try{i.name=r}catch{}return i.DNS=kb,i.URL=qb,i}var _s={};Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;function tS(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 nS(rS(iS(r),r.length*8))}function nS(r){const e=[],t=r.length*32,i="0123456789abcdef";for(let a=0;a<t;a+=8){const s=r[a>>5]>>>a%32&255,o=parseInt(i.charAt(s>>>4&15)+i.charAt(s&15),16);e.push(o)}return e}function Jb(r){return(r+64>>>9<<4)+14+1}function rS(r,e){r[e>>5]|=128<<e%32,r[Jb(e)-1]=e;let t=1732584193,i=-271733879,a=-1732584194,s=271733878;for(let o=0;o<r.length;o+=16){const l=t,p=i,y=a,h=s;t=it(t,i,a,s,r[o],7,-680876936),s=it(s,t,i,a,r[o+1],12,-389564586),a=it(a,s,t,i,r[o+2],17,606105819),i=it(i,a,s,t,r[o+3],22,-1044525330),t=it(t,i,a,s,r[o+4],7,-176418897),s=it(s,t,i,a,r[o+5],12,1200080426),a=it(a,s,t,i,r[o+6],17,-1473231341),i=it(i,a,s,t,r[o+7],22,-45705983),t=it(t,i,a,s,r[o+8],7,1770035416),s=it(s,t,i,a,r[o+9],12,-1958414417),a=it(a,s,t,i,r[o+10],17,-42063),i=it(i,a,s,t,r[o+11],22,-1990404162),t=it(t,i,a,s,r[o+12],7,1804603682),s=it(s,t,i,a,r[o+13],12,-40341101),a=it(a,s,t,i,r[o+14],17,-1502002290),i=it(i,a,s,t,r[o+15],22,1236535329),t=at(t,i,a,s,r[o+1],5,-165796510),s=at(s,t,i,a,r[o+6],9,-1069501632),a=at(a,s,t,i,r[o+11],14,643717713),i=at(i,a,s,t,r[o],20,-373897302),t=at(t,i,a,s,r[o+5],5,-701558691),s=at(s,t,i,a,r[o+10],9,38016083),a=at(a,s,t,i,r[o+15],14,-660478335),i=at(i,a,s,t,r[o+4],20,-405537848),t=at(t,i,a,s,r[o+9],5,568446438),s=at(s,t,i,a,r[o+14],9,-1019803690),a=at(a,s,t,i,r[o+3],14,-187363961),i=at(i,a,s,t,r[o+8],20,1163531501),t=at(t,i,a,s,r[o+13],5,-1444681467),s=at(s,t,i,a,r[o+2],9,-51403784),a=at(a,s,t,i,r[o+7],14,1735328473),i=at(i,a,s,t,r[o+12],20,-1926607734),t=st(t,i,a,s,r[o+5],4,-378558),s=st(s,t,i,a,r[o+8],11,-2022574463),a=st(a,s,t,i,r[o+11],16,1839030562),i=st(i,a,s,t,r[o+14],23,-35309556),t=st(t,i,a,s,r[o+1],4,-1530992060),s=st(s,t,i,a,r[o+4],11,1272893353),a=st(a,s,t,i,r[o+7],16,-155497632),i=st(i,a,s,t,r[o+10],23,-1094730640),t=st(t,i,a,s,r[o+13],4,681279174),s=st(s,t,i,a,r[o],11,-358537222),a=st(a,s,t,i,r[o+3],16,-722521979),i=st(i,a,s,t,r[o+6],23,76029189),t=st(t,i,a,s,r[o+9],4,-640364487),s=st(s,t,i,a,r[o+12],11,-421815835),a=st(a,s,t,i,r[o+15],16,530742520),i=st(i,a,s,t,r[o+2],23,-995338651),t=ot(t,i,a,s,r[o],6,-198630844),s=ot(s,t,i,a,r[o+7],10,1126891415),a=ot(a,s,t,i,r[o+14],15,-1416354905),i=ot(i,a,s,t,r[o+5],21,-57434055),t=ot(t,i,a,s,r[o+12],6,1700485571),s=ot(s,t,i,a,r[o+3],10,-1894986606),a=ot(a,s,t,i,r[o+10],15,-1051523),i=ot(i,a,s,t,r[o+1],21,-2054922799),t=ot(t,i,a,s,r[o+8],6,1873313359),s=ot(s,t,i,a,r[o+15],10,-30611744),a=ot(a,s,t,i,r[o+6],15,-1560198380),i=ot(i,a,s,t,r[o+13],21,1309151649),t=ot(t,i,a,s,r[o+4],6,-145523070),s=ot(s,t,i,a,r[o+11],10,-1120210379),a=ot(a,s,t,i,r[o+2],15,718787259),i=ot(i,a,s,t,r[o+9],21,-343485551),t=qn(t,l),i=qn(i,p),a=qn(a,y),s=qn(s,h)}return[t,i,a,s]}function iS(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(Jb(e));for(let i=0;i<e;i+=8)t[i>>5]|=(r[i/8]&255)<<i%32;return t}function qn(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function aS(r,e){return r<<e|r>>>32-e}function Ns(r,e,t,i,a,s){return qn(aS(qn(qn(e,r),qn(i,s)),a),t)}function it(r,e,t,i,a,s,o){return Ns(e&t|~e&i,r,e,a,s,o)}function at(r,e,t,i,a,s,o){return Ns(e&i|t&~i,r,e,a,s,o)}function st(r,e,t,i,a,s,o){return Ns(e^t^i,r,e,a,s,o)}function ot(r,e,t,i,a,s,o){return Ns(t^(e|~i),r,e,a,s,o)}var sS=tS;_s.default=sS,Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var oS=Wb(kn),lS=Wb(_s);function Wb(r){return r&&r.__esModule?r:{default:r}}var cS=(0,oS.default)("v3",48,lS.default);ws.default=cS;var Ms={},Vs={};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=void 0;var dS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Vs.default=dS,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var Yb=Hb(Vs),uS=Hb(Ss),pS=jn;function Hb(r){return r&&r.__esModule?r:{default:r}}function yS(r,e,t){if(Yb.default.randomUUID&&!e&&!r)return Yb.default.randomUUID();r=r||{};const i=r.random||(r.rng||uS.default)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=i[a];return e}return(0,pS.unsafeStringify)(i)}var hS=yS;Ms.default=hS;var Ls={},Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=void 0;function fS(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function cc(r,e){return r<<e|r>>>32-e}function mS(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 i=r.length/4+2,a=Math.ceil(i/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]=cc(l[v-3]^l[v-8]^l[v-14]^l[v-16],1);let p=t[0],y=t[1],h=t[2],m=t[3],R=t[4];for(let v=0;v<80;++v){const P=Math.floor(v/20),A=cc(p,5)+fS(P,y,h,m)+R+e[P]+l[v]>>>0;R=m,m=h,h=cc(y,30)>>>0,y=p,p=A}t[0]=t[0]+p>>>0,t[1]=t[1]+y>>>0,t[2]=t[2]+h>>>0,t[3]=t[3]+m>>>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 TS=mS;Gs.default=TS,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;var ES=zb(kn),bS=zb(Gs);function zb(r){return r&&r.__esModule?r:{default:r}}var RS=(0,ES.default)("v5",80,bS.default);Ls.default=RS;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.default=void 0;var gS="00000000-0000-0000-0000-000000000000";$s.default=gS;var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=void 0;var vS=IS(hr);function IS(r){return r&&r.__esModule?r:{default:r}}function DS(r){if(!(0,vS.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var PS=DS;Fs.default=PS,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 y.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 i.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(Os),t=h(ws),i=h(Ms),a=h(Ls),s=h($s),o=h(Fs),l=h(hr),p=h(jn),y=h(la);function h(m){return m&&m.__esModule?m:{default:m}}}(Ub);function dc(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}dc.prototype.convert=function(r){var e,t,i,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,i=0,e=0;e<l;e++)t=t*s+a[e],t>=o?(a[i++]=parseInt(t/o,10),t=t%o):i>0&&(a[i++]=0);l=i,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(i!==0);return p},dc.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var AS=dc,OS=AS;function ca(r,e){var t=new OS(r,e);return function(i){return t.convert(i)}}ca.BIN="01",ca.OCT="01234567",ca.DEC="0123456789",ca.HEX="0123456789abcdef";var SS=ca;const{v4:uc,validate:CS}=Ub,Us=SS,pc={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},BS={consistentLength:!0};let yc;const Zb=(r,e,t)=>{const i=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},Kb=(r,e)=>{const i=e(r).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[i[1],i[2],i[3],i[4],i[5]].join("-")},wS=r=>Math.ceil(Math.log(2**128)/Math.log(r));var _S=(()=>{const r=(e,t)=>{const i=e||pc.flickrBase58,a={...BS,...t};if([...new Set(Array.from(i))].length!==i.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const s=wS(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},l=Us(Us.HEX,i),p=Us(i,Us.HEX),y=()=>Zb(uc(),l,o),m={alphabet:i,fromUUID:R=>Zb(R,l,o),maxLength:s,generate:y,new:y,toUUID:R=>Kb(R,p),uuid:uc,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const P=a.consistentLength?R.length===s:R.length<=s,A=R.split("").every(D=>i.includes(D));return v===!1?P&&A:P&&A&&CS(Kb(R,p))}};return Object.freeze(m),m};return r.constants=pc,r.uuid=uc,r.generate=()=>(yc||(yc=r(pc.flickrBase58).generate),yc()),r})();const xs=CO(_S);function Xb(){return xs().uuid()}function Qb(r){return r.rangeStart+Math.random()}function eR(r){const e=r.rangeEnd;return Math.random()*e}function tR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function nR(r){return r.rangeStart&&r.rangeEnd?tR(r):r.rangeStart?Qb(r):r.rangeEnd?eR(r):Math.random()}function rR(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function iR(r){const e=r.rangeEnd;return Math.random().toString(36).substring(0,e)}function aR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random().toString(36).substring(e,t)}function sR(r){return r.rangeStart&&r.rangeEnd?aR(r):r.rangeStart?rR(r):r.rangeEnd?iR(r):Math.random().toString(36)}function oR(r){return Math.random()>=.5}function NS(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case Je.CurrentDateAndTime:if(r.name===I.Date)return new Date;case Je.Random:{if(r.name===I.Date)return Fb(r.autogeneration);if(r.name===I.Number)return nR(r.autogeneration);if(r.name===I.String)return sR(r.autogeneration);if(r.name===I.Boolean)return oR(r.autogeneration)}case Je.Unique:if(r.name===I.UUID)return Xb();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const W="e7eb5382-3d99-44fd-972a-b8b1e819f6be",hc="global-user-variable-id",lR="last-executed-timestamp-variable-id",MS={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-data-type-id",entityType:n.DataType},VS={id:"alternative-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:n.Property},LS={like:!1,inferred:!1,id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:null,parent:MS,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:VS},js={id:"alternative-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},GS={primary:!0,hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:0,dataType:LS,description:"The name of the main database inside of the server instance where the data will be stored.",parent:js};n.GenericReference,n.DataType;const $S={id:"alternative-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:n.Property},FS={like:!1,inferred:!1,id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:$S},US={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:1,dataType:FS,description:"The username that will be used to connect to the database.",parent:js};n.GenericReference,n.DataType;const xS={id:"alternative-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:n.Property},jS={like:!1,inferred:!1,id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:xS},kS={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:hs,static:!0,index:2,dataType:jS,description:"The password that will be used to connect to the database.",parent:js},qS={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-data-type-id",entityType:n.DataType},JS={id:"alternative-relational-database-entity-min-size-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:n.Property},WS={like:!1,inferred:!1,id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:qS,autogeneration:null,valueAsType:null},parent:JS},YS={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!1,implements:fs,static:!0,index:3,dataType:WS,description:"The minimum size of the database in GB.",parent:js},HS={id:"alternative-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},fc={id:"alternative-relational-database-entity-id",type:n.CustomEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[GS,US,kS,YS],methods:[],abstractMethods:[],extends:[],implements:[En],x:0,y:0,parent:HS},zS={id:"animal-prototype-database-property-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-id",entityType:n.Property},ZS={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-data-type-default-value-id",entityType:n.DataType},KS={like:!1,inferred:!1,id:"animal-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"animal-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:fc,autogeneration:null,parent:ZS},parent:zS},XS={id:"animal-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},QS={primary:!1,hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:KS,description:"The database that the entity belongs to.",parent:XS},eC={type:n.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:n.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},tC={like:!1,inferred:!1,id:"c1930577-9e79-48a6-8905-be24611015c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:eC},nC={type:n.GenericReference,id:"animal-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970"},rC={primary:!0,hidden:!1,required:!0,type:n.Property,id:"5cb617b0-92be-4dbe-a007-49093368d94f",version:1,name:"Name",description:"The name of the animal",implements:null,static:!1,private:!1,index:0,dataType:tC,abstract:!1,parent:nC},iC={type:n.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:n.Project,entityId:W},aC={type:n.CustomEntity,id:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",version:1,name:"Animal",description:"A living creature that is not human",abstract:!1,static:!1,abstractMethods:[],properties:[QS,rC],methods:[],extends:[],implements:[vt],x:0,y:0,parent:iC},da="base-table-entity",sC="base-table-entity-identifier-property-id";n.GenericReference,n.DataType,n.GenericReference,n.Property;const oC={id:"base-table-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"base-table-entity-identifier-property-data-type-id",entityType:n.DataType},lC={id:"base-table-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-identifier-property-id",entityType:n.Property},cC={like:!1,inferred:!1,id:"base-table-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:za,asType:!1,defaultValue:{parentRelationType:null,id:"base-table-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.UUID,value:null,parent:oC,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:lC},dC={id:"base-table-entity-identifier-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},uC={primary:!0,hidden:!1,required:!0,id:sC,name:"Identifier",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:cC,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:dC};n.GenericReference,n.DataType;const pC={id:"base-table-entity-deleted-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-deleted-at-property-id",entityType:n.Property},yC={like:!1,inferred:!1,id:"base-table-entity-deleted-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:fn,asType:!1,defaultValue:null,parent:pC},hC={id:"base-table-entity-deleted-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},fC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-deleted-at-property-id",name:"Deleted at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:yC,description:"The date and time when the entity was deleted.",parent:hC};n.GenericReference,n.DataType;const mC={id:"base-table-entity-created-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-created-at-property-id",entityType:n.Property},TC={like:!1,inferred:!1,id:"base-table-entity-created-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:fn,asType:!1,defaultValue:null,parent:mC},EC={id:"base-table-entity-created-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},bC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-created-at-property-id",name:"Created at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:TC,description:"The date and time when the entity was created.",parent:EC};n.GenericReference,n.DataType;const RC={id:"base-table-entity-updated-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-updated-at-property-id",entityType:n.Property},gC={like:!1,inferred:!1,id:"base-table-entity-updated-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:fn,asType:!1,defaultValue:null,parent:RC},vC={id:"base-table-entity-updated-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},IC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-updated-at-property-id",name:"Updated at",version:1,type:n.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,dataType:gC,description:"The date and time when the entity was last updated.",parent:vC},DC={id:"base-table-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},Bt={id:da,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:"A handy base entity for all entities that are stored in the database.",type:n.CustomEntity,abstract:!0,static:!1,abstractMethods:[],implements:[vt],properties:[uC,fC,bC,IC],methods:[],extends:[],x:0,y:0,parent:DC},PC={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-data-type-id",entityType:n.DataType},AC={id:"default-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:n.Property},OC={like:!1,inferred:!1,id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"main",parent:PC,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:AC},li={id:"default-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},SC={primary:!0,hidden:!1,required:!0,id:"default-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:0,dataType:OC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:li};n.GenericReference,n.DataType;const CC={id:"default-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:n.Property},BC={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-data-type-id",entityType:n.DataType},wC={like:!1,inferred:!1,id:"default-relational-database-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-username-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"root",parent:BC,autogeneration:null,valueAsType:null},parent:CC},_C={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:1,dataType:wC,description:"The username that will be used to connect to the database.",parent:li};n.GenericReference,n.DataType;const NC={id:"default-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:n.Property},MC={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-data-type-id",entityType:n.DataType},VC={like:!1,inferred:!1,id:"default-relational-database-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-password-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"password",parent:MC,autogeneration:null,valueAsType:null},parent:NC},LC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:hs,static:!0,index:2,dataType:VC,description:"The password that will be used to connect to the database.",parent:li},GC={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-min-size-property-data-type-id",entityType:n.DataType},$C={id:"default-relational-database-entity-min-size-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:n.Property},FC={like:!1,inferred:!1,id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:GC,autogeneration:null,valueAsType:null},parent:$C},UC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!1,implements:fs,static:!0,index:3,dataType:FC,description:"The minimum size of the database in GB.",parent:li},xC={id:"default-relational-database-entity-default-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-data-type-id",entityType:n.DataType},jC={id:"default-relational-database-entity-default-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:n.Property},kC={like:!1,inferred:!1,id:"default-relational-database-entity-default-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-default-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!0,parent:xC,autogeneration:null,valueAsType:null},parent:jC},qC={primary:!1,hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:n.Property,private:!1,abstract:!1,implements:kl,static:!0,index:4,dataType:kC,description:"Whether this database is automatically picked by other entities as the default database.",parent:li},JC={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-data-type-id",entityType:n.DataType},WC={id:"default-relational-database-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:n.Property},YC={like:!1,inferred:!1,id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!0,parent:JC,autogeneration:null,valueAsType:null},parent:WC},HC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-autoscaling-property-id",name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!1,implements:ql,static:!0,index:5,dataType:YC,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:li},zC={id:"default-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},mc={id:"default-relational-database-entity-id",type:n.CustomEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[qC,HC,SC,_C,LC,UC],methods:[],abstractMethods:[],extends:[],implements:[En],x:0,y:0,parent:zC},ZC={id:"user-prototype-database-property-data-type-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:n.DataType},KC={id:"user-prototype-database-property-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-id",entityType:n.Property},XC={like:!1,inferred:!1,id:"user-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"user-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:mc,autogeneration:null,parent:ZC},parent:KC},QC={id:"user-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},eB={primary:!1,hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:XC,description:"The database that the entity belongs to.",parent:QC},tB={type:n.GenericReference,id:"user-prototype-parent-ref-id",entityType:n.Project,entityId:W},Tc={type:n.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[Bt],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[eB],methods:[],x:0,y:0,parent:tB},nB={type:n.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:n.Property,entityId:"person-date-of-birth-property-id"},rB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:fn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:nB},iB={type:n.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},aB={primary:!1,hidden:!1,required:!0,type:n.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,dataType:rB,abstract:!1,parent:iB},sB={type:n.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:n.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},oB={like:!1,inferred:!1,id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:sB},lB={type:n.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},cB={primary:!1,hidden:!1,required:!0,type:n.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,dataType:oB,abstract:!1,parent:lB},dB={type:n.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:n.Project,entityId:W},yt={type:n.CustomEntity,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:[cB,aB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[Tc],x:0,y:0,parent:dB},uB={type:n.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},pB={type:n.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:n.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},yB={type:n.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},hB={type:n.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:n.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},fB={like:!1,inferred:!1,id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hB},Ec={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:n.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:fB,implements:null,readsValue:yB,required:!0,index:0,parent:pB},mB={type:n.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},TB={type:n.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},cR={type:n.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Ec],calledByError:[],calledByEntry:[mB],calledBySuccess:[],throws:null,x:0,y:0,parent:TB},EB={type:n.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},bB={like:!1,inferred:!1,id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EB},dR={id:"500dee3a-3435-4453-9699-0d053f646523",type:n.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:bB,implements:null,required:!0,writesValues:[Ec],index:0,parent:uB},RB={type:n.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},uR={type:n.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[dR],calls:[cR],returnStatements:[cR],index:0,collapsed:!1,private:!1,x:0,y:0,parent:RB},gB={type:n.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:n.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},vB={like:!1,inferred:!1,id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:gB},IB={type:n.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:n.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},DB={type:n.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},PB={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:n.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:vB,readsValue:IB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:DB},AB={type:n.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},OB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:n.OutputMap,version:1,declaration:Ec,writesValues:[PB],index:0,parent:AB},SB={type:n.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},CB={type:n.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},BB={type:n.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},wB={like:!1,inferred:!1,id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:BB},_B={type:n.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},NB={type:n.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},MB={type:n.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},VB={type:n.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},pR={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:n.InputMap,version:1,declaration:dR,name:null,description:null,readsValue:VB,defaultValue:null,index:0,parent:MB},LB={type:n.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:wB,readsValue:_B,writesValues:[pR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:NB},GB={type:n.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:uR,inputs:[pR],outputs:[OB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[SB],calledBySuccess:[],parent:CB,error:null,x:0,y:0},$B={type:n.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},FB={like:!1,inferred:!1,id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:$B},UB={type:n.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},xB={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:n.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:FB,implements:null,required:!0,index:0,writesValues:[LB],parent:UB},jB={type:n.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},kB={type:n.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[xB],collapsed:!0,returnStatements:[],calls:[GB],private:!1,index:0,implements:null,x:0,y:0,parent:jB},qB={type:n.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:n.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},JB={like:!1,inferred:!1,id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qB},WB={type:n.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},YB={primary:!1,hidden:!1,required:!0,type:n.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,implements:null,static:!1,index:0,dataType:JB,abstract:!1,parent:WB},HB={type:n.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:n.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},zB={like:!1,inferred:!1,id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:HB},ZB={type:n.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},KB={primary:!1,hidden:!1,required:!0,type:n.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:zB,implements:null,static:!1,private:!0,abstract:!1,parent:ZB},XB={type:n.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:n.Project,entityId:W},ci={type:n.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[YB,KB],methods:[uR,kB],extends:[],implements:[Bt],x:0,y:0,parent:XB},ua="bitcoin-api-response-id",yR="time-property-id",hR="disclaimer-property-id",fR="chart-name-property-id",mR="bpi-property-id",ks="bpi-entity-id",TR="usd-property-id",ER="gbp-property-id",bR="eur-property-id",di="currency-entity-id",RR="currency-code-property-id",gR="currency-symbol-property-id",vR="currency-rate-property-id",IR="currency-description-property-id",DR="currency-rate-number-property-id",QB={type:n.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:n.Property,entityId:RR},ew={like:!1,inferred:!1,id:"code-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:QB},tw={type:n.GenericReference,id:"code-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},nw={primary:!0,hidden:!1,required:!0,type:n.Property,id:RR,version:1,name:"code",description:null,dataType:ew,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:tw},rw={type:n.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:n.Property,entityId:gR},iw={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["$","£","€"],constant:!1,parent:rw},aw={type:n.GenericReference,id:"symbol-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},sw={primary:!1,hidden:!1,required:!0,type:n.Property,id:gR,version:1,name:"symbol",description:null,index:0,dataType:iw,implements:null,static:!1,private:!1,abstract:!1,parent:aw},ow={type:n.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:n.Property,entityId:vR},lw={like:!1,inferred:!1,id:"rate-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ow},cw={type:n.GenericReference,id:"rate-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},dw={primary:!1,hidden:!1,required:!0,type:n.Property,id:vR,version:1,name:"rate",description:null,index:0,dataType:lw,implements:null,static:!1,private:!1,abstract:!1,parent:cw},uw={type:n.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:n.Property,entityId:IR},pw={like:!1,inferred:!1,id:"description-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:uw},yw={type:n.GenericReference,id:"description-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},hw={primary:!1,hidden:!1,required:!0,type:n.Property,id:IR,version:1,name:"description",description:null,dataType:pw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:yw},fw={type:n.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:n.Property,entityId:DR},mw={like:!1,inferred:!1,id:"rate-number-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:fw},Tw={type:n.GenericReference,id:"rate-number-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},Ew={primary:!1,hidden:!1,required:!0,type:n.Property,id:DR,version:1,name:"rate_float",description:null,dataType:mw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Tw},bw={type:n.GenericReference,id:"currency-prototype-parent-ref-id",entityType:n.Project,entityId:W},qs={type:n.CustomEntity,id:di,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[nw,sw,dw,hw,Ew],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:bw},Rw={type:n.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:n.Property,entityId:TR},gw={like:!1,inferred:!1,id:"usd-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Rw},vw={type:n.GenericReference,id:"usd-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},Iw={primary:!1,hidden:!1,required:!0,id:TR,type:n.Property,version:1,name:"USD",description:null,index:0,dataType:gw,implements:null,static:!1,private:!1,abstract:!1,parent:vw},Dw={type:n.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:n.Property,entityId:ER},Pw={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Dw},Aw={type:n.GenericReference,id:"gbp-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},Ow={primary:!1,hidden:!1,required:!0,id:ER,type:n.Property,version:1,name:"GBP",description:null,index:0,dataType:Pw,implements:null,static:!1,private:!1,abstract:!1,parent:Aw},Sw={type:n.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:n.Property,entityId:bR},Cw={like:!1,inferred:!1,id:"eur-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Sw},Bw={type:n.GenericReference,id:"eur-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},ww={primary:!1,hidden:!1,required:!0,id:bR,type:n.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:Cw,private:!1,abstract:!1,parent:Bw},_w={type:n.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:n.Project,entityId:W},PR={type:n.CustomEntity,id:ks,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[Iw,Ow,ww],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:_w},Nw={type:n.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:n.Property,entityId:yR},Mw={like:!1,inferred:!1,id:"time-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Li,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Nw},Vw={type:n.GenericReference,id:"time-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Lw={primary:!1,hidden:!1,required:!0,type:n.Property,id:yR,version:1,name:"time",description:null,index:0,dataType:Mw,implements:null,static:!1,private:!1,abstract:!1,parent:Vw},Gw={type:n.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:n.Property,entityId:hR},$w={like:!1,inferred:!1,id:"disclaimer-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gw},Fw={type:n.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Uw={primary:!1,hidden:!1,required:!0,type:n.Property,id:hR,version:1,name:"disclaimer",description:null,index:0,dataType:$w,implements:null,static:!1,private:!1,abstract:!1,parent:Fw},xw={type:n.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:n.Property,entityId:fR},jw={like:!1,inferred:!1,id:"chart-name-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xw},kw={type:n.GenericReference,id:"chart-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},qw={primary:!1,hidden:!1,required:!0,type:n.Property,id:fR,version:1,name:"chartName",description:null,index:0,dataType:jw,implements:null,static:!1,private:!1,abstract:!1,parent:kw},Jw={type:n.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:n.Property,entityId:mR},Ww={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:PR,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Jw},Yw={type:n.GenericReference,id:"bpi-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Hw={primary:!0,hidden:!1,required:!0,type:n.Property,id:mR,version:1,name:"bpi",description:null,implements:null,index:0,dataType:Ww,static:!1,private:!1,abstract:!1,parent:Yw},zw={type:n.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:n.Project,entityId:W},AR={type:n.CustomEntity,id:ua,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[Lw,Uw,qw,Hw],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:zw},Zw={type:n.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Kw={like:!1,inferred:!1,id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Zw},Xw={type:n.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:n.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},Qw={type:n.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:n.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},e_={like:!1,inferred:!1,id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Qw},t_={type:n.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},OR={isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",implements:null,dataType:e_,readsValue:t_,required:!0,index:0,parent:Xw},n_={type:n.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},r_={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:n.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,dataType:Kw,writesValues:[OR],required:!0,index:0,parent:n_},i_={type:n.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},a_={type:n.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},s_={type:n.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},SR={type:n.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[OR],calledByError:[],calledByEntry:[a_],calledBySuccess:[],throws:null,x:0,y:0,parent:s_},o_={type:n.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:[r_],calls:[SR],index:0,collapsed:!1,implements:null,returnStatements:[SR],private:!1,x:0,y:0,parent:i_},l_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},c_={type:n.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},d_={type:n.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:n.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},u_={type:n.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},p_={type:n.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:n.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},y_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:p_},bc={isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:n.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",dataType:y_,implements:null,readsValue:u_,required:!0,index:0,parent:d_},h_={type:n.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Rc={type:n.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[bc],calledByError:[],calledByEntry:[],calledBySuccess:[l_,h_],throws:null,x:0,y:0,parent:c_},f_={type:n.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},m_={type:n.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},CR={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:gl,name:null,description:null,readsValue:m_,defaultValue:null,parent:f_,index:2},T_={type:n.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},E_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:T_},b_={type:n.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},R_={type:n.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:n.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},g_={type:n.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:n.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},BR={type:n.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",dataType:E_,readsValue:R_,writesValues:[bc],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[g_],successCalls:[Rc],errorCalls:[],internalCalls:[],x:0,y:0,parent:b_},v_={type:n.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:n.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},I_={type:n.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},D_={type:n.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:ts,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"gov-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:I.String,valueAsType:null,parent:v_,autogeneration:null},index:1,parent:I_},P_={type:n.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},A_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:n.OutputMap,version:1,declaration:ss,index:2,writesValues:[BR],parent:P_},O_={type:n.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},S_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:n.InputMap,version:1,declaration:es,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:O_},C_={type:n.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},B_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:n.InputMap,version:1,name:null,description:null,declaration:ns,index:3,readsValue:null,defaultValue:null,parent:C_},w_={type:n.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},__={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:n.InputMap,version:1,declaration:rs,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:w_},N_={type:n.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},M_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:n.OutputMap,version:1,declaration:as,index:1,writesValues:[],parent:N_},V_={type:n.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},L_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:n.OutputMap,version:1,declaration:is,index:0,writesValues:[],parent:V_},G_={type:n.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},$_={type:n.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},F_={type:n.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},U_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},x_={type:n.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:n.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},j_={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:x_},k_={type:n.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:n.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},wR={isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:n.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:j_,implements:null,required:!0,readsValue:null,index:0,parent:k_},q_={type:n.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[U_],throws:wR,x:0,y:0,parent:F_},J_={type:n.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},W_={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:n.OutputMap,declaration:vl,version:1,writesValues:[wR],index:0,parentRelationType:Yr.Error,parent:J_},Y_={type:n.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Fi,inputs:[S_,D_,CR,B_,__],outputs:[L_,M_,A_],process:null,calledByError:[],calledByEntry:[G_],calledBySuccess:[],successCalls:[Rc,BR],errorCalls:[q_],error:W_,x:0,y:0,parent:$_},H_={type:n.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:n.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},z_={type:n.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},Z_={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"base-query-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"?name=",name:I.String,parent:H_,valueAsType:null,autogeneration:null},index:0,parent:z_},K_={type:n.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},X_={type:n.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},Q_={type:n.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},eN={like:!1,inferred:!1,id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Q_},tN={type:n.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:n.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},nN={type:n.GenericReference,id:"assembled-query-string-called-by-ref",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},_R={type:n.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",dataType:eN,readsValue:tN,writesValues:[CR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[nN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:X_},rN={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:n.OutputMap,version:1,writesValues:[_R],declaration:Gi,index:0,parent:K_},iN={type:n.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},aN={type:n.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},sN={type:n.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:n.ArgumentDeclaration},oN={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},NR={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:sN,defaultValue:null,index:1,parent:oN},lN={type:n.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:$i,version:1,inputs:[NR,Z_],outputs:[rN],process:null,calledByError:[],calledByEntry:[iN],calledBySuccess:[],successCalls:[_R],errorCalls:[],error:null,x:0,y:0,parent:aN},cN={type:n.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:n.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},dN={like:!1,inferred:!1,id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:cN},uN={type:n.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},MR={id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:n.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:dN,implements:null,required:!1,writesValues:[NR],index:0,parent:uN},pN={type:n.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:n.Project,entityId:W},VR={type:n.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:[MR],calls:[lN,Y_],returnStatements:[Rc],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:pN},yN={type:n.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},hN={type:n.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},fN={type:n.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},mN={type:n.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},LR={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:n.InputMap,declaration:MR,name:null,description:null,readsValue:fN,defaultValue:null,index:0,parent:mN},TN={type:n.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},EN={type:n.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:n.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},bN={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EN},RN={type:n.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:n.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},gN={type:n.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},vN={type:n.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},GR={type:n.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:bN,readsValue:RN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[vN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:gN},IN={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.OutputMap,version:1,declaration:bc,writesValues:[GR],index:0,parent:TN},DN={type:n.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:VR,inputs:[LR],outputs:[IN],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[yN],successCalls:[GR],errorCalls:[],error:null,x:0,y:0,parent:hN},PN={type:n.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},AN={type:n.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},ON={type:n.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},SN={type:n.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},$R={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:n.InputMap,declaration:dr.inputs[0],name:null,description:null,readsValue:ON,defaultValue:null,index:0,parent:SN},CN={type:n.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:dr,inputs:[$R],calledByError:[],calledByEntry:[PN],calledBySuccess:[],successCalls:[DN],errorCalls:[],x:0,y:0,parent:AN},BN={type:n.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},wN={type:n.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:n.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},_N={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:wN},NN={type:n.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},MN={type:n.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},VN={type:n.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},FR={type:n.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",dataType:_N,readsValue:MN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[VN],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:NN},LN={type:n.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},GN={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:LN},$N={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:n.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:GN,implements:null,required:!0,index:1,writesValues:[FR],parent:BN},FN={type:n.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},UN={type:n.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},xN={type:n.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},jN={like:!1,inferred:!1,id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xN},kN={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:n.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:jN,implements:null,required:!0,index:0,writesValues:[$R,LR],parent:UN},qN={type:n.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:[kN,$N],calls:[CN,FR],index:1,private:!1,implements:null,x:0,y:0,parent:FN},JN={type:n.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},WN={type:n.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-manager-property-id"},YN={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:JN,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:WN},HN={type:n.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},zN={primary:!1,hidden:!1,required:!0,type:n.Property,id:"employee-manager-property-id",version:1,name:"Manager",description:"The manager of the employee",index:0,implements:null,private:!1,static:!1,dataType:YN,abstract:!1,parent:HN},ZN={type:n.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-start-date-property-id"},KN={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:fn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:ZN},XN={type:n.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},QN={primary:!1,hidden:!1,required:!0,type:n.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,implements:null,dataType:KN,abstract:!1,parent:XN},eM={type:n.GenericReference,id:"employee-department-property-ref-id",entityType:n.Property,entityId:"employee-department-property-id"},tM={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:eM},nM={type:n.GenericReference,id:"employee-department-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},rM={primary:!1,hidden:!1,required:!0,type:n.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,implements:null,static:!1,private:!1,dataType:tM,abstract:!1,parent:nM},iM={type:n.GenericReference,id:"employee-prototype-parent-ref-id",entityType:n.Project,entityId:W},$t={type:n.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[rM,QN,zN],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[yt],x:0,y:0,parent:iM},aM={type:n.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:n.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},sM={like:!1,inferred:!1,id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:aM},oM={type:n.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},lM={primary:!1,hidden:!1,required:!0,type:n.Property,id:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd",version:1,name:"Company Name",private:!1,static:!1,description:"The name of the company",index:0,implements:null,dataType:sM,abstract:!1,parent:oM},cM={type:n.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:n.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},dM={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:cM},uM={type:n.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},gc={primary:!1,hidden:!1,required:!0,type:n.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,dataType:dM,abstract:!1,parent:uM},pM={type:n.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:n.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},yM={like:!1,inferred:!1,id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:yt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pM},hM={type:n.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},fM={primary:!1,hidden:!1,required:!0,type:n.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,dataType:yM,private:!0,abstract:!1,parent:hM},mM={type:n.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:n.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},TM={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:mM},EM={type:n.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bM={primary:!1,hidden:!1,required:!0,type:n.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:TM,implements:null,private:!0,static:!1,abstract:!1,parent:EM},RM={type:n.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:n.Project,entityId:W},Ft={type:n.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[lM,gc,fM,bM],static:!1,abstract:!1,abstractMethods:[],methods:[o_,qN],extends:[],implements:[Bt],x:0,y:0,parent:RM},gM={type:n.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:n.Project,entityId:W},vc={type:n.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:gM};n.GenericReference,n.DataType;const vM={id:"cron-job-entity-expression-property-ref-id",type:n.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:n.Property},IM={like:!1,inferred:!1,id:"cron-job-entity-expression-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:vM},DM={id:"cron-job-entity-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},PM={primary:!1,hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:n.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",dataType:IM,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:DM},AM={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:n.GenericReference,entityId:"show-popup-func-decl-id",entityType:n.FunctionDeclaration},OM={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:n.FunctionDeclaration},SM={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:n.FunctionCall,declaration:vc,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[AM],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:OM},CM={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},BM={id:"cron-job-entity-trigger-func-decl-id",version:1,type:n.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:Wl,calls:[SM],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:CM},wM={id:"cron-job-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},_M={id:"cron-job-entity-id",version:1,type:n.CustomEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[PM],static:!0,abstract:!1,abstractMethods:[],extends:[Yl],implements:[],methods:[BM],x:0,y:0,parent:wM},NM={type:n.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:n.Project,entityId:W},MM={type:n.CustomEntity,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:[us],x:0,y:0,parent:NM},UR="f558fbf8-67de-4545-9804-6ae621e0b2d4",VM={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},LM={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},GM={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:VM,autogeneration:null,valueAsType:null},parent:LM},$M={id:"getCompanyByIdEndpointReachedEntityEventRef",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},FM={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},UM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},xM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:FM,autogeneration:null,valueAsType:null},parent:UM},jM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request headers",dataType:xM,implements:Vl,required:!0,index:0,parent:$M},kM={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},qM={id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:n.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:[],dataType:GM,implements:Ll,required:!0,index:1,parent:kM},JM={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},WM={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},YM={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},HM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:x,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:WM,autogeneration:null,valueAsType:null},parent:YM},zM={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:n.ArgumentDeclaration,writesValues:[],name:"Request query params",dataType:HM,implements:Gl,required:!0,index:2,parent:JM},ZM={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},KM={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},XM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:KM},QM={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:XM,implements:$l,index:3,required:!0,parent:ZM},eV={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},tV={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:eV},nV={id:"getCompanyByIdEndpointReturnStatementRef",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},rV={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:n.ReturnDeclaration,name:"Response code",dataType:tV,implements:Fl,readsValue:null,required:!0,index:0,parent:nV},iV={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},aV={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},sV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:iV,autogeneration:null,valueAsType:null},parent:aV},oV={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},lV={isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:n.ReturnDeclaration,name:"Response headers",dataType:sV,implements:Ul,readsValue:null,required:!0,index:1,parent:oV},cV={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},dV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:cV},uV={id:"getCompanyByIdEndpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},pV={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ReturnDeclaration,name:"Response body",implements:xl,dataType:dV,readsValue:null,required:!0,index:2,parent:uV},yV={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:n.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:n.FunctionDeclaration},hV={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},fV={id:"getCompanyByIdEndpointReturnStatement",type:n.ReturnStatement,version:1,outputs:[rV,lV,pV],calledByError:[],calledByEntry:[yV],calledBySuccess:[],throws:null,x:0,y:0,parent:hV},mV={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:UR},TV={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:n.FunctionDeclaration,inputs:[jM,qM,zM,QM],returnStatements:[fV],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:jl,index:0,private:!1,x:0,y:0,parent:mV},EV={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},bV={id:"getCompanyByIdEndpointPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointPathProperty"},RV={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.String,value:"/company/{id}",parent:EV,valueAsType:null,autogeneration:null},parent:bV},gV={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},vV={primary:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Nl,dataType:RV,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:gV},IV={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},DV={id:"getCompanyByIdEndpointMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointMethodProperty"},PV={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ln,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,parent:IV,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:DV},AV={id:"getCompanyByIdEndpointBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},OV={primary:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Ml,index:0,dataType:PV,description:null,parent:AV},SV={type:n.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:n.Project,entityId:W},CV={type:n.CustomEntity,id:UR,version:1,name:"Get given company data by id",description:null,properties:[vV,OV],methods:[TV],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[us],x:0,y:0,parent:SV},BV={id:"plant-prototype-database-property-ref-id",type:n.GenericReference,entityId:"plant-prototype-database-property-id",entityType:n.Property},wV={id:"plant-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"plant-prototype-database-property-data-type-default-value-id",entityType:n.DataType},_V={like:!1,inferred:!1,id:"plant-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"plant-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:fc,autogeneration:null,parent:wV},parent:BV},NV={id:"plant-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"plant-entity-id",entityType:n.CustomEntity},MV={primary:!1,hidden:!1,required:!0,id:"plant-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:_V,description:"The database that the entity belongs to.",parent:NV},VV={type:n.GenericReference,id:"plant-name-property-ref-id",entityType:n.Property,entityId:"plant-name-property-id"},LV={like:!1,inferred:!1,id:"plant-name-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VV},GV={type:n.GenericReference,id:"animal-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:"plant-entity-id"},$V={primary:!1,hidden:!1,required:!0,type:n.Property,id:"plant-name-property-id",version:1,name:"Name",description:"The name of the plant",implements:null,static:!1,private:!1,index:0,dataType:LV,abstract:!1,parent:GV},FV={type:n.GenericReference,id:"plant-prototype-parent-ref-id",entityType:n.Project,entityId:W},UV={type:n.CustomEntity,id:"plant-entity-id",version:1,name:"Plant",description:"A living creature that is not an animal",abstract:!1,static:!1,abstractMethods:[],properties:[MV,$V],methods:[],extends:[],implements:[vt],x:0,y:0,parent:FV},xV={id:"product-prototype-database-property-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-id",entityType:n.Property},jV={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-data-type-default-value-id",entityType:n.DataType},kV={like:!1,inferred:!1,id:"product-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"product-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:mc,autogeneration:null,parent:jV},parent:xV},qV={id:"product-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},JV={primary:!1,hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:kV,description:"The database that the entity belongs to.",parent:qV},WV={type:n.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:n.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},YV={like:!1,inferred:!1,id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WV},HV={type:n.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:n.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},zV={primary:!1,hidden:!1,required:!0,type:n.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,dataType:YV,abstract:!1,parent:HV},ZV={type:n.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:n.Project,entityId:W},KV={type:n.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[Bt],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[JV,zV],methods:[],x:0,y:0,parent:ZV},pa="project-loaded-event-id",an="get-bitcoin-price-http-call-operation-id",xR="get-bitcoin-price-http-call-response-body-id",Js="validate-bitcoin-price-response-operation-ids",XV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:xR},QV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:n.Operation,entityId:Js},jR={id:"validate-bitcoin-data-to-validate-input-map-id",type:n.InputMap,version:1,declaration:ir.inputs[1],name:null,description:null,readsValue:XV,defaultValue:null,index:0,parent:QV},e1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},t1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:n.Operation,entityId:Js},n1={id:"validate-bitcoin-type-to-match-input-map-id",type:n.InputMap,version:1,declaration:ir.inputs[0],name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:n.PrimitiveValue,version:1,name:I.EntityTemplate,valueAsType:AR,value:null,parent:e1,autogeneration:null},index:0,parent:t1},r1={type:n.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:n.Operation,entityId:Js},i1={id:"validate-bitcoin-validated-entity-output-map-id",type:n.OutputMap,version:1,declaration:ir.outputs[0],writesValues:[],index:0,parent:r1},a1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:n.GlobalEvent,entityId:pa},s1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:n.Operation,entityId:an},o1={type:n.Operation,id:Js,version:1,declaration:ir,inputs:[n1,jR],outputs:[i1],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[s1],parent:a1},l1={type:n.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:n.FunctionCall,entityId:an},c1={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:n.InputMap,declaration:es,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:l1},d1={type:n.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:n.FunctionCall,entityId:an},u1={type:n.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:n.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},p1={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:n.InputMap,declaration:ts,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:I.String,parent:u1,valueAsType:null,autogeneration:null},index:1,parent:d1},y1={type:n.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:n.FunctionCall,entityId:an},h1={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:n.InputMap,declaration:ns,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:y1},f1={type:n.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:n.FunctionCall,entityId:an},m1={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:n.InputMap,declaration:rs,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:f1},T1={type:n.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:n.FunctionCall,entityId:an},E1={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:n.OutputMap,declaration:as,writesValues:[],index:1,parent:T1},b1={type:n.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:n.FunctionCall,entityId:an},R1={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:n.OutputMap,declaration:is,writesValues:[],index:0,parent:b1},g1={type:n.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:n.FunctionCall,entityId:an},v1={id:xR,type:n.OutputMap,version:1,declaration:ss,writesValues:[jR],index:2,parent:g1},I1={type:n.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:n.FunctionDeclaration,entityId:an},D1={type:n.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:n.GlobalEvent,entityId:pa},P1={type:n.Operation,id:an,version:1,declaration:Fi,inputs:[c1,p1,h1,m1],outputs:[R1,E1,v1],process:null,parent:D1,calledByError:[],calledByEntry:[I1],calledBySuccess:[],successCalls:[o1],errorCalls:[],error:null,x:0,y:0},A1={type:n.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:n.GlobalEvent,entityId:pa},O1={type:n.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:n.GlobalEvent,entityId:pa},S1={process:null,type:n.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:vc,inputs:[],outputs:[],calledByError:[],calledByEntry:[A1],calledBySuccess:[],parent:O1,successCalls:[],errorCalls:[],error:null,x:0,y:0},C1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:n.GenericReference,entityType:n.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},B1={type:n.GlobalEvent,id:pa,version:1,name:yn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:ms,parent:C1,inputs:[],calls:[S1,P1],x:0,y:0},Ut="abort-execution-func-declaration-id",ya="abort-execution-func-exec-var-declaration-id",Ws="abort-execution-func-small-wait-op-id",Ic="abort-execution-func-long-wait-op-id",kR="abort-execution-func-long-wait-process-output-id",qR="abort-execution-func-exec-var-instance-write-id",JR="abort-execution-func-long-wait-return-stmt-id",WR="abort-execution-func-small-wait-return-stmt-id",w1="abort-execution-func-exec-var-instance-abort-call-id",Dc="abort-execution-func-exec-var-instance-abort-internal-call-id",YR="abort-execution-func-exec-second-wait-op-id",_1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},N1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:n.DataType,entityId:"short-wait-return-statement-returned-hello-string-data-type-id"},M1={like:!1,inferred:!1,id:"short-wait-return-statement-returned-hello-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:{parentRelationType:null,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:N1},constant:!1,parent:_1},V1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:WR},L1={isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:n.ReturnDeclaration,version:1,name:"Return 1",description:"A random string that is returned by the function",dataType:M1,implements:null,readsValue:null,required:!0,index:0,parent:V1},G1={type:n.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Ws},$1={type:n.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},HR={type:n.ReturnStatement,id:WR,version:1,outputs:[L1],calledByError:[],calledByEntry:[],calledBySuccess:[G1],throws:null,x:0,y:0,parent:$1},F1={type:n.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"second-wait-argument-map-id"},U1={type:n.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:YR},x1={id:"second-wait-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"second-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:I.Number,parent:F1},index:0,parent:U1},j1={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},k1={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.InternalCall,entityId:Dc},q1={id:YR,type:n.Operation,version:1,declaration:ut,inputs:[x1],outputs:[],process:null,successCalls:[HR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[k1],error:null,parent:j1},J1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:n.VariableInstance,entityId:qR},W1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:n.Operation,entityId:Ws},Y1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},H1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ya},z1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:n.InternalCall,entityId:Dc},Z1={id:w1,type:n.VariableInstance,version:1,declaration:H1,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[z1],parent:Y1},zR={id:Dc,type:n.InternalCall,version:1,inputs:[],outputs:[],declaration:Hl,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[J1,W1],successCalls:[q1],errorCalls:[],error:null,index:0,parent:Z1},K1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},X1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:ya},Q1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:Ut},e0={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ya},t0={type:n.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:n.OutputMap,entityId:kR},Pc={id:qR,type:n.VariableInstance,version:1,declaration:e0,inputs:[],outputs:[],calledByError:[],calledByEntry:[Q1],calledBySuccess:[X1],successCalls:[zR],errorCalls:[],x:0,y:0,readsValue:t0,writesValues:[],internalCalls:[],parent:K1},n0={type:n.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:ya};n.GenericReference,n.DataType;const r0={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:zl,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:n0,defaultValue:null},i0={type:n.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},a0={type:n.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},s0={id:ya,type:n.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:r0,inputs:[],outputs:[],calledByError:[],calledByEntry:[a0],calledBySuccess:[],successCalls:[Pc],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:i0},o0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},l0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:n.DataType,entityId:"long-wait-return-statement-returned-hello-string-data-type-id"},c0={like:!1,inferred:!1,id:"long-wait-return-statement-returned-hello-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:{parentRelationType:null,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:l0},constant:!1,parent:o0},d0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:JR},u0={isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:n.ReturnDeclaration,version:1,name:"Return 2",description:"A random string that is returned by the function",implements:null,dataType:c0,readsValue:null,required:!0,index:0,parent:d0},p0={type:n.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Ic},y0={type:n.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},ZR={type:n.ReturnStatement,id:JR,version:1,outputs:[u0],calledByError:[],calledByEntry:[],calledBySuccess:[p0],throws:null,x:0,y:0,parent:y0},h0={type:n.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"long-argument-map-id"},KR={type:n.GenericReference,id:"long-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ic},f0={id:"long-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"long-argument-default-value-id",type:n.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:I.Number,parent:h0},index:0,parent:KR},m0={type:n.GenericReference,id:"long-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},T0={type:n.GenericReference,id:"long-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},E0={id:kR,type:n.OutputMap,version:1,declaration:Kl,writesValues:[Pc],index:0,parent:KR},b0={id:Ic,type:n.Operation,version:1,declaration:ut,inputs:[f0],outputs:[],process:E0,successCalls:[ZR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[T0],calledBySuccess:[],error:null,parent:m0},R0={type:n.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"small-wait-argument-map-id"},g0={type:n.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ws},v0={id:"small-wait-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"small-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:I.Number,parent:R0},index:0,parent:g0},I0={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},D0={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},P0={id:Ws,type:n.Operation,version:1,declaration:ut,inputs:[v0],outputs:[],process:null,successCalls:[zR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[D0],calledBySuccess:[],error:null,parent:I0},A0={type:n.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:n.Project,entityId:W},XR={id:"abort-execution-func-decl-id",type:n.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[ZR,HR],calls:[P0,s0,Pc,b0],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:A0},O0={type:n.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:n.Project,entityId:W},S0={id:"call-execution-abort-func-id",type:n.FunctionCall,version:1,declaration:XR,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:O0},Ac="manual-hello-world-loop-func-decl-id",QR="manual-hello-world-loop-func-return-statement-id",sn="manual-hello-world-loop-id",ha="manual-hello-world-loop-body-id",Oc="manual-hello-world-loop-break-statement-id",fa="manual-hello-world-loop-current-iteration-number-output-map-id",Sc="manual-hello-world-loop-previous-iterations-results-output-map-id",Cc="assembled-hello-world-text-output-id",eg="assembled-hello-world-list-output-id",ma="iteration-number-is-equal-or-greater-than-10-condition-id",Ys="join-hello-world-and-number-operation-id",Hs="append-string-to-list-operation-id",tg="hello-world-loop-output-map-id",C0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:n.ReturnStatement,entityId:QR},B0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:n.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},w0={like:!1,inferred:!1,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:B0},_0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:n.OutputMap,entityId:tg},ng={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:n.ReturnDeclaration,name:"Results",description:null,dataType:w0,implements:null,readsValue:_0,required:!0,index:0,parent:C0},N0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:n.Loop,entityId:sn},M0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:n.FunctionDeclaration,entityId:Ac},rg={type:n.ReturnStatement,id:QR,version:1,outputs:[ng],calledByError:[],calledByEntry:[],calledBySuccess:[N0],parent:M0,throws:null,x:0,y:0},V0={type:n.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:n.BreakStatement,entityId:Oc},L0={type:n.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Cc},ig={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,dataType:null,readsValue:L0,implements:null,required:!0,index:0,parent:V0},G0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:fa},$0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:n.BreakStatement,entityId:Oc},ag={isError:!1,id:"hello-world-loop-break-statement-counter-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration counter",description:null,implements:null,dataType:null,readsValue:G0,required:!0,index:1,parent:$0},F0={type:n.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:n.Condition,entityId:ma},U0={type:n.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:n.Loop,entityId:sn},sg={type:n.BreakStatement,id:Oc,version:1,outputs:[ig,ag],calledByError:[],calledByEntry:[],calledBySuccess:[F0],parent:U0,throws:null,x:0,y:0},x0={type:n.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:n.ContinueStatement,entityId:"hello-world-loop-continue-statement"},j0={type:n.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:n.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},k0={like:!1,inferred:!1,id:"hello-world-loop-continue-statement-output-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:j0},q0={type:n.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Cc},og={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,implements:null,dataType:k0,readsValue:q0,required:!0,index:0,parent:x0},J0={type:n.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:n.Condition,entityId:ma},W0={type:n.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:n.Loop,entityId:sn},lg={type:n.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[og],calledBySuccess:[],calledByError:[J0],calledByEntry:[],parent:W0,throws:null,x:0,y:0};n.GenericReference,n.InputMap;const Y0={type:n.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Hs},H0={type:n.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Sc},cg={id:"append-string-to-list-base-string-map-id",type:n.InputMap,version:1,declaration:fl,name:null,description:null,readsValue:H0,defaultValue:null,index:0,parent:Y0},z0={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Hs},Z0={id:eg,type:n.OutputMap,version:1,writesValues:[ig],declaration:Gi,index:0,parent:z0},K0={type:n.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:n.Condition,entityId:ma},X0={type:n.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:eg},Q0={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Hs},dg={id:"latest-string-to-add-input-map-id",version:1,type:n.InputMap,declaration:ml,name:null,description:null,readsValue:X0,defaultValue:null,index:1,parent:Q0},eL={type:n.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:n.FunctionDeclaration,entityId:sn},tL={type:n.Operation,id:Hs,declaration:Qa,version:1,inputs:[cg,dg],outputs:[Z0],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[K0],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:eL},nL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ha},rL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:n.Loop,entityId:sn},iL={type:n.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:fa},ug={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:n.Condition,entityId:ma},aL={id:"current-iteration-number-to-check-map-id",version:1,type:n.InputMap,declaration:ti.inputs[0],name:null,description:null,readsValue:iL,index:0,defaultValue:null,parent:ug},sL={type:n.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"max-num-iterations-value-map-id"},oL={id:"max-num-iterations-value-map-id",version:1,type:n.InputMap,declaration:ti.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{parentRelationType:null,id:"max-num-iterations-value-map-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:10,autogeneration:null,valueAsType:null,parent:sL},parent:ug},lL={type:n.Condition,id:ma,version:1,declaration:ti,inputs:[aL,oL],calledByError:[],calledByEntry:[nL],calledBySuccess:[],successCalls:[sg,tL],errorCalls:[lg],x:0,y:0,parent:rL},cL={type:n.GenericReference,id:"base-string-map-ref-id",entityType:n.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},dL={type:n.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},uL={id:"join-hello-world-and-number-base-string-map-id",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"join-hello-world-and-number-base-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"Hello world ",name:I.String,parent:cL,valueAsType:null,autogeneration:null},index:0,parent:dL},pL={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},yL={id:Cc,type:n.OutputMap,version:1,writesValues:[dg,og],declaration:Gi,index:0,parent:pL},hL={type:n.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ha},fL={type:n.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:fa},mL={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ys},pg={id:"current-iteration-number-input-map-id",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:fL,defaultValue:null,index:1,parent:mL},TL={type:n.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:n.FunctionDeclaration,entityId:sn},EL={type:n.Operation,id:Ys,declaration:$i,version:1,inputs:[uL,pg],outputs:[yL],process:null,calledByError:[],calledByEntry:[hL],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:TL},bL={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:Sc,entityType:n.ArgumentDeclaration},RL={like:!1,inferred:!1,id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:bL},gL={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionDeclaration},vL={id:Sc,type:n.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:RL,implements:null,writesValues:[cg],index:1,parent:gL},IL={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionDeclaration},DL={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:fa,entityType:n.ArgumentDeclaration};n.DataType;const PL={id:fa,type:n.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,implements:Dl,dataType:null,writesValues:[pg,ag],index:0,parent:IL},AL={id:"manual-flow-loop-body-parent-ref-id",type:n.GenericReference,entityId:sn,entityType:n.Loop},OL={id:ha,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[PL,vL],calls:[lL,EL],implements:Pl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:AL},SL={type:n.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:n.Loop,entityId:sn},yg={id:"hello-world-loop-iteration-result-inline-output-declaration-id",version:1,type:n.ValueDescriptor,name:"Iteration result",description:null,dataType:null,required:!0,index:0,parent:SL},CL={type:n.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:n.Loop,entityId:sn},BL={type:n.OutputMap,id:tg,version:1,declaration:yg,writesValues:[ng],index:0,parent:CL},wL={id:"manual-hello-world-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},_L={id:"manual-hello-world-loop-called-by-ref-id",type:n.GenericReference,entityId:Ac,entityType:n.FunctionDeclaration},NL={id:sn,type:n.Loop,version:1,declaration:Il,inputs:[],outputsDeclarations:[yg],outputs:[BL],body:OL,successCalls:[rg],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[_L],calledBySuccess:[],breakStatements:[sg],continueStatements:[lg],x:0,y:0,parent:wL},ML={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},hg={type:n.FunctionDeclaration,id:Ac,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[NL],returnStatements:[rg],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:ML},VL={type:n.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:n.Project,entityId:W},LL={id:"call-hello-world-loop-id",type:n.FunctionCall,version:1,declaration:hg,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:VL},gn="company-dto-function-declaration-id",Bc="company-dto-func-declaration-argument-dcl-id",on="company-dto-function-company-variable-id",Jn="company-dto-function-company-dto-variable-id",ui="iterate-over-employee-list-loop-id",fg="iterate-over-employee-list-loop-employee-dto-output-map-id",wc="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",Ta="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",mg="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",GL="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",Tg="iterate-over-employee-list-continue-statement-id",zs="iterate-over-employee-list-loop-body-id",Eg="company-dto-func-declaration-return-statement-id",bg="company-dto-func-declaration-return-decl-id",Rg="company-dto-func-declaration-company-variable-id-output-map-id",gg="company-dto-func-declaration-company-variable-employess-output-map-id",vg="company-dto-func-declaration-company-variable-name-output-map-id",$L="company-dto-func-declaration-company-dto-variable-input-map-id",FL="company-dto-func-declaration-company-dto-variable-employess-input-map-id",UL="company-dto-func-declaration-company-dto-variable-name-input-map-id",Zs="company-dto-func-declaration-owner-variable-id",xL="company-dto-func-declaration-company-dto-variable-owner-input-map-id",Ig="company-dto-func-declaration-company-variable-owner-output-map-id",Dg="company-dto-func-declaration-owner-variable-id-output-map-id",Ks="company-dto-func-declaration-bank-account-variable-id",jL="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",Pg="company-dto-func-declaration-company-variable-bank-account-output-map-id",Ag="company-dto-func-declaration-bank-account-variable-id-output-map-id",kL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:bg},qL={like:!1,inferred:!1,id:"company-dto-func-returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kL},JL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Eg},WL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Og={isError:!1,id:bg,type:n.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",implements:null,dataType:qL,readsValue:WL,required:!0,index:0,parent:JL},YL={type:n.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Jn},HL={type:n.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},_c={type:n.ReturnStatement,id:Eg,version:1,outputs:[Og],calledByError:[],calledByEntry:[],calledBySuccess:[YL],throws:null,x:0,y:0,parent:HL},zL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Dg},ZL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Sg={id:xL,type:n.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:zL,parent:ZL},KL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Ag},XL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Cg={id:jL,type:n.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:KL,parent:XL},QL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:vg},eG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Bg={id:UL,type:n.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:QL,parent:eG},tG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:fg},nG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},wg={id:FL,type:n.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:tG,parent:nG},rG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Rg},iG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},_g={id:$L,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:rG,parent:iG},aG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},sG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:Ks},oG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Zs},lG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:n.VariableDeclaration,entityId:ui},Nc={id:Jn,type:n.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[sG,oG,lG],successCalls:[_c],errorCalls:[],readsValue:null,writesValues:[Og],inputs:[_g,Bg,Cg,Sg,wg],outputs:[],internalCalls:[],parent:aG,x:0,y:0},fr="employee-dto-func-declaration-id",Mc="employee-dto-func-declaration-argument-dcl-id",Ng="employee-dto-func-declaration-return-statement-id",Mg="employee-dto-func-declaration-return-decl-id",mr="employee-dto-func-declaration-employee-variable-id",Tr="employee-dto-func-declaration-employee-dto-variable-id",Xs="employee-dto-func-declaration-manager-variable-id",Vg="employee-dto-func-declaration-employee-variable-id-output-map-id",Lg="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",Gg="employee-dto-func-declaration-employee-variable-department-output-map-id",$g="employee-dto-func-declaration-employee-variable-manager-output-map-id",Fg="employee-dto-func-declaration-manager-variable-id-output-map-id",cG="employee-dto-func-declaration-employee-dto-variable-input-map-id",dG="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",uG="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",pG="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",yG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Mg},hG={like:!1,inferred:!1,id:"employee-dto-func-returned-employee-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:yG},fG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Ng},mG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Tr},Ug={isError:!1,id:Mg,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",dataType:hG,implements:null,readsValue:mG,required:!0,index:0,parent:fG},TG={type:n.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Tr},EG={type:n.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},Vc={type:n.ReturnStatement,id:Ng,version:1,outputs:[Ug],calledByError:[],calledByEntry:[],calledBySuccess:[TG],throws:null,x:0,y:0,parent:EG},bG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Fg},RG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},xg={id:pG,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:bG,parent:RG},gG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Gg},vG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},jg={id:uG,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:gG,parent:vG},IG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Lg},DG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},kg={id:dG,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:IG,parent:DG},PG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Vg},AG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},qg={id:cG,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:PG,parent:AG},OG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},SG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Xs},CG={id:Tr,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[SG],successCalls:[Vc],errorCalls:[],readsValue:null,writesValues:[Ug],inputs:[qg,kg,jg,xg],outputs:[],internalCalls:[],parent:OG,x:0,y:0},BG={type:n.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Xs},wG={id:Fg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[xg],parent:BG},_G={type:n.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Xs},NG={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:_G,defaultValue:null},MG={type:n.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:$g},VG={type:n.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr};n.GenericReference,n.VariableDeclaration;const Jg={id:Xs,type:n.VariableDeclaration,version:1,name:"Manager",dataType:NG,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[CG],errorCalls:[],readsValue:MG,writesValues:[],inputs:[],outputs:[wG],internalCalls:[],parent:VG,x:0,y:0},LG={type:n.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},GG={id:$g,type:n.OutputMap,version:1,declaration:$t.properties[2],index:3,writesValues:[Jg],parent:LG},$G={type:n.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},FG={id:Gg,type:n.OutputMap,version:1,declaration:$t.properties[0],index:2,writesValues:[jg],parent:$G},UG={type:n.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},xG={id:Lg,type:n.OutputMap,version:1,declaration:yt.properties[1],index:1,writesValues:[kg],parent:UG},jG={type:n.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},kG={id:Vg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[qg],parent:jG},qG={type:n.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},JG={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:qG,defaultValue:null},WG={type:n.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},YG={type:n.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Mc},HG={type:n.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:fr},Wg={id:mr,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:JG,description:"A variable holding a company employee",calledByError:[],calledByEntry:[HG],calledBySuccess:[],successCalls:[Jg],errorCalls:[],readsValue:YG,writesValues:[],inputs:[],outputs:[kG,xG,FG,GG],internalCalls:[],parent:WG,x:0,y:0},zG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Mc,entityType:n.ArgumentDeclaration},ZG={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:$t,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:zG,defaultValue:null},KG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:fr,entityType:n.FunctionDeclaration},XG={type:n.ArgumentDeclaration,id:Mc,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,dataType:ZG,index:0,writesValues:[Wg],parent:KG},QG={type:n.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},Lc={type:n.FunctionDeclaration,id:fr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[XG],calls:[Wg],implements:null,returnStatements:[Vc],collapsed:!1,private:!1,x:0,y:0,parent:QG},e$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:mg,entityType:n.ReturnDeclaration},t$={like:!1,inferred:!1,id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:e$},n$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.OutputMap},r$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:n.GenericReference,entityId:Tg,entityType:n.ContinueStatement},Yg={isError:!1,id:mg,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:n$,dataType:t$,implements:null,required:!0,index:0,parent:r$},i$={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},a$={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},Hg={id:Tg,type:n.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[i$],outputs:[Yg],throws:null,x:0,y:0,parent:a$},s$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},o$={id:GL,type:n.OutputMap,version:1,declaration:Vc.outputs[0],writesValues:[Yg],index:0,parent:s$},l$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:n.GenericReference,entityId:wc,entityType:n.ArgumentDeclaration},c$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},zg={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:Lc.inputs[0],readsValue:l$,index:0,defaultValue:null,parent:c$},d$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},u$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},p$={id:Ta,type:n.FunctionCall,version:1,declaration:Lc,inputs:[zg],process:null,outputs:[o$],calledByError:[],calledByEntry:[d$],calledBySuccess:[],successCalls:[Hg],errorCalls:[],error:null,x:0,y:0,parent:u$},y$={type:n.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:wc,entityType:n.ArgumentDeclaration},h$={like:!1,inferred:!1,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:$t,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:y$},f$={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},m$={id:wc,type:n.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:h$,required:!0,implements:os,index:0,writesValues:[zg],parent:f$},T$={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},E$={id:zs,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[m$],calls:[p$],implements:ls,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:T$},b$={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},R$={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:n.GenericReference,entityId:gg,entityType:n.OutputMap},Zg={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ar.inputs[0],defaultValue:null,readsValue:R$,index:0,parent:b$},g$={id:"iterate-over-employee-list-loop-parent-ref-id",type:n.GenericReference,entityId:gn,entityType:n.FunctionDeclaration},v$={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},I$={id:fg,type:n.OutputMap,version:1,declaration:ar.outputs[0],writesValues:[wg],index:0,parent:v$},D$={type:n.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:n.VariableDeclaration,entityId:on},P$={id:ui,type:n.Loop,version:1,declaration:ar,inputs:[Zg],successCalls:[Nc],errorCalls:[],outputsDeclarations:[],outputs:[I$],body:E$,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[D$],breakStatements:[],continueStatements:[Hg],error:null,x:0,y:0,parent:g$},A$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},O$={id:Ag,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[Cg],parent:A$},S$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},C$={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:S$,defaultValue:null},B$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Pg},w$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn};n.GenericReference,n.VariableDeclaration;const Kg={id:Ks,type:n.VariableDeclaration,version:1,name:"Bank account",dataType:C$,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Nc],errorCalls:[],readsValue:B$,writesValues:[],inputs:[],outputs:[O$],internalCalls:[],parent:w$,x:0,y:0},_$={type:n.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},N$={id:Dg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[Sg],parent:_$},M$={type:n.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},V$={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:M$,defaultValue:null},L$={type:n.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Ig},G$={type:n.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn};n.GenericReference,n.VariableDeclaration;const Xg={id:Zs,type:n.VariableDeclaration,version:1,name:"Owner",dataType:V$,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Nc],errorCalls:[],readsValue:L$,writesValues:[],inputs:[],outputs:[N$],internalCalls:[],parent:G$,x:0,y:0},$$={type:n.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},F$={id:Ig,type:n.OutputMap,version:1,declaration:Ft.properties[2],index:4,writesValues:[Xg],parent:$$},U$={type:n.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},x$={id:Pg,type:n.OutputMap,version:1,declaration:Ft.properties[2],index:3,writesValues:[Kg],parent:U$},j$={type:n.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},k$={id:vg,type:n.OutputMap,version:1,declaration:Ft.properties[0],index:2,writesValues:[Bg],parent:j$},q$={type:n.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},J$={id:gg,type:n.OutputMap,version:1,declaration:Ft.properties[3],index:1,writesValues:[Zg],parent:q$},W$={type:n.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},Y$={id:Rg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[_g],parent:W$},H$={type:n.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},z$={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:H$,defaultValue:null},Z$={type:n.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},K$={type:n.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Bc},X$={type:n.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:gn},Qg={id:on,type:n.VariableDeclaration,version:1,name:"Company",dataType:z$,description:"A variable holding a company",calledByError:[],calledByEntry:[X$],calledBySuccess:[],successCalls:[Kg,Xg,P$],errorCalls:[],readsValue:K$,writesValues:[],inputs:[],outputs:[Y$,J$,k$,x$,F$],internalCalls:[],parent:Z$,x:0,y:0},Q$={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Bc,entityType:n.ArgumentDeclaration},eF={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:Q$,defaultValue:null},tF={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:gn,entityType:n.FunctionDeclaration},nF={type:n.ArgumentDeclaration,id:Bc,version:1,name:"Company",description:"The company to create a DTO for",required:!0,implements:null,dataType:eF,index:0,writesValues:[Qg],parent:tF},rF={type:n.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},Gc={type:n.FunctionDeclaration,id:gn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[nF],calls:[Qg],implements:null,index:null,returnStatements:[_c],collapsed:!1,private:!1,x:0,y:0,parent:rF},Ea="exec-in-parallel-operation-call-id",ba="exec-sequentially-operation-call-id",ht="concurrency-and-wait-function-declaration-id",ev="concurrency-and-wait-return-statement-id",tv="concurrency-and-wait-return-declaration-id",$c="exec-in-parallel-argument-map-id",nv="exec-sequentially-argument-map-id",Fc="wait-for-2-seconds-operation-id",rv="wait-for-2-seconds-argument-map-id",Uc="map-company-dto-function-call-id",iv="map-company-dto-function-call-company-dto-output-map-id",Ra="company-dto-variable-one-id",xc="company-dto-variable-one-instance-id",iF="company-dto-variable-two-id",aF={type:n.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:tv},sF={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:aF},oF={type:n.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:ev},lF={type:n.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ra},av={isError:!1,id:tv,type:n.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:sF,implements:null,readsValue:lF,required:!0,index:0,parent:oF},cF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Fc},dF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},sv={type:n.ReturnStatement,id:ev,version:1,outputs:[av],calledByError:[],calledByEntry:[],calledBySuccess:[cF],throws:null,x:0,y:0,parent:dF},uF={type:n.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:n.VariableInstance,entityId:xc},pF={type:n.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:n.VariableInstance,entityId:xc},yF={type:n.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},ov={id:iF,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[uF],internalCalls:[],writesValues:[av],readsValue:pF,x:0,y:0,parent:yF},hF={type:n.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ra},fF={type:n.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ra},mF={type:n.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},TF={type:n.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:Ra},lv={id:xc,type:n.VariableInstance,version:1,declaration:TF,inputs:[],outputs:[],successCalls:[ov],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[hF],internalCalls:[],writesValues:[ov],readsValue:fF,x:0,y:0,parent:mF},EF={type:n.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:n.FunctionCall,entityId:Uc},bF={type:n.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:n.OutputMap,entityId:iv},RF={type:n.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},cv={id:Ra,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[lv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[EF],internalCalls:[],writesValues:[lv],readsValue:bF,x:0,y:0,parent:RF},dv={type:n.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:n.FunctionCall,entityId:Uc},gF={id:"map-company-dto-function-call-company-input-map-id",type:n.InputMap,version:1,declaration:Gc.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:dv},vF={id:iv,type:n.OutputMap,version:1,declaration:_c.outputs[0],writesValues:[cv],index:0,parent:dv},IF={id:"map-company-dto-function-call-called-by-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ht},DF={id:"map-company-dto-function-call-parent-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ht},PF={id:Uc,type:n.FunctionCall,version:1,declaration:Gc,successCalls:[cv],process:null,errorCalls:[],inputs:[gF],outputs:[vF],calledByError:[],calledByEntry:[IF],calledBySuccess:[],parent:DF,x:0,y:0,error:null},AF={type:n.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:lR},OF={type:n.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:n.DataType,entityId:"last-timestamp-variable-datatype-id"},SF={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:fn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:AF,defaultValue:{parentRelationType:null,id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,name:I.Date,value:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:OF,valueAsType:null}},CF={type:n.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:n.Project,entityId:W},jc={id:lR,type:n.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",dataType:SF,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:CF},BF={type:n.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:rv},wF={type:n.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:n.Operation,entityId:Fc},_F={id:rv,type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"wait-for-2-seconds-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:I.Number,parent:BF},index:0,parent:wF},NF={type:n.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},MF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:ba},VF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:Ea},uv={id:Fc,type:n.Operation,version:1,declaration:Wt,inputs:[_F],outputs:[],process:null,successCalls:[sv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[MF,VF],calledBySuccess:[],error:null,parent:NF},LF={type:n.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"wait-for-random-amount-input-map-id"},GF={type:n.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:n.Operation,entityId:"wait-for-random-amount-id"},$F={id:"wait-for-random-amount-input-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"wait-for-random-amount-argument-default-value-id",type:n.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:Je.Random,rangeStart:1e3,rangeEnd:4e3},name:I.Number,parent:LF},index:0,parent:GF},FF={type:n.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:n.Project,entityId:W},pi={id:"wait-for-random-amount-id",type:n.Operation,version:1,declaration:Wt,inputs:[$F],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:FF},pv="list-of-functions-variable-id",UF={type:n.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-argument-parent-ref-id",entityType:n.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},xF={id:"list-of-functions-variable-action-descriptor-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"Any input value that can be passed to the action",index:0,required:!1,dataType:null,parent:UF},jF={type:n.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-return-parent-ref-id",entityType:n.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},kF={id:"list-of-functions-variable-action-descriptor-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"Any output value that can be returned to the action",index:0,required:!1,dataType:null,parent:jF},qF={type:n.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:pv},JF={id:"list-of-functions-variable-action-descriptor-id",type:n.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:[xF],error:null,outputs:[kF],parent:null},WF={type:n.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:n.DataType,entityId:"list-of-functions-variable-data-type-id"},YF={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:JF,asType:!1,isList:!0,isNullable:!1,defaultValue:{parentRelationType:null,id:"list-of-functions-variable-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.ActionDescriptor,value:null,valueAsType:[pi,pi,pi,pi,pi],autogeneration:null,parent:WF},constant:!1,parent:qF},HF={type:n.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht};n.GenericReference,n.InputMap;const zF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:n.InputMap,entityId:nv},ZF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:n.InputMap,entityId:$c},yv={id:pv,type:n.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:YF,parent:HF,readsValue:null,writesValues:[zF,ZF],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},KF={type:n.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:n.Operation,entityId:Ea},XF={type:n.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},QF={type:n.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-in-parallel-return-map-id"},eU={type:n.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:n.Operation,entityId:Ea},hv={id:"exec-in-parallel-result-variable-id",type:n.VariableInstance,version:1,declaration:jc,readsValue:QF,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[eU],successCalls:[],errorCalls:[],internalCalls:[],parent:XF,x:0,y:0},tU={id:"exec-in-parallel-return-map-id",type:n.OutputMap,version:1,declaration:El,writesValues:[hv],index:0,parent:KF},nU={type:n.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ea},rU={id:$c,type:n.InputMap,version:1,declaration:Tl,name:null,description:null,readsValue:yv,defaultValue:null,index:0,parent:nU},iU={type:n.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},aU={type:n.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ht},sU={process:null,id:Ea,type:n.Operation,version:1,declaration:Wt,inputs:[rU],outputs:[tU],successCalls:[uv,hv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[aU],calledBySuccess:[],error:null,parent:iU},oU={type:n.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:n.Operation,entityId:ba},lU={type:n.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},cU={type:n.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-sequentially-return-map-id"},dU={type:n.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:n.Operation,entityId:ba},fv={id:"exec-sequentially-result-variable-id",type:n.VariableInstance,version:1,declaration:jc,readsValue:cU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[dU],successCalls:[],errorCalls:[],internalCalls:[],parent:lU,x:0,y:0},uU={id:"exec-sequentially-return-map-id",type:n.OutputMap,version:1,declaration:Rl,writesValues:[fv],index:0,parent:oU},pU={type:n.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:n.Operation,entityId:ba},yU={id:nv,type:n.InputMap,version:1,declaration:bl,name:null,description:null,readsValue:yv,defaultValue:null,index:0,parent:pU},hU={type:n.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ht},fU={type:n.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ht},mU={id:ba,type:n.Operation,version:1,declaration:Tn,inputs:[yU],process:null,outputs:[uU],successCalls:[uv,fv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[fU],calledBySuccess:[],error:null,parent:hU},TU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:W},EU={type:n.FunctionDeclaration,id:ht,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:[mU,sU,PF],returnStatements:[sv],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:TU},bU={type:n.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:n.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},RU={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bU},gU={type:n.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:n.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},vU={isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",implements:null,dataType:RU,readsValue:null,required:!0,index:0,parent:gU},IU={type:n.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},DU={type:n.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},mv={type:n.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[vU],calledByError:[],calledByEntry:[DU],calledBySuccess:[],throws:null,x:0,y:0,parent:IU},PU={type:n.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:n.Project,entityId:W},AU={type:n.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[mv],index:null,implements:null,returnStatements:[mv],collapsed:!1,private:!1,x:0,y:0,parent:PU},kc="get-current-date-and-time-func-decl-id",Tv="get-current-date-and-time-return-statement-id",Ev="get-current-date-and-time-return-declaration-id",bv="get-current-date-and-time-return-declaration-data-type-id",OU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:n.DataType,entityId:bv},SU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Ev},CU={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:bv,version:1,entity:fn,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,defaultValue:{parentRelationType:null,id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.Date,valueAsType:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:OU},constant:!1,parent:SU},BU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:n.ReturnStatement,entityId:Tv};n.ReturnDeclaration;const wU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:kc},_U={type:n.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:kc};n.ReturnStatement;const NU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:W},MU={type:n.FunctionDeclaration,id:kc,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:NU},Rv="do-math-return-statement-id",gv="do-math-return-declaration-id",VU={type:n.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:n.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},LU={like:!1,inferred:!1,id:"do-math-func-var-to-return-one-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VU},GU={type:n.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},$U={type:n.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:n.ReturnDeclaration,entityId:gv},FU={type:n.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:LU,readsValue:null,writesValues:[$U],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:GU},UU={type:n.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:n.ReturnStatement,entityId:Rv},xU={type:n.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:n.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},jU={like:!1,inferred:!1,id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xU},kU={isError:!1,id:gv,version:1,type:n.ReturnDeclaration,name:"Result",description:null,implements:null,dataType:jU,readsValue:FU,required:!0,index:0,parent:UU},qU={type:n.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},JU={type:n.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},vv={type:n.ReturnStatement,id:Rv,version:1,outputs:[kU],calledByError:[],calledByEntry:[],calledBySuccess:[qU],parent:JU,throws:null,x:0,y:0},WU={type:n.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:n.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},YU={like:!1,inferred:!1,id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WU},HU={type:n.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},zU={type:n.GenericReference,id:"do-math-func-return-one-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},ZU={type:n.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},Iv={type:n.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:YU,description:null,readsValue:ZU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[zU],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:HU},KU={type:n.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},XU={type:n.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},QU={type:n.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:n.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},e4={like:!1,inferred:!1,id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:QU},t4={type:n.GenericReference,id:"do-math-func-return-two-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Dv={type:n.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[t4],successCalls:[],errorCalls:[],dataType:e4,readsValue:XU,writesValues:[],internalCalls:[],parent:KU,x:0,y:0},Pv={type:n.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},n4={type:n.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},r4={type:n.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},i4={type:n.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:n.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},Av={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:n.InputMap,declaration:il,name:null,description:null,readsValue:i4,defaultValue:null,index:0,parent:r4},a4={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:n.OutputMap,version:1,declaration:ol,writesValues:[Iv,Dv],index:0,parent:n4},s4={type:n.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},o4={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:n.GenericReference,entityType:n.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},Ov={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:n.InputMap,declaration:al,name:null,description:null,readsValue:o4,defaultValue:null,index:1,parent:s4},l4={type:n.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Za,version:1,inputs:[Av,Ov],outputs:[a4],calledByError:[],calledByEntry:[Pv],calledBySuccess:[],process:null,successCalls:[vv,Iv,Dv],errorCalls:[],parent:Pv,error:null,x:0,y:0},c4={type:n.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:n.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},d4={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:n.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:n.ArgumentDeclaration},Sv={like:!1,inferred:!1,id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"do-math-func-argument-two-default-value-id",type:n.PrimitiveValue,version:1,value:1,name:I.Number,parent:c4,valueAsType:null,autogeneration:null},constant:!1,parent:d4},u4={type:n.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:n.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},p4={type:n.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},y4={type:n.GenericReference,id:"do-math-func-var-called-by-ref",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Cv={type:n.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:Sv,inputs:[],outputs:[],calledByError:[],calledByEntry:[y4],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:u4,writesValues:[Ov],internalCalls:[],x:0,y:0,parent:p4},h4={entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:n.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},f4={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:n.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:Sv,implements:null,writesValues:[Cv],required:!0,index:1,parent:h4},m4={type:n.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:n.Project,entityId:W},T4={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},E4={type:n.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:n.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},b4={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:n.ArgumentDeclaration},R4={like:!1,inferred:!1,id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"do-math-func-argument-one-default-value-id",type:n.PrimitiveValue,version:1,value:5,name:I.Number,parent:E4,valueAsType:null,autogeneration:null},constant:!1,parent:b4},g4={id:"d8895765-f705-457e-85fa-25d130926769",type:n.ArgumentDeclaration,version:1,name:"N",dataType:R4,description:"The number to add",implements:null,writesValues:[Av],required:!0,index:0,parent:T4},v4={type:n.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[g4,f4],calls:[l4,Cv],implements:null,index:null,collapsed:!1,returnStatements:[vv],private:!1,x:0,y:0,parent:m4},ft="replace-bank-account-in-company-func-declaration-id",qc="company-entity-to-modify-arg-declaration-id",Jc="account-number-to-create-arg-decl-id",yi="company-main-variable-id",hi="search-person-by-id-id",Bv="new-bank-account-owner-arg-decl-id",wv="search-person-by-id-output-declaration-id",Wc="search-person-by-id-output-entity-map-id",ga="person-not-empty-condition-id",Qs="create-new-bank-account-instance-operation-id",_v="create-new-bank-account-instance-operation-output-entity-map-id",Nv="company-bank-account-output-map-id",Yc="old-bank-account-var-declaration-id",Mv="old-bank-account-var-instance-id",Vv="company-variable-instance-id",Hc="delete-bank-account-internal-call-id",va="new-bank-account-data-variable-declaration-id",I4={type:n.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},D4={type:n.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:n.InternalCall,entityId:Hc},P4={type:n.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:yi},A4={type:n.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:Vv},O4={type:n.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:_v},Lv={type:n.InputMap,id:"bank-account-input-map-id",version:1,readsValue:O4,declaration:gc,name:null,description:null,index:0,defaultValue:null,parent:A4},S4={type:n.VariableInstance,id:Vv,version:1,declaration:P4,inputs:[Lv],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[D4],successCalls:[],errorCalls:[],internalCalls:[],parent:I4,readsValue:null,writesValues:[],x:0,y:0},C4={type:n.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},B4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,defaultValue:null,parent:C4},w4={type:n.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Nv},_4={type:n.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},N4={type:n.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:yi},M4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:n.Operation,entityId:Qs};n.GenericReference,n.VariableInstance;const V4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Yc},L4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:n.VariableDeclaration,entityId:Yc},G4={type:n.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:n.FunctionDeclaration,entityId:ft},$4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:n.InternalCall,entityId:Hc},F4={type:n.VariableInstance,id:Mv,version:1,declaration:L4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[$4],errorCalls:[],parent:G4,readsValue:null,writesValues:[],x:0,y:0},Gv={process:null,type:n.InternalCall,id:Hc,version:1,declaration:Jl,index:0,successCalls:[S4],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[M4,V4],parent:F4},$v={type:n.VariableDeclaration,id:Yc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:B4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[N4],successCalls:[Gv],internalCalls:[],errorCalls:[],parent:_4,readsValue:w4,writesValues:[],x:0,y:0},U4={type:n.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},x4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,constant:!1,defaultValue:null,parent:U4},j4={type:n.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:qc},k4={type:n.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},q4={type:n.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},J4={type:n.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},W4={id:Nv,version:1,type:n.OutputMap,declaration:gc,index:0,parent:J4,writesValues:[$v]},Fv={type:n.VariableDeclaration,id:yi,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:x4,inputs:[],outputs:[W4],calledByError:[],calledByEntry:[q4],calledBySuccess:[],successCalls:[$v],errorCalls:[],parent:k4,internalCalls:[],readsValue:j4,writesValues:[],x:0,y:0},Y4={type:n.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:va},H4={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.OutputMap,entityId:Wc},Uv={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account owner",description:null,readsValue:H4,index:1,defaultValue:null,parent:Y4},z4={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:Jc},Z4={type:n.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:va},xv={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account number",description:null,readsValue:z4,defaultValue:null,index:0,parent:Z4},jv={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:n.Operation,entityId:Qs},K4={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:n.InputMap,declaration:rr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:n.PrimitiveValue,name:I.EntityTemplate,value:null,valueAsType:ci,autogeneration:null},parent:jv},X4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:va},kv={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:n.InputMap,declaration:rr.inputs[1],name:null,description:null,index:1,readsValue:X4,defaultValue:null,parent:jv},Q4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:n.Operation,entityId:Qs},ex={id:_v,version:1,type:n.OutputMap,declaration:rr.outputs[0],index:0,writesValues:[Lv],parent:Q4},tx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:ga},nx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.VariableDeclaration,entityId:va},rx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},qv={process:null,id:Qs,type:n.Operation,version:1,declaration:rr,inputs:[K4,kv],error:null,outputs:[ex],successCalls:[Gv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[nx,tx],parent:rx,x:0,y:0},ix={type:n.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},ax={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:ga},sx={id:va,type:n.VariableDeclaration,version:1,inputs:[xv,Uv],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[kv],successCalls:[qv],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[ax],calledByEntry:[],x:0,y:0,parent:ix},ox={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-thrown-error-datatype-id",entityType:n.DataType},lx={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:n.ReturnDeclaration};n.DataType,n.PrimitiveValue,I.String;const cx={id:"person-not-found-thrown-error-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:n.ReturnStatement},dx={isError:!0,id:"person-not-found-thrown-error-id",type:n.ReturnDeclaration,version:1,dataType:null,name:"Person not found error",description:"If the person entity was not found this error is outputted",parent:cx,implements:null,required:!0,index:0,readsValue:null},ux={id:"person-not-found-error-return-statement-called-by-ref-id",type:n.GenericReference,entityId:ga,entityType:n.Condition},px={id:"person-not-found-error-return-statement-parent-ref-id",type:n.GenericReference,entityId:ft,entityType:n.FunctionDeclaration},yx={id:"person-not-found-error-return-statement-id",type:n.ReturnStatement,version:1,throws:dx,outputs:[],calledBySuccess:[],calledByError:[ux],calledByEntry:[],x:0,y:0,parent:px},hx={type:n.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:n.Search,entityId:hi},fx={type:n.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},mx={type:n.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Wc},Tx={type:n.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:n.Condition,entityId:ga},Jv={id:"person-entity-to-check-map-id",version:1,type:n.InputMap,declaration:dr.inputs[0],name:null,description:null,readsValue:mx,index:0,defaultValue:null,parent:Tx},Ex={type:n.Condition,id:ga,version:1,declaration:dr,inputs:[Jv],calledByError:[],calledByEntry:[],calledBySuccess:[hx],successCalls:[sx,qv],errorCalls:[yx],x:0,y:0,parent:fx},bx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:n.ValueDescriptor,entityId:wv},Rx={like:!1,inferred:!1,id:"search-person-by-id-output-entity-declaration-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,constant:!1,asType:!1,isNullable:!1,entity:yt,defaultValue:null,parent:bx},gx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:n.Search,entityId:hi},Wv={id:wv,type:n.ValueDescriptor,version:1,dataType:Rx,name:"Found person",description:"The person entity that was found",parent:gx,required:!0,index:0},vx={type:n.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:n.Search,entityId:hi},Ix={type:n.OutputMap,id:Wc,version:1,declaration:Wv,parent:vx,writesValues:[Jv,Uv],index:0},Dx={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:n.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:n.ArgumentDeclaration};n.DataType;const Px={type:n.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:n.Search,entityId:hi},Yv={id:"search-person-by-id-input-declaration-id",type:n.ValueDescriptor,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",parentRelationType:O.FixedArguments,index:0,required:!0,parent:Px},Ax={type:n.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:n.Search,entityId:hi},Ox={id:"search-person-by-id-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Bv,entityType:n.ArgumentDeclaration},Hv={type:n.InputMap,id:"search-person-by-id-input-map",version:1,declaration:Yv,name:null,description:null,readsValue:Ox,defaultValue:null,parent:Ax,index:0},Sx={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},Cx={type:n.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},Bx={type:n.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},wx={type:n.Search,id:hi,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:Sx,inputsDeclarations:[Yv],inputs:[Hv],outputsDeclarations:[Wv],outputs:[Ix],calledByError:[],calledByEntry:[Bx],calledBySuccess:[],error:null,successCalls:[Ex],errorCalls:[],parent:Cx,x:0,y:0};n.GenericReference,n.DataType;const _x={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:Jc,entityType:n.ArgumentDeclaration},Nx={like:!1,inferred:!1,id:"account-number-to-create-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:_x},Mx={entityType:n.FunctionDeclaration,entityId:ft,type:n.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},Vx={id:Jc,type:n.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:Nx,implements:null,writesValues:[xv],required:!0,index:1,parent:Mx};n.GenericReference,n.DataType;const Lx={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:n.ArgumentDeclaration},Gx={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:za,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:Lx},$x={entityType:n.FunctionDeclaration,entityId:ft,type:n.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},Fx={id:Bv,type:n.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",dataType:Gx,implements:null,writesValues:[Hv],required:!1,index:1,parent:$x},Ux={type:n.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:n.Project,entityId:W},xx={type:n.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:n.FunctionDeclaration,entityId:ft};n.GenericReference,n.DataType;const jx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:qc,entityType:n.ArgumentDeclaration},kx={like:!1,inferred:!1,id:"company-entity-to-modify-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:jx},qx={id:qc,type:n.ArgumentDeclaration,version:1,name:"Company",dataType:kx,implements:null,description:"The company to replace the bank account for",writesValues:[Fv],required:!0,index:0,parent:xx},Jx={type:n.FunctionDeclaration,id:ft,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:[qx,Vx,Fx],index:null,implements:null,calls:[wx,Fv],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:Ux},Wx={type:n.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Yx={type:n.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:Wx,x:0,y:0},Hx={type:n.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:n.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},zx={type:n.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Zx={type:n.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[Yx],events:[],implements:zx,parent:Hx,x:0,y:0},zc="global-counted-test-loop-id",zv="global-counted-test-loop-body-id",Zv="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",Kx={type:n.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:Zv,entityType:n.ArgumentDeclaration},Xx={like:!1,inferred:!1,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Kx},Qx={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:zv,entityType:n.FunctionDeclaration},ej={id:Zv,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Xx,implements:wl,required:!0,index:0,writesValues:[],parent:Qx},tj={id:"global-counted-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},nj={id:zv,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[ej],calls:[],implements:_l,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:tj},fi="random-company-employee-test-variable-id",Zc="manager-global-variable-id",Kv="global-user-instance-id",vn="employee-mapped-dto-variable-id",Wn="employee-mapped-dto-variable-instance-id",Xv="random-employee-id-output-map-id",Qv="random-employee-birth-date-output-map-id",eI="random-employee-department-output-map-id",tI="random-employee-manager-output-map-id",nI="manager-global-id-output-map-id",rI="global-user-instance-id-output-map-id",rj="employee-mapped-dto-requester-id-input-map-id",iI="employee-mapped-dto-now-timestamp-input-map-id",ij="employee-mapped-dto-id-input-map-id",aj="employee-mapped-dto-birth-date-input-map-id",sj="employee-mapped-dto-department-input-map-id",oj="employee-mapped-dto-manager-input-map-id",lj={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop};n.GenericReference,n.VariableDeclaration;const cj={id:"global-counted-test-loop-iteration-number-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ds.inputs[0],defaultValue:null,readsValue:null,index:0,parent:lj},dj={id:"global-counted-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},uj={id:"global-counted-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},pj={id:zc,type:n.Loop,version:1,declaration:ds,inputs:[cj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:nj,calledByError:[],calledByEntry:[],calledBySuccess:[uj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:dj},Kc="global-object-keys-test-loop-id",aI="global-object-keys-test-loop-body-id",sI="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",yj={type:n.GenericReference,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:sI,entityType:n.ArgumentDeclaration},hj={like:!1,inferred:!1,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:yj},fj={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:aI,entityType:n.FunctionDeclaration},mj={id:sI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:hj,implements:Cl,required:!0,index:0,writesValues:[],parent:fj},Tj={id:"global-object-keys-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Ej={id:aI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[mj],calls:[],implements:xi,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Tj},bj={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Rj={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:vn,entityType:n.VariableDeclaration},oI={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:xi.inputs[0],defaultValue:null,readsValue:Rj,index:0,parent:bj},gj={id:"global-object-keys-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},vj={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},Ij={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:n.GenericReference,entityId:vn,entityType:n.VariableDeclaration},Xc={id:Kc,type:n.Loop,version:1,declaration:xi,inputs:[oI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Ej,calledByError:[],calledByEntry:[],calledBySuccess:[Ij,vj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:gj},Qc="global-object-values-test-loop-id",lI="global-object-values-test-loop-body-id",cI="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",Dj={type:n.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:cI,entityType:n.ArgumentDeclaration},Pj={like:!1,inferred:!1,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Dj},Aj={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:lI,entityType:n.FunctionDeclaration},Oj={id:cI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Pj,implements:Bl,required:!0,index:0,writesValues:[],parent:Aj},Sj={id:"global-object-values-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.Loop},Cj={id:lI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Oj],calls:[],implements:ji,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Sj},Bj={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.Loop},wj={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},dI={id:"global-object-values-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ji.inputs[0],defaultValue:null,readsValue:wj,index:0,parent:Bj},_j={id:"global-object-values-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},Nj={id:"global-object-values-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},uI={id:Qc,type:n.Loop,version:1,declaration:ji,inputs:[dI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Cj,calledByError:[],calledByEntry:[],calledBySuccess:[Nj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:_j},ed="global-test-iterate-over-string-loop-id",td="global-test-iterate-over-string-loop-body-id",eo="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",pI="global-test-iterate-over-string-loop-iteration-list-input-map-id",Mj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:eo,entityType:n.ArgumentDeclaration},Vj={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Mj},Lj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:td,entityType:n.FunctionDeclaration},Gj={id:eo,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Vj,implements:Al,required:!0,index:1,writesValues:[],parent:Lj},$j={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:eo,entityType:n.ArgumentDeclaration},Fj={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:$j},Uj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:td,entityType:n.FunctionDeclaration},xj={id:eo,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Fj,implements:Ol,required:!0,index:0,writesValues:[],parent:Uj},jj={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},kj={id:td,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[xj,Gj],calls:[],implements:Sl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:jj},qj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},Jj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:n.GenericReference,entityId:pI,entityType:n.InputMap},Wj={parentRelationType:null,id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:n.PrimitiveValue,name:I.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:Je.Random,rangeStart:4,rangeEnd:5},parent:Jj},Yj={id:pI,type:n.InputMap,version:1,name:null,description:null,declaration:cs.inputs[0],defaultValue:Wj,readsValue:null,index:0,parent:qj},Hj={id:"global-test-iterate-over-string-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},zj={id:ed,type:n.Loop,version:1,declaration:cs,inputs:[Yj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:kj,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Hj},nd="iterate-over-list-loop-id",yI="iterate-over-list-loop-body-id",hI="iterate-over-list-loop-body-current-iteration-value-argument-declaration-id",Zj={type:n.GenericReference,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:hI,entityType:n.ArgumentDeclaration},Kj={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Zj},Xj={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:yI,entityType:n.FunctionDeclaration},Qj={id:hI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Kj,implements:os,required:!0,index:0,writesValues:[],parent:Xj},e8={id:"iterate-over-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:nd,entityType:n.Loop},t8={id:yI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Qj],calls:[],implements:ls,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:e8},n8={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:nd,entityType:n.Loop},r8={id:"iterate-over-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ar.inputs[0],defaultValue:null,readsValue:null,index:0,parent:n8},i8={id:"iterate-over-list-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},a8={id:nd,type:n.Loop,version:1,declaration:ar,inputs:[r8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:t8,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:i8};var rd=(r=>(r.EQ="eq",r.NEQ="neq",r.GT="gt",r.GTE="gte",r.LT="lt",r.LTE="lte",r.LIKE="like",r.ILIKE="ilike",r))(rd||{}),fI=(r=>(r.COUNT="count",r.SUM="sum",r.AVG="avg",r.MIN="min",r.MAX="max",r))(fI||{});const s8={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:fI.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:rd.NEQ,value:null}]},where:[{name:"employee_count",operation:rd.GT,value:1}]},o8={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},l8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:n.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:n.Search},mI={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:n.ValueDescriptor,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",dataType:null,required:!0,index:0,parent:l8},c8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:n.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:n.Search},d8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:n.OutputMap,version:1,declaration:mI,writesValues:[],index:0,parent:c8},u8={id:"find-companies-with-multiple-employees-and-bank-account",type:n.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:[mI],inputs:[],outputs:[d8],query:s8,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:o8},p8={type:n.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:nI},y8={type:n.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},TI={id:oj,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:p8,parent:y8},h8={type:n.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:eI},f8={type:n.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},EI={id:sj,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:h8,parent:f8},m8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Qv},T8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},bI={id:aj,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:m8,parent:T8},E8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Xv},b8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},RI={id:ij,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:E8,parent:b8},R8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:rI},g8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},gI={id:rj,type:n.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,index:0,readsValue:R8,parent:g8},v8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zc},I8={id:nI,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[TI],parent:v8},D8={type:n.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zc},P8={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:D8,defaultValue:null},A8={type:n.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:tI},O8={type:n.GenericReference,id:"manager-variable-parent-ref-id",entityType:n.Project,entityId:W},vI={id:Zc,type:n.VariableDeclaration,version:1,name:"Manager",dataType:P8,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:A8,writesValues:[],inputs:[],outputs:[I8],internalCalls:[],parent:O8,x:0,y:0},S8={type:n.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},C8={id:tI,type:n.OutputMap,version:1,declaration:$t.properties[2],index:3,writesValues:[vI],parent:S8},B8={type:n.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},w8={id:eI,type:n.OutputMap,version:1,declaration:$t.properties[0],index:2,writesValues:[EI],parent:B8},_8={type:n.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},N8={id:Qv,type:n.OutputMap,version:1,declaration:yt.properties[1],index:1,writesValues:[bI],parent:_8},M8={type:n.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},V8={id:Xv,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[RI],parent:M8},L8={type:n.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},G8={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:L8,defaultValue:null},$8={type:n.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:n.Project,entityId:W},F8={id:fi,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:G8,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[V8,N8,w8,C8],internalCalls:[],parent:$8,x:0,y:0},U8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:iI},x8={parentRelationType:null,type:n.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:I.Date,version:1,valueAsType:null,value:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:U8},j8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:Wn},k8={id:iI,type:n.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:x8,index:5,readsValue:null,parent:j8},q8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:n.VariableDeclaration,entityId:vn},J8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:Wn},W8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:n.Project,entityId:W},Y8={id:Wn,type:n.VariableInstance,version:1,declaration:q8,calledByError:[],calledByEntry:[],calledBySuccess:[J8],successCalls:[Xc,uI],errorCalls:[],readsValue:null,writesValues:[dI],inputs:[k8],outputs:[],internalCalls:[],parent:W8,x:0,y:0},H8={type:n.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:n.Project,entityId:W},z8={id:vn,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Xc,Y8],errorCalls:[],readsValue:null,writesValues:[oI],inputs:[gI,RI,bI,EI,TI],outputs:[],internalCalls:[],parent:H8,x:0,y:0},Z8={type:n.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:n.VariableDeclaration,entityId:hc},K8={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Tc,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:Z8,defaultValue:null},X8={type:n.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:n.Project,entityId:W},II={id:hc,type:n.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:K8,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:X8},Q8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableInstance,entityId:Kv},e9={id:rI,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[gI],parent:Q8},t9={type:n.GenericReference,id:"global-user-instance-parent-ref-id",entityType:n.Project,entityId:W},n9={id:Kv,type:n.VariableInstance,version:1,declaration:II,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[e9],internalCalls:[],parent:t9,x:0,y:0},r9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:hc},i9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:n.DataType,entityId:"is-test-environment-variable-dcl-datatype-id"},a9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Vn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:r9,defaultValue:{parentRelationType:null,id:"is-test-environment-variable-dcl-datatype-default-value-id",name:I.Boolean,version:1,value:null,type:n.PrimitiveValue,autogeneration:{type:Je.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:i9}},s9={type:n.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:n.Project,entityId:W},DI={id:"is-test-environment-variable-dcl-id",type:n.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",dataType:a9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:s9},o9={type:n.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:n.Project,entityId:W},l9={id:"is-test-environment-variable-instance-id",type:n.VariableInstance,version:1,declaration:DI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:o9,x:0,y:0},PI={type:n.Project,id:W,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:[Zx],entities:[mc,Bt,Tc,yt,KV,$t,qs,PR,AR,ci,MM,Ft,CV,fc,aC,UV,_M],functions:[EU,XR,Lc,AU,MU,hg,Gc,vc,Jx,VR,v4],events:[B1],variableDeclarations:[DI,II,jc,F8,vI,z8],variableInstances:[l9,n9],conditions:[],operations:[pi],functionCalls:[S0,LL],loops:[a8,Xc,uI,zj,pj],searches:[u8]};var T=(r=>(r.Error="error",r.Warning="warning",r))(T||{}),S=(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))(S||{}),f=(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))(f||{}),M=(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))(M||{});class b{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 S?new Er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Er{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 Er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function c9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function Y(r){const e=r.entity.errors.find(i=>i.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Er(r)}}function d9(r,e){const t=new Map;return r.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function ie(r,e){const t=[];return e.forEach(i=>{const a=r.find(s=>s.id===i.id);a?t.push(a):t.push(i)}),t}const Ia=u.union([u.string(),u.number(),u.boolean(),u.date()]),AI=u.enum([Je.CurrentDateAndTime,Je.Random,Je.Unique]),to=u.object({type:AI,rangeStart:Ia.nullable(),rangeEnd:Ia.nullable()}),Da=to.extend({type:u.literal(Je.Random),rangeStart:Ia,rangeEnd:Ia}),id=to.extend({type:u.literal(Je.Unique),rangeStart:u.null(),rangeEnd:u.null()}),OI=to.extend({type:u.literal(Je.CurrentDateAndTime),rangeStart:u.null(),rangeEnd:u.null()}),no=Da.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),SI=no.extend({rangeStart:u.number(),rangeEnd:u.null()}),CI=no.extend({rangeStart:u.null(),rangeEnd:u.number()}),BI=no.extend({rangeStart:u.number(),rangeEnd:u.number()}),ro=Da.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),wI=ro.extend({rangeStart:u.number(),rangeEnd:u.null()}),_I=ro.extend({rangeStart:u.null(),rangeEnd:u.number()}),NI=ro.extend({rangeStart:u.number(),rangeEnd:u.number()}),io=Da.extend({rangeStart:u.date().nullable(),rangeEnd:u.date().nullable()}),MI=io.extend({rangeStart:u.date(),rangeEnd:u.null()}),VI=io.extend({rangeStart:u.null(),rangeEnd:u.date()}),LI=io.extend({rangeStart:u.date(),rangeEnd:u.date()}),ad=Da.extend({rangeStart:u.null(),rangeEnd:u.null()}),sd=u.union([wI,_I,NI]),od=u.union([SI,CI,BI]),ld=u.union([MI,VI,LI,OI]),cd=u.union([sd,od,ld,id,ad]);function Pa(){return u.union([u.object({type:u.literal(n.ValueDescriptor)}),u.record(u.string(),u.any())])}function GI(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ValueDescriptor)})}function dd(){return u.object({id:u.string(),type:u.literal(n.ValueDescriptor),name:u.string(),required:u.boolean()})}function u9(){return dd().merge(u.object({version:u.number(),index:u.number()}))}function p9(){return dd().merge(u.object({}))}function y9(){return u.object({dataType:vr(),parent:Rr()})}function h9(){return u9().merge(y9())}function ao(){return u.union([u.object({type:u.literal(n.PrimitiveEntity)}),u.record(u.string(),u.any())])}function so(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.PrimitiveEntity)})}function oo(){return u.object({id:u.string(),type:u.literal(n.PrimitiveEntity),name:u.string(),description:u.string().nullable(),static:u.boolean(),abstract:u.boolean()})}function f9(){return oo().merge(u.object({version:u.number()}))}function m9(){return oo().merge(u.object({}))}function T9(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([ao(),mi()]))})}function E9(){return f9().merge(T9())}function br(){return u.union([u.object({type:u.literal(n.Property)}),u.record(u.string(),u.any())])}function $I(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Property)})}function ud(){return u.object({id:u.string(),type:u.literal(n.Property),name:u.string(),description:u.string().nullable(),private:u.boolean(),static:u.boolean(),required:u.boolean(),abstract:u.boolean()})}function b9(){return ud().merge(u.object({version:u.number(),index:u.number()}))}function R9(){return ud().merge(u.object({}))}function g9(){return u.object({dataType:vr(),implements:br().nullable(),parent:u.union([Pr(),so(),lo()])})}function v9(){return b9().merge(g9())}function I9(){return u.enum([V.CRON_JOB,V.EXECUTION,V.HTTP_ENDPOINT,V.PERSISTED_ENTITY,V.RELATIONAL_DATABASE])}function mi(){return u.union([u.object({type:u.literal(n.BuiltInBaseEntity)}),u.record(u.string(),u.any())])}function lo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BuiltInBaseEntity)})}function pd(){return u.object({id:u.string(),version:u.number(),type:u.literal(n.BuiltInBaseEntity),name:I9(),description:u.string().nullable(),abstract:u.boolean(),static:u.boolean()})}function D9(){return pd()}function P9(){return pd().merge(u.object({}))}function A9(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([mi(),ao()]))})}function O9(){return D9().merge(A9())}function ln(){return u.union([u.object({type:u.literal(n.ActionDescriptor)}),u.record(u.string(),u.any())])}function Rr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ActionDescriptor)})}function co(){return u.object({id:u.string(),type:u.literal(n.ActionDescriptor),name:u.string(),description:u.string().nullable()})}function S9(){return co().merge(u.object({version:u.number()}))}function C9(){return co().merge(u.object({}))}function B9(){return u.object({inputs:u.array(Pa()),outputs:u.array(Pa()),parent:u.union([Dt(),Pr(),lo(),so()]).nullable()})}function FI(){return S9().merge(B9())}function Ti(){return u.union([u.object({type:u.literal(n.Loop)}),u.record(u.string(),u.any())])}function cn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Loop)})}function UI(){return u.object({id:u.string(),type:u.literal(n.Loop)})}function w9(){return UI().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function _9(){return UI().merge(u.object({declaration:u.union([u.string(),wt()])}))}function N9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),declaration:ln(),inputs:u.array(Zt()),outputs:u.array(mt()),outputsDeclarations:u.array(Pa()),successCalls:u.array(He()),errorCalls:u.array(He()),error:mt(),body:wt(),parent:u.union([An(),Dt()]),breakStatements:u.array(gi()),continueStatements:u.array(Ei())})}function M9(){return w9().merge(N9())}function Ei(){return u.union([u.object({type:u.literal(n.ContinueStatement)}),u.record(u.string(),u.any())])}function bi(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ContinueStatement)})}function yd(){return u.object({id:u.string(),type:u.literal(n.ContinueStatement)})}function V9(){return yd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function L9(){return yd().merge(u.object({}))}function G9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:cn()})}function $9(){return V9().merge(G9())}function gr(){return u.union([u.object({type:u.literal(n.ReturnStatement)}),u.record(u.string(),u.any())])}function Ri(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnStatement)})}function hd(){return u.object({id:u.string(),type:u.literal(n.ReturnStatement)})}function F9(){return hd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function U9(){return hd().merge(u.object({}))}function x9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:An()})}function j9(){return F9().merge(x9())}function In(){return u.union([u.object({type:u.literal(n.ReturnDeclaration)}),u.record(u.string(),u.any())])}function xI(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnDeclaration)})}function fd(){return u.object({id:u.string(),type:u.literal(n.ReturnDeclaration),name:u.string(),description:u.string().nullable(),isError:u.boolean()})}function k9(){return fd().merge(u.object({version:u.number(),index:u.number()}))}function q9(){return fd().merge(u.object({}))}function J9(){return u.object({dataType:vr().nullable(),readsValue:wa().nullable(),parent:u.union([Ri(),Rr(),Dn(),bi()])})}function W9(){return k9().merge(J9())}function gi(){return u.union([u.object({type:u.literal(n.BreakStatement)}),u.record(u.string(),u.any())])}function Dn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BreakStatement)})}function md(){return u.object({id:u.string(),type:u.literal(n.BreakStatement)})}function Y9(){return md().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function H9(){return md().merge(u.object({}))}function z9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:cn()})}function Z9(){return Y9().merge(z9())}function mt(){return u.union([u.object({type:u.literal(n.OutputMap)}),u.record(u.string(),u.any())])}function Td(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.OutputMap)})}function Ed(){return u.object({id:u.string(),type:u.literal(n.OutputMap)})}function K9(){return Ed().merge(u.object({version:u.number(),index:u.number()}))}function X9(){return Ed().merge(u.object({}))}function Q9(){return u.object({writesValues:u.array(Pn()),declaration:u.union([In(),br()]),parent:u.union([Ee(),cn(),Dn()])})}function e6(){return K9().merge(Q9())}function vi(){return u.union([u.object({type:u.literal(n.FunctionCall)}),u.record(u.string(),u.any())])}function Aa(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionCall)})}function bd(){return u.object({id:u.string(),type:u.literal(n.FunctionCall)})}function t6(){return bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function n6(){return bd().merge(u.object({}))}function r6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:wt(),inputs:u.array(Zt()),outputs:u.array(mt()),error:u.optional(mt()),parent:u.union([An(),Dt()])})}function i6(){return t6().merge(r6())}function a6(){return u.enum([$e.Equal,$e.NotEqual,$e.MoreThan,$e.MoreThanOrEqual,$e.LessThan,$e.LessThanOrEqual,$e.And,$e.Or,Vt.Empty,Vt.NotEmpty])}function Oa(){return u.union([u.object({type:u.literal(n.Condition)}),u.record(u.string(),u.any())])}function uo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Condition)})}function Rd(){return u.object({id:u.string(),type:u.literal(n.Condition)})}function s6(){return Rd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function o6(){return Rd().merge(u.object({}))}function l6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),leftValue:Zt(),rightValue:Zt().nullable(),operator:a6(),parent:u.union([An(),Dt()])})}function c6(){return s6().merge(l6())}function Sa(){return u.union([u.object({type:u.literal(n.Search)}),u.record(u.string(),u.any())])}function Ca(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Search)})}function gd(){return u.object({id:u.string(),type:u.literal(n.Search),name:u.string(),query:u.any(),description:u.string().nullable()})}function d6(){return gd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function u6(){return gd().merge(u.object({}))}function p6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),inputsDeclarations:u.array(Dr()),inputs:u.array(Zt()),outputsDeclarations:u.array(Pa()),outputs:u.array(mt()),parent:u.union([An(),Dt()]),error:mt().nullable()})}function y6(){return d6().merge(p6())}function Ba(){return u.union([u.object({type:u.literal(n.InternalCall)}),u.record(u.string(),u.any())])}function vd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InternalCall)})}function Id(){return u.object({id:u.string(),type:u.literal(n.InternalCall),index:u.number()})}function h6(){return Id().merge(u.object({version:u.number(),index:u.number()}))}function f6(){return Id().merge(u.object({declaration:u.union([u.string(),wt()])}))}function m6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:wt(),inputs:u.array(Zt()),outputs:u.array(mt()),parent:Yn(),error:u.optional(mt())})}function T6(){return h6().merge(m6())}function Zt(){return u.union([u.object({type:u.literal(n.InputMap)}),u.record(u.string(),u.any())])}function po(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InputMap)})}function Dd(){return u.object({id:u.string(),type:u.literal(n.InputMap),name:u.string().nullable().optional(),description:u.string().nullable().optional()})}function E6(){return Dd().merge(u.object({version:u.number(),index:u.number()}))}function b6(){return Dd().merge(u.object({}))}function R6(){return u.object({defaultValue:Pd().nullable(),declaration:u.union([Dr(),br()]).nullable(),readsValue:wa().nullable(),parent:u.union([Ee(),po(),cn(),Dn()])})}function g6(){return E6().merge(R6())}function Ii(){return u.union([u.object({type:u.literal(n.Operation)}),u.record(u.string(),u.any())])}function Di(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Operation)})}function yo(){return u.object({id:u.string(),type:u.literal(n.Operation)})}function v6(){return yo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function I6(){return yo().merge(u.object({}))}function D6(){return yo().merge(u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:ln(),inputs:u.array(Zt()),outputs:u.array(mt()),error:u.array(mt()),parent:u.union([An(),Dt()])}))}function P6(){return v6().merge(D6())}function ho(){return u.union([u.string(),u.number(),u.boolean(),u.null(),u.date()])}function jI(){return u.record(u.string(),ho())}function A6(){return u.array(u.union([ho(),jI()]))}function kI(){return u.union([ho(),jI(),A6()])}function qI(){return u.union([ho(),kI()])}function JI(){return u.enum([I.String,I.Number,I.Boolean,I.Null,I.Date,I.KeyValue,I.Enum,I.File,I.UUID,I.EntityTemplate,I.ActionDescriptor])}function O6(){return u.union([Pr(),Di(),_a()])}function S6(){return u.object({id:u.string(),name:JI(),type:u.literal(n.PrimitiveValue),value:qI(),autogeneration:cd.nullable()})}function C6(){return S6().merge(u.object({}))}function Kt(){return u.object({id:u.string(),version:u.number(),name:JI(),type:u.literal(n.PrimitiveValue),value:qI(),valueAsType:O6().nullable(),autogeneration:cd.nullable(),parent:u.union([Ad(),po()])})}function B6(){return Kt().extend({name:u.literal(I.String),value:u.string(),autogeneration:sd.nullable()})}function w6(){return Kt().extend({name:u.literal(I.Number),value:u.number(),autogeneration:od.nullable()})}function _6(){return Kt().extend({name:u.literal(I.Boolean),value:u.boolean(),autogeneration:ad.nullable()})}function N6(){return Kt().extend({name:u.literal(I.Null),value:u.null(),autogeneration:u.null()})}function M6(){return Kt().extend({name:u.literal(I.Date),value:u.date(),autogeneration:ld.nullable()})}function V6(){return Kt().extend({name:u.literal(I.KeyValue),value:kI(),autogeneration:u.null()})}function L6(){return Kt().extend({name:u.literal(I.Enum),value:u.string(),autogeneration:u.null()})}function G6(){return Kt().extend({name:u.literal(I.File),value:u.string(),autogeneration:u.null()})}function $6(){return Kt().extend({name:u.literal(I.UUID),value:u.string(),autogeneration:id.nullable()})}function F6(){return Kt().extend({name:u.literal(I.EntityTemplate),value:Pr(),autogeneration:u.null()})}function U6(){return Kt().extend({name:u.literal(I.ActionDescriptor),value:_a(),autogeneration:u.null()})}function Pd(){return u.union([B6(),w6(),_6(),N6(),M6(),V6(),L6(),G6(),$6(),F6(),U6()])}function vr(){return u.union([u.object({type:u.literal(n.DataType)}),u.record(u.string(),u.any())])}function Ad(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.DataType)})}function Od(){return u.object({id:u.string(),type:u.literal(n.DataType),isNullable:u.boolean(),isList:u.boolean(),constant:u.boolean(),asType:u.boolean(),options:u.array(u.string()).optional()})}function x6(){return Od().merge(u.object({version:u.number()}))}function j6(){return Od().merge(u.object({}))}function k6(){return u.object({defaultValue:Pd().nullable(),entity:u.union([Pi(),mi(),ao(),ln()]).nullable(),parent:u.union([$I(),HI(),GI()])})}function q6(){return x6().merge(k6())}function Sd(){return u.union([u.object({type:u.literal(n.VariableDeclaration)}),u.record(u.string(),u.any())])}function J6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableDeclaration)})}function Cd(){return u.object({id:u.string(),type:u.literal(n.VariableDeclaration),name:u.string(),description:u.string().nullable()})}function W6(){return Cd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function Y6(){return Cd().merge(u.object({}))}function H6(){return u.object({dataType:vr().nullable(),readsValue:wa().nullable(),writesValues:u.array(Pn()),inputs:u.array(Zt()),outputs:u.array(mt()),successCalls:u.array(He()),errorCalls:u.array(He()),internalCalls:u.array(Ba()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),parent:u.union([An(),Dt()])})}function z6(){return W6().merge(H6())}function WI(){return u.union([u.object({type:u.literal(n.VariableInstance)}),u.record(u.string(),u.any())])}function Z6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableInstance)})}function Bd(){return u.object({id:u.string(),type:u.literal(n.VariableInstance)})}function K6(){return Bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function X6(){return Bd().merge(u.object({}))}function Q6(){return u.object({declaration:Sd(),dataType:vr().nullable(),readsValue:wa().nullable(),writesValues:u.array(Pn()),inputs:u.array(Zt()),outputs:u.array(mt()),successCalls:u.array(He()),errorCalls:u.array(He()),internalCalls:u.array(Ba()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),parent:u.union([An(),Dt()])})}function e3(){return K6().merge(Q6())}function wd(){return u.union([u.object({type:u.literal(n.InstalledProject)}),u.record(u.string(),u.any())])}function fo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InstalledProject)})}function t3(){return u.object({id:u.string(),type:u.literal(n.InstalledProject)})}function n3(){return u.object({version:u.number(),x:u.number(),y:u.number()})}function r3(){return u.object({})}function i3(){return u.object({implements:Dt(),description:u.string().nullable(),functions:u.array(wt()),events:u.array(_d()),parent:Dt()})}function a3(){return n3().merge(i3())}function _d(){return u.union([u.object({type:u.literal(n.GlobalEvent)}),u.record(u.string(),u.any())])}function s3(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.GlobalEvent)})}function mo(){return u.object({id:u.string(),type:u.literal(n.GlobalEvent),name:u.string(),collapsed:u.boolean()})}function o3(){return mo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function l3(){return mo().merge(u.object({}))}function c3(){return mo().merge(u.object({returnStatements:u.array(gr()),implements:u.array(FI()),inputs:u.array(Dr()),calls:u.array(He()),parent:u.union([Dt(),fo()])}))}function d3(){return o3().merge(c3())}function Ir(){return u.union([Sd(),WI()])}function Yn(){return u.union([J6(),Z6()])}function Pn(){return u.union([Ir(),Zt(),In()])}function YI(){return u.union([Yn(),po(),xI()])}function wa(){return u.union([Ir(),Dr(),mt(),Ii(),Ba(),vi()])}function u3(){return u.union([Yn(),Nd(),Td(),Di(),vd(),Aa()])}function p3(){return u.union([Dr(),mt(),Pn()])}function HI(){return u.union([Nd(),Td(),YI()])}function To(){return _d()}function Eo(){return s3()}function bo(){return u.union([Ii(),vi(),Oa(),Sa(),Ir(),Ba(),Ti()])}function Ee(){return u.union([Di(),Aa(),uo(),Ca(),Yn(),vd(),cn()])}function Ro(){return u.union([Ii(),vi(),Oa(),Sa(),Ir(),Ti()])}function go(){return u.union([Di(),Aa(),uo(),Ca(),Yn(),cn()])}function zI(){return u.union([bo(),gr(),gi(),Ei()])}function He(){return u.union([Ee(),Ri(),Dn(),bi()])}function ZI(){return u.union([Ro(),gr(),gi(),Ei()])}function KI(){return u.union([go(),Ri(),Dn(),bi()])}function Hn(){return u.union([wt(),To()])}function Ye(){return u.union([_a(),Eo()])}function y3(){return u.union([bo(),Hn()])}function h3(){return u.union([Ee(),Ye()])}function f3(){return u.union([Ro(),Hn()])}function m3(){return u.union([go(),Ye()])}function T3(){return u.union([zI(),Hn()])}function E3(){return u.union([He(),Ye()])}function b3(){return u.union([ZI(),Hn()])}function R3(){return u.union([KI(),Ye()])}function g3(){return u.union([Hn(),Ti()])}function An(){return u.union([Ye(),cn()])}function v3(){return u.union([bo(),Hn()])}function I3(){return u.union([Ee(),Ye()])}function D3(){return u.union([Ro(),Hn()])}function P3(){return u.union([go(),Ye()])}function A3(){return u.union([gr(),gi(),Ei()])}function O3(){return u.union([Ri(),Dn(),bi()])}function S3(){return u.union([mi(),U3(),wd(),Pi(),wt(),To(),Ir(),Zt(),mt(),Oa(),Ii(),vi(),In(),Dr(),ao(),vr(),br(),ln(),gr(),Ei(),gi(),Ti(),Sa(),ln(),ln(),Pa(),Ba()])}function C3(){return u.union([lo(),Dt(),fo(),Pr(),_a(),Eo(),Yn(),po(),Td(),uo(),Di(),Aa(),xI(),Nd(),so(),Ad(),$I(),Rr(),Ri(),bi(),Dn(),cn(),Ca(),Rr(),Rr(),GI(),vd()])}function B3(){return u.union([wd(),Pi(),wt(),To(),Ir(),Oa(),Ii(),vi(),gr(),Ei(),gi(),Ti(),Sa()])}function w3(){return u.union([fo(),Pr(),_a(),Eo(),Yn(),uo(),Di(),Aa(),Ri(),bi(),Dn(),cn(),Ca()])}function Dr(){return u.union([u.object({type:u.literal(n.ArgumentDeclaration)}),u.record(u.string(),u.any())])}function Nd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ArgumentDeclaration)})}function Md(){return u.object({id:u.string(),type:u.literal(n.ArgumentDeclaration)})}function _3(){return Md().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function N3(){return Md().merge(u.object({}))}function M3(){return u.object({dataType:vr().nullable(),writesValues:u.array(Pn()),parent:u.union([Ye(),Rr(),Rr(),Ca(),Dn()])})}function V3(){return _3().merge(M3())}function wt(){return u.union([u.object({type:u.literal(n.FunctionDeclaration)}),u.record(u.string(),u.any())])}function _a(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionDeclaration)})}function Vd(){return u.object({id:u.string(),type:u.literal(n.FunctionDeclaration),name:u.string(),description:u.string().nullable()})}function L3(){return Vd().merge(u.object({version:u.number(),x:u.number(),y:u.number(),index:u.number().nullable()}))}function G3(){return Vd()}function $3(){return u.object({inputs:u.array(Dr()),implements:ln().nullable(),returnStatements:u.array(gr()),parent:u.union([Dt(),fo(),Pr(),cn(),lo(),so()])})}function F3(){return L3().merge($3())}function U3(){return u.union([u.object({type:u.literal(n.Project)}),u.record(u.string(),u.any())])}function Dt(){return u.object({entityType:u.literal(n.Project),entityId:u.string(),id:u.string(),type:u.literal(n.GenericReference)})}function Ld(){return u.object({id:u.string(),type:u.literal(n.Project),name:u.string(),description:u.string().nullable()})}function x3(){return Ld().merge(u.object({version:u.number()}))}function j3(){return Ld()}function k3(){return u.object({entities:u.array(Pi()),functions:u.array(wt()),events:u.array(_d()),projects:u.array(wd()),variableDeclarations:u.array(Sd()),variableInstances:u.array(WI()),conditions:u.array(Oa()),operations:u.array(Ii()),functionCalls:u.array(vi()),loops:u.array(Ti()),searches:u.array(Sa())})}function q3(){return x3().merge(k3())}function Pi(){return u.union([u.object({type:u.literal(n.CustomEntity)}),u.record(u.string(),u.any())])}function Pr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.CustomEntity)})}function Gd(){return u.object({id:u.string(),type:u.literal(n.CustomEntity),name:u.string(),description:u.string().nullable(),static:u.boolean(),abstract:u.boolean()})}function J3(){return Gd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function W3(){return Gd().merge(u.object({}))}function Y3(){return u.union([Dt(),Ad()])}function H3(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([Pi(),mi()])),implements:u.array(u.union([Pi(),mi()])),parent:Y3()})}function z3(){return J3().merge(H3())}function Z3(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var K3=class extends Error{constructor(e,t){super(e,t);c(this,"name");c(this,"details");this.name="ZodValidationError",this.details=X3(t)}toString(){return this.message}};function X3(r){if(r){const e=r.cause;if(Z3(e))return e.issues}return[]}function Q3(r){return r.length!==0}var e5=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function t5(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+'["'+n5(t)+'"]';if(!e5.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function n5(r){return r.replace(/"/g,'\\"')}var r5="; ",i5=99,XI="Validation error",a5=": ",s5=", or ";function o5(r={}){const{issueSeparator:e=r5,unionSeparator:t=s5,prefixSeparator:i=a5,prefix:a=XI,includePath:s=!0,maxIssuesInMessage:o=i5}=r;return l=>{const p=l.slice(0,o).map(y=>vo({issue:y,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return l5(p,a,i)}}function vo(r){const{issue:e,issueSeparator:t,unionSeparator:i,includePath:a}=r;if(e.code===w.invalid_union)return e.unionErrors.reduce((s,o)=>{const l=o.issues.map(p=>vo({issue:p,issueSeparator:t,unionSeparator:i,includePath:a})).join(t);return s.includes(l)||s.push(l),s},[]).join(i);if(e.code===w.invalid_arguments)return[e.message,...e.argumentsError.issues.map(s=>vo({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(e.code===w.invalid_return_type)return[e.message,...e.returnTypeError.issues.map(s=>vo({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&Q3(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 "${t5(e.path)}"`}return e.message}function l5(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:XI}function c5(r,e={}){const i=d5(e)([r]);return new K3(i,{cause:new It([r])})}function d5(r){return"messageBuilder"in r?r.messageBuilder:o5(r)}var QI="1.13.7",eD=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Io=Array.prototype,$d=Object.prototype,tD=typeof Symbol<"u"?Symbol.prototype:null,u5=Io.push,Na=Io.slice,Ma=$d.toString,p5=$d.hasOwnProperty,nD=typeof ArrayBuffer<"u",y5=typeof DataView<"u",h5=Array.isArray,rD=Object.keys,iD=Object.create,aD=nD&&ArrayBuffer.isView,f5=isNaN,m5=isFinite,sD=!{toString:null}.propertyIsEnumerable("toString"),oD=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],T5=Math.pow(2,53)-1;function Pt(r,e){return e=e==null?r.length-1:+e,function(){for(var t=Math.max(arguments.length-e,0),i=Array(t),a=0;a<t;a++)i[a]=arguments[a+e];switch(e){case 0:return r.call(this,i);case 1:return r.call(this,arguments[0],i);case 2:return r.call(this,arguments[0],arguments[1],i)}var s=Array(e+1);for(a=0;a<e;a++)s[a]=arguments[a];return s[e]=i,r.apply(this,s)}}function zn(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function E5(r){return r===null}function lD(r){return r===void 0}function cD(r){return r===!0||r===!1||Ma.call(r)==="[object Boolean]"}function b5(r){return!!(r&&r.nodeType===1)}function lt(r){var e="[object "+r+"]";return function(t){return Ma.call(t)===e}}const Fd=lt("String"),dD=lt("Number"),R5=lt("Date"),g5=lt("RegExp"),v5=lt("Error"),uD=lt("Symbol"),pD=lt("ArrayBuffer");var yD=lt("Function"),I5=eD.document&&eD.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof I5!="function"&&(yD=function(r){return typeof r=="function"||!1});const Tt=yD,hD=lt("Object");var fD=y5&&(!/\[native code\]/.test(String(DataView))||hD(new DataView(new ArrayBuffer(8)))),Ud=typeof Map<"u"&&hD(new Map),D5=lt("DataView");function P5(r){return r!=null&&Tt(r.getInt8)&&pD(r.buffer)}const Do=fD?P5:D5,Ar=h5||lt("Array");function Zn(r,e){return r!=null&&p5.call(r,e)}var xd=lt("Arguments");(function(){xd(arguments)||(xd=function(r){return Zn(r,"callee")})})();const jd=xd;function A5(r){return!uD(r)&&m5(r)&&!isNaN(parseFloat(r))}function mD(r){return dD(r)&&f5(r)}function TD(r){return function(){return r}}function ED(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=T5}}function bD(r){return function(e){return e==null?void 0:e[r]}}const Po=bD("byteLength"),O5=ED(Po);var S5=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function C5(r){return aD?aD(r)&&!Do(r):O5(r)&&S5.test(Ma.call(r))}const RD=nD?C5:TD(!1),At=bD("length");function B5(r){for(var e={},t=r.length,i=0;i<t;++i)e[r[i]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,r.push(a)}}}function gD(r,e){e=B5(e);var t=oD.length,i=r.constructor,a=Tt(i)&&i.prototype||$d,s="constructor";for(Zn(r,s)&&!e.contains(s)&&e.push(s);t--;)s=oD[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function Qe(r){if(!zn(r))return[];if(rD)return rD(r);var e=[];for(var t in r)Zn(r,t)&&e.push(t);return sD&&gD(r,e),e}function Va(r){if(r==null)return!0;var e=At(r);return typeof e=="number"&&(Ar(r)||Fd(r)||jd(r))?e===0:At(Qe(r))===0}function vD(r,e){var t=Qe(e),i=t.length;if(r==null)return!i;for(var a=Object(r),s=0;s<i;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function se(r){if(r instanceof se)return r;if(!(this instanceof se))return new se(r);this._wrapped=r}se.VERSION=QI,se.prototype.value=function(){return this._wrapped},se.prototype.valueOf=se.prototype.toJSON=se.prototype.value,se.prototype.toString=function(){return String(this._wrapped)};function ID(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,Po(r))}var DD="[object DataView]";function kd(r,e,t,i){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:PD(r,e,t,i)}function PD(r,e,t,i){r instanceof se&&(r=r._wrapped),e instanceof se&&(e=e._wrapped);var a=Ma.call(r);if(a!==Ma.call(e))return!1;if(fD&&a=="[object Object]"&&Do(r)){if(!Do(e))return!1;a=DD}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 tD.valueOf.call(r)===tD.valueOf.call(e);case"[object ArrayBuffer]":case DD:return PD(ID(r),ID(e),t,i)}var s=a==="[object Array]";if(!s&&RD(r)){var o=Po(r);if(o!==Po(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&&!(Tt(l)&&l instanceof l&&Tt(p)&&p instanceof p)&&"constructor"in r&&"constructor"in e)return!1}t=t||[],i=i||[];for(var y=t.length;y--;)if(t[y]===r)return i[y]===e;if(t.push(r),i.push(e),s){if(y=r.length,y!==e.length)return!1;for(;y--;)if(!kd(r[y],e[y],t,i))return!1}else{var h=Qe(r),m;if(y=h.length,Qe(e).length!==y)return!1;for(;y--;)if(m=h[y],!(Zn(e,m)&&kd(r[m],e[m],t,i)))return!1}return t.pop(),i.pop(),!0}function w5(r,e){return kd(r,e)}function La(r){if(!zn(r))return[];var e=[];for(var t in r)e.push(t);return sD&&gD(r,e),e}function qd(r){var e=At(r);return function(t){if(t==null)return!1;var i=La(t);if(At(i))return!1;for(var a=0;a<e;a++)if(!Tt(t[r[a]]))return!1;return r!==SD||!Tt(t[Jd])}}var Jd="forEach",AD="has",Wd=["clear","delete"],OD=["get",AD,"set"],_5=Wd.concat(Jd,OD),SD=Wd.concat(OD),N5=["add"].concat(Wd,Jd,AD);const M5=Ud?qd(_5):lt("Map"),V5=Ud?qd(SD):lt("WeakMap"),L5=Ud?qd(N5):lt("Set"),G5=lt("WeakSet");function Ai(r){for(var e=Qe(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=r[e[a]];return i}function $5(r){for(var e=Qe(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],r[e[a]]];return i}function CD(r){for(var e={},t=Qe(r),i=0,a=t.length;i<a;i++)e[r[t[i]]]=t[i];return e}function Yd(r){var e=[];for(var t in r)Tt(r[t])&&e.push(t);return e.sort()}function Hd(r,e){return function(t){var i=arguments.length;if(e&&(t=Object(t)),i<2||t==null)return t;for(var a=1;a<i;a++)for(var s=arguments[a],o=r(s),l=o.length,p=0;p<l;p++){var y=o[p];(!e||t[y]===void 0)&&(t[y]=s[y])}return t}}const BD=Hd(La),Ao=Hd(Qe),wD=Hd(La,!0);function F5(){return function(){}}function _D(r){if(!zn(r))return{};if(iD)return iD(r);var e=F5();e.prototype=r;var t=new e;return e.prototype=null,t}function U5(r,e){var t=_D(r);return e&&Ao(t,e),t}function x5(r){return zn(r)?Ar(r)?r.slice():BD({},r):r}function j5(r,e){return e(r),r}function ND(r){return Ar(r)?r:[r]}se.toPath=ND;function Ga(r){return se.toPath(r)}function zd(r,e){for(var t=e.length,i=0;i<t;i++){if(r==null)return;r=r[e[i]]}return t?r:void 0}function MD(r,e,t){var i=zd(r,Ga(e));return lD(i)?t:i}function k5(r,e){e=Ga(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!Zn(r,a))return!1;r=r[a]}return!!t}function Zd(r){return r}function $a(r){return r=Ao({},r),function(e){return vD(e,r)}}function Kd(r){return r=Ga(r),function(e){return zd(e,r)}}function Fa(r,e,t){if(e===void 0)return r;switch(t??3){case 1:return function(i){return r.call(e,i)};case 3:return function(i,a,s){return r.call(e,i,a,s)};case 4:return function(i,a,s,o){return r.call(e,i,a,s,o)}}return function(){return r.apply(e,arguments)}}function VD(r,e,t){return r==null?Zd:Tt(r)?Fa(r,e,t):zn(r)&&!Ar(r)?$a(r):Kd(r)}function Xd(r,e){return VD(r,e,1/0)}se.iteratee=Xd;function Ot(r,e,t){return se.iteratee!==Xd?se.iteratee(r,e):VD(r,e,t)}function q5(r,e,t){e=Ot(e,t);for(var i=Qe(r),a=i.length,s={},o=0;o<a;o++){var l=i[o];s[l]=e(r[l],l,r)}return s}function LD(){}function J5(r){return r==null?LD:function(e){return MD(r,e)}}function W5(r,e,t){var i=Array(Math.max(0,r));e=Fa(e,t,1);for(var a=0;a<r;a++)i[a]=e(a);return i}function Qd(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const Ua=Date.now||function(){return new Date().getTime()};function GD(r){var e=function(s){return r[s]},t="(?:"+Qe(r).join("|")+")",i=RegExp(t),a=RegExp(t,"g");return function(s){return s=s==null?"":""+s,i.test(s)?s.replace(a,e):s}}const $D={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Y5=GD($D),H5=CD($D),z5=GD(H5),Z5=se.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var eu=/(.)^/,K5={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X5=/\\|'|\r|\n|\u2028|\u2029/g;function Q5(r){return"\\"+K5[r]}var ek=/^\s*(\w|\$)+\s*$/;function tk(r,e,t){!e&&t&&(e=t),e=wD({},e,se.templateSettings);var i=RegExp([(e.escape||eu).source,(e.interpolate||eu).source,(e.evaluate||eu).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(i,function(y,h,m,R,v){return s+=r.slice(a,v).replace(X5,Q5),a=v+y.length,h?s+=`'+
|
|
1
|
+
(function(d,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(d=typeof globalThis<"u"?globalThis:d||self,n(d["@elyx-code/project-logic-tree"]={}))})(this,function(d){"use strict";var Z7=Object.defineProperty;var K7=(d,n,V)=>n in d?Z7(d,n,{enumerable:!0,configurable:!0,writable:!0,value:V}):d[n]=V;var c=(d,n,V)=>(K7(d,typeof n!="symbol"?n+"":n,V),V);var n=(r=>(r.CustomEntity="custom-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.PrimitiveValue="primitive-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))(n||{}),V=(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))(V||{}),Je=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(Je||{}),I=(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))(I||{}),Qo=(r=>(r.DataTypeLiteralValue="data-type-literal-value",r))(Qo||{}),Te=(r=>(r.Addition="addition",r.Subtraction="subtraction",r.Multiplication="multiplication",r.Division="division",r.Remainder="remainder",r.Exponentiation="exponentiation",r))(Te||{}),K=(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))(K||{}),H=(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))(H||{}),le=(r=>(r.Parallel="parallel",r.Sequential="sequential",r.Wait="wait",r))(le||{}),ce=(r=>(r.CreateNewInstance="create-new-instance",r.Validate="validate",r))(ce||{}),tt=(r=>(r.HttpRequest="base-http-request",r))(tt||{}),$e=(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))($e||{}),Vt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Vt||{}),$=(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))($||{}),O=(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))(O||{}),Ze=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(Ze||{}),yn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(yn||{}),Ct=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Ct||{}),Yr=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(Yr||{});const Nn=[n.VariableDeclaration,n.VariableInstance,n.InputMap,n.ReturnDeclaration],xe=[n.VariableDeclaration,n.VariableInstance,n.ArgumentDeclaration,n.OutputMap],Yu=[...Nn,...xe],Fe=[n.VariableDeclaration,n.VariableInstance],Hr=[n.GlobalEvent],je=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.InternalCall,n.Loop],el=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.Loop],Ue=[n.FunctionDeclaration,...Hr],Mn=[...je,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],tl=[...el,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],hn=[...je,...Ue],Hu=[...el,...Ue],yA=[...Mn,...Ue],hA=[...tl,...Ue],ut=[...Ue,n.Loop],Ve=[n.ReturnStatement,n.BreakStatement,n.ContinueStatement],fA=[n.CustomEntity,n.BuiltInBaseEntity,n.Project,n.InstalledProject,n.GlobalEvent,n.DataType,n.FunctionCall,n.FunctionDeclaration,n.ActionDescriptor,n.ValueDescriptor,n.ArgumentDeclaration,n.InputMap,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.ReturnDeclaration,n.OutputMap,n.PrimitiveEntity,n.PrimitiveValue,n.Property,n.Operation,n.Condition,n.VariableDeclaration,n.VariableInstance,n.Search,n.Loop,n.InternalCall],nl=[n.CustomEntity,n.GlobalEvent,n.FunctionDeclaration,n.FunctionCall,n.VariableDeclaration,n.VariableInstance,n.Operation,n.Condition,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.InstalledProject,n.Loop,n.Search],zu=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor],zr=[n.BuiltInBaseEntity,n.PrimitiveEntity],mA=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.GlobalEvent,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor,n.InputMap,n.OutputMap,n.FunctionCall,n.Operation,n.Condition,n.ReturnStatement,n.BreakStatement,n.ContinueStatement,n.VariableInstance,n.PrimitiveValue,n.InternalCall];var rl=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(rl||{});const B={[n.PrimitiveEntity]:{[I.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[I.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[I.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[I.KeyValue]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[I.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"}}}}},[I.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[I.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[I.Null]:{id:"7d698f34-5a89-4aab-846b-07ef3843b8c4",properties:{}},[I.Untyped]:{id:"4044a018-818e-49d7-bf9a-c3dd1fff2102",properties:{}}},[n.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[n.BuiltInBaseEntity]:{[V.KEY_VALUE_PARAM]:{id:V.KEY_VALUE_PARAM},[V.HTTP_ENDPOINT]:{id:V.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"}}},[V.PERSISTED_ENTITY]:{id:V.PERSISTED_ENTITY,properties:{database:{id:"persisted-built-in-base-entity-database-property-id"}}},[V.RELATIONAL_DATABASE]:{id:V.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"}}},[V.CRON_JOB]:{id:V.CRON_JOB,properties:{expression:{id:"cron-job-built-in-base-entity-expression-property-id"}}}},[n.Operation]:{[K.Join]:{id:K.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"}}},[K.Split]:{id:K.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"}}},[Te.Addition]:{id:Te.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"}}},[Te.Subtraction]:{id:Te.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"}}},[tt.HttpRequest]:{id:tt.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"}}},[ce.Validate]:{id:ce.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"}}},[le.Parallel]:{id:le.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"}}}},[n.Loop]:{[$.List]:{id:$.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"}}}},[$.String]:{id:$.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"}}}},[$.ObjectKeys]:{id:$.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"}}}},[$.ObjectValues]:{id:$.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"}}}},[$.ManualFlow]:{id:$.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"}}}},[$.Counted]:{id:$.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"}}}}},[n.Condition]:{[$e.MoreThanOrEqual]:{id:$e.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"}}}},[Vt.NotEmpty]:{id:Vt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[n.GlobalEvent]:{[yn.PROJECT_PUBLICATION_COMPLETED]:{id:yn.PROJECT_PUBLICATION_COMPLETED}}},Lt=B[n.PrimitiveEntity],x={type:n.PrimitiveEntity,id:Lt.string.id,description:"A string of characters.",version:1,name:I.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Vn={type:n.PrimitiveEntity,id:Lt.boolean.id,description:"A 'true' or 'false' value.",version:1,name:I.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},X={type:n.PrimitiveEntity,id:Lt.number.id,description:"A number value.",version:1,name:I.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},TA={type:n.PrimitiveEntity,id:Lt.null.id,description:"An explicitly empty value.",version:1,name:I.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ke={type:n.PrimitiveEntity,id:Lt.untyped.id,description:"Data of any type that isn't known in advance.",version:1,name:I.Untyped,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Zu={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:n.GenericReference,entityId:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",entityType:n.DataType},Ku={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:n.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:n.Property},Xu={like:!1,inferred:!1,id:Lt.enum.properties.options.dataType.id,version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:Lt.enum.properties.options.dataType.defaultValue.id,type:n.PrimitiveValue,version:1,name:I.KeyValue,autogeneration:null,value:[],valueAsType:null,parent:Zu},parent:Ku},Qu={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:n.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:n.PrimitiveEntity},ep={primary:!1,hidden:!1,required:!0,id:Lt.enum.properties.options.id,name:"Options",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Xu,description:"Options for the enum. Each option is a text value.",parent:Qu},Ln={type:n.PrimitiveEntity,id:Lt.enum.id,description:"A set of text options to choose from.",version:1,name:I.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[ep],methods:[]},fn={type:n.PrimitiveEntity,id:Lt.date.id,description:"A date and time value.",version:1,name:I.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},za={type:n.PrimitiveEntity,id:Lt.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:I.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[x],properties:[],methods:[]},Li={type:n.PrimitiveEntity,id:Lt[I.KeyValue].id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:I.KeyValue,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Qt=B[n.Operation][Te.Addition],tp={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Qt.inputs.firstSummand.id,entityType:n.ValueDescriptor},np={like:!1,inferred:!1,id:"number-addition-first-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:tp},rp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Qt.inputs.secondSummand.id,entityType:n.ValueDescriptor},ip={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:rp},ap={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Qt.outputs.result.id,entityType:n.ValueDescriptor},sp={like:!1,inferred:!1,id:Qt.outputs.result.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ap},op={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Addition,entityType:n.ActionDescriptor},il={id:Qt.inputs.firstSummand.id,type:n.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",dataType:np,required:!0,parentRelationType:O.FixedArguments,index:0,parent:op},lp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Addition,entityType:n.ActionDescriptor},al={id:Qt.inputs.secondSummand.id,type:n.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",dataType:ip,required:!0,parentRelationType:O.FixedArguments,index:1,parent:lp},sl={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Addition,entityType:n.ActionDescriptor},ol={parentRelationType:O.FixedReturns,id:Qt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:sp,required:!0,index:0,parent:sl},cp={type:n.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Te.Addition,entityType:n.ActionDescriptor},dp={parentRelationType:O.FixedReturns,id:Qt.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:cp},up={type:n.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:Qt.inputs.dynamicSummand.id,entityType:n.ValueDescriptor},pp={like:!1,inferred:!1,id:"number-addition-operation-dynamic-summand-argument-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:up},yp={parentRelationType:O.DynamicArgument,id:Qt.inputs.dynamicSummand.id,type:n.ValueDescriptor,description:"A number to add",version:1,name:"Summand",dataType:pp,required:!0,index:2,parent:sl},Za={id:Te.Addition,type:n.ActionDescriptor,description:"Sum numbers",version:1,name:Te.Addition,inputs:[il,al,yp],error:dp,outputs:[ol],parent:null},en=B[n.Operation][Te.Subtraction],hp={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:en.inputs.minuend.id,entityType:n.ValueDescriptor},fp={like:!1,inferred:!1,id:"number-subtraction-first-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hp},mp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:en.inputs.subtrahend.id,entityType:n.ValueDescriptor},Tp={like:!1,inferred:!1,id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:mp},Ep={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:en.outputs.result.id,entityType:n.ValueDescriptor},bp={like:!1,inferred:!1,id:en.outputs.result.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ep},ll={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Rp={id:en.inputs.minuend.id,type:n.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",dataType:fp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ll},gp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Subtraction,entityType:n.ActionDescriptor},vp={id:en.inputs.subtrahend.id,type:n.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",dataType:Tp,required:!0,parentRelationType:O.FixedArguments,index:1,parent:gp},Ip={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Dp={parentRelationType:O.FixedReturns,id:en.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",dataType:bp,required:!0,index:0,parent:Ip},Pp={type:n.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Ap={parentRelationType:O.FixedReturns,id:en.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Pp},Op={type:n.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:en.inputs.dynamicSubtrahend.id,entityType:n.ValueDescriptor},Sp={like:!1,inferred:!1,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Op},Cp={id:en.inputs.dynamicSubtrahend.id,type:n.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",dataType:Sp,required:!0,parentRelationType:O.DynamicArgument,index:2,parent:ll},cl={id:Te.Subtraction,type:n.ActionDescriptor,description:"Substract numbers",version:1,name:Te.Subtraction,inputs:[Rp,vp,Cp],error:Ap,outputs:[Dp],parent:null},Bp={[Te.Addition]:Za,[Te.Subtraction]:cl},Jt=B[n.Operation][K.Join],wp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},_p={like:!1,inferred:!1,id:"join-strings-first-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:wp},Np={type:n.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Jt.inputs.second.id,entityType:n.ValueDescriptor},Mp={like:!1,inferred:!1,id:"join-strings-second-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Np},Vp={type:n.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Jt.outputs.result.id,entityType:n.ValueDescriptor},Lp={like:!1,inferred:!1,id:"join-strings-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Vp},Gp={type:n.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Ka={id:Jt.inputs.first.id,type:n.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.",dataType:_p,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Gp},$p={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},Fp={type:n.GenericReference,id:"join-strings-separator-string-data-type-default-value-parent-ref",entityId:"join-strings-separator-string-data-type-id",entityType:n.DataType},Up={parentRelationType:null,type:n.PrimitiveValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:I.String,value:"",valueAsType:null,autogeneration:null,parent:Fp},xp={like:!1,inferred:!1,id:"join-strings-separator-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:Up,constant:!1,parent:$p},jp={type:n.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},kp={id:Jt.inputs.separator.id,type:n.ValueDescriptor,version:1,name:"Separator",description:"The text value that will be inserted between each of the values that are joined.",dataType:xp,parentRelationType:O.FixedArguments,required:!1,index:0,parent:jp},qp={type:n.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Xa={id:Jt.inputs.second.id,type:n.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.",dataType:Mp,parentRelationType:O.FixedArguments,required:!0,index:2,parent:qp},Jp={type:n.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Gi={parentRelationType:O.FixedReturns,id:Jt.outputs.result.id,type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:Lp,required:!0,index:0,parent:Jp},Wp={type:n.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Yp={parentRelationType:O.FixedReturns,id:Jt.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Wp},Hp={type:n.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Jt.inputs.dynamicString.id,entityType:n.ValueDescriptor},zp={like:!1,inferred:!1,id:"join-strings-dynamic-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Hp},Zp={type:n.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Kp={id:Jt.inputs.dynamicString.id,type:n.ValueDescriptor,version:1,name:"Text",description:"Text to join to the previous ones. Its value will be at the end of the resulting text.",dataType:zp,parentRelationType:O.DynamicArgument,required:!0,index:3,parent:Zp},$i={id:K.Join,type:n.ActionDescriptor,version:1,name:K.Join,description:"Join text values together, to form a single resulting text value.",inputs:[kp,Ka,Xa,Kp],outputs:[Gi],error:Yp,parent:null},mn=B[n.Operation][K.Split],Xp={type:n.GenericReference,id:"split-string-string-argument-declaration",entityId:mn.inputs.stringValue.id,entityType:n.ValueDescriptor},Qp={like:!1,inferred:!1,id:"split-string-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Xp},ey={type:n.GenericReference,id:"split-string-index-argument-declaration",entityId:mn.inputs.indexLocation.id,entityType:n.ValueDescriptor},ty={like:!1,inferred:!1,id:"split-string-index-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ey},ny={type:n.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:mn.outputs.firstPartResult.id,entityType:n.ValueDescriptor},ry={like:!1,inferred:!1,id:"split-string-first-part-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ny},iy={type:n.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:mn.outputs.secondPartResult.id,entityType:n.ValueDescriptor},ay={like:!1,inferred:!1,id:"split-string-second-part-result-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iy},sy={type:n.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},oy={id:mn.inputs.stringValue.id,type:n.ValueDescriptor,version:1,name:"Text value",description:"The text value that will be split into two at the given index location.",dataType:Qp,parentRelationType:O.FixedArguments,required:!0,index:0,parent:sy},ly={type:n.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},cy={id:mn.inputs.indexLocation.id,type:n.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.",dataType:ty,parentRelationType:O.FixedArguments,required:!0,index:1,parent:ly},dy={type:n.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},EA={parentRelationType:O.FixedReturns,id:mn.outputs.secondPartResult.id,type:n.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",dataType:ay,required:!0,index:1,parent:dy},uy={type:n.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},py={parentRelationType:O.FixedReturns,id:mn.outputs.firstPartResult.id,type:n.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",dataType:ry,required:!0,index:0,parent:uy},yy={type:n.GenericReference,id:"split-string-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},hy={parentRelationType:O.FixedReturns,id:mn.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:yy},dl={id:K.Split,type:n.ActionDescriptor,version:1,name:K.Split,description:"Split a text into two, at the given index location.",inputs:[oy,cy],outputs:[py],error:hy,parent:null},fy={[K.Join]:$i,[K.Split]:dl};var my=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(my||{}),Ty=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(Ty||{});const Ey={type:n.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:n.ValueDescriptor},by={like:!1,inferred:!1,id:"join-list-first-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ey},Ry={type:n.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:n.ValueDescriptor},gy={like:!1,inferred:!1,id:"join-list-second-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ry},vy={type:n.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:n.ValueDescriptor},Iy={like:!1,inferred:!1,id:"join-list-result-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:vy},Dy={type:n.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},Py={id:"join-list-first-list-argument-declaration",type:n.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.",dataType:by,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Dy},Ay={type:n.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},Oy={id:"join-list-second-list-argument-declaration",type:n.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.",dataType:gy,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Ay},Sy={type:n.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},Cy={parentRelationType:O.FixedReturns,id:"join-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:Iy,required:!0,index:0,parent:Sy},By={type:n.GenericReference,id:"join-list-operation-error-parent-ref",entityId:H.Join,entityType:n.ActionDescriptor},wy={parentRelationType:O.FixedReturns,id:"join-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:By},ul={id:H.Join,type:n.ActionDescriptor,version:1,name:H.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[Py,Oy],error:wy,outputs:[Cy],parent:null};var _y=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(_y||{}),Ny=(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))(Ny||{});const My={type:n.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:n.ValueDescriptor},Vy={like:!1,inferred:!1,id:"split-list-operation-input-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:My},Ly={type:n.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:n.ValueDescriptor},Gy={like:!1,inferred:!1,id:"split-list-operation-split-index-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ly},pl={type:n.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:n.ValueDescriptor},$y={like:!1,inferred:!1,id:"split-list-operation-first-output-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:pl},Fy={type:n.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},Uy={id:"list-to-split-argument-declaration",type:n.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",dataType:Vy,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Fy},xy={type:n.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},jy={id:"split-list-index-argument-declaration",type:n.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.",dataType:Gy,parentRelationType:O.FixedArguments,required:!0,index:1,parent:xy},ky={type:n.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},qy={parentRelationType:O.FixedReturns,id:"split-list-first-output-list-return-delaration",type:n.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",dataType:$y,required:!0,index:0,parent:ky},Jy={like:!1,inferred:!1,id:"split-list-operation-second-output-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:pl},Wy={type:n.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},Yy={parentRelationType:O.FixedReturns,id:"split-list-second-output-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",dataType:Jy,required:!0,index:0,parent:Wy},Hy={type:n.GenericReference,id:"split-list-operation-error-parent-ref",entityId:H.Split,entityType:n.ActionDescriptor},zy={parentRelationType:O.FixedReturns,id:"split-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Hy},yl={id:H.Split,type:n.ActionDescriptor,version:1,name:H.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:[Uy,jy],outputs:[qy,Yy],error:zy,parent:null};var Zy=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(Zy||{}),Ky=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(Ky||{});const Xy={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:n.ValueDescriptor},Qy={like:!1,inferred:!1,id:"get-last-in-list-input-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Xy},eh={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:n.ValueDescriptor},th={like:!1,inferred:!1,id:"get-last-in-list-output-element-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:eh},nh={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},rh={id:"get-last-in-list-input-list-argument-declaration",type:n.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",dataType:Qy,parentRelationType:O.FixedArguments,required:!0,index:0,parent:nh},ih={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},ah={parentRelationType:O.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:n.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",dataType:th,required:!0,index:0,parent:ih},sh={type:n.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:H.GetLast,entityType:n.ActionDescriptor},oh={parentRelationType:O.FixedReturns,id:"get-last-in-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:sh},hl={id:H.GetLast,type:n.ActionDescriptor,version:1,name:H.GetLast,description:"Outputs the last element of a given list.",inputs:[rh],outputs:[ah],error:oh,parent:null};var lh=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(lh||{}),ch=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(ch||{});const dh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:n.ValueDescriptor},uh={like:!1,inferred:!1,id:"append-to-list-lsit-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:dh},ph={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:n.ValueDescriptor},yh={like:!1,inferred:!1,id:"append-to-list-second-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:ph},hh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:n.ValueDescriptor},fh={like:!1,inferred:!1,id:"append-to-list-result-list-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:hh},mh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},fl={id:"append-to-list-lsit-argument-declaration",type:n.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",dataType:uh,parentRelationType:O.FixedArguments,required:!0,index:0,parent:mh},Th={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},ml={id:"append-to-list-element-to-append-argument-declaration",type:n.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",dataType:yh,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Th},Eh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},bh={parentRelationType:O.FixedReturns,id:"append-to-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:fh,required:!0,index:0,parent:Eh},Rh={type:n.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:H.Append,entityType:n.ActionDescriptor},gh={parentRelationType:O.FixedReturns,id:"append-to-list-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Rh},Qa={id:H.Append,type:n.ActionDescriptor,version:1,name:H.Append,description:"Adds a given element to the end of a list value.",inputs:[fl,ml],error:gh,outputs:[bh],parent:null},vh={[H.Join]:ul,[H.Split]:yl,[H.GetLast]:hl,[H.Append]:Qa},Zr=B[n.Operation][le.Parallel],Ih={id:"parallel-execution-list-of-functions-blueprint-dynamic-output-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Dh={id:"parallel-execution-list-of-functions-blueprint-dynamic-input-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Ph={id:"parallel-execution-list-of-functions-blueprint-id",type:n.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:[Dh],outputs:[Ih],error:null,parent:null},Ah={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Zr.inputs.listOfActions.id,entityType:n.ValueDescriptor},Oh={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ph,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ah},Sh={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Zr.outputs.results.id,entityType:n.ValueDescriptor},Ch={like:!1,inferred:!1,id:Zr.outputs.results.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Sh},Bh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:le.Parallel,entityType:n.ActionDescriptor},Tl={id:Zr.inputs.listOfActions.id,type:n.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Oh,required:!0,index:0,parent:Bh,parentRelationType:O.FixedArguments},wh={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:le.Parallel,entityType:n.ActionDescriptor},El={id:Zr.outputs.results.id,type:n.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:Ch,required:!0,index:0,parent:wh,parentRelationType:O.FixedReturns},_h={type:n.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:le.Parallel,entityType:n.ActionDescriptor},Nh={id:Zr.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:_h,parentRelationType:O.ReturnedError},Wt={id:le.Parallel,type:n.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:le.Parallel,inputs:[Tl],outputs:[El],error:Nh,parent:null};var Mh=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(Mh||{}),Vh=(r=>(r.Error="wait-operation-error-return-delaration",r))(Vh||{});const Lh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:n.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},Gh={like:!1,inferred:!1,id:"wait-milliseconds-number-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Lh},$h={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:n.ActionDescriptor,entityId:le.Wait},nr={id:"wait-milliseconds-number-argument-declaration",type:n.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",dataType:Gh,required:!0,index:0,parent:$h,parentRelationType:O.FixedArguments},Fh={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:le.Wait,entityType:n.ActionDescriptor},Uh={id:"wait-operation-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Fh,parentRelationType:O.ReturnedError},pt={id:le.Wait,type:n.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:le.Wait,inputs:[nr],outputs:[],error:Uh,parent:null};var xh=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(xh||{}),jh=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(jh||{});const kh={id:"sequential-execution-list-of-functions-blueprint-dynamic-output-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"An output value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},qh={id:"sequential-execution-list-of-functions-blueprint-dynamic-input-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"An input value of any type, to be used in the action to be executed.",dataType:null,required:!1,index:0,parent:null,parentRelationType:O.DynamicArgument},Jh={id:"sequential-execution-list-of-functions-blueprint-id",type:n.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:[qh],outputs:[kh],error:null,parent:null},Wh={type:n.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:n.ValueDescriptor},Yh={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Jh,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Wh},Hh={type:n.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:n.ValueDescriptor},zh={like:!1,inferred:!1,id:"sequential-execution-list-of-execution-results-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Hh},Zh={type:n.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},bl={id:"sequential-execution-list-of-functions-argument-declaration",type:n.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Yh,required:!0,index:0,parent:Zh,parentRelationType:O.FixedArguments},Kh={type:n.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},Rl={id:"sequential-execution-result-return-delaration",type:n.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:zh,required:!0,index:0,parent:Kh,parentRelationType:O.FixedReturns},Xh={type:n.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},Qh={id:"sequential-execution-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Xh,parentRelationType:O.ReturnedError},Tn={id:le.Sequential,type:n.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:le.Sequential,inputs:[bl],outputs:[Rl],error:Qh,parent:null},ef={[le.Parallel]:Wt,[le.Wait]:pt,[le.Sequential]:Tn};var tf=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(tf||{}),nf=(r=>(r.Error="create-new-instance-error-return-delaration",r))(nf||{});const rf={type:n.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},af={type:n.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:n.ValueDescriptor},sf={like:!1,inferred:!1,id:"new-entity-data-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:af},of={id:"new-entity-data-argument-declaration",type:n.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:sf,required:!0,parentRelationType:O.FixedArguments,index:1,parent:rf},lf={type:n.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},cf={like:!1,inferred:!1,id:"entity-to-instanciate-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:lf},df={type:n.GenericReference,id:"create-new-instance-operation-ref",entityType:n.ActionDescriptor,entityId:ce.CreateNewInstance},uf={id:"entity-to-instanciate-argument-declaration",type:n.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",dataType:cf,required:!0,parentRelationType:O.FixedArguments,index:0,parent:df},pf={type:n.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},yf={parentRelationType:O.FixedReturns,id:"create-new-instance-output-entity-declaration",type:n.ValueDescriptor,version:1,dataType:null,name:"Created entity",description:"The entity that was created",parent:pf,required:!0,index:0},hf={type:n.GenericReference,id:"create-new-instance-error-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},ff={parentRelationType:O.FixedReturns,id:"create-new-instance-error-return-delaration",type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:hf},rr={id:ce.CreateNewInstance,type:n.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:ce.CreateNewInstance,inputs:[uf,of],outputs:[yf],error:ff,parent:null},Kr=B[n.Operation][ce.Validate],mf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Kr.inputs.dataToValidate.id},Tf={like:!1,inferred:!1,id:"validate-data-operation-data-to-validate-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:mf},Ef={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},bf={id:Kr.inputs.dataToValidate.id,type:n.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:Tf,required:!0,parentRelationType:O.FixedArguments,index:0,parent:Ef},Rf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Kr.inputs.entityToMatch.id},gf={like:!1,inferred:!1,id:"validate-data-operation-entity-to-match-type-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Rf},vf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},If={id:Kr.inputs.entityToMatch.id,type:n.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:gf,required:!0,index:0,parentRelationType:O.FixedArguments,parent:vf},Df={type:n.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Pf={id:Kr.outputs.outputEntity.id,type:n.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",parent:Df,required:!0,index:0,parentRelationType:O.FixedReturns},Af={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Of={id:Kr.outputs.error.id,type:n.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Af,parentRelationType:O.ReturnedError},ir={id:ce.Validate,type:n.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:ce.Validate,inputs:[If,bf],outputs:[Pf],error:Of,parent:null},Sf={[ce.CreateNewInstance]:rr,[ce.Validate]:ir},Xe=B[n.Operation]["base-http-request"],Cf={type:n.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:n.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},Bf={parentRelationType:null,id:"http-request-url-default-value-id",type:n.PrimitiveValue,version:1,value:"https://some-url.com",name:I.String,valueAsType:null,parent:Cf,autogeneration:null},wf={type:n.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Xe.inputs.url.id,entityType:n.ValueDescriptor},_f={like:!1,inferred:!1,id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:Bf,constant:!1,parent:wf},Nf={type:n.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Xe.inputs.query.id,entityType:n.ValueDescriptor},Mf={like:!1,inferred:!1,id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Nf},Vf={type:n.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:n.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},Lf={parentRelationType:null,id:"http-request-method-default-value-id",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,valueAsType:null,parent:Vf,autogeneration:null},Gf={type:n.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Xe.inputs.method.id,entityType:n.ValueDescriptor},$f={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:Lf,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:Gf},Ff={type:n.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Xe.inputs.headers.id,entityType:n.ValueDescriptor},Uf={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ff},xf={type:n.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Xe.inputs.body.id,entityType:n.ValueDescriptor},jf={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xf},kf={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Xe.outputs.code.id},qf={like:!1,inferred:!1,id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kf},Jf={type:n.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:n.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},Wf={type:n.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:n.ValueDescriptor,entityId:Xe.outputs.headers.id},Yf={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"http-response-headers-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:I.KeyValue,parent:Jf,valueAsType:null,autogeneration:null},constant:!1,parent:Wf},Hf={type:n.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:n.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},zf={type:n.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:n.ValueDescriptor,entityId:Xe.outputs.body.id},Zf={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"http-response-body-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:I.KeyValue,parent:Hf,valueAsType:null,autogeneration:null},constant:!1,parent:zf},Kf={type:n.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},es={id:Xe.inputs.method.id,type:n.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",dataType:$f,required:!1,index:0,parentRelationType:O.FixedArguments,parent:Kf},Xf={type:n.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ts={id:Xe.inputs.url.id,type:n.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:_f,required:!1,index:1,parentRelationType:O.FixedArguments,parent:Xf},Qf={type:n.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},gl={id:Xe.inputs.query.id,type:n.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",dataType:Mf,required:!1,index:2,parentRelationType:O.FixedArguments,parent:Qf},em={type:n.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ns={id:Xe.inputs.headers.id,type:n.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",dataType:Uf,required:!1,index:3,parent:em,parentRelationType:O.FixedArguments},tm={type:n.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},rs={id:Xe.inputs.body.id,type:n.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:jf,required:!1,index:4,parentRelationType:O.FixedArguments,parent:tm},nm={type:n.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},is={id:Xe.outputs.code.id,type:n.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",dataType:qf,required:!0,index:0,parentRelationType:O.FixedReturns,parent:nm},rm={type:n.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},as={parentRelationType:O.FixedReturns,id:Xe.outputs.headers.id,type:n.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",dataType:Yf,required:!0,index:1,parent:rm},im={type:n.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},ss={parentRelationType:O.FixedReturns,id:Xe.outputs.body.id,type:n.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",dataType:Zf,required:!0,index:2,parent:im},am={type:n.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:n.ActionDescriptor,entityId:tt.HttpRequest},sm={type:n.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:n.ValueDescriptor,entityId:Xe.outputs.error.id},om={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:sm},vl={parentRelationType:O.ReturnedError,id:Xe.outputs.error.id,type:n.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:om,required:!0,index:0,parent:am},Fi={type:n.ActionDescriptor,id:tt.HttpRequest,name:tt.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:[es,ts,gl,ns,rs],outputs:[is,as,ss],error:vl,parent:null},lm={[tt.HttpRequest]:Fi},bA={...fy,...Bp,...vh,...ef,...Sf,...lm},RA=B[n.Loop]["manual-flow-loop"],cm={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ManualFlow,entityType:n.ActionDescriptor},dm={id:RA.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:cm,parentRelationType:O.DynamicReturn},Il={id:$.ManualFlow,type:n.ActionDescriptor,version:1,name:$.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:[dm],error:null,parent:null},Ui=B[n.Loop]["manual-flow-loop"],um={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"manual-flow-loop-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},pm={like:!1,inferred:!1,id:"manual-flow-loop-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:um},ym={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},Dl={id:Ui.body.inputs.iterationNumber.id,type:n.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.",dataType:pm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:ym},hm={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},fm={id:"manual-flow-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:1,parentRelationType:O.DynamicArgument,parent:hm},mm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},Tm={id:"manual-flow-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:mm},Pl={id:Ui.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[Dl,fm],outputs:[Tm],error:null,parent:null},Em=B[n.Loop]["list-loop"],bm={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:n.ValueDescriptor},Rm={like:!1,inferred:!1,id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:bm},gm={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},vm={id:Em.inputs.list.id,type:n.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:Rm,index:0,parent:gm,parentRelationType:O.FixedArguments},Im={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},Dm={id:Em.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:Im,parentRelationType:O.DynamicReturn},ar={id:$.List,type:n.ActionDescriptor,version:1,name:$.List,description:"Iterates over a list of entities",inputs:[vm],outputs:[Dm],error:null,parent:null},sr=B[n.Loop]["list-loop"],Pm={id:"iterate-over-list-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},Am={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:Pm},Om={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},os={id:sr.body.inputs.currentValue.id,type:n.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.",dataType:Am,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Om},Sm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-list-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},Cm={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:Sm},Bm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},wm={id:sr.body.inputs.iterationNumber.id,type:n.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.",dataType:Cm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Bm},_m={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Nm={id:"iterate-over-list-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:_m},Mm={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Vm={id:"iterate-over-list-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:Mm},ls={id:sr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[wm,os,Nm],outputs:[Vm],error:null,parent:null},Lm=B[n.Loop]["string-loop"],Gm={id:"iterate-over-string-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},$m={like:!1,inferred:!1,id:"iterate-over-string-loop-string-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:Gm},Fm={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},Um={id:Lm.inputs.string.id,type:n.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",required:!0,dataType:$m,index:0,parent:Fm,parentRelationType:O.FixedArguments},xm={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},jm={id:Lm.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:xm,parentRelationType:O.DynamicReturn},cs={id:$.String,type:n.ActionDescriptor,version:1,name:$.String,description:"Iterates over a string of entities",inputs:[Um],outputs:[jm],error:null,parent:null},or=B[n.Loop]["string-loop"],km={id:"iterate-over-string-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},qm={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:km},Jm={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Al={id:or.body.inputs.currentValue.id,type:n.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.",dataType:qm,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Jm},Wm={id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-string-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},Ym={like:!1,inferred:!1,id:"iterate-over-string-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:Wm},Hm={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Ol={id:or.body.inputs.iterationNumber.id,type:n.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.",dataType:Ym,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Hm},zm={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Zm={id:"iterate-over-string-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:zm},Km={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Xm={id:"iterate-over-string-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:Km},Sl={id:or.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Ol,Al,Zm],outputs:[Xm],error:null,parent:null},Qm=B[n.Loop]["object-keys-loop"],eT={id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-object-argument-declaration-id",entityType:n.ValueDescriptor},tT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-object-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:null,parent:eT},nT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},rT={id:Qm.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:tT,index:0,parent:nT,parentRelationType:O.FixedArguments},iT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},aT={id:Qm.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:iT,parentRelationType:O.DynamicReturn},xi={id:$.ObjectKeys,type:n.ActionDescriptor,version:1,name:$.ObjectKeys,description:"Iterates over a object of entities",inputs:[rT],outputs:[aT],error:null,parent:null},lr=B[n.Loop]["object-keys-loop"],sT={id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},oT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:sT},lT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},Cl={id:lr.body.inputs.currentValue.id,type:n.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.",dataType:oT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:lT},cT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},dT={like:!1,inferred:!1,id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:cT},uT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},pT={id:lr.body.inputs.iterationNumber.id,type:n.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.",dataType:dT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:uT},yT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},hT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:yT},fT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},mT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:fT},TT={id:lr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[pT,Cl,hT],outputs:[mT],error:null,parent:null},ET=B[n.Loop]["object-values-loop"],bT={id:"iterate-over-object-values-loop-object-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-object-argument-declaration-id",entityType:n.ValueDescriptor},RT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-object-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:null,parent:bT},gT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},vT={id:ET.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:RT,index:0,parent:gT,parentRelationType:O.FixedArguments},IT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},DT={id:ET.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:IT,parentRelationType:O.DynamicReturn},ji={id:$.ObjectValues,type:n.ActionDescriptor,version:1,name:$.ObjectValues,description:"Iterates over a object of entities",inputs:[vT],outputs:[DT],error:null,parent:null},cr=B[n.Loop]["object-values-loop"],PT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-body-current-value-declaration-id",entityType:n.ValueDescriptor},AT={id:"iterate-over-object-values-loop-body-current-value-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:null,isNullable:!1,constant:!1,entity:null,asType:null,like:!1,inferred:!1,defaultValue:null,parent:PT},OT={id:"iterate-over-object-values-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},Bl={id:cr.body.inputs.currentValue.id,type:n.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.",dataType:AT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:OT},ST={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"iterate-over-object-values-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},CT={like:!1,inferred:!1,id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:ST},BT={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},wT={id:cr.body.inputs.iterationNumber.id,type:n.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.",dataType:CT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:BT},_T={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},NT={id:"iterate-over-object-values-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:2,parentRelationType:O.DynamicArgument,parent:_T},MT={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:cr.body.id,entityType:n.ActionDescriptor},VT={id:"iterate-over-object-values-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:MT},LT={id:cr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[wT,Bl,NT],outputs:[VT],error:null,parent:null},GT=B[n.Loop]["counted-loop"],$T={id:"counted-loop-string-argument-declaration-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-data-type-id",entityType:n.DataType},FT={parentRelationType:null,id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:n.PrimitiveValue,name:I.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:$T},UT={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},xT={like:!1,inferred:!1,id:"counted-loop-string-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:FT,parent:UT},jT={id:"counted-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},kT={id:GT.inputs.number.id,type:n.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:xT,index:0,parent:jT,parentRelationType:O.FixedArguments},qT={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},JT={id:GT.outputs.results.id,type:n.ValueDescriptor,version:1,name:"Ouput value",description:"An output value of the loop",required:!1,dataType:null,index:0,parent:qT,parentRelationType:O.DynamicReturn},ds={id:$.Counted,type:n.ActionDescriptor,version:1,name:$.Counted,description:"Iterates a given number of times",inputs:[kT],outputs:[JT],error:null,parent:null},ki=B[n.Loop]["counted-loop"],WT={id:"counted-loop-body-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-body-current-iteration-number-declaration-id",entityType:n.ValueDescriptor},YT={like:!1,inferred:!1,id:"counted-loop-body-current-iteration-number-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,isNullable:!1,constant:!1,entity:X,asType:!1,defaultValue:null,parent:WT},HT={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},wl={id:ki.body.inputs.iterationNumber.id,type:n.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.",dataType:YT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:HT},zT={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},ZT={id:"counted-loop-body-any-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values inputed to the loop's body as an aggregation of the respective values outputed.",dataType:null,required:!1,index:1,parentRelationType:O.DynamicArgument,parent:zT},KT={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:ki.body.id,entityType:n.ActionDescriptor},XT={id:"counted-loop-body-any-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any value",description:"Values outputed by the loop's body.",dataType:null,required:!1,index:0,parentRelationType:O.DynamicReturn,parent:KT},_l={id:ki.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[wl,ZT],outputs:[XT],error:null,parent:null},qi=B[n.BuiltInBaseEntity][V.HTTP_ENDPOINT].properties,QT={id:"endpointBuiltInCorsPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},eE={id:"endpointBuiltInCorsPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:qi.cors.id},tE={like:!1,inferred:!1,id:"endpointBuiltInCorsPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:["*"],parent:QT,autogeneration:null,valueAsType:null},parent:eE},nE={id:"endpointBuiltInBaseEntityRef",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},rE={primary:!1,hidden:!0,required:!0,id:qi.cors.id,name:"Allowed origins",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:tE,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:nE},iE={id:"endpointBuiltInPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInPathPropertyDataType"},aE={id:"endpointBuiltInPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:qi.path.id},sE={like:!1,inferred:!1,id:"endpointBuiltInPathPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.String,value:"/",parent:iE,autogeneration:null,valueAsType:null},parent:aE},oE={id:"endpointBuiltInBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Nl={primary:!1,hidden:!1,required:!0,id:qi.path.id,name:"Path",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:sE,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:oE},lE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},cE={id:"endpointBuiltInMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"endpointBuiltInMethodProperty"},dE={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ln,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{parentRelationType:null,id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,parent:lE,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:cE},uE={id:"endpointBuiltInBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Ml={primary:!1,hidden:!1,required:!0,id:qi.method.id,name:"Method",version:1,type:n.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:dE,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:uE},pE={id:"endpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestHeadersVariableDataType"},yE={id:"endpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},hE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:pE,autogeneration:null,valueAsType:null},parent:yE},fE={id:"endpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},mE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:fE},TE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},EE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},bE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:Li,defaultValue:{parentRelationType:null,id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:[],parent:TE,autogeneration:null,valueAsType:null},parent:EE},RE={id:"endpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointPathParamsVariableDataType"},gE={id:"endpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},vE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Li,asType:!1,defaultValue:{parentRelationType:null,id:"endpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:[],parent:RE,autogeneration:null,valueAsType:null},parent:gE},IE={id:"endpointReachedTriggerActionDescriptorRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Vl={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:n.ValueDescriptor,name:"Request headers",dataType:hE,required:!0,index:0,parentRelationType:O.FixedArguments,parent:IE},DE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ll={id:"endpointPathParamsArgumentDeclaration",type:n.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:vE,required:!0,index:1,parentRelationType:O.FixedArguments,parent:DE},PE={id:"endpointReachedTriggerActionDescriptorRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Gl={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:n.ValueDescriptor,name:"Request query params",dataType:bE,required:!0,index:2,parentRelationType:O.FixedArguments,parent:PE},AE={id:"endpointReachedTriggerActionDescriptorRefFour",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},$l={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ValueDescriptor,name:"Request body",dataType:mE,index:3,required:!0,parentRelationType:O.FixedArguments,parent:AE},OE={id:"endpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},SE={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:OE},CE={id:"endpointReturnStatementRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Fl={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:n.ValueDescriptor,name:"Response code",dataType:SE,required:!0,index:0,parentRelationType:O.FixedReturns,parent:CE},BE={id:"endpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointResponseHeadersDataType"},wE={id:"endpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},_E={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"endpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:BE,autogeneration:null,valueAsType:null},parent:wE},NE={id:"endpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Ul={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:n.ValueDescriptor,name:"Response headers",dataType:_E,required:!1,index:1,parentRelationType:O.FixedReturns,parent:NE},ME={id:"endpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},VE={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:ME},LE={id:"endpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},xl={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ValueDescriptor,name:"Response body",dataType:VE,required:!1,index:2,parentRelationType:O.FixedReturns,parent:LE},GE={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},jl={id:"endpointReachedTriggerActionDescriptor",type:n.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[Vl,Ll,Gl,$l],outputs:[Fl,Ul,xl],error:null,parent:GE},us={id:V.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:V.HTTP_ENDPOINT,type:n.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[rE,Nl,Ml],abstractMethods:[jl],extends:[],methods:[]},Gt=B[n.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,$E={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-identifier-property-data-type-id",entityType:n.DataType},FE={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:Gt.properties.identifier.id,entityType:n.Property},gA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:null,parent:$E,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:FE},Xr={id:"relational-database-built-in-base-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},ps={primary:!0,hidden:!1,required:!0,id:Gt.properties.identifier.id,name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:gA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Xr},vA={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:n.DataType},UE={id:"relational-database-built-in-base-entity-username-property-ref-id",type:n.GenericReference,entityId:Gt.properties.username.id,entityType:n.Property},IA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-username-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-id",entityType:n.DataType},autogeneration:null,valueAsType:null},parent:UE},ys={primary:!1,hidden:!1,required:!0,id:Gt.properties.username.id,name:"Username",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:IA,description:"The username that will be used to connect to the database.",parent:Xr},DA={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:n.DataType},xE={id:"relational-database-built-in-base-entity-password-property-ref-id",type:n.GenericReference,entityId:Gt.properties.password.id,entityType:n.Property},PA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:xE},hs={primary:!1,hidden:!1,required:!0,id:Gt.properties.password.id,name:"Password",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:PA,description:"The password that will be used to connect to the database.",parent:Xr},jE={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-min-size-property-data-type-id",entityType:n.DataType},kE={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:n.GenericReference,entityId:Gt.properties.minSize.id,entityType:n.Property},AA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:jE,autogeneration:null,valueAsType:null},parent:kE},fs={primary:!1,hidden:!0,required:!0,id:Gt.properties.minSize.id,name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:AA,description:"The minimum size of the database in GB.",parent:Xr},qE={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-default-property-data-type-id",entityType:n.DataType},JE={id:"relational-database-built-in-base-entity-default-property-ref-id",type:n.GenericReference,entityId:Gt.properties.default.id,entityType:n.Property},OA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Vn,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-default-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!1,parent:qE,autogeneration:null,valueAsType:null},parent:JE},kl={primary:!1,hidden:!0,required:!0,id:Gt.properties.default.id,name:"Default",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:OA,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Xr},WE={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:Gt.properties.autoscaling.id,entityType:n.Property},YE={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:n.GenericReference,entityId:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",entityType:n.DataType},SA={like:!1,inferred:!1,id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Vn,asType:!1,defaultValue:{parentRelationType:null,id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!1,parent:YE,autogeneration:null,valueAsType:null},parent:WE},HE={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},ql={primary:!1,hidden:!0,required:!0,id:Gt.properties.autoscaling.id,name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:SA,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:HE},En={id:V.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:V.RELATIONAL_DATABASE,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[ps,ys,hs,fs,kl,ql],abstractMethods:[],methods:[],extends:[]},zE={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.DeletePersistedEntity},Jl={type:n.FunctionDeclaration,id:Ct.DeletePersistedEntity,name:Ct.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:zE,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},CA=B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties,BA={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:n.DataType},ZE={id:"persisted-built-in-base-entity-database-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:n.Property},wA={like:!1,inferred:!1,id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:En,asType:!1,defaultValue:null,parent:ZE},KE={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},Qr={primary:!1,hidden:!0,required:!0,id:CA.database.id,name:"Database",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:wA,description:"The database that the entity belongs to.",parent:KE},nt={id:V.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:V.PERSISTED_ENTITY,type:n.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[Qr],methods:[Jl],extends:[]},XE={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.SoftDeletePersistedEntity},_A={type:n.FunctionDeclaration,id:Ct.SoftDeletePersistedEntity,name:Ct.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:XE,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},QE={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Wl={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:n.ActionDescriptor,description:"Executed when the cron job is triggered",inputs:[],error:null,outputs:[],parent:QE},eb=B[n.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,NA={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:n.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:n.DataType},tb={id:"cron-job-built-in-base-entity-expression-property-ref",type:n.GenericReference,entityId:eb.properties.expression.id,entityType:n.Property},MA={like:!1,inferred:!1,id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:tb},nb={id:"cron-job-built-in-base-entity-ref",type:n.GenericReference,entityId:V.CRON_JOB,entityType:n.BuiltInBaseEntity},rb={primary:!1,hidden:!1,required:!0,id:eb.properties.expression.id,name:"Cron expression",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:MA,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:nb},Yl={id:V.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:V.CRON_JOB,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[rb],methods:[],abstractMethods:[Wl],extends:[]},ib={type:n.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:n.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Hl={id:"execution-built-in-entity-abort-method-id",type:n.FunctionDeclaration,version:1,name:Ct.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:ib},zl={id:V.EXECUTION,type:n.BuiltInBaseEntity,version:1,name:V.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:[Hl],abstractMethods:[]},VA=B[n.Condition]["not-empty"],ab={type:n.GenericReference,id:"not-empty-condition-ref",entityType:n.ActionDescriptor,entityId:Vt.NotEmpty},sb={id:VA.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",dataType:null,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ab},dr={type:n.ActionDescriptor,id:Vt.NotEmpty,version:1,name:Vt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[sb],outputs:[],error:null},ob={[Vt.NotEmpty]:dr},ei=B[n.Condition]["more-than-or-equal"],lb={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:ei.inputs.leftHand.id},cb={type:n.DataType,id:ei.inputs.leftHand.dataType.id,version:1,entity:X,defaultValue:null,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,isNullable:!1,constant:!1,asType:!1,parent:lb},db={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},ub={id:ei.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:cb,required:!0,parentRelationType:O.FixedArguments,index:0,parent:db},pb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:ei.inputs.rightHand.id},yb={type:n.DataType,id:ei.inputs.rightHand.dataType.id,version:1,entity:X,defaultValue:null,like:!1,isList:!1,inferred:!1,andChildrenGroup:null,orChildrenGroup:null,isNullable:!1,constant:!1,asType:!1,parent:pb},hb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},fb={id:ei.inputs.rightHand.id,type:n.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:yb,required:!0,parentRelationType:O.FixedArguments,index:1,parent:hb},ti={type:n.ActionDescriptor,id:$e.MoreThanOrEqual,version:1,name:$e.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[ub,fb],outputs:[],error:null},mb={[$e.MoreThanOrEqual]:ti},LA={...ob,...mb},ms={type:n.ActionDescriptor,id:yn.PROJECT_PUBLICATION_COMPLETED,version:1,name:yn.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},GA={[yn.PROJECT_PUBLICATION_COMPLETED]:ms},Zl=B[n.ValueDescriptor][rl.ActionOngoingProcessOutputValue],Tb={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Zl.id},Eb={like:!1,inferred:!1,id:Zl.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zl,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Tb},Kl={id:Zl.id,type:n.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:Eb,required:!0,index:0,parent:null,parentRelationType:O.OngoingProcessExecution};var ne;(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 i(a,s=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(ne||(ne={}));var Xl;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Xl||(Xl={}));const G=ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gn=r=>{switch(typeof r){case"undefined":return G.undefined;case"string":return G.string;case"number":return isNaN(r)?G.nan:G.number;case"boolean":return G.boolean;case"function":return G.function;case"bigint":return G.bigint;case"symbol":return G.symbol;case"object":return Array.isArray(r)?G.array:r===null?G.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?G.promise:typeof Map<"u"&&r instanceof Map?G.map:typeof Set<"u"&&r instanceof Set?G.set:typeof Date<"u"&&r instanceof Date?G.date:G.object;default:return G.unknown}},w=ne.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"]),$A=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class It extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};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},i={_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)i._errors.push(t(o));else{let l=i,p=0;for(;p<o.path.length;){const y=o.path[p];p===o.path.length-1?(l[y]=l[y]||{_errors:[]},l[y]._errors.push(t(o))):l[y]=l[y]||{_errors:[]},l=l[y],p++}}};return a(this),i}static assert(e){if(!(e instanceof It))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},i=[];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))):i.push(e(a));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}}It.create=r=>new It(r);const ni=(r,e)=>{let t;switch(r.code){case w.invalid_type:r.received===G.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case w.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,ne.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:t=`Unrecognized key(s) in object: ${ne.joinValues(r.keys,", ")}`;break;case w.invalid_union:t="Invalid input";break;case w.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${ne.joinValues(r.options)}`;break;case w.invalid_enum_value:t=`Invalid enum value. Expected ${ne.joinValues(r.options)}, received '${r.received}'`;break;case w.invalid_arguments:t="Invalid function arguments";break;case w.invalid_return_type:t="Invalid function return type";break;case w.invalid_date:t="Invalid date";break;case w.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}"`:ne.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case w.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 w.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 w.custom:t="Invalid input";break;case w.invalid_intersection_types:t="Intersection results could not be merged";break;case w.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case w.not_finite:t="Number must be finite";break;default:t=e.defaultError,ne.assertNever(r)}return{message:t}};let bb=ni;function FA(r){bb=r}function Ts(){return bb}const Es=r=>{const{data:e,path:t,errorMaps:i,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=i.filter(y=>!!y).slice().reverse();for(const y of p)l=y(o,{data:e,defaultError:l}).message;return{...a,path:s,message:l}},UA=[];function L(r,e){const t=Ts(),i=Es({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ni?void 0:ni].filter(a=>!!a)});r.common.issues.push(i)}class it{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const i=[];for(const a of t){if(a.status==="aborted")return J;a.status==="dirty"&&e.dirty(),i.push(a.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const i=[];for(const a of t){const s=await a.key,o=await a.value;i.push({key:s,value:o})}return it.mergeObjectSync(e,i)}static mergeObjectSync(e,t){const i={};for(const a of t){const{key:s,value:o}=a;if(s.status==="aborted"||o.status==="aborted")return J;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}}const J=Object.freeze({status:"aborted"}),ri=r=>({status:"dirty",value:r}),yt=r=>({status:"valid",value:r}),Ql=r=>r.status==="aborted",ec=r=>r.status==="dirty",Ji=r=>r.status==="valid",Wi=r=>typeof Promise<"u"&&r instanceof Promise;function bs(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)}function Rb(r,e,t,i,a){if(i==="m")throw new TypeError("Private method is not writable");if(i==="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 i==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t}typeof SuppressedError=="function"&&SuppressedError;var j;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(j||(j={}));var Yi,Hi;class tn{constructor(e,t,i,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,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 gb=(r,e)=>{if(Ji(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 It(r.common.issues);return this._error=t,this._error}}};function Z(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:a}=r;if(e&&(t||i))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,y;const{message:h}=r;return o.code==="invalid_enum_value"?{message:h??l.defaultError}:typeof l.data>"u"?{message:(p=h??i)!==null&&p!==void 0?p:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(y=h??t)!==null&&y!==void 0?y:l.defaultError}},description:a}}class Q{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 Gn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new it,ctx:{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Wi(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 i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;const a={common:{issues:[],async:(i=t==null?void 0:t.async)!==null&&i!==void 0?i:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return gb(a,s)}async parseAsync(e,t){const i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){const i={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:Gn(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(Wi(a)?a:Promise.resolve(a));return gb(i,s)}refine(e,t){const i=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:w.custom,...i(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((i,a)=>e(i)?!0:(a.addIssue(typeof t=="function"?t(i,a):t),!1))}_refinement(e){return new zt({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return rn.create(this,this._def)}nullable(){return xn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ht.create(this,this._def)}promise(){return oi.create(this,this._def)}or(e){return Xi.create([this,e],this._def)}and(e){return Qi.create(this,e,this._def)}transform(e){return new zt({...Z(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ia({...Z(this._def),innerType:this,defaultValue:t,typeName:q.ZodDefault})}brand(){return new rc({typeName:q.ZodBranded,type:this,...Z(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new aa({...Z(this._def),innerType:this,catchValue:t,typeName:q.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return sa.create(this,e)}readonly(){return oa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xA=/^c[^\s-]{8,}$/i,jA=/^[0-9a-z]+$/,kA=/^[0-9A-HJKMNP-TV-Z]{26}$/,qA=/^[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,JA=/^[a-z0-9_-]{21}$/i,WA=/^[-+]?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)?)??$/,YA=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tc;const zA=/^(?:(?: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])$/,ZA=/^(([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})))$/,KA=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vb="((\\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])))",XA=new RegExp(`^${vb}$`);function Ib(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 QA(r){return new RegExp(`^${Ib(r)}$`)}function Db(r){let e=`${vb}T${Ib(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 eO(r,e){return!!((e==="v4"||!e)&&zA.test(r)||(e==="v6"||!e)&&ZA.test(r))}class Yt extends Q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==G.string){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.string,received:s.parsedType}),J}const i=new it;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.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?L(a,{code:w.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&L(a,{code:w.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")YA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"email",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")tc||(tc=new RegExp(HA,"u")),tc.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"emoji",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")qA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"uuid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")JA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"nanoid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")xA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"cuid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")jA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"cuid2",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")kA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"ulid",code:w.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),L(a,{validation:"url",code:w.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"regex",code:w.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.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),L(a,{code:w.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Db(s).test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?XA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?QA(s).test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?WA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"duration",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?eO(e.data,s.version)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"ip",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?KA.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"base64",code:w.invalid_string,message:s.message}),i.dirty()):ne.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(a=>e.test(a),{validation:t,code:w.invalid_string,...j.errToObj(i)})}_addCheck(e){return new Yt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...j.errToObj(e)})}url(e){return this._addCheck({kind:"url",...j.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...j.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...j.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...j.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...j.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...j.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...j.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...j.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...j.errToObj(e)})}datetime(e){var t,i;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:(i=e==null?void 0:e.local)!==null&&i!==void 0?i:!1,...j.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,...j.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...j.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...j.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...j.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...j.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...j.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...j.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...j.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...j.errToObj(t)})}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new Yt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Yt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Yt({...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}}Yt.create=r=>{var e;return new Yt({checks:[],typeName:q.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};function tO(r,e){const t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=t>i?t:i,s=parseInt(r.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class $n extends Q{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)!==G.number){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.number,received:s.parsedType}),J}let i;const a=new it;for(const s of this._def.checks)s.kind==="int"?ne.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),L(i,{code:w.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.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)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?tO(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_finite,message:s.message}),a.dirty()):ne.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,i,a){return new $n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new $n({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.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"&&ne.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$n.create=r=>new $n({checks:[],typeName:q.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class Fn extends Q{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)!==G.bigint){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.bigint,received:s.parsedType}),J}let i;const a=new it;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.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)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),L(i,{code:w.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):ne.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,i,a){return new Fn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Fn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.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}}Fn.create=r=>{var e;return new Fn({checks:[],typeName:q.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};class zi extends Q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==G.boolean){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.boolean,received:i.parsedType}),J}return yt(e.data)}}zi.create=r=>new zi({typeName:q.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class ur extends Q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==G.date){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_type,expected:G.date,received:s.parsedType}),J}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return L(s,{code:w.invalid_date}),J}const i=new it;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),L(a,{code:w.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):ne.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ur({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:j.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}}ur.create=r=>new ur({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:q.ZodDate,...Z(r)});class Rs extends Q{_parse(e){if(this._getType(e)!==G.symbol){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.symbol,received:i.parsedType}),J}return yt(e.data)}}Rs.create=r=>new Rs({typeName:q.ZodSymbol,...Z(r)});class Zi extends Q{_parse(e){if(this._getType(e)!==G.undefined){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.undefined,received:i.parsedType}),J}return yt(e.data)}}Zi.create=r=>new Zi({typeName:q.ZodUndefined,...Z(r)});class Ki extends Q{_parse(e){if(this._getType(e)!==G.null){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.null,received:i.parsedType}),J}return yt(e.data)}}Ki.create=r=>new Ki({typeName:q.ZodNull,...Z(r)});class ii extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return yt(e.data)}}ii.create=r=>new ii({typeName:q.ZodAny,...Z(r)});class pr extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return yt(e.data)}}pr.create=r=>new pr({typeName:q.ZodUnknown,...Z(r)});class bn extends Q{_parse(e){const t=this._getOrReturnCtx(e);return L(t,{code:w.invalid_type,expected:G.never,received:t.parsedType}),J}}bn.create=r=>new bn({typeName:q.ZodNever,...Z(r)});class gs extends Q{_parse(e){if(this._getType(e)!==G.undefined){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.void,received:i.parsedType}),J}return yt(e.data)}}gs.create=r=>new gs({typeName:q.ZodVoid,...Z(r)});class Ht extends Q{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),a=this._def;if(t.parsedType!==G.array)return L(t,{code:w.invalid_type,expected:G.array,received:t.parsedType}),J;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,l=t.data.length<a.exactLength.value;(o||l)&&(L(t,{code:o?w.too_big:w.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}),i.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(L(t,{code:w.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(L(t,{code:w.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>a.type._parseAsync(new tn(t,o,t.path,l)))).then(o=>it.mergeArray(i,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new tn(t,o,t.path,l)));return it.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new Ht({...this._def,minLength:{value:e,message:j.toString(t)}})}max(e,t){return new Ht({...this._def,maxLength:{value:e,message:j.toString(t)}})}length(e,t){return new Ht({...this._def,exactLength:{value:e,message:j.toString(t)}})}nonempty(e){return this.min(1,e)}}Ht.create=(r,e)=>new Ht({type:r,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...Z(e)});function ai(r){if(r instanceof ke){const e={};for(const t in r.shape){const i=r.shape[t];e[t]=rn.create(ai(i))}return new ke({...r._def,shape:()=>e})}else return r instanceof Ht?new Ht({...r._def,type:ai(r.element)}):r instanceof rn?rn.create(ai(r.unwrap())):r instanceof xn?xn.create(ai(r.unwrap())):r instanceof nn?nn.create(r.items.map(e=>ai(e))):r}class ke extends Q{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=ne.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==G.object){const y=this._getOrReturnCtx(e);return L(y,{code:w.invalid_type,expected:G.object,received:y.parsedType}),J}const{status:i,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof bn&&this._def.unknownKeys==="strip"))for(const y in a.data)o.includes(y)||l.push(y);const p=[];for(const y of o){const h=s[y],m=a.data[y];p.push({key:{status:"valid",value:y},value:h._parse(new tn(a,m,a.path,y)),alwaysSet:y in a.data})}if(this._def.catchall instanceof bn){const y=this._def.unknownKeys;if(y==="passthrough")for(const h of l)p.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(y==="strict")l.length>0&&(L(a,{code:w.unrecognized_keys,keys:l}),i.dirty());else if(y!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const y=this._def.catchall;for(const h of l){const m=a.data[h];p.push({key:{status:"valid",value:h},value:y._parse(new tn(a,m,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const y=[];for(const h of p){const m=await h.key,R=await h.value;y.push({key:m,value:R,alwaysSet:h.alwaysSet})}return y}).then(y=>it.mergeObjectSync(i,y)):it.mergeObjectSync(i,p)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new ke({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var a,s,o,l;const p=(o=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,t,i).message)!==null&&o!==void 0?o:i.defaultError;return t.code==="unrecognized_keys"?{message:(l=j.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:q.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ke({...this._def,catchall:e})}pick(e){const t={};return ne.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}omit(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new ke({...this._def,shape:()=>t})}deepPartial(){return ai(this)}partial(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{const a=this.shape[i];e&&!e[i]?t[i]=a:t[i]=a.optional()}),new ke({...this._def,shape:()=>t})}required(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof rn;)s=s._def.innerType;t[i]=s}}),new ke({...this._def,shape:()=>t})}keyof(){return Pb(ne.objectKeys(this.shape))}}ke.create=(r,e)=>new ke({shape:()=>r,unknownKeys:"strip",catchall:bn.create(),typeName:q.ZodObject,...Z(e)}),ke.strictCreate=(r,e)=>new ke({shape:()=>r,unknownKeys:"strict",catchall:bn.create(),typeName:q.ZodObject,...Z(e)}),ke.lazycreate=(r,e)=>new ke({shape:r,unknownKeys:"strip",catchall:bn.create(),typeName:q.ZodObject,...Z(e)});class Xi extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i=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 It(l.ctx.common.issues));return L(t,{code:w.invalid_union,unionErrors:o}),J}if(t.common.async)return Promise.all(i.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 i){const y={...t,common:{...t.common,issues:[]},parent:null},h=p._parseSync({data:t.data,path:t.path,parent:y});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:y}),y.common.issues.length&&o.push(y.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(p=>new It(p));return L(t,{code:w.invalid_union,unionErrors:l}),J}}get options(){return this._def.options}}Xi.create=(r,e)=>new Xi({options:r,typeName:q.ZodUnion,...Z(e)});const Rn=r=>r instanceof ta?Rn(r.schema):r instanceof zt?Rn(r.innerType()):r instanceof na?[r.value]:r instanceof Un?r.options:r instanceof ra?ne.objectValues(r.enum):r instanceof ia?Rn(r._def.innerType):r instanceof Zi?[void 0]:r instanceof Ki?[null]:r instanceof rn?[void 0,...Rn(r.unwrap())]:r instanceof xn?[null,...Rn(r.unwrap())]:r instanceof rc||r instanceof oa?Rn(r.unwrap()):r instanceof aa?Rn(r._def.innerType):[];class vs extends Q{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.object)return L(t,{code:w.invalid_type,expected:G.object,received:t.parsedType}),J;const i=this.discriminator,a=t.data[i],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}):(L(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){const a=new Map;for(const s of t){const o=Rn(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 vs({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...Z(i)})}}function nc(r,e){const t=Gn(r),i=Gn(e);if(r===e)return{valid:!0,data:r};if(t===G.object&&i===G.object){const a=ne.objectKeys(e),s=ne.objectKeys(r).filter(l=>a.indexOf(l)!==-1),o={...r,...e};for(const l of s){const p=nc(r[l],e[l]);if(!p.valid)return{valid:!1};o[l]=p.data}return{valid:!0,data:o}}else if(t===G.array&&i===G.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=nc(o,l);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===G.date&&i===G.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Qi extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Ql(s)||Ql(o))return J;const l=nc(s.value,o.value);return l.valid?((ec(s)||ec(o))&&t.dirty(),{status:t.value,value:l.data}):(L(i,{code:w.invalid_intersection_types}),J)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>a(s,o)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Qi.create=(r,e,t)=>new Qi({left:r,right:e,typeName:q.ZodIntersection,...Z(t)});class nn extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.array)return L(i,{code:w.invalid_type,expected:G.array,received:i.parsedType}),J;if(i.data.length<this._def.items.length)return L(i,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&i.data.length>this._def.items.length&&(L(i,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...i.data].map((o,l)=>{const p=this._def.items[l]||this._def.rest;return p?p._parse(new tn(i,o,i.path,l)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>it.mergeArray(t,o)):it.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new nn({...this._def,rest:e})}}nn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new nn({items:r,typeName:q.ZodTuple,rest:null,...Z(e)})};class ea extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.object)return L(i,{code:w.invalid_type,expected:G.object,received:i.parsedType}),J;const a=[],s=this._def.keyType,o=this._def.valueType;for(const l in i.data)a.push({key:s._parse(new tn(i,l,i.path,l)),value:o._parse(new tn(i,i.data[l],i.path,l)),alwaysSet:l in i.data});return i.common.async?it.mergeObjectAsync(t,a):it.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof Q?new ea({keyType:e,valueType:t,typeName:q.ZodRecord,...Z(i)}):new ea({keyType:Yt.create(),valueType:e,typeName:q.ZodRecord,...Z(t)})}}class Is extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.map)return L(i,{code:w.invalid_type,expected:G.map,received:i.parsedType}),J;const a=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([l,p],y)=>({key:a._parse(new tn(i,l,i.path,[y,"key"])),value:s._parse(new tn(i,p,i.path,[y,"value"]))}));if(i.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const p of o){const y=await p.key,h=await p.value;if(y.status==="aborted"||h.status==="aborted")return J;(y.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(y.value,h.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const p of o){const y=p.key,h=p.value;if(y.status==="aborted"||h.status==="aborted")return J;(y.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(y.value,h.value)}return{status:t.value,value:l}}}}Is.create=(r,e,t)=>new Is({valueType:e,keyType:r,typeName:q.ZodMap,...Z(t)});class yr extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==G.set)return L(i,{code:w.invalid_type,expected:G.set,received:i.parsedType}),J;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(L(i,{code:w.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(L(i,{code:w.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 y=new Set;for(const h of p){if(h.status==="aborted")return J;h.status==="dirty"&&t.dirty(),y.add(h.value)}return{status:t.value,value:y}}const l=[...i.data.values()].map((p,y)=>s._parse(new tn(i,p,i.path,y)));return i.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new yr({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new yr({...this._def,maxSize:{value:e,message:j.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}yr.create=(r,e)=>new yr({valueType:r,minSize:null,maxSize:null,typeName:q.ZodSet,...Z(e)});class si extends Q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.function)return L(t,{code:w.invalid_type,expected:G.function,received:t.parsedType}),J;function i(l,p){return Es({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ts(),ni].filter(y=>!!y),issueData:{code:w.invalid_arguments,argumentsError:p}})}function a(l,p){return Es({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ts(),ni].filter(y=>!!y),issueData:{code:w.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof oi){const l=this;return yt(async function(...p){const y=new It([]),h=await l._def.args.parseAsync(p,s).catch(v=>{throw y.addIssue(i(p,v)),y}),m=await Reflect.apply(o,this,h);return await l._def.returns._def.type.parseAsync(m,s).catch(v=>{throw y.addIssue(a(m,v)),y})})}else{const l=this;return yt(function(...p){const y=l._def.args.safeParse(p,s);if(!y.success)throw new It([i(p,y.error)]);const h=Reflect.apply(o,this,y.data),m=l._def.returns.safeParse(h,s);if(!m.success)throw new It([a(h,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new si({...this._def,args:nn.create(e).rest(pr.create())})}returns(e){return new si({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new si({args:e||nn.create([]).rest(pr.create()),returns:t||pr.create(),typeName:q.ZodFunction,...Z(i)})}}class ta extends Q{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})}}ta.create=(r,e)=>new ta({getter:r,typeName:q.ZodLazy,...Z(e)});class na extends Q{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:e.data}}get value(){return this._def.value}}na.create=(r,e)=>new na({value:r,typeName:q.ZodLiteral,...Z(e)});function Pb(r,e){return new Un({values:r,typeName:q.ZodEnum,...Z(e)})}class Un extends Q{constructor(){super(...arguments),Yi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return L(t,{expected:ne.joinValues(i),received:t.parsedType,code:w.invalid_type}),J}if(bs(this,Yi,"f")||Rb(this,Yi,new Set(this._def.values),"f"),!bs(this,Yi,"f").has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return L(t,{received:t.data,code:w.invalid_enum_value,options:i}),J}return yt(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 Un.create(e,{...this._def,...t})}exclude(e,t=this._def){return Un.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}Yi=new WeakMap,Un.create=Pb;class ra extends Q{constructor(){super(...arguments),Hi.set(this,void 0)}_parse(e){const t=ne.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==G.string&&i.parsedType!==G.number){const a=ne.objectValues(t);return L(i,{expected:ne.joinValues(a),received:i.parsedType,code:w.invalid_type}),J}if(bs(this,Hi,"f")||Rb(this,Hi,new Set(ne.getValidEnumValues(this._def.values)),"f"),!bs(this,Hi,"f").has(e.data)){const a=ne.objectValues(t);return L(i,{received:i.data,code:w.invalid_enum_value,options:a}),J}return yt(e.data)}get enum(){return this._def.values}}Hi=new WeakMap,ra.create=(r,e)=>new ra({values:r,typeName:q.ZodNativeEnum,...Z(e)});class oi extends Q{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.promise&&t.common.async===!1)return L(t,{code:w.invalid_type,expected:G.promise,received:t.parsedType}),J;const i=t.parsedType===G.promise?t.data:Promise.resolve(t.data);return yt(i.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}oi.create=(r,e)=>new oi({type:r,typeName:q.ZodPromise,...Z(e)});class zt extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:o=>{L(i,o),o.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const o=a.transform(i.data,s);if(i.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return J;const p=await this._def.schema._parseAsync({data:l,path:i.path,parent:i});return p.status==="aborted"?J:p.status==="dirty"||t.value==="dirty"?ri(p.value):p});{if(t.value==="aborted")return J;const l=this._def.schema._parseSync({data:o,path:i.path,parent:i});return l.status==="aborted"?J:l.status==="dirty"||t.value==="dirty"?ri(l.value):l}}if(a.type==="refinement"){const o=l=>{const p=a.refinement(l,s);if(i.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(i.common.async===!1){const l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?J:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(l=>l.status==="aborted"?J:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(a.type==="transform")if(i.common.async===!1){const o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Ji(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:i.data,path:i.path,parent:i}).then(o=>Ji(o)?Promise.resolve(a.transform(o.value,s)).then(l=>({status:t.value,value:l})):o);ne.assertNever(a)}}zt.create=(r,e,t)=>new zt({schema:r,typeName:q.ZodEffects,effect:e,...Z(t)}),zt.createWithPreprocess=(r,e,t)=>new zt({schema:e,effect:{type:"preprocess",transform:r},typeName:q.ZodEffects,...Z(t)});class rn extends Q{_parse(e){return this._getType(e)===G.undefined?yt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rn.create=(r,e)=>new rn({innerType:r,typeName:q.ZodOptional,...Z(e)});class xn extends Q{_parse(e){return this._getType(e)===G.null?yt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xn.create=(r,e)=>new xn({innerType:r,typeName:q.ZodNullable,...Z(e)});class ia extends Q{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===G.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ia.create=(r,e)=>new ia({innerType:r,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});class aa extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Wi(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}aa.create=(r,e)=>new aa({innerType:r,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});class Ds extends Q{_parse(e){if(this._getType(e)!==G.nan){const i=this._getOrReturnCtx(e);return L(i,{code:w.invalid_type,expected:G.nan,received:i.parsedType}),J}return{status:"valid",value:e.data}}}Ds.create=r=>new Ds({typeName:q.ZodNaN,...Z(r)});const nO=Symbol("zod_brand");class rc extends Q{_parse(e){const{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}}class sa extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?J:s.status==="dirty"?(t.dirty(),ri(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?J:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(e,t){return new sa({in:e,out:t,typeName:q.ZodPipeline})}}class oa extends Q{_parse(e){const t=this._def.innerType._parse(e),i=a=>(Ji(a)&&(a.value=Object.freeze(a.value)),a);return Wi(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}oa.create=(r,e)=>new oa({innerType:r,typeName:q.ZodReadonly,...Z(e)});function Ab(r,e={},t){return r?ii.create().superRefine((i,a)=>{var s,o;if(!r(i)){const l=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,p=(o=(s=l.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,y=typeof l=="string"?{message:l}:l;a.addIssue({code:"custom",...y,fatal:p})}}):ii.create()}const rO={object:ke.lazycreate};var q;(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"})(q||(q={}));const iO=(r,e={message:`Input not instance of ${r.name}`})=>Ab(t=>t instanceof r,e),Ps=Yt.create,ic=$n.create,aO=Ds.create,sO=Fn.create,ac=zi.create,Ob=ur.create,oO=Rs.create,lO=Zi.create,Sb=Ki.create,cO=ii.create,As=pr.create,dO=bn.create,uO=gs.create,pO=Ht.create,Cb=ke.create,yO=ke.strictCreate,hO=Xi.create,fO=vs.create,mO=Qi.create,TO=nn.create,Bb=ea.create,EO=Is.create,bO=yr.create,RO=si.create,gO=ta.create,vO=na.create,wb=Un.create,IO=ra.create,DO=oi.create,_b=zt.create,PO=rn.create,AO=xn.create,OO=zt.createWithPreprocess,SO=sa.create;var u=Object.freeze({__proto__:null,defaultErrorMap:ni,setErrorMap:FA,getErrorMap:Ts,makeIssue:Es,EMPTY_PATH:UA,addIssueToContext:L,ParseStatus:it,INVALID:J,DIRTY:ri,OK:yt,isAborted:Ql,isDirty:ec,isValid:Ji,isAsync:Wi,get util(){return ne},get objectUtil(){return Xl},ZodParsedType:G,getParsedType:Gn,ZodType:Q,datetimeRegex:Db,ZodString:Yt,ZodNumber:$n,ZodBigInt:Fn,ZodBoolean:zi,ZodDate:ur,ZodSymbol:Rs,ZodUndefined:Zi,ZodNull:Ki,ZodAny:ii,ZodUnknown:pr,ZodNever:bn,ZodVoid:gs,ZodArray:Ht,ZodObject:ke,ZodUnion:Xi,ZodDiscriminatedUnion:vs,ZodIntersection:Qi,ZodTuple:nn,ZodRecord:ea,ZodMap:Is,ZodSet:yr,ZodFunction:si,ZodLazy:ta,ZodLiteral:na,ZodEnum:Un,ZodNativeEnum:ra,ZodPromise:oi,ZodEffects:zt,ZodTransformer:zt,ZodOptional:rn,ZodNullable:xn,ZodDefault:ia,ZodCatch:aa,ZodNaN:Ds,BRAND:nO,ZodBranded:rc,ZodPipeline:sa,ZodReadonly:oa,custom:Ab,Schema:Q,ZodSchema:Q,late:rO,get ZodFirstPartyTypeKind(){return q},coerce:{string:r=>Yt.create({...r,coerce:!0}),number:r=>$n.create({...r,coerce:!0}),boolean:r=>zi.create({...r,coerce:!0}),bigint:r=>Fn.create({...r,coerce:!0}),date:r=>ur.create({...r,coerce:!0})},any:cO,array:pO,bigint:sO,boolean:ac,date:Ob,discriminatedUnion:fO,effect:_b,enum:wb,function:RO,instanceof:iO,intersection:mO,lazy:gO,literal:vO,map:EO,nan:aO,nativeEnum:IO,never:dO,null:Sb,nullable:AO,number:ic,object:Cb,oboolean:()=>ac().optional(),onumber:()=>ic().optional(),optional:PO,ostring:()=>Ps().optional(),pipeline:SO,preprocess:OO,promise:DO,record:Bb,set:bO,strictObject:yO,string:Ps,symbol:oO,transformer:_b,tuple:TO,undefined:lO,union:hO,unknown:As,void:uO,NEVER:J,ZodIssueCode:w,quotelessJson:$A,ZodError:It});function Nb(r){var a,s,o;if(!(r!=null&&r.dataType))return As();const e=r.dataType.isNullable||!1,t=r.dataType.isList||!1;let i=As();if(((a=r.dataType.entity)==null?void 0:a.type)===n.PrimitiveEntity)switch(r.dataType.entity.name){case I.String:i=Ps();break;case I.KeyValue:i=Bb(As());break;case I.Number:i=ic();break;case I.Boolean:i=ac();break;case I.Date:i=Ob();break;case I.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);i=wb(l);break}case I.Null:i=Sb();break;case I.UUID:i=Ps().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===n.CustomEntity)i=Mb(r.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=r.dataType.entity)==null?void 0:o.type}`);return e&&(i=i.nullable()),t&&(i=i.array()),i}function Mb(r){const e=Cb({});for(const t of r.properties){const i=Nb(t);e.shape[t.name]=i}return e}function Vb(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function Lb(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function Gb(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function $b(r){return r.rangeStart&&r.rangeEnd?Gb(r):r.rangeStart?Vb(r):r.rangeEnd?Lb(r):new Date}function CO(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Fb={},Os={},Ss={};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=wO;let Cs;const BO=new Uint8Array(16);function wO(){if(!Cs&&(Cs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cs(BO)}var jn={},hr={},Bs={};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var _O=/^(?:[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;Bs.default=_O,Object.defineProperty(hr,"__esModule",{value:!0}),hr.default=void 0;var NO=MO(Bs);function MO(r){return r&&r.__esModule?r:{default:r}}function VO(r){return typeof r=="string"&&NO.default.test(r)}var LO=VO;hr.default=LO,Object.defineProperty(jn,"__esModule",{value:!0}),jn.default=void 0,jn.unsafeStringify=Ub;var GO=$O(hr);function $O(r){return r&&r.__esModule?r:{default:r}}const rt=[];for(let r=0;r<256;++r)rt.push((r+256).toString(16).slice(1));function Ub(r,e=0){return rt[r[e+0]]+rt[r[e+1]]+rt[r[e+2]]+rt[r[e+3]]+"-"+rt[r[e+4]]+rt[r[e+5]]+"-"+rt[r[e+6]]+rt[r[e+7]]+"-"+rt[r[e+8]]+rt[r[e+9]]+"-"+rt[r[e+10]]+rt[r[e+11]]+rt[r[e+12]]+rt[r[e+13]]+rt[r[e+14]]+rt[r[e+15]]}function FO(r,e=0){const t=Ub(r,e);if(!(0,GO.default)(t))throw TypeError("Stringified UUID is invalid");return t}var UO=FO;jn.default=UO,Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=void 0;var xO=kO(Ss),jO=jn;function kO(r){return r&&r.__esModule?r:{default:r}}let xb,sc,oc=0,lc=0;function qO(r,e,t){let i=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||xb,o=r.clockseq!==void 0?r.clockseq:sc;if(s==null||o==null){const R=r.random||(r.rng||xO.default)();s==null&&(s=xb=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=sc=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:lc+1;const y=l-oc+(p-lc)/1e4;if(y<0&&r.clockseq===void 0&&(o=o+1&16383),(y<0||l>oc)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");oc=l,lc=p,sc=o,l+=122192928e5;const h=((l&268435455)*1e4+p)%4294967296;a[i++]=h>>>24&255,a[i++]=h>>>16&255,a[i++]=h>>>8&255,a[i++]=h&255;const m=l/4294967296*1e4&268435455;a[i++]=m>>>8&255,a[i++]=m&255,a[i++]=m>>>24&15|16,a[i++]=m>>>16&255,a[i++]=o>>>8|128,a[i++]=o&255;for(let R=0;R<6;++R)a[i+R]=s[R];return e||(0,jO.unsafeStringify)(a)}var JO=qO;Os.default=JO;var ws={},kn={},la={};Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var WO=YO(hr);function YO(r){return r&&r.__esModule?r:{default:r}}function HO(r){if(!(0,WO.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 zO=HO;la.default=zO,Object.defineProperty(kn,"__esModule",{value:!0}),kn.URL=kn.DNS=void 0,kn.default=eS;var ZO=jn,KO=XO(la);function XO(r){return r&&r.__esModule?r:{default:r}}function QO(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const jb="6ba7b810-9dad-11d1-80b4-00c04fd430c8";kn.DNS=jb;const kb="6ba7b811-9dad-11d1-80b4-00c04fd430c8";kn.URL=kb;function eS(r,e,t){function i(a,s,o,l){var p;if(typeof a=="string"&&(a=QO(a)),typeof s=="string"&&(s=(0,KO.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 y=new Uint8Array(16+a.length);if(y.set(s),y.set(a,s.length),y=t(y),y[6]=y[6]&15|e,y[8]=y[8]&63|128,o){l=l||0;for(let h=0;h<16;++h)o[l+h]=y[h];return o}return(0,ZO.unsafeStringify)(y)}try{i.name=r}catch{}return i.DNS=jb,i.URL=kb,i}var _s={};Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;function tS(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 nS(rS(iS(r),r.length*8))}function nS(r){const e=[],t=r.length*32,i="0123456789abcdef";for(let a=0;a<t;a+=8){const s=r[a>>5]>>>a%32&255,o=parseInt(i.charAt(s>>>4&15)+i.charAt(s&15),16);e.push(o)}return e}function qb(r){return(r+64>>>9<<4)+14+1}function rS(r,e){r[e>>5]|=128<<e%32,r[qb(e)-1]=e;let t=1732584193,i=-271733879,a=-1732584194,s=271733878;for(let o=0;o<r.length;o+=16){const l=t,p=i,y=a,h=s;t=at(t,i,a,s,r[o],7,-680876936),s=at(s,t,i,a,r[o+1],12,-389564586),a=at(a,s,t,i,r[o+2],17,606105819),i=at(i,a,s,t,r[o+3],22,-1044525330),t=at(t,i,a,s,r[o+4],7,-176418897),s=at(s,t,i,a,r[o+5],12,1200080426),a=at(a,s,t,i,r[o+6],17,-1473231341),i=at(i,a,s,t,r[o+7],22,-45705983),t=at(t,i,a,s,r[o+8],7,1770035416),s=at(s,t,i,a,r[o+9],12,-1958414417),a=at(a,s,t,i,r[o+10],17,-42063),i=at(i,a,s,t,r[o+11],22,-1990404162),t=at(t,i,a,s,r[o+12],7,1804603682),s=at(s,t,i,a,r[o+13],12,-40341101),a=at(a,s,t,i,r[o+14],17,-1502002290),i=at(i,a,s,t,r[o+15],22,1236535329),t=st(t,i,a,s,r[o+1],5,-165796510),s=st(s,t,i,a,r[o+6],9,-1069501632),a=st(a,s,t,i,r[o+11],14,643717713),i=st(i,a,s,t,r[o],20,-373897302),t=st(t,i,a,s,r[o+5],5,-701558691),s=st(s,t,i,a,r[o+10],9,38016083),a=st(a,s,t,i,r[o+15],14,-660478335),i=st(i,a,s,t,r[o+4],20,-405537848),t=st(t,i,a,s,r[o+9],5,568446438),s=st(s,t,i,a,r[o+14],9,-1019803690),a=st(a,s,t,i,r[o+3],14,-187363961),i=st(i,a,s,t,r[o+8],20,1163531501),t=st(t,i,a,s,r[o+13],5,-1444681467),s=st(s,t,i,a,r[o+2],9,-51403784),a=st(a,s,t,i,r[o+7],14,1735328473),i=st(i,a,s,t,r[o+12],20,-1926607734),t=ot(t,i,a,s,r[o+5],4,-378558),s=ot(s,t,i,a,r[o+8],11,-2022574463),a=ot(a,s,t,i,r[o+11],16,1839030562),i=ot(i,a,s,t,r[o+14],23,-35309556),t=ot(t,i,a,s,r[o+1],4,-1530992060),s=ot(s,t,i,a,r[o+4],11,1272893353),a=ot(a,s,t,i,r[o+7],16,-155497632),i=ot(i,a,s,t,r[o+10],23,-1094730640),t=ot(t,i,a,s,r[o+13],4,681279174),s=ot(s,t,i,a,r[o],11,-358537222),a=ot(a,s,t,i,r[o+3],16,-722521979),i=ot(i,a,s,t,r[o+6],23,76029189),t=ot(t,i,a,s,r[o+9],4,-640364487),s=ot(s,t,i,a,r[o+12],11,-421815835),a=ot(a,s,t,i,r[o+15],16,530742520),i=ot(i,a,s,t,r[o+2],23,-995338651),t=lt(t,i,a,s,r[o],6,-198630844),s=lt(s,t,i,a,r[o+7],10,1126891415),a=lt(a,s,t,i,r[o+14],15,-1416354905),i=lt(i,a,s,t,r[o+5],21,-57434055),t=lt(t,i,a,s,r[o+12],6,1700485571),s=lt(s,t,i,a,r[o+3],10,-1894986606),a=lt(a,s,t,i,r[o+10],15,-1051523),i=lt(i,a,s,t,r[o+1],21,-2054922799),t=lt(t,i,a,s,r[o+8],6,1873313359),s=lt(s,t,i,a,r[o+15],10,-30611744),a=lt(a,s,t,i,r[o+6],15,-1560198380),i=lt(i,a,s,t,r[o+13],21,1309151649),t=lt(t,i,a,s,r[o+4],6,-145523070),s=lt(s,t,i,a,r[o+11],10,-1120210379),a=lt(a,s,t,i,r[o+2],15,718787259),i=lt(i,a,s,t,r[o+9],21,-343485551),t=qn(t,l),i=qn(i,p),a=qn(a,y),s=qn(s,h)}return[t,i,a,s]}function iS(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(qb(e));for(let i=0;i<e;i+=8)t[i>>5]|=(r[i/8]&255)<<i%32;return t}function qn(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function aS(r,e){return r<<e|r>>>32-e}function Ns(r,e,t,i,a,s){return qn(aS(qn(qn(e,r),qn(i,s)),a),t)}function at(r,e,t,i,a,s,o){return Ns(e&t|~e&i,r,e,a,s,o)}function st(r,e,t,i,a,s,o){return Ns(e&i|t&~i,r,e,a,s,o)}function ot(r,e,t,i,a,s,o){return Ns(e^t^i,r,e,a,s,o)}function lt(r,e,t,i,a,s,o){return Ns(t^(e|~i),r,e,a,s,o)}var sS=tS;_s.default=sS,Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var oS=Jb(kn),lS=Jb(_s);function Jb(r){return r&&r.__esModule?r:{default:r}}var cS=(0,oS.default)("v3",48,lS.default);ws.default=cS;var Ms={},Vs={};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=void 0;var dS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Vs.default=dS,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var Wb=Yb(Vs),uS=Yb(Ss),pS=jn;function Yb(r){return r&&r.__esModule?r:{default:r}}function yS(r,e,t){if(Wb.default.randomUUID&&!e&&!r)return Wb.default.randomUUID();r=r||{};const i=r.random||(r.rng||uS.default)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=i[a];return e}return(0,pS.unsafeStringify)(i)}var hS=yS;Ms.default=hS;var Ls={},Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=void 0;function fS(r,e,t,i){switch(r){case 0:return e&t^~e&i;case 1:return e^t^i;case 2:return e&t^e&i^t&i;case 3:return e^t^i}}function cc(r,e){return r<<e|r>>>32-e}function mS(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 i=r.length/4+2,a=Math.ceil(i/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]=cc(l[v-3]^l[v-8]^l[v-14]^l[v-16],1);let p=t[0],y=t[1],h=t[2],m=t[3],R=t[4];for(let v=0;v<80;++v){const P=Math.floor(v/20),A=cc(p,5)+fS(P,y,h,m)+R+e[P]+l[v]>>>0;R=m,m=h,h=cc(y,30)>>>0,y=p,p=A}t[0]=t[0]+p>>>0,t[1]=t[1]+y>>>0,t[2]=t[2]+h>>>0,t[3]=t[3]+m>>>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 TS=mS;Gs.default=TS,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;var ES=Hb(kn),bS=Hb(Gs);function Hb(r){return r&&r.__esModule?r:{default:r}}var RS=(0,ES.default)("v5",80,bS.default);Ls.default=RS;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.default=void 0;var gS="00000000-0000-0000-0000-000000000000";$s.default=gS;var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=void 0;var vS=IS(hr);function IS(r){return r&&r.__esModule?r:{default:r}}function DS(r){if(!(0,vS.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var PS=DS;Fs.default=PS,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 y.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 i.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(Os),t=h(ws),i=h(Ms),a=h(Ls),s=h($s),o=h(Fs),l=h(hr),p=h(jn),y=h(la);function h(m){return m&&m.__esModule?m:{default:m}}}(Fb);function dc(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}dc.prototype.convert=function(r){var e,t,i,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,i=0,e=0;e<l;e++)t=t*s+a[e],t>=o?(a[i++]=parseInt(t/o,10),t=t%o):i>0&&(a[i++]=0);l=i,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(i!==0);return p},dc.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var AS=dc,OS=AS;function ca(r,e){var t=new OS(r,e);return function(i){return t.convert(i)}}ca.BIN="01",ca.OCT="01234567",ca.DEC="0123456789",ca.HEX="0123456789abcdef";var SS=ca;const{v4:uc,validate:CS}=Fb,Us=SS,pc={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},BS={consistentLength:!0};let yc;const zb=(r,e,t)=>{const i=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},Zb=(r,e)=>{const i=e(r).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[i[1],i[2],i[3],i[4],i[5]].join("-")},wS=r=>Math.ceil(Math.log(2**128)/Math.log(r));var _S=(()=>{const r=(e,t)=>{const i=e||pc.flickrBase58,a={...BS,...t};if([...new Set(Array.from(i))].length!==i.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const s=wS(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},l=Us(Us.HEX,i),p=Us(i,Us.HEX),y=()=>zb(uc(),l,o),m={alphabet:i,fromUUID:R=>zb(R,l,o),maxLength:s,generate:y,new:y,toUUID:R=>Zb(R,p),uuid:uc,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const P=a.consistentLength?R.length===s:R.length<=s,A=R.split("").every(D=>i.includes(D));return v===!1?P&&A:P&&A&&CS(Zb(R,p))}};return Object.freeze(m),m};return r.constants=pc,r.uuid=uc,r.generate=()=>(yc||(yc=r(pc.flickrBase58).generate),yc()),r})();const xs=CO(_S);function Kb(){return xs().uuid()}function Xb(r){return r.rangeStart+Math.random()}function Qb(r){const e=r.rangeEnd;return Math.random()*e}function eR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function tR(r){return r.rangeStart&&r.rangeEnd?eR(r):r.rangeStart?Xb(r):r.rangeEnd?Qb(r):Math.random()}function nR(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function rR(r){const e=r.rangeEnd;return Math.random().toString(36).substring(0,e)}function iR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random().toString(36).substring(e,t)}function aR(r){return r.rangeStart&&r.rangeEnd?iR(r):r.rangeStart?nR(r):r.rangeEnd?rR(r):Math.random().toString(36)}function sR(r){return Math.random()>=.5}function NS(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case Je.CurrentDateAndTime:if(r.name===I.Date)return new Date;case Je.Random:{if(r.name===I.Date)return $b(r.autogeneration);if(r.name===I.Number)return tR(r.autogeneration);if(r.name===I.String)return aR(r.autogeneration);if(r.name===I.Boolean)return sR(r.autogeneration)}case Je.Unique:if(r.name===I.UUID)return Kb();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const W="e7eb5382-3d99-44fd-972a-b8b1e819f6be",hc="global-user-variable-id",oR="last-executed-timestamp-variable-id",MS={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-data-type-id",entityType:n.DataType},VS={id:"alternative-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:n.Property},LS={like:!1,inferred:!1,id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:null,parent:MS,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:VS},js={id:"alternative-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},GS={primary:!0,hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:0,dataType:LS,description:"The name of the main database inside of the server instance where the data will be stored.",parent:js};n.GenericReference,n.DataType;const $S={id:"alternative-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:n.Property},FS={like:!1,inferred:!1,id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:$S},US={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:1,dataType:FS,description:"The username that will be used to connect to the database.",parent:js};n.GenericReference,n.DataType;const xS={id:"alternative-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:n.Property},jS={like:!1,inferred:!1,id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:xS},kS={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:hs,static:!0,index:2,dataType:jS,description:"The password that will be used to connect to the database.",parent:js},qS={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-data-type-id",entityType:n.DataType},JS={id:"alternative-relational-database-entity-min-size-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:n.Property},WS={like:!1,inferred:!1,id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:qS,autogeneration:null,valueAsType:null},parent:JS},YS={primary:!1,hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!1,implements:fs,static:!0,index:3,dataType:WS,description:"The minimum size of the database in GB.",parent:js},HS={id:"alternative-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},fc={id:"alternative-relational-database-entity-id",type:n.CustomEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[GS,US,kS,YS],methods:[],abstractMethods:[],extends:[],implements:[En],x:0,y:0,parent:HS},zS={id:"animal-prototype-database-property-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-id",entityType:n.Property},ZS={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-data-type-default-value-id",entityType:n.DataType},KS={like:!1,inferred:!1,id:"animal-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"animal-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:fc,autogeneration:null,parent:ZS},parent:zS},XS={id:"animal-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},QS={primary:!1,hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:KS,description:"The database that the entity belongs to.",parent:XS},eC={type:n.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:n.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},tC={like:!1,inferred:!1,id:"c1930577-9e79-48a6-8905-be24611015c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:eC},nC={type:n.GenericReference,id:"animal-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:"83eaa847-e62b-4192-84fb-3d8d6f5ea970"},rC={primary:!0,hidden:!1,required:!0,type:n.Property,id:"5cb617b0-92be-4dbe-a007-49093368d94f",version:1,name:"Name",description:"The name of the animal",implements:null,static:!1,private:!1,index:0,dataType:tC,abstract:!1,parent:nC},iC={type:n.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:n.Project,entityId:W},aC={type:n.CustomEntity,id:"83eaa847-e62b-4192-84fb-3d8d6f5ea970",version:1,name:"Animal",description:"A living creature that is not human",abstract:!1,static:!1,abstractMethods:[],properties:[QS,rC],methods:[],extends:[],implements:[nt],x:0,y:0,parent:iC},da="base-table-entity",sC="base-table-entity-identifier-property-id";n.GenericReference,n.DataType,n.GenericReference,n.Property;const oC={id:"base-table-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"base-table-entity-identifier-property-data-type-id",entityType:n.DataType},lC={id:"base-table-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-identifier-property-id",entityType:n.Property},cC={like:!1,inferred:!1,id:"base-table-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:za,asType:!1,defaultValue:{parentRelationType:null,id:"base-table-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.UUID,value:null,parent:oC,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:lC},dC={id:"base-table-entity-identifier-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},uC={primary:!0,hidden:!1,required:!0,id:sC,name:"Identifier",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:cC,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:dC};n.GenericReference,n.DataType;const pC={id:"base-table-entity-deleted-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-deleted-at-property-id",entityType:n.Property},yC={like:!1,inferred:!1,id:"base-table-entity-deleted-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:fn,asType:!1,defaultValue:null,parent:pC},hC={id:"base-table-entity-deleted-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},fC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-deleted-at-property-id",name:"Deleted at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:yC,description:"The date and time when the entity was deleted.",parent:hC};n.GenericReference,n.DataType;const mC={id:"base-table-entity-created-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-created-at-property-id",entityType:n.Property},TC={like:!1,inferred:!1,id:"base-table-entity-created-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:fn,asType:!1,defaultValue:null,parent:mC},EC={id:"base-table-entity-created-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},bC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-created-at-property-id",name:"Created at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:TC,description:"The date and time when the entity was created.",parent:EC};n.GenericReference,n.DataType;const RC={id:"base-table-entity-updated-at-property-ref-id",type:n.GenericReference,entityId:"base-table-entity-updated-at-property-id",entityType:n.Property},gC={like:!1,inferred:!1,id:"base-table-entity-updated-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:fn,asType:!1,defaultValue:null,parent:RC},vC={id:"base-table-entity-updated-at-property-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.CustomEntity},IC={primary:!1,hidden:!1,required:!0,id:"base-table-entity-updated-at-property-id",name:"Updated at",version:1,type:n.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,dataType:gC,description:"The date and time when the entity was last updated.",parent:vC},DC={id:"base-table-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},Bt={id:da,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:"A handy base entity for all entities that are stored in the database.",type:n.CustomEntity,abstract:!0,static:!1,abstractMethods:[],implements:[],properties:[uC,fC,bC,IC],methods:[],extends:[],x:0,y:0,parent:DC},PC={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-data-type-id",entityType:n.DataType},AC={id:"default-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:n.Property},OC={like:!1,inferred:!1,id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"main",parent:PC,autogeneration:{type:Je.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:AC},li={id:"default-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},SC={primary:!0,hidden:!1,required:!0,id:"default-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:0,dataType:OC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:li};n.GenericReference,n.DataType;const CC={id:"default-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:n.Property},BC={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-data-type-id",entityType:n.DataType},wC={like:!1,inferred:!1,id:"default-relational-database-entity-username-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-username-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"root",parent:BC,autogeneration:null,valueAsType:null},parent:CC},_C={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:1,dataType:wC,description:"The username that will be used to connect to the database.",parent:li};n.GenericReference,n.DataType;const NC={id:"default-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:n.Property},MC={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-data-type-id",entityType:n.DataType},VC={like:!1,inferred:!1,id:"default-relational-database-entity-password-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-password-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"password",parent:MC,autogeneration:null,valueAsType:null},parent:NC},LC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:hs,static:!0,index:2,dataType:VC,description:"The password that will be used to connect to the database.",parent:li},GC={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-min-size-property-data-type-id",entityType:n.DataType},$C={id:"default-relational-database-entity-min-size-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:n.Property},FC={like:!1,inferred:!1,id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:6,parent:GC,autogeneration:null,valueAsType:null},parent:$C},UC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!1,implements:fs,static:!0,index:3,dataType:FC,description:"The minimum size of the database in GB.",parent:li},xC={id:"default-relational-database-entity-default-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-data-type-id",entityType:n.DataType},jC={id:"default-relational-database-entity-default-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:n.Property},kC={like:!1,inferred:!1,id:"default-relational-database-entity-default-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-default-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!0,parent:xC,autogeneration:null,valueAsType:null},parent:jC},qC={primary:!1,hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:n.Property,private:!1,abstract:!1,implements:kl,static:!0,index:4,dataType:kC,description:"Whether this database is automatically picked by other entities as the default database.",parent:li},JC={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-data-type-id",entityType:n.DataType},WC={id:"default-relational-database-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:n.Property},YC={like:!1,inferred:!1,id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:X,asType:!1,defaultValue:{parentRelationType:null,id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.Boolean,value:!0,parent:JC,autogeneration:null,valueAsType:null},parent:WC},HC={primary:!1,hidden:!1,required:!0,id:"default-relational-database-entity-autoscaling-property-id",name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!1,implements:ql,static:!0,index:5,dataType:YC,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:li},zC={id:"default-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},mc={id:"default-relational-database-entity-id",type:n.CustomEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[qC,HC,SC,_C,LC,UC],methods:[],abstractMethods:[],extends:[],implements:[En],x:0,y:0,parent:zC},ZC={id:"user-prototype-database-property-data-type-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:n.DataType},KC={id:"user-prototype-database-property-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-id",entityType:n.Property},XC={like:!1,inferred:!1,id:"user-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"user-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:mc,autogeneration:null,parent:ZC},parent:KC},QC={id:"user-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},eB={primary:!1,hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:XC,description:"The database that the entity belongs to.",parent:QC},tB={type:n.GenericReference,id:"user-prototype-parent-ref-id",entityType:n.Project,entityId:W},Tc={type:n.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[nt,Bt],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[eB],methods:[],x:0,y:0,parent:tB},nB={type:n.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:n.Property,entityId:"person-date-of-birth-property-id"},rB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:fn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:nB},iB={type:n.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},aB={primary:!1,hidden:!1,required:!0,type:n.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,dataType:rB,abstract:!1,parent:iB},sB={type:n.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:n.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},oB={like:!1,inferred:!1,id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:sB},lB={type:n.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},cB={primary:!1,hidden:!1,required:!0,type:n.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,dataType:oB,abstract:!1,parent:lB},dB={type:n.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:n.Project,entityId:W},ht={type:n.CustomEntity,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:[cB,aB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[Tc],x:0,y:0,parent:dB},uB={type:n.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},pB={type:n.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:n.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},yB={type:n.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},hB={type:n.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:n.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},fB={like:!1,inferred:!1,id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hB},Ec={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:n.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:fB,implements:null,readsValue:yB,required:!0,index:0,parent:pB},mB={type:n.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},TB={type:n.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},lR={type:n.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Ec],calledByError:[],calledByEntry:[mB],calledBySuccess:[],throws:null,x:0,y:0,parent:TB},EB={type:n.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},bB={like:!1,inferred:!1,id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EB},cR={id:"500dee3a-3435-4453-9699-0d053f646523",type:n.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:bB,implements:null,required:!0,writesValues:[Ec],index:0,parent:uB},RB={type:n.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},dR={type:n.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[cR],calls:[lR],returnStatements:[lR],index:0,collapsed:!1,private:!1,x:0,y:0,parent:RB},gB={type:n.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:n.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},vB={like:!1,inferred:!1,id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:gB},IB={type:n.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:n.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},DB={type:n.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},PB={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:n.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:vB,readsValue:IB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:DB},AB={type:n.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},OB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:n.OutputMap,version:1,declaration:Ec,writesValues:[PB],index:0,parent:AB},SB={type:n.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},CB={type:n.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},BB={type:n.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},wB={like:!1,inferred:!1,id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:BB},_B={type:n.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},NB={type:n.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},MB={type:n.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},VB={type:n.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},uR={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:n.InputMap,version:1,declaration:cR,name:null,description:null,readsValue:VB,defaultValue:null,index:0,parent:MB},LB={type:n.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:wB,readsValue:_B,writesValues:[uR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:NB},GB={type:n.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:dR,inputs:[uR],outputs:[OB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[SB],calledBySuccess:[],parent:CB,error:null,x:0,y:0},$B={type:n.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},FB={like:!1,inferred:!1,id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:$B},UB={type:n.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},xB={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:n.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:FB,implements:null,required:!0,index:0,writesValues:[LB],parent:UB},jB={type:n.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},kB={type:n.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[xB],collapsed:!0,returnStatements:[],calls:[GB],private:!1,index:0,implements:null,x:0,y:0,parent:jB},qB={type:n.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:n.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},JB={like:!1,inferred:!1,id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qB},WB={type:n.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},YB={primary:!1,hidden:!1,required:!0,type:n.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,implements:null,static:!1,index:0,dataType:JB,abstract:!1,parent:WB},HB={type:n.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:n.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},zB={like:!1,inferred:!1,id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:HB},ZB={type:n.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},KB={primary:!1,hidden:!1,required:!0,type:n.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:zB,implements:null,static:!1,private:!0,abstract:!1,parent:ZB},XB={type:n.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:n.Project,entityId:W},ci={type:n.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[YB,KB],methods:[dR,kB],extends:[],implements:[nt,Bt],x:0,y:0,parent:XB},ua="bitcoin-api-response-id",pR="time-property-id",yR="disclaimer-property-id",hR="chart-name-property-id",fR="bpi-property-id",ks="bpi-entity-id",mR="usd-property-id",TR="gbp-property-id",ER="eur-property-id",di="currency-entity-id",bR="currency-code-property-id",RR="currency-symbol-property-id",gR="currency-rate-property-id",vR="currency-description-property-id",IR="currency-rate-number-property-id",QB={type:n.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:n.Property,entityId:bR},ew={like:!1,inferred:!1,id:"code-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:QB},tw={type:n.GenericReference,id:"code-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},nw={primary:!0,hidden:!1,required:!0,type:n.Property,id:bR,version:1,name:"code",description:null,dataType:ew,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:tw},rw={type:n.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:n.Property,entityId:RR},iw={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["$","£","€"],constant:!1,parent:rw},aw={type:n.GenericReference,id:"symbol-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},sw={primary:!1,hidden:!1,required:!0,type:n.Property,id:RR,version:1,name:"symbol",description:null,index:0,dataType:iw,implements:null,static:!1,private:!1,abstract:!1,parent:aw},ow={type:n.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:n.Property,entityId:gR},lw={like:!1,inferred:!1,id:"rate-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ow},cw={type:n.GenericReference,id:"rate-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},dw={primary:!1,hidden:!1,required:!0,type:n.Property,id:gR,version:1,name:"rate",description:null,index:0,dataType:lw,implements:null,static:!1,private:!1,abstract:!1,parent:cw},uw={type:n.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:n.Property,entityId:vR},pw={like:!1,inferred:!1,id:"description-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:uw},yw={type:n.GenericReference,id:"description-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},hw={primary:!1,hidden:!1,required:!0,type:n.Property,id:vR,version:1,name:"description",description:null,dataType:pw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:yw},fw={type:n.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:n.Property,entityId:IR},mw={like:!1,inferred:!1,id:"rate-number-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:fw},Tw={type:n.GenericReference,id:"rate-number-property-parent-ref-id",entityType:n.CustomEntity,entityId:di},Ew={primary:!1,hidden:!1,required:!0,type:n.Property,id:IR,version:1,name:"rate_float",description:null,dataType:mw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Tw},bw={type:n.GenericReference,id:"currency-prototype-parent-ref-id",entityType:n.Project,entityId:W},qs={type:n.CustomEntity,id:di,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[nw,sw,dw,hw,Ew],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:bw},Rw={type:n.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:n.Property,entityId:mR},gw={like:!1,inferred:!1,id:"usd-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Rw},vw={type:n.GenericReference,id:"usd-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},Iw={primary:!1,hidden:!1,required:!0,id:mR,type:n.Property,version:1,name:"USD",description:null,index:0,dataType:gw,implements:null,static:!1,private:!1,abstract:!1,parent:vw},Dw={type:n.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:n.Property,entityId:TR},Pw={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Dw},Aw={type:n.GenericReference,id:"gbp-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},Ow={primary:!1,hidden:!1,required:!0,id:TR,type:n.Property,version:1,name:"GBP",description:null,index:0,dataType:Pw,implements:null,static:!1,private:!1,abstract:!1,parent:Aw},Sw={type:n.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:n.Property,entityId:ER},Cw={like:!1,inferred:!1,id:"eur-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Sw},Bw={type:n.GenericReference,id:"eur-property-parent-ref-id",entityType:n.CustomEntity,entityId:ks},ww={primary:!1,hidden:!1,required:!0,id:ER,type:n.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:Cw,private:!1,abstract:!1,parent:Bw},_w={type:n.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:n.Project,entityId:W},DR={type:n.CustomEntity,id:ks,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[Iw,Ow,ww],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:_w},Nw={type:n.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:n.Property,entityId:pR},Mw={like:!1,inferred:!1,id:"time-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Li,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Nw},Vw={type:n.GenericReference,id:"time-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Lw={primary:!1,hidden:!1,required:!0,type:n.Property,id:pR,version:1,name:"time",description:null,index:0,dataType:Mw,implements:null,static:!1,private:!1,abstract:!1,parent:Vw},Gw={type:n.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:n.Property,entityId:yR},$w={like:!1,inferred:!1,id:"disclaimer-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gw},Fw={type:n.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Uw={primary:!1,hidden:!1,required:!0,type:n.Property,id:yR,version:1,name:"disclaimer",description:null,index:0,dataType:$w,implements:null,static:!1,private:!1,abstract:!1,parent:Fw},xw={type:n.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:n.Property,entityId:hR},jw={like:!1,inferred:!1,id:"chart-name-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xw},kw={type:n.GenericReference,id:"chart-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},qw={primary:!1,hidden:!1,required:!0,type:n.Property,id:hR,version:1,name:"chartName",description:null,index:0,dataType:jw,implements:null,static:!1,private:!1,abstract:!1,parent:kw},Jw={type:n.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:n.Property,entityId:fR},Ww={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:DR,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Jw},Yw={type:n.GenericReference,id:"bpi-property-parent-ref-id",entityType:n.CustomEntity,entityId:ua},Hw={primary:!0,hidden:!1,required:!0,type:n.Property,id:fR,version:1,name:"bpi",description:null,implements:null,index:0,dataType:Ww,static:!1,private:!1,abstract:!1,parent:Yw},zw={type:n.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:n.Project,entityId:W},PR={type:n.CustomEntity,id:ua,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[Lw,Uw,qw,Hw],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:zw},Zw={type:n.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},Kw={like:!1,inferred:!1,id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Zw},Xw={type:n.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:n.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},Qw={type:n.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:n.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},e_={like:!1,inferred:!1,id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Qw},t_={type:n.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},AR={isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",implements:null,dataType:e_,readsValue:t_,required:!0,index:0,parent:Xw},n_={type:n.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},r_={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:n.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,dataType:Kw,writesValues:[AR],required:!0,index:0,parent:n_},i_={type:n.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},a_={type:n.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},s_={type:n.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},OR={type:n.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[AR],calledByError:[],calledByEntry:[a_],calledBySuccess:[],throws:null,x:0,y:0,parent:s_},o_={type:n.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:[r_],calls:[OR],index:0,collapsed:!1,implements:null,returnStatements:[OR],private:!1,x:0,y:0,parent:i_},l_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},c_={type:n.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},d_={type:n.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:n.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},u_={type:n.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},p_={type:n.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:n.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},y_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:p_},bc={isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:n.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",dataType:y_,implements:null,readsValue:u_,required:!0,index:0,parent:d_},h_={type:n.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Rc={type:n.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[bc],calledByError:[],calledByEntry:[],calledBySuccess:[l_,h_],throws:null,x:0,y:0,parent:c_},f_={type:n.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},m_={type:n.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},SR={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:gl,name:null,description:null,readsValue:m_,defaultValue:null,parent:f_,index:2},T_={type:n.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},E_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:T_},b_={type:n.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},R_={type:n.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:n.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},g_={type:n.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:n.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},CR={type:n.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",dataType:E_,readsValue:R_,writesValues:[bc],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[g_],successCalls:[Rc],errorCalls:[],internalCalls:[],x:0,y:0,parent:b_},v_={type:n.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:n.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},I_={type:n.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},D_={type:n.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:ts,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"gov-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:I.String,valueAsType:null,parent:v_,autogeneration:null},index:1,parent:I_},P_={type:n.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},A_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:n.OutputMap,version:1,declaration:ss,index:2,writesValues:[CR],parent:P_},O_={type:n.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},S_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:n.InputMap,version:1,declaration:es,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:O_},C_={type:n.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},B_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:n.InputMap,version:1,name:null,description:null,declaration:ns,index:3,readsValue:null,defaultValue:null,parent:C_},w_={type:n.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},__={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:n.InputMap,version:1,declaration:rs,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:w_},N_={type:n.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},M_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:n.OutputMap,version:1,declaration:as,index:1,writesValues:[],parent:N_},V_={type:n.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},L_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:n.OutputMap,version:1,declaration:is,index:0,writesValues:[],parent:V_},G_={type:n.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},$_={type:n.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},F_={type:n.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},U_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},x_={type:n.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:n.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},j_={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ke,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:x_},k_={type:n.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:n.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},BR={isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:n.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:j_,implements:null,required:!0,readsValue:null,index:0,parent:k_},q_={type:n.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[U_],throws:BR,x:0,y:0,parent:F_},J_={type:n.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},W_={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:n.OutputMap,declaration:vl,version:1,writesValues:[BR],index:0,parentRelationType:Yr.Error,parent:J_},Y_={type:n.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Fi,inputs:[S_,D_,SR,B_,__],outputs:[L_,M_,A_],process:null,calledByError:[],calledByEntry:[G_],calledBySuccess:[],successCalls:[Rc,CR],errorCalls:[q_],error:W_,x:0,y:0,parent:$_},H_={type:n.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:n.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},z_={type:n.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},Z_={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"base-query-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"?name=",name:I.String,parent:H_,valueAsType:null,autogeneration:null},index:0,parent:z_},K_={type:n.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},X_={type:n.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},Q_={type:n.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},eN={like:!1,inferred:!1,id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Q_},tN={type:n.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:n.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},nN={type:n.GenericReference,id:"assembled-query-string-called-by-ref",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},wR={type:n.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",dataType:eN,readsValue:tN,writesValues:[SR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[nN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:X_},rN={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:n.OutputMap,version:1,writesValues:[wR],declaration:Gi,index:0,parent:K_},iN={type:n.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},aN={type:n.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},sN={type:n.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:n.ArgumentDeclaration},oN={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},_R={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:sN,defaultValue:null,index:1,parent:oN},lN={type:n.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:$i,version:1,inputs:[_R,Z_],outputs:[rN],process:null,calledByError:[],calledByEntry:[iN],calledBySuccess:[],successCalls:[wR],errorCalls:[],error:null,x:0,y:0,parent:aN},cN={type:n.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:n.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},dN={like:!1,inferred:!1,id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:cN},uN={type:n.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},NR={id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:n.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:dN,implements:null,required:!1,writesValues:[_R],index:0,parent:uN},pN={type:n.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:n.Project,entityId:W},MR={type:n.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:[NR],calls:[lN,Y_],returnStatements:[Rc],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:pN},yN={type:n.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},hN={type:n.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},fN={type:n.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},mN={type:n.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},VR={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:n.InputMap,declaration:NR,name:null,description:null,readsValue:fN,defaultValue:null,index:0,parent:mN},TN={type:n.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},EN={type:n.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:n.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},bN={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Vn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EN},RN={type:n.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:n.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},gN={type:n.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},vN={type:n.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},LR={type:n.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:bN,readsValue:RN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[vN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:gN},IN={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.OutputMap,version:1,declaration:bc,writesValues:[LR],index:0,parent:TN},DN={type:n.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:MR,inputs:[VR],outputs:[IN],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[yN],successCalls:[LR],errorCalls:[],error:null,x:0,y:0,parent:hN},PN={type:n.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},AN={type:n.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},ON={type:n.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},SN={type:n.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},GR={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:n.InputMap,declaration:dr.inputs[0],name:null,description:null,readsValue:ON,defaultValue:null,index:0,parent:SN},CN={type:n.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:dr,inputs:[GR],calledByError:[],calledByEntry:[PN],calledBySuccess:[],successCalls:[DN],errorCalls:[],x:0,y:0,parent:AN},BN={type:n.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},wN={type:n.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:n.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},_N={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:wN},NN={type:n.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},MN={type:n.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},VN={type:n.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},$R={type:n.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",dataType:_N,readsValue:MN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[VN],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:NN},LN={type:n.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},GN={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:LN},$N={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:n.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:GN,implements:null,required:!0,index:1,writesValues:[$R],parent:BN},FN={type:n.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},UN={type:n.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},xN={type:n.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},jN={like:!1,inferred:!1,id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xN},kN={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:n.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:jN,implements:null,required:!0,index:0,writesValues:[GR,VR],parent:UN},qN={type:n.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:[kN,$N],calls:[CN,$R],index:1,private:!1,implements:null,x:0,y:0,parent:FN},JN={type:n.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},WN={type:n.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-manager-property-id"},YN={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:JN,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:WN},HN={type:n.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},zN={primary:!1,hidden:!1,required:!0,type:n.Property,id:"employee-manager-property-id",version:1,name:"Manager",description:"The manager of the employee",index:0,implements:null,private:!1,static:!1,dataType:YN,abstract:!1,parent:HN},ZN={type:n.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-start-date-property-id"},KN={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:fn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:ZN},XN={type:n.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},QN={primary:!1,hidden:!1,required:!0,type:n.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,implements:null,dataType:KN,abstract:!1,parent:XN},eM={type:n.GenericReference,id:"employee-department-property-ref-id",entityType:n.Property,entityId:"employee-department-property-id"},tM={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ln,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:eM},nM={type:n.GenericReference,id:"employee-department-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},rM={primary:!1,hidden:!1,required:!0,type:n.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,implements:null,static:!1,private:!1,dataType:tM,abstract:!1,parent:nM},iM={type:n.GenericReference,id:"employee-prototype-parent-ref-id",entityType:n.Project,entityId:W},$t={type:n.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[rM,QN,zN],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ht],x:0,y:0,parent:iM},aM={type:n.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:n.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},sM={like:!1,inferred:!1,id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:aM},oM={type:n.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},lM={primary:!1,hidden:!1,required:!0,type:n.Property,id:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd",version:1,name:"Company Name",private:!1,static:!1,description:"The name of the company",index:0,implements:null,dataType:sM,abstract:!1,parent:oM},cM={type:n.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:n.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},dM={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ci,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:cM},uM={type:n.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},gc={primary:!1,hidden:!1,required:!0,type:n.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,dataType:dM,abstract:!1,parent:uM},pM={type:n.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:n.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},yM={like:!1,inferred:!1,id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ht,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pM},hM={type:n.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},fM={primary:!1,hidden:!1,required:!0,type:n.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,dataType:yM,private:!0,abstract:!1,parent:hM},mM={type:n.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:n.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},TM={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:mM},EM={type:n.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bM={primary:!1,hidden:!1,required:!0,type:n.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:TM,implements:null,private:!0,static:!1,abstract:!1,parent:EM},RM={type:n.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:n.Project,entityId:W},Ft={type:n.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[lM,gc,fM,bM],static:!1,abstract:!1,abstractMethods:[],methods:[o_,qN],extends:[],implements:[nt,Bt],x:0,y:0,parent:RM},gM={type:n.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:n.Project,entityId:W},vc={type:n.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:gM};n.GenericReference,n.DataType;const vM={id:"cron-job-entity-expression-property-ref-id",type:n.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:n.Property},IM={like:!1,inferred:!1,id:"cron-job-entity-expression-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:null,parent:vM},DM={id:"cron-job-entity-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},PM={primary:!1,hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:n.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",dataType:IM,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:DM},AM={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:n.GenericReference,entityId:"show-popup-func-decl-id",entityType:n.FunctionDeclaration},OM={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:n.FunctionDeclaration},SM={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:n.FunctionCall,declaration:vc,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[AM],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:OM},CM={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},BM={id:"cron-job-entity-trigger-func-decl-id",version:1,type:n.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:Wl,calls:[SM],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:CM},wM={id:"cron-job-entity-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},_M={id:"cron-job-entity-id",version:1,type:n.CustomEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[PM],static:!0,abstract:!1,abstractMethods:[],extends:[Yl],implements:[],methods:[BM],x:0,y:0,parent:wM},NM={type:n.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:n.Project,entityId:W},MM={type:n.CustomEntity,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:[us],x:0,y:0,parent:NM},FR="f558fbf8-67de-4545-9804-6ae621e0b2d4",VM={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},LM={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},GM={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:VM,autogeneration:null,valueAsType:null},parent:LM},$M={id:"getCompanyByIdEndpointReachedEntityEventRef",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},FM={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},UM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},xM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:FM,autogeneration:null,valueAsType:null},parent:UM},jM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request headers",dataType:xM,implements:Vl,required:!0,index:0,parent:$M},kM={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},qM={id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:n.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:[],dataType:GM,implements:Ll,required:!0,index:1,parent:kM},JM={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},WM={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},YM={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},HM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:x,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:WM,autogeneration:null,valueAsType:null},parent:YM},zM={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:n.ArgumentDeclaration,writesValues:[],name:"Request query params",dataType:HM,implements:Gl,required:!0,index:2,parent:JM},ZM={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},KM={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},XM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:KM},QM={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:XM,implements:$l,index:3,required:!0,parent:ZM},eV={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},tV={like:!1,inferred:!1,id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:eV},nV={id:"getCompanyByIdEndpointReturnStatementRef",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},rV={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:n.ReturnDeclaration,name:"Response code",dataType:tV,implements:Fl,readsValue:null,required:!0,index:0,parent:nV},iV={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},aV={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},sV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ke,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.KeyValue,value:{},parent:iV,autogeneration:null,valueAsType:null},parent:aV},oV={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},lV={isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:n.ReturnDeclaration,name:"Response headers",dataType:sV,implements:Ul,readsValue:null,required:!0,index:1,parent:oV},cV={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},dV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Ke,defaultValue:null,parent:cV},uV={id:"getCompanyByIdEndpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},pV={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ReturnDeclaration,name:"Response body",implements:xl,dataType:dV,readsValue:null,required:!0,index:2,parent:uV},yV={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:n.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:n.FunctionDeclaration},hV={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},fV={id:"getCompanyByIdEndpointReturnStatement",type:n.ReturnStatement,version:1,outputs:[rV,lV,pV],calledByError:[],calledByEntry:[yV],calledBySuccess:[],throws:null,x:0,y:0,parent:hV},mV={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:FR},TV={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:n.FunctionDeclaration,inputs:[jM,qM,zM,QM],returnStatements:[fV],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:jl,index:0,private:!1,x:0,y:0,parent:mV},EV={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},bV={id:"getCompanyByIdEndpointPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointPathProperty"},RV={like:!1,inferred:!1,id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:x,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:I.String,value:"/company/{id}",parent:EV,valueAsType:null,autogeneration:null},parent:bV},gV={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},vV={primary:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Nl,dataType:RV,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:gV},IV={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},DV={id:"getCompanyByIdEndpointMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointMethodProperty"},PV={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Ln,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{parentRelationType:null,id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:I.Enum,parent:IV,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:DV},AV={id:"getCompanyByIdEndpointBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},OV={primary:!1,hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Ml,index:0,dataType:PV,description:null,parent:AV},SV={type:n.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:n.Project,entityId:W},CV={type:n.CustomEntity,id:FR,version:1,name:"Get given company data by id",description:null,properties:[vV,OV],methods:[TV],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[us],x:0,y:0,parent:SV},BV={id:"plant-prototype-database-property-ref-id",type:n.GenericReference,entityId:"plant-prototype-database-property-id",entityType:n.Property},wV={id:"plant-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"plant-prototype-database-property-data-type-default-value-id",entityType:n.DataType},_V={like:!1,inferred:!1,id:"plant-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"plant-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:fc,autogeneration:null,parent:wV},parent:BV},NV={id:"plant-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"plant-entity-id",entityType:n.CustomEntity},MV={primary:!1,hidden:!1,required:!0,id:"plant-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:_V,description:"The database that the entity belongs to.",parent:NV},VV={type:n.GenericReference,id:"plant-name-property-ref-id",entityType:n.Property,entityId:"plant-name-property-id"},LV={like:!1,inferred:!1,id:"plant-name-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VV},GV={type:n.GenericReference,id:"animal-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:"plant-entity-id"},$V={primary:!1,hidden:!1,required:!0,type:n.Property,id:"plant-name-property-id",version:1,name:"Name",description:"The name of the plant",implements:null,static:!1,private:!1,index:0,dataType:LV,abstract:!1,parent:GV},FV={type:n.GenericReference,id:"plant-prototype-parent-ref-id",entityType:n.Project,entityId:W},UV={type:n.CustomEntity,id:"plant-entity-id",version:1,name:"Plant",description:"A living creature that is not an animal",abstract:!1,static:!1,abstractMethods:[],properties:[MV,$V],methods:[],extends:[],implements:[nt],x:0,y:0,parent:FV},xV={id:"product-prototype-database-property-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-id",entityType:n.Property},jV={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-data-type-default-value-id",entityType:n.DataType},kV={like:!1,inferred:!1,id:"product-prototype-database-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:En,asType:!1,defaultValue:{parentRelationType:null,id:"product-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.EntityTemplate,valueAsType:mc,autogeneration:null,parent:jV},parent:xV},qV={id:"product-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},JV={primary:!1,hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:Qr,static:!0,index:0,dataType:kV,description:"The database that the entity belongs to.",parent:qV},WV={type:n.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:n.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},YV={like:!1,inferred:!1,id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WV},HV={type:n.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:n.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},zV={primary:!1,hidden:!1,required:!0,type:n.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,dataType:YV,abstract:!1,parent:HV},ZV={type:n.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:n.Project,entityId:W},KV={type:n.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[nt,Bt],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[JV,zV],methods:[],x:0,y:0,parent:ZV},pa="project-loaded-event-id",an="get-bitcoin-price-http-call-operation-id",UR="get-bitcoin-price-http-call-response-body-id",Js="validate-bitcoin-price-response-operation-ids",XV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:UR},QV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:n.Operation,entityId:Js},xR={id:"validate-bitcoin-data-to-validate-input-map-id",type:n.InputMap,version:1,declaration:ir.inputs[1],name:null,description:null,readsValue:XV,defaultValue:null,index:0,parent:QV},e1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},t1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:n.Operation,entityId:Js},n1={id:"validate-bitcoin-type-to-match-input-map-id",type:n.InputMap,version:1,declaration:ir.inputs[0],name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:n.PrimitiveValue,version:1,name:I.EntityTemplate,valueAsType:PR,value:null,parent:e1,autogeneration:null},index:0,parent:t1},r1={type:n.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:n.Operation,entityId:Js},i1={id:"validate-bitcoin-validated-entity-output-map-id",type:n.OutputMap,version:1,declaration:ir.outputs[0],writesValues:[],index:0,parent:r1},a1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:n.GlobalEvent,entityId:pa},s1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:n.Operation,entityId:an},o1={type:n.Operation,id:Js,version:1,declaration:ir,inputs:[n1,xR],outputs:[i1],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[s1],parent:a1},l1={type:n.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:n.FunctionCall,entityId:an},c1={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:n.InputMap,declaration:es,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:l1},d1={type:n.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:n.FunctionCall,entityId:an},u1={type:n.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:n.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},p1={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:n.InputMap,declaration:ts,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:I.String,parent:u1,valueAsType:null,autogeneration:null},index:1,parent:d1},y1={type:n.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:n.FunctionCall,entityId:an},h1={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:n.InputMap,declaration:ns,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:y1},f1={type:n.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:n.FunctionCall,entityId:an},m1={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:n.InputMap,declaration:rs,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:f1},T1={type:n.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:n.FunctionCall,entityId:an},E1={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:n.OutputMap,declaration:as,writesValues:[],index:1,parent:T1},b1={type:n.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:n.FunctionCall,entityId:an},R1={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:n.OutputMap,declaration:is,writesValues:[],index:0,parent:b1},g1={type:n.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:n.FunctionCall,entityId:an},v1={id:UR,type:n.OutputMap,version:1,declaration:ss,writesValues:[xR],index:2,parent:g1},I1={type:n.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:n.FunctionDeclaration,entityId:an},D1={type:n.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:n.GlobalEvent,entityId:pa},P1={type:n.Operation,id:an,version:1,declaration:Fi,inputs:[c1,p1,h1,m1],outputs:[R1,E1,v1],process:null,parent:D1,calledByError:[],calledByEntry:[I1],calledBySuccess:[],successCalls:[o1],errorCalls:[],error:null,x:0,y:0},A1={type:n.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:n.GlobalEvent,entityId:pa},O1={type:n.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:n.GlobalEvent,entityId:pa},S1={process:null,type:n.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:vc,inputs:[],outputs:[],calledByError:[],calledByEntry:[A1],calledBySuccess:[],parent:O1,successCalls:[],errorCalls:[],error:null,x:0,y:0},C1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:n.GenericReference,entityType:n.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},B1={type:n.GlobalEvent,id:pa,version:1,name:yn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:ms,parent:C1,inputs:[],calls:[S1,P1],x:0,y:0},Ut="abort-execution-func-declaration-id",ya="abort-execution-func-exec-var-declaration-id",Ws="abort-execution-func-small-wait-op-id",Ic="abort-execution-func-long-wait-op-id",jR="abort-execution-func-long-wait-process-output-id",kR="abort-execution-func-exec-var-instance-write-id",qR="abort-execution-func-long-wait-return-stmt-id",JR="abort-execution-func-small-wait-return-stmt-id",w1="abort-execution-func-exec-var-instance-abort-call-id",Dc="abort-execution-func-exec-var-instance-abort-internal-call-id",WR="abort-execution-func-exec-second-wait-op-id",_1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},N1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:n.DataType,entityId:"short-wait-return-statement-returned-hello-string-data-type-id"},M1={like:!1,inferred:!1,id:"short-wait-return-statement-returned-hello-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:{parentRelationType:null,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:N1},constant:!1,parent:_1},V1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:JR},L1={isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:n.ReturnDeclaration,version:1,name:"Return 1",description:"A random string that is returned by the function",dataType:M1,implements:null,readsValue:null,required:!0,index:0,parent:V1},G1={type:n.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Ws},$1={type:n.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},YR={type:n.ReturnStatement,id:JR,version:1,outputs:[L1],calledByError:[],calledByEntry:[],calledBySuccess:[G1],throws:null,x:0,y:0,parent:$1},F1={type:n.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"second-wait-argument-map-id"},U1={type:n.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:WR},x1={id:"second-wait-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"second-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:I.Number,parent:F1},index:0,parent:U1},j1={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},k1={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.InternalCall,entityId:Dc},q1={id:WR,type:n.Operation,version:1,declaration:pt,inputs:[x1],outputs:[],process:null,successCalls:[YR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[k1],error:null,parent:j1},J1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:n.VariableInstance,entityId:kR},W1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:n.Operation,entityId:Ws},Y1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},H1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ya},z1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:n.InternalCall,entityId:Dc},Z1={id:w1,type:n.VariableInstance,version:1,declaration:H1,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[z1],parent:Y1},HR={id:Dc,type:n.InternalCall,version:1,inputs:[],outputs:[],declaration:Hl,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[J1,W1],successCalls:[q1],errorCalls:[],error:null,index:0,parent:Z1},K1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},X1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:ya},Q1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:Ut},e0={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ya},t0={type:n.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:n.OutputMap,entityId:jR},Pc={id:kR,type:n.VariableInstance,version:1,declaration:e0,inputs:[],outputs:[],calledByError:[],calledByEntry:[Q1],calledBySuccess:[X1],successCalls:[HR],errorCalls:[],x:0,y:0,readsValue:t0,writesValues:[],internalCalls:[],parent:K1},n0={type:n.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:ya};n.GenericReference,n.DataType;const r0={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:zl,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:n0,defaultValue:null},i0={type:n.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},a0={type:n.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},s0={id:ya,type:n.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:r0,inputs:[],outputs:[],calledByError:[],calledByEntry:[a0],calledBySuccess:[],successCalls:[Pc],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:i0},o0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},l0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:n.DataType,entityId:"long-wait-return-statement-returned-hello-string-data-type-id"},c0={like:!1,inferred:!1,id:"long-wait-return-statement-returned-hello-string-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,asType:!1,isList:!1,isNullable:!1,defaultValue:{parentRelationType:null,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:l0},constant:!1,parent:o0},d0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:qR},u0={isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:n.ReturnDeclaration,version:1,name:"Return 2",description:"A random string that is returned by the function",implements:null,dataType:c0,readsValue:null,required:!0,index:0,parent:d0},p0={type:n.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Ic},y0={type:n.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},zR={type:n.ReturnStatement,id:qR,version:1,outputs:[u0],calledByError:[],calledByEntry:[],calledBySuccess:[p0],throws:null,x:0,y:0,parent:y0},h0={type:n.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"long-argument-map-id"},ZR={type:n.GenericReference,id:"long-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ic},f0={id:"long-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"long-argument-default-value-id",type:n.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:I.Number,parent:h0},index:0,parent:ZR},m0={type:n.GenericReference,id:"long-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},T0={type:n.GenericReference,id:"long-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},E0={id:jR,type:n.OutputMap,version:1,declaration:Kl,writesValues:[Pc],index:0,parent:ZR},b0={id:Ic,type:n.Operation,version:1,declaration:pt,inputs:[f0],outputs:[],process:E0,successCalls:[zR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[T0],calledBySuccess:[],error:null,parent:m0},R0={type:n.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"small-wait-argument-map-id"},g0={type:n.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ws},v0={id:"small-wait-argument-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"small-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:I.Number,parent:R0},index:0,parent:g0},I0={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:Ut},D0={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:Ut},P0={id:Ws,type:n.Operation,version:1,declaration:pt,inputs:[v0],outputs:[],process:null,successCalls:[HR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[D0],calledBySuccess:[],error:null,parent:I0},A0={type:n.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:n.Project,entityId:W},KR={id:"abort-execution-func-decl-id",type:n.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[zR,YR],calls:[P0,s0,Pc,b0],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:A0},O0={type:n.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:n.Project,entityId:W},S0={id:"call-execution-abort-func-id",type:n.FunctionCall,version:1,declaration:KR,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:O0},Ac="manual-hello-world-loop-func-decl-id",XR="manual-hello-world-loop-func-return-statement-id",sn="manual-hello-world-loop-id",ha="manual-hello-world-loop-body-id",Oc="manual-hello-world-loop-break-statement-id",fa="manual-hello-world-loop-current-iteration-number-output-map-id",Sc="manual-hello-world-loop-previous-iterations-results-output-map-id",Cc="assembled-hello-world-text-output-id",QR="assembled-hello-world-list-output-id",ma="iteration-number-is-equal-or-greater-than-10-condition-id",Ys="join-hello-world-and-number-operation-id",Hs="append-string-to-list-operation-id",eg="hello-world-loop-output-map-id",C0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:n.ReturnStatement,entityId:XR},B0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:n.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},w0={like:!1,inferred:!1,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:B0},_0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:n.OutputMap,entityId:eg},tg={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:n.ReturnDeclaration,name:"Results",description:null,dataType:w0,implements:null,readsValue:_0,required:!0,index:0,parent:C0},N0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:n.Loop,entityId:sn},M0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:n.FunctionDeclaration,entityId:Ac},ng={type:n.ReturnStatement,id:XR,version:1,outputs:[tg],calledByError:[],calledByEntry:[],calledBySuccess:[N0],parent:M0,throws:null,x:0,y:0},V0={type:n.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:n.BreakStatement,entityId:Oc},L0={type:n.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Cc},rg={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,dataType:null,readsValue:L0,implements:null,required:!0,index:0,parent:V0},G0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:fa},$0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:n.BreakStatement,entityId:Oc},ig={isError:!1,id:"hello-world-loop-break-statement-counter-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration counter",description:null,implements:null,dataType:null,readsValue:G0,required:!0,index:1,parent:$0},F0={type:n.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:n.Condition,entityId:ma},U0={type:n.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:n.Loop,entityId:sn},ag={type:n.BreakStatement,id:Oc,version:1,outputs:[rg,ig],calledByError:[],calledByEntry:[],calledBySuccess:[F0],parent:U0,throws:null,x:0,y:0},x0={type:n.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:n.ContinueStatement,entityId:"hello-world-loop-continue-statement"},j0={type:n.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:n.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},k0={like:!1,inferred:!1,id:"hello-world-loop-continue-statement-output-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:j0},q0={type:n.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Cc},sg={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,implements:null,dataType:k0,readsValue:q0,required:!0,index:0,parent:x0},J0={type:n.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:n.Condition,entityId:ma},W0={type:n.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:n.Loop,entityId:sn},og={type:n.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[sg],calledBySuccess:[],calledByError:[J0],calledByEntry:[],parent:W0,throws:null,x:0,y:0};n.GenericReference,n.InputMap;const Y0={type:n.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Hs},H0={type:n.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Sc},lg={id:"append-string-to-list-base-string-map-id",type:n.InputMap,version:1,declaration:fl,name:null,description:null,readsValue:H0,defaultValue:null,index:0,parent:Y0},z0={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Hs},Z0={id:QR,type:n.OutputMap,version:1,writesValues:[rg],declaration:Gi,index:0,parent:z0},K0={type:n.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:n.Condition,entityId:ma},X0={type:n.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:QR},Q0={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Hs},cg={id:"latest-string-to-add-input-map-id",version:1,type:n.InputMap,declaration:ml,name:null,description:null,readsValue:X0,defaultValue:null,index:1,parent:Q0},eL={type:n.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:n.FunctionDeclaration,entityId:sn},tL={type:n.Operation,id:Hs,declaration:Qa,version:1,inputs:[lg,cg],outputs:[Z0],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[K0],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:eL},nL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ha},rL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:n.Loop,entityId:sn},iL={type:n.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:fa},dg={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:n.Condition,entityId:ma},aL={id:"current-iteration-number-to-check-map-id",version:1,type:n.InputMap,declaration:ti.inputs[0],name:null,description:null,readsValue:iL,index:0,defaultValue:null,parent:dg},sL={type:n.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"max-num-iterations-value-map-id"},oL={id:"max-num-iterations-value-map-id",version:1,type:n.InputMap,declaration:ti.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{parentRelationType:null,id:"max-num-iterations-value-map-default-value-id",type:n.PrimitiveValue,version:1,name:I.Number,value:10,autogeneration:null,valueAsType:null,parent:sL},parent:dg},lL={type:n.Condition,id:ma,version:1,declaration:ti,inputs:[aL,oL],calledByError:[],calledByEntry:[nL],calledBySuccess:[],successCalls:[ag,tL],errorCalls:[og],x:0,y:0,parent:rL},cL={type:n.GenericReference,id:"base-string-map-ref-id",entityType:n.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},dL={type:n.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},uL={id:"join-hello-world-and-number-base-string-map-id",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"join-hello-world-and-number-base-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"Hello world ",name:I.String,parent:cL,valueAsType:null,autogeneration:null},index:0,parent:dL},pL={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},yL={id:Cc,type:n.OutputMap,version:1,writesValues:[cg,sg],declaration:Gi,index:0,parent:pL},hL={type:n.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ha},fL={type:n.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:fa},mL={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ys},ug={id:"current-iteration-number-input-map-id",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:fL,defaultValue:null,index:1,parent:mL},TL={type:n.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:n.FunctionDeclaration,entityId:sn},EL={type:n.Operation,id:Ys,declaration:$i,version:1,inputs:[uL,ug],outputs:[yL],process:null,calledByError:[],calledByEntry:[hL],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:TL},bL={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:Sc,entityType:n.ArgumentDeclaration},RL={like:!1,inferred:!1,id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:bL},gL={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionDeclaration},vL={id:Sc,type:n.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:RL,implements:null,writesValues:[lg],index:1,parent:gL},IL={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionDeclaration},DL={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:fa,entityType:n.ArgumentDeclaration};n.DataType;const PL={id:fa,type:n.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,implements:Dl,dataType:null,writesValues:[ug,ig],index:0,parent:IL},AL={id:"manual-flow-loop-body-parent-ref-id",type:n.GenericReference,entityId:sn,entityType:n.Loop},OL={id:ha,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[PL,vL],calls:[lL,EL],implements:Pl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:AL},SL={type:n.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:n.Loop,entityId:sn},pg={id:"hello-world-loop-iteration-result-inline-output-declaration-id",version:1,type:n.ValueDescriptor,name:"Iteration result",description:null,dataType:null,required:!0,index:0,parent:SL},CL={type:n.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:n.Loop,entityId:sn},BL={type:n.OutputMap,id:eg,version:1,declaration:pg,writesValues:[tg],index:0,parent:CL},wL={id:"manual-hello-world-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},_L={id:"manual-hello-world-loop-called-by-ref-id",type:n.GenericReference,entityId:Ac,entityType:n.FunctionDeclaration},NL={id:sn,type:n.Loop,version:1,declaration:Il,inputs:[],outputsDeclarations:[pg],outputs:[BL],body:OL,successCalls:[ng],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[_L],calledBySuccess:[],breakStatements:[ag],continueStatements:[og],x:0,y:0,parent:wL},ML={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},yg={type:n.FunctionDeclaration,id:Ac,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[NL],returnStatements:[ng],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:ML},VL={type:n.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:n.Project,entityId:W},LL={id:"call-hello-world-loop-id",type:n.FunctionCall,version:1,declaration:yg,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:VL},gn="company-dto-function-declaration-id",Bc="company-dto-func-declaration-argument-dcl-id",on="company-dto-function-company-variable-id",Jn="company-dto-function-company-dto-variable-id",ui="iterate-over-employee-list-loop-id",hg="iterate-over-employee-list-loop-employee-dto-output-map-id",wc="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",Ta="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",fg="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",GL="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",mg="iterate-over-employee-list-continue-statement-id",zs="iterate-over-employee-list-loop-body-id",Tg="company-dto-func-declaration-return-statement-id",Eg="company-dto-func-declaration-return-decl-id",bg="company-dto-func-declaration-company-variable-id-output-map-id",Rg="company-dto-func-declaration-company-variable-employess-output-map-id",gg="company-dto-func-declaration-company-variable-name-output-map-id",$L="company-dto-func-declaration-company-dto-variable-input-map-id",FL="company-dto-func-declaration-company-dto-variable-employess-input-map-id",UL="company-dto-func-declaration-company-dto-variable-name-input-map-id",Zs="company-dto-func-declaration-owner-variable-id",xL="company-dto-func-declaration-company-dto-variable-owner-input-map-id",vg="company-dto-func-declaration-company-variable-owner-output-map-id",Ig="company-dto-func-declaration-owner-variable-id-output-map-id",Ks="company-dto-func-declaration-bank-account-variable-id",jL="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",Dg="company-dto-func-declaration-company-variable-bank-account-output-map-id",Pg="company-dto-func-declaration-bank-account-variable-id-output-map-id",kL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Eg},qL={like:!1,inferred:!1,id:"company-dto-func-returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kL},JL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Tg},WL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Ag={isError:!1,id:Eg,type:n.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",implements:null,dataType:qL,readsValue:WL,required:!0,index:0,parent:JL},YL={type:n.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Jn},HL={type:n.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},_c={type:n.ReturnStatement,id:Tg,version:1,outputs:[Ag],calledByError:[],calledByEntry:[],calledBySuccess:[YL],throws:null,x:0,y:0,parent:HL},zL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Ig},ZL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Og={id:xL,type:n.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:zL,parent:ZL},KL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Pg},XL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Sg={id:jL,type:n.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:KL,parent:XL},QL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:gg},eG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Cg={id:UL,type:n.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:QL,parent:eG},tG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:hg},nG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},Bg={id:FL,type:n.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:tG,parent:nG},rG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:bg},iG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Jn},wg={id:$L,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:rG,parent:iG},aG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},sG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:Ks},oG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Zs},lG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:n.VariableDeclaration,entityId:ui},Nc={id:Jn,type:n.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[sG,oG,lG],successCalls:[_c],errorCalls:[],readsValue:null,writesValues:[Ag],inputs:[wg,Cg,Sg,Og,Bg],outputs:[],internalCalls:[],parent:aG,x:0,y:0},fr="employee-dto-func-declaration-id",Mc="employee-dto-func-declaration-argument-dcl-id",_g="employee-dto-func-declaration-return-statement-id",Ng="employee-dto-func-declaration-return-decl-id",mr="employee-dto-func-declaration-employee-variable-id",Tr="employee-dto-func-declaration-employee-dto-variable-id",Xs="employee-dto-func-declaration-manager-variable-id",Mg="employee-dto-func-declaration-employee-variable-id-output-map-id",Vg="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",Lg="employee-dto-func-declaration-employee-variable-department-output-map-id",Gg="employee-dto-func-declaration-employee-variable-manager-output-map-id",$g="employee-dto-func-declaration-manager-variable-id-output-map-id",cG="employee-dto-func-declaration-employee-dto-variable-input-map-id",dG="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",uG="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",pG="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",yG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Ng},hG={like:!1,inferred:!1,id:"employee-dto-func-returned-employee-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:yG},fG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:_g},mG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Tr},Fg={isError:!1,id:Ng,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",dataType:hG,implements:null,readsValue:mG,required:!0,index:0,parent:fG},TG={type:n.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Tr},EG={type:n.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},Vc={type:n.ReturnStatement,id:_g,version:1,outputs:[Fg],calledByError:[],calledByEntry:[],calledBySuccess:[TG],throws:null,x:0,y:0,parent:EG},bG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:$g},RG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},Ug={id:pG,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:bG,parent:RG},gG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Lg},vG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},xg={id:uG,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:gG,parent:vG},IG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Vg},DG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},jg={id:dG,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:IG,parent:DG},PG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Mg},AG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Tr},kg={id:cG,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:PG,parent:AG},OG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},SG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Xs},CG={id:Tr,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[SG],successCalls:[Vc],errorCalls:[],readsValue:null,writesValues:[Fg],inputs:[kg,jg,xg,Ug],outputs:[],internalCalls:[],parent:OG,x:0,y:0},BG={type:n.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Xs},wG={id:$g,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[Ug],parent:BG},_G={type:n.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Xs},NG={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:_G,defaultValue:null},MG={type:n.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Gg},VG={type:n.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr};n.GenericReference,n.VariableDeclaration;const qg={id:Xs,type:n.VariableDeclaration,version:1,name:"Manager",dataType:NG,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[CG],errorCalls:[],readsValue:MG,writesValues:[],inputs:[],outputs:[wG],internalCalls:[],parent:VG,x:0,y:0},LG={type:n.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},GG={id:Gg,type:n.OutputMap,version:1,declaration:$t.properties[2],index:3,writesValues:[qg],parent:LG},$G={type:n.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},FG={id:Lg,type:n.OutputMap,version:1,declaration:$t.properties[0],index:2,writesValues:[xg],parent:$G},UG={type:n.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},xG={id:Vg,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[jg],parent:UG},jG={type:n.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},kG={id:Mg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[kg],parent:jG},qG={type:n.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},JG={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:qG,defaultValue:null},WG={type:n.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:fr},YG={type:n.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Mc},HG={type:n.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:fr},Jg={id:mr,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:JG,description:"A variable holding a company employee",calledByError:[],calledByEntry:[HG],calledBySuccess:[],successCalls:[qg],errorCalls:[],readsValue:YG,writesValues:[],inputs:[],outputs:[kG,xG,FG,GG],internalCalls:[],parent:WG,x:0,y:0},zG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Mc,entityType:n.ArgumentDeclaration},ZG={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:$t,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:zG,defaultValue:null},KG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:fr,entityType:n.FunctionDeclaration},XG={type:n.ArgumentDeclaration,id:Mc,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,dataType:ZG,index:0,writesValues:[Jg],parent:KG},QG={type:n.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},Lc={type:n.FunctionDeclaration,id:fr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[XG],calls:[Jg],implements:null,returnStatements:[Vc],collapsed:!1,private:!1,x:0,y:0,parent:QG},e$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:fg,entityType:n.ReturnDeclaration},t$={like:!1,inferred:!1,id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:e$},n$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.OutputMap},r$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:n.GenericReference,entityId:mg,entityType:n.ContinueStatement},Wg={isError:!1,id:fg,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:n$,dataType:t$,implements:null,required:!0,index:0,parent:r$},i$={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},a$={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},Yg={id:mg,type:n.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[i$],outputs:[Wg],throws:null,x:0,y:0,parent:a$},s$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},o$={id:GL,type:n.OutputMap,version:1,declaration:Vc.outputs[0],writesValues:[Wg],index:0,parent:s$},l$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:n.GenericReference,entityId:wc,entityType:n.ArgumentDeclaration},c$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.FunctionCall},Hg={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:Lc.inputs[0],readsValue:l$,index:0,defaultValue:null,parent:c$},d$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},u$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},p$={id:Ta,type:n.FunctionCall,version:1,declaration:Lc,inputs:[Hg],process:null,outputs:[o$],calledByError:[],calledByEntry:[d$],calledBySuccess:[],successCalls:[Yg],errorCalls:[],error:null,x:0,y:0,parent:u$},y$={type:n.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:wc,entityType:n.ArgumentDeclaration},h$={like:!1,inferred:!1,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:$t,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:y$},f$={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:zs,entityType:n.FunctionDeclaration},m$={id:wc,type:n.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:h$,required:!0,implements:os,index:0,writesValues:[Hg],parent:f$},T$={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},E$={id:zs,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[m$],calls:[p$],implements:ls,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:T$},b$={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},R$={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Rg,entityType:n.OutputMap},zg={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ar.inputs[0],defaultValue:null,readsValue:R$,index:0,parent:b$},g$={id:"iterate-over-employee-list-loop-parent-ref-id",type:n.GenericReference,entityId:gn,entityType:n.FunctionDeclaration},v$={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ui,entityType:n.Loop},I$={id:hg,type:n.OutputMap,version:1,declaration:ar.outputs[0],writesValues:[Bg],index:0,parent:v$},D$={type:n.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:n.VariableDeclaration,entityId:on},P$={id:ui,type:n.Loop,version:1,declaration:ar,inputs:[zg],successCalls:[Nc],errorCalls:[],outputsDeclarations:[],outputs:[I$],body:E$,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[D$],breakStatements:[],continueStatements:[Yg],error:null,x:0,y:0,parent:g$},A$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},O$={id:Pg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[Sg],parent:A$},S$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},C$={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:S$,defaultValue:null},B$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Dg},w$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn};n.GenericReference,n.VariableDeclaration;const Zg={id:Ks,type:n.VariableDeclaration,version:1,name:"Bank account",dataType:C$,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Nc],errorCalls:[],readsValue:B$,writesValues:[],inputs:[],outputs:[O$],internalCalls:[],parent:w$,x:0,y:0},_$={type:n.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},N$={id:Ig,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[Og],parent:_$},M$={type:n.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},V$={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:M$,defaultValue:null},L$={type:n.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:vg},G$={type:n.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn};n.GenericReference,n.VariableDeclaration;const Kg={id:Zs,type:n.VariableDeclaration,version:1,name:"Owner",dataType:V$,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Nc],errorCalls:[],readsValue:L$,writesValues:[],inputs:[],outputs:[N$],internalCalls:[],parent:G$,x:0,y:0},$$={type:n.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},F$={id:vg,type:n.OutputMap,version:1,declaration:Ft.properties[2],index:4,writesValues:[Kg],parent:$$},U$={type:n.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},x$={id:Dg,type:n.OutputMap,version:1,declaration:Ft.properties[2],index:3,writesValues:[Zg],parent:U$},j$={type:n.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},k$={id:gg,type:n.OutputMap,version:1,declaration:Ft.properties[0],index:2,writesValues:[Cg],parent:j$},q$={type:n.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},J$={id:Rg,type:n.OutputMap,version:1,declaration:Ft.properties[3],index:1,writesValues:[zg],parent:q$},W$={type:n.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},Y$={id:bg,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[wg],parent:W$},H$={type:n.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:on},z$={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:H$,defaultValue:null},Z$={type:n.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:gn},K$={type:n.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Bc},X$={type:n.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:gn},Xg={id:on,type:n.VariableDeclaration,version:1,name:"Company",dataType:z$,description:"A variable holding a company",calledByError:[],calledByEntry:[X$],calledBySuccess:[],successCalls:[Zg,Kg,P$],errorCalls:[],readsValue:K$,writesValues:[],inputs:[],outputs:[Y$,J$,k$,x$,F$],internalCalls:[],parent:Z$,x:0,y:0},Q$={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Bc,entityType:n.ArgumentDeclaration},eF={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:Q$,defaultValue:null},tF={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:gn,entityType:n.FunctionDeclaration},nF={type:n.ArgumentDeclaration,id:Bc,version:1,name:"Company",description:"The company to create a DTO for",required:!0,implements:null,dataType:eF,index:0,writesValues:[Xg],parent:tF},rF={type:n.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:W},Gc={type:n.FunctionDeclaration,id:gn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[nF],calls:[Xg],implements:null,index:null,returnStatements:[_c],collapsed:!1,private:!1,x:0,y:0,parent:rF},Ea="exec-in-parallel-operation-call-id",ba="exec-sequentially-operation-call-id",ft="concurrency-and-wait-function-declaration-id",Qg="concurrency-and-wait-return-statement-id",ev="concurrency-and-wait-return-declaration-id",$c="exec-in-parallel-argument-map-id",tv="exec-sequentially-argument-map-id",Fc="wait-for-2-seconds-operation-id",nv="wait-for-2-seconds-argument-map-id",Uc="map-company-dto-function-call-id",rv="map-company-dto-function-call-company-dto-output-map-id",Ra="company-dto-variable-one-id",xc="company-dto-variable-one-instance-id",iF="company-dto-variable-two-id",aF={type:n.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:ev},sF={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:aF},oF={type:n.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Qg},lF={type:n.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ra},iv={isError:!1,id:ev,type:n.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:sF,implements:null,readsValue:lF,required:!0,index:0,parent:oF},cF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Fc},dF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},av={type:n.ReturnStatement,id:Qg,version:1,outputs:[iv],calledByError:[],calledByEntry:[],calledBySuccess:[cF],throws:null,x:0,y:0,parent:dF},uF={type:n.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:n.VariableInstance,entityId:xc},pF={type:n.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:n.VariableInstance,entityId:xc},yF={type:n.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},sv={id:iF,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[uF],internalCalls:[],writesValues:[iv],readsValue:pF,x:0,y:0,parent:yF},hF={type:n.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ra},fF={type:n.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ra},mF={type:n.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},TF={type:n.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:Ra},ov={id:xc,type:n.VariableInstance,version:1,declaration:TF,inputs:[],outputs:[],successCalls:[sv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[hF],internalCalls:[],writesValues:[sv],readsValue:fF,x:0,y:0,parent:mF},EF={type:n.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:n.FunctionCall,entityId:Uc},bF={type:n.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:n.OutputMap,entityId:rv},RF={type:n.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},lv={id:Ra,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[ov],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[EF],internalCalls:[],writesValues:[ov],readsValue:bF,x:0,y:0,parent:RF},cv={type:n.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:n.FunctionCall,entityId:Uc},gF={id:"map-company-dto-function-call-company-input-map-id",type:n.InputMap,version:1,declaration:Gc.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:cv},vF={id:rv,type:n.OutputMap,version:1,declaration:_c.outputs[0],writesValues:[lv],index:0,parent:cv},IF={id:"map-company-dto-function-call-called-by-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},DF={id:"map-company-dto-function-call-parent-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},PF={id:Uc,type:n.FunctionCall,version:1,declaration:Gc,successCalls:[lv],process:null,errorCalls:[],inputs:[gF],outputs:[vF],calledByError:[],calledByEntry:[IF],calledBySuccess:[],parent:DF,x:0,y:0,error:null},AF={type:n.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:oR},OF={type:n.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:n.DataType,entityId:"last-timestamp-variable-datatype-id"},SF={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:fn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:AF,defaultValue:{parentRelationType:null,id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,name:I.Date,value:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:OF,valueAsType:null}},CF={type:n.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:n.Project,entityId:W},jc={id:oR,type:n.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",dataType:SF,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:CF},BF={type:n.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:nv},wF={type:n.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:n.Operation,entityId:Fc},_F={id:nv,type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"wait-for-2-seconds-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:I.Number,parent:BF},index:0,parent:wF},NF={type:n.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},MF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:ba},VF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:Ea},dv={id:Fc,type:n.Operation,version:1,declaration:Wt,inputs:[_F],outputs:[],process:null,successCalls:[av],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[MF,VF],calledBySuccess:[],error:null,parent:NF},LF={type:n.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"wait-for-random-amount-input-map-id"},GF={type:n.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:n.Operation,entityId:"wait-for-random-amount-id"},$F={id:"wait-for-random-amount-input-map-id",type:n.InputMap,version:1,declaration:nr,name:null,description:null,readsValue:null,defaultValue:{parentRelationType:null,id:"wait-for-random-amount-argument-default-value-id",type:n.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:Je.Random,rangeStart:1e3,rangeEnd:4e3},name:I.Number,parent:LF},index:0,parent:GF},FF={type:n.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:n.Project,entityId:W},pi={id:"wait-for-random-amount-id",type:n.Operation,version:1,declaration:Wt,inputs:[$F],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:FF},uv="list-of-functions-variable-id",UF={type:n.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-argument-parent-ref-id",entityType:n.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},xF={id:"list-of-functions-variable-action-descriptor-dynamic-argument-id",type:n.ValueDescriptor,version:1,name:"Any input value",description:"Any input value that can be passed to the action",index:0,required:!1,dataType:null,parent:UF},jF={type:n.GenericReference,id:"list-of-functions-variable-action-descriptor-dynamic-return-parent-ref-id",entityType:n.ActionDescriptor,entityId:"list-of-functions-variable-action-descriptor-id"},kF={id:"list-of-functions-variable-action-descriptor-dynamic-return-id",type:n.ValueDescriptor,version:1,name:"Any output value",description:"Any output value that can be returned to the action",index:0,required:!1,dataType:null,parent:jF},qF={type:n.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:uv},JF={id:"list-of-functions-variable-action-descriptor-id",type:n.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:[xF],error:null,outputs:[kF],parent:null},WF={type:n.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:n.DataType,entityId:"list-of-functions-variable-data-type-id"},YF={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:JF,asType:!1,isList:!0,isNullable:!1,defaultValue:{parentRelationType:null,id:"list-of-functions-variable-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:I.ActionDescriptor,value:null,valueAsType:[pi,pi,pi,pi,pi],autogeneration:null,parent:WF},constant:!1,parent:qF},HF={type:n.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft};n.GenericReference,n.InputMap;const zF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:n.InputMap,entityId:tv},ZF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:n.InputMap,entityId:$c},pv={id:uv,type:n.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:YF,parent:HF,readsValue:null,writesValues:[zF,ZF],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},KF={type:n.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:n.Operation,entityId:Ea},XF={type:n.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},QF={type:n.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-in-parallel-return-map-id"},eU={type:n.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:n.Operation,entityId:Ea},yv={id:"exec-in-parallel-result-variable-id",type:n.VariableInstance,version:1,declaration:jc,readsValue:QF,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[eU],successCalls:[],errorCalls:[],internalCalls:[],parent:XF,x:0,y:0},tU={id:"exec-in-parallel-return-map-id",type:n.OutputMap,version:1,declaration:El,writesValues:[yv],index:0,parent:KF},nU={type:n.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:n.Operation,entityId:Ea},rU={id:$c,type:n.InputMap,version:1,declaration:Tl,name:null,description:null,readsValue:pv,defaultValue:null,index:0,parent:nU},iU={type:n.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},aU={type:n.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},sU={process:null,id:Ea,type:n.Operation,version:1,declaration:Wt,inputs:[rU],outputs:[tU],successCalls:[dv,yv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[aU],calledBySuccess:[],error:null,parent:iU},oU={type:n.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:n.Operation,entityId:ba},lU={type:n.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},cU={type:n.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-sequentially-return-map-id"},dU={type:n.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:n.Operation,entityId:ba},hv={id:"exec-sequentially-result-variable-id",type:n.VariableInstance,version:1,declaration:jc,readsValue:cU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[dU],successCalls:[],errorCalls:[],internalCalls:[],parent:lU,x:0,y:0},uU={id:"exec-sequentially-return-map-id",type:n.OutputMap,version:1,declaration:Rl,writesValues:[hv],index:0,parent:oU},pU={type:n.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:n.Operation,entityId:ba},yU={id:tv,type:n.InputMap,version:1,declaration:bl,name:null,description:null,readsValue:pv,defaultValue:null,index:0,parent:pU},hU={type:n.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},fU={type:n.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},mU={id:ba,type:n.Operation,version:1,declaration:Tn,inputs:[yU],process:null,outputs:[uU],successCalls:[dv,hv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[fU],calledBySuccess:[],error:null,parent:hU},TU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:W},EU={type:n.FunctionDeclaration,id:ft,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:[mU,sU,PF],returnStatements:[av],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:TU},bU={type:n.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:n.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},RU={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ft,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bU},gU={type:n.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:n.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},vU={isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",implements:null,dataType:RU,readsValue:null,required:!0,index:0,parent:gU},IU={type:n.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},DU={type:n.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},fv={type:n.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[vU],calledByError:[],calledByEntry:[DU],calledBySuccess:[],throws:null,x:0,y:0,parent:IU},PU={type:n.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:n.Project,entityId:W},AU={type:n.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[fv],index:null,implements:null,returnStatements:[fv],collapsed:!1,private:!1,x:0,y:0,parent:PU},kc="get-current-date-and-time-func-decl-id",mv="get-current-date-and-time-return-statement-id",Tv="get-current-date-and-time-return-declaration-id",Ev="get-current-date-and-time-return-declaration-data-type-id",OU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:n.DataType,entityId:Ev},SU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Tv},CU={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:Ev,version:1,entity:fn,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,defaultValue:{parentRelationType:null,id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:I.Date,valueAsType:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:OU},constant:!1,parent:SU},BU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:n.ReturnStatement,entityId:mv};n.ReturnDeclaration;const wU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:kc},_U={type:n.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:kc};n.ReturnStatement;const NU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:W},MU={type:n.FunctionDeclaration,id:kc,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:NU},bv="do-math-return-statement-id",Rv="do-math-return-declaration-id",VU={type:n.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:n.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},LU={like:!1,inferred:!1,id:"do-math-func-var-to-return-one-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VU},GU={type:n.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},$U={type:n.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:n.ReturnDeclaration,entityId:Rv},FU={type:n.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:LU,readsValue:null,writesValues:[$U],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:GU},UU={type:n.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:n.ReturnStatement,entityId:bv},xU={type:n.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:n.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},jU={like:!1,inferred:!1,id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xU},kU={isError:!1,id:Rv,version:1,type:n.ReturnDeclaration,name:"Result",description:null,implements:null,dataType:jU,readsValue:FU,required:!0,index:0,parent:UU},qU={type:n.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},JU={type:n.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},gv={type:n.ReturnStatement,id:bv,version:1,outputs:[kU],calledByError:[],calledByEntry:[],calledBySuccess:[qU],parent:JU,throws:null,x:0,y:0},WU={type:n.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:n.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},YU={like:!1,inferred:!1,id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WU},HU={type:n.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},zU={type:n.GenericReference,id:"do-math-func-return-one-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},ZU={type:n.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},vv={type:n.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:YU,description:null,readsValue:ZU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[zU],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:HU},KU={type:n.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},XU={type:n.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},QU={type:n.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:n.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},e4={like:!1,inferred:!1,id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:QU},t4={type:n.GenericReference,id:"do-math-func-return-two-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Iv={type:n.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[t4],successCalls:[],errorCalls:[],dataType:e4,readsValue:XU,writesValues:[],internalCalls:[],parent:KU,x:0,y:0},Dv={type:n.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},n4={type:n.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},r4={type:n.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},i4={type:n.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:n.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},Pv={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:n.InputMap,declaration:il,name:null,description:null,readsValue:i4,defaultValue:null,index:0,parent:r4},a4={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:n.OutputMap,version:1,declaration:ol,writesValues:[vv,Iv],index:0,parent:n4},s4={type:n.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},o4={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:n.GenericReference,entityType:n.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},Av={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:n.InputMap,declaration:al,name:null,description:null,readsValue:o4,defaultValue:null,index:1,parent:s4},l4={type:n.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Za,version:1,inputs:[Pv,Av],outputs:[a4],calledByError:[],calledByEntry:[Dv],calledBySuccess:[],process:null,successCalls:[gv,vv,Iv],errorCalls:[],parent:Dv,error:null,x:0,y:0},c4={type:n.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:n.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},d4={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:n.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:n.ArgumentDeclaration},Ov={like:!1,inferred:!1,id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"do-math-func-argument-two-default-value-id",type:n.PrimitiveValue,version:1,value:1,name:I.Number,parent:c4,valueAsType:null,autogeneration:null},constant:!1,parent:d4},u4={type:n.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:n.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},p4={type:n.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},y4={type:n.GenericReference,id:"do-math-func-var-called-by-ref",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Sv={type:n.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:Ov,inputs:[],outputs:[],calledByError:[],calledByEntry:[y4],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:u4,writesValues:[Av],internalCalls:[],x:0,y:0,parent:p4},h4={entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:n.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},f4={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:n.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:Ov,implements:null,writesValues:[Sv],required:!0,index:1,parent:h4},m4={type:n.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:n.Project,entityId:W},T4={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},E4={type:n.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:n.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},b4={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:n.ArgumentDeclaration},R4={like:!1,inferred:!1,id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:{parentRelationType:null,id:"do-math-func-argument-one-default-value-id",type:n.PrimitiveValue,version:1,value:5,name:I.Number,parent:E4,valueAsType:null,autogeneration:null},constant:!1,parent:b4},g4={id:"d8895765-f705-457e-85fa-25d130926769",type:n.ArgumentDeclaration,version:1,name:"N",dataType:R4,description:"The number to add",implements:null,writesValues:[Pv],required:!0,index:0,parent:T4},v4={type:n.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[g4,f4],calls:[l4,Sv],implements:null,index:null,collapsed:!1,returnStatements:[gv],private:!1,x:0,y:0,parent:m4},mt="replace-bank-account-in-company-func-declaration-id",qc="company-entity-to-modify-arg-declaration-id",Jc="account-number-to-create-arg-decl-id",yi="company-main-variable-id",hi="search-person-by-id-id",Cv="new-bank-account-owner-arg-decl-id",Bv="search-person-by-id-output-declaration-id",Wc="search-person-by-id-output-entity-map-id",ga="person-not-empty-condition-id",Qs="create-new-bank-account-instance-operation-id",wv="create-new-bank-account-instance-operation-output-entity-map-id",_v="company-bank-account-output-map-id",Yc="old-bank-account-var-declaration-id",Nv="old-bank-account-var-instance-id",Mv="company-variable-instance-id",Hc="delete-bank-account-internal-call-id",va="new-bank-account-data-variable-declaration-id",I4={type:n.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},D4={type:n.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:n.InternalCall,entityId:Hc},P4={type:n.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:yi},A4={type:n.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:Mv},O4={type:n.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:wv},Vv={type:n.InputMap,id:"bank-account-input-map-id",version:1,readsValue:O4,declaration:gc,name:null,description:null,index:0,defaultValue:null,parent:A4},S4={type:n.VariableInstance,id:Mv,version:1,declaration:P4,inputs:[Vv],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[D4],successCalls:[],errorCalls:[],internalCalls:[],parent:I4,readsValue:null,writesValues:[],x:0,y:0},C4={type:n.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},B4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:ci,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,defaultValue:null,parent:C4},w4={type:n.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:_v},_4={type:n.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},N4={type:n.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:yi},M4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:n.Operation,entityId:Qs};n.GenericReference,n.VariableInstance;const V4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Yc},L4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:n.VariableDeclaration,entityId:Yc},G4={type:n.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:n.FunctionDeclaration,entityId:mt},$4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:n.InternalCall,entityId:Hc},F4={type:n.VariableInstance,id:Nv,version:1,declaration:L4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[$4],errorCalls:[],parent:G4,readsValue:null,writesValues:[],x:0,y:0},Lv={process:null,type:n.InternalCall,id:Hc,version:1,declaration:Jl,index:0,successCalls:[S4],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[M4,V4],parent:F4},Gv={type:n.VariableDeclaration,id:Yc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:B4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[N4],successCalls:[Lv],internalCalls:[],errorCalls:[],parent:_4,readsValue:w4,writesValues:[],x:0,y:0},U4={type:n.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},x4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Ft,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,constant:!1,defaultValue:null,parent:U4},j4={type:n.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:qc},k4={type:n.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},q4={type:n.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},J4={type:n.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},W4={id:_v,version:1,type:n.OutputMap,declaration:gc,index:0,parent:J4,writesValues:[Gv]},$v={type:n.VariableDeclaration,id:yi,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:x4,inputs:[],outputs:[W4],calledByError:[],calledByEntry:[q4],calledBySuccess:[],successCalls:[Gv],errorCalls:[],parent:k4,internalCalls:[],readsValue:j4,writesValues:[],x:0,y:0},Y4={type:n.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:va},H4={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.OutputMap,entityId:Wc},Fv={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account owner",description:null,readsValue:H4,index:1,defaultValue:null,parent:Y4},z4={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:Jc},Z4={type:n.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:va},Uv={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account number",description:null,readsValue:z4,defaultValue:null,index:0,parent:Z4},xv={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:n.Operation,entityId:Qs},K4={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:n.InputMap,declaration:rr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:n.PrimitiveValue,name:I.EntityTemplate,value:null,valueAsType:ci,autogeneration:null},parent:xv},X4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:va},jv={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:n.InputMap,declaration:rr.inputs[1],name:null,description:null,index:1,readsValue:X4,defaultValue:null,parent:xv},Q4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:n.Operation,entityId:Qs},ex={id:wv,version:1,type:n.OutputMap,declaration:rr.outputs[0],index:0,writesValues:[Vv],parent:Q4},tx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:ga},nx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.VariableDeclaration,entityId:va},rx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},kv={process:null,id:Qs,type:n.Operation,version:1,declaration:rr,inputs:[K4,jv],error:null,outputs:[ex],successCalls:[Lv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[nx,tx],parent:rx,x:0,y:0},ix={type:n.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},ax={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:ga},sx={id:va,type:n.VariableDeclaration,version:1,inputs:[Uv,Fv],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[jv],successCalls:[kv],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[ax],calledByEntry:[],x:0,y:0,parent:ix},ox={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-thrown-error-datatype-id",entityType:n.DataType},lx={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:n.ReturnDeclaration};n.DataType,n.PrimitiveValue,I.String;const cx={id:"person-not-found-thrown-error-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:n.ReturnStatement},dx={isError:!0,id:"person-not-found-thrown-error-id",type:n.ReturnDeclaration,version:1,dataType:null,name:"Person not found error",description:"If the person entity was not found this error is outputted",parent:cx,implements:null,required:!0,index:0,readsValue:null},ux={id:"person-not-found-error-return-statement-called-by-ref-id",type:n.GenericReference,entityId:ga,entityType:n.Condition},px={id:"person-not-found-error-return-statement-parent-ref-id",type:n.GenericReference,entityId:mt,entityType:n.FunctionDeclaration},yx={id:"person-not-found-error-return-statement-id",type:n.ReturnStatement,version:1,throws:dx,outputs:[],calledBySuccess:[],calledByError:[ux],calledByEntry:[],x:0,y:0,parent:px},hx={type:n.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:n.Search,entityId:hi},fx={type:n.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},mx={type:n.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Wc},Tx={type:n.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:n.Condition,entityId:ga},qv={id:"person-entity-to-check-map-id",version:1,type:n.InputMap,declaration:dr.inputs[0],name:null,description:null,readsValue:mx,index:0,defaultValue:null,parent:Tx},Ex={type:n.Condition,id:ga,version:1,declaration:dr,inputs:[qv],calledByError:[],calledByEntry:[],calledBySuccess:[hx],successCalls:[sx,kv],errorCalls:[yx],x:0,y:0,parent:fx},bx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:n.ValueDescriptor,entityId:Bv},Rx={like:!1,inferred:!1,id:"search-person-by-id-output-entity-declaration-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,constant:!1,asType:!1,isNullable:!1,entity:ht,defaultValue:null,parent:bx},gx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:n.Search,entityId:hi},Jv={id:Bv,type:n.ValueDescriptor,version:1,dataType:Rx,name:"Found person",description:"The person entity that was found",parent:gx,required:!0,index:0},vx={type:n.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:n.Search,entityId:hi},Ix={type:n.OutputMap,id:Wc,version:1,declaration:Jv,parent:vx,writesValues:[qv,Fv],index:0},Dx={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:n.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:n.ArgumentDeclaration};n.DataType;const Px={type:n.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:n.Search,entityId:hi},Wv={id:"search-person-by-id-input-declaration-id",type:n.ValueDescriptor,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",parentRelationType:O.FixedArguments,index:0,required:!0,parent:Px},Ax={type:n.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:n.Search,entityId:hi},Ox={id:"search-person-by-id-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Cv,entityType:n.ArgumentDeclaration},Yv={type:n.InputMap,id:"search-person-by-id-input-map",version:1,declaration:Wv,name:null,description:null,readsValue:Ox,defaultValue:null,parent:Ax,index:0},Sx={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},Cx={type:n.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},Bx={type:n.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},wx={type:n.Search,id:hi,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:Sx,inputsDeclarations:[Wv],inputs:[Yv],outputsDeclarations:[Jv],outputs:[Ix],calledByError:[],calledByEntry:[Bx],calledBySuccess:[],error:null,successCalls:[Ex],errorCalls:[],parent:Cx,x:0,y:0};n.GenericReference,n.DataType;const _x={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:Jc,entityType:n.ArgumentDeclaration},Nx={like:!1,inferred:!1,id:"account-number-to-create-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:x,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:_x},Mx={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},Vx={id:Jc,type:n.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:Nx,implements:null,writesValues:[Uv],required:!0,index:1,parent:Mx};n.GenericReference,n.DataType;const Lx={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:n.ArgumentDeclaration},Gx={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:za,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:Lx},$x={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},Fx={id:Cv,type:n.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",dataType:Gx,implements:null,writesValues:[Yv],required:!1,index:1,parent:$x},Ux={type:n.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:n.Project,entityId:W},xx={type:n.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:n.FunctionDeclaration,entityId:mt};n.GenericReference,n.DataType;const jx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:qc,entityType:n.ArgumentDeclaration},kx={like:!1,inferred:!1,id:"company-entity-to-modify-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:X,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:jx},qx={id:qc,type:n.ArgumentDeclaration,version:1,name:"Company",dataType:kx,implements:null,description:"The company to replace the bank account for",writesValues:[$v],required:!0,index:0,parent:xx},Jx={type:n.FunctionDeclaration,id:mt,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:[qx,Vx,Fx],index:null,implements:null,calls:[wx,$v],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:Ux},Wx={type:n.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Yx={type:n.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:Wx,x:0,y:0},Hx={type:n.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:n.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},zx={type:n.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Zx={type:n.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[Yx],events:[],implements:zx,parent:Hx,x:0,y:0},zc="global-counted-test-loop-id",Hv="global-counted-test-loop-body-id",zv="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",Kx={type:n.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:zv,entityType:n.ArgumentDeclaration},Xx={like:!1,inferred:!1,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Kx},Qx={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Hv,entityType:n.FunctionDeclaration},ej={id:zv,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Xx,implements:wl,required:!0,index:0,writesValues:[],parent:Qx},tj={id:"global-counted-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},nj={id:Hv,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[ej],calls:[],implements:_l,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:tj},fi="random-company-employee-test-variable-id",Zc="manager-global-variable-id",Zv="global-user-instance-id",vn="employee-mapped-dto-variable-id",Wn="employee-mapped-dto-variable-instance-id",Kv="random-employee-id-output-map-id",Xv="random-employee-birth-date-output-map-id",Qv="random-employee-department-output-map-id",eI="random-employee-manager-output-map-id",tI="manager-global-id-output-map-id",nI="global-user-instance-id-output-map-id",rj="employee-mapped-dto-requester-id-input-map-id",rI="employee-mapped-dto-now-timestamp-input-map-id",ij="employee-mapped-dto-id-input-map-id",aj="employee-mapped-dto-birth-date-input-map-id",sj="employee-mapped-dto-department-input-map-id",oj="employee-mapped-dto-manager-input-map-id",lj={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop};n.GenericReference,n.VariableDeclaration;const cj={id:"global-counted-test-loop-iteration-number-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ds.inputs[0],defaultValue:null,readsValue:null,index:0,parent:lj},dj={id:"global-counted-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},uj={id:"global-counted-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},pj={id:zc,type:n.Loop,version:1,declaration:ds,inputs:[cj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:nj,calledByError:[],calledByEntry:[],calledBySuccess:[uj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:dj},Kc="global-object-keys-test-loop-id",iI="global-object-keys-test-loop-body-id",aI="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",yj={type:n.GenericReference,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:aI,entityType:n.ArgumentDeclaration},hj={like:!1,inferred:!1,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:yj},fj={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:iI,entityType:n.FunctionDeclaration},mj={id:aI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:hj,implements:Cl,required:!0,index:0,writesValues:[],parent:fj},Tj={id:"global-object-keys-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Ej={id:iI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[mj],calls:[],implements:xi,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Tj},bj={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Rj={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:vn,entityType:n.VariableDeclaration},sI={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:xi.inputs[0],defaultValue:null,readsValue:Rj,index:0,parent:bj},gj={id:"global-object-keys-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},vj={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},Ij={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:n.GenericReference,entityId:vn,entityType:n.VariableDeclaration},Xc={id:Kc,type:n.Loop,version:1,declaration:xi,inputs:[sI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Ej,calledByError:[],calledByEntry:[],calledBySuccess:[Ij,vj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:gj},Qc="global-object-values-test-loop-id",oI="global-object-values-test-loop-body-id",lI="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",Dj={type:n.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:lI,entityType:n.ArgumentDeclaration},Pj={like:!1,inferred:!1,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Dj},Aj={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:oI,entityType:n.FunctionDeclaration},Oj={id:lI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Pj,implements:Bl,required:!0,index:0,writesValues:[],parent:Aj},Sj={id:"global-object-values-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.Loop},Cj={id:oI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Oj],calls:[],implements:ji,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Sj},Bj={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.Loop},wj={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},cI={id:"global-object-values-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ji.inputs[0],defaultValue:null,readsValue:wj,index:0,parent:Bj},_j={id:"global-object-values-test-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},Nj={id:"global-object-values-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:Wn,entityType:n.VariableDeclaration},dI={id:Qc,type:n.Loop,version:1,declaration:ji,inputs:[cI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Cj,calledByError:[],calledByEntry:[],calledBySuccess:[Nj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:_j},ed="global-test-iterate-over-string-loop-id",td="global-test-iterate-over-string-loop-body-id",eo="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",uI="global-test-iterate-over-string-loop-iteration-list-input-map-id",Mj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:eo,entityType:n.ArgumentDeclaration},Vj={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Mj},Lj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:td,entityType:n.FunctionDeclaration},Gj={id:eo,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Vj,implements:Al,required:!0,index:1,writesValues:[],parent:Lj},$j={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:eo,entityType:n.ArgumentDeclaration},Fj={like:!1,inferred:!1,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:$j},Uj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:td,entityType:n.FunctionDeclaration},xj={id:eo,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Fj,implements:Ol,required:!0,index:0,writesValues:[],parent:Uj},jj={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},kj={id:td,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[xj,Gj],calls:[],implements:Sl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:jj},qj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},Jj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:n.GenericReference,entityId:uI,entityType:n.InputMap},Wj={parentRelationType:null,id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:n.PrimitiveValue,name:I.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:Je.Random,rangeStart:4,rangeEnd:5},parent:Jj},Yj={id:uI,type:n.InputMap,version:1,name:null,description:null,declaration:cs.inputs[0],defaultValue:Wj,readsValue:null,index:0,parent:qj},Hj={id:"global-test-iterate-over-string-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},zj={id:ed,type:n.Loop,version:1,declaration:cs,inputs:[Yj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:kj,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Hj},nd="iterate-over-list-loop-id",pI="iterate-over-list-loop-body-id",yI="iterate-over-list-loop-body-current-iteration-value-argument-declaration-id",Zj={type:n.GenericReference,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:yI,entityType:n.ArgumentDeclaration},Kj={like:!1,inferred:!1,id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:Zj},Xj={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:pI,entityType:n.FunctionDeclaration},Qj={id:yI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Kj,implements:os,required:!0,index:0,writesValues:[],parent:Xj},e8={id:"iterate-over-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:nd,entityType:n.Loop},t8={id:pI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Qj],calls:[],implements:ls,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:e8},n8={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:nd,entityType:n.Loop},r8={id:"iterate-over-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ar.inputs[0],defaultValue:null,readsValue:null,index:0,parent:n8},i8={id:"iterate-over-list-loop-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},a8={id:nd,type:n.Loop,version:1,declaration:ar,inputs:[r8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:t8,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:i8};var rd=(r=>(r.EQ="eq",r.NEQ="neq",r.GT="gt",r.GTE="gte",r.LT="lt",r.LTE="lte",r.LIKE="like",r.ILIKE="ilike",r))(rd||{}),hI=(r=>(r.COUNT="count",r.SUM="sum",r.AVG="avg",r.MIN="min",r.MAX="max",r))(hI||{});const s8={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:hI.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:rd.NEQ,value:null}]},where:[{name:"employee_count",operation:rd.GT,value:1}]},o8={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:n.GenericReference,entityId:W,entityType:n.Project},l8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:n.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:n.Search},fI={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:n.ValueDescriptor,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",dataType:null,required:!0,index:0,parent:l8},c8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:n.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:n.Search},d8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:n.OutputMap,version:1,declaration:fI,writesValues:[],index:0,parent:c8},u8={id:"find-companies-with-multiple-employees-and-bank-account",type:n.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:[fI],inputs:[],outputs:[d8],query:s8,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:o8},p8={type:n.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:tI},y8={type:n.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},mI={id:oj,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:p8,parent:y8},h8={type:n.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Qv},f8={type:n.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},TI={id:sj,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:h8,parent:f8},m8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Xv},T8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},EI={id:aj,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:m8,parent:T8},E8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Kv},b8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},bI={id:ij,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:E8,parent:b8},R8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:nI},g8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:vn},RI={id:rj,type:n.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,index:0,readsValue:R8,parent:g8},v8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zc},I8={id:tI,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[mI],parent:v8},D8={type:n.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zc},P8={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:D8,defaultValue:null},A8={type:n.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:eI},O8={type:n.GenericReference,id:"manager-variable-parent-ref-id",entityType:n.Project,entityId:W},gI={id:Zc,type:n.VariableDeclaration,version:1,name:"Manager",dataType:P8,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:A8,writesValues:[],inputs:[],outputs:[I8],internalCalls:[],parent:O8,x:0,y:0},S8={type:n.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},C8={id:eI,type:n.OutputMap,version:1,declaration:$t.properties[2],index:3,writesValues:[gI],parent:S8},B8={type:n.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},w8={id:Qv,type:n.OutputMap,version:1,declaration:$t.properties[0],index:2,writesValues:[TI],parent:B8},_8={type:n.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},N8={id:Xv,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[EI],parent:_8},M8={type:n.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},V8={id:Kv,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[bI],parent:M8},L8={type:n.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:fi},G8={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:$t,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:L8,defaultValue:null},$8={type:n.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:n.Project,entityId:W},F8={id:fi,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:G8,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[V8,N8,w8,C8],internalCalls:[],parent:$8,x:0,y:0},U8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:rI},x8={parentRelationType:null,type:n.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:I.Date,version:1,valueAsType:null,value:null,autogeneration:{type:Je.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:U8},j8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:Wn},k8={id:rI,type:n.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:x8,index:5,readsValue:null,parent:j8},q8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:n.VariableDeclaration,entityId:vn},J8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:Wn},W8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:n.Project,entityId:W},Y8={id:Wn,type:n.VariableInstance,version:1,declaration:q8,calledByError:[],calledByEntry:[],calledBySuccess:[J8],successCalls:[Xc,dI],errorCalls:[],readsValue:null,writesValues:[cI],inputs:[k8],outputs:[],internalCalls:[],parent:W8,x:0,y:0},H8={type:n.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:n.Project,entityId:W},z8={id:vn,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[Xc,Y8],errorCalls:[],readsValue:null,writesValues:[sI],inputs:[RI,bI,EI,TI,mI],outputs:[],internalCalls:[],parent:H8,x:0,y:0},Z8={type:n.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:n.VariableDeclaration,entityId:hc},K8={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Tc,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:Z8,defaultValue:null},X8={type:n.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:n.Project,entityId:W},vI={id:hc,type:n.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:K8,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:X8},Q8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableInstance,entityId:Zv},e9={id:nI,type:n.OutputMap,version:1,declaration:Bt.properties[0],index:0,writesValues:[RI],parent:Q8},t9={type:n.GenericReference,id:"global-user-instance-parent-ref-id",entityType:n.Project,entityId:W},n9={id:Zv,type:n.VariableInstance,version:1,declaration:vI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[e9],internalCalls:[],parent:t9,x:0,y:0},r9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:hc},i9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:n.DataType,entityId:"is-test-environment-variable-dcl-datatype-id"},a9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Vn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:r9,defaultValue:{parentRelationType:null,id:"is-test-environment-variable-dcl-datatype-default-value-id",name:I.Boolean,version:1,value:null,type:n.PrimitiveValue,autogeneration:{type:Je.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:i9}},s9={type:n.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:n.Project,entityId:W},II={id:"is-test-environment-variable-dcl-id",type:n.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",dataType:a9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:s9},o9={type:n.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:n.Project,entityId:W},l9={id:"is-test-environment-variable-instance-id",type:n.VariableInstance,version:1,declaration:II,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:o9,x:0,y:0},DI={type:n.Project,id:W,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:[Zx],entities:[mc,Bt,Tc,ht,KV,$t,qs,DR,PR,ci,MM,Ft,CV,fc,aC,UV,_M],functions:[EU,KR,Lc,AU,MU,yg,Gc,vc,Jx,MR,v4],events:[B1],variableDeclarations:[II,vI,jc,F8,gI,z8],variableInstances:[l9,n9],conditions:[],operations:[pi],functionCalls:[S0,LL],loops:[a8,Xc,dI,zj,pj],searches:[u8]};var T=(r=>(r.Error="error",r.Warning="warning",r))(T||{}),S=(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))(S||{}),f=(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))(f||{}),M=(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))(M||{});class b{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 S?new Er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Er{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 Er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function c9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function Y(r){const e=r.entity.errors.find(i=>i.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Er(r)}}function d9(r,e){const t=new Map;return r.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function ie(r,e){const t=[];return e.forEach(i=>{const a=r.find(s=>s.id===i.id);a?t.push(a):t.push(i)}),t}const Ia=u.union([u.string(),u.number(),u.boolean(),u.date()]),PI=u.enum([Je.CurrentDateAndTime,Je.Random,Je.Unique]),to=u.object({type:PI,rangeStart:Ia.nullable(),rangeEnd:Ia.nullable()}),Da=to.extend({type:u.literal(Je.Random),rangeStart:Ia,rangeEnd:Ia}),id=to.extend({type:u.literal(Je.Unique),rangeStart:u.null(),rangeEnd:u.null()}),AI=to.extend({type:u.literal(Je.CurrentDateAndTime),rangeStart:u.null(),rangeEnd:u.null()}),no=Da.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),OI=no.extend({rangeStart:u.number(),rangeEnd:u.null()}),SI=no.extend({rangeStart:u.null(),rangeEnd:u.number()}),CI=no.extend({rangeStart:u.number(),rangeEnd:u.number()}),ro=Da.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),BI=ro.extend({rangeStart:u.number(),rangeEnd:u.null()}),wI=ro.extend({rangeStart:u.null(),rangeEnd:u.number()}),_I=ro.extend({rangeStart:u.number(),rangeEnd:u.number()}),io=Da.extend({rangeStart:u.date().nullable(),rangeEnd:u.date().nullable()}),NI=io.extend({rangeStart:u.date(),rangeEnd:u.null()}),MI=io.extend({rangeStart:u.null(),rangeEnd:u.date()}),VI=io.extend({rangeStart:u.date(),rangeEnd:u.date()}),ad=Da.extend({rangeStart:u.null(),rangeEnd:u.null()}),sd=u.union([BI,wI,_I]),od=u.union([OI,SI,CI]),ld=u.union([NI,MI,VI,AI]),cd=u.union([sd,od,ld,id,ad]);function Pa(){return u.union([u.object({type:u.literal(n.ValueDescriptor)}),u.record(u.string(),u.any())])}function LI(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ValueDescriptor)})}function dd(){return u.object({id:u.string(),type:u.literal(n.ValueDescriptor),name:u.string(),required:u.boolean()})}function u9(){return dd().merge(u.object({version:u.number(),index:u.number()}))}function p9(){return dd().merge(u.object({}))}function y9(){return u.object({dataType:vr(),parent:Rr()})}function h9(){return u9().merge(y9())}function ao(){return u.union([u.object({type:u.literal(n.PrimitiveEntity)}),u.record(u.string(),u.any())])}function so(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.PrimitiveEntity)})}function oo(){return u.object({id:u.string(),type:u.literal(n.PrimitiveEntity),name:u.string(),description:u.string().nullable(),static:u.boolean(),abstract:u.boolean()})}function f9(){return oo().merge(u.object({version:u.number()}))}function m9(){return oo().merge(u.object({}))}function T9(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([ao(),mi()]))})}function E9(){return f9().merge(T9())}function br(){return u.union([u.object({type:u.literal(n.Property)}),u.record(u.string(),u.any())])}function GI(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Property)})}function ud(){return u.object({id:u.string(),type:u.literal(n.Property),name:u.string(),description:u.string().nullable(),private:u.boolean(),static:u.boolean(),required:u.boolean(),abstract:u.boolean()})}function b9(){return ud().merge(u.object({version:u.number(),index:u.number()}))}function R9(){return ud().merge(u.object({}))}function g9(){return u.object({dataType:vr(),implements:br().nullable(),parent:u.union([Pr(),so(),lo()])})}function v9(){return b9().merge(g9())}function I9(){return u.enum([V.CRON_JOB,V.EXECUTION,V.HTTP_ENDPOINT,V.PERSISTED_ENTITY,V.RELATIONAL_DATABASE])}function mi(){return u.union([u.object({type:u.literal(n.BuiltInBaseEntity)}),u.record(u.string(),u.any())])}function lo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BuiltInBaseEntity)})}function pd(){return u.object({id:u.string(),version:u.number(),type:u.literal(n.BuiltInBaseEntity),name:I9(),description:u.string().nullable(),abstract:u.boolean(),static:u.boolean()})}function D9(){return pd()}function P9(){return pd().merge(u.object({}))}function A9(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([mi(),ao()]))})}function O9(){return D9().merge(A9())}function ln(){return u.union([u.object({type:u.literal(n.ActionDescriptor)}),u.record(u.string(),u.any())])}function Rr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ActionDescriptor)})}function co(){return u.object({id:u.string(),type:u.literal(n.ActionDescriptor),name:u.string(),description:u.string().nullable()})}function S9(){return co().merge(u.object({version:u.number()}))}function C9(){return co().merge(u.object({}))}function B9(){return u.object({inputs:u.array(Pa()),outputs:u.array(Pa()),parent:u.union([Dt(),Pr(),lo(),so()]).nullable()})}function $I(){return S9().merge(B9())}function Ti(){return u.union([u.object({type:u.literal(n.Loop)}),u.record(u.string(),u.any())])}function cn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Loop)})}function FI(){return u.object({id:u.string(),type:u.literal(n.Loop)})}function w9(){return FI().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function _9(){return FI().merge(u.object({declaration:u.union([u.string(),wt()])}))}function N9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),declaration:ln(),inputs:u.array(Zt()),outputs:u.array(Tt()),outputsDeclarations:u.array(Pa()),successCalls:u.array(He()),errorCalls:u.array(He()),error:Tt(),body:wt(),parent:u.union([An(),Dt()]),breakStatements:u.array(gi()),continueStatements:u.array(Ei())})}function M9(){return w9().merge(N9())}function Ei(){return u.union([u.object({type:u.literal(n.ContinueStatement)}),u.record(u.string(),u.any())])}function bi(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ContinueStatement)})}function yd(){return u.object({id:u.string(),type:u.literal(n.ContinueStatement)})}function V9(){return yd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function L9(){return yd().merge(u.object({}))}function G9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:cn()})}function $9(){return V9().merge(G9())}function gr(){return u.union([u.object({type:u.literal(n.ReturnStatement)}),u.record(u.string(),u.any())])}function Ri(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnStatement)})}function hd(){return u.object({id:u.string(),type:u.literal(n.ReturnStatement)})}function F9(){return hd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function U9(){return hd().merge(u.object({}))}function x9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:An()})}function j9(){return F9().merge(x9())}function In(){return u.union([u.object({type:u.literal(n.ReturnDeclaration)}),u.record(u.string(),u.any())])}function UI(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnDeclaration)})}function fd(){return u.object({id:u.string(),type:u.literal(n.ReturnDeclaration),name:u.string(),description:u.string().nullable(),isError:u.boolean()})}function k9(){return fd().merge(u.object({version:u.number(),index:u.number()}))}function q9(){return fd().merge(u.object({}))}function J9(){return u.object({dataType:vr().nullable(),readsValue:wa().nullable(),parent:u.union([Ri(),Rr(),Dn(),bi()])})}function W9(){return k9().merge(J9())}function gi(){return u.union([u.object({type:u.literal(n.BreakStatement)}),u.record(u.string(),u.any())])}function Dn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BreakStatement)})}function md(){return u.object({id:u.string(),type:u.literal(n.BreakStatement)})}function Y9(){return md().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function H9(){return md().merge(u.object({}))}function z9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),outputs:u.array(In()),throws:u.optional(In()),parent:cn()})}function Z9(){return Y9().merge(z9())}function Tt(){return u.union([u.object({type:u.literal(n.OutputMap)}),u.record(u.string(),u.any())])}function Td(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.OutputMap)})}function Ed(){return u.object({id:u.string(),type:u.literal(n.OutputMap)})}function K9(){return Ed().merge(u.object({version:u.number(),index:u.number()}))}function X9(){return Ed().merge(u.object({}))}function Q9(){return u.object({writesValues:u.array(Pn()),declaration:u.union([In(),br()]),parent:u.union([Ee(),cn(),Dn()])})}function e6(){return K9().merge(Q9())}function vi(){return u.union([u.object({type:u.literal(n.FunctionCall)}),u.record(u.string(),u.any())])}function Aa(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionCall)})}function bd(){return u.object({id:u.string(),type:u.literal(n.FunctionCall)})}function t6(){return bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function n6(){return bd().merge(u.object({}))}function r6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:wt(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.optional(Tt()),parent:u.union([An(),Dt()])})}function i6(){return t6().merge(r6())}function a6(){return u.enum([$e.Equal,$e.NotEqual,$e.MoreThan,$e.MoreThanOrEqual,$e.LessThan,$e.LessThanOrEqual,$e.And,$e.Or,Vt.Empty,Vt.NotEmpty])}function Oa(){return u.union([u.object({type:u.literal(n.Condition)}),u.record(u.string(),u.any())])}function uo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Condition)})}function Rd(){return u.object({id:u.string(),type:u.literal(n.Condition)})}function s6(){return Rd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function o6(){return Rd().merge(u.object({}))}function l6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),leftValue:Zt(),rightValue:Zt().nullable(),operator:a6(),parent:u.union([An(),Dt()])})}function c6(){return s6().merge(l6())}function Sa(){return u.union([u.object({type:u.literal(n.Search)}),u.record(u.string(),u.any())])}function Ca(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Search)})}function gd(){return u.object({id:u.string(),type:u.literal(n.Search),name:u.string(),query:u.any(),description:u.string().nullable()})}function d6(){return gd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function u6(){return gd().merge(u.object({}))}function p6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),inputsDeclarations:u.array(Dr()),inputs:u.array(Zt()),outputsDeclarations:u.array(Pa()),outputs:u.array(Tt()),parent:u.union([An(),Dt()]),error:Tt().nullable()})}function y6(){return d6().merge(p6())}function Ba(){return u.union([u.object({type:u.literal(n.InternalCall)}),u.record(u.string(),u.any())])}function vd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InternalCall)})}function Id(){return u.object({id:u.string(),type:u.literal(n.InternalCall),index:u.number()})}function h6(){return Id().merge(u.object({version:u.number(),index:u.number()}))}function f6(){return Id().merge(u.object({declaration:u.union([u.string(),wt()])}))}function m6(){return u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:wt(),inputs:u.array(Zt()),outputs:u.array(Tt()),parent:Yn(),error:u.optional(Tt())})}function T6(){return h6().merge(m6())}function Zt(){return u.union([u.object({type:u.literal(n.InputMap)}),u.record(u.string(),u.any())])}function po(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InputMap)})}function Dd(){return u.object({id:u.string(),type:u.literal(n.InputMap),name:u.string().nullable().optional(),description:u.string().nullable().optional()})}function E6(){return Dd().merge(u.object({version:u.number(),index:u.number()}))}function b6(){return Dd().merge(u.object({}))}function R6(){return u.object({defaultValue:Pd().nullable(),declaration:u.union([Dr(),br()]).nullable(),readsValue:wa().nullable(),parent:u.union([Ee(),po(),cn(),Dn()])})}function g6(){return E6().merge(R6())}function Ii(){return u.union([u.object({type:u.literal(n.Operation)}),u.record(u.string(),u.any())])}function Di(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Operation)})}function yo(){return u.object({id:u.string(),type:u.literal(n.Operation)})}function v6(){return yo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function I6(){return yo().merge(u.object({}))}function D6(){return yo().merge(u.object({successCalls:u.array(He()),errorCalls:u.array(He()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),writesValues:u.array(Pn()),declaration:ln(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.array(Tt()),parent:u.union([An(),Dt()])}))}function P6(){return v6().merge(D6())}function ho(){return u.union([u.string(),u.number(),u.boolean(),u.null(),u.date()])}function xI(){return u.record(u.string(),ho())}function A6(){return u.array(u.union([ho(),xI()]))}function jI(){return u.union([ho(),xI(),A6()])}function kI(){return u.union([ho(),jI()])}function qI(){return u.enum([I.String,I.Number,I.Boolean,I.Null,I.Date,I.KeyValue,I.Enum,I.File,I.UUID,I.EntityTemplate,I.ActionDescriptor])}function O6(){return u.union([Pr(),Di(),_a()])}function S6(){return u.object({id:u.string(),name:qI(),type:u.literal(n.PrimitiveValue),value:kI(),autogeneration:cd.nullable()})}function C6(){return S6().merge(u.object({}))}function Kt(){return u.object({id:u.string(),version:u.number(),name:qI(),type:u.literal(n.PrimitiveValue),value:kI(),valueAsType:O6().nullable(),autogeneration:cd.nullable(),parent:u.union([Ad(),po()])})}function B6(){return Kt().extend({name:u.literal(I.String),value:u.string(),autogeneration:sd.nullable()})}function w6(){return Kt().extend({name:u.literal(I.Number),value:u.number(),autogeneration:od.nullable()})}function _6(){return Kt().extend({name:u.literal(I.Boolean),value:u.boolean(),autogeneration:ad.nullable()})}function N6(){return Kt().extend({name:u.literal(I.Null),value:u.null(),autogeneration:u.null()})}function M6(){return Kt().extend({name:u.literal(I.Date),value:u.date(),autogeneration:ld.nullable()})}function V6(){return Kt().extend({name:u.literal(I.KeyValue),value:jI(),autogeneration:u.null()})}function L6(){return Kt().extend({name:u.literal(I.Enum),value:u.string(),autogeneration:u.null()})}function G6(){return Kt().extend({name:u.literal(I.File),value:u.string(),autogeneration:u.null()})}function $6(){return Kt().extend({name:u.literal(I.UUID),value:u.string(),autogeneration:id.nullable()})}function F6(){return Kt().extend({name:u.literal(I.EntityTemplate),value:Pr(),autogeneration:u.null()})}function U6(){return Kt().extend({name:u.literal(I.ActionDescriptor),value:_a(),autogeneration:u.null()})}function Pd(){return u.union([B6(),w6(),_6(),N6(),M6(),V6(),L6(),G6(),$6(),F6(),U6()])}function vr(){return u.union([u.object({type:u.literal(n.DataType)}),u.record(u.string(),u.any())])}function Ad(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.DataType)})}function Od(){return u.object({id:u.string(),type:u.literal(n.DataType),isNullable:u.boolean(),isList:u.boolean(),constant:u.boolean(),asType:u.boolean(),options:u.array(u.string()).optional()})}function x6(){return Od().merge(u.object({version:u.number()}))}function j6(){return Od().merge(u.object({}))}function k6(){return u.object({defaultValue:Pd().nullable(),entity:u.union([Pi(),mi(),ao(),ln()]).nullable(),parent:u.union([GI(),YI(),LI()])})}function q6(){return x6().merge(k6())}function Sd(){return u.union([u.object({type:u.literal(n.VariableDeclaration)}),u.record(u.string(),u.any())])}function J6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableDeclaration)})}function Cd(){return u.object({id:u.string(),type:u.literal(n.VariableDeclaration),name:u.string(),description:u.string().nullable()})}function W6(){return Cd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function Y6(){return Cd().merge(u.object({}))}function H6(){return u.object({dataType:vr().nullable(),readsValue:wa().nullable(),writesValues:u.array(Pn()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(He()),errorCalls:u.array(He()),internalCalls:u.array(Ba()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),parent:u.union([An(),Dt()])})}function z6(){return W6().merge(H6())}function JI(){return u.union([u.object({type:u.literal(n.VariableInstance)}),u.record(u.string(),u.any())])}function Z6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableInstance)})}function Bd(){return u.object({id:u.string(),type:u.literal(n.VariableInstance)})}function K6(){return Bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function X6(){return Bd().merge(u.object({}))}function Q6(){return u.object({declaration:Sd(),dataType:vr().nullable(),readsValue:wa().nullable(),writesValues:u.array(Pn()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(He()),errorCalls:u.array(He()),internalCalls:u.array(Ba()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(Ye()),parent:u.union([An(),Dt()])})}function e3(){return K6().merge(Q6())}function wd(){return u.union([u.object({type:u.literal(n.InstalledProject)}),u.record(u.string(),u.any())])}function fo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InstalledProject)})}function t3(){return u.object({id:u.string(),type:u.literal(n.InstalledProject)})}function n3(){return u.object({version:u.number(),x:u.number(),y:u.number()})}function r3(){return u.object({})}function i3(){return u.object({implements:Dt(),description:u.string().nullable(),functions:u.array(wt()),events:u.array(_d()),parent:Dt()})}function a3(){return n3().merge(i3())}function _d(){return u.union([u.object({type:u.literal(n.GlobalEvent)}),u.record(u.string(),u.any())])}function s3(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.GlobalEvent)})}function mo(){return u.object({id:u.string(),type:u.literal(n.GlobalEvent),name:u.string(),collapsed:u.boolean()})}function o3(){return mo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function l3(){return mo().merge(u.object({}))}function c3(){return mo().merge(u.object({returnStatements:u.array(gr()),implements:u.array($I()),inputs:u.array(Dr()),calls:u.array(He()),parent:u.union([Dt(),fo()])}))}function d3(){return o3().merge(c3())}function Ir(){return u.union([Sd(),JI()])}function Yn(){return u.union([J6(),Z6()])}function Pn(){return u.union([Ir(),Zt(),In()])}function WI(){return u.union([Yn(),po(),UI()])}function wa(){return u.union([Ir(),Dr(),Tt(),Ii(),Ba(),vi()])}function u3(){return u.union([Yn(),Nd(),Td(),Di(),vd(),Aa()])}function p3(){return u.union([Dr(),Tt(),Pn()])}function YI(){return u.union([Nd(),Td(),WI()])}function To(){return _d()}function Eo(){return s3()}function bo(){return u.union([Ii(),vi(),Oa(),Sa(),Ir(),Ba(),Ti()])}function Ee(){return u.union([Di(),Aa(),uo(),Ca(),Yn(),vd(),cn()])}function Ro(){return u.union([Ii(),vi(),Oa(),Sa(),Ir(),Ti()])}function go(){return u.union([Di(),Aa(),uo(),Ca(),Yn(),cn()])}function HI(){return u.union([bo(),gr(),gi(),Ei()])}function He(){return u.union([Ee(),Ri(),Dn(),bi()])}function zI(){return u.union([Ro(),gr(),gi(),Ei()])}function ZI(){return u.union([go(),Ri(),Dn(),bi()])}function Hn(){return u.union([wt(),To()])}function Ye(){return u.union([_a(),Eo()])}function y3(){return u.union([bo(),Hn()])}function h3(){return u.union([Ee(),Ye()])}function f3(){return u.union([Ro(),Hn()])}function m3(){return u.union([go(),Ye()])}function T3(){return u.union([HI(),Hn()])}function E3(){return u.union([He(),Ye()])}function b3(){return u.union([zI(),Hn()])}function R3(){return u.union([ZI(),Ye()])}function g3(){return u.union([Hn(),Ti()])}function An(){return u.union([Ye(),cn()])}function v3(){return u.union([bo(),Hn()])}function I3(){return u.union([Ee(),Ye()])}function D3(){return u.union([Ro(),Hn()])}function P3(){return u.union([go(),Ye()])}function A3(){return u.union([gr(),gi(),Ei()])}function O3(){return u.union([Ri(),Dn(),bi()])}function S3(){return u.union([mi(),U3(),wd(),Pi(),wt(),To(),Ir(),Zt(),Tt(),Oa(),Ii(),vi(),In(),Dr(),ao(),vr(),br(),ln(),gr(),Ei(),gi(),Ti(),Sa(),ln(),ln(),Pa(),Ba()])}function C3(){return u.union([lo(),Dt(),fo(),Pr(),_a(),Eo(),Yn(),po(),Td(),uo(),Di(),Aa(),UI(),Nd(),so(),Ad(),GI(),Rr(),Ri(),bi(),Dn(),cn(),Ca(),Rr(),Rr(),LI(),vd()])}function B3(){return u.union([wd(),Pi(),wt(),To(),Ir(),Oa(),Ii(),vi(),gr(),Ei(),gi(),Ti(),Sa()])}function w3(){return u.union([fo(),Pr(),_a(),Eo(),Yn(),uo(),Di(),Aa(),Ri(),bi(),Dn(),cn(),Ca()])}function Dr(){return u.union([u.object({type:u.literal(n.ArgumentDeclaration)}),u.record(u.string(),u.any())])}function Nd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ArgumentDeclaration)})}function Md(){return u.object({id:u.string(),type:u.literal(n.ArgumentDeclaration)})}function _3(){return Md().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function N3(){return Md().merge(u.object({}))}function M3(){return u.object({dataType:vr().nullable(),writesValues:u.array(Pn()),parent:u.union([Ye(),Rr(),Rr(),Ca(),Dn()])})}function V3(){return _3().merge(M3())}function wt(){return u.union([u.object({type:u.literal(n.FunctionDeclaration)}),u.record(u.string(),u.any())])}function _a(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionDeclaration)})}function Vd(){return u.object({id:u.string(),type:u.literal(n.FunctionDeclaration),name:u.string(),description:u.string().nullable()})}function L3(){return Vd().merge(u.object({version:u.number(),x:u.number(),y:u.number(),index:u.number().nullable()}))}function G3(){return Vd()}function $3(){return u.object({inputs:u.array(Dr()),implements:ln().nullable(),returnStatements:u.array(gr()),parent:u.union([Dt(),fo(),Pr(),cn(),lo(),so()])})}function F3(){return L3().merge($3())}function U3(){return u.union([u.object({type:u.literal(n.Project)}),u.record(u.string(),u.any())])}function Dt(){return u.object({entityType:u.literal(n.Project),entityId:u.string(),id:u.string(),type:u.literal(n.GenericReference)})}function Ld(){return u.object({id:u.string(),type:u.literal(n.Project),name:u.string(),description:u.string().nullable()})}function x3(){return Ld().merge(u.object({version:u.number()}))}function j3(){return Ld()}function k3(){return u.object({entities:u.array(Pi()),functions:u.array(wt()),events:u.array(_d()),projects:u.array(wd()),variableDeclarations:u.array(Sd()),variableInstances:u.array(JI()),conditions:u.array(Oa()),operations:u.array(Ii()),functionCalls:u.array(vi()),loops:u.array(Ti()),searches:u.array(Sa())})}function q3(){return x3().merge(k3())}function Pi(){return u.union([u.object({type:u.literal(n.CustomEntity)}),u.record(u.string(),u.any())])}function Pr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.CustomEntity)})}function Gd(){return u.object({id:u.string(),type:u.literal(n.CustomEntity),name:u.string(),description:u.string().nullable(),static:u.boolean(),abstract:u.boolean()})}function J3(){return Gd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function W3(){return Gd().merge(u.object({}))}function Y3(){return u.union([Dt(),Ad()])}function H3(){return u.object({properties:u.array(br()),methods:u.array(wt()),abstractMethods:u.array(ln()),extends:u.array(u.union([Pi(),mi()])),implements:u.array(u.union([Pi(),mi()])),parent:Y3()})}function z3(){return J3().merge(H3())}function Z3(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var K3=class extends Error{constructor(e,t){super(e,t);c(this,"name");c(this,"details");this.name="ZodValidationError",this.details=X3(t)}toString(){return this.message}};function X3(r){if(r){const e=r.cause;if(Z3(e))return e.issues}return[]}function Q3(r){return r.length!==0}var e5=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function t5(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+'["'+n5(t)+'"]';if(!e5.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function n5(r){return r.replace(/"/g,'\\"')}var r5="; ",i5=99,KI="Validation error",a5=": ",s5=", or ";function o5(r={}){const{issueSeparator:e=r5,unionSeparator:t=s5,prefixSeparator:i=a5,prefix:a=KI,includePath:s=!0,maxIssuesInMessage:o=i5}=r;return l=>{const p=l.slice(0,o).map(y=>vo({issue:y,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return l5(p,a,i)}}function vo(r){const{issue:e,issueSeparator:t,unionSeparator:i,includePath:a}=r;if(e.code===w.invalid_union)return e.unionErrors.reduce((s,o)=>{const l=o.issues.map(p=>vo({issue:p,issueSeparator:t,unionSeparator:i,includePath:a})).join(t);return s.includes(l)||s.push(l),s},[]).join(i);if(e.code===w.invalid_arguments)return[e.message,...e.argumentsError.issues.map(s=>vo({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(e.code===w.invalid_return_type)return[e.message,...e.returnTypeError.issues.map(s=>vo({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&Q3(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 "${t5(e.path)}"`}return e.message}function l5(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:KI}function c5(r,e={}){const i=d5(e)([r]);return new K3(i,{cause:new It([r])})}function d5(r){return"messageBuilder"in r?r.messageBuilder:o5(r)}var XI="1.13.7",QI=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Io=Array.prototype,$d=Object.prototype,eD=typeof Symbol<"u"?Symbol.prototype:null,u5=Io.push,Na=Io.slice,Ma=$d.toString,p5=$d.hasOwnProperty,tD=typeof ArrayBuffer<"u",y5=typeof DataView<"u",h5=Array.isArray,nD=Object.keys,rD=Object.create,iD=tD&&ArrayBuffer.isView,f5=isNaN,m5=isFinite,aD=!{toString:null}.propertyIsEnumerable("toString"),sD=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],T5=Math.pow(2,53)-1;function Pt(r,e){return e=e==null?r.length-1:+e,function(){for(var t=Math.max(arguments.length-e,0),i=Array(t),a=0;a<t;a++)i[a]=arguments[a+e];switch(e){case 0:return r.call(this,i);case 1:return r.call(this,arguments[0],i);case 2:return r.call(this,arguments[0],arguments[1],i)}var s=Array(e+1);for(a=0;a<e;a++)s[a]=arguments[a];return s[e]=i,r.apply(this,s)}}function zn(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function E5(r){return r===null}function oD(r){return r===void 0}function lD(r){return r===!0||r===!1||Ma.call(r)==="[object Boolean]"}function b5(r){return!!(r&&r.nodeType===1)}function ct(r){var e="[object "+r+"]";return function(t){return Ma.call(t)===e}}const Fd=ct("String"),cD=ct("Number"),R5=ct("Date"),g5=ct("RegExp"),v5=ct("Error"),dD=ct("Symbol"),uD=ct("ArrayBuffer");var pD=ct("Function"),I5=QI.document&&QI.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof I5!="function"&&(pD=function(r){return typeof r=="function"||!1});const Et=pD,yD=ct("Object");var hD=y5&&(!/\[native code\]/.test(String(DataView))||yD(new DataView(new ArrayBuffer(8)))),Ud=typeof Map<"u"&&yD(new Map),D5=ct("DataView");function P5(r){return r!=null&&Et(r.getInt8)&&uD(r.buffer)}const Do=hD?P5:D5,Ar=h5||ct("Array");function Zn(r,e){return r!=null&&p5.call(r,e)}var xd=ct("Arguments");(function(){xd(arguments)||(xd=function(r){return Zn(r,"callee")})})();const jd=xd;function A5(r){return!dD(r)&&m5(r)&&!isNaN(parseFloat(r))}function fD(r){return cD(r)&&f5(r)}function mD(r){return function(){return r}}function TD(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=T5}}function ED(r){return function(e){return e==null?void 0:e[r]}}const Po=ED("byteLength"),O5=TD(Po);var S5=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function C5(r){return iD?iD(r)&&!Do(r):O5(r)&&S5.test(Ma.call(r))}const bD=tD?C5:mD(!1),At=ED("length");function B5(r){for(var e={},t=r.length,i=0;i<t;++i)e[r[i]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,r.push(a)}}}function RD(r,e){e=B5(e);var t=sD.length,i=r.constructor,a=Et(i)&&i.prototype||$d,s="constructor";for(Zn(r,s)&&!e.contains(s)&&e.push(s);t--;)s=sD[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function Qe(r){if(!zn(r))return[];if(nD)return nD(r);var e=[];for(var t in r)Zn(r,t)&&e.push(t);return aD&&RD(r,e),e}function Va(r){if(r==null)return!0;var e=At(r);return typeof e=="number"&&(Ar(r)||Fd(r)||jd(r))?e===0:At(Qe(r))===0}function gD(r,e){var t=Qe(e),i=t.length;if(r==null)return!i;for(var a=Object(r),s=0;s<i;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function se(r){if(r instanceof se)return r;if(!(this instanceof se))return new se(r);this._wrapped=r}se.VERSION=XI,se.prototype.value=function(){return this._wrapped},se.prototype.valueOf=se.prototype.toJSON=se.prototype.value,se.prototype.toString=function(){return String(this._wrapped)};function vD(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,Po(r))}var ID="[object DataView]";function kd(r,e,t,i){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:DD(r,e,t,i)}function DD(r,e,t,i){r instanceof se&&(r=r._wrapped),e instanceof se&&(e=e._wrapped);var a=Ma.call(r);if(a!==Ma.call(e))return!1;if(hD&&a=="[object Object]"&&Do(r)){if(!Do(e))return!1;a=ID}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 eD.valueOf.call(r)===eD.valueOf.call(e);case"[object ArrayBuffer]":case ID:return DD(vD(r),vD(e),t,i)}var s=a==="[object Array]";if(!s&&bD(r)){var o=Po(r);if(o!==Po(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&&!(Et(l)&&l instanceof l&&Et(p)&&p instanceof p)&&"constructor"in r&&"constructor"in e)return!1}t=t||[],i=i||[];for(var y=t.length;y--;)if(t[y]===r)return i[y]===e;if(t.push(r),i.push(e),s){if(y=r.length,y!==e.length)return!1;for(;y--;)if(!kd(r[y],e[y],t,i))return!1}else{var h=Qe(r),m;if(y=h.length,Qe(e).length!==y)return!1;for(;y--;)if(m=h[y],!(Zn(e,m)&&kd(r[m],e[m],t,i)))return!1}return t.pop(),i.pop(),!0}function w5(r,e){return kd(r,e)}function La(r){if(!zn(r))return[];var e=[];for(var t in r)e.push(t);return aD&&RD(r,e),e}function qd(r){var e=At(r);return function(t){if(t==null)return!1;var i=La(t);if(At(i))return!1;for(var a=0;a<e;a++)if(!Et(t[r[a]]))return!1;return r!==OD||!Et(t[Jd])}}var Jd="forEach",PD="has",Wd=["clear","delete"],AD=["get",PD,"set"],_5=Wd.concat(Jd,AD),OD=Wd.concat(AD),N5=["add"].concat(Wd,Jd,PD);const M5=Ud?qd(_5):ct("Map"),V5=Ud?qd(OD):ct("WeakMap"),L5=Ud?qd(N5):ct("Set"),G5=ct("WeakSet");function Ai(r){for(var e=Qe(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=r[e[a]];return i}function $5(r){for(var e=Qe(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],r[e[a]]];return i}function SD(r){for(var e={},t=Qe(r),i=0,a=t.length;i<a;i++)e[r[t[i]]]=t[i];return e}function Yd(r){var e=[];for(var t in r)Et(r[t])&&e.push(t);return e.sort()}function Hd(r,e){return function(t){var i=arguments.length;if(e&&(t=Object(t)),i<2||t==null)return t;for(var a=1;a<i;a++)for(var s=arguments[a],o=r(s),l=o.length,p=0;p<l;p++){var y=o[p];(!e||t[y]===void 0)&&(t[y]=s[y])}return t}}const CD=Hd(La),Ao=Hd(Qe),BD=Hd(La,!0);function F5(){return function(){}}function wD(r){if(!zn(r))return{};if(rD)return rD(r);var e=F5();e.prototype=r;var t=new e;return e.prototype=null,t}function U5(r,e){var t=wD(r);return e&&Ao(t,e),t}function x5(r){return zn(r)?Ar(r)?r.slice():CD({},r):r}function j5(r,e){return e(r),r}function _D(r){return Ar(r)?r:[r]}se.toPath=_D;function Ga(r){return se.toPath(r)}function zd(r,e){for(var t=e.length,i=0;i<t;i++){if(r==null)return;r=r[e[i]]}return t?r:void 0}function ND(r,e,t){var i=zd(r,Ga(e));return oD(i)?t:i}function k5(r,e){e=Ga(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!Zn(r,a))return!1;r=r[a]}return!!t}function Zd(r){return r}function $a(r){return r=Ao({},r),function(e){return gD(e,r)}}function Kd(r){return r=Ga(r),function(e){return zd(e,r)}}function Fa(r,e,t){if(e===void 0)return r;switch(t??3){case 1:return function(i){return r.call(e,i)};case 3:return function(i,a,s){return r.call(e,i,a,s)};case 4:return function(i,a,s,o){return r.call(e,i,a,s,o)}}return function(){return r.apply(e,arguments)}}function MD(r,e,t){return r==null?Zd:Et(r)?Fa(r,e,t):zn(r)&&!Ar(r)?$a(r):Kd(r)}function Xd(r,e){return MD(r,e,1/0)}se.iteratee=Xd;function Ot(r,e,t){return se.iteratee!==Xd?se.iteratee(r,e):MD(r,e,t)}function q5(r,e,t){e=Ot(e,t);for(var i=Qe(r),a=i.length,s={},o=0;o<a;o++){var l=i[o];s[l]=e(r[l],l,r)}return s}function VD(){}function J5(r){return r==null?VD:function(e){return ND(r,e)}}function W5(r,e,t){var i=Array(Math.max(0,r));e=Fa(e,t,1);for(var a=0;a<r;a++)i[a]=e(a);return i}function Qd(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const Ua=Date.now||function(){return new Date().getTime()};function LD(r){var e=function(s){return r[s]},t="(?:"+Qe(r).join("|")+")",i=RegExp(t),a=RegExp(t,"g");return function(s){return s=s==null?"":""+s,i.test(s)?s.replace(a,e):s}}const GD={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Y5=LD(GD),H5=SD(GD),z5=LD(H5),Z5=se.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var eu=/(.)^/,K5={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},X5=/\\|'|\r|\n|\u2028|\u2029/g;function Q5(r){return"\\"+K5[r]}var ek=/^\s*(\w|\$)+\s*$/;function tk(r,e,t){!e&&t&&(e=t),e=BD({},e,se.templateSettings);var i=RegExp([(e.escape||eu).source,(e.interpolate||eu).source,(e.evaluate||eu).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(i,function(y,h,m,R,v){return s+=r.slice(a,v).replace(X5,Q5),a=v+y.length,h?s+=`'+
|
|
2
2
|
((__t=(`+h+`))==null?'':_.escape(__t))+
|
|
3
3
|
'`:m?s+=`'+
|
|
4
4
|
((__t=(`+m+`))==null?'':__t)+
|
|
@@ -10,14 +10,14 @@ __p+='`),y}),s+=`';
|
|
|
10
10
|
`,o="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
|
|
11
11
|
`+s+`return __p;
|
|
12
12
|
`;var l;try{l=new Function(o,"_",s)}catch(y){throw y.source=s,y}var p=function(y){return l.call(this,y,se)};return p.source="function("+o+`){
|
|
13
|
-
`+s+"}",p}function nk(r,e,t){e=Ga(e);var i=e.length;if(!i)return Tt(t)?t.call(r):t;for(var a=0;a<i;a++){var s=r==null?void 0:r[e[a]];s===void 0&&(s=t,a=i),r=Tt(s)?s.call(r):s}return r}var rk=0;function ik(r){var e=++rk+"";return r?r+e:e}function ak(r){var e=se(r);return e._chain=!0,e}function FD(r,e,t,i,a){if(!(i instanceof e))return r.apply(t,a);var s=_D(r.prototype),o=r.apply(s,a);return zn(o)?o:s}var Oi=Pt(function(r,e){var t=Oi.placeholder,i=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 FD(r,i,this,this,o)};return i});Oi.placeholder=se;const UD=Pt(function(r,e,t){if(!Tt(r))throw new TypeError("Bind must be called on a function");var i=Pt(function(a){return FD(r,i,e,this,t.concat(a))});return i}),_t=ED(At);function Or(r,e,t,i){if(i=i||[],!e&&e!==0)e=1/0;else if(e<=0)return i.concat(r);for(var a=i.length,s=0,o=At(r);s<o;s++){var l=r[s];if(_t(l)&&(Ar(l)||jd(l)))if(e>1)Or(l,e-1,t,i),a=i.length;else for(var p=0,y=l.length;p<y;)i[a++]=l[p++];else t||(i[a++]=l)}return i}const sk=Pt(function(r,e){e=Or(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var i=e[t];r[i]=UD(r[i],r)}return r});function ok(r,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return Zn(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const xD=Pt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),lk=Oi(xD,se,1);function ck(r,e,t){var i,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:Ua(),i=null,o=r.apply(a,s),i||(a=s=null)},y=function(){var h=Ua();!l&&t.leading===!1&&(l=h);var m=e-(h-l);return a=this,s=arguments,m<=0||m>e?(i&&(clearTimeout(i),i=null),l=h,o=r.apply(a,s),i||(a=s=null)):!i&&t.trailing!==!1&&(i=setTimeout(p,m)),o};return y.cancel=function(){clearTimeout(i),l=0,i=a=s=null},y}function dk(r,e,t){var i,a,s,o,l,p=function(){var h=Ua()-a;e>h?i=setTimeout(p,e-h):(i=null,t||(o=r.apply(l,s)),i||(s=l=null))},y=Pt(function(h){return l=this,s=h,a=Ua(),i||(i=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return y.cancel=function(){clearTimeout(i),i=s=l=null},y}function uk(r,e){return Oi(e,r)}function tu(r){return function(){return!r.apply(this,arguments)}}function pk(){var r=arguments,e=r.length-1;return function(){for(var t=e,i=r[e].apply(this,arguments);t--;)i=r[t].call(this,i);return i}}function yk(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function jD(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const hk=Oi(jD,2);function kD(r,e,t){e=Ot(e,t);for(var i=Qe(r),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(r[a],a,r))return a}function qD(r){return function(e,t,i){t=Ot(t,i);for(var a=At(e),s=r>0?0:a-1;s>=0&&s<a;s+=r)if(t(e[s],s,e))return s;return-1}}const nu=qD(1),JD=qD(-1);function WD(r,e,t,i){t=Ot(t,i,1);for(var a=t(e),s=0,o=At(r);s<o;){var l=Math.floor((s+o)/2);t(r[l])<a?s=l+1:o=l}return s}function YD(r,e,t){return function(i,a,s){var o=0,l=At(i);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(i,a),i[s]===a?s:-1;if(a!==a)return s=e(Na.call(i,o,l),mD),s>=0?s+o:-1;for(s=r>0?o:l-1;s>=0&&s<l;s+=r)if(i[s]===a)return s;return-1}}const HD=YD(1,nu,WD),fk=YD(-1,JD);function ru(r,e,t){var i=_t(r)?nu:kD,a=i(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function mk(r,e){return ru(r,$a(e))}function On(r,e,t){e=Fa(e,t);var i,a;if(_t(r))for(i=0,a=r.length;i<a;i++)e(r[i],i,r);else{var s=Qe(r);for(i=0,a=s.length;i<a;i++)e(r[s[i]],s[i],r)}return r}function Sr(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=Array(a),o=0;o<a;o++){var l=i?i[o]:o;s[o]=e(r[l],l,r)}return s}function zD(r){var e=function(t,i,a,s){var o=!_t(t)&&Qe(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 y=o?o[p]:p;a=i(a,t[y],y,t)}return a};return function(t,i,a,s){var o=arguments.length>=3;return e(t,Fa(i,s,4),a,o)}}const iu=zD(1),ZD=zD(-1);function Si(r,e,t){var i=[];return e=Ot(e,t),On(r,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function Tk(r,e,t){return Si(r,tu(Ot(e)),t)}function KD(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=0;s<a;s++){var o=i?i[s]:s;if(!e(r[o],o,r))return!1}return!0}function XD(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=0;s<a;s++){var o=i?i[s]:s;if(e(r[o],o,r))return!0}return!1}function Sn(r,e,t,i){return _t(r)||(r=Ai(r)),(typeof t!="number"||i)&&(t=0),HD(r,e,t)>=0}const Ek=Pt(function(r,e,t){var i,a;return Tt(e)?a=e:(e=Ga(e),i=e.slice(0,-1),e=e[e.length-1]),Sr(r,function(s){var o=a;if(!o){if(i&&i.length&&(s=zd(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function au(r,e){return Sr(r,Kd(e))}function bk(r,e){return Si(r,$a(e))}function QD(r,e,t){var i=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=_t(r)?r:Ai(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s>i&&(i=s)}else e=Ot(e,t),On(r,function(y,h,m){o=e(y,h,m),(o>a||o===-1/0&&i===-1/0)&&(i=y,a=o)});return i}function Rk(r,e,t){var i=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=_t(r)?r:Ai(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s<i&&(i=s)}else e=Ot(e,t),On(r,function(y,h,m){o=e(y,h,m),(o<a||o===1/0&&i===1/0)&&(i=y,a=o)});return i}var gk=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function eP(r){return r?Ar(r)?Na.call(r):Fd(r)?r.match(gk):_t(r)?Sr(r,Zd):Ai(r):[]}function tP(r,e,t){if(e==null||t)return _t(r)||(r=Ai(r)),r[Qd(r.length-1)];var i=eP(r),a=At(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Qd(o,s),p=i[o];i[o]=i[l],i[l]=p}return i.slice(0,e)}function vk(r){return tP(r,1/0)}function Ik(r,e,t){var i=0;return e=Ot(e,t),au(Sr(r,function(a,s,o){return{value:a,index:i++,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 Oo(r,e){return function(t,i,a){var s=e?[[],[]]:{};return i=Ot(i,a),On(t,function(o,l){var p=i(o,l,t);r(s,o,p)}),s}}const Dk=Oo(function(r,e,t){Zn(r,t)?r[t].push(e):r[t]=[e]}),Pk=Oo(function(r,e,t){r[t]=e}),Ak=Oo(function(r,e,t){Zn(r,t)?r[t]++:r[t]=1}),Ok=Oo(function(r,e,t){r[t?0:1].push(e)},!0);function Sk(r){return r==null?0:_t(r)?r.length:Qe(r).length}function Ck(r,e,t){return e in t}const nP=Pt(function(r,e){var t={},i=e[0];if(r==null)return t;Tt(i)?(e.length>1&&(i=Fa(i,e[1])),e=La(r)):(i=Ck,e=Or(e,!1,!1),r=Object(r));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=r[o];i(l,o,r)&&(t[o]=l)}return t}),Bk=Pt(function(r,e){var t=e[0],i;return Tt(t)?(t=tu(t),e.length>1&&(i=e[1])):(e=Sr(Or(e,!1,!1),String),t=function(a,s){return!Sn(e,s)}),nP(r,t,i)});function rP(r,e,t){return Na.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]:rP(r,r.length-e)}function So(r,e,t){return Na.call(r,e==null||t?1:e)}function wk(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:So(r,Math.max(0,r.length-e))}function _k(r){return Si(r,Boolean)}function Nk(r,e){return Or(r,e,!1)}const iP=Pt(function(r,e){return e=Or(e,!0,!0),Si(r,function(t){return!Sn(e,t)})}),Mk=Pt(function(r,e){return iP(r,e)});function ou(r,e,t,i){cD(e)||(i=t,t=e,e=!1),t!=null&&(t=Ot(t,i));for(var a=[],s=[],o=0,l=At(r);o<l;o++){var p=r[o],y=t?t(p,o,r):p;e&&!t?((!o||s!==y)&&a.push(p),s=y):t?Sn(s,y)||(s.push(y),a.push(p)):Sn(a,p)||a.push(p)}return a}const Vk=Pt(function(r){return ou(Or(r,!0,!0))});function Lk(r){for(var e=[],t=arguments.length,i=0,a=At(r);i<a;i++){var s=r[i];if(!Sn(e,s)){var o;for(o=1;o<t&&Sn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function lu(r){for(var e=r&&QD(r,At).length||0,t=Array(e),i=0;i<e;i++)t[i]=au(r,i);return t}const Gk=Pt(lu);function $k(r,e){for(var t={},i=0,a=At(r);i<a;i++)e?t[r[i]]=e[i]:t[r[i][0]]=r[i][1];return t}function Fk(r,e,t){e==null&&(e=r||0,r=0),t||(t=e<r?-1:1);for(var i=Math.max(Math.ceil((e-r)/t),0),a=Array(i),s=0;s<i;s++,r+=t)a[s]=r;return a}function Uk(r,e){if(e==null||e<1)return[];for(var t=[],i=0,a=r.length;i<a;)t.push(Na.call(r,i,i+=e));return t}function cu(r,e){return r._chain?se(e).chain():e}function aP(r){return On(Yd(r),function(e){var t=se[e]=r[e];se.prototype[e]=function(){var i=[this._wrapped];return u5.apply(i,arguments),cu(this,t.apply(se,i))}}),se}On(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=Io[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(r==="shift"||r==="splice")&&t.length===0&&delete t[0]),cu(this,t)}}),On(["concat","join","slice"],function(r){var e=Io[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),cu(this,t)}});var sP=aP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:QI,after:yk,all:KD,allKeys:La,any:XD,assign:Ao,before:jD,bind:UD,bindAll:sk,chain:ak,chunk:Uk,clone:x5,collect:Sr,compact:_k,compose:pk,constant:TD,contains:Sn,countBy:Ak,create:U5,debounce:dk,default:se,defaults:wD,defer:lk,delay:xD,detect:ru,difference:iP,drop:So,each:On,escape:Y5,every:KD,extend:BD,extendOwn:Ao,filter:Si,find:ru,findIndex:nu,findKey:kD,findLastIndex:JD,findWhere:mk,first:su,flatten:Nk,foldl:iu,foldr:ZD,forEach:On,functions:Yd,get:MD,groupBy:Dk,has:k5,head:su,identity:Zd,include:Sn,includes:Sn,indexBy:Pk,indexOf:HD,initial:rP,inject:iu,intersection:Lk,invert:CD,invoke:Ek,isArguments:jd,isArray:Ar,isArrayBuffer:pD,isBoolean:cD,isDataView:Do,isDate:R5,isElement:b5,isEmpty:Va,isEqual:w5,isError:v5,isFinite:A5,isFunction:Tt,isMap:M5,isMatch:vD,isNaN:mD,isNull:E5,isNumber:dD,isObject:zn,isRegExp:g5,isSet:L5,isString:Fd,isSymbol:uD,isTypedArray:RD,isUndefined:lD,isWeakMap:V5,isWeakSet:G5,iteratee:Xd,keys:Qe,last:wk,lastIndexOf:fk,map:Sr,mapObject:q5,matcher:$a,matches:$a,max:QD,memoize:ok,methods:Yd,min:Rk,mixin:aP,negate:tu,noop:LD,now:Ua,object:$k,omit:Bk,once:hk,pairs:$5,partial:Oi,partition:Ok,pick:nP,pluck:au,property:Kd,propertyOf:J5,random:Qd,range:Fk,reduce:iu,reduceRight:ZD,reject:Tk,rest:So,restArguments:Pt,result:nk,sample:tP,select:Si,shuffle:vk,size:Sk,some:XD,sortBy:Ik,sortedIndex:WD,tail:So,take:su,tap:j5,template:tk,templateSettings:Z5,throttle:ck,times:W5,toArray:eP,toPath:ND,transpose:lu,unescape:z5,union:Vk,uniq:ou,unique:ou,uniqueId:ik,unzip:lu,values:Ai,where:bk,without:Mk,wrap:uk,zip:Gk},Symbol.toStringTag,{value:"Module"})));sP._=sP;function Co(r){return r.charAt(0).toUpperCase()+r.slice(1)}function oP(r){return r.charAt(0).toLowerCase()+r.slice(1)}function lP(r,e){if(r.type!==n.Property||e.type!==n.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:jt(r.dataType,e.dataType).compatible}function cP(r,e){if(r.type!==n.CustomEntity||e.type!==n.CustomEntity)throw new Error(`Expected custom 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 i=[];for(let a=0;a<r.properties.length;a++){const s=r.properties[a];t.find(l=>{const p=lP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||i.push(s)}return!(i.length>0)}var xt=(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.SameCustomEntities="same-custom-entities",r.CompatibleCustomEntities="compatible-custom-entities",r.IncompatibleCustomEntities="incompatible-custom-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))(xt||{});function jt(r,e){var t,i,a,s,o,l,p,y,h,m,R;if(r&&r.type!==n.DataType||e&&e.type!==n.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.isNullable!==e.isNullable)return{compatible:!1,type:r.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-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)!==((i=e.entity)==null?void 0:i.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=r.entity)==null?void 0:a.type)===n.CustomEntity){if(((s=r.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const v=cP(r.entity,e.entity);return{compatible:v,type:v?"compatible-custom-entities":"incompatible-custom-entities"}}return((l=r.entity)==null?void 0:l.type)===n.PrimitiveEntity?((p=r.entity)==null?void 0:p.id)===((y=e.entity)==null?void 0:y.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=r.entity)==null?void 0:h.type)===n.BuiltInBaseEntity?((m=r.entity)==null?void 0:m.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 xk(r){const e=r.project.builtInBaseEntities.find(a=>a.id===V.EXECUTION),t={id:r.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=g(t,r.project);return i.inferred=!0,i.sync(t),i.setParent(r),i.entity=e,i}function dP(r){return r.dataType?r.dataType:null}function du(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved()?e:r.readsValue?dn(r.readsValue):null}function uu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved()?r.dataType:r.readsValue?dn(r.readsValue):null}function uP(r){return dn(r.declaration)}function pP(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function pu(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function yP(r){return(r==null?void 0:r.dataType)||null}function hP(r){return(r==null?void 0:r.dataType)||null}function dn(r){switch(r.type){case n.VariableDeclaration:return pP(r);case n.ArgumentDeclaration:return dP(r);case n.ReturnDeclaration:return uu(r);case n.VariableInstance:return uP(r);case n.InputMap:return du(r);case n.OutputMap:return pu(r);case n.Property:return yP(r);case n.ValueDescriptor:return hP(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Bo(r){switch(r.type){case n.ArgumentDeclaration:return r.getDataType();case n.InputMap:return r.getDataType();case n.VariableDeclaration:return r.getDataType();case n.VariableInstance:return r.getDataType();case n.OutputMap:return r.getDataType();case n.ReturnDeclaration:return r.getDataType();case n.Property:return r.getDataType();case n.ValueDescriptor:return r.getDataType();default:return null}}function N(r){if(r){let e=null;return typeof r=="string"?e=r:r.entityId?e=r.entityId:r.type!==n.GenericReference&&(e=r.id),e}return null}function Cr(r){return r.declaration||r}function jk(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function yu(r,e){const t=[];if(r.type===n.Project)t.push(...r.variableDeclarations);else{const a=bt(Me(r)).filter(s=>s.type===n.VariableDeclaration);t.push(...a),r.parent&&(dt.includes(r.parent.type)||r.parent.type===n.Project)&&t.push(...yu(r.parent))}return t}function kk(r){return r.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function qk(r){return r.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function fP(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 wo(r){return fP(r).toLowerCase()}function hu(r){if(!r)return"Any data type";if(!r.entity)return r.isList?"List of an unknown data type":"Unknown data type";if(r.entity.type===n.PrimitiveEntity){const e=r.entity.name===I.String?"Text":r.entity.name;return r.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(r.entity.type===n.CustomEntity){const e=EP(r.entity);return r.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(r.entity.type===n.BuiltInBaseEntity){const e=TP(r.entity);return r.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.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 Jk(r){if(!r)return"Any data type";const e=r.getDataType();return hu(e)}function _o(r){switch(r.declaration.id){case $e.Equal:return"is equal to";case $e.NotEqual:return"is not equal to";case $e.MoreThan:return"is greater than";case $e.MoreThanOrEqual:return"is greater than or equal to";case $e.LessThan:return"is less than";case $e.LessThanOrEqual:return"is less than or equal to";case $e.And:return"and";case $e.Or:return"or";case Vt.Empty:return"is empty";case Vt.NotEmpty:return"is not empty"}}function mP(r){return r.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(V.PERSISTED_ENTITY)?"Persisted entity":r.includes(V.CRON_JOB)?"Scheduled execution":r.includes(V.RELATIONAL_DATABASE)?"Relational database":"Entity"}function TP(r){switch(r.name){case V.HTTP_ENDPOINT:return"HTTP endpoint";case V.PERSISTED_ENTITY:return"Persisted entity";case V.CRON_JOB:return"Scheduled execution";case V.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function EP(r){const e=ku(r);if(!e){const t=xu(r);return t.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(V.PERSISTED_ENTITY)?"Persisted entity":t.includes(V.CRON_JOB)?"Scheduled execution":t.includes(V.RELATIONAL_DATABASE)?"Relational database":C(r,r.project)+" entity"}return C(e,r.project)+" entity"}function bP(r){let e="Find ";return r.outputsDeclarations.forEach((t,i)=>{const a=Bo(t),s=oP(a&&a.entity?C(a.entity,r.project):"unstructured data");i===0?e+=`${s} `:i===r.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function RP(r){switch(r.name){case I.String:return"Text";case I.Number:return"Number";case I.Boolean:return"Boolean";case I.KeyValue:return"Data structure";case I.UUID:return"Unique identifier";case I.Date:return"Date";case I.EntityTemplate:return"Entity as template";case I.Enum:return"Enumeration";case I.File:return"File";case I.Null:return"Empty";case I.ActionDescriptor:return"Action descriptor";case I.Untyped:return"Untyped";default:return r.name}}function gP(r){switch(r.id){case $.List:return"Loop over list items";case $.ManualFlow:return"Manual flow control loop";case $.ObjectKeys:return"Loop over object keys";case $.ObjectValues:return"Loop over object values";case $.Counted:return"Loop given number of times";case $.String:return"Loop over text characters";case Te.Addition:return"Sum numbers";case Te.Subtraction:return"Subtract numbers";case Te.Multiplication:return"Multiply numbers";case Te.Division:return"Divide numbers";case Te.Remainder:return"Get remainder of numbers";case Te.Exponentiation:return"Get exponent of numbers";case K.AddIndex:return"Add at index position";case K.DeleteFirst:return"Delete first character";case K.DeleteLast:return"Delete last character";case K.DeleteIndex:return"Delete at index position";case K.Join:return"Join texts";case K.ReplaceAllMatches:return"Replace all matches";case K.ReplaceFirst:return"Replace first match";case K.ReplaceLast:return"Replace last match";case K.Split:return"Split text";case K.ReplaceIndex:return"Replace at index position";case K.ReplaceSingleMatch:return"Replace single match";case K.GetFirst:return"Get first character";case K.GetLast:return"Get last character";case K.GetIndex:return"Get at index position";case K.Append:return"Add at the end";case K.Prepend:return"Add at the start";case le.Wait:return"Wait";case le.Parallel:return"Run in parallel";case le.Sequential:return"Run in sequence";case tt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case H.AddIndex:return"Add item at index position";case H.DeleteFirst:return"Delete first item";case H.DeleteLast:return"Delete last item";case H.DeleteIndex:return"Delete item at index position";case H.Join:return"Join lists";case H.ReplaceAllMatches:return"Replace all matches";case H.ReplaceFirst:return"Replace first match";case H.ReplaceLast:return"Replace last match";case H.Split:return"Split list";case H.ReplaceIndex:return"Replace at index position";case H.ReplaceSingleMatch:return"Replace single match";case H.GetFirst:return"Get first item";case H.GetLast:return"Get last item";case H.GetIndex:return"Get item at index position";case H.Append:return"Add item at the end";case H.Prepend:return"Add item at the start";case yn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function C(r,e){var t;if(n.FunctionDeclaration===r.type){const i=r.name;if(Object.values(Ct).includes(i))switch(i){case Ct.AbortExecution:return"Abort execution";case Ct.DeletePersistedEntity:return"Delete persisted entity";case Ct.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Co(r.type).replaceAll("-"," ")}return i}if(n.BuiltInBaseEntity===r.type)return mP([r.name]);if(Zu.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return bP(r);case n.Operation:case n.InternalCall:case n.Loop:const i=Mt(r.declaration,e);return C(i,e);case n.ActionDescriptor:return gP(r);case n.BreakStatement:const a=Mt(r.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Mt(r.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Mt(r.declaration,e).name;case n.Condition:{const l=r;if((t=r.inputs)!=null&&t.length){const p=C(l.inputs[0],l.project);if(l.inputs[1]){const y=l.inputs[1].declaration.name;return`If ${p} ${_o(l)} ${y}`}return`If ${p} ${_o(l)}`}else return`If ${_o(l)}`}case n.ReturnStatement:{const l=Mt(r.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(r.declaration){const l=Mt(r.declaration,e);return C(l,e)||""}else return r.name||"";case n.VariableInstance:{const l=Mt(r.declaration,e);return C(l,e)||""}case n.OutputMap:if(r.declaration){const l=Mt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.PrimitiveValue:return RP(r);default:return Co(r.type).replaceAll("-"," ")}}function No(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=e.entities.filter(a=>a.name===r.name);return i.length&&t.push(new b({id:`${r.id}--${S.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 "${i[0].id}" has the same name.
|
|
13
|
+
`+s+"}",p}function nk(r,e,t){e=Ga(e);var i=e.length;if(!i)return Et(t)?t.call(r):t;for(var a=0;a<i;a++){var s=r==null?void 0:r[e[a]];s===void 0&&(s=t,a=i),r=Et(s)?s.call(r):s}return r}var rk=0;function ik(r){var e=++rk+"";return r?r+e:e}function ak(r){var e=se(r);return e._chain=!0,e}function $D(r,e,t,i,a){if(!(i instanceof e))return r.apply(t,a);var s=wD(r.prototype),o=r.apply(s,a);return zn(o)?o:s}var Oi=Pt(function(r,e){var t=Oi.placeholder,i=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 $D(r,i,this,this,o)};return i});Oi.placeholder=se;const FD=Pt(function(r,e,t){if(!Et(r))throw new TypeError("Bind must be called on a function");var i=Pt(function(a){return $D(r,i,e,this,t.concat(a))});return i}),_t=TD(At);function Or(r,e,t,i){if(i=i||[],!e&&e!==0)e=1/0;else if(e<=0)return i.concat(r);for(var a=i.length,s=0,o=At(r);s<o;s++){var l=r[s];if(_t(l)&&(Ar(l)||jd(l)))if(e>1)Or(l,e-1,t,i),a=i.length;else for(var p=0,y=l.length;p<y;)i[a++]=l[p++];else t||(i[a++]=l)}return i}const sk=Pt(function(r,e){e=Or(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var i=e[t];r[i]=FD(r[i],r)}return r});function ok(r,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return Zn(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const UD=Pt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),lk=Oi(UD,se,1);function ck(r,e,t){var i,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:Ua(),i=null,o=r.apply(a,s),i||(a=s=null)},y=function(){var h=Ua();!l&&t.leading===!1&&(l=h);var m=e-(h-l);return a=this,s=arguments,m<=0||m>e?(i&&(clearTimeout(i),i=null),l=h,o=r.apply(a,s),i||(a=s=null)):!i&&t.trailing!==!1&&(i=setTimeout(p,m)),o};return y.cancel=function(){clearTimeout(i),l=0,i=a=s=null},y}function dk(r,e,t){var i,a,s,o,l,p=function(){var h=Ua()-a;e>h?i=setTimeout(p,e-h):(i=null,t||(o=r.apply(l,s)),i||(s=l=null))},y=Pt(function(h){return l=this,s=h,a=Ua(),i||(i=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return y.cancel=function(){clearTimeout(i),i=s=l=null},y}function uk(r,e){return Oi(e,r)}function tu(r){return function(){return!r.apply(this,arguments)}}function pk(){var r=arguments,e=r.length-1;return function(){for(var t=e,i=r[e].apply(this,arguments);t--;)i=r[t].call(this,i);return i}}function yk(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function xD(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const hk=Oi(xD,2);function jD(r,e,t){e=Ot(e,t);for(var i=Qe(r),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(r[a],a,r))return a}function kD(r){return function(e,t,i){t=Ot(t,i);for(var a=At(e),s=r>0?0:a-1;s>=0&&s<a;s+=r)if(t(e[s],s,e))return s;return-1}}const nu=kD(1),qD=kD(-1);function JD(r,e,t,i){t=Ot(t,i,1);for(var a=t(e),s=0,o=At(r);s<o;){var l=Math.floor((s+o)/2);t(r[l])<a?s=l+1:o=l}return s}function WD(r,e,t){return function(i,a,s){var o=0,l=At(i);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(i,a),i[s]===a?s:-1;if(a!==a)return s=e(Na.call(i,o,l),fD),s>=0?s+o:-1;for(s=r>0?o:l-1;s>=0&&s<l;s+=r)if(i[s]===a)return s;return-1}}const YD=WD(1,nu,JD),fk=WD(-1,qD);function ru(r,e,t){var i=_t(r)?nu:jD,a=i(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function mk(r,e){return ru(r,$a(e))}function On(r,e,t){e=Fa(e,t);var i,a;if(_t(r))for(i=0,a=r.length;i<a;i++)e(r[i],i,r);else{var s=Qe(r);for(i=0,a=s.length;i<a;i++)e(r[s[i]],s[i],r)}return r}function Sr(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=Array(a),o=0;o<a;o++){var l=i?i[o]:o;s[o]=e(r[l],l,r)}return s}function HD(r){var e=function(t,i,a,s){var o=!_t(t)&&Qe(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 y=o?o[p]:p;a=i(a,t[y],y,t)}return a};return function(t,i,a,s){var o=arguments.length>=3;return e(t,Fa(i,s,4),a,o)}}const iu=HD(1),zD=HD(-1);function Si(r,e,t){var i=[];return e=Ot(e,t),On(r,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function Tk(r,e,t){return Si(r,tu(Ot(e)),t)}function ZD(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=0;s<a;s++){var o=i?i[s]:s;if(!e(r[o],o,r))return!1}return!0}function KD(r,e,t){e=Ot(e,t);for(var i=!_t(r)&&Qe(r),a=(i||r).length,s=0;s<a;s++){var o=i?i[s]:s;if(e(r[o],o,r))return!0}return!1}function Sn(r,e,t,i){return _t(r)||(r=Ai(r)),(typeof t!="number"||i)&&(t=0),YD(r,e,t)>=0}const Ek=Pt(function(r,e,t){var i,a;return Et(e)?a=e:(e=Ga(e),i=e.slice(0,-1),e=e[e.length-1]),Sr(r,function(s){var o=a;if(!o){if(i&&i.length&&(s=zd(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function au(r,e){return Sr(r,Kd(e))}function bk(r,e){return Si(r,$a(e))}function XD(r,e,t){var i=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=_t(r)?r:Ai(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s>i&&(i=s)}else e=Ot(e,t),On(r,function(y,h,m){o=e(y,h,m),(o>a||o===-1/0&&i===-1/0)&&(i=y,a=o)});return i}function Rk(r,e,t){var i=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof r[0]!="object"&&r!=null){r=_t(r)?r:Ai(r);for(var l=0,p=r.length;l<p;l++)s=r[l],s!=null&&s<i&&(i=s)}else e=Ot(e,t),On(r,function(y,h,m){o=e(y,h,m),(o<a||o===1/0&&i===1/0)&&(i=y,a=o)});return i}var gk=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function QD(r){return r?Ar(r)?Na.call(r):Fd(r)?r.match(gk):_t(r)?Sr(r,Zd):Ai(r):[]}function eP(r,e,t){if(e==null||t)return _t(r)||(r=Ai(r)),r[Qd(r.length-1)];var i=QD(r),a=At(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Qd(o,s),p=i[o];i[o]=i[l],i[l]=p}return i.slice(0,e)}function vk(r){return eP(r,1/0)}function Ik(r,e,t){var i=0;return e=Ot(e,t),au(Sr(r,function(a,s,o){return{value:a,index:i++,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 Oo(r,e){return function(t,i,a){var s=e?[[],[]]:{};return i=Ot(i,a),On(t,function(o,l){var p=i(o,l,t);r(s,o,p)}),s}}const Dk=Oo(function(r,e,t){Zn(r,t)?r[t].push(e):r[t]=[e]}),Pk=Oo(function(r,e,t){r[t]=e}),Ak=Oo(function(r,e,t){Zn(r,t)?r[t]++:r[t]=1}),Ok=Oo(function(r,e,t){r[t?0:1].push(e)},!0);function Sk(r){return r==null?0:_t(r)?r.length:Qe(r).length}function Ck(r,e,t){return e in t}const tP=Pt(function(r,e){var t={},i=e[0];if(r==null)return t;Et(i)?(e.length>1&&(i=Fa(i,e[1])),e=La(r)):(i=Ck,e=Or(e,!1,!1),r=Object(r));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=r[o];i(l,o,r)&&(t[o]=l)}return t}),Bk=Pt(function(r,e){var t=e[0],i;return Et(t)?(t=tu(t),e.length>1&&(i=e[1])):(e=Sr(Or(e,!1,!1),String),t=function(a,s){return!Sn(e,s)}),tP(r,t,i)});function nP(r,e,t){return Na.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]:nP(r,r.length-e)}function So(r,e,t){return Na.call(r,e==null||t?1:e)}function wk(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:So(r,Math.max(0,r.length-e))}function _k(r){return Si(r,Boolean)}function Nk(r,e){return Or(r,e,!1)}const rP=Pt(function(r,e){return e=Or(e,!0,!0),Si(r,function(t){return!Sn(e,t)})}),Mk=Pt(function(r,e){return rP(r,e)});function ou(r,e,t,i){lD(e)||(i=t,t=e,e=!1),t!=null&&(t=Ot(t,i));for(var a=[],s=[],o=0,l=At(r);o<l;o++){var p=r[o],y=t?t(p,o,r):p;e&&!t?((!o||s!==y)&&a.push(p),s=y):t?Sn(s,y)||(s.push(y),a.push(p)):Sn(a,p)||a.push(p)}return a}const Vk=Pt(function(r){return ou(Or(r,!0,!0))});function Lk(r){for(var e=[],t=arguments.length,i=0,a=At(r);i<a;i++){var s=r[i];if(!Sn(e,s)){var o;for(o=1;o<t&&Sn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function lu(r){for(var e=r&&XD(r,At).length||0,t=Array(e),i=0;i<e;i++)t[i]=au(r,i);return t}const Gk=Pt(lu);function $k(r,e){for(var t={},i=0,a=At(r);i<a;i++)e?t[r[i]]=e[i]:t[r[i][0]]=r[i][1];return t}function Fk(r,e,t){e==null&&(e=r||0,r=0),t||(t=e<r?-1:1);for(var i=Math.max(Math.ceil((e-r)/t),0),a=Array(i),s=0;s<i;s++,r+=t)a[s]=r;return a}function Uk(r,e){if(e==null||e<1)return[];for(var t=[],i=0,a=r.length;i<a;)t.push(Na.call(r,i,i+=e));return t}function cu(r,e){return r._chain?se(e).chain():e}function iP(r){return On(Yd(r),function(e){var t=se[e]=r[e];se.prototype[e]=function(){var i=[this._wrapped];return u5.apply(i,arguments),cu(this,t.apply(se,i))}}),se}On(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=Io[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(r==="shift"||r==="splice")&&t.length===0&&delete t[0]),cu(this,t)}}),On(["concat","join","slice"],function(r){var e=Io[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),cu(this,t)}});var aP=iP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:XI,after:yk,all:ZD,allKeys:La,any:KD,assign:Ao,before:xD,bind:FD,bindAll:sk,chain:ak,chunk:Uk,clone:x5,collect:Sr,compact:_k,compose:pk,constant:mD,contains:Sn,countBy:Ak,create:U5,debounce:dk,default:se,defaults:BD,defer:lk,delay:UD,detect:ru,difference:rP,drop:So,each:On,escape:Y5,every:ZD,extend:CD,extendOwn:Ao,filter:Si,find:ru,findIndex:nu,findKey:jD,findLastIndex:qD,findWhere:mk,first:su,flatten:Nk,foldl:iu,foldr:zD,forEach:On,functions:Yd,get:ND,groupBy:Dk,has:k5,head:su,identity:Zd,include:Sn,includes:Sn,indexBy:Pk,indexOf:YD,initial:nP,inject:iu,intersection:Lk,invert:SD,invoke:Ek,isArguments:jd,isArray:Ar,isArrayBuffer:uD,isBoolean:lD,isDataView:Do,isDate:R5,isElement:b5,isEmpty:Va,isEqual:w5,isError:v5,isFinite:A5,isFunction:Et,isMap:M5,isMatch:gD,isNaN:fD,isNull:E5,isNumber:cD,isObject:zn,isRegExp:g5,isSet:L5,isString:Fd,isSymbol:dD,isTypedArray:bD,isUndefined:oD,isWeakMap:V5,isWeakSet:G5,iteratee:Xd,keys:Qe,last:wk,lastIndexOf:fk,map:Sr,mapObject:q5,matcher:$a,matches:$a,max:XD,memoize:ok,methods:Yd,min:Rk,mixin:iP,negate:tu,noop:VD,now:Ua,object:$k,omit:Bk,once:hk,pairs:$5,partial:Oi,partition:Ok,pick:tP,pluck:au,property:Kd,propertyOf:J5,random:Qd,range:Fk,reduce:iu,reduceRight:zD,reject:Tk,rest:So,restArguments:Pt,result:nk,sample:eP,select:Si,shuffle:vk,size:Sk,some:KD,sortBy:Ik,sortedIndex:JD,tail:So,take:su,tap:j5,template:tk,templateSettings:Z5,throttle:ck,times:W5,toArray:QD,toPath:_D,transpose:lu,unescape:z5,union:Vk,uniq:ou,unique:ou,uniqueId:ik,unzip:lu,values:Ai,where:bk,without:Mk,wrap:uk,zip:Gk},Symbol.toStringTag,{value:"Module"})));aP._=aP;function Co(r){return r.charAt(0).toUpperCase()+r.slice(1)}function sP(r){return r.charAt(0).toLowerCase()+r.slice(1)}function oP(r,e){if(r.type!==n.Property||e.type!==n.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:jt(r.dataType,e.dataType).compatible}function lP(r,e){if(r.type!==n.CustomEntity||e.type!==n.CustomEntity)throw new Error(`Expected custom 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 i=[];for(let a=0;a<r.properties.length;a++){const s=r.properties[a];t.find(l=>{const p=oP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||i.push(s)}return!(i.length>0)}var xt=(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.SameCustomEntities="same-custom-entities",r.CompatibleCustomEntities="compatible-custom-entities",r.IncompatibleCustomEntities="incompatible-custom-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))(xt||{});function jt(r,e){var t,i,a,s,o,l,p,y,h,m,R;if(r&&r.type!==n.DataType||e&&e.type!==n.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.isNullable!==e.isNullable)return{compatible:!1,type:r.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-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)!==((i=e.entity)==null?void 0:i.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=r.entity)==null?void 0:a.type)===n.CustomEntity){if(((s=r.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const v=lP(r.entity,e.entity);return{compatible:v,type:v?"compatible-custom-entities":"incompatible-custom-entities"}}return((l=r.entity)==null?void 0:l.type)===n.PrimitiveEntity?((p=r.entity)==null?void 0:p.id)===((y=e.entity)==null?void 0:y.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=r.entity)==null?void 0:h.type)===n.BuiltInBaseEntity?((m=r.entity)==null?void 0:m.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 xk(r){const e=r.project.builtInBaseEntities.find(a=>a.id===V.EXECUTION),t={id:r.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=g(t,r.project);return i.inferred=!0,i.sync(t),i.setParent(r),i.entity=e,i}function cP(r){return r.dataType?r.dataType:null}function du(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved()?e:r.readsValue?dn(r.readsValue):null}function uu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved()?r.dataType:r.readsValue?dn(r.readsValue):null}function dP(r){return dn(r.declaration)}function uP(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function pu(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function pP(r){return(r==null?void 0:r.dataType)||null}function yP(r){return(r==null?void 0:r.dataType)||null}function dn(r){switch(r.type){case n.VariableDeclaration:return uP(r);case n.ArgumentDeclaration:return cP(r);case n.ReturnDeclaration:return uu(r);case n.VariableInstance:return dP(r);case n.InputMap:return du(r);case n.OutputMap:return pu(r);case n.Property:return pP(r);case n.ValueDescriptor:return yP(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Bo(r){switch(r.type){case n.ArgumentDeclaration:return r.getDataType();case n.InputMap:return r.getDataType();case n.VariableDeclaration:return r.getDataType();case n.VariableInstance:return r.getDataType();case n.OutputMap:return r.getDataType();case n.ReturnDeclaration:return r.getDataType();case n.Property:return r.getDataType();case n.ValueDescriptor:return r.getDataType();default:return null}}function N(r){if(r){let e=null;return typeof r=="string"?e=r:r.entityId?e=r.entityId:r.type!==n.GenericReference&&(e=r.id),e}return null}function Cr(r){return r.declaration||r}function jk(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function yu(r,e){const t=[];if(r.type===n.Project)t.push(...r.variableDeclarations);else{const a=Rt(Me(r)).filter(s=>s.type===n.VariableDeclaration);t.push(...a),r.parent&&(ut.includes(r.parent.type)||r.parent.type===n.Project)&&t.push(...yu(r.parent))}return t}function kk(r){return r.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function qk(r){return r.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function hP(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 wo(r){return hP(r).toLowerCase()}function hu(r){if(!r)return"Any data type";if(!r.entity)return r.isList?"List of an unknown data type":"Unknown data type";if(r.entity.type===n.PrimitiveEntity){const e=r.entity.name===I.String?"Text":r.entity.name;return r.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(r.entity.type===n.CustomEntity){const e=TP(r.entity);return r.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(r.entity.type===n.BuiltInBaseEntity){const e=mP(r.entity);return r.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.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 Jk(r){if(!r)return"Any data type";const e=r.getDataType();return hu(e)}function _o(r){switch(r.declaration.id){case $e.Equal:return"is equal to";case $e.NotEqual:return"is not equal to";case $e.MoreThan:return"is greater than";case $e.MoreThanOrEqual:return"is greater than or equal to";case $e.LessThan:return"is less than";case $e.LessThanOrEqual:return"is less than or equal to";case $e.And:return"and";case $e.Or:return"or";case Vt.Empty:return"is empty";case Vt.NotEmpty:return"is not empty"}}function fP(r){return r.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(V.PERSISTED_ENTITY)?"Persisted entity":r.includes(V.CRON_JOB)?"Scheduled execution":r.includes(V.RELATIONAL_DATABASE)?"Relational database":"Entity"}function mP(r){switch(r.name){case V.HTTP_ENDPOINT:return"HTTP endpoint";case V.PERSISTED_ENTITY:return"Persisted entity";case V.CRON_JOB:return"Scheduled execution";case V.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function TP(r){const e=ju(r);if(!e){const t=xu(r);return t.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(V.PERSISTED_ENTITY)?"Persisted entity":t.includes(V.CRON_JOB)?"Scheduled execution":t.includes(V.RELATIONAL_DATABASE)?"Relational database":C(r,r.project)+" entity"}return C(e,r.project)+" entity"}function EP(r){let e="Find ";return r.outputsDeclarations.forEach((t,i)=>{const a=Bo(t),s=sP(a&&a.entity?C(a.entity,r.project):"unstructured data");i===0?e+=`${s} `:i===r.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function bP(r){switch(r.name){case I.String:return"Text";case I.Number:return"Number";case I.Boolean:return"Boolean";case I.KeyValue:return"Data structure";case I.UUID:return"Unique identifier";case I.Date:return"Date";case I.EntityTemplate:return"Entity as template";case I.Enum:return"Enumeration";case I.File:return"File";case I.Null:return"Empty";case I.ActionDescriptor:return"Action descriptor";case I.Untyped:return"Untyped";default:return r.name}}function RP(r){switch(r.id){case $.List:return"Loop over list items";case $.ManualFlow:return"Manual flow control loop";case $.ObjectKeys:return"Loop over object keys";case $.ObjectValues:return"Loop over object values";case $.Counted:return"Loop given number of times";case $.String:return"Loop over text characters";case Te.Addition:return"Sum numbers";case Te.Subtraction:return"Subtract numbers";case Te.Multiplication:return"Multiply numbers";case Te.Division:return"Divide numbers";case Te.Remainder:return"Get remainder of numbers";case Te.Exponentiation:return"Get exponent of numbers";case K.AddIndex:return"Add at index position";case K.DeleteFirst:return"Delete first character";case K.DeleteLast:return"Delete last character";case K.DeleteIndex:return"Delete at index position";case K.Join:return"Join texts";case K.ReplaceAllMatches:return"Replace all matches";case K.ReplaceFirst:return"Replace first match";case K.ReplaceLast:return"Replace last match";case K.Split:return"Split text";case K.ReplaceIndex:return"Replace at index position";case K.ReplaceSingleMatch:return"Replace single match";case K.GetFirst:return"Get first character";case K.GetLast:return"Get last character";case K.GetIndex:return"Get at index position";case K.Append:return"Add at the end";case K.Prepend:return"Add at the start";case le.Wait:return"Wait";case le.Parallel:return"Run in parallel";case le.Sequential:return"Run in sequence";case tt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case H.AddIndex:return"Add item at index position";case H.DeleteFirst:return"Delete first item";case H.DeleteLast:return"Delete last item";case H.DeleteIndex:return"Delete item at index position";case H.Join:return"Join lists";case H.ReplaceAllMatches:return"Replace all matches";case H.ReplaceFirst:return"Replace first match";case H.ReplaceLast:return"Replace last match";case H.Split:return"Split list";case H.ReplaceIndex:return"Replace at index position";case H.ReplaceSingleMatch:return"Replace single match";case H.GetFirst:return"Get first item";case H.GetLast:return"Get last item";case H.GetIndex:return"Get item at index position";case H.Append:return"Add item at the end";case H.Prepend:return"Add item at the start";case yn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function C(r,e){var t;if(n.FunctionDeclaration===r.type){const i=r.name;if(Object.values(Ct).includes(i))switch(i){case Ct.AbortExecution:return"Abort execution";case Ct.DeletePersistedEntity:return"Delete persisted entity";case Ct.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Co(r.type).replaceAll("-"," ")}return i}if(n.BuiltInBaseEntity===r.type)return fP([r.name]);if(zu.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return EP(r);case n.Operation:case n.InternalCall:case n.Loop:const i=Mt(r.declaration,e);return C(i,e);case n.ActionDescriptor:return RP(r);case n.BreakStatement:const a=Mt(r.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Mt(r.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Mt(r.declaration,e).name;case n.Condition:{const l=r;if((t=r.inputs)!=null&&t.length){const p=C(l.inputs[0],l.project);if(l.inputs[1]){const y=l.inputs[1].declaration.name;return`If ${p} ${_o(l)} ${y}`}return`If ${p} ${_o(l)}`}else return`If ${_o(l)}`}case n.ReturnStatement:{const l=Mt(r.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(r.declaration){const l=Mt(r.declaration,e);return C(l,e)||""}else return r.name||"";case n.VariableInstance:{const l=Mt(r.declaration,e);return C(l,e)||""}case n.OutputMap:if(r.declaration){const l=Mt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.PrimitiveValue:return bP(r);default:return Co(r.type).replaceAll("-"," ")}}function No(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=e.entities.filter(a=>a.name===r.name);return i.length&&t.push(new b({id:`${r.id}--${S.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 "${i[0].id}" has the same name.
|
|
14
14
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null})),t}function fu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=r.parent?N(r.parent):null;let a=e;i&&(a=e.get(i));const s=[];a.type===n.CustomEntity?s.push(...a.methods.map(l=>l)):a.type===n.Project?s.push(...a.functions.map(l=>l)):a.type===n.Loop?a.body&&s.push(a.body):a.type===n.InstalledProject&&s.push(...a.functions.map(l=>l));const o=s.filter(l=>l.name===r.name);return o.length&&t.push(new b({id:`${r.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in ${a.type===n.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${o[0].id}" has the same name.
|
|
15
15
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null})),t}function mu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=r.parent&&Mt(r.parent,e)||e;if(!i)t.push(new b({id:`${r.id}--parent-reference--${f.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:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const s=yu(i).filter(o=>o.name===r.name);s.length&&t.push(new b({id:`${r.id}--${S.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.
|
|
16
16
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}return t}function Tu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=N(r.parent);if(!i)t.push(new b({id:`${r.id}--parent-reference--${f.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:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new b({id:`${r.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${i}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const o=a.properties.filter(l=>l.name===r.name);o.length&&t.push(new b({id:`${r.id}--${S.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.
|
|
17
17
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function Eu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=N(r.parent);if(!i)t.push(new b({id:`${r.id}--parent-reference--${f.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:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new b({id:`${r.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${i}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const o=Gu(a).filter(l=>l.name===r.name);o.length&&t.push(new b({id:`${r.id}--${S.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.
|
|
18
|
-
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function bu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=N(r.parent);if(!i)t.push(new b({id:`${r.id}--parent-reference--${f.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:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new b({id:`${r.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${i}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const o=
|
|
18
|
+
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function bu(r,e){const t=[];r.name||t.push(new b({id:`${r.id}--${S.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const i=N(r.parent);if(!i)t.push(new b({id:`${r.id}--parent-reference--${f.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:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new b({id:`${r.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${i}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const o=KP(a).filter(l=>l.name===r.name);o.length&&t.push(new b({id:`${r.id}--${S.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.
|
|
19
19
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function Wk(r,e){switch(r.type){case n.CustomEntity:return No(r,e);case n.FunctionDeclaration:return fu(r,e);case n.VariableDeclaration:return mu(r,e);case n.Property:return Tu(r,e);case n.ArgumentDeclaration:return Eu(r,e);case n.ReturnDeclaration:return bu(r,e);default:return[]}}function ze(r,e,t){const a=`${wo(r)}-${e}-id`;return t.instances[a]?_.UUID.uuid():a}function Ru(r,e){let t="",i=null;if(r.parent){const s=e.get(r.parent);s&&(i=s)}let a="";return i&&(a=`${wo(C(i,e))}-`),t=`${a}${wo(C(r,e))}-id`,e.instances[t]?_.UUID.uuid():t}function Yk(r){var o;const e=v9(),t=r.toJSON();e.safeParse(t).success;const a=Hk(r);(o=r.dataType)==null||o.validate();const s=[...a];if(r.id==="80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"){const l=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return s}function Hk(r){const e=[];if(!r.implements)return e;const t=r.implements;if(!t.abstract){const a=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(t,r.project)}" with id "${t.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});e.push(a.error)}if(r.static&&!t.static){const a=Y({id:`${r.id}--${M.NonStaticPropertyImplementsStatic}`,message:`Static property "${C(r,r.project)}" with id "${r.id}" implements a non-static property "${C(t,r.project)}" with id "${t.id}".`,issue:null,severity:T.Error,code:M.NonStaticPropertyImplementsStatic,entity:r});e.push(a.error)}if(!r.static&&t.static){const a=Y({id:`${r.id}--${M.StaticPropertyImplementsNonStatic}`,message:`Non-static property "${C(r,r.project)}" with id "${r.id}" implements a static property "${C(t,r.project)}" with id "${t.id}".`,issue:null,severity:T.Error,code:M.StaticPropertyImplementsNonStatic,entity:r});e.push(a.error)}if(!jt(r.dataType,t.dataType)){const a=Y({id:`${r.id}--${M.PropertyImplementsIncompatibleType}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a property "${C(t,r.project)}" with id "${t.id}" that has an incompatible data type.`,issue:null,severity:T.Error,code:M.PropertyImplementsIncompatibleType,entity:r});e.push(a.error)}return ie(r.errors,e)}function zk(r,e){const t=[];if(r.parent){const a=e.get(r.parent);if(!a)t.push(new b({id:`${r.id}--${r.parent}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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=tr(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}' (${C(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 b({id:`${r.id}--${f.InvalidBuiltInEntityReference}`,code:f.InvalidBuiltInEntityReference,severity:T.Error,message:o,issue:null}))}else if(![n.CustomEntity].includes(a.type))t.push(new b({id:`${r.id}--${r.parent}--${f.InvalidParentReference}`,code:f.InvalidParentReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a parent reference that isn't pointing to an entity of type 'custom-entity'.`,issue:null}));else{const l=_n(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 '${n.BuiltInBaseEntity}' entities that are non-interactive ("${U(l.map(y=>C(y,y.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 '${n.BuiltInBaseEntity}' entity that is non-interactive ("${C(l[0],l[0].project)}").`;p+=`
|
|
20
|
-
${Qn}`,t.push(new b({id:`${r.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:p,issue:null}))}else if(r.implements){const p=e.get(r.implements);if(r.id===r.implements)return t.push(new b({id:`${r.id}--${r.implements}--${f.SelfReference}`,code:f.SelfReference,severity:T.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 b({id:`${r.id}--${r.implements}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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 y=a.properties.find(h=>{var m;return((m=h.implements)==null?void 0:m.id)===r.implements});y?t.push(new b({id:`${r.id}--${S.PropertyOverwrite}`,code:S.PropertyOverwrite,severity:T.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 '${y.id}' that implements the same base property.`,issue:null})):[n.Property].includes(p.type)?p.abstract||t.push(new b({id:`${r.id}--${r.implements}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 b({id:`${r.id}--${r.implements}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 i=We(r,{},e);return t.push(...i.errors),t}const be=class be{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,"type",n.Property);c(this,"hidden",!1);c(this,"primary",!1);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.primary=e.primary||!1}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;if(e.implements){const p=N(e.implements);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:n.Property,index:a.properties.length,private:e.private||!1,abstract:e.abstract||!1,static:e.static||!1,required:e.required||!1,hidden:!1,primary:e.primary||!1,description:e.description,implements:s,dataType:null,parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=zk(i,t),o=Tu(i,t);return a.push(...s,...o,...Le(i)),{errors:a,modifiedData:i}}get isExtendedProperty(){const e=this.parent.
|
|
20
|
+
${Qn}`,t.push(new b({id:`${r.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:p,issue:null}))}else if(r.implements){const p=e.get(r.implements);if(r.id===r.implements)return t.push(new b({id:`${r.id}--${r.implements}--${f.SelfReference}`,code:f.SelfReference,severity:T.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 b({id:`${r.id}--${r.implements}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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 y=a.properties.find(h=>{var m;return((m=h.implements)==null?void 0:m.id)===r.implements});y?t.push(new b({id:`${r.id}--${S.PropertyOverwrite}`,code:S.PropertyOverwrite,severity:T.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 '${y.id}' that implements the same base property.`,issue:null})):[n.Property].includes(p.type)?p.abstract||t.push(new b({id:`${r.id}--${r.implements}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 b({id:`${r.id}--${r.implements}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 i=We(r,{},e);return t.push(...i.errors),t}const be=class be{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,"type",n.Property);c(this,"hidden",!1);c(this,"primary",!1);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.primary=e.primary||!1}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;if(e.implements){const p=N(e.implements);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:n.Property,index:a.properties.length,private:e.private||!1,abstract:e.abstract||!1,static:e.static||!1,required:e.required||!1,hidden:!1,primary:e.primary||!1,description:e.description,implements:s,dataType:null,parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=zk(i,t),o=Tu(i,t);return a.push(...s,...o,...Le(i)),{errors:a,modifiedData:i}}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 b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
21
21
|
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 b({id:`${this.id}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.Error,message:`Entity of type '${this.type}' with id '${this.id}' is not a value reading or writing entity.
|
|
22
22
|
${Go}`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent.addProperty(this),e.push(this.parent),{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.dataType){const e=g(this.initialData.dataType,this.project);e.setParent(this),e.initChildren(),this.dataType=e}if(this.initialData.implements){const e=g(this.initialData.implements,this.project);this.implements=e}return 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.description=e.description||this.description,this.abstract=e.abstract||this.abstract,this.private=e.private||this.private,this.index=e.index||(e.index!==0?this.index:0),this.static=e.static||this.static,this.required=e.required||this.required,this.hidden=e.hidden||this.hidden,this.primary=e.primary||this.primary,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return e||this.parent.type===n.CustomEntity&&(this.parent.removeProperty(this),i.push(this.parent)),{affected:E(i),removed:E(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.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return this.parent.type===n.CustomEntity&&(this.parent.addProperty(this),t.push(this.parent)),{affected:t,self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.dataType)==null?void 0:i.toFlat(e))||[]])}toFlatIds(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,private:this.private,required:this.required,static:this.static,abstract:this.abstract,hidden:this.hidden,primary:this.primary,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,private:this.private,required:this.required,abstract:this.abstract,static:this.static,hidden:this.hidden,primary:this.primary,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,implements:((t=this.implements)==null?void 0:t.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i,a;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.dataType)==null?void 0:i.toFlatJSON(e))||[],...((a=this.implements)==null?void 0:a.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,private:this.private,required:this.required,abstract:this.abstract,primary:this.primary,static:this.static,implements:((e=this.implements)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.dataType)==null?void 0:i.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){return this.errors=Yk(this),this.errors.length,{success:!0,error:null,data:null}}getErrors(){var t;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e=null,t=null,i=!0){var m;const a=t||ze(C(this,this.project),n.Property,this.project),s=a.split("-id"),o=s[s.length-1||0]||a;let l=e||this.parent;const p={hidden:!1,id:a,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,private:this.private,required:this.required,abstract:this.abstract,static:this.static,primary:this.primary,dataType:null,implements:this.implements,parent:l},y=qt(p,this.project);i&&y.subscribe(),y.setParent(l);const h=((m=this.dataType)==null?void 0:m.clone(y,o+"-data-type-id",i))||null;return h&&y.setDataType(h),this.implements&&(y.implements=this.implements),y}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return this.dataType}};c(be,"MUTABLE_BASE_PROPERTIES",["name","description","private","abstract","static","required"]),c(be,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(be,"BASE_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,...be.INMUTABLE_BASE_PROPERTIES]),c(be,"MUTABLE_META_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,"index"]),c(be,"INMUTABLE_META_PROPERTIES",[...be.INMUTABLE_BASE_PROPERTIES]),c(be,"META_PROPERTIES",[...be.MUTABLE_META_PROPERTIES,...be.INMUTABLE_META_PROPERTIES]),c(be,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(be,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),c(be,"UPSTREAM_PROPERTIES",[...be.MUTABLE_UPSTREAM_PROPERTIES,...be.INMUTABLE_UPSTREAM_PROPERTIES]),c(be,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),c(be,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(be,"DOWNSTREAM_PROPERTIES",[...be.MUTABLE_DOWNSTREAM_PROPERTIES,...be.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(be,"PROPERTIES",[...be.META_PROPERTIES,...be.UPSTREAM_PROPERTIES,...be.DOWNSTREAM_PROPERTIES]);let Br=be;function Zk(r){const e=F3(),t=r.toJSON();e.safeParse(t).success;const a=Kk(r),s=Xk(r),o=St(r);r.inputs.forEach(p=>p.validate()),o.forEach(p=>p.validate());const l=[...a,...s];if(r.id==="getCompanyByIdEndpointReachedEntityEvent"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});l.push(p.error)}return ie(r.errors,l)}function Kk(r){const e=[];if(!r.calls.length){const t=Y({id:`${r.id}--${M.ScopeWithoutLogic}`,message:`Action "${C(r,r.project)}" with id "${r.id}" does not have any logic defined. So it doesn't do anything.`,issue:null,severity:T.Warning,code:M.ScopeWithoutLogic,entity:r});e.push(t.error)}return ie(r.errors,e)}function Xk(r){const e=[];return r.implements,ie(r.errors,e)}const Re=class Re{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,"collapsed");c(this,"private");c(this,"index",null);c(this,"type",n.FunctionDeclaration);c(this,"implements",null);c(this,"inputs",[]);c(this,"returnStatements",[]);c(this,"calls",[]);c(this,"parent");c(this,"detachedChildren",[]);c(this,"errors",[]);c(this,"project");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.collapsed=e.collapsed,this.x=e.x,this.y=e.y,this.index=e.index}static fromGenerationTarget(e,t){let i=t;if(e.parent){const l=N(e.parent);i=t.get(l)}let a=null;if(e.implements){const l=N(e.implements);a=t.get(l)}const s={id:e.id,version:1,name:e.name,type:n.FunctionDeclaration,index:i.type===n.CustomEntity?i.methods.length:null,description:e.description,collapsed:!1,private:!1,returnStatements:[],calls:[],inputs:[],implements:a,x:0,y:0,parent:i},o=g(s,t);return o.setParent(i),o.initChildren(),o}static validateGenerationTarget(e,t){var h;let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[n.Project,n.InstalledProject,n.CustomEntity,n.Loop],optional:!0},implements:{list:!1,types:[n.ActionDescriptor],optional:!0}},t);i=s.modifiedData;const o=fu(i,t),l=i.parent?t.get(i.parent):null;if(l&&l.type===n.CustomEntity){const m=l,v=_n(m).filter(P=>!P.interactive);if(v.length){let P=v.length>1?`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${m.id}' because it extends or implements multiple '${n.BuiltInBaseEntity}' entities that are non-interactive ("${U(v.map(A=>C(A,A.project)),'", "','" and "')}").`:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${m.id}' because it extends or implements a '${n.BuiltInBaseEntity}' entity that is non-interactive ("${C(v[0],v[0].project)}").`;P+=`
|
|
23
23
|
${Qn}`,a.push(new b({id:`${e.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:P,issue:null}))}else{const P=m.methods.find(F=>{var k;return((k=F.implements)==null?void 0:k.id)===i.implements});P&&a.push(new b({id:`${i.id}--${S.MethodOverwrite}`,code:S.MethodOverwrite,severity:T.Error,message:`The '${n.FunctionDeclaration}' with id "${i.id}" is trying to implement the '${n.ActionDescriptor}' with id "${i.implements}", but the parent custom-entity already has a ${n.FunctionDeclaration} with id '${P.id}' that implements the same base method.
|
|
@@ -34,7 +34,7 @@ ${Qn}`,issue:null}))}}}const o=i.parent&&t.get(i.parent)||t.getBuiltIn(i.parent)
|
|
|
34
34
|
The entitities of type '${U(h,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property so no 'parentRelationType' is needed.`,issue:null})),o.dataType)){const m=(p=o.dataType)==null?void 0:p.id;a.push(new b({id:`${e.id}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.Error,message:`The entity with id '${e.id}' and type '${e.type}', cannot be added as a child to the entity with id '${i.parent}' and type '${y}', because it already has a 'data-type' child with id '${m}'.
|
|
35
35
|
The entitities of type '${U(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:
|
|
36
36
|
${un({describe_entity:m})}
|
|
37
|
-
Alternatively you can update the entity with 'update' action. Or replace it by first removing it and then creating a new one.`,issue:null}))}y===n.DataType&&(!i.parentRelationType||!(i.parentRelationType===Ze.AndDataTypeGroup||i.parentRelationType===Ze.OrDataTypeGroup))&&a.push(new b({id:`${e.id}--${f.InvalidParentRelationType}`,code:f.InvalidParentRelationType,severity:T.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:i}}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent.type===n.DataType?this.parentRelationType===Ze.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===Ze.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.setDataType(this),e.push(this.parent),{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}removeChildGroup(e){if(this.andChildrenGroup){const t=this.andChildrenGroup.findIndex(i=>i.id===e.id);t!==-1&&this.andChildrenGroup.splice(t,1)}if(this.orChildrenGroup){const t=this.orChildrenGroup.findIndex(i=>i.id===e.id);t!==-1&&this.orChildrenGroup.splice(t,1)}return this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=g(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.entity)if(this.initialData.entity.type===n.GenericReference){const e=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=e}else this.entity=g(this.initialData.entity,this.project);return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(e=>g(e,this.project))),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(e=>g(e,this.project))),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.isNullable=e.isNullable||this.isNullable,this.isList=e.isList||this.isList,this.constant=e.constant||this.constant,this.asType=e.asType||this.asType,this.options=e.options||this.options,this.parentRelationType=e.parentRelationType||this.parentRelationType,this.like=e.like||this.like,this.inferred=e.inferred||this.inferred,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...s),a.push(...o)}if(this.entity&&this.entity.type===n.CustomEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}if(!e){this.parent.type===n.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===n.DataType){if(this.parentRelationType===Ze.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===Ze.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();i.push(s)}return{affected:E(i),removed:E(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:i}=this.defaultValue.restore({seenEntities:e});t.push(...i)}if(this.entity&&this.entity.type===n.CustomEntity&&this.entity.parent===this){const{affected:i}=this.entity.restore({seenEntities:e});t.push(...i)}if(this.parent.type===n.DataType){const i=this.parent;Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this)}if(this.parent.type===n.DataType){const i=this.parent;this.parentRelationType===Ze.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===Ze.OrDataTypeGroup&&Array.isArray(i.orChildrenGroup)&&i.orChildrenGroup.push(this)}else{const i=this.parent;i.setDataType(this),t.push(i)}return{affected:t,self:this}}toFlat(e=new Set){var i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.andChildrenGroup)==null?void 0:i.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 i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.andChildrenGroup)==null?void 0:i.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(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,isNullable:this.isNullable,options:this.options,isList:this.isList,constant:this.constant,asType:this.asType,defaultValue:((e=this.defaultValue)==null?void 0:e.toJSON())||null,like:this.like,parentRelationType:this.parentRelationType,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(s=>s.toJSON()))||null,orChildrenGroup:((i=this.orChildrenGroup)==null?void 0:i.map(s=>s.toJSON()))||null,entity:((a=this.entity)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,isList:this.isList,isNullable:this.isNullable,options:this.options,constant:this.constant,asType:this.asType,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,defaultValue:((e=this.defaultValue)==null?void 0:e.toReference())||null,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(s=>s.toReference()))||null,orChildrenGroup:((i=this.orChildrenGroup)==null?void 0:i.map(s=>s.toReference()))||null,entity:((a=this.entity)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i,a,s,o;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.defaultValue)==null?void 0:i.toFlatJSON(e))||[],...((a=this.andChildrenGroup)==null?void 0:a.flatMap(l=>l.toFlatJSON(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(l=>l.toFlatJSON(e)))||[],...((o=this.entity)==null?void 0:o.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,type:this.type,isNullable:this.isNullable,options:this.options,isList:this.isList,constant:this.constant,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 i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.defaultValue)==null?void 0:i.toFlatGenerationTarget(e))||[],...((a=this.andChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatGenerationTarget(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(o=>o.toFlatGenerationTarget(e)))||[],...this.entity&&this.entity.type==n.CustomEntity&&this.entity.parent===this&&this.entity.toFlatGenerationTarget(e)||[]])}clearErrors(){var e,t,i,a;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),(t=this.andChildrenGroup)==null||t.forEach(s=>s.clearErrors()),(i=this.orChildrenGroup)==null||i.forEach(s=>s.clearErrors()),this.inferred&&((a=this.entity)==null||a.clearErrors()),this}validate(){const e=Qk(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,i=!0){var v,P,A,D;let a=e||this.parent;const s=t||ze(hu(this),n.DataType,this.project),o=s.split("-id"),l=o[o.length-1||0]||s,p={id:s,version:1,type:n.DataType,isNullable:this.isNullable,isList:this.isList,constant:this.constant,asType:this.asType,options:this.options,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,defaultValue:null,andChildrenGroup:null,orChildrenGroup:null,entity:null,parent:a.toReference()},y=qt(p,this.project);e&&y.setParent(e),i&&y.subscribe(),y.initChildren();const h=(v=this.defaultValue)==null?void 0:v.clone(y,l+"-default-value-id",i);y.defaultValue=h||null;const m=(P=this.andChildrenGroup)==null?void 0:P.map((F,k)=>F.clone(this,l+"-and-group-data-type-"+k+"-id",i)),R=(A=this.orChildrenGroup)==null?void 0:A.map((F,k)=>F.clone(this,l+"-or-group-data-type-"+k+"-id",i));if(y.andChildrenGroup=m||null,y.orChildrenGroup=R||null,this.entity&&this.entity.type===n.CustomEntity&&((D=this.entity)==null?void 0:D.parent)===this){const F=this.entity.clone(y,l+"-inferred-entity-id",i);y.setEntity(F)}else this.entity&&y.setEntity(this.entity);return y}merge(e){const t=[],i=[],a=[];if(this.asType!==(e==null?void 0:e.asType)&&(this.sync({asType:e==null?void 0:e.asType}),t.push(this)),this.isNullable!==(e==null?void 0:e.isNullable)&&(this.sync({isNullable:e==null?void 0:e.isNullable}),t.push(this)),this.isList!==!(e!=null&&e.isList)&&(this.sync({isList:e==null?void 0:e.isList}),t.push(this)),this.constant!==(e==null?void 0:e.constant)&&(this.sync({constant:e==null?void 0:e.constant}),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===n.CustomEntity&&e.entity.parent===e){const s=e.entity.clone(this,this.id+"--inferred-entity-id",!0);this.setEntity(s),i.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===n.CustomEntity&&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));if(e.defaultValue)if(this.defaultValue){const{updated:s,added:o,removed:l}=this.defaultValue.merge(e.defaultValue);t.push(...s),i.push(...o),a.push(...l)}else{const s=e.defaultValue.clone(this,this.id+"--default-value-id",!0);this.setDefaultValue(s),i.push(s)}else if(this.defaultValue){const{affected:s,removed:o}=this.defaultValue.remove({ignoreUpstream:!0,seenEntities:new Set});a.push(...o),s.push(...s)}return{updated:E(t),added:E(i),removed:E(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}getDefaultValue(){return this.defaultValue}setDefaultValue(e){return this.defaultValue=e,this}setEntity(e){return this.entity=e,this}isResolved(){return[n.BuiltInBaseEntity,n.ActionDescriptor].includes(this.parent.type)||tr(this.parent)?!0:!(!this.entity&&(!this.andChildrenGroup||!this.andChildrenGroup.length)&&(!this.orChildrenGroup||!this.orChildrenGroup.length))}isObject(){return!!this.entity&&(this.entity.type===n.CustomEntity||this.entity.name===I.KeyValue)}hasStrictObjectStructure(){var e;return this.isObject()&&((e=this.entity)==null?void 0:e.type)===n.CustomEntity}inferFromInputs(e){var t;if(!this.inferred)return this;if(!this.entity&&e.length){const i={id:this.id+"--infered-entity",type:n.CustomEntity,version:1,name:C(this,this.project),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=g(i,this.project);a.sync(i),a.setParent(this),a.initChildren(),this.setEntity(a)}return this.entity&&this.entity.inferFromInputs(e),this.like||this.sync({like:!0}),this}};c(ge,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),c(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),c(ge,"MUTABLE_META_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,"inferred"]),c(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),c(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),c(ge,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),c(ge,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),c(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),c(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let Ci=ge;function t2(r){var l;const e=P6(),t=r.toJSON();e.safeParse(t).success;const a=n2(r),s=wn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});o.push(p.error)}return r.outputs.forEach(p=>p.validate()),(l=r.error)==null||l.validate(),ie(r.errors,o)}function n2(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),ie(r.errors,e)}const de=class de{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.Operation,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...dt,n.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Le(i));const o=N(i.declaration);if(o){const l=MP(o,t);a.push(...l)}else{const l=`
|
|
37
|
+
Alternatively you can update the entity with 'update' action. Or replace it by first removing it and then creating a new one.`,issue:null}))}y===n.DataType&&(!i.parentRelationType||!(i.parentRelationType===Ze.AndDataTypeGroup||i.parentRelationType===Ze.OrDataTypeGroup))&&a.push(new b({id:`${e.id}--${f.InvalidParentRelationType}`,code:f.InvalidParentRelationType,severity:T.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:i}}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent.type===n.DataType?this.parentRelationType===Ze.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===Ze.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.setDataType(this),e.push(this.parent),{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}removeChildGroup(e){if(this.andChildrenGroup){const t=this.andChildrenGroup.findIndex(i=>i.id===e.id);t!==-1&&this.andChildrenGroup.splice(t,1)}if(this.orChildrenGroup){const t=this.orChildrenGroup.findIndex(i=>i.id===e.id);t!==-1&&this.orChildrenGroup.splice(t,1)}return this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=g(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.entity)if(this.initialData.entity.type===n.GenericReference){const e=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=e}else this.entity=g(this.initialData.entity,this.project);return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(e=>g(e,this.project))),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(e=>g(e,this.project))),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.isNullable=e.isNullable||this.isNullable,this.isList=e.isList||this.isList,this.constant=e.constant||this.constant,this.asType=e.asType||this.asType,this.options=e.options||this.options,this.parentRelationType=e.parentRelationType||this.parentRelationType,this.like=e.like||this.like,this.inferred=e.inferred||this.inferred,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...s),a.push(...o)}if(this.entity&&this.entity.type===n.CustomEntity&&this.entity.parent===this){const{affected:s,removed:o}=this.entity.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}if(!e){this.parent.type===n.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===n.DataType){if(this.parentRelationType===Ze.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===Ze.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();i.push(s)}return{affected:E(i),removed:E(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:i}=this.defaultValue.restore({seenEntities:e});t.push(...i)}if(this.entity&&this.entity.type===n.CustomEntity&&this.entity.parent===this){const{affected:i}=this.entity.restore({seenEntities:e});t.push(...i)}if(this.parent.type===n.DataType){const i=this.parent;Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this)}if(this.parent.type===n.DataType){const i=this.parent;this.parentRelationType===Ze.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===Ze.OrDataTypeGroup&&Array.isArray(i.orChildrenGroup)&&i.orChildrenGroup.push(this)}else{const i=this.parent;i.setDataType(this),t.push(i)}return{affected:t,self:this}}toFlat(e=new Set){var i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.andChildrenGroup)==null?void 0:i.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 i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.andChildrenGroup)==null?void 0:i.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(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,isNullable:this.isNullable,options:this.options,isList:this.isList,constant:this.constant,asType:this.asType,defaultValue:((e=this.defaultValue)==null?void 0:e.toJSON())||null,like:this.like,parentRelationType:this.parentRelationType,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(s=>s.toJSON()))||null,orChildrenGroup:((i=this.orChildrenGroup)==null?void 0:i.map(s=>s.toJSON()))||null,entity:((a=this.entity)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,isList:this.isList,isNullable:this.isNullable,options:this.options,constant:this.constant,asType:this.asType,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,defaultValue:((e=this.defaultValue)==null?void 0:e.toReference())||null,andChildrenGroup:((t=this.andChildrenGroup)==null?void 0:t.map(s=>s.toReference()))||null,orChildrenGroup:((i=this.orChildrenGroup)==null?void 0:i.map(s=>s.toReference()))||null,entity:((a=this.entity)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i,a,s,o;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.defaultValue)==null?void 0:i.toFlatJSON(e))||[],...((a=this.andChildrenGroup)==null?void 0:a.flatMap(l=>l.toFlatJSON(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(l=>l.toFlatJSON(e)))||[],...((o=this.entity)==null?void 0:o.toFlatJSON(e))||[]])}toGenerationTarget(){var e;return{id:this.id,type:this.type,isNullable:this.isNullable,options:this.options,isList:this.isList,constant:this.constant,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 i,a,s;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.defaultValue)==null?void 0:i.toFlatGenerationTarget(e))||[],...((a=this.andChildrenGroup)==null?void 0:a.flatMap(o=>o.toFlatGenerationTarget(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(o=>o.toFlatGenerationTarget(e)))||[],...this.entity&&this.entity.type==n.CustomEntity&&this.entity.parent===this&&this.entity.toFlatGenerationTarget(e)||[]])}clearErrors(){var e,t,i,a;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),(t=this.andChildrenGroup)==null||t.forEach(s=>s.clearErrors()),(i=this.orChildrenGroup)==null||i.forEach(s=>s.clearErrors()),this.inferred&&((a=this.entity)==null||a.clearErrors()),this}validate(){const e=Qk(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,i=!0){var v,P,A,D;let a=e||this.parent;const s=t||ze(hu(this),n.DataType,this.project),o=s.split("-id"),l=o[o.length-1||0]||s,p={id:s,version:1,type:n.DataType,isNullable:this.isNullable,isList:this.isList,constant:this.constant,asType:this.asType,options:this.options,parentRelationType:this.parentRelationType,like:this.like,inferred:this.inferred,defaultValue:null,andChildrenGroup:null,orChildrenGroup:null,entity:null,parent:a.toReference()},y=qt(p,this.project);e&&y.setParent(e),i&&y.subscribe(),y.initChildren();const h=(v=this.defaultValue)==null?void 0:v.clone(y,l+"-default-value-id",i);y.defaultValue=h||null;const m=(P=this.andChildrenGroup)==null?void 0:P.map((F,k)=>F.clone(this,l+"-and-group-data-type-"+k+"-id",i)),R=(A=this.orChildrenGroup)==null?void 0:A.map((F,k)=>F.clone(this,l+"-or-group-data-type-"+k+"-id",i));if(y.andChildrenGroup=m||null,y.orChildrenGroup=R||null,this.entity&&this.entity.type===n.CustomEntity&&((D=this.entity)==null?void 0:D.parent)===this){const F=this.entity.clone(y,l+"-inferred-entity-id",i);y.setEntity(F)}else this.entity&&y.setEntity(this.entity);return y}merge(e){const t=[],i=[],a=[];if(this.asType!==(e==null?void 0:e.asType)&&(this.sync({asType:e==null?void 0:e.asType}),t.push(this)),this.isNullable!==(e==null?void 0:e.isNullable)&&(this.sync({isNullable:e==null?void 0:e.isNullable}),t.push(this)),this.isList!==!(e!=null&&e.isList)&&(this.sync({isList:e==null?void 0:e.isList}),t.push(this)),this.constant!==(e==null?void 0:e.constant)&&(this.sync({constant:e==null?void 0:e.constant}),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===n.CustomEntity&&e.entity.parent===e){const s=e.entity.clone(this,this.id+"--inferred-entity-id",!0);this.setEntity(s),i.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===n.CustomEntity&&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));if(e.defaultValue)if(this.defaultValue){const{updated:s,added:o,removed:l}=this.defaultValue.merge(e.defaultValue);t.push(...s),i.push(...o),a.push(...l)}else{const s=e.defaultValue.clone(this,this.id+"--default-value-id",!0);this.setDefaultValue(s),i.push(s)}else if(this.defaultValue){const{affected:s,removed:o}=this.defaultValue.remove({ignoreUpstream:!0,seenEntities:new Set});a.push(...o),s.push(...s)}return{updated:E(t),added:E(i),removed:E(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}getDefaultValue(){return this.defaultValue}setDefaultValue(e){return this.defaultValue=e,this}setEntity(e){return this.entity=e,this}isResolved(){return[n.BuiltInBaseEntity,n.ActionDescriptor].includes(this.parent.type)||tr(this.parent)?!0:!(!this.entity&&(!this.andChildrenGroup||!this.andChildrenGroup.length)&&(!this.orChildrenGroup||!this.orChildrenGroup.length))}isObject(){return!!this.entity&&(this.entity.type===n.CustomEntity||this.entity.name===I.KeyValue)}hasStrictObjectStructure(){var e;return this.isObject()&&((e=this.entity)==null?void 0:e.type)===n.CustomEntity}inferFromInputs(e){var t;if(!this.inferred)return this;if(!this.entity&&e.length){const i={id:this.id+"--infered-entity",type:n.CustomEntity,version:1,name:C(this,this.project),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=g(i,this.project);a.sync(i),a.setParent(this),a.initChildren(),this.setEntity(a)}return this.entity&&this.entity.inferFromInputs(e),this.like||this.sync({like:!0}),this}};c(ge,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),c(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),c(ge,"MUTABLE_META_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,"inferred"]),c(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),c(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),c(ge,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),c(ge,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),c(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),c(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let Ci=ge;function t2(r){var l;const e=P6(),t=r.toJSON();e.safeParse(t).success;const a=n2(r),s=wn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});o.push(p.error)}return r.outputs.forEach(p=>p.validate()),(l=r.error)==null||l.validate(),ie(r.errors,o)}function n2(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),ie(r.errors,e)}const de=class de{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.Operation,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Le(i));const o=N(i.declaration);if(o){const l=NP(o,t);a.push(...l)}else{const l=`
|
|
38
38
|
All built-in 'action-descriptor' entity ids are:
|
|
39
39
|
- ${t.operationDeclarations.map(p=>`${p.id} (${C(p,t)})`).join(`
|
|
40
40
|
- `)}.
|
|
@@ -45,19 +45,19 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
|
|
|
45
45
|
${Fo(t)}`,issue:null}));else if(!t.get(e.implements))a.push(new b({id:`${e.id}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that isn't found in the project. The 'implements' property must point to one of the built-in action descriptors reserved for 'global-event' entities.
|
|
46
46
|
${Fo(t)}`,issue:null}));else if(!t.globalEventActionDescriptors.find(p=>p.id===e.implements))a.push(new b({id:`${e.id}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that isn't pointing to an action descriptor reserved for 'global-event' entities.
|
|
47
47
|
${Fo(t)}`,issue:null}));else{const p=t.events.find(y=>y.implements.id===e.implements);p&&a.push(new b({id:`${e.id}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that points to an action descriptor that is already implemented by another global event with id '${p.id}' in the project. Each global event must implement a unique action descriptor.
|
|
48
|
-
You can attach new logic to the existing 'global-event' but creating a new callable entity that gets called by it.`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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}}addSelfToProject(){const e=[this],t=[],i=[];return this.project.addGlobalEvent(this),{updated:E(e),added:E(t),removed:E(i),self:this}}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}addCall(e){return this.calls.includes(e)||this.calls.push(e),this}removeCall(e){const t=this.calls.indexOf(e);return t!==-1&&this.calls.splice(t,1),this}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.findIndex(i=>i.id===e.id);return t>-1&&this.inputs.splice(t,1),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=g(e,this.project);return t.addEntryCaller(this),t.type!==n.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.implements=g(this.initialData.implements,this.project),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.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),St(this).forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),St(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:E(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=St(this);return[this,...this.inputs.flatMap(a=>a.toFlat(e)),...this.calls.flatMap(a=>a.toFlat(e)),...this.returnStatements.flatMap(a=>a.toFlat(e)),...this.implements?this.implements.toFlat(e):[],...t.flatMap(a=>a.toFlat(e))]}toFlatIds(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=St(this);return[this.id,...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.calls.flatMap(a=>a.toFlatIds(e)),...this.returnStatements.flatMap(a=>a.toFlatIds(e)),...this.implements?this.implements.toFlatIds(e):[],...t.flatMap(a=>a.toFlatIds(e))]}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,x:this.x,y:this.y,collapsed:this.collapsed,implements:this.implements.toJSON(),returnStatements:this.returnStatements.map(e=>e.toJSON()),inputs:this.inputs.map(e=>e.toJSON()),calls:this.calls.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,collapsed:this.collapsed,x:this.x,y:this.y,implements:this.implements.toReference(),inputs:this.inputs.map(e=>e.toReference()),calls:this.calls.map(e=>e.toReference()),returnStatements:this.returnStatements.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.calls.flatMap(i=>i.toFlatJSON(e)),...this.returnStatements.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.calls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.returnStatements.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.calls.forEach(e=>e.clearErrors()),this.returnStatements.forEach(e=>e.clearErrors()),this}validate(){const e=r2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){const e=St(this);return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...e.flatMap(i=>i.getErrors())]}getShallowErrors(){return this.errors}clone(){return new ue(this.toJSON(),this.project)}getVariableInstances(){return re(this).filter(i=>i.type===n.VariableInstance)}addReturnStatement(e){return this.returnStatements.includes(e)||this.returnStatements.push(e),this}removeReturnStatement(e){const t=this.returnStatements.indexOf(e);return t!==-1&&this.returnStatements.splice(t,1),this}};c(ue,"MUTABLE_BASE_PROPERTIES",["description"]),c(ue,"INMUTABLE_BASE_PROPERTIES",["id","version","name","type"]),c(ue,"BASE_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,...ue.INMUTABLE_BASE_PROPERTIES]),c(ue,"MUTABLE_META_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,"x","y","collapsed"]),c(ue,"INMUTABLE_META_PROPERTIES",[...ue.INMUTABLE_BASE_PROPERTIES]),c(ue,"META_PROPERTIES",[...ue.MUTABLE_META_PROPERTIES,...ue.INMUTABLE_META_PROPERTIES]),c(ue,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(ue,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),c(ue,"UPSTREAM_PROPERTIES",[...ue.MUTABLE_UPSTREAM_PROPERTIES,...ue.INMUTABLE_UPSTREAM_PROPERTIES]),c(ue,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),c(ue,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ue,"DOWNSTREAM_PROPERTIES",[...ue.MUTABLE_DOWNSTREAM_PROPERTIES,...ue.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ue,"PROPERTIES",[...ue.META_PROPERTIES,...ue.UPSTREAM_PROPERTIES,...ue.DOWNSTREAM_PROPERTIES]);let Bi=ue;function i2(r){var o,l;const e=M9(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(p=>p.validate()),r.outputs.forEach(p=>p.validate()),(o=r.error)==null||o.validate(),(l=r.body)==null||l.validate();const s=[...wn(r)];return ie(r.errors,s)}const z=class z{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.Loop);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,"breakStatements",[]);c(this,"continueStatements",[]);c(this,"outputsDeclarations",[]);c(this,"body");c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"parent");c(this,"detachedChildren",[]);c(this,"currentIterationNumberArgumentDeclaration");c(this,"currentValueArgumentDeclaration",null);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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.Loop,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,process:null,errorCalls:[],successCalls:[],inputs:[],outputs:[],body:null,breakStatements:[],continueStatements:[],outputsDeclarations:[],error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...
|
|
48
|
+
You can attach new logic to the existing 'global-event' but creating a new callable entity that gets called by it.`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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}}addSelfToProject(){const e=[this],t=[],i=[];return this.project.addGlobalEvent(this),{updated:E(e),added:E(t),removed:E(i),self:this}}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}addCall(e){return this.calls.includes(e)||this.calls.push(e),this}removeCall(e){const t=this.calls.indexOf(e);return t!==-1&&this.calls.splice(t,1),this}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.findIndex(i=>i.id===e.id);return t>-1&&this.inputs.splice(t,1),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=g(e,this.project);return t.addEntryCaller(this),t.type!==n.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.implements=g(this.initialData.implements,this.project),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.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),St(this).forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),St(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:E(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=St(this);return[this,...this.inputs.flatMap(a=>a.toFlat(e)),...this.calls.flatMap(a=>a.toFlat(e)),...this.returnStatements.flatMap(a=>a.toFlat(e)),...this.implements?this.implements.toFlat(e):[],...t.flatMap(a=>a.toFlat(e))]}toFlatIds(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=St(this);return[this.id,...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.calls.flatMap(a=>a.toFlatIds(e)),...this.returnStatements.flatMap(a=>a.toFlatIds(e)),...this.implements?this.implements.toFlatIds(e):[],...t.flatMap(a=>a.toFlatIds(e))]}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,x:this.x,y:this.y,collapsed:this.collapsed,implements:this.implements.toJSON(),returnStatements:this.returnStatements.map(e=>e.toJSON()),inputs:this.inputs.map(e=>e.toJSON()),calls:this.calls.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,collapsed:this.collapsed,x:this.x,y:this.y,implements:this.implements.toReference(),inputs:this.inputs.map(e=>e.toReference()),calls:this.calls.map(e=>e.toReference()),returnStatements:this.returnStatements.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.calls.flatMap(i=>i.toFlatJSON(e)),...this.returnStatements.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.calls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.returnStatements.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.calls.forEach(e=>e.clearErrors()),this.returnStatements.forEach(e=>e.clearErrors()),this}validate(){const e=r2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){const e=St(this);return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...e.flatMap(i=>i.getErrors())]}getShallowErrors(){return this.errors}clone(){return new ue(this.toJSON(),this.project)}getVariableInstances(){return re(this).filter(i=>i.type===n.VariableInstance)}addReturnStatement(e){return this.returnStatements.includes(e)||this.returnStatements.push(e),this}removeReturnStatement(e){const t=this.returnStatements.indexOf(e);return t!==-1&&this.returnStatements.splice(t,1),this}};c(ue,"MUTABLE_BASE_PROPERTIES",["description"]),c(ue,"INMUTABLE_BASE_PROPERTIES",["id","version","name","type"]),c(ue,"BASE_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,...ue.INMUTABLE_BASE_PROPERTIES]),c(ue,"MUTABLE_META_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,"x","y","collapsed"]),c(ue,"INMUTABLE_META_PROPERTIES",[...ue.INMUTABLE_BASE_PROPERTIES]),c(ue,"META_PROPERTIES",[...ue.MUTABLE_META_PROPERTIES,...ue.INMUTABLE_META_PROPERTIES]),c(ue,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(ue,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),c(ue,"UPSTREAM_PROPERTIES",[...ue.MUTABLE_UPSTREAM_PROPERTIES,...ue.INMUTABLE_UPSTREAM_PROPERTIES]),c(ue,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),c(ue,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ue,"DOWNSTREAM_PROPERTIES",[...ue.MUTABLE_DOWNSTREAM_PROPERTIES,...ue.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ue,"PROPERTIES",[...ue.META_PROPERTIES,...ue.UPSTREAM_PROPERTIES,...ue.DOWNSTREAM_PROPERTIES]);let Bi=ue;function i2(r){var o,l;const e=M9(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(p=>p.validate()),r.outputs.forEach(p=>p.validate()),(o=r.error)==null||o.validate(),(l=r.body)==null||l.validate();const s=[...wn(r)];return ie(r.errors,s)}const z=class z{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.Loop);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,"breakStatements",[]);c(this,"continueStatements",[]);c(this,"outputsDeclarations",[]);c(this,"body");c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"parent");c(this,"detachedChildren",[]);c(this,"currentIterationNumberArgumentDeclaration");c(this,"currentValueArgumentDeclaration",null);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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.Loop,declaration:s,calledByEntry:o,calledBySuccess:l,calledByError:p,process:null,errorCalls:[],successCalls:[],inputs:[],outputs:[],body:null,breakStatements:[],continueStatements:[],outputsDeclarations:[],error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0},declaration:{list:!1,types:[n.ActionDescriptor]}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new b({id:`${e.id}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${n.Condition}' entities.
|
|
49
49
|
${Uo(t)}`,issue:null})):a.push(new b({id:`${e.id}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't found in the project. The 'declaration' property must point to one of the built-in action descriptors reserved for '${n.Condition}' entities.
|
|
50
50
|
${Uo(t)}`,issue:null})):a.push(new b({id:`${e.id}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' is missing the 'declaration' property. This property is required for a '${e.type}' entity and must point to one of the built-in action descriptors reserved for '${n.Condition}' entities.
|
|
51
51
|
${Uo(t)}`,issue:null})),{errors:a,modifiedData:i}}static fromReturnDeclarationToBodyArgumentDeclarationName(e){return`Previous iteration results of '${C(e,e.project)}'`}static fromBodyArgumentDeclarationToReturnDeclarationName(e){const t=e.name.replace("Previous iteration results of '","");return t.slice(0,t.length-1)}static fromReturnDeclarationToLoopOutputDeclarationName(e){return`Result list of '${C(e,e.project)}'`}static fromLoopOutputDeclarationToReturnDeclarationName(e){const t=e.name.replace("Result list of '","");return t.slice(0,t.length-1)}static fromLoopOutputDeclarationToBodyArgumentDeclarationName(e){return e.name.replace("Result list of '","Previous iteration results of '")}static fromBodyArgumentDeclarationToLoopOutputDeclarationName(e){return e.name.replace("Previous iteration results of '","Result list of '")}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
52
52
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
53
|
-
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}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addLoop(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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)}addOutputDeclaration(e){return this.outputsDeclarations.includes(e)?this:(this.outputsDeclarations.push(e),this)}removeOutputDeclaration(e){const t=this.outputsDeclarations.findIndex(i=>i.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(i=>i.id===e.id);return t>-1&&this.outputs.splice(t,1),this}setBody(e){return this.body=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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.body&&(this.body=g(this.initialData.body,this.project),this.body.setParent(this),this.body.initChildren()),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncChildren(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.body.remove({ignoreUpstream:!0,seenEntities:t}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.body.restore({seenEntities:e}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.error?this.error.toFlat(e):[],...this.body?this.body.toFlat(e):[],...this.continueStatements.flatMap(i=>i.toFlat(e)),...this.breakStatements.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[],...this.body?this.body.toFlatIds(e):[],...this.continueStatements.flatMap(i=>i.toFlatIds(e)),...this.breakStatements.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:((e=this.process)==null?void 0:e.toJSON())||null,declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),outputsDeclarations:this.outputsDeclarations.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),error:((t=this.error)==null?void 0:t.toJSON())||null,body:this.body.toJSON(),parent:this.parent.toReference(),breakStatements:this.breakStatements.map(i=>i.toJSON()),continueStatements:this.continueStatements.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:((e=this.declaration)==null?void 0:e.toReference())||null,body:((t=this.body)==null?void 0:t.toReference())||null,inputs:this.inputs.map(s=>s.toReference()),outputs:this.outputs.map(s=>s.toReference()),outputsDeclarations:this.outputsDeclarations.map(s=>s.toReference()),successCalls:this.successCalls.map(s=>s.toReference()),errorCalls:this.errorCalls.map(s=>s.toReference()),process:((i=this.process)==null?void 0:i.toReference())||null,calledBySuccess:this.calledBySuccess.map(s=>s.toReference()),calledByError:this.calledByError.map(s=>s.toReference()),calledByEntry:this.calledByEntry.map(s=>s.toReference()),continueStatements:this.continueStatements.map(s=>s.toReference()),breakStatements:this.breakStatements.map(s=>s.toReference()),error:((a=this.error)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.body)==null?void 0:i.toFlatJSON(e))||[],...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.continueStatements.flatMap(a=>a.toFlatJSON(e)),...this.breakStatements.flatMap(a=>a.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[],...this.process?this.process.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,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){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.body)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.continueStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.breakStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[],...this.process?this.process.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),this.continueStatements.forEach(i=>i.clearErrors()),this.breakStatements.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=i2(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.body?this.body.getErrors():[],...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new z(this.toJSON(),this.project)}getVariableInstances(){return this.body?re(this.body).filter(i=>i.type===n.VariableInstance):[]}addReturnStatement(e){return Ue.includes(this.parent.type)&&this.parent.addReturnStatement(e),this}removeReturnStatement(e){return Ue.includes(this.parent.type)&&this.parent.removeReturnStatement(e),this}addBreakStatement(e){return this.breakStatements.includes(e)||this.breakStatements.push(e),this}removeBreakStatement(e){const t=this.breakStatements.indexOf(e);return t!==-1&&this.breakStatements.splice(t,1),this}addContinueStatement(e){return this.continueStatements.includes(e)||this.continueStatements.push(e),this}removeContinueStatement(e){const t=this.continueStatements.indexOf(e);return t!==-1&&this.continueStatements.splice(t,1),this}getUniqueReturnDeclarations(){const e=[];return[...this.breakStatements,...this.continueStatements].forEach(i=>{i.outputs.forEach(s=>{e.find(l=>l===s||C(l,this.project)===C(s,this.project)&&jt(l.dataType,s.dataType))||e.push(s)})}),E(e)}syncTerminationStatements(){const e=[],t=[],i=[],a=this.getUniqueReturnDeclarations();return[...this.breakStatements,...this.continueStatements].forEach(o=>{const l=o.outputs,p=a.filter(y=>!l.find(h=>C(y,this.project)===C(h,this.project)&&jt(y.dataType,h.dataType)));p.length&&e.push(o),p.forEach(y=>{const h=y.clone(o);h.addSelfToProject(),t.push(h)})}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncBodyInputIndexes(){const e=[],t=[],i=[];return this.body.inputs.sort((s,o)=>s.index-o.index),this.body.inputs.forEach((s,o)=>{s.index!==o&&(s.sync({index:o}),e.push(s))}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncBodyArgumentsDeclarations(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.syncFixedBodyArgumentDeclarations();e.push(...a),t.push(...s),i.push(...o);const l=this.getUniqueReturnDeclarations(),p=this.body.inputs;l.sort((R,v)=>R.index-v.index),l.forEach(R=>{const v=R.getDataType();let A=p.find(ae=>C(ae,this.project)===z.fromReturnDeclarationToBodyArgumentDeclarationName(R)&&jt(ae.dataType,R.dataType));if(!A){const ae=z.fromReturnDeclarationToBodyArgumentDeclarationName(R),qe={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:ae,description:`Aggretated list of all previously outputted values from each iteration by the output '${C(R,this.project)}'`,dataType:null,implements:null,index:R.index,required:R.required,parent:this.body.toReference(),writesValues:[]},gt=g(qe,this.project);gt.setParent(this.body),gt.initChildren(),gt.addSelfToProject(),t.push(gt),A=gt}const D=this.body.inputs.find(ae=>ae.index===A.index&&ae!==A),F=this.body.inputs.filter(ae=>ae!==A);let k=A.index;D&&(k=Math.max(...F.map(ae=>ae.index))+1),A.index!==k&&(A.sync({index:k}),e.push(A));const oe=A.getDataType();let me=oe;if(v)if(!oe||!jt(oe,v)){if(!me){const ae=v.clone(A);ae.addSelfToProject(),me=ae,t.push(ae),e.push(A)}me.merge(v),me.sync({isList:!0})}else me.isList||(me.sync({isList:!0}),e.push(me));if(!v&&!me){const ae={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!0,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},qe=g(ae,this.project);qe.sync({isList:!0}),qe.setParent(A),qe.initChildren(),qe.addSelfToProject(),t.push(qe)}});const{updated:y,added:h,removed:m}=this.removeExtraBodyArgumentDeclarations();return e.push(...y),t.push(...h),i.push(...m),{updated:E(e),added:E(t),removed:E(i),self:this}}syncOutputsDeclarations(){const e=[],t=[],i=[],a=this.getUniqueReturnDeclarations(),s=this.outputsDeclarations;return a.forEach((l,p)=>{l.index!==p&&(l.sync({index:p}),e.push(l))}),a.forEach(l=>{const p=l.getDataType();let h=s.find(v=>C(v,this.project)===z.fromReturnDeclarationToLoopOutputDeclarationName(l)&&jt(v.dataType,l.dataType));if(!h){const v=z.fromReturnDeclarationToLoopOutputDeclarationName(l),P={id:_.UUID.uuid(),version:1,type:n.ValueDescriptor,name:v,description:`Aggretated list of all previously outputted values from each iteration by the output '${C(l,this.project)}'`,dataType:null,index:l.index,required:l.required,parent:this.toReference()},A=g(P,this.project);A.setParent(this),A.initChildren(),A.addSelfToProject(),t.push(A),h=A}h.index!==l.index&&(h.sync({index:l.index}),e.push(h));let R=h.getDataType();if(p)if(!R||!jt(R,p)){if(!R){const v=p.clone(h);v.addSelfToProject(),R=v,t.push(v),e.push(h)}R.merge(p),R.sync({isList:!0})}else R.isList||(R.sync({isList:!0}),e.push(R));if(!p&&!R){const v={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!0,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:h.toReference()},P=g(v,this.project);P.sync({isList:!0}),P.setParent(h),P.initChildren(),P.addSelfToProject(),t.push(P)}}),s.filter(l=>!a.find(y=>C(l,this.project)===z.fromReturnDeclarationToLoopOutputDeclarationName(y))).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncOutputMaps(){const e=[],t=[],i=[],a=this.outputsDeclarations,s=this.outputs;return a.forEach(l=>{var h;let y=s.find(m=>{var R,v;return((R=m.declaration)==null?void 0:R.id)===l.id&&jt((v=m.declaration)==null?void 0:v.dataType,l.dataType)});if(y)((h=y.declaration)==null?void 0:h.id)!==l.id&&(y.setDeclaration(l),e.push(y));else{const m={id:_.UUID.uuid(),version:1,type:n.OutputMap,index:l.index,declaration:l.toJSON(),writesValues:[],parent:this.toReference()},R=g(m,this.project);R.setParent(this),R.initChildren(),R.addSelfToProject(),t.push(R),y=R}y.index!==l.index&&(y.sync({index:l.index}),e.push(y))}),s.filter(l=>!a.find(y=>{var h;return((h=l.declaration)==null?void 0:h.id)===y.id})).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}createCurrentIterationNumberArgumentDeclaration(){const e=[],t=[],i=[];let s=this.body.inputs.find(y=>{var h;return y.name===z.CURRENT_ITERATION_NUMBER_ARG_NAME||y.id===((h=this.currentIterationNumberArgumentDeclaration)==null?void 0:h.id)});const o=this.getCurrentIterationNumberBuiltInValueDescriptor();if(!s){const y={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_ITERATION_NUMBER_ARG_NAME,description:"The number of the current iteration",dataType:null,implements:o==null?void 0:o.toJSON(),index:this.body.inputs.length,required:!0,parent:this.body.toReference(),writesValues:[]},h=g(y,this.project);h.setParent(this.body),h.initChildren(),h.addSelfToProject(),t.push(h),s=h}!s.index&&s.index!==0&&(s.sync({index:0}),e.push(s)),(!s.implements||s.implements.id!==o.id)&&(s.setImplements(o),e.push(s));let p=s.getDataType();if(!p){const y={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:s.toReference()},h=g(y,this.project);h.setParent(s),h.initChildren(),h.addSelfToProject(),t.push(h),p=h}if(!p.entity||p.entity.type!==n.PrimitiveEntity||p.entity.name!==I.Number||p.entity.id!==B["primitive-entity"].number.id){const y=this.project.getBuiltIn(B["primitive-entity"].number.id);p.setEntity(y),e.push(p)}return this.currentIterationNumberArgumentDeclaration=s,{updated:E(e),added:E(t),removed:E(i),self:this}}removeExtraBodyArgumentDeclarations(){const e=[],t=[],i=[],a=this.body.inputs,s=this.getUniqueReturnDeclarations();return a.filter(l=>l===this.currentIterationNumberArgumentDeclaration||l===this.currentValueArgumentDeclaration?!1:!s.find(y=>C(l,this.project)===z.fromReturnDeclarationToBodyArgumentDeclarationName(y))).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}createCurrentValueInputBasedOnInputMap(){var l,p,y,h,m;const e=[],t=[],i=[];switch(this.declaration.id){case $.List:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.List].body.inputs.currentValue.id}),v=this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.List].inputs.list.id});if(!v)break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.List].inputs.list.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(!F){const oe={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},me=g(oe,this.project);me.setParent(A),me.initChildren(),me.addSelfToProject(),t.push(me),F=me}const k=v.getDataType();F.merge(k),F.sync({isList:!1})}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.ManualFlow:{this.currentValueArgumentDeclaration=null;break}case $.Counted:{this.currentValueArgumentDeclaration=null;break}case $.ObjectKeys:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.ObjectKeys].body.inputs.currentValue.id});if(!this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.ObjectKeys].inputs.object.id}))break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.ObjectKeys].inputs.object.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=this.project.getBuiltIn(B["primitive-entity"].string.id);((l=F.entity)==null?void 0:l.id)!==k.id&&(F.setEntity(k),e.push(F))}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),F=oe}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.ObjectValues:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.ObjectValues].body.inputs.currentValue.id}),v=this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.ObjectValues].inputs.object.id});if(!v)break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.ObjectValues].inputs.object.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=v.getDataType(),oe=((y=k==null?void 0:k.entity)==null?void 0:y.properties)||[];(h=F.orChildrenGroup)==null||h.forEach(me=>{const{affected:ae,removed:qe}=me.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...ae),i.push(...qe)}),oe.forEach(me=>{const ae=me.getDataType();if(ae){const qe=ae.clone(F);qe.sync({parentRelationType:Ze.OrDataTypeGroup}),qe.addSelfToProject(),t.push(qe)}else{const qe={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parentRelationType:Ze.OrDataTypeGroup,parent:F.toReference()},gt=g(qe,this.project);gt.setParent(F),gt.initChildren(),gt.addSelfToProject(),t.push(gt)}})}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),F=oe;const me=v.getDataType();(((p=me==null?void 0:me.entity)==null?void 0:p.properties)||[]).forEach(qe=>{const gt=qe.getDataType();if(gt){const Wr=gt.clone(oe);Wr.sync({parentRelationType:Ze.OrDataTypeGroup}),Wr.addSelfToProject(),t.push(Wr)}else{const Wr={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parentRelationType:Ze.OrDataTypeGroup,parent:oe.toReference()},Xo=g(Wr,this.project);Xo.setParent(oe),Xo.initChildren(),Xo.addSelfToProject(),t.push(Xo)}})}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.String:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.String].body.inputs.currentValue.id});if(!this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.String].inputs.string.id}))break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop]["string-loop"].inputs.string.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=this.project.getBuiltIn(B["primitive-entity"].string.id);((m=F.entity)==null?void 0:m.id)!==k.id&&(F.setEntity(k),e.push(F))}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),t.push(oe),F=oe}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}}const{updated:a,added:s,removed:o}=this.removeExtraBodyArgumentDeclarations();return e.push(...a),t.push(...s),i.push(...o),{updated:E(e),added:E(t),removed:E(i),self:this}}syncFixedBodyArgumentDeclarations(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.createCurrentIterationNumberArgumentDeclaration();e.push(...a),t.push(...s),i.push(...o);const{updated:l,added:p,removed:y}=this.createCurrentValueInputBasedOnInputMap();return e.push(...l),t.push(...p),i.push(...y),{updated:E(e),added:E(t),removed:E(i),self:this}}syncInputMaps(){const e=[],t=[],i=[];switch(this.declaration.id){case $.List:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["list-loop"].inputs.list.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["list-loop"].inputs.list.id){const s=this.project.get(B[n.Loop]["list-loop"].inputs.list.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["list-loop"].inputs.list.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ManualFlow:{this.inputs.forEach(a=>{a.remove(),i.push(a)});break}case $.Counted:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["counted-loop"].inputs.number.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["counted-loop"].inputs.number.id){const s=this.project.get(B[n.Loop]["counted-loop"].inputs.number.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["counted-loop"].inputs.number.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ObjectKeys:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["object-keys-loop"].inputs.object.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["object-keys-loop"].inputs.object.id){const s=this.project.get(B[n.Loop]["object-keys-loop"].inputs.object.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["object-keys-loop"].inputs.object.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ObjectValues:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["object-values-loop"].inputs.object.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["object-values-loop"].inputs.object.id){const s=this.project.get(B[n.Loop]["object-values-loop"].inputs.object.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["object-values-loop"].inputs.object.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.String:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["string-loop"].inputs.string.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["string-loop"].inputs.string.id){const s=this.project.get(B[n.Loop]["string-loop"].inputs.string.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["string-loop"].inputs.string.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}}return{updated:E(e),added:E(t),removed:E(i),self:this}}getCurrentValueBuiltInValueDescriptor(){var t;const e=(t=B[n.Loop][this.declaration.id].body.inputs.currentValue)==null?void 0:t.id;return e?this.project.get(e):null}getCurrentIterationNumberBuiltInValueDescriptor(){const e=B[n.Loop][this.declaration.id].body.inputs.iterationNumber.id;return this.project.get(e)}syncBody(){var o;const e=[],t=[],i=[],a=B[n.Loop][this.declaration.id].body.id,s=this.project.getBuiltIn(a);if(this.body)((o=this.body.implements)==null?void 0:o.id)!==s.id&&(this.body.setImplements(s),this.body.setParent(this),e.push(this.body));else{const l={id:_.UUID.uuid(),version:1,type:n.FunctionDeclaration,name:s.name,description:null,inputs:[],index:null,returnStatements:[],calls:[],collapsed:!1,private:!1,implements:s.toJSON(),x:0,y:0,parent:this.toReference()},p=g(l,this.project);p.initChildren(),p.setParent(this),p.addSelfToProject(),t.push(p)}return{self:this,updated:E(e),added:E(t),removed:E(i)}}syncChildren(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.syncBody();e.push(...a),t.push(...s),i.push(...o);const{updated:l,added:p,removed:y}=this.syncInputMaps();e.push(...l),t.push(...p),i.push(...y);const{updated:h,added:m,removed:R}=this.syncTerminationStatements();e.push(...h),t.push(...m),i.push(...R);const{updated:v,added:P,removed:A}=this.syncBodyArgumentsDeclarations();e.push(...v),t.push(...P),i.push(...A);const{updated:D,added:F,removed:k}=this.syncBodyInputIndexes();e.push(...D),t.push(...F),i.push(...k);const{updated:oe,added:me,removed:ae}=this.syncOutputsDeclarations();e.push(...oe),t.push(...me),i.push(...ae);const{updated:qe,added:gt,removed:Wr}=this.syncOutputMaps();return e.push(...qe),t.push(...gt),i.push(...Wr),{self:this,updated:E(e),added:E(t),removed:E(i)}}};c(z,"CURRENT_ITERATION_NUMBER_ARG_NAME","Current iteration number"),c(z,"CURRENT_VALUE_ARG_NAME","Current value"),c(z,"MUTABLE_BASE_PROPERTIES",[]),c(z,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(z,"BASE_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,...z.INMUTABLE_BASE_PROPERTIES]),c(z,"MUTABLE_META_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,"x","y"]),c(z,"INMUTABLE_META_PROPERTIES",[...z.INMUTABLE_BASE_PROPERTIES]),c(z,"META_PROPERTIES",[...z.MUTABLE_META_PROPERTIES,...z.INMUTABLE_META_PROPERTIES]),c(z,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(z,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),c(z,"UPSTREAM_PROPERTIES",[...z.MUTABLE_UPSTREAM_PROPERTIES,...z.INMUTABLE_UPSTREAM_PROPERTIES]),c(z,"MUTABLE_DOWNSTREAM_PROPERTIES",["body","inputs","outputs","outputsDeclarations","successCalls","errorCalls","error","breakStatements","continueStatements"]),c(z,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(z,"DOWNSTREAM_PROPERTIES",[...z.MUTABLE_DOWNSTREAM_PROPERTIES,...z.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(z,"PROPERTIES",[...z.META_PROPERTIES,...z.UPSTREAM_PROPERTIES,...z.DOWNSTREAM_PROPERTIES]);let Nr=z;function a2(r){const e=c6(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(o=>o.validate());const s=[...wn(r)];return ie(r.errors,s)}const ve=class ve{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.Condition);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"declaration");c(this,"inputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"project");c(this,"errors",[]);c(this,"parent");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 i=t;if(e.parent){const h=N(e.parent);i=t.get(h)}const a=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),s=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),o=e.calledByError.map(h=>{const m=N(h);return t.get(m)});let l;if(e.declaration){const h=N(e.declaration);l=t.get(h)}const p={id:e.id,version:1,type:n.Condition,declaration:l,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputs:[],x:0,y:0,parent:i},y=g(p,t);return y.setParent(i),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...dt,n.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new b({id:`${e.id}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${n.Condition}' entities.
|
|
53
|
+
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}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addLoop(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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)}addOutputDeclaration(e){return this.outputsDeclarations.includes(e)?this:(this.outputsDeclarations.push(e),this)}removeOutputDeclaration(e){const t=this.outputsDeclarations.findIndex(i=>i.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(i=>i.id===e.id);return t>-1&&this.outputs.splice(t,1),this}setBody(e){return this.body=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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.body&&(this.body=g(this.initialData.body,this.project),this.body.setParent(this),this.body.initChildren()),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncChildren(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.body.remove({ignoreUpstream:!0,seenEntities:t}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.body.restore({seenEntities:e}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.error?this.error.toFlat(e):[],...this.body?this.body.toFlat(e):[],...this.continueStatements.flatMap(i=>i.toFlat(e)),...this.breakStatements.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[],...this.body?this.body.toFlatIds(e):[],...this.continueStatements.flatMap(i=>i.toFlatIds(e)),...this.breakStatements.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:((e=this.process)==null?void 0:e.toJSON())||null,declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),outputsDeclarations:this.outputsDeclarations.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),error:((t=this.error)==null?void 0:t.toJSON())||null,body:this.body.toJSON(),parent:this.parent.toReference(),breakStatements:this.breakStatements.map(i=>i.toJSON()),continueStatements:this.continueStatements.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:((e=this.declaration)==null?void 0:e.toReference())||null,body:((t=this.body)==null?void 0:t.toReference())||null,inputs:this.inputs.map(s=>s.toReference()),outputs:this.outputs.map(s=>s.toReference()),outputsDeclarations:this.outputsDeclarations.map(s=>s.toReference()),successCalls:this.successCalls.map(s=>s.toReference()),errorCalls:this.errorCalls.map(s=>s.toReference()),process:((i=this.process)==null?void 0:i.toReference())||null,calledBySuccess:this.calledBySuccess.map(s=>s.toReference()),calledByError:this.calledByError.map(s=>s.toReference()),calledByEntry:this.calledByEntry.map(s=>s.toReference()),continueStatements:this.continueStatements.map(s=>s.toReference()),breakStatements:this.breakStatements.map(s=>s.toReference()),error:((a=this.error)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.body)==null?void 0:i.toFlatJSON(e))||[],...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.continueStatements.flatMap(a=>a.toFlatJSON(e)),...this.breakStatements.flatMap(a=>a.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[],...this.process?this.process.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,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){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.body)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.continueStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.breakStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[],...this.process?this.process.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),this.continueStatements.forEach(i=>i.clearErrors()),this.breakStatements.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=i2(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.body?this.body.getErrors():[],...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new z(this.toJSON(),this.project)}getVariableInstances(){return this.body?re(this.body).filter(i=>i.type===n.VariableInstance):[]}addReturnStatement(e){return Ue.includes(this.parent.type)&&this.parent.addReturnStatement(e),this}removeReturnStatement(e){return Ue.includes(this.parent.type)&&this.parent.removeReturnStatement(e),this}addBreakStatement(e){return this.breakStatements.includes(e)||this.breakStatements.push(e),this}removeBreakStatement(e){const t=this.breakStatements.indexOf(e);return t!==-1&&this.breakStatements.splice(t,1),this}addContinueStatement(e){return this.continueStatements.includes(e)||this.continueStatements.push(e),this}removeContinueStatement(e){const t=this.continueStatements.indexOf(e);return t!==-1&&this.continueStatements.splice(t,1),this}getUniqueReturnDeclarations(){const e=[];return[...this.breakStatements,...this.continueStatements].forEach(i=>{i.outputs.forEach(s=>{e.find(l=>l===s||C(l,this.project)===C(s,this.project)&&jt(l.dataType,s.dataType))||e.push(s)})}),E(e)}syncTerminationStatements(){const e=[],t=[],i=[],a=this.getUniqueReturnDeclarations();return[...this.breakStatements,...this.continueStatements].forEach(o=>{const l=o.outputs,p=a.filter(y=>!l.find(h=>C(y,this.project)===C(h,this.project)&&jt(y.dataType,h.dataType)));p.length&&e.push(o),p.forEach(y=>{const h=y.clone(o);h.addSelfToProject(),t.push(h)})}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncBodyInputIndexes(){const e=[],t=[],i=[];return this.body.inputs.sort((s,o)=>s.index-o.index),this.body.inputs.forEach((s,o)=>{s.index!==o&&(s.sync({index:o}),e.push(s))}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncBodyArgumentsDeclarations(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.syncFixedBodyArgumentDeclarations();e.push(...a),t.push(...s),i.push(...o);const l=this.getUniqueReturnDeclarations(),p=this.body.inputs;l.sort((R,v)=>R.index-v.index),l.forEach(R=>{const v=R.getDataType();let A=p.find(ae=>C(ae,this.project)===z.fromReturnDeclarationToBodyArgumentDeclarationName(R)&&jt(ae.dataType,R.dataType));if(!A){const ae=z.fromReturnDeclarationToBodyArgumentDeclarationName(R),qe={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:ae,description:`Aggretated list of all previously outputted values from each iteration by the output '${C(R,this.project)}'`,dataType:null,implements:null,index:R.index,required:R.required,parent:this.body.toReference(),writesValues:[]},vt=g(qe,this.project);vt.setParent(this.body),vt.initChildren(),vt.addSelfToProject(),t.push(vt),A=vt}const D=this.body.inputs.find(ae=>ae.index===A.index&&ae!==A),F=this.body.inputs.filter(ae=>ae!==A);let k=A.index;D&&(k=Math.max(...F.map(ae=>ae.index))+1),A.index!==k&&(A.sync({index:k}),e.push(A));const oe=A.getDataType();let me=oe;if(v)if(!oe||!jt(oe,v)){if(!me){const ae=v.clone(A);ae.addSelfToProject(),me=ae,t.push(ae),e.push(A)}me.merge(v),me.sync({isList:!0})}else me.isList||(me.sync({isList:!0}),e.push(me));if(!v&&!me){const ae={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!0,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},qe=g(ae,this.project);qe.sync({isList:!0}),qe.setParent(A),qe.initChildren(),qe.addSelfToProject(),t.push(qe)}});const{updated:y,added:h,removed:m}=this.removeExtraBodyArgumentDeclarations();return e.push(...y),t.push(...h),i.push(...m),{updated:E(e),added:E(t),removed:E(i),self:this}}syncOutputsDeclarations(){const e=[],t=[],i=[],a=this.getUniqueReturnDeclarations(),s=this.outputsDeclarations;return a.forEach((l,p)=>{l.index!==p&&(l.sync({index:p}),e.push(l))}),a.forEach(l=>{const p=l.getDataType();let h=s.find(v=>C(v,this.project)===z.fromReturnDeclarationToLoopOutputDeclarationName(l)&&jt(v.dataType,l.dataType));if(!h){const v=z.fromReturnDeclarationToLoopOutputDeclarationName(l),P={id:_.UUID.uuid(),version:1,type:n.ValueDescriptor,name:v,description:`Aggretated list of all previously outputted values from each iteration by the output '${C(l,this.project)}'`,dataType:null,index:l.index,required:l.required,parent:this.toReference()},A=g(P,this.project);A.setParent(this),A.initChildren(),A.addSelfToProject(),t.push(A),h=A}h.index!==l.index&&(h.sync({index:l.index}),e.push(h));let R=h.getDataType();if(p)if(!R||!jt(R,p)){if(!R){const v=p.clone(h);v.addSelfToProject(),R=v,t.push(v),e.push(h)}R.merge(p),R.sync({isList:!0})}else R.isList||(R.sync({isList:!0}),e.push(R));if(!p&&!R){const v={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!0,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:h.toReference()},P=g(v,this.project);P.sync({isList:!0}),P.setParent(h),P.initChildren(),P.addSelfToProject(),t.push(P)}}),s.filter(l=>!a.find(y=>C(l,this.project)===z.fromReturnDeclarationToLoopOutputDeclarationName(y))).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncOutputMaps(){const e=[],t=[],i=[],a=this.outputsDeclarations,s=this.outputs;return a.forEach(l=>{var h;let y=s.find(m=>{var R,v;return((R=m.declaration)==null?void 0:R.id)===l.id&&jt((v=m.declaration)==null?void 0:v.dataType,l.dataType)});if(y)((h=y.declaration)==null?void 0:h.id)!==l.id&&(y.setDeclaration(l),e.push(y));else{const m={id:_.UUID.uuid(),version:1,type:n.OutputMap,index:l.index,declaration:l.toJSON(),writesValues:[],parent:this.toReference()},R=g(m,this.project);R.setParent(this),R.initChildren(),R.addSelfToProject(),t.push(R),y=R}y.index!==l.index&&(y.sync({index:l.index}),e.push(y))}),s.filter(l=>!a.find(y=>{var h;return((h=l.declaration)==null?void 0:h.id)===y.id})).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}createCurrentIterationNumberArgumentDeclaration(){const e=[],t=[],i=[];let s=this.body.inputs.find(y=>{var h;return y.name===z.CURRENT_ITERATION_NUMBER_ARG_NAME||y.id===((h=this.currentIterationNumberArgumentDeclaration)==null?void 0:h.id)});const o=this.getCurrentIterationNumberBuiltInValueDescriptor();if(!s){const y={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_ITERATION_NUMBER_ARG_NAME,description:"The number of the current iteration",dataType:null,implements:o==null?void 0:o.toJSON(),index:this.body.inputs.length,required:!0,parent:this.body.toReference(),writesValues:[]},h=g(y,this.project);h.setParent(this.body),h.initChildren(),h.addSelfToProject(),t.push(h),s=h}!s.index&&s.index!==0&&(s.sync({index:0}),e.push(s)),(!s.implements||s.implements.id!==o.id)&&(s.setImplements(o),e.push(s));let p=s.getDataType();if(!p){const y={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:s.toReference()},h=g(y,this.project);h.setParent(s),h.initChildren(),h.addSelfToProject(),t.push(h),p=h}if(!p.entity||p.entity.type!==n.PrimitiveEntity||p.entity.name!==I.Number||p.entity.id!==B["primitive-entity"].number.id){const y=this.project.getBuiltIn(B["primitive-entity"].number.id);p.setEntity(y),e.push(p)}return this.currentIterationNumberArgumentDeclaration=s,{updated:E(e),added:E(t),removed:E(i),self:this}}removeExtraBodyArgumentDeclarations(){const e=[],t=[],i=[],a=this.body.inputs,s=this.getUniqueReturnDeclarations();return a.filter(l=>l===this.currentIterationNumberArgumentDeclaration||l===this.currentValueArgumentDeclaration?!1:!s.find(y=>C(l,this.project)===z.fromReturnDeclarationToBodyArgumentDeclarationName(y))).forEach(l=>{const{affected:p,removed:y}=l.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...p),i.push(...y)}),{updated:E(e),added:E(t),removed:E(i),self:this}}createCurrentValueInputBasedOnInputMap(){var l,p,y,h,m;const e=[],t=[],i=[];switch(this.declaration.id){case $.List:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.List].body.inputs.currentValue.id}),v=this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.List].inputs.list.id});if(!v)break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.List].inputs.list.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(!F){const oe={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},me=g(oe,this.project);me.setParent(A),me.initChildren(),me.addSelfToProject(),t.push(me),F=me}const k=v.getDataType();F.merge(k),F.sync({isList:!1})}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.ManualFlow:{this.currentValueArgumentDeclaration=null;break}case $.Counted:{this.currentValueArgumentDeclaration=null;break}case $.ObjectKeys:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.ObjectKeys].body.inputs.currentValue.id});if(!this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.ObjectKeys].inputs.object.id}))break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.ObjectKeys].inputs.object.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=this.project.getBuiltIn(B["primitive-entity"].string.id);((l=F.entity)==null?void 0:l.id)!==k.id&&(F.setEntity(k),e.push(F))}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),F=oe}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.ObjectValues:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.ObjectValues].body.inputs.currentValue.id}),v=this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.ObjectValues].inputs.object.id});if(!v)break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop][$.ObjectValues].inputs.object.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=v.getDataType(),oe=((y=k==null?void 0:k.entity)==null?void 0:y.properties)||[];(h=F.orChildrenGroup)==null||h.forEach(me=>{const{affected:ae,removed:qe}=me.remove({ignoreUpstream:!1,seenEntities:new Set});e.push(...ae),i.push(...qe)}),oe.forEach(me=>{const ae=me.getDataType();if(ae){const qe=ae.clone(F);qe.sync({parentRelationType:Ze.OrDataTypeGroup}),qe.addSelfToProject(),t.push(qe)}else{const qe={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parentRelationType:Ze.OrDataTypeGroup,parent:F.toReference()},vt=g(qe,this.project);vt.setParent(F),vt.initChildren(),vt.addSelfToProject(),t.push(vt)}})}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),F=oe;const me=v.getDataType();(((p=me==null?void 0:me.entity)==null?void 0:p.properties)||[]).forEach(qe=>{const vt=qe.getDataType();if(vt){const Wr=vt.clone(oe);Wr.sync({parentRelationType:Ze.OrDataTypeGroup}),Wr.addSelfToProject(),t.push(Wr)}else{const Wr={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parentRelationType:Ze.OrDataTypeGroup,parent:oe.toReference()},Xo=g(Wr,this.project);Xo.setParent(oe),Xo.initChildren(),Xo.addSelfToProject(),t.push(Xo)}})}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}case $.String:{const R=this.body.inputs.find(A=>{var D;return((D=A.implements)==null?void 0:D.id)===B[n.Loop][$.String].body.inputs.currentValue.id});if(!this.inputs.find(A=>{var D;return((D=A.declaration)==null?void 0:D.id)===B[n.Loop][$.String].inputs.string.id}))break;const P=this.getCurrentValueBuiltInValueDescriptor();if(R){this.currentValueArgumentDeclaration=R;const A=this.project.get(B[n.Loop]["string-loop"].inputs.string.id);P&&(!R.implements||R.implements.id!==P.id)&&(R.setImplements(P),e.push(R));let F=R.getDataType();if(F){const k=this.project.getBuiltIn(B["primitive-entity"].string.id);((m=F.entity)==null?void 0:m.id)!==k.id&&(F.setEntity(k),e.push(F))}else{const k={id:_.UUID.uuid(),version:1,type:n.DataType,isList:!1,entity:null,isNullable:!1,constant:!1,defaultValue:null,asType:!1,like:!1,inferred:!1,andChildrenGroup:[],orChildrenGroup:[],parent:A.toReference()},oe=g(k,this.project);oe.setParent(A),oe.initChildren(),oe.addSelfToProject(),t.push(oe),F=oe}}else{const A={id:_.UUID.uuid(),version:1,type:n.ArgumentDeclaration,name:z.CURRENT_VALUE_ARG_NAME,description:null,index:this.body.inputs.length,required:!0,implements:P,writesValues:[],dataType:null,parent:this.body.toReference()},D=g(A,this.project);D.initChildren(),D.setParent(this.body),D.addSelfToProject(),P&&(!D.implements||D.implements.id!==P.id)&&(D.setImplements(P),e.push(D)),t.push(D),this.currentValueArgumentDeclaration=D}break}}const{updated:a,added:s,removed:o}=this.removeExtraBodyArgumentDeclarations();return e.push(...a),t.push(...s),i.push(...o),{updated:E(e),added:E(t),removed:E(i),self:this}}syncFixedBodyArgumentDeclarations(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.createCurrentIterationNumberArgumentDeclaration();e.push(...a),t.push(...s),i.push(...o);const{updated:l,added:p,removed:y}=this.createCurrentValueInputBasedOnInputMap();return e.push(...l),t.push(...p),i.push(...y),{updated:E(e),added:E(t),removed:E(i),self:this}}syncInputMaps(){const e=[],t=[],i=[];switch(this.declaration.id){case $.List:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["list-loop"].inputs.list.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["list-loop"].inputs.list.id){const s=this.project.get(B[n.Loop]["list-loop"].inputs.list.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["list-loop"].inputs.list.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ManualFlow:{this.inputs.forEach(a=>{a.remove(),i.push(a)});break}case $.Counted:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["counted-loop"].inputs.number.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["counted-loop"].inputs.number.id){const s=this.project.get(B[n.Loop]["counted-loop"].inputs.number.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["counted-loop"].inputs.number.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ObjectKeys:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["object-keys-loop"].inputs.object.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["object-keys-loop"].inputs.object.id){const s=this.project.get(B[n.Loop]["object-keys-loop"].inputs.object.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["object-keys-loop"].inputs.object.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.ObjectValues:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["object-values-loop"].inputs.object.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["object-values-loop"].inputs.object.id){const s=this.project.get(B[n.Loop]["object-values-loop"].inputs.object.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["object-values-loop"].inputs.object.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}case $.String:{let a=null;if(this.inputs.forEach(s=>{var o;((o=s.declaration)==null?void 0:o.id)===B[n.Loop]["string-loop"].inputs.string.id?a=s:(s.remove(),i.push(s))}),a){if(a.declaration.id!==B[n.Loop]["string-loop"].inputs.string.id){const s=this.project.get(B[n.Loop]["string-loop"].inputs.string.id);a.setDeclaration(s),e.push(a)}}else{const s=this.project.get(B[n.Loop]["string-loop"].inputs.string.id),o={id:_.UUID.uuid(),version:1,type:n.InputMap,name:null,description:null,index:0,declaration:s.toJSON(),readsValue:null,defaultValue:null,parent:this.toReference()},l=g(o,this.project);l.initChildren(),l.setParent(this),l.addSelfToProject(),t.push(l)}break}}return{updated:E(e),added:E(t),removed:E(i),self:this}}getCurrentValueBuiltInValueDescriptor(){var t;const e=(t=B[n.Loop][this.declaration.id].body.inputs.currentValue)==null?void 0:t.id;return e?this.project.get(e):null}getCurrentIterationNumberBuiltInValueDescriptor(){const e=B[n.Loop][this.declaration.id].body.inputs.iterationNumber.id;return this.project.get(e)}syncBody(){var o;const e=[],t=[],i=[],a=B[n.Loop][this.declaration.id].body.id,s=this.project.getBuiltIn(a);if(this.body)((o=this.body.implements)==null?void 0:o.id)!==s.id&&(this.body.setImplements(s),this.body.setParent(this),e.push(this.body));else{const l={id:_.UUID.uuid(),version:1,type:n.FunctionDeclaration,name:s.name,description:null,inputs:[],index:null,returnStatements:[],calls:[],collapsed:!1,private:!1,implements:s.toJSON(),x:0,y:0,parent:this.toReference()},p=g(l,this.project);p.initChildren(),p.setParent(this),p.addSelfToProject(),t.push(p)}return{self:this,updated:E(e),added:E(t),removed:E(i)}}syncChildren(){const e=[],t=[],i=[],{updated:a,added:s,removed:o}=this.syncBody();e.push(...a),t.push(...s),i.push(...o);const{updated:l,added:p,removed:y}=this.syncInputMaps();e.push(...l),t.push(...p),i.push(...y);const{updated:h,added:m,removed:R}=this.syncTerminationStatements();e.push(...h),t.push(...m),i.push(...R);const{updated:v,added:P,removed:A}=this.syncBodyArgumentsDeclarations();e.push(...v),t.push(...P),i.push(...A);const{updated:D,added:F,removed:k}=this.syncBodyInputIndexes();e.push(...D),t.push(...F),i.push(...k);const{updated:oe,added:me,removed:ae}=this.syncOutputsDeclarations();e.push(...oe),t.push(...me),i.push(...ae);const{updated:qe,added:vt,removed:Wr}=this.syncOutputMaps();return e.push(...qe),t.push(...vt),i.push(...Wr),{self:this,updated:E(e),added:E(t),removed:E(i)}}};c(z,"CURRENT_ITERATION_NUMBER_ARG_NAME","Current iteration number"),c(z,"CURRENT_VALUE_ARG_NAME","Current value"),c(z,"MUTABLE_BASE_PROPERTIES",[]),c(z,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(z,"BASE_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,...z.INMUTABLE_BASE_PROPERTIES]),c(z,"MUTABLE_META_PROPERTIES",[...z.MUTABLE_BASE_PROPERTIES,"x","y"]),c(z,"INMUTABLE_META_PROPERTIES",[...z.INMUTABLE_BASE_PROPERTIES]),c(z,"META_PROPERTIES",[...z.MUTABLE_META_PROPERTIES,...z.INMUTABLE_META_PROPERTIES]),c(z,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(z,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),c(z,"UPSTREAM_PROPERTIES",[...z.MUTABLE_UPSTREAM_PROPERTIES,...z.INMUTABLE_UPSTREAM_PROPERTIES]),c(z,"MUTABLE_DOWNSTREAM_PROPERTIES",["body","inputs","outputs","outputsDeclarations","successCalls","errorCalls","error","breakStatements","continueStatements"]),c(z,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(z,"DOWNSTREAM_PROPERTIES",[...z.MUTABLE_DOWNSTREAM_PROPERTIES,...z.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(z,"PROPERTIES",[...z.META_PROPERTIES,...z.UPSTREAM_PROPERTIES,...z.DOWNSTREAM_PROPERTIES]);let Nr=z;function a2(r){const e=c6(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(o=>o.validate());const s=[...wn(r)];return ie(r.errors,s)}const ve=class ve{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.Condition);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"declaration");c(this,"inputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"project");c(this,"errors",[]);c(this,"parent");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 i=t;if(e.parent){const h=N(e.parent);i=t.get(h)}const a=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),s=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),o=e.calledByError.map(h=>{const m=N(h);return t.get(m)});let l;if(e.declaration){const h=N(e.declaration);l=t.get(h)}const p={id:e.id,version:1,type:n.Condition,declaration:l,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputs:[],x:0,y:0,parent:i},y=g(p,t);return y.setParent(i),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new b({id:`${e.id}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${n.Condition}' entities.
|
|
54
54
|
${xo(t)}`,issue:null})):a.push(new b({id:`${e.id}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't found in the project. The 'declaration' property must point to one of the built-in action descriptors reserved for '${n.Condition}' entities.
|
|
55
55
|
${xo(t)}`,issue:null})):a.push(new b({id:`${e.id}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.Error,message:`Entity of type '${e.type}' with id '${e.id}' is missing the 'declaration' property. This property is required for a '${e.type}' entity and must point to one of the built-in action descriptors reserved for '${n.Condition}' entities.
|
|
56
56
|
${xo(t)}`,issue:null})),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
57
|
-
If an entity is called by another, they must be in the same scope, which means they have the same parent.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addCondition(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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}removeOutput(e){return 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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.syncMissingFixedInputs(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:this.declaration.toJSON(),successCalls:this.successCalls.map(e=>e.toJSON()),errorCalls:this.errorCalls.map(e=>e.toJSON()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),inputs:this.inputs.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:this.declaration.toReference(),inputs:this.inputs.map(e=>e.toReference()),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.calledBy.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,type:this.type,declaration:this.declaration.id,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.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.successCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.successCalls.forEach(e=>e.clearErrors()),this.errorCalls.forEach(e=>e.clearErrors()),this}validate(){const e=a2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e){return new ve(this.toJSON(),this.project)}removeUnrecognizedInputs(){const e=[],t=[],i=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedInputs(){const e=[],t=[],i=[],a=this.declaration.inputs.filter(p=>p.parentRelationType===O.FixedArguments&&!this.inputs.find(y=>y.declaration.id===p.id));this.inputs.sort((p,y)=>p.index-y.index),a.forEach(p=>{this.inputs.forEach(m=>{m.index>=p.index&&m.sync({index:m.index+1})});const y={id:_.UUID.uuid(),version:1,type:n.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=g(y,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject()}),this.inputs.sort((p,y)=>p.index-y.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),i.push(...l),{updated:E(e),added:E(t),removed:E(i),self:this}}};c(ve,"MUTABLE_BASE_PROPERTIES",["operator"]),c(ve,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(ve,"BASE_PROPERTIES",[...ve.MUTABLE_BASE_PROPERTIES,...ve.INMUTABLE_BASE_PROPERTIES]),c(ve,"MUTABLE_META_PROPERTIES",["x","y"]),c(ve,"INMUTABLE_META_PROPERTIES",[...ve.INMUTABLE_BASE_PROPERTIES]),c(ve,"META_PROPERTIES",[...ve.MUTABLE_META_PROPERTIES,...ve.INMUTABLE_META_PROPERTIES]),c(ve,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(ve,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(ve,"UPSTREAM_PROPERTIES",[...ve.MUTABLE_UPSTREAM_PROPERTIES,...ve.INMUTABLE_UPSTREAM_PROPERTIES]),c(ve,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),c(ve,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ve,"DOWNSTREAM_PROPERTIES",[...ve.MUTABLE_DOWNSTREAM_PROPERTIES,...ve.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ve,"PROPERTIES",[...ve.META_PROPERTIES,...ve.UPSTREAM_PROPERTIES,...ve.DOWNSTREAM_PROPERTIES]);let Mr=ve;class vP{constructor(){c(this,"initialData")}}class s2{}class o2 extends vP{}class l2{}class c2{}class d2{}class gu{}class u2 extends gu{}class p2 extends gu{}class y2{}class xa{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==n.GenericReference)e.readsValue=g(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===n.GenericReference){const t=Mt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;dt.includes(t.type)||(t=t.parent);const i=e.type===n.InputMap&&e.parent.type===n.Loop;i&&(t=e.parent.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),!i&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):i||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class ja{static initWritesValues(e,t){const i=e.initialData.writesValues.reduce((s,o)=>{if(o.type===n.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const l=g(o,e.project);return l.setValueWriter(e),Fe.includes(l.type)&&(l.setParent(t),l.initChildren()),[...s,l]},[]),a=[...e.writesValues];return e.writesValues=E([...a,...i]),e.writesValues}}class h2{}function f2(r){var l;const e=z6(),t=r.toJSON();e.safeParse(t).success,(l=r.dataType)==null||l.validate(),r.inputs.forEach(p=>p.validate()),r.outputs.forEach(p=>p.validate()),r.internalCalls.forEach(p=>p.validate());const s=[...wn(r)];if(r.id==="random-company-employee-test-variable-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}if(r.id==="company-dto-variable-one-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}const o=wu(r);return s.push(...o),ie(r.errors,s)}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,"dataType",null);c(this,"x");c(this,"y");c(this,"type",n.VariableDeclaration);c(this,"writesValues",[]);c(this,"readsValue",null);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"internalCalls",[]);c(this,"parent");c(this,"variableInstances",[]);c(this,"errors",[]);c(this,"project");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.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let i=t;if(e.parent){const h=N(e.parent);i=t.get(h)}const a=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),s=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),o=e.calledByError.map(h=>{const m=N(h);return t.get(m)});let l=null;if(e.readsValue){const h=N(e.readsValue);l=t.get(h)}const p={id:e.id,version:1,type:n.VariableDeclaration,name:e.name,description:e.description,calledByEntry:a,calledBySuccess:s,calledByError:o,dataType:null,errorCalls:[],successCalls:[],internalCalls:[],readsValue:l,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},y=g(p,t);return y.setParent(i),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...dt,n.Project],optional:!0}},t);i=s.modifiedData;const o=mu(i,t);return a.push(...s.errors,...o,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=qa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
57
|
+
If an entity is called by another, they must be in the same scope, which means they have the same parent.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addCondition(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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}removeOutput(e){return 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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.syncMissingFixedInputs(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:this.declaration.toJSON(),successCalls:this.successCalls.map(e=>e.toJSON()),errorCalls:this.errorCalls.map(e=>e.toJSON()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),inputs:this.inputs.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:this.declaration.toReference(),inputs:this.inputs.map(e=>e.toReference()),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.calledBy.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,type:this.type,declaration:this.declaration.id,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.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.successCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.successCalls.forEach(e=>e.clearErrors()),this.errorCalls.forEach(e=>e.clearErrors()),this}validate(){const e=a2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors())]}getShallowErrors(){return this.errors}clone(e){return new ve(this.toJSON(),this.project)}removeUnrecognizedInputs(){const e=[],t=[],i=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedInputs(){const e=[],t=[],i=[],a=this.declaration.inputs.filter(p=>p.parentRelationType===O.FixedArguments&&!this.inputs.find(y=>y.declaration.id===p.id));this.inputs.sort((p,y)=>p.index-y.index),a.forEach(p=>{this.inputs.forEach(m=>{m.index>=p.index&&m.sync({index:m.index+1})});const y={id:_.UUID.uuid(),version:1,type:n.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=g(y,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject()}),this.inputs.sort((p,y)=>p.index-y.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),i.push(...l),{updated:E(e),added:E(t),removed:E(i),self:this}}};c(ve,"MUTABLE_BASE_PROPERTIES",["operator"]),c(ve,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(ve,"BASE_PROPERTIES",[...ve.MUTABLE_BASE_PROPERTIES,...ve.INMUTABLE_BASE_PROPERTIES]),c(ve,"MUTABLE_META_PROPERTIES",["x","y"]),c(ve,"INMUTABLE_META_PROPERTIES",[...ve.INMUTABLE_BASE_PROPERTIES]),c(ve,"META_PROPERTIES",[...ve.MUTABLE_META_PROPERTIES,...ve.INMUTABLE_META_PROPERTIES]),c(ve,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(ve,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(ve,"UPSTREAM_PROPERTIES",[...ve.MUTABLE_UPSTREAM_PROPERTIES,...ve.INMUTABLE_UPSTREAM_PROPERTIES]),c(ve,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),c(ve,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ve,"DOWNSTREAM_PROPERTIES",[...ve.MUTABLE_DOWNSTREAM_PROPERTIES,...ve.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ve,"PROPERTIES",[...ve.META_PROPERTIES,...ve.UPSTREAM_PROPERTIES,...ve.DOWNSTREAM_PROPERTIES]);let Mr=ve;class gP{constructor(){c(this,"initialData")}}class s2{}class o2 extends gP{}class l2{}class c2{}class d2{}class gu{}class u2 extends gu{}class p2 extends gu{}class y2{}class xa{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==n.GenericReference)e.readsValue=g(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===n.GenericReference){const t=Mt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Fe.includes(e.readsValue.type)){let t=e.parent;ut.includes(t.type)||(t=t.parent);const i=e.type===n.InputMap&&e.parent.type===n.Loop;i&&(t=e.parent.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),!i&&t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):i||t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class ja{static initWritesValues(e,t){const i=e.initialData.writesValues.reduce((s,o)=>{if(o.type===n.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const l=g(o,e.project);return l.setValueWriter(e),Fe.includes(l.type)&&(l.setParent(t),l.initChildren()),[...s,l]},[]),a=[...e.writesValues];return e.writesValues=E([...a,...i]),e.writesValues}}class h2{}function f2(r){var l;const e=z6(),t=r.toJSON();e.safeParse(t).success,(l=r.dataType)==null||l.validate(),r.inputs.forEach(p=>p.validate()),r.outputs.forEach(p=>p.validate()),r.internalCalls.forEach(p=>p.validate());const s=[...wn(r)];if(r.id==="random-company-employee-test-variable-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}if(r.id==="company-dto-variable-one-id"){const p=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}const o=wu(r);return s.push(...o),ie(r.errors,s)}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,"dataType",null);c(this,"x");c(this,"y");c(this,"type",n.VariableDeclaration);c(this,"writesValues",[]);c(this,"readsValue",null);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"internalCalls",[]);c(this,"parent");c(this,"variableInstances",[]);c(this,"errors",[]);c(this,"project");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.x=e.x,this.y=e.y}static fromGenerationTarget(e,t){let i=t;if(e.parent){const h=N(e.parent);i=t.get(h)}const a=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),s=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),o=e.calledByError.map(h=>{const m=N(h);return t.get(m)});let l=null;if(e.readsValue){const h=N(e.readsValue);l=t.get(h)}const p={id:e.id,version:1,type:n.VariableDeclaration,name:e.name,description:e.description,calledByEntry:a,calledBySuccess:s,calledByError:o,dataType:null,errorCalls:[],successCalls:[],internalCalls:[],readsValue:l,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},y=g(p,t);return y.setParent(i),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);i=s.modifiedData;const o=mu(i,t);return a.push(...s.errors,...o,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=qa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
58
58
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
59
59
|
Specifically for variables, their scope is also calculated from their value readers and value writters.
|
|
60
|
-
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its value readers, value writters, or callers.`,issue:null})),{errors:t,modifiedData:i}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addVariableDeclaration(this),this.readsValue&&(this.readsValue.addValueReader(this),e.push(this.readsValue)),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),this.successCalls.forEach(a=>{a.addSuccessCaller(this),e.push(a)}),this.errorCalls.forEach(a=>{a.addErrorCaller(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.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.defaultValue)}get usedOutputs(){return this.outputs.filter(e=>e.writesValues.length)}get unusedOutputs(){return this.outputs.filter(e=>!e.writesValues.length)}get usedInternalCalls(){return this.internalCalls.filter(e=>!!e.calledBy.length)}get unusedInternalCalls(){return this.internalCalls.filter(e=>!e.calledBy.length)}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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}addValueReader(e){return this.writesValues.includes(e)?this:(this.writesValues.push(e),this)}removeValueReader(e){return this.writesValues=this.writesValues.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),ja.initWritesValues(this,this.parent),xa.initReadsValue(this),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.initialData.inputs.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addInput(t),t}),this.initialData.outputs.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addOutput(t),t}),this.initialData.internalCalls.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addInternalCall(t),t}),this.generateUnusedInputs(),this.generateUnusedOutputs(),this.generateUnusedInternalCalls(),(!this.dataType||this.dataType.inferred)&&this.inferDataTypeAndSyncInstancesInputsAndOutputs(),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}subscribeInstance(e){return this.variableInstances.includes(e)?this:(this.variableInstances.push(e),this)}removeInstance(e){return this.variableInstances=this.variableInstances.filter(t=>t.id!==e.id),this}getMasterInputWithValueWritterFromAllInstances(e){return E([...this.inputs,...this.variableInstances.flatMap(a=>a.inputs)]).find(a=>C(a,this.project)===C(e,this.project)&&!!a.readsValue)||e}inferDataTypeAndSyncInstancesInputsAndOutputs(){var i,a;if(!this.dataType){const s=g({id:this.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:this.toReference()},this.project);s.sync({inferred:!0,like:!0}),s.setParent(this),s.initChildren(),this.setDataType(s)}if(this.readsValue){const s=(i=this.readsValue.getDataType())==null?void 0:i.clone(this);return s&&(s.sync({inferred:!0,like:!0}),this.setDataType(s)),this}const e=E([...this.inputs,...this.variableInstances.flatMap(s=>s.inputs)]),t=[];return e.forEach(s=>{t.find(l=>C(l,this.project)===C(s,this.project))||t.push(s)}),t.length?((a=this.dataType)==null||a.inferFromInputs(t),this.dataType?(this.generateUnusedInputs(),this.generateUnusedOutputs(),this.variableInstances.forEach(s=>{s.generateUnusedInputs(),s.generateUnusedOutputs()}),this):this):this}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(){return this}async create(){return this}async update(e){return this.sync(e),Ya(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.readsValue&&(i.push(this.readsValue),this.readsValue.removeValueReader(this)),this.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.internalCalls.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){this.subscribe();const t=[];if(this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.internalCalls.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.dataType)==null?void 0:i.toFlat(e))||[],...this.writesValues.flatMap(a=>a.toFlat(e)),...this.successCalls.flatMap(a=>a.toFlat(e)),...this.errorCalls.flatMap(a=>a.toFlat(e)),...this.inputs.flatMap(a=>a.toFlat(e)),...this.outputs.flatMap(a=>a.toFlat(e)),...this.internalCalls.flatMap(a=>a.toFlat(e))])}toFlatIds(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[],...this.writesValues.flatMap(a=>a.toFlatIds(e)),...this.successCalls.flatMap(a=>a.toFlatIds(e)),...this.errorCalls.flatMap(a=>a.toFlatIds(e)),...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.outputs.flatMap(a=>a.toFlatIds(e)),...this.internalCalls.flatMap(a=>a.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,writesValues:this.writesValues.map(i=>i.toJSON()),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),internalCalls:this.internalCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),parent:this.parent.toReference(),x:this.x,y:this.y}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,writesValues:this.writesValues.map(i=>i.toReference()),inputs:this.inputs.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toReference()),successCalls:this.successCalls.map(i=>i.toReference()),errorCalls:this.errorCalls.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),internalCalls:this.internalCalls.map(i=>i.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.dataType)==null?void 0:i.toFlatJSON(e))||[],...this.writesValues.flatMap(a=>a.toFlatJSON(e)),...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.internalCalls.flatMap(a=>a.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,type:this.type,name:this.name,description:this.description,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){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.dataType)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.writesValues.flatMap(a=>a.toFlatGenerationTarget(e)),...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.internalCalls.flatMap(a=>a.toFlatGenerationTarget(e))])}clearErrors(){var e;return this.errors=[],this.inputs.forEach(t=>t.clearErrors()),this.outputs.forEach(t=>t.clearErrors()),this.successCalls.forEach(t=>t.clearErrors()),this.errorCalls.forEach(t=>t.clearErrors()),this.internalCalls.forEach(t=>t.clearErrors()),(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=f2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t,i;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[],...this.inputs.flatMap(a=>a.getErrors()),...this.internalCalls.flatMap(a=>a.getErrors()),...this.outputs.flatMap(a=>a.getErrors()),...((i=this.readsValue)==null?void 0:i.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e){return new pe(this.toJSON(),this.project)}addInternalCall(e){return this.internalCalls.find(t=>t===e)||this.internalCalls.push(e),this}createInstance(e=this.project,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.VariableInstance,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],writesValues:t.writesValues||[],internalCalls:t.internalCalls||[],readsValue:t.readsValue||null,calledByEntry:t.calledByEntry||[],calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],declaration:this.toJSON(),x:0,y:0},a=g(i,this.project);return a.setParent(e),a.initChildren(),e===this.project&&this.project.addVariableInstance(a),a}generateUnusedInputs(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type)){const e=[...this.dataType.entity.properties];e.filter(s=>!s.getDataType()).forEach(s=>{const o=this.inputs.find(y=>C(y,this.project)===C(s,this.project));if(!o)return;const l=this.getMasterInputWithValueWritterFromAllInstances(o);if(!l)return;const p=dn(l);s.setDataType(p),o.setDeclaration(s)}),e.filter(s=>!this.inputs.find(o=>{var l;return((l=o.declaration)==null?void 0:l.id)===s.id})).forEach(s=>{const o={id:_.UUID.uuid(),version:1,type:n.InputMap,parent:this.toReference(),name:null,description:null,declaration:s,defaultValue:null,index:s.index,readsValue:null},l=g(o,this.project);return l.setParent(this),l.initChildren(),l.suggestion=!0,this.addInput(l),l}),this.inputs.filter(s=>!s.declaration).forEach(s=>{const o=e.find(l=>C(l,this.project)===C(s,this.project));o&&s.setDeclaration(o)})}}else return[];else return[];return[]}generateUnusedOutputs(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:_.UUID.uuid(),version:1,type:n.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=g(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,this.addOutput(s),s})}else return[];else return[];return[]}generateUnusedInternalCalls(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var l,p,y,h,m;return(((l=s.declaration)==null?void 0:l.id)||((y=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:y.entityId)||((m=(h=s.initialData)==null?void 0:h.declaration)==null?void 0:m.id))===i.id})).map(i=>{const a=i.createInternalCall(this);return a.suggestion=!0,this.addInternalCall(a),a})}else return[];else return[];return[]}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return(!this.dataType||this.dataType.inferred)&&this.inferDataTypeAndSyncInstancesInputsAndOutputs(),this.dataType||null}getUnusedInputs(){return this.inputs.filter(e=>e.suggestion||!e.readsValue&&!e.defaultValue)}getUnusedOutputs(){return this.outputs.filter(e=>e.suggestion||!e.writesValues.length)}getUsedInputs(){return this.inputs.filter(e=>!e.suggestion&&(e.readsValue||e.defaultValue))}getUsedOutputs(){return this.outputs.filter(e=>!e.suggestion&&e.writesValues.length)}};c(pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(pe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_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",["calledBySuccess","calledByError","calledByEntry","readsValue"]),c(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),c(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),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 Vr=pe;function m2(r){const e=e3(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(l=>l.validate()),r.outputs.forEach(l=>l.validate()),r.internalCalls.forEach(l=>l.validate());const s=[...wn(r)];if(r.id==="exec-sequentially-result-variable-id"){const l=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}const o=wu(r);return s.push(...o),ie(r.errors,s)}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",n.VariableInstance);c(this,"writesValues",[]);c(this,"readsValue",null);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"internalCalls",[]);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){let i=t;if(e.parent){const R=N(e.parent);i=t.get(R)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(R=>{const v=N(R);return t.get(v)}),l=e.calledBySuccess.map(R=>{const v=N(R);return t.get(v)}),p=e.calledByError.map(R=>{const v=N(R);return t.get(v)});let y=null;if(e.readsValue){const R=N(e.readsValue);y=t.get(R)}const h={id:e.id,version:1,type:n.VariableInstance,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],internalCalls:[],readsValue:y,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},m=g(h,t);return m.setParent(i),m.initChildren(),m}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...dt,n.Project],optional:!0},declaration:{list:!1,types:[n.VariableDeclaration]}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=qa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
60
|
+
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its value readers, value writters, or callers.`,issue:null})),{errors:t,modifiedData:i}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addVariableDeclaration(this),this.readsValue&&(this.readsValue.addValueReader(this),e.push(this.readsValue)),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),this.successCalls.forEach(a=>{a.addSuccessCaller(this),e.push(a)}),this.errorCalls.forEach(a=>{a.addErrorCaller(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.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.defaultValue)}get usedOutputs(){return this.outputs.filter(e=>e.writesValues.length)}get unusedOutputs(){return this.outputs.filter(e=>!e.writesValues.length)}get usedInternalCalls(){return this.internalCalls.filter(e=>!!e.calledBy.length)}get unusedInternalCalls(){return this.internalCalls.filter(e=>!e.calledBy.length)}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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}addValueReader(e){return this.writesValues.includes(e)?this:(this.writesValues.push(e),this)}removeValueReader(e){return this.writesValues=this.writesValues.filter(t=>t.id!==e.id),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),ja.initWritesValues(this,this.parent),xa.initReadsValue(this),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.initialData.inputs.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addInput(t),t}),this.initialData.outputs.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addOutput(t),t}),this.initialData.internalCalls.forEach(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),this.addInternalCall(t),t}),this.generateUnusedInputs(),this.generateUnusedOutputs(),this.generateUnusedInternalCalls(),(!this.dataType||this.dataType.inferred)&&this.inferDataTypeAndSyncInstancesInputsAndOutputs(),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}subscribeInstance(e){return this.variableInstances.includes(e)?this:(this.variableInstances.push(e),this)}removeInstance(e){return this.variableInstances=this.variableInstances.filter(t=>t.id!==e.id),this}getMasterInputWithValueWritterFromAllInstances(e){return E([...this.inputs,...this.variableInstances.flatMap(a=>a.inputs)]).find(a=>C(a,this.project)===C(e,this.project)&&!!a.readsValue)||e}inferDataTypeAndSyncInstancesInputsAndOutputs(){var i,a;if(!this.dataType){const s=g({id:this.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:this.toReference()},this.project);s.sync({inferred:!0,like:!0}),s.setParent(this),s.initChildren(),this.setDataType(s)}if(this.readsValue){const s=(i=this.readsValue.getDataType())==null?void 0:i.clone(this);return s&&(s.sync({inferred:!0,like:!0}),this.setDataType(s)),this}const e=E([...this.inputs,...this.variableInstances.flatMap(s=>s.inputs)]),t=[];return e.forEach(s=>{t.find(l=>C(l,this.project)===C(s,this.project))||t.push(s)}),t.length?((a=this.dataType)==null||a.inferFromInputs(t),this.dataType?(this.generateUnusedInputs(),this.generateUnusedOutputs(),this.variableInstances.forEach(s=>{s.generateUnusedInputs(),s.generateUnusedOutputs()}),this):this):this}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(){return this}async create(){return this}async update(e){return this.sync(e),Ya(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.readsValue&&(i.push(this.readsValue),this.readsValue.removeValueReader(this)),this.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.internalCalls.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(a)}}restore({seenEntities:e}={seenEntities:new Set}){this.subscribe();const t=[];if(this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.internalCalls.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.dataType)==null?void 0:i.toFlat(e))||[],...this.writesValues.flatMap(a=>a.toFlat(e)),...this.successCalls.flatMap(a=>a.toFlat(e)),...this.errorCalls.flatMap(a=>a.toFlat(e)),...this.inputs.flatMap(a=>a.toFlat(e)),...this.outputs.flatMap(a=>a.toFlat(e)),...this.internalCalls.flatMap(a=>a.toFlat(e))])}toFlatIds(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[],...this.writesValues.flatMap(a=>a.toFlatIds(e)),...this.successCalls.flatMap(a=>a.toFlatIds(e)),...this.errorCalls.flatMap(a=>a.toFlatIds(e)),...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.outputs.flatMap(a=>a.toFlatIds(e)),...this.internalCalls.flatMap(a=>a.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,writesValues:this.writesValues.map(i=>i.toJSON()),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),internalCalls:this.internalCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),parent:this.parent.toReference(),x:this.x,y:this.y}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,writesValues:this.writesValues.map(i=>i.toReference()),inputs:this.inputs.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toReference()),successCalls:this.successCalls.map(i=>i.toReference()),errorCalls:this.errorCalls.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),internalCalls:this.internalCalls.map(i=>i.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.dataType)==null?void 0:i.toFlatJSON(e))||[],...this.writesValues.flatMap(a=>a.toFlatJSON(e)),...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.internalCalls.flatMap(a=>a.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,type:this.type,name:this.name,description:this.description,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){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.dataType)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.writesValues.flatMap(a=>a.toFlatGenerationTarget(e)),...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.internalCalls.flatMap(a=>a.toFlatGenerationTarget(e))])}clearErrors(){var e;return this.errors=[],this.inputs.forEach(t=>t.clearErrors()),this.outputs.forEach(t=>t.clearErrors()),this.successCalls.forEach(t=>t.clearErrors()),this.errorCalls.forEach(t=>t.clearErrors()),this.internalCalls.forEach(t=>t.clearErrors()),(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=f2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t,i;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[],...this.inputs.flatMap(a=>a.getErrors()),...this.internalCalls.flatMap(a=>a.getErrors()),...this.outputs.flatMap(a=>a.getErrors()),...((i=this.readsValue)==null?void 0:i.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e){return new pe(this.toJSON(),this.project)}addInternalCall(e){return this.internalCalls.find(t=>t===e)||this.internalCalls.push(e),this}createInstance(e=this.project,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.VariableInstance,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],writesValues:t.writesValues||[],internalCalls:t.internalCalls||[],readsValue:t.readsValue||null,calledByEntry:t.calledByEntry||[],calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],declaration:this.toJSON(),x:0,y:0},a=g(i,this.project);return a.setParent(e),a.initChildren(),e===this.project&&this.project.addVariableInstance(a),a}generateUnusedInputs(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type)){const e=[...this.dataType.entity.properties];e.filter(s=>!s.getDataType()).forEach(s=>{const o=this.inputs.find(y=>C(y,this.project)===C(s,this.project));if(!o)return;const l=this.getMasterInputWithValueWritterFromAllInstances(o);if(!l)return;const p=dn(l);s.setDataType(p),o.setDeclaration(s)}),e.filter(s=>!this.inputs.find(o=>{var l;return((l=o.declaration)==null?void 0:l.id)===s.id})).forEach(s=>{const o={id:_.UUID.uuid(),version:1,type:n.InputMap,parent:this.toReference(),name:null,description:null,declaration:s,defaultValue:null,index:s.index,readsValue:null},l=g(o,this.project);return l.setParent(this),l.initChildren(),l.suggestion=!0,this.addInput(l),l}),this.inputs.filter(s=>!s.declaration).forEach(s=>{const o=e.find(l=>C(l,this.project)===C(s,this.project));o&&s.setDeclaration(o)})}}else return[];else return[];return[]}generateUnusedOutputs(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:_.UUID.uuid(),version:1,type:n.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=g(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,this.addOutput(s),s})}else return[];else return[];return[]}generateUnusedInternalCalls(){if(this.dataType)if(this.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var l,p,y,h,m;return(((l=s.declaration)==null?void 0:l.id)||((y=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:y.entityId)||((m=(h=s.initialData)==null?void 0:h.declaration)==null?void 0:m.id))===i.id})).map(i=>{const a=i.createInternalCall(this);return a.suggestion=!0,this.addInternalCall(a),a})}else return[];else return[];return[]}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return(!this.dataType||this.dataType.inferred)&&this.inferDataTypeAndSyncInstancesInputsAndOutputs(),this.dataType||null}getUnusedInputs(){return this.inputs.filter(e=>e.suggestion||!e.readsValue&&!e.defaultValue)}getUnusedOutputs(){return this.outputs.filter(e=>e.suggestion||!e.writesValues.length)}getUsedInputs(){return this.inputs.filter(e=>!e.suggestion&&(e.readsValue||e.defaultValue))}getUsedOutputs(){return this.outputs.filter(e=>!e.suggestion&&e.writesValues.length)}};c(pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(pe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),c(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_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",["calledBySuccess","calledByError","calledByEntry","readsValue"]),c(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),c(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),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 Vr=pe;function m2(r){const e=e3(),t=r.toJSON();e.safeParse(t).success,r.inputs.forEach(l=>l.validate()),r.outputs.forEach(l=>l.validate()),r.internalCalls.forEach(l=>l.validate());const s=[...wn(r)];if(r.id==="exec-sequentially-result-variable-id"){const l=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}const o=wu(r);return s.push(...o),ie(r.errors,s)}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",n.VariableInstance);c(this,"writesValues",[]);c(this,"readsValue",null);c(this,"declaration");c(this,"inputs",[]);c(this,"outputs",[]);c(this,"calledBySuccess",[]);c(this,"calledByError",[]);c(this,"calledByEntry",[]);c(this,"successCalls",[]);c(this,"errorCalls",[]);c(this,"internalCalls",[]);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){let i=t;if(e.parent){const R=N(e.parent);i=t.get(R)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(R=>{const v=N(R);return t.get(v)}),l=e.calledBySuccess.map(R=>{const v=N(R);return t.get(v)}),p=e.calledByError.map(R=>{const v=N(R);return t.get(v)});let y=null;if(e.readsValue){const R=N(e.readsValue);y=t.get(R)}const h={id:e.id,version:1,type:n.VariableInstance,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],internalCalls:[],readsValue:y,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},m=g(h,t);return m.setParent(i),m.initChildren(),m}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0},declaration:{list:!1,types:[n.VariableDeclaration]}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=qa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
61
61
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
62
62
|
Specifically for variables, their scope is also calculated from their value readers and value writters.
|
|
63
63
|
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its value readers, value writters, or callers.`,issue:null})),{errors:t,modifiedData:i}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project&&this.project.addVariableInstance(this),this.readsValue&&(this.readsValue.addValueReader(this),e.push(this.readsValue)),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),this.successCalls.forEach(a=>{a.addSuccessCaller(this),e.push(a)}),this.errorCalls.forEach(a=>{a.addErrorCaller(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.calledByEntry.forEach(a=>{a.addCall(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.defaultValue)}get usedOutputs(){return this.outputs.filter(e=>e.writesValues.length)}get unusedOutputs(){return this.outputs.filter(e=>!e.writesValues.length)}get usedInternalCalls(){return this.internalCalls.filter(e=>!!e.calledBy.length)}get unusedInternalCalls(){const e=this.usedInternalCalls;return this.internalCalls.filter(i=>!(e.find(o=>o.id===i.id)||e.find(o=>o.declaration===i.declaration)))}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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}addValueReader(e){return this.writesValues.includes(e)?this:(this.writesValues.push(e),this)}setParent(e){return this.parent=e,this}initChildren(){var e;if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===n.GenericReference){const t=this.project.findSubscribedInstanceFromReference(this.initialData.declaration);if(!t)return this;this.declaration=t}else this.declaration=g(this.initialData.declaration,this.project),this.declaration.setParent(this.parent),this.declaration.initChildren();return ja.initWritesValues(this,this.parent),xa.initReadsValue(this),this.initialData.inputs.forEach(t=>{const i=g(t,this.project);return i.setParent(this),i.initChildren(),this.addInput(i),i}),this.initialData.outputs.forEach(t=>{const i=g(t,this.project);return i.setParent(this),i.initChildren(),this.addOutput(i),i}),this.successCalls=this.initialData.successCalls.map(t=>{const i=g(t,this.project);return i.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(i.type)?(i.setParent(this.parent.parent),i.initChildren()):i.type!==n.InternalCall&&(i.setParent(this.parent),i.initChildren()),i}),this.errorCalls=this.initialData.errorCalls.map(t=>{const i=g(t,this.project);return i.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(i.type)?(i.setParent(this.parent.parent),i.initChildren()):i.type!==n.InternalCall&&(i.setParent(this.parent),i.initChildren()),i}),this.internalCalls=this.initialData.internalCalls.reduce((t,i)=>{if(i.type===n.GenericReference){const a=this.project.findSubscribedInstanceFromReference(i);if(!a)return t;const s=a;return s.setParent(this),[...t,s]}else{const a=g(i,this.project);return a.setParent(this),a.initChildren(),[...t,a]}},[]),this.generateUnusedInputs(),this.generateUnusedOutputs(),this.generateUnusedInternalCalls(),this.declaration.subscribeInstance(this),(!this.declaration.dataType||(e=this.declaration.dataType)!=null&&e.inferred)&&this.declaration.inferDataTypeAndSyncInstancesInputsAndOutputs(),this}setValueWriter(e){return this.readsValue=e,this}removeValueWriter(){return this.readsValue=null,this}removeValueReader(e){return this.writesValues=this.writesValues.filter(t=>t.id!==e.id),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(){return this}async create(){return this}async update(e){return this.sync(e),Ya(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.readsValue&&(i.push(this.readsValue),this.readsValue.removeValueReader(this)),this.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),this.inputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.internalCalls.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),this.declaration.removeInstance(this),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){this.subscribe();const t=[];return this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.internalCalls.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),this.declaration.subscribeInstance(this),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.writesValues.flatMap(i=>i.toFlat(e)),...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.internalCalls.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.writesValues.flatMap(i=>i.toFlatIds(e)),...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.internalCalls.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e;return{id:this.id,version:this.version,type:this.type,declaration:this.declaration.toReference(),readsValue:((e=this.readsValue)==null?void 0:e.toReference())||null,writesValues:this.writesValues.map(t=>t.toJSON()),inputs:this.inputs.map(t=>t.toJSON()),outputs:this.outputs.map(t=>t.toJSON()),successCalls:this.successCalls.map(t=>t.toJSON()),errorCalls:this.errorCalls.map(t=>t.toJSON()),internalCalls:this.internalCalls.map(t=>t.toJSON()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),parent:this.parent.toReference(),x:this.x,y:this.y}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:((e=this.declaration)==null?void 0:e.toReference())||null,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,writesValues:this.writesValues.map(i=>i.toReference()),inputs:this.inputs.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toReference()),successCalls:this.successCalls.map(i=>i.toReference()),errorCalls:this.errorCalls.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),internalCalls:this.internalCalls.map(i=>i.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.declaration)==null?void 0:i.toFlatJSON(e))||[],...this.writesValues.flatMap(a=>a.toFlatJSON(e)),...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.internalCalls.flatMap(a=>a.toFlatJSON(e)),...this.calledBy.flatMap(a=>a.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.Project?void 0:this.parent.id;return{id:this.id,type:this.type,declaration:this.declaration.id,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){var i,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.declaration)==null?void 0:i.toFlatGenerationTarget(e))||[],...((a=this.readsValue)==null?void 0:a.toFlatGenerationTarget(e))||[],...this.writesValues.flatMap(s=>s.toFlatGenerationTarget(e)),...this.successCalls.flatMap(s=>s.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(s=>s.toFlatGenerationTarget(e)),...this.inputs.flatMap(s=>s.toFlatGenerationTarget(e)),...this.outputs.flatMap(s=>s.toFlatGenerationTarget(e)),...this.internalCalls.flatMap(s=>s.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.outputs.forEach(e=>e.clearErrors()),this.successCalls.forEach(e=>e.clearErrors()),this.errorCalls.forEach(e=>e.clearErrors()),this.internalCalls.forEach(e=>e.clearErrors()),this}validate(){const e=m2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...this.internalCalls.flatMap(i=>i.getErrors()),...this.outputs.flatMap(i=>i.getErrors()),...((t=this.readsValue)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e,t;return((t=(e=this.declaration)==null?void 0:e.dataType)==null?void 0:t.defaultValue)||null}clone(e){return new ye(this.toJSON(),this.project)}addInternalCall(e){return this.internalCalls.find(t=>t===e)||this.internalCalls.push(e),this}setDeclaration(e){return this.declaration!==e&&(this.declaration=e),this}generateUnusedInputs(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type)){const e=[...this.declaration.dataType.entity.properties];e.filter(s=>!s.getDataType()).forEach(s=>{const o=this.inputs.find(y=>C(y,this.project)===C(s,this.project));if(!o)return;const l=this.declaration.getMasterInputWithValueWritterFromAllInstances(o);if(!l)return;const p=dn(l);s.setDataType(p),o.setDeclaration(s)}),e.filter(s=>!this.inputs.find(o=>{var l;return((l=o.declaration)==null?void 0:l.id)===s.id})).forEach(s=>{const o={id:_.UUID.uuid(),version:1,type:n.InputMap,parent:this.toReference(),name:null,description:null,declaration:s,defaultValue:null,index:s.index,readsValue:null},l=g(o,this.project);return l.setParent(this),l.initChildren(),l.suggestion=!0,this.addInput(l),l}),this.inputs.filter(s=>!s.declaration).forEach(s=>{const o=e.find(l=>C(l,this.project)===C(s,this.project));o&&s.setDeclaration(o)})}}else return[];else return[];return[]}generateUnusedOutputs(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.properties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:_.UUID.uuid(),version:1,type:n.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=g(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,this.addOutput(s),s})}else return[];else return[];return[]}generateUnusedInternalCalls(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([n.CustomEntity,n.PrimitiveEntity,n.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var l,p,y,h,m;return(((l=s.declaration)==null?void 0:l.id)||((y=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:y.entityId)||((m=(h=s.initialData)==null?void 0:h.declaration)==null?void 0:m.id))===i.id})).map(i=>{const a=i.createInternalCall(this);return a.suggestion=!0,this.addInternalCall(a),a})}else return[];else return[];return[]}getDataType(){var e;return((e=this.declaration)==null?void 0:e.getDataType())||null}getUnusedInputs(){return this.inputs.filter(e=>e.suggestion||!e.readsValue&&!e.defaultValue)}getUnusedOutputs(){return this.outputs.filter(e=>e.suggestion||!e.writesValues.length)}getUsedInputs(){return this.inputs.filter(e=>!e.suggestion&&(e.readsValue||e.defaultValue))}getUsedOutputs(){return this.outputs.filter(e=>!e.suggestion&&e.writesValues.length)}};c(ye,"MUTABLE_BASE_PROPERTIES",[]),c(ye,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(ye,"BASE_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,...ye.INMUTABLE_BASE_PROPERTIES]),c(ye,"MUTABLE_META_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,"x","y"]),c(ye,"INMUTABLE_META_PROPERTIES",[...ye.INMUTABLE_BASE_PROPERTIES]),c(ye,"META_PROPERTIES",[...ye.MUTABLE_META_PROPERTIES,...ye.INMUTABLE_META_PROPERTIES]),c(ye,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),c(ye,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),c(ye,"UPSTREAM_PROPERTIES",[...ye.MUTABLE_UPSTREAM_PROPERTIES,...ye.INMUTABLE_UPSTREAM_PROPERTIES]),c(ye,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),c(ye,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(ye,"DOWNSTREAM_PROPERTIES",[...ye.MUTABLE_DOWNSTREAM_PROPERTIES,...ye.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(ye,"PROPERTIES",[...ye.META_PROPERTIES,...ye.UPSTREAM_PROPERTIES,...ye.DOWNSTREAM_PROPERTIES]);let Lr=ye;function T2(r){var s;const e=W9(),t=r.toJSON();e.safeParse(t).success,(s=r.dataType)==null||s.validate();const a=[];if(r.id==="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id"){const o=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});a.push(o.error)}return ie(r.errors,a)}const Ie=class Ie{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"index");c(this,"required");c(this,"isError");c(this,"type",n.ReturnDeclaration);c(this,"dataType",null);c(this,"readsValue",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.index=e.index,this.name=e.name,this.description=e.description,this.required=e.required,this.isError=e.isError}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;if(e.readsValue){const p=N(e.readsValue);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:n.ReturnDeclaration,index:a.outputs.length,isError:!1,description:e.description,implements:null,required:e.required,readsValue:s,dataType:null,parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var l,p;let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[n.ReturnStatement,n.Search,n.BreakStatement,n.ContinueStatement]}},t),o=bu(i,t);if(i=s.modifiedData,i.parent){const y=t.get(N(i.parent));if(y&&[n.BreakStatement,n.ContinueStatement].includes(y.type)){const h=y,m=h.parent,R=[...m.breakStatements.filter(P=>P.id!==y.id),...m.continueStatements.filter(P=>P.id!==y.id)];if(h.outputs.length)a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.ReturnDeclaration}' with id '${i.id}' cannot be added to the parent entity of type '${h.type}' with id '${h.id}'. This '${h.type}' already has return declarations.
|
|
@@ -69,10 +69,10 @@ ${F}`,issue:null})):a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSigna
|
|
|
69
69
|
Adding a new return would make the implementation invalid. There are no returns in the descriptor with the same name.
|
|
70
70
|
${D}
|
|
71
71
|
${F}`,issue:null}))}}}}return a.push(...s.errors,...o,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=qa(i,this);return i=a.modifiedData,t.push(...a.errors),i.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
72
|
-
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:i}}addSelfToProject(){var a;const e=[this],t=[],i=[];if(this.parent.addOutputDeclaration(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),this.parent&&[n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const s=this.parent.parent,{updated:o,added:l,removed:p}=s.syncChildren();e.push(...o),t.push(...l),i.push(...p)}return{updated:E(e),added:E(t),removed:E(i),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.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this.initialData.implements){const e=g(this.initialData.implements,this.project);this.implements=e}return xa.initReadsValue(this),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}async load(){return this}async create(){return this}async update(e){return this.sync(e),Ya(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const s=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}return{affected:E(i),removed:E(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.dataType){const i=this.dataType.restore({seenEntities:e});t.push(...i.affected)}return{affected:[],self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.dataType)==null?void 0:i.toFlat(e))||[]])}toFlatIds(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[]])}toJSON(){var e,t,i;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,readsValue:((i=this.readsValue)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,readsValue:((e=this.readsValue)==null?void 0:e.toReference())||null,implements:((t=this.implements)==null?void 0:t.toReference())||null,dataType:((i=this.dataType)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.dataType)==null?void 0:i.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 i,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.readsValue)==null?void 0:i.toFlatGenerationTarget(e))||[],...((a=this.dataType)==null?void 0:a.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=T2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e=null,t=null,i=!0){var h;const a=this.toJSON(),s=t||ze(C(this,this.project),n.ReturnDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e?p.setParent(e):p.setParent(this.parent),i&&p.subscribe(),p.initChildren();const y=(h=this.dataType)==null?void 0:h.clone(p,l+"--data-type-id",i);return p.dataType=y||null,p}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}inferDataType(){const e=uu(this);if(e){const t=e.clone(this);t&&(t.inferred=!0,this.setDataType(t))}return this}getCounterparts(){let e=[];if([n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const t=this.parent.parent;e=[...t.breakStatements,...t.continueStatements].flatMap(s=>s.outputs).filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}else if(this.parent.type===n.ReturnStatement&&[n.FunctionDeclaration,n.GlobalEvent].includes(this.parent.parent.type)&&this.parent.parent.implements){const i=this.parent.parent.returnStatements.flatMap(a=>a.outputs);this.implements?e=i.filter(s=>{var o;return this.implements.id===((o=s.implements)==null?void 0:o.id)}):e=i.filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}return e}inferDataTypeFromCounterparts(){var i,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()||(i=o.dataType)!=null&&i.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(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),c(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),c(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),c(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let Nt=Ie;function E2(r){var o;const e=y6(),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=[...wn(r)];if(r.id==="search-person-by-id-id"){const l=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return ie(r.errors,s)}const Ge=class Ge{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",n.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 i=t;if(e.parent){const y=N(e.parent);i=t.get(y)}const a=e.calledByEntry.map(y=>{const h=N(y);return t.get(h)}),s=e.calledBySuccess.map(y=>{const h=N(y);return t.get(h)}),o=e.calledByError.map(y=>{const h=N(y);return t.get(h)}),l={id:e.id,version:1,type:n.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:i},p=g(l,t);return p.setParent(i),p.initChildren(),p}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...
|
|
72
|
+
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:i}}addSelfToProject(){var a;const e=[this],t=[],i=[];if(this.parent.addOutputDeclaration(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),this.parent&&[n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const s=this.parent.parent,{updated:o,added:l,removed:p}=s.syncChildren();e.push(...o),t.push(...l),i.push(...p)}return{updated:E(e),added:E(t),removed:E(i),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.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this.initialData.implements){const e=g(this.initialData.implements,this.project);this.implements=e}return xa.initReadsValue(this),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}async load(){return this}async create(){return this}async update(e){return this.sync(e),Ya(e,this),this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const s=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}return{affected:E(i),removed:E(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.dataType){const i=this.dataType.restore({seenEntities:e});t.push(...i.affected)}return{affected:[],self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...((i=this.dataType)==null?void 0:i.toFlat(e))||[]])}toFlatIds(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.id,...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[]])}toJSON(){var e,t,i;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,readsValue:((i=this.readsValue)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i;return{id:this.id,version:this.version,name:this.name,description:this.description,type:this.type,index:this.index,required:this.required,isError:this.isError,readsValue:((e=this.readsValue)==null?void 0:e.toReference())||null,implements:((t=this.implements)==null?void 0:t.toReference())||null,dataType:((i=this.dataType)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.dataType)==null?void 0:i.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 i,a;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.readsValue)==null?void 0:i.toFlatGenerationTarget(e))||[],...((a=this.dataType)==null?void 0:a.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=T2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){var t;return[...this.errors,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}clone(e=null,t=null,i=!0){var h;const a=this.toJSON(),s=t||ze(C(this,this.project),n.ReturnDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e?p.setParent(e):p.setParent(this.parent),i&&p.subscribe(),p.initChildren();const y=(h=this.dataType)==null?void 0:h.clone(p,l+"--data-type-id",i);return p.dataType=y||null,p}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}inferDataType(){const e=uu(this);if(e){const t=e.clone(this);t&&(t.inferred=!0,this.setDataType(t))}return this}getCounterparts(){let e=[];if([n.BreakStatement,n.ContinueStatement].includes(this.parent.type)){const t=this.parent.parent;e=[...t.breakStatements,...t.continueStatements].flatMap(s=>s.outputs).filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}else if(this.parent.type===n.ReturnStatement&&[n.FunctionDeclaration,n.GlobalEvent].includes(this.parent.parent.type)&&this.parent.parent.implements){const i=this.parent.parent.returnStatements.flatMap(a=>a.outputs);this.implements?e=i.filter(s=>{var o;return this.implements.id===((o=s.implements)==null?void 0:o.id)}):e=i.filter(s=>C(s,this.project)===C(this,this.project)&&s.id!==this.id)}return e}inferDataTypeFromCounterparts(){var i,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()||(i=o.dataType)!=null&&i.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(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),c(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),c(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),c(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),c(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),c(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),c(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let Nt=Ie;function E2(r){var o;const e=y6(),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=[...wn(r)];if(r.id==="search-person-by-id-id"){const l=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return ie(r.errors,s)}const Ge=class Ge{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",n.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 i=t;if(e.parent){const y=N(e.parent);i=t.get(y)}const a=e.calledByEntry.map(y=>{const h=N(y);return t.get(h)}),s=e.calledBySuccess.map(y=>{const h=N(y);return t.get(h)}),o=e.calledByError.map(y=>{const h=N(y);return t.get(h)}),l={id:e.id,version:1,type:n.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:i},p=g(l,t);return p.setParent(i),p.initChildren(),p}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
73
73
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
74
74
|
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}}addSelfToProject(){const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),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 i=this.inputsDeclarations.findIndex(a=>{var s;return a.id===((s=e.declaration)==null?void 0:s.id)});return i>-1&&this.inputsDeclarations.splice(i,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(i=>i.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(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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=g(e,this.project);return[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputsDeclarations=this.initialData.inputsDeclarations.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputsDeclarations=this.initialData.outputsDeclarations.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncInputMaps(),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.query=e.query||this.query,this.description=e.description||this.description,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.inputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.outputs.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.outputsDeclarations.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputsDeclarations.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.inputsDeclarations.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.outputsDeclarations.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.inputsDeclarations.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.outputsDeclarations.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[]])}toJSON(){var e;return{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(t=>t.toJSON()),errorCalls:this.errorCalls.map(t=>t.toJSON()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),inputsDeclarations:this.inputsDeclarations.map(t=>t.toJSON()),inputs:this.inputs.map(t=>t.toJSON()),outputsDeclarations:this.outputsDeclarations.map(t=>t.toJSON()),outputs:this.outputs.map(t=>t.toJSON()),parent:this.parent.toReference(),error:((e=this.error)==null?void 0:e.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,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(e=>e.toReference()),inputsDeclarations:this.inputsDeclarations.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),outputsDeclarations:this.outputsDeclarations.map(e=>e.toReference()),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.inputsDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.outputsDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.calledBy.flatMap(i=>i.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.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(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputsDeclarations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputsDeclarations.flatMap(i=>i.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=E2(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){return new Ge(this.toJSON(),this.project)}syncInputMaps(){const e=[],t=[],i=[];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+"--"+_.UUID.uuid(),version:1,type:n.InputMap,declaration:a.toJSON(),readsValue:null,defaultValue:null,index:this.inputs.length,name:null,description:null,parent:this.toReference()},l=g(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),i.push(...l)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}};c(Ge,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),c(Ge,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Ge,"BASE_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,...Ge.INMUTABLE_BASE_PROPERTIES]),c(Ge,"MUTABLE_META_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,"x","y"]),c(Ge,"INMUTABLE_META_PROPERTIES",[...Ge.INMUTABLE_BASE_PROPERTIES]),c(Ge,"META_PROPERTIES",[...Ge.MUTABLE_META_PROPERTIES,...Ge.INMUTABLE_META_PROPERTIES]),c(Ge,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(Ge,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(Ge,"UPSTREAM_PROPERTIES",[...Ge.MUTABLE_UPSTREAM_PROPERTIES,...Ge.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),c(Ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ge,"DOWNSTREAM_PROPERTIES",[...Ge.MUTABLE_DOWNSTREAM_PROPERTIES,...Ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ge,"PROPERTIES",[...Nt.META_PROPERTIES,...Nt.UPSTREAM_PROPERTIES,...Nt.DOWNSTREAM_PROPERTIES]);let Gr=Ge;function b2(r){const e=a3(),t=r.toJSON();e.safeParse(t).success,r.functions.forEach(s=>s.validate()),r.events.forEach(s=>s.validate());const a=[];return ie(r.errors,a)}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,"type",n.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 i=t,a={id:e.id,version:1,name:e.name,type:n.InstalledProject,description:e.description,functions:[],events:[],implements:{entityId:e.implements,entityType:n.Project,type:n.GenericReference,id:_.UUID.uuid()},x:0,y:0,parent:i},s=g(a,t);return s.setParent(i),s.initChildren(),s}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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}}addSelfToProject(){const e=[this],t=[],i=[];return{updated:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.events.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!1,seenEntities:t});i.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(i=>i.toFlat(e)),...this.events.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.functions.flatMap(i=>i.toFlatIds(e)),...this.events.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,implements:this.implements,functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),parent:this.parent.toReference(),x:this.x,y:this.y}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,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(e=>e.toReference()),events:this.events.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.functions.flatMap(i=>i.toFlatJSON(e)),...this.events.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.events.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.functions.forEach(e=>e.clearErrors()),this.events.forEach(e=>e.clearErrors()),this}validate(){const e=b2(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(){return new De(this.toJSON(),this.project)}};c(De,"MUTABLE_BASE_PROPERTIES",[]),c(De,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),c(De,"BASE_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,...De.INMUTABLE_BASE_PROPERTIES]),c(De,"MUTABLE_META_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",[]),c(De,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),c(De,"UPSTREAM_PROPERTIES",[...De.MUTABLE_UPSTREAM_PROPERTIES,...De.INMUTABLE_UPSTREAM_PROPERTIES]),c(De,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),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 $r=De;function R2(r){var l;const e=T6(),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=wn(r),s=g2(r),o=[...a,...s];return ie(r.errors,o)}function g2(r){const e=[],t=Bo(r.parent),i=t==null?void 0:t.entity;if(!i)e.push(Y({id:`${r.id}--${S.InternalCallParentMissingDataType}`,code:S.InternalCallParentMissingDataType,severity:T.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(![n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(i.type))e.push(Y({id:`${r.id}--${S.InternalCallParentDeclarationEntityInvalidType}`,code:S.InternalCallParentDeclarationEntityInvalidType,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", belongs to a variable whose data type 'entity' is not a custom entity, built-in base entity or primitive entity.
|
|
75
|
-
This variable's data-type has an 'entity' field that references an entity with id '${i.id}' and of type '${i.type}'.`,issue:null,entity:r}).error);else{const a=
|
|
75
|
+
This variable's data-type has an 'entity' field that references an entity with id '${i.id}' and of type '${i.type}'.`,issue:null,entity:r}).error);else{const a=ku(i),s=[];[n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(i.type)&&s.push(...i.getAllInteractiveMethods());let o="";a?i.methods.length?o=`
|
|
76
76
|
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:
|
|
77
77
|
- ${i.methods.map(y=>y.id).join(`
|
|
78
78
|
- `)}
|
|
@@ -84,7 +84,7 @@ Built-in entity types can't have methods attached to them by the user. They are
|
|
|
84
84
|
This variable's data-type 'entity' is a custom entity which extends or implements a non-interactive 'built-in-base-entity'.s`:i.type===n.BuiltInBaseEntity&&(o=`
|
|
85
85
|
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!==n.FunctionDeclaration&&e.push(Y({id:`${r.id}--${S.InternalCallDeclarationIsNotFunctionDeclaration}`,code:S.InternalCallDeclarationIsNotFunctionDeclaration,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", points to a 'declaration' that isn't a 'function-declaration' entity.
|
|
86
86
|
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(Y({id:`${r.id}--${S.InternalCallDeclarationNotFoundInParentDatatypeEntity}`,code:S.InternalCallDeclarationNotFoundInParentDatatypeEntity,severity:T.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 he=class he{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"index");c(this,"type",n.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 i=N(e.parent),a=t.get(i),s=N(e.declaration),o=t.get(s),l=e.calledByEntry.map(R=>{const v=N(R);return t.get(v)}),p=e.calledBySuccess.map(R=>{const v=N(R);return t.get(v)}),y=e.calledByError.map(R=>{const v=N(R);return t.get(v)}),h={id:e.id,version:1,type:n.InternalCall,index:a.internalCalls.length,declaration:o.toReference(),calledByEntry:l,calledBySuccess:p,calledByError:y,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,parent:a},m=g(h,t);return m.setParent(a),m.initChildren(),m}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:Fe}},t);i=s.modifiedData;const o=N(i.parent),l=t.get(o);if(l){const p=Bo(l),y=p==null?void 0:p.entity;if(!y)a.push(new b({id:`${i.id}--${S.InternalCallParentMissingDataType}`,code:S.InternalCallParentMissingDataType,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${i.declaration}".`,issue:null}));else if(![n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(y.type))a.push(new b({id:`${i.id}--${S.InternalCallParentDeclarationEntityInvalidType}`,code:S.InternalCallParentDeclarationEntityInvalidType,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", belongs to a variable whose data type 'entity' is not a custom entity, built-in base entity or primitive entity.
|
|
87
|
-
This variable's data-type has an 'entity' field that references an entity with id '${y.id}' and of type '${y.type}'.`,issue:null}));else{const h=
|
|
87
|
+
This variable's data-type has an 'entity' field that references an entity with id '${y.id}' and of type '${y.type}'.`,issue:null}));else{const h=ku(y);let m="";h?y.methods.length?m=`
|
|
88
88
|
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:
|
|
89
89
|
- ${y.methods.map(A=>A.id).join(`
|
|
90
90
|
- `)}
|
|
@@ -100,7 +100,7 @@ ${Qn}`);const R=i.declaration;if(!t.get(R))a.push(new b({id:`${i.id}--${f.Refere
|
|
|
100
100
|
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.${m}`,issue:null})):a.push(new b({id:`${i.id}--${S.InternalCallDeclarationNotFoundInParentDatatypeEntity}`,code:S.InternalCallDeclarationNotFoundInParentDatatypeEntity,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) with id "${i.declaration}".${m}`,issue:null}))}}(l.inputs.length||l.outputs.length||l.internalCalls.length)&&a.push(new b({id:`${i.id}--${f.InvalidInternalCallParentRelation}`,code:f.InvalidInternalCallParentRelation,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}", can only be added to a variable declaration or variable instance parent if the parent doesn't already have inputs, outputs or other internal calls.
|
|
101
101
|
If you need a new variable-instance for this, consider using the 'implement_variable_instance' generation action to create one and give it a caller.
|
|
102
102
|
The you can attach the new internal-call to it.`,issue:null}))}return a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
103
|
-
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:e}}addSelfToProject(){var a;const e=[this],t=[],i=[];return this.parent.addInternalCall(this),e.push(this.parent),(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.parent.type!==n.GenericReference){const e=g(this.initialData.parent,this.project);this.setParent(e),this.parent.initChildren(),this.parent.addInternalCall(this);const t=this.calledBy.find(i=>!!i.parent&&dt.includes(i.parent.type));if(t){const i=g(t.parent,this.project);this.parent.setParent(i)}else if(!t&&!this.parent.calledBy.length)throw new Error("Parent of internal call parent could not be resolved")}return this.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),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}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const i=[],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});i.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{i.push(o),o.removeCall(this)}),{affected:E(i),removed:E(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:i}=this.process.restore({seenEntities:e});t.push(...i)}return this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e)),...this.process?this.process.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(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.error?this.error.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,index:this.index,successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:(e=this.process)==null?void 0:e.toJSON(),declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),parent:this.parent.toReference(),error:(t=this.error)==null?void 0:t.toJSON()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,index:this.index,process:this.process?this.process.toReference():null,inputs:this.inputs.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),declaration:this.declaration.toReference(),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.process?this.process.toFlatJSON(e):[],...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.calledBy.flatMap(i=>i.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),declaration:this.declaration.id,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.process?this.process.toFlatGenerationTarget(e):[],...this.successCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=R2(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){return new he(this.toJSON(),this.project)}};c(he,"MUTABLE_BASE_PROPERTIES",[]),c(he,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(he,"BASE_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,...he.INMUTABLE_BASE_PROPERTIES]),c(he,"MUTABLE_META_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,"index"]),c(he,"INMUTABLE_META_PROPERTIES",[...he.INMUTABLE_BASE_PROPERTIES]),c(he,"META_PROPERTIES",[...he.MUTABLE_META_PROPERTIES,...he.INMUTABLE_META_PROPERTIES]),c(he,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(he,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),c(he,"UPSTREAM_PROPERTIES",[...he.MUTABLE_UPSTREAM_PROPERTIES,...he.INMUTABLE_UPSTREAM_PROPERTIES]),c(he,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),c(he,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(he,"DOWNSTREAM_PROPERTIES",[...he.MUTABLE_DOWNSTREAM_PROPERTIES,...he.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(he,"PROPERTIES",[...he.META_PROPERTIES,...he.UPSTREAM_PROPERTIES,...he.DOWNSTREAM_PROPERTIES]);let wi=he;function v2(r){const e=g6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-argument-map-id"){const s=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});a.push(s.error)}return ie(r.errors,a)}const Pe=class Pe{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"index");c(this,"name",null);c(this,"description",null);c(this,"declaration",null);c(this,"type",n.InputMap);c(this,"defaultValue",null);c(this,"readsValue",null);c(this,"dataType",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.index=e.index,this.name=e.name||null,this.description=e.description||null}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;if(e.declaration){const y=N(e.declaration);s=t.get(y)}let o=null;if(e.readsValue){const y=N(e.readsValue);o=t.get(y)}const l={id:e.id,version:1,name:e.name||null,type:n.InputMap,index:(a.inputs||[]).length,description:e.description||null,declaration:s,readsValue:o,defaultValue:null,parent:a},p=g(l,t);return p.setParent(a),p.initChildren(),p}static validateGenerationTarget(e,t){var y;let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...je,n.InputMap]}},t);i=s.modifiedData;const o=t.get(i.parent),l=i.declaration&&(t.get(i.declaration)||t.getBuiltIn(i.declaration)),p=((o==null?void 0:o.inputs)||[]).find(h=>{var m;return i.declaration&&((m=h.declaration)==null?void 0:m.id)===i.declaration});if(i.declaration?l?[n.Property,n.ArgumentDeclaration,n.ValueDescriptor].includes(l.type)?o&&l.type===n.ArgumentDeclaration&&![n.FunctionCall,n.Search,n.InternalCall].includes(o.type)?a.push(new b({id:`${i.id}--${f.InvalidInputMapDeclaration}`,code:f.InvalidInputMapDeclaration,severity:T.Error,message:`Entity of type '${n.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${n.ArgumentDeclaration}' with id '${i.declaration}'.
|
|
103
|
+
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:e}}addSelfToProject(){var a;const e=[this],t=[],i=[];return this.parent.addInternalCall(this),e.push(this.parent),(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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.parent.type!==n.GenericReference){const e=g(this.initialData.parent,this.project);this.setParent(e),this.parent.initChildren(),this.parent.addInternalCall(this);const t=this.calledBy.find(i=>!!i.parent&&ut.includes(i.parent.type));if(t){const i=g(t.parent,this.project);this.parent.setParent(i)}else if(!t&&!this.parent.calledBy.length)throw new Error("Parent of internal call parent could not be resolved")}return this.declaration=g(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),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}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const i=[],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});i.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{i.push(o),o.removeCall(this)}),{affected:E(i),removed:E(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:i}=this.process.restore({seenEntities:e});t.push(...i)}return this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e)),...this.process?this.process.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(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.error?this.error.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,index:this.index,successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:(e=this.process)==null?void 0:e.toJSON(),declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),parent:this.parent.toReference(),error:(t=this.error)==null?void 0:t.toJSON()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,index:this.index,process:this.process?this.process.toReference():null,inputs:this.inputs.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),declaration:this.declaration.toReference(),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.process?this.process.toFlatJSON(e):[],...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.calledBy.flatMap(i=>i.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),declaration:this.declaration.id,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.process?this.process.toFlatGenerationTarget(e):[],...this.successCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=R2(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){return new he(this.toJSON(),this.project)}};c(he,"MUTABLE_BASE_PROPERTIES",[]),c(he,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(he,"BASE_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,...he.INMUTABLE_BASE_PROPERTIES]),c(he,"MUTABLE_META_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,"index"]),c(he,"INMUTABLE_META_PROPERTIES",[...he.INMUTABLE_BASE_PROPERTIES]),c(he,"META_PROPERTIES",[...he.MUTABLE_META_PROPERTIES,...he.INMUTABLE_META_PROPERTIES]),c(he,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),c(he,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),c(he,"UPSTREAM_PROPERTIES",[...he.MUTABLE_UPSTREAM_PROPERTIES,...he.INMUTABLE_UPSTREAM_PROPERTIES]),c(he,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),c(he,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(he,"DOWNSTREAM_PROPERTIES",[...he.MUTABLE_DOWNSTREAM_PROPERTIES,...he.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(he,"PROPERTIES",[...he.META_PROPERTIES,...he.UPSTREAM_PROPERTIES,...he.DOWNSTREAM_PROPERTIES]);let wi=he;function v2(r){const e=g6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-argument-map-id"){const s=Y({id:`${r.id}--${M.PropertyImplementsNonAbstact}`,message:`Property "${C(r,r.project)}" with id "${r.id}" implements a non-abstract property "${C(r,r.project)}" with id "${r.id}".`,issue:null,severity:T.Error,code:M.PropertyImplementsNonAbstact,entity:r});a.push(s.error)}return ie(r.errors,a)}const Pe=class Pe{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"index");c(this,"name",null);c(this,"description",null);c(this,"declaration",null);c(this,"type",n.InputMap);c(this,"defaultValue",null);c(this,"readsValue",null);c(this,"dataType",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.index=e.index,this.name=e.name||null,this.description=e.description||null}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;if(e.declaration){const y=N(e.declaration);s=t.get(y)}let o=null;if(e.readsValue){const y=N(e.readsValue);o=t.get(y)}const l={id:e.id,version:1,name:e.name||null,type:n.InputMap,index:(a.inputs||[]).length,description:e.description||null,declaration:s,readsValue:o,defaultValue:null,parent:a},p=g(l,t);return p.setParent(a),p.initChildren(),p}static validateGenerationTarget(e,t){var y;let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...je,n.InputMap]}},t);i=s.modifiedData;const o=t.get(i.parent),l=i.declaration&&(t.get(i.declaration)||t.getBuiltIn(i.declaration)),p=((o==null?void 0:o.inputs)||[]).find(h=>{var m;return i.declaration&&((m=h.declaration)==null?void 0:m.id)===i.declaration});if(i.declaration?l?[n.Property,n.ArgumentDeclaration,n.ValueDescriptor].includes(l.type)?o&&l.type===n.ArgumentDeclaration&&![n.FunctionCall,n.Search,n.InternalCall].includes(o.type)?a.push(new b({id:`${i.id}--${f.InvalidInputMapDeclaration}`,code:f.InvalidInputMapDeclaration,severity:T.Error,message:`Entity of type '${n.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${n.ArgumentDeclaration}' with id '${i.declaration}'.
|
|
104
104
|
The parent entity of type '${o.type}' with id '${o.id}' is not compatible with this type of declaration.
|
|
105
105
|
Only 'function-call', 'search' and 'internal-call' entities can have input-maps whose 'declaration' points to 'argument-declaration' entities.`,issue:null})):o&&l.type===n.Property&&!Fe.includes(o.type)?a.push(new b({id:`${i.id}--${f.InvalidInputMapDeclaration}`,code:f.InvalidInputMapDeclaration,severity:T.Error,message:`Entity of type '${n.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${n.Property}' with id '${i.declaration}'.
|
|
106
106
|
The parent entity of type '${o.type}' with id '${o.id}' is not compatible with this type of declaration.
|
|
@@ -151,13 +151,13 @@ Or 'delete' and then 'post' actions to replace it.`,issue:null})):t.push(new b({
|
|
|
151
151
|
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:e}}addSelfToProject(){var a;const e=[this],t=[],i=[];return this.parentRelationType===Qo.DataTypeLiteralValue&&this.parent.type===n.DataType?this.parent.setEntity(this):(a=this.parent)==null||a.setDefaultValue(this),e.push(this.parent),{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}setStandaloneParent(e){return this.standaloneParent=e,this}setValueAsType(e){return this.valueAsType=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.standalone){if(this.initialData.valueAsType)if(Array.isArray(this.initialData.valueAsType))this.valueAsType=this.initialData.valueAsType.map(e=>{const t=this.project.get(e.id);if(!t)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${e.type}' with id '${e.id}' that is not part of the project state.`);return t});else{const e=this.project.get(this.initialData.valueAsType.id);if(!e)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsType.type}' with id '${this.initialData.valueAsType.id}' that is not part of the project state.`);this.valueAsType=e}return this}return this.initialData.valueAsType&&(Array.isArray(this.initialData.valueAsType)?this.valueAsType=this.initialData.valueAsType.map(e=>g(e,this.project)):this.valueAsType=g(this.initialData.valueAsType,this.project)),this}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.subscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.autogeneration=e.autogeneration||this.autogeneration,this.parentRelationType=e.parentRelationType||this.parentRelationType,e.value!==void 0&&(this.value=e.value),this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),{affected:E(i),removed:E(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlat(e)):this.valueAsType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatIds(e)):this.valueAsType.toFlatIds(e):[]])}toJSON(){var e;return{id:this.id,version:this.version,type:this.type,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(t=>t.toReference()):this.valueAsType.toReference():null,parent:(e=this.parent)==null?void 0:e.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;return{id:this.id,version:this.version,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(t=>t.toReference()):this.valueAsType.toReference():null,value:this.value,autogeneration:this.autogeneration,parentRelationType:this.parentRelationType,parent:(e=this.parent)==null?void 0:e.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatJSON(e)):this.valueAsType.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(t=>t.id):this.valueAsType.id:null,value:this.value,autogeneration:this.autogeneration,parentRelationType:this.parentRelationType,parent:(e=this.parent)==null?void 0:e.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatGenerationTarget(e)):this.valueAsType.toFlatGenerationTarget(e):[]])}clearErrors(){return this.errors=[],this}validate(){const e=C2(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,i=!0){const a=this.toJSON(),s=t||ze(this.name,n.PrimitiveValue,this.project);a.id=s;const o=qt(a,this.project);return e&&o.setParent(e),i&&o.subscribe(),o}merge(e){const t=[],i=[],a=[];return this.valueAsType!==(e==null?void 0:e.valueAsType)&&(this.setValueAsType(e.valueAsType),t.push(this)),this.value!==e.value&&(this.value=e.value,t.push(this)),this.autogeneration!==e.autogeneration&&(this.autogeneration=e.autogeneration,t.push(this)),this.name!==e.name&&(this.name=e.name,t.push(this)),{updated:E(t),added:E(i),removed:E(a),self:this}}};c(Oe,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),c(Oe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(Oe,"BASE_PROPERTIES",[...Oe.MUTABLE_BASE_PROPERTIES,...Oe.INMUTABLE_BASE_PROPERTIES]),c(Oe,"MUTABLE_META_PROPERTIES",[...Oe.MUTABLE_BASE_PROPERTIES]),c(Oe,"INMUTABLE_META_PROPERTIES",[...Oe.INMUTABLE_BASE_PROPERTIES]),c(Oe,"META_PROPERTIES",[...Oe.MUTABLE_META_PROPERTIES,...Oe.INMUTABLE_META_PROPERTIES]),c(Oe,"MUTABLE_UPSTREAM_PROPERTIES",[]),c(Oe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(Oe,"UPSTREAM_PROPERTIES",[...Oe.MUTABLE_UPSTREAM_PROPERTIES,...Oe.INMUTABLE_UPSTREAM_PROPERTIES]),c(Oe,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsType"]),c(Oe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Oe,"DOWNSTREAM_PROPERTIES",[...Oe.MUTABLE_DOWNSTREAM_PROPERTIES,...Oe.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Oe,"PROPERTIES",[...Oe.META_PROPERTIES,...Oe.UPSTREAM_PROPERTIES,...Oe.DOWNSTREAM_PROPERTIES]);let _i=Oe;function w2(r){var s;const e=j9(),t=r.toJSON();e.safeParse(t).success,r.outputs.forEach(o=>o.validate()),(s=r.throws)==null||s.validate();const a=[];return ie(r.errors,a)}function _2(r){var s;const e=$9(),t=r.toJSON();e.safeParse(t).success,r.outputs.forEach(o=>o.validate()),(s=r.throws)==null||s.validate();const a=[];return ie(r.errors,a)}const Se=class Se{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.ContinueStatement);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 i=N(e.parent),a=t.get(i),s=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),o=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),l=e.calledByError.map(h=>{const m=N(h);return t.get(m)}),p={id:e.id,version:1,type:n.ContinueStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:l,calledByEntry:s,throws:null,parent:a},y=g(p,t);return y.setParent(a),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[n.Loop]}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
152
152
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
153
153
|
You shouldn't have to manually update a 'parent' property.
|
|
154
|
-
Specifically for continue statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];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.addContinueStatement(this),e.push(this),{updated:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addContinueStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeContinueStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addContinueStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),throws:((e=this.throws)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(t=>t.toReference()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.calledBy.flatMap(a=>a.toFlatJSON(e)),...((i=this.throws)==null?void 0:i.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(i=>i.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=_2(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){return new Se(this.toJSON(),this.project)}};c(Se,"MUTABLE_BASE_PROPERTIES",[]),c(Se,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Se,"BASE_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,...Se.INMUTABLE_BASE_PROPERTIES]),c(Se,"MUTABLE_META_PROPERTIES",["x","y"]),c(Se,"INMUTABLE_META_PROPERTIES",[...Se.INMUTABLE_BASE_PROPERTIES]),c(Se,"META_PROPERTIES",[...Se.MUTABLE_META_PROPERTIES,...Se.INMUTABLE_META_PROPERTIES]),c(Se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(Se,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(Se,"UPSTREAM_PROPERTIES",[...Se.MUTABLE_UPSTREAM_PROPERTIES,...Se.INMUTABLE_UPSTREAM_PROPERTIES]),c(Se,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(Se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Se,"DOWNSTREAM_PROPERTIES",[...Se.MUTABLE_DOWNSTREAM_PROPERTIES,...Se.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Se,"PROPERTIES",[...Se.META_PROPERTIES,...Se.UPSTREAM_PROPERTIES,...Se.DOWNSTREAM_PROPERTIES]);let
|
|
154
|
+
Specifically for continue statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];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.addContinueStatement(this),e.push(this),{updated:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addContinueStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeContinueStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addContinueStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),throws:((e=this.throws)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(t=>t.toReference()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.calledBy.flatMap(a=>a.toFlatJSON(e)),...((i=this.throws)==null?void 0:i.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(i=>i.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=_2(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){return new Se(this.toJSON(),this.project)}};c(Se,"MUTABLE_BASE_PROPERTIES",[]),c(Se,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Se,"BASE_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,...Se.INMUTABLE_BASE_PROPERTIES]),c(Se,"MUTABLE_META_PROPERTIES",["x","y"]),c(Se,"INMUTABLE_META_PROPERTIES",[...Se.INMUTABLE_BASE_PROPERTIES]),c(Se,"META_PROPERTIES",[...Se.MUTABLE_META_PROPERTIES,...Se.INMUTABLE_META_PROPERTIES]),c(Se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(Se,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(Se,"UPSTREAM_PROPERTIES",[...Se.MUTABLE_UPSTREAM_PROPERTIES,...Se.INMUTABLE_UPSTREAM_PROPERTIES]),c(Se,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(Se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Se,"DOWNSTREAM_PROPERTIES",[...Se.MUTABLE_DOWNSTREAM_PROPERTIES,...Se.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Se,"PROPERTIES",[...Se.META_PROPERTIES,...Se.UPSTREAM_PROPERTIES,...Se.DOWNSTREAM_PROPERTIES]);let bt=Se;const dt=class dt{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.ReturnStatement);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 i=N(e.parent),a=t.get(i),s=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),o=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),l=e.calledByError.map(h=>{const m=N(h);return t.get(m)}),p={id:e.id,version:1,type:n.ReturnStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:l,calledByEntry:s,throws:null,parent:a},y=g(p,t);return y.setParent(a),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:ut}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
155
155
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
156
156
|
You shouldn't have to manually update a 'parent' property.
|
|
157
|
-
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}}addSelfToProject(){const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addReturnStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeReturnStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addReturnStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),parent:((e=this.parent)==null?void 0:e.toReference())||null,throws:((t=this.throws)==null?void 0:t.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(i=>i.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(i=>i.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=w2(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){return new
|
|
157
|
+
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}}addSelfToProject(){const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addReturnStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeReturnStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addReturnStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),parent:((e=this.parent)==null?void 0:e.toReference())||null,throws:((t=this.throws)==null?void 0:t.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(i=>i.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(i=>i.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=w2(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){return new dt(this.toJSON(),this.project)}};c(dt,"MUTABLE_BASE_PROPERTIES",[]),c(dt,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(dt,"BASE_PROPERTIES",[...bt.MUTABLE_BASE_PROPERTIES,...bt.INMUTABLE_BASE_PROPERTIES]),c(dt,"MUTABLE_META_PROPERTIES",["x","y"]),c(dt,"INMUTABLE_META_PROPERTIES",[...bt.INMUTABLE_BASE_PROPERTIES]),c(dt,"META_PROPERTIES",[...bt.MUTABLE_META_PROPERTIES,...bt.INMUTABLE_META_PROPERTIES]),c(dt,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),c(dt,"INMUTABLE_UPSTREAM_PROPERTIES",[]),c(dt,"UPSTREAM_PROPERTIES",[...bt.MUTABLE_UPSTREAM_PROPERTIES,...bt.INMUTABLE_UPSTREAM_PROPERTIES]),c(dt,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),c(dt,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(dt,"DOWNSTREAM_PROPERTIES",[...bt.MUTABLE_DOWNSTREAM_PROPERTIES,...bt.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(dt,"PROPERTIES",[...Nt.META_PROPERTIES,...Nt.UPSTREAM_PROPERTIES,...Nt.DOWNSTREAM_PROPERTIES]);let Ur=dt;function N2(r){var s;const e=Z9(),t=r.toJSON();e.safeParse(t).success,r.outputs.forEach(o=>o.validate()),(s=r.throws)==null||s.validate();const a=[];return ie(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",n.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 i=N(e.parent),a=t.get(i),s=e.calledByEntry.map(h=>{const m=N(h);return t.get(m)}),o=e.calledBySuccess.map(h=>{const m=N(h);return t.get(m)}),l=e.calledByError.map(h=>{const m=N(h);return t.get(m)}),p={id:e.id,version:1,type:n.BreakStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:l,calledByEntry:s,throws:null,parent:a},y=g(p,t);return y.setParent(a),y.initChildren(),y}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[n.Loop]}},t);return i=s.modifiedData,a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
158
158
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
159
159
|
You shouldn't have to manually update a 'parent' property.
|
|
160
|
-
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addBreakStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeBreakStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addBreakStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),parent:((e=this.parent)==null?void 0:e.toReference())||null,throws:((t=this.throws)==null?void 0:t.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(i=>i.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(i=>i.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=N2(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){return new Ce(this.toJSON(),this.project)}};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 Ni=Ce;function M2(r){const e
|
|
160
|
+
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=g(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.initChildren()),this.parent.addBreakStatement(this),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeBreakStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addBreakStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.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(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),parent:((e=this.parent)==null?void 0:e.toReference())||null,throws:((t=this.throws)==null?void 0:t.toJSON())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(i=>i.toReference()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(i=>i.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(i=>i.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=N2(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){return new Ce(this.toJSON(),this.project)}};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 Ni=Ce;function M2(r){const e=$I(),t=r.toJSON();e.safeParse(t).success,r.inputs.flatMap(s=>s.validate()),r.outputs.flatMap(s=>s.validate());const a=[];return ie(r.errors,a)}var vP=(r=>(r.Success="success",r.Error="error",r.Break="break",r.Continue="continue",r.Return="return",r))(vP||{});const Be=class Be{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",n.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 i=null;if(e.parent){const o=N(e.parent);i=t.get(o)}const a={id:e.id,version:1,name:e.name,type:n.ActionDescriptor,description:e.description,inputs:[],outputs:[],error:null,parent:i},s=g(a,t);return i&&s.setParent(i),s.initChildren(),s}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[n.CustomEntity,n.DataType]}},t);i=s.modifiedData;const o=i.parent?t.get(i.parent):null;if(o&&o.type===n.CustomEntity){const l=o,y=_n(l).filter(h=>!h.interactive);if(y.length){let h=y.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 '${n.BuiltInBaseEntity}' entities that are non-interactive ("${U(y.map(m=>C(m,m.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 '${n.BuiltInBaseEntity}' entity that is non-interactive ("${C(y[0],y[0].project)}").`;h+=`
|
|
161
161
|
${Qn}`,a.push(new b({id:`${e.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:h,issue:null}))}}else if(o&&o.type===n.DataType){const l=o;l.entity&&a.push(new b({id:`${e.id}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.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.
|
|
162
162
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
163
163
|
${un({describe_entity:l.entity.id})}
|
|
@@ -170,7 +170,7 @@ You can use the 'describe_entity' action to get more information about the exist
|
|
|
170
170
|
${un({describe_entity:o.error.id})}`,issue:null}))),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){var a,s,o,l,p,y;const e=[this],t=[],i=[];return this.parentRelationType===O.FixedArguments||this.parentRelationType===O.DynamicArgument?((a=this.parent)==null?void 0:a.type)===n.Search?this.parent.addInputDeclaration(this):(o=(s=this.parent)==null?void 0:s.addInput)==null||o.call(s,this):this.parentRelationType===O.FixedReturns||this.parentRelationType===O.DynamicReturn?((l=this.parent)==null?void 0:l.type)===n.Search?this.parent.addOutputDeclaration(this):(y=(p=this.parent)==null?void 0:p.addOutput)==null||y.call(p,this):this.parentRelationType===O.ReturnedError&&this.parent&&(this.parent.error=this),this.parent&&this.parent.type===n.Loop&&(this.parent.addOutputDeclaration(this),e.push(this.parent)),{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=g(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),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.description=e.description||this.description,this.index=e.index||(e.index!==0?this.index:0),this.required=e.required||this.required,this.parentRelationType=e.parentRelationType||this.parentRelationType,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return{affected:E(i),removed:E(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.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.dataType?this.dataType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.dataType?this.dataType.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.dataType?this.dataType.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,required:this.required,parentRelationType:this.parentRelationType,parent:(e=this.parent)==null?void 0:e.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.dataType?this.dataType.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=V2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.dataType?this.dataType.getErrors():[]]}getShallowErrors(){return this.errors}clone(e=null,t=null,i=!0){var h;const a=t||ze(C(this,this.project),n.ValueDescriptor,this.project),s=a.split("-id"),o=s[s.length-1||0]||a,l=this.toJSON();l.id=a;const p=qt(l,this.project);e&&p.setParent(e),i&&p.subscribe();const y=((h=this.dataType)==null?void 0:h.clone(p,o+"-data-type-id",i))||null;return y&&p.setDataType(y),p}getDataType(){return this.dataType||null}setDataType(e){return this.dataType=e,this}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}removeDataType(){return this.dataType=null,this}};c(we,"MUTABLE_BASE_PROPERTIES",["name","description","required"]),c(we,"INMUTABLE_BASE_PROPERTIES",["id","version","type","parentRelationType"]),c(we,"BASE_PROPERTIES",[...we.MUTABLE_BASE_PROPERTIES,...we.INMUTABLE_BASE_PROPERTIES]),c(we,"MUTABLE_META_PROPERTIES",[...we.MUTABLE_BASE_PROPERTIES,"index"]),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",[]),c(we,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(we,"UPSTREAM_PROPERTIES",[...we.MUTABLE_UPSTREAM_PROPERTIES,...we.INMUTABLE_UPSTREAM_PROPERTIES]),c(we,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),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 L2(r,e){if(!r.type&&!r.id)return{errors:[new b({id:`last-generated-entity-payload--${f.MissingTypeProperty}`,message:"Last generated entity payload is missing a 'type' property.",severity:T.Error,code:f.MissingTypeProperty,issue:null}),new b({id:`last-generated-entity-payload--${f.MissingIdProperty}`,message:"Last generated entity payload is missing an 'id' property.",severity:T.Error,code:f.MissingIdProperty,issue:null})],modifiedData:null};if(r.type){if(!r.id)return{errors:[new b({id:`last-generated-entity-payload--${f.MissingIdProperty}`,message:`Last generated entity, with type "${r.type}" is missing an 'id' property.`,severity:T.Error,code:f.MissingIdProperty,issue:null})],modifiedData:null}}else return{errors:[new b({id:`${r.id}--${f.MissingTypeProperty}`,message:`Entity with id "${r.id}" is missing a 'type' property.`,severity:T.Error,code:f.MissingTypeProperty,issue:null})],modifiedData:null};if(r.type===n.GenericReference)return{errors:[new b({id:`${r.id}--${f.RootReference}`,message:`Generic reference entity with id "${r.id}". A generic reference cannot be generated as a standalone entity. Only in the body of another entity.`,severity:T.Error,code:f.RootReference,issue:null})],modifiedData:null};const t=r,i=e.instances[t.id],a=e.builtInInstances[t.id];if(i&&!a&&t.type!==n.GenericReference){let s=`A previously generated entity with id "${t.id}" already exists in the project state.
|
|
171
171
|
Are you trying to update that entity?
|
|
172
172
|
If so, you should use the 'update' action for core mutable metadata properties, or 'delete' and then 'post' again to replace it.
|
|
173
|
-
If you are trying to create a new entity, please use a different id, for example: "${Ru(t,e)}".`;return{errors:[new b({id:`duplicate--${t.id}--${f.EntityIdNotUnique}`,message:s,severity:T.Error,code:f.EntityIdNotUnique,issue:null})],modifiedData:r}}else if(i&&t.type!==n.GenericReference)return{errors:[new b({id:`${t.id}--${f.EntityIdNotUnique}`,message:`A built in entity with id "${t.id}" already exists. You cannot modify built in entities. If you are trying to create a new entity, please use a different id, for example: "${Ru(t,e)}".`,severity:T.Error,code:f.EntityIdNotUnique,issue:null})],modifiedData:r};switch(t.type){case n.Project:return _.validateGenerationTarget(t,e);case n.CustomEntity:return qr.validateGenerationTarget(t,e);case n.Property:return Br.validateGenerationTarget(t,e);case n.FunctionDeclaration:return wr.validateGenerationTarget(t,e);case n.DataType:return Ci.validateGenerationTarget(t,e);case n.Operation:return _r.validateGenerationTarget(t,e);case n.FunctionCall:return jr.validateGenerationTarget(t,e);case n.VariableDeclaration:return Vr.validateGenerationTarget(t,e);case n.VariableInstance:return Lr.validateGenerationTarget(t,e);case n.GlobalEvent:return Bi.validateGenerationTarget(t,e);case n.InputMap:return Cn.validateGenerationTarget(t,e);case n.OutputMap:return Bn.validateGenerationTarget(t,e);case n.ArgumentDeclaration:return Fr.validateGenerationTarget(t,e);case n.ReturnDeclaration:return Nt.validateGenerationTarget(t,e);case n.Loop:return Nr.validateGenerationTarget(t,e);case n.Condition:return Mr.validateGenerationTarget(t,e);case n.Search:return Gr.validateGenerationTarget(t,e);case n.InstalledProject:return $r.validateGenerationTarget(t,e);case n.InternalCall:return wi.validateGenerationTarget(t,e);case n.PrimitiveValue:return _i.validateGenerationTarget(t,e);case n.ReturnStatement:return Ur.validateGenerationTarget(t,e);case n.BreakStatement:return Ni.validateGenerationTarget(t,e);case n.ContinueStatement:return
|
|
173
|
+
If you are trying to create a new entity, please use a different id, for example: "${Ru(t,e)}".`;return{errors:[new b({id:`duplicate--${t.id}--${f.EntityIdNotUnique}`,message:s,severity:T.Error,code:f.EntityIdNotUnique,issue:null})],modifiedData:r}}else if(i&&t.type!==n.GenericReference)return{errors:[new b({id:`${t.id}--${f.EntityIdNotUnique}`,message:`A built in entity with id "${t.id}" already exists. You cannot modify built in entities. If you are trying to create a new entity, please use a different id, for example: "${Ru(t,e)}".`,severity:T.Error,code:f.EntityIdNotUnique,issue:null})],modifiedData:r};switch(t.type){case n.Project:return _.validateGenerationTarget(t,e);case n.CustomEntity:return qr.validateGenerationTarget(t,e);case n.Property:return Br.validateGenerationTarget(t,e);case n.FunctionDeclaration:return wr.validateGenerationTarget(t,e);case n.DataType:return Ci.validateGenerationTarget(t,e);case n.Operation:return _r.validateGenerationTarget(t,e);case n.FunctionCall:return jr.validateGenerationTarget(t,e);case n.VariableDeclaration:return Vr.validateGenerationTarget(t,e);case n.VariableInstance:return Lr.validateGenerationTarget(t,e);case n.GlobalEvent:return Bi.validateGenerationTarget(t,e);case n.InputMap:return Cn.validateGenerationTarget(t,e);case n.OutputMap:return Bn.validateGenerationTarget(t,e);case n.ArgumentDeclaration:return Fr.validateGenerationTarget(t,e);case n.ReturnDeclaration:return Nt.validateGenerationTarget(t,e);case n.Loop:return Nr.validateGenerationTarget(t,e);case n.Condition:return Mr.validateGenerationTarget(t,e);case n.Search:return Gr.validateGenerationTarget(t,e);case n.InstalledProject:return $r.validateGenerationTarget(t,e);case n.InternalCall:return wi.validateGenerationTarget(t,e);case n.PrimitiveValue:return _i.validateGenerationTarget(t,e);case n.ReturnStatement:return Ur.validateGenerationTarget(t,e);case n.BreakStatement:return Ni.validateGenerationTarget(t,e);case n.ContinueStatement:return bt.validateGenerationTarget(t,e);case n.ActionDescriptor:return te.validateGenerationTarget(t,e);case n.ValueDescriptor:return xr.validateGenerationTarget(t,e);case n.BuiltInBaseEntity:case n.PrimitiveEntity:{const s="Did you mean to generate a",l={[n.BuiltInBaseEntity]:`${s} '${n.CustomEntity}' instead?`,[n.PrimitiveEntity]:`${s} '${n.CustomEntity}' instead?`}[t.type]||"";return{errors:[new b({id:`${t.id}--${f.BuiltInEntityGenerated}`,message:`Entity with id "${t.id} is of "${t.type}" type and should not be generated. Built in entities can only be referenced by user created entities.
|
|
174
174
|
${l}`,severity:T.Error,code:f.BuiltInEntityGenerated,issue:null})],modifiedData:r}}default:{const s=t;return{errors:[new b({id:`${s.id}--${f.UnknownEntityType}`,message:`Incorrect entity implementation for entity with id "${s.id}". Entity type "${s.type}" is not supported.`,severity:T.Error,code:f.UnknownEntityType,issue:null})],modifiedData:null}}}}function Mo(r){const e=Ho(r.type),t=e.MUTABLE_BASE_PROPERTIES,i=e.MUTABLE_UPSTREAM_PROPERTIES;let a=`Only mutable core metadata properties can be updated, no nested entities or references. You can alternatively delete the entity and create a new one with the updated values.
|
|
175
175
|
For entities of type "${r.type}", `;if(t.length>0?a+=`you can update the following metadata properties: '${U(t,"', '","' and '")}'. `:a+="there are no mutable metadata properties.",i.length>0){const s=t.length>0?`
|
|
176
176
|
You can also update the following upstream references: `:`
|
|
@@ -187,21 +187,21 @@ ${Xn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null}))),t
|
|
|
187
187
|
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),i=!0)}),(a.DOWNSTREAM_PROPERTIES||[]).forEach(D=>{r[D]&&!Va(r[D])&&(t.push(new b({id:`${e.id}--${f.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${D}" set directly. It is a downstream property that points to a downstream nested entity.
|
|
188
188
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
189
189
|
To modify '${D}', target the entity that it points to and its equivalent property.`,severity:T.Error,code:f.InvalidDownstreamPropertyOverride,issue:null})),i=!0)}),(a.INMUTABLE_UPSTREAM_PROPERTIES||[]).forEach(D=>{r[D]&&!Va(r[D])&&(t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${D}" updated. It is an inmutable property that is set only when the entity is created.
|
|
190
|
-
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),i=!0)});const A=a.PROPERTIES||[];A.length>0&&Object.keys(r).forEach(D=>{A.includes(D)||t.push(new b({id:`${e.id}--${f.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${D}" that will be ignored.`,severity:T.Warning,code:f.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?Mo(e):""};const s=
|
|
190
|
+
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),i=!0)});const A=a.PROPERTIES||[];A.length>0&&Object.keys(r).forEach(D=>{A.includes(D)||t.push(new b({id:`${e.id}--${f.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${D}" that will be ignored.`,severity:T.Warning,code:f.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?Mo(e):""};const s=IP(e),o=s==null?void 0:s.partial(),l=o==null?void 0:o.safeParse(r),p={...r,id:e.id,type:e.type},y=vu(p,l);if(t.push(...y),t.length)return{errors:t,modifiedData:null,messageAddition:i?Mo(e):""};const m=e.validateGeneratedUpdate(r);return{errors:[...t,...m.errors],modifiedData:m.modifiedData,messageAddition:i?Mo(e):""}}function IP(r){switch(r.type){case n.PrimitiveValue:return oo();case n.CustomEntity:return Gd();case n.PrimitiveEntity:return oo();case n.FunctionDeclaration:return Vd();case n.GlobalEvent:return mo();case n.DataType:return Od();case n.Property:return ud();case n.FunctionCall:return bd();case n.Condition:return Rd();case n.Operation:return yo();case n.VariableDeclaration:return Cd();case n.VariableInstance:return Bd();case n.OutputMap:return Ed();case n.ReturnDeclaration:return fd();case n.ArgumentDeclaration:return Md();case n.InputMap:return Dd();case n.Project:return Ld();case n.InstalledProject:return t3();case n.ActionDescriptor:return co();case n.ReturnStatement:return hd();case n.Loop:return co();case n.Search:return gd();case n.ValueDescriptor:return dd();case n.BuiltInBaseEntity:return pd();case n.InternalCall:return Id();case n.ContinueStatement:return yd();case n.BreakStatement:return md();default:return null}}function DP(r){switch(r.type){case n.PrimitiveValue:return C6();case n.CustomEntity:return W3();case n.PrimitiveEntity:return m9();case n.FunctionDeclaration:return G3();case n.GlobalEvent:return l3();case n.DataType:return j6();case n.Property:return R9();case n.FunctionCall:return n6();case n.Condition:return o6();case n.Operation:return I6();case n.VariableDeclaration:return Y6();case n.VariableInstance:return X6();case n.OutputMap:return X9();case n.ReturnDeclaration:return q9();case n.ArgumentDeclaration:return N3();case n.InputMap:return b6();case n.Project:return j3();case n.InstalledProject:return r3();case n.ActionDescriptor:return C9();case n.ReturnStatement:return U9();case n.Loop:return _9();case n.Search:return u6();case n.ValueDescriptor:return p9();case n.BuiltInBaseEntity:return P9();case n.InternalCall:return f6();case n.ContinueStatement:return L9();case n.BreakStatement:return H9();default:return null}}function Vo(r){const e=[];zn(r)||e.push(new b({id:`${r}--${f.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:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));const t=r.id||"reference-to--"+(r.entityId||"unknown"),i=`Reference object ${r.id?`with id "${r.id}"`:`to entity with id "${r.entityId}" and type "${r.entityType}"`}`;return r.entityId||e.push(new b({id:`${t}--${f.InvalidReferenceObjectStructure}`,message:`${i} is missing an 'entityId' property.`,severity:T.Error,code:f.InvalidReferenceObjectStructure,issue:null})),r.entityType||e.push(new b({id:`${t}--${f.InvalidReferenceObjectStructure}`,message:`${i} is missing an 'entityType' property.`,severity:T.Error,code:f.InvalidReferenceObjectStructure,issue:null})),r.id||e.push(new b({id:`${t}--${f.MissingIdProperty}`,message:`${i} is missing an 'id' property.`,severity:T.Error,code:f.MissingIdProperty,issue:null})),r.type||e.push(new b({id:`${t}--${f.MissingTypeProperty}`,message:`${i} is missing a 'type' property.`,severity:T.Error,code:f.MissingTypeProperty,issue:null})),e}function vu(r,e){return e.success?[]:e.error.issues.map(t=>new b({id:`${r.id}--${S.InvalidObjectStructure}`,message:`Entity of type "${r.type}" and with id "${r.id}", has an invalid structure: ${c5(t).toString().replace("Validation error: ","")}`,severity:T.Error,code:S.InvalidObjectStructure,issue:t}))}function Le(r,e){const t=[],i=DP(r);if(i){const s=i.safeParse(r);t.push(...vu(r,s))}const a=Ho(r.type);if(a){(a.DOWNSTREAM_PROPERTIES||[]).forEach(l=>{r[l]&&!Va(r[l])&&t.push(new b({id:`${r.id}--${f.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.
|
|
191
191
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
192
192
|
To modify '${l}', target the entity that it points to and its equivalent property.`,severity:T.Error,code:f.InvalidDownstreamPropertyOverride,issue:null}))});const o=a.PROPERTIES||[];o.length>0&&Object.keys(r).forEach(l=>{o.includes(l)||t.push(new b({id:`${r.id}--${f.UnrecognizedProperty}`,message:`Entity of type "${r.type}" with id "${r.id}" has an unrecognized property "${l}" that will be ignored.`,severity:T.Warning,code:f.UnrecognizedProperty,issue:null}))})}return t}function $2(r,e){const t=[];if(!r.parent)return t;const i=e.get(r.parent);return i?(zr.includes(i==null?void 0:i.type)?t.push(new b({id:`${r.id}--${f.BuiltInEntityParent}`,message:`Entity of type "${r.type}" with id "${r.id}" cannot have the parent with id "${i.id}", because it is a built in entity. Built in entities cannot be modified.`,severity:T.Error,code:f.BuiltInEntityParent,issue:null})):i.type===n.ActionDescriptor&&e.get(r.parent)&&t.push(new b({id:`${r.id}--${f.BuiltInEntityParent}`,message:`Entity of type "${r.type}" with id "${r.id}" cannot have the parent with id "${i.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:T.Error,code:f.BuiltInEntityParent,issue:null})),t):[]}function Iu(r,e,t){const i=[],a=r[e.key];if(!a)return i.push(new b({id:`${r.id}--${e.key}--${S.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 ${U(e.types,", "," or ")}.`,severity:T.Error,code:S.InvalidObjectStructure,issue:null})),{entityState:null,errors:i};let s=null;if(typeof a=="string")s=a;else{const l=Vo(a);i.push(...l),l.length===0&&(s=a.entityId)}if(!s)return{entityState:null,errors:i};if(r.id===s)return i.push(new b({id:`${r.id}--${s}--${f.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:T.Error,code:f.SelfReference,issue:null})),{entityState:null,errors:i};const o=t.get(s)||t.getBuiltIn(s);return o?e.types.includes(o.type)||i.push(new b({id:`${r.id}--${s}--${f.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 '${U(e.types,"', '","' or '")}'.`,severity:T.Error,code:f.InvalidReference,issue:null})):i.push(new b({id:`${r.id}--${s}--${f.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:T.Error,code:f.ReferencedEntityNotFound,issue:null})),{entityState:o,errors:i}}function Lo(r,e,t){const i=[],a=r[e];return a?Array.isArray(a)?{entities:a.map(o=>{let l=null;if(typeof o=="string")l=o;else{const y=Vo(o);i.push(...y),y.length===0&&(l=o.entityId)}if(!l)return{entityState:null,errors:[new b({id:`${r.id}--${e}--${f.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:T.Error,code:f.InvalidReference,issue:null})]};const p=t.get(l)||t.getBuiltIn(l);return p?{entityState:p,errors:[]}:(i.push(new b({id:`${r.id}--${l}--${f.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:T.Error,code:f.ReferencedEntityNotFound,issue:null})),{entityState:null,errors:i})}),errors:[]}:(i.push(new b({id:`${r.id}--${e}--${S.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:T.Error,code:S.InvalidObjectStructure,issue:null})),{entities:[],errors:i}):(i.push(new b({id:`${r.id}--${e}--${S.InvalidObjectStructure}`,message:`Entity of type "${r.type}" with id "${r.id}" is missing a list of references to "${e}" entities.`,severity:T.Error,code:S.InvalidObjectStructure,issue:null})),{entities:[],errors:i})}function Du(r,e,t){const i=[],a=Iu(r,e,t);if(a.errors.length>0)return a.errors;if(a.entityState){const s=a.entityState;e.types.includes(s.type)||i.push(new b({id:`${r.id}--${s.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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 '${U(e.types,"', '","' or '")}'.`,issue:null})),r.id===s.id&&i.push(new b({id:`${r.id}--${s.id}--${f.SelfReference}`,code:f.SelfReference,severity:T.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 i}function U(r,e,t){const i=[...r||[]].filter(a=>!!a);if(i.length===1)return i[0];if(i.length===2)return i.join(t);{const a=i.pop();return`${i.join(e)}${t}${a}`}}const Kn=`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.
|
|
193
|
-
All pass-through callable entities are: ${U(je,", "," and ")}.`,ka=`Entry point entities are the entities which start the execution of a logic chain. They are ${U(Ue,", "," 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. `,
|
|
193
|
+
All pass-through callable entities are: ${U(je,", "," and ")}.`,ka=`Entry point entities are the entities which start the execution of a logic chain. They are ${U(Ue,", "," 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. `,PP=`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: ${U(hn,", "," and ")}.`,F2=`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.
|
|
194
194
|
All callable entity types are: ${U(Mn,", "," and ")}.`,Xn=`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).
|
|
195
195
|
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.`,Pu=`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.
|
|
196
196
|
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'.`,U2=`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.
|
|
197
197
|
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.`,Au=`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 'custom-entity' as its 'entity' property, defining the structure of the object.
|
|
198
|
-
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.`,Qn=`Entities of type '${n.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.`,Ou=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${U(Nn,"', '","' and '")}'.`,
|
|
198
|
+
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.`,Qn=`Entities of type '${n.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.`,Ou=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${U(Nn,"', '","' and '")}'.`,AP=`Entities that write values to other entities, can be connected with entities that read values from them. Value writing entity types are: '${U(xe,"', '","' and '")}'.`,Su=`A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.
|
|
199
199
|
A 'property' can have a default value through its nested 'data-type' entity.
|
|
200
200
|
The 'property' entity only represents the data field in the declaration, and it can't write or read values.
|
|
201
|
-
When a 'custom-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.`,Go=`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: '${U(
|
|
201
|
+
When a 'custom-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.`,Go=`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: '${U(Yu,"', '","' and '")}'.
|
|
202
202
|
Some entities with values can both write and read values, while others can only do one of the two.
|
|
203
203
|
${Ou}
|
|
204
|
-
${
|
|
204
|
+
${AP}.
|
|
205
205
|
${Su}`,Cu=`To establish a connection of a reader and writter value during the generation process you can use the 'connect_values' generation action, like so:
|
|
206
206
|
\`\`\`json
|
|
207
207
|
{
|
|
@@ -221,7 +221,7 @@ ${typeof r=="string"?r:JSON.stringify(r,null,2)}
|
|
|
221
221
|
...All the properties you want to update
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
}`;return un(i)}default:return""}}function
|
|
224
|
+
}`;return un(i)}default:return""}}function OP(r,e){const t=JSON.parse(JSON.stringify(r)),i=[];if(Ue.includes(e.type))i.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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}".
|
|
225
225
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
226
226
|
${ka}
|
|
227
227
|
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(Ve.includes(e.type)){const a=e.calledBy||[],s=a.length?`
|
|
@@ -232,7 +232,7 @@ Termination entities are ${U(Ve,", "," and ")}.${s}`,issue:null}))}else if(!je.i
|
|
|
232
232
|
${Kn}`,issue:null}));else if(!hn.includes(e.type))return i.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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.
|
|
233
233
|
All caller entity types are: ${U(hn,", "," and ")}.
|
|
234
234
|
For the 'calledBySuccess' property, you specifically need to reference a pass-through callable entity.
|
|
235
|
-
${Kn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function
|
|
235
|
+
${Kn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function SP(r,e){const t=[];if(Ue.includes(e.type))t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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}".
|
|
236
236
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
237
237
|
${ka}`,issue:null}));else if(Ve.includes(e.type)){const i=e.calledBy||[],a=i.length?`
|
|
238
238
|
|
|
@@ -242,7 +242,7 @@ Termination entities are ${U(Ve,", "," and ")}.${a}`,issue:null}))}else if(!je.i
|
|
|
242
242
|
${Kn}`,issue:null}));else if(!hn.includes(e.type))return t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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.
|
|
243
243
|
All caller entity types are: ${U(hn,", "," and ")}.
|
|
244
244
|
For the 'calledByError' property, you specifically need to reference a pass-through callable entity.
|
|
245
|
-
${Kn}`,issue:null})),t;return t}function
|
|
245
|
+
${Kn}`,issue:null})),t;return t}function CP(r,e){const t=[];if(Ve.includes(e.type)){const i=e.calledBy||[],a=i.length?`
|
|
246
246
|
|
|
247
247
|
This ${e.type} is called by ${U(i.map(s=>`${s.type} with id "${s.id}"`),", "," and ")} entities. You can reference ${i.length>1?"one of them":"it"} instead to execute this entity before the end of the logic.`:"";t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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}".
|
|
248
248
|
${e.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
@@ -253,7 +253,7 @@ ${ka}.
|
|
|
253
253
|
We have moved the reference to 'calledBySuccess' for you.`,issue:null}));else if(!hn.includes(e.type))return t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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.
|
|
254
254
|
All caller entity types are: ${U(hn,", "," and ")}.
|
|
255
255
|
For the 'calledByEntry' property, you specifically need to reference a pass-through callable entity.
|
|
256
|
-
${Kn}`,issue:null})),t;return t}function
|
|
256
|
+
${Kn}`,issue:null})),t;return t}function BP(r,e){const t=[];let i=JSON.parse(JSON.stringify(r));if(Mn.includes(i.type)){if(i.calledBySuccess){const s=Lo(i,"calledBySuccess",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=OP(i,o.entityState);i=l.modifiedData,t.push(...l.errors)}):t.push(...s.errors)}if(i.calledByError){const s=Lo(i,"calledByError",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=SP(i,o.entityState);t.push(...l)}):t.push(...s.errors)}if(i.calledByEntry){const s=Lo(i,"calledByEntry",e);s.errors.length===0?(s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=CP(i,o.entityState);t.push(...l)}),t.push(...t)):t.push(...s.errors)}const a=[...i.calledBySuccess||[],...i.calledByError||[],...i.calledByEntry||[]];if(a.length){const s=[...new Set(a)];a.length!==s.length&&t.push(new b({id:`${i.id}--${f.DuplicateReference}`,code:f.DuplicateReference,severity:T.Warning,message:`Entity of type "${i.type}" with id "${i.id}" has duplicate caller references. Each caller reference should be unique. Duplicate caller reference will be ignored.`,issue:null}));const o=gt(i,e);i.type===n.ReturnStatement&&o&&!Ue.includes(o.type)?t.push(new b({id:`${i.id}--${f.IncompatibleScope}`,code:f.IncompatibleScope,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${U(Ue,"', '","' or '")}' entity. A return statement's parent should always be resolved to a function declaration or global event.${$o}`,issue:null})):i.type===n.ContinueStatement&&o&&o.type!==n.Loop?t.push(new b({id:`${i.id}--${f.IncompatibleScope}`,code:f.IncompatibleScope,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${n.Loop}' entity. A continue statement's parent should always be resolved to a loop entity.${$o}`,issue:null})):i.type===n.BreakStatement&&o&&o.type!==n.Loop&&t.push(new b({id:`${i.id}--${f.IncompatibleScope}`,code:f.IncompatibleScope,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${n.Loop}' entity. A break statement's parent should always be resolved to a loop entity.${$o}`,issue:null}));const l=[],p=[];let y=null;if(s.forEach(h=>{const m=e.get(h);if(!m){t.push(new b({id:`${i.id}--${h}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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=gt(m,e);if(o)Wa(o,R,e)?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(P=>P===m.id)?(m.successCalls||[]).find(D=>Ve.includes(D.type))&&t.push(new b({id:`${i.id}--${m.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${m.type}" with id "${m.id}" that already calls a termination statement.
|
|
257
257
|
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})):(i.calledByError||[]).find(P=>P===m.id)?(m.errorCalls||[]).find(D=>Ve.includes(D.type))&&t.push(new b({id:`${i.id}--${m.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${m.type}" with id "${m.id}" that already calls a termination statement.
|
|
258
258
|
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})):(i.calledByEntry||[]).find(P=>P===m.id)&&(m.calls||[]).find(D=>Ve.includes(D.type))&&t.push(new b({id:`${i.id}--${m.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${m.type}" with id "${m.id}" that already calls a termination statement.
|
|
259
259
|
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:m,scope:R})):p.push({caller:m,scope:R,errors:[new b({id:`${i.id}--${m.id}--${f.CallerWithIncompatibleScope}`,code:f.CallerWithIncompatibleScope,severity:T.Warning,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${m.type}" with id "${m.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(!y)y=R;else{const{compatible:v}=Wa(y,R,e);v?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(P=>P===m.id)?(m.successCalls||[]).find(D=>Ve.includes(D.type))&&t.push(new b({id:`${i.id}--${m.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${m.type}" with id "${m.id}" that already calls a termination statement.
|
|
@@ -264,7 +264,7 @@ To add a caller, use the 'add_caller' action with the properties: 'callerEntityI
|
|
|
264
264
|
Return statements need to have a caller when created, since their purpose is to terminate a call chain.`:i.type===n.ContinueStatement?s+=`
|
|
265
265
|
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.`:i.type===n.BreakStatement&&(s+=`
|
|
266
266
|
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+=`
|
|
267
|
-
${
|
|
267
|
+
${PP}`,Ve.includes(i.type)||(s+=`
|
|
268
268
|
It is recommended to have a caller reference already at the moment of creation in the payload of the generation action.`),t.push(new b({id:`${i.id}--${S.MissingCaller}`,code:S.MissingCaller,severity:Ve.includes(i.type)?T.Error:T.Warning,message:s,issue:null}))}}return{errors:t,modifiedData:i}}function Bu(r,e){const t=[];if(e.type===n.PrimitiveValue){const o=e.parent;let l=!1;if(o.type===n.InputMap)t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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 primitive value entity. Primitive value entities aren't value writting entities.
|
|
269
269
|
All value writting entity types are: ${U(xe,", "," and ")}.
|
|
270
270
|
|
|
@@ -277,7 +277,7 @@ All value writting entity types are: ${U(xe,", "," and ")}.
|
|
|
277
277
|
|
|
278
278
|
This data type entity belongs to a ${o.type} entity with id "${o.id}". ${o.type} entities are value writting entities. Is that what you meant to reference?`,issue:null})):t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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 primitive value entity. Primitive value entities can't be referenced as value writting entities.
|
|
279
279
|
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}))}else xe.includes(e.type)||t.push(new b({id:`${r.id}--${e.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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 isn't a value writting entity.
|
|
280
|
-
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));const i=
|
|
280
|
+
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));const i=gt(r,e.project),a=gt(e,e.project);if(i){const s=Wa(i,e,e.project);if(!s.compatible){const{type:o}=s;let l="";const p=`But they are nested under different subscopes. The reader is in the scope of the '${i.type}' (${C(i,e.project)}) with id '${i.id}', and the writter is in the scope of the '${a.type}' (${C(a,e.project)}) with id '${a.id}'.`;o===Zo.ParallelInCommonParent?(l=`The reader and the writter entities are both in the scope of the '${s.commonAncestorScope.type}' (${C(s.commonAncestorScope,e.project)}) with id '${s.commonAncestorScope.id}'.`,l+=`
|
|
281
281
|
${p}`):o===Zo.ParallelInProject&&(l="The reader and the writter entities are both in separate scopes in the project that have no common ancestor.",l+=`
|
|
282
282
|
${p}`),l+=`
|
|
283
283
|
Two value holding entities need to be in the same scope or in scopes nested inside of eachother to be able to read and write to each other.`,t.push(new b({id:`${r.id}--${e.id}--${f.IncompatibleScope}`,code:f.IncompatibleScope,severity:T.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}" with an incompatible scope.
|
|
@@ -287,7 +287,7 @@ ${Su}`,issue:null})):a.push(new b({id:`${o.id}--${f.InvalidReference}`,code:f.In
|
|
|
287
287
|
${Ou}`,issue:null})),delete s.readsValue);o.writesValues&&(xe.includes(o.type)?a.push(new b({id:`${o.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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.
|
|
288
288
|
${Cu}`,issue:null})):a.push(new b({id:`${o.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.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.
|
|
289
289
|
${Go}
|
|
290
|
-
${Cu}`,issue:null})),delete s.writesValues);const p=
|
|
290
|
+
${Cu}`,issue:null})),delete s.writesValues);const p=BP(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,y]of l){const h=y.types,m=y.optional,R=o[p];if(!R){m||a.push(new b({id:`${o.id}--${p}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.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 ${U(h,", "," or ")}`,issue:null}));continue}if(y.list)if(Array.isArray(R))for(const v of R){const P=Du(o,{key:p,types:h,optional:m},t);a.push(...P)}else{a.push(new b({id:`${o.id}--${p}--${f.ContainsSingleButShouldBeReferenceList}`,code:f.ContainsSingleButShouldBeReferenceList,severity:T.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 b({id:`${o.id}--${p}--${f.ContainsListButShouldReferenceSingle}`,code:f.ContainsListButShouldReferenceSingle,severity:T.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=Du(o,{key:p,types:h,optional:m},t);a.push(...v)}}return{errors:a,modifiedData:o}}function j2(r,e,t="calledBy"){const i=[];if(!r)return[];const a=e.get(r);if(!a)return i.push(new b({id:`${r}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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})),i;if([...je,...Ue].includes(a.type))return[];if(Ve.includes(a.type)){const s=a.calledBy||[],o=s.length?`
|
|
291
291
|
|
|
292
292
|
This ${a.type} is called by ${U(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.`:"";i.push(new b({id:`last-action--${a.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}'.
|
|
293
293
|
${a.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
@@ -311,7 +311,7 @@ All value writting entity types are: ${U(xe,", "," and ")}.
|
|
|
311
311
|
|
|
312
312
|
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 b({id:`last-action--${i.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.Error,message:`The 'readsValue' property references an entity with id "${i.id}" that is a primitive value entity. Primitive value entities can't be referenced as value writting entities.
|
|
313
313
|
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}))}else xe.includes(i.type)||t.push(new b({id:`last-action--${i.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.Error,message:`The 'readsValue' property references an entity with id "${i.id}" that isn't a value writting entity.
|
|
314
|
-
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));return t}function
|
|
314
|
+
All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));return t}function wP(r){return r.functions.length?`All global 'function-declaration' entity ids are:
|
|
315
315
|
- ${r.functions.map(t=>`${t.id} (${C(t,r)})`).join(`
|
|
316
316
|
- `)}.`:"The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities."}function Fo(r){return`All reserved action decriptor ids for '${n.GlobalEvent}' entities are:
|
|
317
317
|
- ${r.globalEventActionDescriptors.map(e=>`${e.id} (${C(e,r)})`).join(`
|
|
@@ -321,7 +321,7 @@ All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));retur
|
|
|
321
321
|
- ${r.operationDeclarations.map(e=>`${e.id} (${C(e,r)})`).join(`
|
|
322
322
|
- `)}`}function xo(r){return`All reserved action decriptor ids for '${n.Condition}' entities are:
|
|
323
323
|
- ${r.conditionDeclarations.map(e=>`${e.id} (${C(e,r)})`).join(`
|
|
324
|
-
- `)}`}function
|
|
324
|
+
- `)}`}function _P(r,e){const t=[];if(!r)return[];const i=e.get(r),a=wP(e);if(!i)t.push(new b({id:`last-action--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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(i.type===n.ActionDescriptor)t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunctionCall}`,code:f.InvalidFunctionDeclarationForFunctionCall,severity:T.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${r}' which is of type '${i.type}' entity. If you meant to reference an 'action-descriptor', you can use the 'implement_operation' generation action instead.
|
|
325
325
|
Otherwise, if you were trying to implement a 'function-call' from a globally declarated 'function-declaration':
|
|
326
326
|
${a}`,issue:null}));else if(i.type!==n.FunctionDeclaration)t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunctionCall}`,code:f.InvalidFunctionDeclarationForFunctionCall,severity:T.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${r}' which is of type '${i.type}' entity. Only 'function-declaration' entities can be implemented as function calls.
|
|
327
327
|
${a}`,issue:null}));else if(i.parent.type===n.CustomEntity){const o=_n(i.parent).filter(p=>!p.interactive);let l="";o.length&&(l=`
|
|
@@ -330,7 +330,7 @@ ${Qn}`),t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunction
|
|
|
330
330
|
If you want to call a method of a custom entity, use a '${n.InternalCall}' entity on any variable which is an instance of that custom entity.
|
|
331
331
|
${a}${l}`,issue:null}))}else i.parent.type===n.Loop?t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunctionCall}`,code:f.InvalidFunctionDeclarationForFunctionCall,severity:T.Error,message:`The function declaration entity with id '${r}' is the body of the 'loop' with id '${i.parent.id}'. Only globally declared, standalone functions can be implemented as function calls.
|
|
332
332
|
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.
|
|
333
|
-
${a}`,issue:null})):i.parent.type!==n.Project&&t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunctionCall}`,code:f.InvalidFunctionDeclarationForFunctionCall,severity:T.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
|
|
333
|
+
${a}`,issue:null})):i.parent.type!==n.Project&&t.push(new b({id:`last-action--${f.InvalidFunctionDeclarationForFunctionCall}`,code:f.InvalidFunctionDeclarationForFunctionCall,severity:T.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 NP(r,e){const t=[];if(!r)return[];const i=e.getBuiltIn(r),a=`
|
|
334
334
|
All built-in 'action-descriptor' entities that define 'operation' entity, are (IDs):
|
|
335
335
|
- ${e.operationDeclarations.map(s=>`${s.id} (${C(s,e)}).`).join(`
|
|
336
336
|
- `)}
|
|
@@ -341,7 +341,7 @@ All built-in 'action-descriptor' entities that define 'condition' entity, are (I
|
|
|
341
341
|
`;return i?i.type===n.FunctionDeclaration?t.push(new b({id:`last-action--${f.InvalidActionDescriptorForCondition}`,code:f.InvalidActionDescriptorForCondition,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):i.type===n.ActionDescriptor?e.conditionDeclarations.find(o=>o.id===r)||t.push(new b({id:`last-action--${f.InvalidActionDescriptorForOperation}`,code:f.InvalidActionDescriptorForOperation,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity but it isn't one of the allowed condition descriptors.${a}`,issue:null})):i.type!==n.ActionDescriptor&&t.push(new b({id:`last-action--${f.InvalidActionDescriptorForCondition}`,code:f.InvalidActionDescriptorForCondition,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):t.push(new b({id:`last-action--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function Y2(r,e){const t=[];if(!r)return[];const i=e.getBuiltIn(r),a=`
|
|
342
342
|
All built-in 'action-descriptor' entities that define 'loop' entity, are (IDs):
|
|
343
343
|
- ${e.loopDeclarations.map(s=>`${s.id} (${C(s,e)}).`).join(`
|
|
344
|
-
- `)}`;return i?i.type===n.FunctionDeclaration?t.push(new b({id:`last-action--${f.InvalidActionDescriptorForLoop}`,code:f.InvalidActionDescriptorForLoop,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):i.type===n.ActionDescriptor?e.loopDeclarations.find(o=>o.id===r)||t.push(new b({id:`last-action--${f.InvalidActionDescriptorForOperation}`,code:f.InvalidActionDescriptorForOperation,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):i.type!==n.ActionDescriptor&&t.push(new b({id:`last-action--${f.InvalidActionDescriptorForLoop}`,code:f.InvalidActionDescriptorForLoop,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new b({id:`last-action--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function
|
|
344
|
+
- `)}`;return i?i.type===n.FunctionDeclaration?t.push(new b({id:`last-action--${f.InvalidActionDescriptorForLoop}`,code:f.InvalidActionDescriptorForLoop,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):i.type===n.ActionDescriptor?e.loopDeclarations.find(o=>o.id===r)||t.push(new b({id:`last-action--${f.InvalidActionDescriptorForOperation}`,code:f.InvalidActionDescriptorForOperation,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):i.type!==n.ActionDescriptor&&t.push(new b({id:`last-action--${f.InvalidActionDescriptorForLoop}`,code:f.InvalidActionDescriptorForLoop,severity:T.Error,message:`The entity with id '${r}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new b({id:`last-action--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`The entity with id '${r}' that isn't yet found in the project.${a}`,issue:null})),t}function MP(r,e,t){var p,y,h,m;if(t.compatible)return"";const i=`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=Co(`${i} and ${s} have incompatible data types and cannot be connected as value-reader and value-writter.`);return t.type===xt.AIsListBIsNot?`${l}
|
|
345
345
|
${a} is a list, but ${o} is not. A list can't be connected to a single value.`:t.type===xt.BIsListAIsNot?`${l}
|
|
346
346
|
${a} is not a list, but ${o} is. A single value can't be connected to a list.`:t.type===xt.AIsNullableBIsNot?`${l}
|
|
347
347
|
${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===xt.BIsNullableAIsNot?`${l}
|
|
@@ -351,21 +351,21 @@ ${a} is not a template, but ${o} is. A data type that provides an entity as a "t
|
|
|
351
351
|
Their 'entity' property is of different types. They must be of the same type to be connected. For example, the 'entity' can be a '${n.CustomEntity}' or a '${n.PrimitiveEntity}'.`:t.type===xt.IncompatibleCustomEntities?`${l}
|
|
352
352
|
Both point to custom entities, but they are not compatible to be connected. They must be either the same custom entity, or a custom entity that has equivalent shape, which includes the same properties all with compatible data types with the properties in the counterpart entity.`:t.type===xt.IncompatiblePrimitiveEntities?`${l}
|
|
353
353
|
${a} is of primitive type '${((p=r.getDataType())==null?void 0:p.entity).name}' and ${o} is of primitive type '${((y=e.getDataType())==null?void 0:y.entity).name}'. They must be of the same primitive type to be connected.`:t.type===xt.IncompatibleBuiltInBaseEntities?`${l}
|
|
354
|
-
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 '${((m=e.getDataType())==null?void 0:m.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 i=e.project.get(N(r.readsValue));if(e.project.getBuiltIn(N(r.readsValue)))t.push(new b({id:`${e.id}--${f.InvalidBuiltInEntityReference}`,code:f.InvalidBuiltInEntityReference,severity:T.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(!i)t.push(new b({id:`${e.id}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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=tr(i);if(s)t.push(new b({id:`${e.id}--${f.InvalidBuiltInEntityReference}`,code:f.InvalidBuiltInEntityReference,severity:T.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}' (${C(s,e.project)}) higher up in the tree.`,issue:null}));else{const o=Bu({...e.toGenerationTarget(),...r},i);t.push(...o);const l=jt(e.getDataType(),i.getDataType());l.compatible||t.push(new b({id:`${e.id}--${S.ReaderWriterIncompatibleDataType}`,code:S.ReaderWriterIncompatibleDataType,severity:T.Error,message:
|
|
354
|
+
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 '${((m=e.getDataType())==null?void 0:m.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 i=e.project.get(N(r.readsValue));if(e.project.getBuiltIn(N(r.readsValue)))t.push(new b({id:`${e.id}--${f.InvalidBuiltInEntityReference}`,code:f.InvalidBuiltInEntityReference,severity:T.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(!i)t.push(new b({id:`${e.id}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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=tr(i);if(s)t.push(new b({id:`${e.id}--${f.InvalidBuiltInEntityReference}`,code:f.InvalidBuiltInEntityReference,severity:T.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}' (${C(s,e.project)}) higher up in the tree.`,issue:null}));else{const o=Bu({...e.toGenerationTarget(),...r},i);t.push(...o);const l=jt(e.getDataType(),i.getDataType());l.compatible||t.push(new b({id:`${e.id}--${S.ReaderWriterIncompatibleDataType}`,code:S.ReaderWriterIncompatibleDataType,severity:T.Error,message:MP(e,i,l),issue:null}))}}}return{errors:t,modifiedData:r}}function wn(r){const e=[];if(r.parent===r.project)!r.calledBy.length&&r.type!==n.VariableDeclaration&&e.push(new Er({id:`${r.id}--${M.DisconnectedCallableEntity}`,code:M.DisconnectedCallableEntity,severity:T.Warning,message:`This '${r.type}' entity "${C(r,r.project)}" with id "${r.id}" is globally declared and isn't called by any other entity.
|
|
355
355
|
Globally declared callable entities will not be part of any logic execution when the project is published.
|
|
356
356
|
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 '${n.GlobalEvent}' or '${n.FunctionDeclaration}'.
|
|
357
357
|
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.
|
|
358
358
|
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=Ha(r);if(!t.reachable){let i=`This '${r.type}' entity "${C(r,r.project)}" with id "${r.id}" is not reachable from the project's closest entry point '${t.entryPoint.type}' "${C(t.entryPoint,r.project)}".`;i+=`
|
|
359
359
|
This is because there are termination statements in the call chain before reaching this '${r.type}'.
|
|
360
360
|
If a caller entity calls a termination statement, it will always prevent all other calls from executing.`;let a=`
|
|
361
|
-
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 "${C(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 Er({id:`${r.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Warning,message:`${i}${a}`,issue:null,entity:r}))}}return ie(r.errors,e)}function wu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=Y({id:`${r.id}--${M.VariableReadsValueAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" reads a value. A variable with internal calls can't read a value.`,issue:null,severity:T.Error,code:M.VariableReadsValueAndInternalCall,entity:r});e.push(t.error)}if(r.writesValues.length){const t=Y({id:`${r.id}--${M.VariableWritesValuesAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" writes values. A variable with internal calls can't write a value.`,issue:null,severity:T.Error,code:M.VariableWritesValuesAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedInputs().length){const t=Y({id:`${r.id}--${M.VariableHasInputsAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" has inputs. A variable with internal calls can't have inputs.`,issue:null,severity:T.Error,code:M.VariableHasInputsAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedOutputs().length){const t=Y({id:`${r.id}--${M.VariableHasOutputsAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" has outputs. A variable with internal calls can't have outputs.`,issue:null,severity:T.Error,code:M.VariableHasOutputsAndInternalCall,entity:r});e.push(t.error)}if(r.calledBy.length){const t=Y({id:`${r.id}--${M.VariableIsCalledAndHasInternalCall}`,message:`Variable "${C(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:T.Error,code:M.VariableIsCalledAndHasInternalCall,entity:r});e.push(t.error)}if([...r.successCalls,...r.errorCalls].length){const t=Y({id:`${r.id}--${M.VariableCallsOthersAndHasInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" calls other entities. A variable with internal calls can't call other entities.`,issue:null,severity:T.Error,code:M.VariableCallsOthersAndHasInternalCall,entity:r});e.push(t.error)}return e}function H2(r){var o;const e=i6(),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=[...wn(r)];return ie(r.errors,s)}const _e=class _e{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.FunctionCall,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...
|
|
361
|
+
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 "${C(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 Er({id:`${r.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Warning,message:`${i}${a}`,issue:null,entity:r}))}}return ie(r.errors,e)}function wu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=Y({id:`${r.id}--${M.VariableReadsValueAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" reads a value. A variable with internal calls can't read a value.`,issue:null,severity:T.Error,code:M.VariableReadsValueAndInternalCall,entity:r});e.push(t.error)}if(r.writesValues.length){const t=Y({id:`${r.id}--${M.VariableWritesValuesAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" writes values. A variable with internal calls can't write a value.`,issue:null,severity:T.Error,code:M.VariableWritesValuesAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedInputs().length){const t=Y({id:`${r.id}--${M.VariableHasInputsAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" has inputs. A variable with internal calls can't have inputs.`,issue:null,severity:T.Error,code:M.VariableHasInputsAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedOutputs().length){const t=Y({id:`${r.id}--${M.VariableHasOutputsAndInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" has outputs. A variable with internal calls can't have outputs.`,issue:null,severity:T.Error,code:M.VariableHasOutputsAndInternalCall,entity:r});e.push(t.error)}if(r.calledBy.length){const t=Y({id:`${r.id}--${M.VariableIsCalledAndHasInternalCall}`,message:`Variable "${C(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:T.Error,code:M.VariableIsCalledAndHasInternalCall,entity:r});e.push(t.error)}if([...r.successCalls,...r.errorCalls].length){const t=Y({id:`${r.id}--${M.VariableCallsOthersAndHasInternalCall}`,message:`Variable "${C(r,r.project)}" with id "${r.id}" calls other entities. A variable with internal calls can't call other entities.`,issue:null,severity:T.Error,code:M.VariableCallsOthersAndHasInternalCall,entity:r});e.push(t.error)}return e}function H2(r){var o;const e=i6(),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=[...wn(r)];return ie(r.errors,s)}const _e=class _e{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"x");c(this,"y");c(this,"type",n.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 i=t;if(e.parent){const m=N(e.parent);i=t.get(m)}const a=N(e.declaration),s=t.get(a),o=e.calledByEntry.map(m=>{const R=N(m);return t.get(R)}),l=e.calledBySuccess.map(m=>{const R=N(m);return t.get(R)}),p=e.calledByError.map(m=>{const R=N(m);return t.get(R)}),y={id:e.id,version:1,type:n.FunctionCall,declaration:s.toReference(),calledByEntry:o,calledBySuccess:l,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},h=g(y,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=We(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Le(i));const o=N(i.declaration);if(o){const l=_P(o,t);a.push(...l)}else{const l=t.functions.length?`
|
|
362
362
|
All global 'function-declaration' entity ids are:
|
|
363
363
|
- ${t.functions.map(p=>`${p.id} (${C(p,t)})`).join(`
|
|
364
364
|
- `)}.`:`
|
|
365
365
|
The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities.`;a.push(new b({id:`${i.id}--${f.InvalidReference}`,code:f.InvalidReference,severity:T.Error,message:`Entity of type "${n.FunctionCall}" with id "${i.id}", has an invalid reference at the 'declaration' property. The 'declaration' property must be a valid reference to an 'function-declaration' entity.
|
|
366
366
|
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:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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.
|
|
367
367
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
368
|
-
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}}addSelfToProject(){var a;const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===n.FunctionDeclaration){const e=g(this.initialData.declaration,this.project);this.declaration=e}else{const e=N(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncMissingFixedInputs(),this.syncMissingFixedOutputs(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const i=[],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});i.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{i.push(o),o.removeCall(this)}),{affected:E(i),removed:E(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:i}=this.process.restore({seenEntities:e});t.push(...i)}return this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.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(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:(e=this.process)==null?void 0:e.toJSON(),declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),parent:this.parent.toReference(),error:(t=this.error)==null?void 0:t.toJSON()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,process:this.process?this.process.toReference():null,inputs:this.inputs.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),declaration:this.declaration.toReference(),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.process?this.process.toFlatJSON(e):[],...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.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(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.process?this.process.toFlatGenerationTarget(e):[],...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=H2(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){return new _e(this.toJSON(),this.project)}removeUnrecognizedInputs(){const e=[],t=[],i=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}removeUnrecognizedOutputs(){const e=[],t=[],i=[];return this.outputs.forEach(a=>{if(!this.declaration.getUniqueReturnDeclarations().find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedInputs(){const e=[],t=[],i=[],a=this.declaration.inputs.filter(p=>!this.inputs.find(y=>y.declaration.id===p.id));this.inputs.sort((p,y)=>p.index-y.index),a.forEach(p=>{this.inputs.forEach(m=>{m.index>=p.index&&m.sync({index:m.index+1})});const y={id:_.UUID.uuid(),version:1,type:n.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=g(y,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject(),t.push(h)}),this.inputs.sort((p,y)=>p.index-y.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),i.push(...l),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedOutputs(){const e=[],t=[],i=[],a=[];this.outputs=this.initialData.outputs.map(y=>{const h=g(y,this.project);return a.push(h.index),h.setParent(this),h.initChildren(),h});const s=this.declaration.getUniqueReturnDeclarations().filter(y=>!this.outputs.find(h=>h.declaration.id===y.id));this.outputs.sort((y,h)=>y.index-h.index),s.forEach((y,h)=>{this.outputs.forEach(P=>{P.index>=y.index&&P.index++});const m=a.includes(y.index)?this.outputs.length-1+h:y.index,R={id:_.UUID.uuid(),version:1,type:n.OutputMap,declaration:y.toJSON(),writesValues:[],index:m,parent:this.toReference()},v=g(R,this.project);v.setParent(this),v.initChildren(),v.addSelfToProject()}),this.outputs.sort((y,h)=>y.index-h.index);const{updated:o,added:l,removed:p}=this.removeUnrecognizedOutputs();return e.push(...o),t.push(...l),i.push(...p),{updated:E(e),added:E(t),removed:E(i),self:this}}};c(_e,"MUTABLE_BASE_PROPERTIES",[]),c(_e,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(_e,"BASE_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,..._e.INMUTABLE_BASE_PROPERTIES]),c(_e,"MUTABLE_META_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",["declaration","parent"]),c(_e,"UPSTREAM_PROPERTIES",[..._e.MUTABLE_UPSTREAM_PROPERTIES,..._e.INMUTABLE_UPSTREAM_PROPERTIES]),c(_e,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),c(_e,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(_e,"DOWNSTREAM_PROPERTIES",[..._e.MUTABLE_DOWNSTREAM_PROPERTIES,..._e.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(_e,"PROPERTIES",[..._e.META_PROPERTIES,..._e.UPSTREAM_PROPERTIES,..._e.DOWNSTREAM_PROPERTIES]);let jr=_e;function LP(r){var e,t,i;switch(r.id){case B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=r.project.entities.filter(h=>!!h.implements.find(m=>m.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(a.find(h=>!!h.properties.find(m=>{var R;return m.implements&&m.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((R=m.getDefaultValue())==null?void 0:R.value)===!0}))){const m=a[0].properties.find(v=>v.implements&&v.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),R=(e=m==null?void 0:m.dataType)==null?void 0:e.defaultValue;if(R)R.value=!0;else if(m!=null&&m.dataType){const v=(t=m==null?void 0:m.dataType)==null?void 0:t.id.split("-id")[0],P=g({id:v+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:!0,valueAsType:null,parent:m==null?void 0:m.dataType.toReference()},r.project);return P.setParent(m==null?void 0:m.dataType),P.initChildren(),P.addSelfToProject(),{newEntities:[P]}}return{newEntities:[]}}const o=r.project.get(B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),l=jo(o,"Main database");if(l.errors.length>0)return{newEntities:[]};const p=l.implemented.properties.find(h=>h.implements&&h.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),y=(i=p==null?void 0:p.dataType)==null?void 0:i.defaultValue;if(y)y.value=!0;else if(p!=null&&p.dataType){const h=p==null?void 0:p.dataType.id.split("-id")[0],m=g({id:h+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:!0,valueAsType:null,parent:p==null?void 0:p.dataType.toReference()},r.project);m.setParent(p==null?void 0:p.dataType),m.initChildren(),m.addSelfToProject()}return{newEntities:[l.implemented]}}}return{newEntities:[]}}function GP(r){return r.implements.filter(t=>t.type===n.BuiltInBaseEntity).map(t=>{var i;switch(t.id){case B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const s=r.project.entities.filter(p=>p.implements.find(y=>y.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(p=>!!p.properties.find(y=>{var h;return y.implements&&y.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((h=y.getDefaultValue())==null?void 0:h.value)===!0}));if(!s)return{newEntities:[]};const o=r.properties.find(p=>p.implements&&p.implements.id===B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id),l=(i=o==null?void 0:o.dataType)==null?void 0:i.defaultValue;if(o&&(o!=null&&o.dataType)&&!l){const p=o==null?void 0:o.dataType.id.split("-id")[0],y=g({id:p+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:null,valueAsType:s,parent:o==null?void 0:o.dataType.toReference()},r.project);return y.setParent(o==null?void 0:o.dataType),y.initChildren(),y.addSelfToProject(),{newEntities:[y]}}return{newEntities:[]}}}}),{newEntities:[]}}function jo(r,e,t){const i=t||ze(e,n.CustomEntity,r.project),a=i.split("-id"),s=a[a.length-1||0]||i,o={id:i,version:1,name:e,type:n.CustomEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[r],x:0,y:0,parent:r.project},l=No(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=LP(r),y=g(o,r.project);y.setParent(r.project),y.initChildren();const h=r.properties.map(v=>{const P=s+"-"+ze(C(v,r.project),n.Property,r.project),A=v.clone(y,P);return A.abstract=!1,A.implements=v,A.setParent(y),y.addProperty(A),A}),m=r.abstractMethods.map(v=>{const P=s+ze(v.name,n.FunctionDeclaration,r.project),A=v.implementAsFunctionDeclaration(P),D={id:P+"-parent-ref-id",type:n.GenericReference,entityId:i,entityType:n.CustomEntity},F={...A,implements:v,parent:D},k=g(F,r.project);return y.addMethod(k),k.setParent(y),k.initChildren(),k.implements=v,k});o.properties=h,o.methods=m;const R=GP(y);return{implemented:y,errors:[],entitiesChanges:{new:[y,...p.newEntities,...R.newEntities],updated:[y],deleted:[]}}}function _u(r,e){return e.entities.find(a=>{const s=a.properties,o=s.map(m=>m.name),l=r.every(m=>o.includes(m)),p=o.filter(m=>!r.includes(m)),y=s.every(m=>!p.includes(m.name)||!m.required);return l&&y})||null}function $P(r,e,t=Ze.OrDataTypeGroup){const i=[],a=[],s=[],l={id:e.id+"--nested-data-type-id-"+r.id,version:1,type:n.DataType,entity:r.toJSON(),isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:t,parent:e.toReference()},p=g(l,r.project);return a.push(p),p.setParent(e),p.initChildren(),p.setEntity(r),p.addSelfToProject(),{updated:E(i),added:E(a),removed:E(s),self:p}}function Nu(r,e,t,i){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 y=e.project.getBuiltIn(B[n.PrimitiveEntity][I.Date].id);e.setEntity(y);break}else{const y=e.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id);e.setEntity(y);break}case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}else if(Array.isArray(r))if(e.sync({isList:!0}),r.length>0){const y=r.slice(0,5).filter(m=>m!==void 0);if(y.every(m=>typeof m==typeof y[0])&&(typeof y[0]!="object"||y[0]===null))switch(typeof y[0]){case"string":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}else{const m=[];let R=!1;y.forEach((P,A)=>{if(Array.isArray(P)&&(R=!0),typeof P=="object"&&!Array.isArray(P)&&P!==null){const D=ko(P,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);D.hasCreated&&m.push(D.changeSet.self),a.push(...D.changeSet.updated),s.push(...D.changeSet.added),o.push(...D.changeSet.removed)}});const v=E(m);if(!v.length&&!R){y.forEach(P=>{const A={id:_.UUID.uuid(),version:1,type:n.DataType,entity:null,isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ze.OrDataTypeGroup,parent:e.toReference()},D=g(A,e.project);switch(D.setParent(e),D.initChildren(),D.addSelfToProject(),typeof P){case"string":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id));break;case"number":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):y.forEach((P,A)=>{if(typeof P=="object"&&!Array.isArray(P)&&P!==null){const D=_u(Object.keys(P),e.project);if(D){const F=$P(D||v[0],e,Ze.OrDataTypeGroup);a.push(...F.updated),s.push(...F.added),o.push(...F.removed)}}else{const D={id:e.id+"--or-child-data-type-id--"+A,version:1,type:n.DataType,entity:null,isList:Array.isArray(P),isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ze.OrDataTypeGroup,parent:e.toReference()},F=g(D,e.project);F.setParent(e),F.initChildren(),F.addSelfToProject();const k=Nu(P,F,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);a.push(...k.updated),s.push(...k.added),o.push(...k.removed)}})}}else{const y=ko(r[0],e.project,{...t},i);e.setEntity(y.changeSet.self),a.push(...y.changeSet.updated),s.push(...y.changeSet.added),o.push(...y.changeSet.removed);break}else{const y=ko(r,e.project,{...t},i);e.setEntity(y.changeSet.self),a.push(...y.changeSet.updated),s.push(...y.changeSet.added),o.push(...y.changeSet.removed);break}}return{updated:E(a),added:E(s),removed:E(o),self:e}}function ko(r,e,t,i){const a=[],s=[],o=[],l=Object.keys(r),p=_u(l,e);if(p)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],self:p}};const y=i?t.name+" of "+i.name:t.name,m={id:t.id||ze(y,n.CustomEntity,e),version:1,name:y,type:n.CustomEntity,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=g(m,e);return R.setParent(e),R.initChildren(),R.addSelfToProject(),s.push(R),l.forEach((v,P)=>{const A=ze(y+" "+v,n.Property,e),D={id:A,version:1,name:v,type:n.Property,description:null,static:!1,abstract:!1,dataType:null,implements:null,index:P,hidden:!1,primary:!1,private:!1,required:!0,parent:R.toReference()},F=g(D,e);F.setParent(R),F.initChildren(),F.addSelfToProject(),s.push(F);const k=r[v],me={id:A+"--data-type-id",version:1,type:n.DataType,entity:null,isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parent:F.toReference()},ae=g(me,e);ae.setParent(F),ae.initChildren(),ae.addSelfToProject(),s.push(ae);const qe=Nu(k,ae,{...t,name:v,id:A+"--data-type-entity-id"},i||R);a.push(...qe.updated),s.push(...qe.added),o.push(...qe.removed)}),{hasCreated:!0,changeSet:{updated:E(a),added:E(s),removed:E(o),self:R}}}function qo(r,e){const t=kr(r);if(t.length===0)return{list:[],last:null};let i=null;return{list:t.flatMap(s=>{if(s===e)return i=s,[s];const o=qo(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function FP(r,e,t=new Set){const i=er(r),a=er(e),s=i.filter(p=>!a.includes(p)),o=i.filter(p=>a.includes(p)),l=s.reduce((p,y)=>t.has(y.id)?p:(t.add(y.id),E([...p,...FP(y,e,t)])),[]);return E([...o,...l])}function Ja(r,e){const t=qo(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function z2(r,e){return!!qo(r,e).last}function Z2(r){if(Ue.includes(r.type))return r;if([...Mn,n.VariableDeclaration].includes(r.type)){const e=r.parent;return Ue.includes(e.type)?e:null}return null}function Mu(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===n.Project)return null}else return null;const i=e.parent;if(i){if(i===r)return r;if(i.type===n.Project)return null}else return null;return Mu(t,i)}function et(r){if(nl.includes(r.type)){if(r.type===n.FunctionDeclaration){const e=r.parent;if(e.type===n.CustomEntity)return e;if(e.type===n.Loop)return e}return r}else{const e=r.parent;return e?et(e):null}}function K2(r){return r.type===n.VariableDeclaration?[r]:je.includes(r.type)?[...r.inputs,...r.outputs||[]]:Ve.includes(r.type)?r.outputs:Hr.includes(r.type)||r.type===n.FunctionDeclaration?r.inputs:[]}function X2(r){const e=er(r),t=[],i=[];zu.includes(r.type)&&t.push(...Vu(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Mn.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>Ja(o,s)?-1:0),i.sort((s,o)=>Ja(o,s)?-1:0),[...t,...i,...a]}function UP(r){return[...r].sort((e,t)=>Ja(t,e)?-1:0)}function Q2(r){const e=UP(r),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];Ja(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function bt(r){const e=r.map(t=>et(t));return E(e)}function Vu(r){return je.includes(r.type)?[...bt(r.successCalls),...bt(r.errorCalls)]:Ue.includes(r.type)?bt(r.calls):[]}function e7(r,e){return Vu(r).includes(e)}function Lu(r){return r.writesValues||[]}function t7(r,e){return Lu(r).includes(e)}function xP(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function n7(r){return r.writesValues}function jP(r=[]){return r.map(xP).filter(e=>!!e)}function Jo(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function kP(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function qP(r){return Fe.includes(r.type)?r:null}function JP(r){return r.writesValues.map(qP).filter(e=>!!e)}function WP(r=[]){return r.reduce((e,t)=>t.type===n.OutputMap?[...e,...JP(t)]:e,[])}function Me(r){return je.includes(r.type)?[...pn(bt(r.successCalls)),...pn(bt(r.errorCalls))]:Ue.includes(r.type)?pn(bt(r.calls)):[]}function r7(r){return je.includes(r.type)?[...pn(bt(r.successCalls)),...pn(bt(r.errorCalls))]:Ue.includes(r.type)?pn(bt(r.calls)):[]}function YP(r,e=new Set){return r.writesValues.filter(i=>Fe.includes(i.type)&&!e.has(i.id)).reduce((i,a)=>e.has(a.id)?i:[...i,...re(a,e)],[])}function HP(r,e=new Set){var i;return(((i=r.readsValue)==null?void 0:i.writesValues)||[]).filter(a=>Fe.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...re(s,e)],[])}function re(r,e=new Set){if(e.has(r.id))return[];if(r.type===n.ReturnStatement)return kP(r.outputs).reduce((i,a)=>[...i,...re(a,e)],[]);if(r.type===n.FunctionCall||r.type===n.Operation||r.type===n.Condition)return[...Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]),...jP(r.inputs),...WP(r.outputs)].reduce((s,o)=>[...s,...re(o,e)],[]);if(Hr.includes(r.type)){const t=Jo(r.inputs),a=Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...re(o,e)],[])}if(r.type===n.FunctionDeclaration){const t=[...Jo(r.inputs)],a=Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...re(o)],[])}if(Fe.includes(r.type)){e.add(r.id);const i=Me(r).reduce((a,s)=>{const o=et(s);return[...a,...re(o||s,e)]},[]);return[r,...i,...HP(r,e),...YP(r,e)]}return[]}function St(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...er(r).reduce((a,s)=>[...a,s,...St(s,e)],[])])}function pn(r){return r.reduce((e,t)=>t.type===n.ReturnStatement||t.type===n.ContinueStatement||t.type===n.BreakStatement?[...e,t]:[...e,t,...Me(t)],[])}function zP(r){const e=r.entities||[],t=[...e,...r.functions||[],...r.events||[],...r.projects||[]],i=e.reduce((p,y)=>[...p,...y.properties],[]),a=e.reduce((p,y)=>[...p,...y.methods],[]),s=a.reduce((p,y)=>[...p,...Jo(y.inputs),...pn(bt(y.calls)),...y.returnStatements],[]),o=r.functions.reduce((p,y)=>[...p,...pn(bt(y.calls)),...y.returnStatements],[]),l=r.events.reduce((p,y)=>[...p,...pn(bt(y.calls)),...y.returnStatements],[]);return[...t,...i,...a,...s,...o,...l]}function ZP(r,e){return e.filter(i=>{if(!i)return!1;switch(i.type){case n.FunctionCall:return i.inputs.find(a=>a.id===r.id)!==void 0||i.outputs.find(a=>a.id===r.id)!==void 0;case n.Condition:return i.successCalls.find(a=>a.id===r.id)!==void 0||i.errorCalls.find(a=>a.id===r.id)!==void 0||i.inputs.find(a=>a.id===r.id)!==void 0;case n.Operation:return i.outputs.find(a=>a.id===r.id)!==void 0;case n.VariableDeclaration:return je.includes(r.type)?KP(r).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===i.id})!==void 0:!1;case n.CustomEntity:return i.properties.find(a=>a.id===r.id)!==void 0||i.methods.find(a=>a.id===r.id)!==void 0;case n.FunctionDeclaration:return i.inputs.find(a=>a.id===r.id)!==void 0||(i.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===r.id)!==void 0;default:return!1}})}function i7(r){const e=zP(r.project);return ZP(r,e)}function kr(r){const e=[];if(Mn.includes(r.type)){r.calledBy.forEach(a=>{const s=et(a);s&&e.push(s)});const i=[...r.inputs||[],...r.outputs||[]].map(a=>$u(a)).filter(a=>a!==null);e.push(...E(i))}if(Fe.includes(r.type)){const t=$u(r);t&&e.push(t)}return E(e)}function Gu(r){return r.type===n.FunctionCall||r.type===n.InternalCall||[n.Operation,n.Condition,n.Loop].includes(r.type)?r.declaration.inputs:r.type===n.FunctionDeclaration||Hr.includes(r.type)?r.inputs:r.type===n.Search?r.inputsDeclarations:[]}function a7(r,e){return e.type===n.Condition?e.inputs.find(t=>t.declaration.id===r.id):e.type===n.FunctionCall||e.type===n.Operation?e.inputs.find(t=>t.declaration.id===r.id):null}function KP(r){return je.includes(r.type)?r.inputs:[]}function XP(r){var e;return r.type===n.FunctionCall?((e=r.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[n.Operation,n.Condition,n.Loop].includes(r.type)?r.declaration.outputs:r.type===n.Search?r.outputsDeclarations:Ve.includes(r.type)?r.outputs:[]}function s7(r,e){return e.type===n.Condition?null:e.type===n.FunctionCall||e.type===n.Operation?e.outputs.find(t=>t.declaration.id===r.id):null}function o7(r){return r.type===n.Condition?[]:je.includes(r.type)?r.outputs:[]}function $u(r){const e=r.readsValue;return e?et(e):null}function QP(r){const e=r.internalCalls||[];return E(bt(E(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function Mi(r){const e=Lu(r),t=[];return e.forEach(i=>{if(Fe.includes(i.type))t.push(i);else if(Nn.includes(i.type)){const a=i.parent;t.push(a)}}),t}function E(r){const e=new Set;return r.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function er(r,e=!1){const t=[];if(r.type===n.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)||[]),dt.includes(r.type)&&t.push(...(r==null?void 0:r.detachedChildren)||[]),r.type===n.CustomEntity){const i=[...r.suggestedMethods,...r.methods].flatMap(a=>a.collapsed&&e?[]:er(a));t.push(...i)}if(r.type===n.Condition){const i=r.successCalls.map(s=>et(s)),a=r.errorCalls.map(s=>et(s));t.push(...i,...a)}if(Hr.includes(r.type)){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>Mi(s)).flat(),a=r.calls.map(s=>et(s));t.push(...E(i),...a)}if(je.includes(r.type)&&r.type!==n.Condition&&r.type!==n.Loop){const i=r==null?void 0:r.outputs.map(o=>Mi(o)).flat(),a=r.successCalls.map(o=>et(o)),s=r.errorCalls.map(o=>et(o));t.push(...E(i),...a,...s)}if(Fe.includes(r.type)){const i=Mi(r),a=QP(r);t.push(...i,...a)}if(r.type===n.Loop){const i=r.outputs.map(o=>Mi(o)).flat();if(r.body){const o=er(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>et(o)),s=r.successCalls.map(o=>et(o));t.push(...E(i),...s,...a)}if(r.type===n.FunctionDeclaration){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>Mi(s)).flat(),a=r.calls.map(s=>et(s));t.push(...E(i),...a)}return E(t)}function eA(r,e=!1){const t=er(r,e),i=[...t,...t.reduce((a,s)=>[...a,...eA(s,e)],[])];return E(i)}function tA(r){const e=kr(r),t=[...e,...e.reduce((i,a)=>[...i,...tA(a)],[])];return E(t)}function Wo(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Wo(t),...Yo(t)]:[...e,t.name],[])}function Yo(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Yo(t),...Wo(t)]:[...e,t.name],[])}function Fu(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Fu(t),...Uu(t)]:[...e,t],[])}function Uu(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Uu(t),...Fu(t)]:[...e,t],[])}function xu(r){return[...Yo(r),...Wo(r)].filter((t,i,a)=>a.indexOf(t)===i)}function ju(r){return r.implements.length===0&&r.extends.length===0?null:r.implements.find(i=>i.type===n.BuiltInBaseEntity&&i.name===V.PERSISTED_ENTITY)?r:[...r.implements,...r.extends].reduce((i,a)=>{if(a.type===n.CustomEntity){const s=ju(a);if(s)return s}return i},null)}function l7(r){const e=r.extends.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function c7(r){const e=r.implements.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function ku(r){const e=r.extends.find(t=>t.type===n.CustomEntity);return e&&e.type===n.CustomEntity?e:null}function _n(r){const e=[...r.implements,...r.extends].reduce((t,i)=>i.type===n.BuiltInBaseEntity?[...t,i]:i.type===n.CustomEntity?[...t,..._n(i)]:t,[]);return E(e)}function qu(r){return r.type===n.PrimitiveEntity?!0:r.type===n.BuiltInBaseEntity?r.interactive:!_n(r).find(i=>!i.interactive)}function d7(r){return r.parent===r.project&&r.project.variableDeclarations.includes(r)}function Ju(r){return r.parent!==r.project?!1:n.VariableDeclaration===r.type?r.project.variableDeclarations.includes(r):n.VariableInstance===r.type?r.project.variableInstances.includes(r):n.FunctionCall===r.type?r.project.functionCalls.includes(r):n.Condition===r.type?r.project.conditions.includes(r):n.Operation===r.type?r.project.operations.includes(r):n.Loop===r.type?r.project.loops.includes(r):n.Search===r.type?r.project.searches.includes(r):!1}function nA(r){if([...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||Ju(r))return!1;const e=kr(r);return e.length===0?!0:e.some(t=>nA(t))}function Wu(r){return[...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||Ju(r)?!1:kr(r).length===0}function rA(r,e=0){if(Wu(r)){const t=kr(r);return t.length===0?r:t.map(a=>rA(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function iA(r){const e=[];if(Wu(r))e.push(r);else return[];return kr(r).forEach(i=>{e.push(...iA(i))}),e}function aA(r){return r.type===n.FunctionDeclaration&&r.parent!==r.project&&!![n.CustomEntity,n.Loop,n.InstalledProject].includes(r.parent.type)}function u7(r,e){const t=new Map;return r.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function Ho(r){switch(r){case n.CustomEntity:return qr;case n.FunctionDeclaration:return wr;case n.VariableDeclaration:return Vr;case n.VariableInstance:return Lr;case n.FunctionCall:return jr;case n.Operation:return _r;case n.Condition:return Mr;case n.ReturnStatement:return Ur;case n.Loop:return Nr;case n.Search:return Gr;case n.InputMap:return Cn;case n.OutputMap:return Bn;case n.ArgumentDeclaration:return Fr;case n.ReturnDeclaration:return Nt;case n.Property:return Br;case n.InstalledProject:return $r;case n.Project:return _;case n.BuiltInBaseEntity:return Xt;default:return null}}function Rt(r,e){if(dt.includes(r.type))return r;if(zr.includes(r.type))return null;const t=r.parent;if(!t)return null;if(t.type===n.GenericReference){const i=N(t);if(!i)return null;const a=e.get(i);return a?Rt(a,e):null}else return t===e?e:Rt(t,e)}function Yu(r,e){if(zr.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Mt(r.parent,e);return t?t===e?dt.includes(r.type)?r:null:t.type===n.CustomEntity?r:Yu(t,e):null}function zo(r,e,t){if(r===e||e===t||r===t)return!1;const i=Rt(e.parent,t);return i===r?!0:zo(i,e,t)}var Zo=(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))(Zo||{});function Wa(r,e,t){const i=Rt(r,t),a=Rt(e,t);if(!i)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(i===a&&i.type!==n.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:i};if(i===a&&i.type===n.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:i};if(i.type===n.Project&&a.type!==n.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:i};if(i.type!==n.Project&&a.type===n.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(zo(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(zo(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=Mu(i,a);return l===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:l}:l?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:Rt(l,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function sA(r,e,t){const i=Wa(r,e,t);if(!i.compatible||i.type!=="same-both-local")return null;if(r===e)return r;let a=Rt(r.parent,t);if(a){if(a===e)return e;if(a.type===n.Project)return r}else return r;for(;a;){if(a){if(a===e)return e;if(a.type===n.Project)return r}else return r;a=Rt(a.parent,t)}let s=Rt(e.parent,t);if(s){if(s===r)return r;if(s.type===n.Project)return e}else return e;for(;s;){if(s){if(s===r)return r;if(s.type===n.Project)return e}else return e;s=Rt(s.parent,t)}return null}function oA(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,i)=>{const a=sA(t,i,i.project);return!a||a===i?t:i},r[0])}function Mt(r,e){let t;return typeof r=="string"?t=r:r.type===n.GenericReference?t=N(r):t=r.id,t===e.id?e:e.get(t)}function tr(r){if(!r)return null;if(zr.includes(r.type))return r;if(r.type===n.Project)return null;if(r.project.getBuiltIn(r.id))return r;const e=r.parent;return!e||e.type===n.Project?null:tr(e)}function Ya(r,e){var t;if(r.readsValue){const i=Mt(r.readsValue,e.project);e.setValueWriter(i),i.addValueReader(e)}else r.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function Ha(r){const e=[];function t(s,o){return e.some(l=>l.blockedByCaller===s&&l.blockedByCalling===o)}function i(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=Yu(r,r.project);return r.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))});let l;if(je.includes(s.type)&&(l=s),l){const p=Ha(l);p.reachable||Me(r).find(m=>m===s)||p.blocks.forEach(m=>{i(s,m.blockedByCalling)})}}),r.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))});let l;if(je.includes(s.type)&&(l=s),l){const p=Ha(l);p.reachable||Me(r).find(m=>m===s)||p.blocks.forEach(m=>{i(s,m.blockedByCalling)})}}),r.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))}),s===a)return;let l;if(s.type===n.FunctionDeclaration){const p=et(s);if(p.type===n.CustomEntity)return;p.type===n.Loop&&(l=p)}if(l){const p=Ha(l);p.reachable||p.blocks.forEach(y=>{i(s,y.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function p7(r){return nl.includes(r.type)?r.type===n.FunctionDeclaration?!aA(r):!0:!1}function y7(r){if(n.ActionDescriptor===r.type){if(r.project.operationDeclarations.find(s=>s.id===r.id))return n.Operation;if(r.project.globalEventActionDescriptors.find(s=>s.id===r.id))return n.GlobalEvent;if(r.project.loopDeclarations.find(s=>s.id===r.id))return n.Loop;if(r.project.conditionDeclarations.find(s=>s.id===r.id))return n.Condition}return r.type}function Vi(r,e){if(r.type!==n.CustomEntity||r.abstract)return!1;const t=ku(r)||r;return!!xu(t).includes(e)}function h7(r){const e=[];return r.entities.forEach(t=>{if(Vi(t,V.PERSISTED_ENTITY)){e.push(t);return}}),E(e)}function f7(r){const e=[];return r.entities.forEach(t=>{if(Vi(t,V.RELATIONAL_DATABASE)){e.push(t);return}}),E(e)}function m7(r){return r.type!==n.CustomEntity||r.abstract||!Vi(r,V.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>t.primary))||null}function T7(r){if(r.type!==n.CustomEntity)return[];if(r.abstract)return[];if(!Vi(r,V.PERSISTED_ENTITY))return[];const e=[],t=r.properties.filter(i=>{var a;return((a=i.implements)==null?void 0:a.id)!==B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties.database.id&&!i.abstract});return e.push(...t),e}function E7(r){var i;if(!r||r.type!==n.CustomEntity||!Vi(r,V.PERSISTED_ENTITY))return null;const t=ju(r).properties.find(a=>{var s;return((s=a.implements)==null?void 0:s.id)===B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties.database.id});return t?(i=t.getDefaultValue())==null?void 0:i.valueAsType:null}function b7(r){const e=z3(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>v7(r,h)),s=r.extends.flatMap(h=>I7(r,h)),o=P7(r),l=D7(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return ie(r.errors,p)}function R7(r,e){const t=e.properties.filter(s=>s.abstract),i=[];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):i.push(s)}),i}function g7(r,e){const t=e.abstractMethods,i=[];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):i.push(s)}),i}function v7(r,e){const t=[];if(!e.abstract){const h=Y({id:r.id+"--"+M.ImplementingNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:T.Error,code:M.ImplementingNonAbstractEntity,entity:r});return t.push(h.error),t}const i=e.properties.filter(h=>h.abstract),a=[];let s=[...r.properties];i.forEach(h=>{const m=s.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});m?s=s.filter(R=>R.id!==m.id):a.push(h)}),a.length&&a.forEach(h=>{const m=Y({id:r.id+"--"+M.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:T.Error,code:M.MissingPropertyImplementation,entity:r});t.push(m.error)});const o=[];let l=[...r.methods];e.abstractMethods.forEach(h=>{const m=l.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});m?l=l.filter(R=>R.id!==m.id):o.push(h)}),o.length&&o.forEach(h=>{const m=Y({id:r.id+"--"+M.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:T.Error,code:M.MissingMethodImplementation,entity:r});t.push(m.error)});const p=[];e.properties.forEach(h=>{const m=s.find(R=>R.name===h.name);m&&p.push([m,h])}),p.length&&p.forEach(([h])=>{const m=Y({id:r.id+"--"+S.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:T.Error,code:S.PropertyOverwrite,entity:r});t.push(m.error)});const y=[];return e.methods.forEach(h=>{const m=l.find(R=>R.name===h.name);m&&y.push([m,h])}),y.length&&y.forEach(([h])=>{const m=Y({id:r.id+"--"+S.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:T.Error,code:S.MethodOverwrite,entity:r});t.push(m.error)}),t}function I7(r,e){const t=[],i=[];if(e.abstract){const s=Y({id:r.id+"--"+M.ExtendingAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:T.Error,code:M.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&&i.push(s)}),i.length&&i.forEach(s=>{const o=Y({id:r.id+"--"+S.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:T.Error,code:S.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=Y({id:r.id+"--"+S.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:T.Error,code:S.MethodOverwrite,entity:r});t.push(o.error)}),t}function D7(r){const e=[];if(!r.properties.length){const o=Y({id:r.id+"--"+M.NoProperties,message:"No properties implemented",issue:null,severity:T.Warning,code:M.NoProperties,entity:r});e.push(o.error)}const t=!r.properties.some(o=>o.primary),i=_n(r),a=!i.length||i.every(o=>o.interactive),s=i.find(o=>o.id===B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id);if(r.properties.length&&t&&!r.static&&a&&s){const o=Y({id:r.id+"--"+M.NoPrimaryKeyProperty,message:"No primary key property implemented",issue:null,severity:T.Error,code:M.NoPrimaryKeyProperty,entity:r});e.push(o.error)}return r.properties.forEach(o=>{o.validate()}),e}function P7(r){const e=[];if(r.abstract){if(r.methods.length){const t=Y({id:r.id+"--"+M.AbstractEntityWithNonAbstractMethods,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:T.Error,code:M.AbstractEntityWithNonAbstractMethods,entity:r});e.push(t.error)}if(r.properties.some(t=>!t.abstract)){const t=Y({id:r.id+"--"+M.AbstractEntityWithNonAbstractProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:T.Error,code:M.AbstractEntityWithNonAbstractProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.abstract){const a=Y({id:r.id+"--"+M.StaticEntityWithNonStaticProperties+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:T.Error,code:M.StaticEntityWithNonStaticProperties,entity:r});e.push(a.error)}})}}else{if(r.abstractMethods.length){const t=Y({id:r.id+"--"+M.AbstractPropertyInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract methods`,issue:null,severity:T.Error,code:M.AbstractPropertyInNonAbstractEntity,entity:r});e.push(t.error)}if(r.properties.some(t=>t.abstract)){const t=Y({id:r.id+"--"+M.AbstractMethodInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract properties`,issue:null,severity:T.Error,code:M.AbstractMethodInNonAbstractEntity,entity:r});e.push(t.error),r.properties.forEach(i=>{if(i.abstract){const a=Y({id:r.id+"--"+M.AbstractMethodInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:T.Error,code:M.AbstractMethodInNonAbstractEntity,entity:r});e.push(a.error)}})}}if(r.static&&r.properties.some(t=>!t.static)){const t=Y({id:r.id+"--"+M.StaticEntityWithNonStaticProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as static but has non-static properties`,issue:null,severity:T.Error,code:M.StaticEntityWithNonStaticProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.static){const a=Y({id:r.id+"--"+M.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is not marked as static but the entity is marked as static`,issue:null,severity:T.Error,code:M.NonStaticPropertyInStaticEntity,entity:r});e.push(a.error)}})}return e}function A7(r,e){const t=[];if(r.parent)if(r.id===r.parent)t.push(new b({id:`${r.id}--${r.parent}--${f.SelfReference}`,code:f.SelfReference,severity:T.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 i=e.get(r.parent);i?[n.Project,n.DataType].includes(i.type)||t.push(new b({id:`${r.id}--${r.parent}--${f.InvalidParentReference}`,code:f.InvalidParentReference,severity:T.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 b({id:`${r.id}--${r.parent}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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(i=>{if(r.id===i){t.push(new b({id:`${r.id}--${i}--${f.SelfReference}`,code:f.SelfReference,severity:T.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(i);a?[n.CustomEntity,n.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new b({id:`${r.id}--${i}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 b({id:`${r.id}--${i}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${i}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${i}" 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 b({id:`${r.id}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.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(i=>{const a=e.get(i);a?[n.CustomEntity,n.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new b({id:`${r.id}--${i}--${f.InvalidExtendsReference}`,code:f.InvalidExtendsReference,severity:T.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 b({id:`${r.id}--${i}--${f.InvalidExtendsReference}`,code:f.InvalidExtendsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${i}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${i}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}),t}const Ne=class Ne{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",n.CustomEntity);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 i=t;if(e.parent){const p=N(e.parent);i=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:n.CustomEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:i},l=g(o,t);return l.setParent(i),l.initChildren(),l}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=A7(i,t),o=No(i,t);a.push(...s,...o,...Le(i));const l=i.parent?t.get(i.parent):null;if(l&&l.type===n.DataType){const p=l;p.entity&&a.push(new b({id:`${e.id}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.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.
|
|
368
|
+
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}}addSelfToProject(){var a;const e=[this],t=[],i=[];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:E(e),added:E(t),removed:E(i),self:this}}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}removeInput(e){const t=this.inputs.findIndex(i=>i.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(i=>i.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.push(e),this}addSuccessCall(e){return 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 i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,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(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===n.FunctionDeclaration){const e=g(this.initialData.declaration,this.project);this.declaration=e}else{const e=N(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=g(e,this.project);return t.addSuccessCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=g(e,this.project);return t.addErrorCaller(this),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==n.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=g(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=g(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.syncMissingFixedInputs(),this.syncMissingFixedOutputs(),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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){var s;const i=[],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});i.push(...o),a.push(...l)}if(this.inputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.outputs.forEach(o=>{const{affected:l,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...l),a.push(...p)}),this.error){const{affected:o,removed:l}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}return this.successCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),this.errorCalls.forEach(o=>{i.push(o),o.removeCaller(this)}),e||this.calledBy.forEach(o=>{i.push(o),o.removeCall(this)}),{affected:E(i),removed:E(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:i}=this.process.restore({seenEntities:e});t.push(...i)}return this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:E(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.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(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:(e=this.process)==null?void 0:e.toJSON(),declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),parent:this.parent.toReference(),error:(t=this.error)==null?void 0:t.toJSON()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,process:this.process?this.process.toReference():null,inputs:this.inputs.map(e=>e.toReference()),outputs:this.outputs.map(e=>e.toReference()),declaration:this.declaration.toReference(),successCalls:this.successCalls.map(e=>e.toReference()),errorCalls:this.errorCalls.map(e=>e.toReference()),calledBySuccess:this.calledBySuccess.map(e=>e.toReference()),calledByError:this.calledByError.map(e=>e.toReference()),calledByEntry:this.calledByEntry.map(e=>e.toReference()),error:this.error?this.error.toReference():null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.successCalls.flatMap(i=>i.toFlatJSON(e)),...this.errorCalls.flatMap(i=>i.toFlatJSON(e)),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.outputs.flatMap(i=>i.toFlatJSON(e)),...this.process?this.process.toFlatJSON(e):[],...this.error?this.error.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===n.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(i=>i.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.process?this.process.toFlatGenerationTarget(e):[],...this.error?this.error.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=H2(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){return new _e(this.toJSON(),this.project)}removeUnrecognizedInputs(){const e=[],t=[],i=[];return this.inputs.forEach(a=>{if(!this.declaration.inputs.find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}removeUnrecognizedOutputs(){const e=[],t=[],i=[];return this.outputs.forEach(a=>{if(!this.declaration.getUniqueReturnDeclarations().find(o=>o.id===a.declaration.id)){const o=a.remove();i.push(...o.removed),e.push(...o.affected)}}),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedInputs(){const e=[],t=[],i=[],a=this.declaration.inputs.filter(p=>!this.inputs.find(y=>y.declaration.id===p.id));this.inputs.sort((p,y)=>p.index-y.index),a.forEach(p=>{this.inputs.forEach(m=>{m.index>=p.index&&m.sync({index:m.index+1})});const y={id:_.UUID.uuid(),version:1,type:n.InputMap,declaration:p.toJSON(),readsValue:null,defaultValue:null,index:p.index,name:null,description:null,parent:this.toReference()},h=g(y,this.project);h.setParent(this),h.initChildren(),h.addSelfToProject(),t.push(h)}),this.inputs.sort((p,y)=>p.index-y.index);const{updated:s,added:o,removed:l}=this.removeUnrecognizedInputs();return e.push(...s),t.push(...o),i.push(...l),{updated:E(e),added:E(t),removed:E(i),self:this}}syncMissingFixedOutputs(){const e=[],t=[],i=[],a=[];this.outputs=this.initialData.outputs.map(y=>{const h=g(y,this.project);return a.push(h.index),h.setParent(this),h.initChildren(),h});const s=this.declaration.getUniqueReturnDeclarations().filter(y=>!this.outputs.find(h=>h.declaration.id===y.id));this.outputs.sort((y,h)=>y.index-h.index),s.forEach((y,h)=>{this.outputs.forEach(P=>{P.index>=y.index&&P.index++});const m=a.includes(y.index)?this.outputs.length-1+h:y.index,R={id:_.UUID.uuid(),version:1,type:n.OutputMap,declaration:y.toJSON(),writesValues:[],index:m,parent:this.toReference()},v=g(R,this.project);v.setParent(this),v.initChildren(),v.addSelfToProject()}),this.outputs.sort((y,h)=>y.index-h.index);const{updated:o,added:l,removed:p}=this.removeUnrecognizedOutputs();return e.push(...o),t.push(...l),i.push(...p),{updated:E(e),added:E(t),removed:E(i),self:this}}};c(_e,"MUTABLE_BASE_PROPERTIES",[]),c(_e,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(_e,"BASE_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,..._e.INMUTABLE_BASE_PROPERTIES]),c(_e,"MUTABLE_META_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",["declaration","parent"]),c(_e,"UPSTREAM_PROPERTIES",[..._e.MUTABLE_UPSTREAM_PROPERTIES,..._e.INMUTABLE_UPSTREAM_PROPERTIES]),c(_e,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),c(_e,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(_e,"DOWNSTREAM_PROPERTIES",[..._e.MUTABLE_DOWNSTREAM_PROPERTIES,..._e.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(_e,"PROPERTIES",[..._e.META_PROPERTIES,..._e.UPSTREAM_PROPERTIES,..._e.DOWNSTREAM_PROPERTIES]);let jr=_e;function VP(r){var e,t,i;switch(r.id){case B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=r.project.entities.filter(h=>!!h.implements.find(m=>m.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(a.find(h=>!!h.properties.find(m=>{var R;return m.implements&&m.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((R=m.getDefaultValue())==null?void 0:R.value)===!0}))){const m=a[0].properties.find(v=>v.implements&&v.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),R=(e=m==null?void 0:m.dataType)==null?void 0:e.defaultValue;if(R)R.value=!0;else if(m!=null&&m.dataType){const v=(t=m==null?void 0:m.dataType)==null?void 0:t.id.split("-id")[0],P=g({id:v+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:!0,valueAsType:null,parent:m==null?void 0:m.dataType.toReference()},r.project);return P.setParent(m==null?void 0:m.dataType),P.initChildren(),P.addSelfToProject(),{newEntities:[P]}}return{newEntities:[]}}const o=r.project.get(B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),l=jo(o,"Main database");if(l.errors.length>0)return{newEntities:[]};const p=l.implemented.properties.find(h=>h.implements&&h.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id),y=(i=p==null?void 0:p.dataType)==null?void 0:i.defaultValue;if(y)y.value=!0;else if(p!=null&&p.dataType){const h=p==null?void 0:p.dataType.id.split("-id")[0],m=g({id:h+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:!0,valueAsType:null,parent:p==null?void 0:p.dataType.toReference()},r.project);m.setParent(p==null?void 0:p.dataType),m.initChildren(),m.addSelfToProject()}return{newEntities:[l.implemented]}}}return{newEntities:[]}}function LP(r){return r.implements.filter(t=>t.type===n.BuiltInBaseEntity).map(t=>{var i;switch(t.id){case B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const s=r.project.entities.filter(p=>p.implements.find(y=>y.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(p=>!!p.properties.find(y=>{var h;return y.implements&&y.implements.id===B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id&&((h=y.getDefaultValue())==null?void 0:h.value)===!0}));if(!s)return{newEntities:[]};const o=r.properties.find(p=>p.implements&&p.implements.id===B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id),l=(i=o==null?void 0:o.dataType)==null?void 0:i.defaultValue;if(o&&(o!=null&&o.dataType)&&!l){const p=o==null?void 0:o.dataType.id.split("-id")[0],y=g({id:p+"-default-value-id",version:1,type:n.PrimitiveValue,name:I.EntityTemplate,parentRelationType:null,autogeneration:null,value:null,valueAsType:s,parent:o==null?void 0:o.dataType.toReference()},r.project);return y.setParent(o==null?void 0:o.dataType),y.initChildren(),y.addSelfToProject(),{newEntities:[y]}}return{newEntities:[]}}}}),{newEntities:[]}}function jo(r,e,t){const i=t||ze(e,n.CustomEntity,r.project),a=i.split("-id"),s=a[a.length-1||0]||i,o={id:i,version:1,name:e,type:n.CustomEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[r],x:0,y:0,parent:r.project},l=No(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=VP(r),y=g(o,r.project);y.setParent(r.project),y.initChildren();const h=r.properties.map(v=>{const P=s+"-"+ze(C(v,r.project),n.Property,r.project),A=v.clone(y,P);return A.abstract=!1,A.implements=v,A.setParent(y),y.addProperty(A),A}),m=r.abstractMethods.map(v=>{const P=s+ze(v.name,n.FunctionDeclaration,r.project),A=v.implementAsFunctionDeclaration(P),D={id:P+"-parent-ref-id",type:n.GenericReference,entityId:i,entityType:n.CustomEntity},F={...A,implements:v,parent:D},k=g(F,r.project);return y.addMethod(k),k.setParent(y),k.initChildren(),k.implements=v,k});o.properties=h,o.methods=m;const R=LP(y);return{implemented:y,errors:[],entitiesChanges:{new:[y,...p.newEntities,...R.newEntities],updated:[y],deleted:[]}}}function _u(r,e){return e.entities.find(a=>{const s=a.properties,o=s.map(m=>m.name),l=r.every(m=>o.includes(m)),p=o.filter(m=>!r.includes(m)),y=s.every(m=>!p.includes(m.name)||!m.required);return l&&y})||null}function GP(r,e,t=Ze.OrDataTypeGroup){const i=[],a=[],s=[],l={id:e.id+"--nested-data-type-id-"+r.id,version:1,type:n.DataType,entity:r.toJSON(),isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:t,parent:e.toReference()},p=g(l,r.project);return a.push(p),p.setParent(e),p.initChildren(),p.setEntity(r),p.addSelfToProject(),{updated:E(i),added:E(a),removed:E(s),self:p}}function Nu(r,e,t,i){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 y=e.project.getBuiltIn(B[n.PrimitiveEntity][I.Date].id);e.setEntity(y);break}else{const y=e.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id);e.setEntity(y);break}case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}else if(Array.isArray(r))if(e.sync({isList:!0}),r.length>0){const y=r.slice(0,5).filter(m=>m!==void 0);if(y.every(m=>typeof m==typeof y[0])&&(typeof y[0]!="object"||y[0]===null))switch(typeof y[0]){case"string":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}else{const m=[];let R=!1;y.forEach((P,A)=>{if(Array.isArray(P)&&(R=!0),typeof P=="object"&&!Array.isArray(P)&&P!==null){const D=ko(P,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);D.hasCreated&&m.push(D.changeSet.self),a.push(...D.changeSet.updated),s.push(...D.changeSet.added),o.push(...D.changeSet.removed)}});const v=E(m);if(!v.length&&!R){y.forEach(P=>{const A={id:_.UUID.uuid(),version:1,type:n.DataType,entity:null,isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ze.OrDataTypeGroup,parent:e.toReference()},D=g(A,e.project);switch(D.setParent(e),D.initChildren(),D.addSelfToProject(),typeof P){case"string":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.String].id));break;case"number":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Number].id));break;case"boolean":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Boolean].id));break;case"object":D.setEntity(D.project.getBuiltIn(B[n.PrimitiveEntity][I.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):y.forEach((P,A)=>{if(typeof P=="object"&&!Array.isArray(P)&&P!==null){const D=_u(Object.keys(P),e.project);if(D){const F=GP(D||v[0],e,Ze.OrDataTypeGroup);a.push(...F.updated),s.push(...F.added),o.push(...F.removed)}}else{const D={id:e.id+"--or-child-data-type-id--"+A,version:1,type:n.DataType,entity:null,isList:Array.isArray(P),isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ze.OrDataTypeGroup,parent:e.toReference()},F=g(D,e.project);F.setParent(e),F.initChildren(),F.addSelfToProject();const k=Nu(P,F,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);a.push(...k.updated),s.push(...k.added),o.push(...k.removed)}})}}else{const y=ko(r[0],e.project,{...t},i);e.setEntity(y.changeSet.self),a.push(...y.changeSet.updated),s.push(...y.changeSet.added),o.push(...y.changeSet.removed);break}else{const y=ko(r,e.project,{...t},i);e.setEntity(y.changeSet.self),a.push(...y.changeSet.updated),s.push(...y.changeSet.added),o.push(...y.changeSet.removed);break}}return{updated:E(a),added:E(s),removed:E(o),self:e}}function ko(r,e,t,i){const a=[],s=[],o=[],l=Object.keys(r),p=_u(l,e);if(p)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],self:p}};const y=i?t.name+" of "+i.name:t.name,m={id:t.id||ze(y,n.CustomEntity,e),version:1,name:y,type:n.CustomEntity,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=g(m,e);return R.setParent(e),R.initChildren(),R.addSelfToProject(),s.push(R),l.forEach((v,P)=>{const A=ze(y+" "+v,n.Property,e),D={id:A,version:1,name:v,type:n.Property,description:null,static:!1,abstract:!1,dataType:null,implements:null,index:P,hidden:!1,primary:!1,private:!1,required:!0,parent:R.toReference()},F=g(D,e);F.setParent(R),F.initChildren(),F.addSelfToProject(),s.push(F);const k=r[v],me={id:A+"--data-type-id",version:1,type:n.DataType,entity:null,isList:!1,isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parent:F.toReference()},ae=g(me,e);ae.setParent(F),ae.initChildren(),ae.addSelfToProject(),s.push(ae);const qe=Nu(k,ae,{...t,name:v,id:A+"--data-type-entity-id"},i||R);a.push(...qe.updated),s.push(...qe.added),o.push(...qe.removed)}),{hasCreated:!0,changeSet:{updated:E(a),added:E(s),removed:E(o),self:R}}}function qo(r,e){const t=kr(r);if(t.length===0)return{list:[],last:null};let i=null;return{list:t.flatMap(s=>{if(s===e)return i=s,[s];const o=qo(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function $P(r,e,t=new Set){const i=er(r),a=er(e),s=i.filter(p=>!a.includes(p)),o=i.filter(p=>a.includes(p)),l=s.reduce((p,y)=>t.has(y.id)?p:(t.add(y.id),E([...p,...$P(y,e,t)])),[]);return E([...o,...l])}function Ja(r,e){const t=qo(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function z2(r,e){return!!qo(r,e).last}function Z2(r){if(Ue.includes(r.type))return r;if([...Mn,n.VariableDeclaration].includes(r.type)){const e=r.parent;return Ue.includes(e.type)?e:null}return null}function Mu(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===n.Project)return null}else return null;const i=e.parent;if(i){if(i===r)return r;if(i.type===n.Project)return null}else return null;return Mu(t,i)}function et(r){if(nl.includes(r.type)){if(r.type===n.FunctionDeclaration){const e=r.parent;if(e.type===n.CustomEntity)return e;if(e.type===n.Loop)return e}return r}else{const e=r.parent;return e?et(e):null}}function K2(r){return r.type===n.VariableDeclaration?[r]:je.includes(r.type)?[...r.inputs,...r.outputs||[]]:Ve.includes(r.type)?r.outputs:Hr.includes(r.type)||r.type===n.FunctionDeclaration?r.inputs:[]}function X2(r){const e=er(r),t=[],i=[];Hu.includes(r.type)&&t.push(...Vu(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Mn.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>Ja(o,s)?-1:0),i.sort((s,o)=>Ja(o,s)?-1:0),[...t,...i,...a]}function FP(r){return[...r].sort((e,t)=>Ja(t,e)?-1:0)}function Q2(r){const e=FP(r),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];Ja(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function Rt(r){const e=r.map(t=>et(t));return E(e)}function Vu(r){return je.includes(r.type)?[...Rt(r.successCalls),...Rt(r.errorCalls)]:Ue.includes(r.type)?Rt(r.calls):[]}function e7(r,e){return Vu(r).includes(e)}function Lu(r){return r.writesValues||[]}function t7(r,e){return Lu(r).includes(e)}function UP(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function n7(r){return r.writesValues}function xP(r=[]){return r.map(UP).filter(e=>!!e)}function Jo(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function jP(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function kP(r){return Fe.includes(r.type)?r:null}function qP(r){return r.writesValues.map(kP).filter(e=>!!e)}function JP(r=[]){return r.reduce((e,t)=>t.type===n.OutputMap?[...e,...qP(t)]:e,[])}function Me(r){return je.includes(r.type)?[...pn(Rt(r.successCalls)),...pn(Rt(r.errorCalls))]:Ue.includes(r.type)?pn(Rt(r.calls)):[]}function r7(r){return je.includes(r.type)?[...pn(Rt(r.successCalls)),...pn(Rt(r.errorCalls))]:Ue.includes(r.type)?pn(Rt(r.calls)):[]}function WP(r,e=new Set){return r.writesValues.filter(i=>Fe.includes(i.type)&&!e.has(i.id)).reduce((i,a)=>e.has(a.id)?i:[...i,...re(a,e)],[])}function YP(r,e=new Set){var i;return(((i=r.readsValue)==null?void 0:i.writesValues)||[]).filter(a=>Fe.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...re(s,e)],[])}function re(r,e=new Set){if(e.has(r.id))return[];if(r.type===n.ReturnStatement)return jP(r.outputs).reduce((i,a)=>[...i,...re(a,e)],[]);if(r.type===n.FunctionCall||r.type===n.Operation||r.type===n.Condition)return[...Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]),...xP(r.inputs),...JP(r.outputs)].reduce((s,o)=>[...s,...re(o,e)],[]);if(Hr.includes(r.type)){const t=Jo(r.inputs),a=Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...re(o,e)],[])}if(r.type===n.FunctionDeclaration){const t=[...Jo(r.inputs)],a=Me(r).reduce((s,o)=>{const l=et(o);return[...s,...re(l||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...re(o)],[])}if(Fe.includes(r.type)){e.add(r.id);const i=Me(r).reduce((a,s)=>{const o=et(s);return[...a,...re(o||s,e)]},[]);return[r,...i,...YP(r,e),...WP(r,e)]}return[]}function St(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...er(r).reduce((a,s)=>[...a,s,...St(s,e)],[])])}function pn(r){return r.reduce((e,t)=>t.type===n.ReturnStatement||t.type===n.ContinueStatement||t.type===n.BreakStatement?[...e,t]:[...e,t,...Me(t)],[])}function HP(r){const e=r.entities||[],t=[...e,...r.functions||[],...r.events||[],...r.projects||[]],i=e.reduce((p,y)=>[...p,...y.properties],[]),a=e.reduce((p,y)=>[...p,...y.methods],[]),s=a.reduce((p,y)=>[...p,...Jo(y.inputs),...pn(Rt(y.calls)),...y.returnStatements],[]),o=r.functions.reduce((p,y)=>[...p,...pn(Rt(y.calls)),...y.returnStatements],[]),l=r.events.reduce((p,y)=>[...p,...pn(Rt(y.calls)),...y.returnStatements],[]);return[...t,...i,...a,...s,...o,...l]}function zP(r,e){return e.filter(i=>{if(!i)return!1;switch(i.type){case n.FunctionCall:return i.inputs.find(a=>a.id===r.id)!==void 0||i.outputs.find(a=>a.id===r.id)!==void 0;case n.Condition:return i.successCalls.find(a=>a.id===r.id)!==void 0||i.errorCalls.find(a=>a.id===r.id)!==void 0||i.inputs.find(a=>a.id===r.id)!==void 0;case n.Operation:return i.outputs.find(a=>a.id===r.id)!==void 0;case n.VariableDeclaration:return je.includes(r.type)?ZP(r).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===i.id})!==void 0:!1;case n.CustomEntity:return i.properties.find(a=>a.id===r.id)!==void 0||i.methods.find(a=>a.id===r.id)!==void 0;case n.FunctionDeclaration:return i.inputs.find(a=>a.id===r.id)!==void 0||(i.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===r.id)!==void 0;default:return!1}})}function i7(r){const e=HP(r.project);return zP(r,e)}function kr(r){const e=[];if(Mn.includes(r.type)){r.calledBy.forEach(a=>{const s=et(a);s&&e.push(s)});const i=[...r.inputs||[],...r.outputs||[]].map(a=>$u(a)).filter(a=>a!==null);e.push(...E(i))}if(Fe.includes(r.type)){const t=$u(r);t&&e.push(t)}return E(e)}function Gu(r){return r.type===n.FunctionCall||r.type===n.InternalCall||[n.Operation,n.Condition,n.Loop].includes(r.type)?r.declaration.inputs:r.type===n.FunctionDeclaration||Hr.includes(r.type)?r.inputs:r.type===n.Search?r.inputsDeclarations:[]}function a7(r,e){return e.type===n.Condition?e.inputs.find(t=>t.declaration.id===r.id):e.type===n.FunctionCall||e.type===n.Operation?e.inputs.find(t=>t.declaration.id===r.id):null}function ZP(r){return je.includes(r.type)?r.inputs:[]}function KP(r){var e;return r.type===n.FunctionCall?((e=r.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[n.Operation,n.Condition,n.Loop].includes(r.type)?r.declaration.outputs:r.type===n.Search?r.outputsDeclarations:Ve.includes(r.type)?r.outputs:[]}function s7(r,e){return e.type===n.Condition?null:e.type===n.FunctionCall||e.type===n.Operation?e.outputs.find(t=>t.declaration.id===r.id):null}function o7(r){return r.type===n.Condition?[]:je.includes(r.type)?r.outputs:[]}function $u(r){const e=r.readsValue;return e?et(e):null}function XP(r){const e=r.internalCalls||[];return E(Rt(E(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function Mi(r){const e=Lu(r),t=[];return e.forEach(i=>{if(Fe.includes(i.type))t.push(i);else if(Nn.includes(i.type)){const a=i.parent;t.push(a)}}),t}function E(r){const e=new Set;return r.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function er(r,e=!1){const t=[];if(r.type===n.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)||[]),ut.includes(r.type)&&t.push(...(r==null?void 0:r.detachedChildren)||[]),r.type===n.CustomEntity){const i=[...r.suggestedMethods,...r.methods].flatMap(a=>a.collapsed&&e?[]:er(a));t.push(...i)}if(r.type===n.Condition){const i=r.successCalls.map(s=>et(s)),a=r.errorCalls.map(s=>et(s));t.push(...i,...a)}if(Hr.includes(r.type)){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>Mi(s)).flat(),a=r.calls.map(s=>et(s));t.push(...E(i),...a)}if(je.includes(r.type)&&r.type!==n.Condition&&r.type!==n.Loop){const i=r==null?void 0:r.outputs.map(o=>Mi(o)).flat(),a=r.successCalls.map(o=>et(o)),s=r.errorCalls.map(o=>et(o));t.push(...E(i),...a,...s)}if(Fe.includes(r.type)){const i=Mi(r),a=XP(r);t.push(...i,...a)}if(r.type===n.Loop){const i=r.outputs.map(o=>Mi(o)).flat();if(r.body){const o=er(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>et(o)),s=r.successCalls.map(o=>et(o));t.push(...E(i),...s,...a)}if(r.type===n.FunctionDeclaration){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>Mi(s)).flat(),a=r.calls.map(s=>et(s));t.push(...E(i),...a)}return E(t)}function QP(r,e=!1){const t=er(r,e),i=[...t,...t.reduce((a,s)=>[...a,...QP(s,e)],[])];return E(i)}function eA(r){const e=kr(r),t=[...e,...e.reduce((i,a)=>[...i,...eA(a)],[])];return E(t)}function Wo(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Wo(t),...Yo(t)]:[...e,t.name],[])}function Yo(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Yo(t),...Wo(t)]:[...e,t.name],[])}function Fu(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Fu(t),...Uu(t)]:[...e,t],[])}function Uu(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Uu(t),...Fu(t)]:[...e,t],[])}function xu(r){return[...Yo(r),...Wo(r)].filter((t,i,a)=>a.indexOf(t)===i)}function tA(r){return r.implements.length===0&&r.extends.length===0?null:r.implements.find(i=>i.type===n.BuiltInBaseEntity&&i.name===V.PERSISTED_ENTITY)?r:[...r.implements,...r.extends].reduce((i,a)=>{if(a.type===n.CustomEntity){const s=tA(a);if(s)return s}return i},null)}function l7(r){const e=r.extends.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function c7(r){const e=r.implements.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function ju(r){const e=r.extends.find(t=>t.type===n.CustomEntity);return e&&e.type===n.CustomEntity?e:null}function _n(r){const e=[...r.implements,...r.extends].reduce((t,i)=>i.type===n.BuiltInBaseEntity?[...t,i]:i.type===n.CustomEntity?[...t,..._n(i)]:t,[]);return E(e)}function ku(r){return r.type===n.PrimitiveEntity?!0:r.type===n.BuiltInBaseEntity?r.interactive:!_n(r).find(i=>!i.interactive)}function d7(r){return r.parent===r.project&&r.project.variableDeclarations.includes(r)}function qu(r){return r.parent!==r.project?!1:n.VariableDeclaration===r.type?r.project.variableDeclarations.includes(r):n.VariableInstance===r.type?r.project.variableInstances.includes(r):n.FunctionCall===r.type?r.project.functionCalls.includes(r):n.Condition===r.type?r.project.conditions.includes(r):n.Operation===r.type?r.project.operations.includes(r):n.Loop===r.type?r.project.loops.includes(r):n.Search===r.type?r.project.searches.includes(r):!1}function nA(r){if([...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||qu(r))return!1;const e=kr(r);return e.length===0?!0:e.some(t=>nA(t))}function Ju(r){return[...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||qu(r)?!1:kr(r).length===0}function rA(r,e=0){if(Ju(r)){const t=kr(r);return t.length===0?r:t.map(a=>rA(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function iA(r){const e=[];if(Ju(r))e.push(r);else return[];return kr(r).forEach(i=>{e.push(...iA(i))}),e}function aA(r){return r.type===n.FunctionDeclaration&&r.parent!==r.project&&!![n.CustomEntity,n.Loop,n.InstalledProject].includes(r.parent.type)}function u7(r,e){const t=new Map;return r.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function Ho(r){switch(r){case n.CustomEntity:return qr;case n.FunctionDeclaration:return wr;case n.VariableDeclaration:return Vr;case n.VariableInstance:return Lr;case n.FunctionCall:return jr;case n.Operation:return _r;case n.Condition:return Mr;case n.ReturnStatement:return Ur;case n.Loop:return Nr;case n.Search:return Gr;case n.InputMap:return Cn;case n.OutputMap:return Bn;case n.ArgumentDeclaration:return Fr;case n.ReturnDeclaration:return Nt;case n.Property:return Br;case n.InstalledProject:return $r;case n.Project:return _;case n.BuiltInBaseEntity:return Xt;default:return null}}function gt(r,e){if(ut.includes(r.type))return r;if(zr.includes(r.type))return null;const t=r.parent;if(!t)return null;if(t.type===n.GenericReference){const i=N(t);if(!i)return null;const a=e.get(i);return a?gt(a,e):null}else return t===e?e:gt(t,e)}function Wu(r,e){if(zr.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Mt(r.parent,e);return t?t===e?ut.includes(r.type)?r:null:t.type===n.CustomEntity?r:Wu(t,e):null}function zo(r,e,t){if(r===e||e===t||r===t)return!1;const i=gt(e.parent,t);return i===r?!0:zo(i,e,t)}var Zo=(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))(Zo||{});function Wa(r,e,t){const i=gt(r,t),a=gt(e,t);if(!i)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(i===a&&i.type!==n.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:i};if(i===a&&i.type===n.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:i};if(i.type===n.Project&&a.type!==n.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:i};if(i.type!==n.Project&&a.type===n.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(zo(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(zo(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=Mu(i,a);return l===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:l}:l?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:gt(l,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function sA(r,e,t){const i=Wa(r,e,t);if(!i.compatible||i.type!=="same-both-local")return null;if(r===e)return r;let a=gt(r.parent,t);if(a){if(a===e)return e;if(a.type===n.Project)return r}else return r;for(;a;){if(a){if(a===e)return e;if(a.type===n.Project)return r}else return r;a=gt(a.parent,t)}let s=gt(e.parent,t);if(s){if(s===r)return r;if(s.type===n.Project)return e}else return e;for(;s;){if(s){if(s===r)return r;if(s.type===n.Project)return e}else return e;s=gt(s.parent,t)}return null}function oA(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,i)=>{const a=sA(t,i,i.project);return!a||a===i?t:i},r[0])}function Mt(r,e){let t;return typeof r=="string"?t=r:r.type===n.GenericReference?t=N(r):t=r.id,t===e.id?e:e.get(t)}function tr(r){if(!r)return null;if(zr.includes(r.type))return r;if(r.type===n.Project)return null;if(r.project.getBuiltIn(r.id))return r;const e=r.parent;return!e||e.type===n.Project?null:tr(e)}function Ya(r,e){var t;if(r.readsValue){const i=Mt(r.readsValue,e.project);e.setValueWriter(i),i.addValueReader(e)}else r.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function Ha(r){const e=[];function t(s,o){return e.some(l=>l.blockedByCaller===s&&l.blockedByCalling===o)}function i(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=Wu(r,r.project);return r.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))});let l;if(je.includes(s.type)&&(l=s),l){const p=Ha(l);p.reachable||Me(r).find(m=>m===s)||p.blocks.forEach(m=>{i(s,m.blockedByCalling)})}}),r.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))});let l;if(je.includes(s.type)&&(l=s),l){const p=Ha(l);p.reachable||Me(r).find(m=>m===s)||p.blocks.forEach(m=>{i(s,m.blockedByCalling)})}}),r.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{Ve.includes(p.type)&&p!==r&&(Me(r).find(m=>m===p)||i(s,p))}),s===a)return;let l;if(s.type===n.FunctionDeclaration){const p=et(s);if(p.type===n.CustomEntity)return;p.type===n.Loop&&(l=p)}if(l){const p=Ha(l);p.reachable||p.blocks.forEach(y=>{i(s,y.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function p7(r){return nl.includes(r.type)?r.type===n.FunctionDeclaration?!aA(r):!0:!1}function y7(r){if(n.ActionDescriptor===r.type){if(r.project.operationDeclarations.find(s=>s.id===r.id))return n.Operation;if(r.project.globalEventActionDescriptors.find(s=>s.id===r.id))return n.GlobalEvent;if(r.project.loopDeclarations.find(s=>s.id===r.id))return n.Loop;if(r.project.conditionDeclarations.find(s=>s.id===r.id))return n.Condition}return r.type}function Vi(r,e){if(r.type!==n.CustomEntity||r.abstract)return!1;const t=ju(r)||r;return!!xu(t).includes(e)}function h7(r){const e=[];return r.entities.forEach(t=>{if(Vi(t,V.PERSISTED_ENTITY)){e.push(t);return}}),E(e)}function f7(r){const e=[];return r.entities.forEach(t=>{if(Vi(t,V.RELATIONAL_DATABASE)){e.push(t);return}}),E(e)}function m7(r){return r.type!==n.CustomEntity||r.abstract||!Vi(r,V.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>t.primary))||null}function T7(r){if(r.type!==n.CustomEntity)return[];if(r.abstract)return[];if(!Vi(r,V.PERSISTED_ENTITY))return[];const e=[],t=r.properties.filter(i=>{var a;return((a=i.implements)==null?void 0:a.id)!==B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties.database.id&&!i.abstract});return e.push(...t),e}function E7(r){var i;if(!r||r.type!==n.CustomEntity||!Vi(r,V.PERSISTED_ENTITY))return null;const t=E([...r.allBasePropertiesFromExtendedAndImplementedEntities,...r.ownDeclaredProperties]).find(a=>{var s;return((s=a.implements)==null?void 0:s.id)===B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties.database.id});return(i=t==null?void 0:t.getDefaultValue())==null?void 0:i.valueAsType}function b7(r){const e=z3(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>v7(r,h)),s=r.extends.flatMap(h=>I7(r,h)),o=P7(r),l=D7(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return ie(r.errors,p)}function R7(r,e){const t=e.properties.filter(s=>s.abstract),i=[];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):i.push(s)}),i}function g7(r,e){const t=e.abstractMethods,i=[];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):i.push(s)}),i}function v7(r,e){const t=[];if(!e.abstract){const h=Y({id:r.id+"--"+M.ImplementingNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:T.Error,code:M.ImplementingNonAbstractEntity,entity:r});return t.push(h.error),t}const i=e.properties.filter(h=>h.abstract),a=[];let s=[...r.properties];i.forEach(h=>{const m=s.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});m?s=s.filter(R=>R.id!==m.id):a.push(h)}),a.length&&a.forEach(h=>{const m=Y({id:r.id+"--"+M.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:T.Error,code:M.MissingPropertyImplementation,entity:r});t.push(m.error)});const o=[];let l=[...r.methods];e.abstractMethods.forEach(h=>{const m=l.find(R=>{var v;return((v=R.implements)==null?void 0:v.id)===h.id});m?l=l.filter(R=>R.id!==m.id):o.push(h)}),o.length&&o.forEach(h=>{const m=Y({id:r.id+"--"+M.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:T.Error,code:M.MissingMethodImplementation,entity:r});t.push(m.error)});const p=[];e.properties.forEach(h=>{const m=s.find(R=>R.name===h.name);m&&p.push([m,h])}),p.length&&p.forEach(([h])=>{const m=Y({id:r.id+"--"+S.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:T.Error,code:S.PropertyOverwrite,entity:r});t.push(m.error)});const y=[];return e.methods.forEach(h=>{const m=l.find(R=>R.name===h.name);m&&y.push([m,h])}),y.length&&y.forEach(([h])=>{const m=Y({id:r.id+"--"+S.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:T.Error,code:S.MethodOverwrite,entity:r});t.push(m.error)}),t}function I7(r,e){const t=[],i=[];if(e.abstract){const s=Y({id:r.id+"--"+M.ExtendingAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:T.Error,code:M.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&&i.push(s)}),i.length&&i.forEach(s=>{const o=Y({id:r.id+"--"+S.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:T.Error,code:S.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=Y({id:r.id+"--"+S.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:T.Error,code:S.MethodOverwrite,entity:r});t.push(o.error)}),t}function D7(r){const e=[];if(!r.properties.length){const o=Y({id:r.id+"--"+M.NoProperties,message:"No properties implemented",issue:null,severity:T.Warning,code:M.NoProperties,entity:r});e.push(o.error)}const t=!r.properties.some(o=>o.primary),i=_n(r),a=!i.length||i.every(o=>o.interactive),s=i.find(o=>o.id===B["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id);if(r.properties.length&&t&&!r.static&&a&&s){const o=Y({id:r.id+"--"+M.NoPrimaryKeyProperty,message:"No primary key property implemented",issue:null,severity:T.Error,code:M.NoPrimaryKeyProperty,entity:r});e.push(o.error)}return r.properties.forEach(o=>{o.validate()}),e}function P7(r){const e=[];if(r.abstract){if(r.methods.length){const t=Y({id:r.id+"--"+M.AbstractEntityWithNonAbstractMethods,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:T.Error,code:M.AbstractEntityWithNonAbstractMethods,entity:r});e.push(t.error)}if(r.properties.some(t=>!t.abstract)){const t=Y({id:r.id+"--"+M.AbstractEntityWithNonAbstractProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:T.Error,code:M.AbstractEntityWithNonAbstractProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.abstract){const a=Y({id:r.id+"--"+M.StaticEntityWithNonStaticProperties+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:T.Error,code:M.StaticEntityWithNonStaticProperties,entity:r});e.push(a.error)}})}}else{if(r.abstractMethods.length){const t=Y({id:r.id+"--"+M.AbstractPropertyInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract methods`,issue:null,severity:T.Error,code:M.AbstractPropertyInNonAbstractEntity,entity:r});e.push(t.error)}if(r.properties.some(t=>t.abstract)){const t=Y({id:r.id+"--"+M.AbstractMethodInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract properties`,issue:null,severity:T.Error,code:M.AbstractMethodInNonAbstractEntity,entity:r});e.push(t.error),r.properties.forEach(i=>{if(i.abstract){const a=Y({id:r.id+"--"+M.AbstractMethodInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:T.Error,code:M.AbstractMethodInNonAbstractEntity,entity:r});e.push(a.error)}})}}if(r.static&&r.properties.some(t=>!t.static)){const t=Y({id:r.id+"--"+M.StaticEntityWithNonStaticProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as static but has non-static properties`,issue:null,severity:T.Error,code:M.StaticEntityWithNonStaticProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.static){const a=Y({id:r.id+"--"+M.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${r.name}" with id "${r.id}" is not marked as static but the entity is marked as static`,issue:null,severity:T.Error,code:M.NonStaticPropertyInStaticEntity,entity:r});e.push(a.error)}})}return e}function A7(r,e){const t=[];if(r.parent)if(r.id===r.parent)t.push(new b({id:`${r.id}--${r.parent}--${f.SelfReference}`,code:f.SelfReference,severity:T.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 i=e.get(r.parent);i?[n.Project,n.DataType].includes(i.type)||t.push(new b({id:`${r.id}--${r.parent}--${f.InvalidParentReference}`,code:f.InvalidParentReference,severity:T.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 b({id:`${r.id}--${r.parent}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.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(i=>{if(r.id===i){t.push(new b({id:`${r.id}--${i}--${f.SelfReference}`,code:f.SelfReference,severity:T.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(i);a?[n.CustomEntity,n.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new b({id:`${r.id}--${i}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.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 b({id:`${r.id}--${i}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'implements' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${i}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${i}" 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 b({id:`${r.id}--${S.InvalidObjectStructure}`,code:S.InvalidObjectStructure,severity:T.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(i=>{const a=e.get(i);a?[n.CustomEntity,n.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new b({id:`${r.id}--${i}--${f.InvalidExtendsReference}`,code:f.InvalidExtendsReference,severity:T.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 b({id:`${r.id}--${i}--${f.InvalidExtendsReference}`,code:f.InvalidExtendsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'extends' reference that isn't pointing to an entity of type 'custom-entity' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${i}--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", is referencing an entity with id "${i}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}),t}const Ne=class Ne{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",n.CustomEntity);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 i=t;if(e.parent){const p=N(e.parent);i=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:n.CustomEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:i},l=g(o,t);return l.setParent(i),l.initChildren(),l}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=A7(i,t),o=No(i,t);a.push(...s,...o,...Le(i));const l=i.parent?t.get(i.parent):null;if(l&&l.type===n.DataType){const p=l;p.entity&&a.push(new b({id:`${e.id}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.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.
|
|
369
369
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
370
370
|
${un({describe_entity:p.entity.id})}
|
|
371
|
-
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:i}}get allBaseRelatedPropertiesFromExtendedAndImplementedEntities(){return E([...this.extends.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBaseRelatedPropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[]),...this.implements.reduce((e,t)=>[...[...t.ownDeclaredProperties,...t.allBaseRelatedPropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract),...e],[])])}get extendedPropertiesFromOriginalParents(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...a,...e]},[]),...this.implements.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...a,...e]},[])])}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 b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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}}addSelfToProject(){const e=[this],t=[],i=[];if(this.parent.type===n.DataType){const a=this.parent;a.entity=this,e.push(a)}else this.project.addCustomEntity(this);return{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>g(e,this.project)),this.implements=this.initialData.implements.map(e=>g(e,this.project)),this.syncImplementationProperties(),this.addExtendedProperties(),this.addSuggestions(),this)}syncImplementationProperties(){return this.implementedPropertiesFromOriginalParents.forEach(t=>{if(this.properties.find(o=>{var l;return((l=o.implements)==null?void 0:l.id)===t.id}))return;const a=this.properties.find(o=>o.name===t.name&&!!o.abstract&&!o.implements);if(a){a.implements=t,a.abstract=!1;return}const s=t.clone(this);s.initChildren(),s.implements=t,s.abstract=!1,this.addProperty(s)}),this}addExtendedProperties(){const e=this.properties,t=this.extendedPropertiesFromOriginalParents,i=new Set(e.map(a=>a.name));return t.forEach(a=>{if(i.has(a.name))return;i.add(a.name);const s=a.clone(this);s.initChildren(),this.addProperty(s)}),this}addSuggestions(){return this.implements.forEach(e=>{R7(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=g(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),g7(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),l=g(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(y=>{y.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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.methods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(i=>i.toFlat(e)),...this.implements.flatMap(i=>i.toFlat(e)),...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(i=>i.toFlatIds(e)),...this.implements.flatMap(i=>i.toFlatIds(e)),...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),implements:this.implements.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),implements:this.implements.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e)),...this.implements.flatMap(i=>i.toFlatJSON(e)),...this.extends.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===n.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===n.CustomEntity).flatMap(i=>i.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=b7(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,i=!0){var R,v,P;const a=this.toJSON(),s=t||ze(C(this,this.project),n.CustomEntity,this.project);a.properties=[],a.methods=[],a.abstractMethods=[];const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const y=(R=this.properties)==null?void 0:R.map((A,D)=>A.clone(p,l+"-property-"+D+"-id",i));p.properties=y;const h=(v=this.methods)==null?void 0:v.map((A,D)=>A.clone(p,l+"-method-"+D+"-id",i));p.methods=h;const m=(P=this.abstractMethods)==null?void 0:P.map((A,D)=>A.clone(p,l+"-abstract-method-"+D+"-id",i));return p.abstractMethods=m,p}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return jo(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(i=>i.type===n.CustomEntity||i.type===n.BuiltInBaseEntity&&i.interactive);return E([...this.methods,...this.extends.flatMap(i=>i.getAllInteractiveMethods()),...e.flatMap(i=>i.getAllInteractiveMethods())])}inferFromInputs(e){if(this.parent.type!==n.DataType||!this.parent.inferred)return this;const t=[];e.forEach(s=>{t.find(l=>C(l,this.project)===C(s,this.project))||t.push(s)});const i=this.properties.filter(s=>!s.getDataType());t.forEach(s=>{const o=i.find(m=>C(m,this.project)===C(s,this.project));if(!o)return;const p=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),y=dn(p),h=y==null?void 0:y.clone(o,o.id+"--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=>C(v,this.project)===C(s,this.project));if(o){if(s.setDeclaration(o),!o.getDataType()){const P=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),A=dn(P),D=A==null?void 0:A.clone(o,o.id+"--data-type",!0);D&&o.setDataType(D)}return}const l={id:s.id+"--inferred-property",type:n.Property,version:1,name:C(s,this.project),description:s.description,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,primary:!1,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=g(l,this.project);p.setParent(this),p.initChildren();const h=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),m=dn(h),R=m==null?void 0:m.clone(p,l.id+"--data-type",!0);return R&&p.setDataType(R),this.addProperty(p),s.setDeclaration(p),p}),this)}};c(Ne,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),c(Ne,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Ne,"BASE_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,...Ne.INMUTABLE_BASE_PROPERTIES]),c(Ne,"MUTABLE_META_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,"x","y"]),c(Ne,"INMUTABLE_META_PROPERTIES",[...Ne.INMUTABLE_BASE_PROPERTIES]),c(Ne,"META_PROPERTIES",[...Ne.MUTABLE_META_PROPERTIES,...Ne.INMUTABLE_META_PROPERTIES]),c(Ne,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),c(Ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(Ne,"UPSTREAM_PROPERTIES",[...Ne.MUTABLE_UPSTREAM_PROPERTIES,...Ne.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),c(Ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ne,"DOWNSTREAM_PROPERTIES",[...Ne.MUTABLE_DOWNSTREAM_PROPERTIES,...Ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ne,"PROPERTIES",[...Ne.META_PROPERTIES,...Ne.UPSTREAM_PROPERTIES,...Ne.DOWNSTREAM_PROPERTIES]);let qr=Ne;function O7(r){const e=O9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class Xt{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",n.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(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>g(i,this.project))}get allBaseRelatedPropertiesFromExtendedAndImplementedEntities(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.allBaseRelatedPropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...i]},[]))}get extendedPropertiesFromOriginalParents(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...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(){return 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(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e)),...this.extends.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e)),...this.extends.flatMap(i=>i.toFlatIds(e))])}toJSON(){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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.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=O7(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}clone(){return new Xt(this.toJSON(),this.project)}implement(e,t){return jo(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(i=>i.type===n.BuiltInBaseEntity&&i.interactive||i.type===n.PrimitiveEntity).forEach(i=>{i instanceof Xt&&e.push(...i.getAllInteractiveMethods())})),E(e)}}function S7(r){const e=E9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class kt{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",n.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(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.parent=this,a})}get allBaseRelatedPropertiesFromExtendedAndImplementedEntities(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.allBaseRelatedPropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...i]},[]))}get extendedPropertiesFromOriginalParents(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...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(){return 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(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.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=S7(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}clone(){return new kt(this.toJSON(),this.project)}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(i=>i.type===n.BuiltInBaseEntity&&i.interactive||i.type===n.PrimitiveEntity).forEach(i=>{i instanceof Xt&&e.push(...i.getAllInteractiveMethods())}),E(e)}}function qt(r,e){if(!r)throw new Error("Entity is null");const t=e.get(r.id);switch(r.type){case n.PrimitiveValue:return t||new _i(r,e);case n.CustomEntity:return t||new qr(r,e);case n.PrimitiveEntity:return t||new kt(r,e);case n.FunctionDeclaration:return t||new wr(r,e);case n.GlobalEvent:return t||new Bi(r,e);case n.DataType:return t||new Ci(r,e);case n.Property:return t||new Br(r,e);case n.FunctionCall:return t||new jr(r,e);case n.Condition:return t||new Mr(r,e);case n.Operation:return t||new _r(r,e);case n.VariableDeclaration:return t||new Vr(r,e);case n.VariableInstance:return t||new Lr(r,e);case n.OutputMap:return t||new Bn(r,e);case n.ReturnDeclaration:return t||new Nt(r,e);case n.ArgumentDeclaration:return t||new Fr(r,e);case n.InputMap:return t||new Cn(r,e);case n.Project:return t||new _(r);case n.InstalledProject:return t||new $r(r,e);case n.ActionDescriptor:return t||new te(r,e);case n.ReturnStatement:return t||new Ur(r,e);case n.Loop:return t||new Nr(r,e);case n.Search:return t||new Gr(r,e);case n.ValueDescriptor:return t||new xr(r,e);case n.BuiltInBaseEntity:return t||new Xt(r,e);case n.InternalCall:return t||new wi(r,e);case n.ContinueStatement:return t||new Et(r,e);case n.BreakStatement:return t||new Ni(r,e);default:throw new Error("Invalid entity type: "+r.type)}}function g(r,e){if(!r)throw new Error("Entity is null");const t=qt(r,e);return t.subscribe(),t}function C7(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case n.PrimitiveValue:return _i.fromGenerationTarget(r,e);case n.CustomEntity:return qr.fromGenerationTarget(r,e);case n.FunctionDeclaration:return wr.fromGenerationTarget(r,e);case n.GlobalEvent:return Bi.fromGenerationTarget(r,e);case n.DataType:return Ci.fromGenerationTarget(r,e);case n.Property:return Br.fromGenerationTarget(r,e);case n.FunctionCall:return jr.fromGenerationTarget(r,e);case n.Condition:return Mr.fromGenerationTarget(r,e);case n.Operation:return _r.fromGenerationTarget(r,e);case n.VariableDeclaration:return Vr.fromGenerationTarget(r,e);case n.VariableInstance:return Lr.fromGenerationTarget(r,e);case n.OutputMap:return Bn.fromGenerationTarget(r,e);case n.ReturnDeclaration:return Nt.fromGenerationTarget(r,e);case n.ArgumentDeclaration:return Fr.fromGenerationTarget(r,e);case n.InputMap:return Cn.fromGenerationTarget(r,e);case n.InstalledProject:return $r.fromGenerationTarget(r,e);case n.ReturnStatement:return Ur.fromGenerationTarget(r,e);case n.Loop:return Nr.fromGenerationTarget(r,e);case n.Search:return Gr.fromGenerationTarget(r,e);case n.ActionDescriptor:return te.fromGenerationTarget(r,e);case n.ValueDescriptor:return xr.fromGenerationTarget(r,e);case n.InternalCall:return wi.fromGenerationTarget(r,e);case n.ContinueStatement:return Et.fromGenerationTarget(r,e);case n.BreakStatement:return Ni.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const ee=class ee{constructor(e){c(this,"initialData");c(this,"id");c(this,"version");c(this,"type",n.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",[]);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;try{(!ee.UUID||ee.UUID.isBackup)&&(ee.UUID=xs==null?void 0:xs()),ee.UUID||(ee.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),ee.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){ee.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Le(i)),{errors:a,modifiedData:i}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async i=>{await t.init(this),i(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return{updated:E(e),added:E(t),removed:E(i),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.entities=this.initialData.entities.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.validate(),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(){return this}async create(){return this}async update(e){return this}async delete(){return 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(i=>i.toFlat(e)),...this.functions.flatMap(i=>i.toFlat(e)),...this.events.flatMap(i=>i.toFlat(e)),...this.projects.flatMap(i=>i.toFlat(e)),...this.variableDeclarations.flatMap(i=>i.toFlat(e)),...this.variableInstances.flatMap(i=>i.toFlat(e)),...this.conditions.flatMap(i=>i.toFlat(e)),...this.operations.flatMap(i=>i.toFlat(e)),...this.functionCalls.flatMap(i=>i.toFlat(e)),...this.loops.flatMap(i=>i.toFlat(e)),...this.searches.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSON()),functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),projects:this.projects.map(e=>e.toJSON()),variableDeclarations:this.variableDeclarations.map(e=>e.toJSON()),variableInstances:this.variableInstances.map(e=>e.toJSON()),conditions:this.conditions.map(e=>e.toJSON()),operations:this.operations.map(e=>e.toJSON()),functionCalls:this.functionCalls.map(e=>e.toJSON()),loops:this.loops.map(e=>e.toJSON()),searches:this.searches.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+ee.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toReference()),functions:this.functions.map(e=>e.toReference()),events:this.events.map(e=>e.toReference()),projects:this.projects.map(e=>e.toReference()),variableDeclarations:this.variableDeclarations.map(e=>e.toReference()),variableInstances:this.variableInstances.map(e=>e.toReference()),conditions:this.conditions.map(e=>e.toReference()),operations:this.operations.map(e=>e.toReference()),functionCalls:this.functionCalls.map(e=>e.toReference()),loops:this.loops.map(e=>e.toReference()),searches:this.searches.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatJSON(e)),...this.functions.flatMap(i=>i.toFlatJSON(e)),...this.events.flatMap(i=>i.toFlatJSON(e)),...this.projects.flatMap(i=>i.toFlatJSON(e)),...this.variableDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.variableInstances.flatMap(i=>i.toFlatJSON(e)),...this.conditions.flatMap(i=>i.toFlatJSON(e)),...this.operations.flatMap(i=>i.toFlatJSON(e)),...this.functionCalls.flatMap(i=>i.toFlatJSON(e)),...this.loops.flatMap(i=>i.toFlatJSON(e)),...this.searches.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.functions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.events.flatMap(i=>i.toFlatGenerationTarget(e)),...this.projects.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(i=>i.toFlatGenerationTarget(e)),...this.conditions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.operations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.loops.flatMap(i=>i.toFlatGenerationTarget(e)),...this.searches.flatMap(i=>i.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=q3(),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 new ee(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=g(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=g(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=g(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=g(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=g(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=g(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=g(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=g(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=g(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=g(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=g(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeCustomEntity(e){const t=this.entities.findIndex(i=>i.id===e.id);if(t>-1){const i=this.entities[t];return this.entities.splice(t,1),i}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(i=>i.id===e.id);if(t>-1){const i=this.functions[t];return this.functions.splice(t,1),i}return null}removeExternalProject(e){const t=this.projects.findIndex(i=>i.id===e.id);if(t>-1){const i=this.projects[t];return this.projects.splice(t,1),i}return null}removeGlobalEvent(e){const t=this.events.findIndex(i=>i.id===e.id);if(t>-1){const i=this.events[t];return this.events.splice(t,1),i}return null}removeTopLevelVariableDeclaration(e){if(e.type!==n.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(i=>i.id===e.id);if(t>-1){const i=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),i}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,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=re(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return E([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(i=>{if(!i.declaration){const a=i.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(l=>l.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===V.PERSISTED_ENTITY)||null}};c(ee,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),c(ee,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),c(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),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",[]),c(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),c(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),c(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),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 _=ee;class lA extends te{constructor(t){super(Wt,t);c(this,"id",le.Parallel);c(this,"name",le.Parallel);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Wt);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Wt.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Wt.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Wt.error?g(Wt.error,this.project):null}}class cA extends te{constructor(t){super(ut,t);c(this,"id",ut.id);c(this,"name",ut.name);c(this,"description",ut.description);c(this,"version",ut.version);c(this,"autoexecutable",!1);c(this,"initialData",ut);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=ut.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=ut.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=ut.error?g(ut.error,this.project):null}}class dA extends te{constructor(t){super(Tn,t);c(this,"id",le.Sequential);c(this,"name",le.Sequential);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Tn);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Tn.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Tn.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Tn.error?g(Tn.error,this.project):null}}class B7 extends te{constructor(e){super(Fi,e)}}class w7 extends te{constructor(e){super(rr,e)}}class _7 extends te{constructor(t){super(ir,t);c(this,"autoexecutable",!0)}getEntityToMatchInputMap(t){return t.inputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(t){return t.inputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(t){return t.outputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].outputs.outputEntity.id})||null}getEntityToMatch(t){let i=null;if(t.readsValue){const s=t.readsValue.getDataType();s&&s.entity&&s.entity.type===n.CustomEntity&&(i=s.entity)}const a=t.getDefaultValue();return!i&&a&&a.valueAsType&&!Array.isArray(a.valueAsType)&&a.valueAsType.type===n.CustomEntity&&(i=a.valueAsType),i}syncOperationInstance(t){const i=this.getEntityToMatchInputMap(t);i&&this.syncEntityToMatchInputMapDataType(i);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)!==B.operation[ce.Validate].inputs.entityToMatch.id)return null;if(!t.dataType){const l={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},p=g(l,t.project);p.setParent(t),p.initChildren(),t.setDataType(p)}(s=t.dataType)==null||s.sync({inferred:!0,like:!1,asType:!0});const i=this.getEntityToMatch(t);return(o=t.dataType)==null||o.setEntity(i),t.dataType}syncDataToValidateInputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==B.operation[ce.Validate].inputs.dataToValidate.id)return null;const i=this.getEntityToMatchInputMap(t.parent);if(!i||!this.getEntityToMatch(i))return null;if(!t.dataType){const y={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},h=g(y,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(i);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)!==B.operation[ce.Validate].outputs.outputEntity.id)return null;const i=this.getEntityToMatchInputMap(t.parent);if(!i||!this.getEntityToMatch(i))return null;if(!t.dataType){const y={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},h=g(y,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(i);return(p=t.dataType)==null||p.setEntity(s),t.dataType}inferInputMapDataType(t){var i,a;return((i=t.declaration)==null?void 0:i.id)===B.operation[ce.Validate].inputs.entityToMatch.id?this.syncEntityToMatchInputMapDataType(t):((a=t.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.dataToValidate.id?this.syncDataToValidateInputMapDataType(t):null}inferOutputMapDataType(t){var i;return((i=t.declaration)==null?void 0:i.id)===B.operation[ce.Validate].outputs.outputEntity.id?this.syncOutputDataOutputMapDataType(t):null}}class N7 extends te{constructor(e){super(ul,e)}}class M7 extends te{constructor(e){super(yl,e)}}class V7 extends te{constructor(e){super(hl,e)}}class L7 extends te{constructor(e){super(Qa,e)}}class G7 extends te{constructor(e){super(Za,e)}}class $7 extends te{constructor(e){super($i,e)}}function F7(r){const e=[new dA(r),new lA(r),new cA(r),new B7(r),new w7(r),new _7(r),new L7(r),new N7(r),new V7(r),new M7(r),new G7(r),new $7(r),new te(dl,r),new te(cl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class uA extends Xt{constructor(t){super(vt,t);c(this,"initialData");c(this,"id",V.PERSISTED_ENTITY);c(this,"version",1);c(this,"name",V.PERSISTED_ENTITY);c(this,"description",vt.description);c(this,"type",n.BuiltInBaseEntity);c(this,"abstract",vt.abstract);c(this,"static",vt.static);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=vt,this.project=t,this.id=vt.id,this.version=vt.version,this.name=vt.name,this.static=vt.static,this.abstract=vt.abstract,this.properties=this.initialData.properties.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>g(i,this.project))}}function U7(r){const e=[new uA(r),new Xt(us,r),new Xt(En,r),new Xt(Yl,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function x7(r){const e=[new kt(x,r),new kt(Vn,r),new kt(X,r),new kt(Ke,r),new kt(Ln,r),new kt(fn,r),new kt(za,r),new kt(Li,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function j7(r){const e=[new te(ms,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function k7(r){const e=[new te(ds,r),new te(ar,r),new te(cs,r),new te(xi,r),new te(ji,r),new te(Il,r)];e.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarations=e;const t=[new te(_l,r),new te(ls,r),new te(Sl,r),new te(ET,r),new te(GT,r),new te(Pl,r)];return t.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarationsBodies=t,e}function q7(r){const e=[new xr(Kl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function J7(r){const e=[new te(dr,r),new te(ti,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}const Jr={},Ko={};async function W7(r,e={}){const t={...PI};return t.id=r.id,e.empty?{data:{id:r.id,type:n.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function pA(r){const e=new _(r);return x7(e),U7(e),F7(e),j7(e),k7(e),q7(e),J7(e),e.getAllBuiltIn().forEach(i=>{e.builtInInstances[i.id]||(e.builtInInstances[i.id]=i,delete e.instances[i.id])}),e.initChildren(),e}async function Y7(r,e={}){if(r.id&&Jr[r.id])return Jr[r.id];if(r.id&&Ko[r.id])return await Ko[r.id],Jr[r.id];const t=W7(r,e);r.id&&(Ko[r.id]=t);const i=await t;if(i.data){const a=pA(i.data);return Jr[r.id]=a,r.id&&delete Ko[r.id],a}return null}function H7(r){return Jr[r.id]&&delete Jr[r.id],null}const z7="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Cu,d.ActionDescriptorState=te,d.ActionInputMapState=D2,d.ActionOutputMapState=O2,d.AppendToListOperationInputIds=ch,d.AppendToListOperationOutputIds=dh,d.ArgumentDeclarationState=Fr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Pu,d.BUILT_IN_BASE_ENTITY_IDS=B,d.BUILT_IN_ENTITY_TYPES=zr,d.BaseCanvasDraggableState=l2,d.BaseEntityNames=V,d.BaseState=o2,d.BaseValueDescriptorIds=rl,d.BreakStatementState=Ni,d.BuiltInBaseEntityState=Xt,d.CACHED_PROJECTS_BY_ID=Jr,d.CALLABLE_ENTITIES_EXPLANATION=F2,d.CALLABLE_TYPES=Mn,d.CALLER_ENTITIES_EXPLANATION=AP,d.CALLER_TYPES=hn,d.CALLS_UPDATE_EXPLANATION=Xn,d.COMPARISON_CONDITIONS=Tb,d.CONDITIONS=LA,d.CUSTOM_ENTITY_OPERATIONS=Cf,d.CallableEntityClass=d2,d.CallerEntityClass=gu,d.ChildEntityState=c2,d.ComparisonOperatorTypes=$e,d.ConditionState=Mr,d.ContinueStatementState=Et,d.CreateNewInputIds=nf,d.CreateNewOutputIds=rf,d.CustomEntityState=qr,d.DRAGGABLE_CALLABLE_TYPES=tl,d.DRAGGABLE_CALLER_TYPES=zu,d.DRAGGABLE_ELEMENT_TYPES=nl,d.DRAGGABLE_EXECUTABLE_TYPES=hA,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=el,d.DataTypeCompatibilityTypes=xt,d.DataTypeParentChildRelation=Ze,d.DataTypeState=Ci,d.ENTITIES_WITH_VALLUES_EXPLANATION=Go,d.ENTITY_TYPES=fA,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=dt,d.ENTITY_WITH_NAMES_TYPES=Zu,d.ENTITY_WITH_VALUE_TYPES=Hu,d.ENTRY_POINT_ENTITIES_EXPLANATION=ka,d.ENTRY_POINT_TYPES=Ue,d.EVENT_TYPES=Hr,d.EXECUTABLE_TYPES=yA,d.EXECUTION_OPERATIONS=tf,d.EntityError=Er,d.EntityErrorSeverity=T,d.EntityGenerationError=b,d.EntityGenerationErrorCode=f,d.EntityInstanceErrorCode=M,d.EntityOperations=ce,d.EntityType=n,d.EntityWithLogicScopeClass=h2,d.EntityWithValueClass=y2,d.EntryPointEntityClass=u2,d.ExecutionOperations=le,d.ExecutionTerminationType=IP,d.FunctionCallState=jr,d.FunctionDeclarationState=wr,d.GLOBAL_EVENT_DECLARATIONS=GA,d.GetLastInListOperationInputIds=Ky,d.GetLastInListOperationOutputIds=Xy,d.GlobalEventNames=yn,d.GlobalEventState=Bi,d.HTTPOperations=tt,d.HTTP_OPERATIONS=cm,d.InputMapState=Cn,d.InstalledProjectState=$r,d.InternalCallState=wi,d.JoinListOperationInputIds=Ty,d.JoinListOperationOutputIds=Ey,d.LIST_OPERATIONS=Ih,d.ListOperations=H,d.LoopState=Nr,d.LoopTypes=$,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Qn,d.NUMBER_OPERATIONS=wp,d.NumberOperations=Te,d.OPERATION_DECLARATIONS=bA,d.OperationState=_r,d.OutputMapParentChildRelation=Yr,d.OutputMapState=Bn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=$o,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Kn,d.PASS_THROUGH_CALLABLE_TYPES=je,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Su,d.ParallelExecutionOperation=lA,d.PassThroughCallableEntityClass=p2,d.PersistedEntity=uA,d.PersistedEntityMethods=Ct,d.PrimitiveEntityState=kt,d.PrimitiveTypes=I,d.PrimitiveValueParentChildRelation=Qo,d.PrimitiveValueState=_i,d.ProjectState=_,d.PropertyState=Br,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=U2,d.ReturnDeclarationState=Nt,d.ReturnStatementState=Ur,d.STANDALONE_CONDITIONS=lb,d.STRING_OPERATIONS=my,d.ScopeCompatibilityType=Zo,d.SearchState=Gr,d.SequentialExecutionOperation=dA,d.SequentialExecutionOperationInputIds=jh,d.SequentialExecutionOperationOutputIds=kh,d.SharedEntityErrorCode=S,d.SharedStateFunctionality=vP,d.SplitListOperationInputIds=Ny,d.SplitListOperationOutputIds=My,d.StandaloneOperatorTypes=Vt,d.StringOperations=K,d.TERMINATION_TYPES=Ve,d.USER_MANAGED_ENTITY_TYPES=mA,d.UserManagedEntityStateFunctionality=s2,d.VALUE_READING_ENTITIES_EXPLANATION=Ou,d.VALUE_READING_TYPES=Nn,d.VALUE_WRITING_ENTITIES_EXPLANATION=OP,d.VALUE_WRITING_TYPES=xe,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=Au,d.VARIABLE_TYPES=Fe,d.ValueAutogenerationType=Je,d.ValueDescriptorParentChildRelation=O,d.ValueDescriptorState=xr,d.ValueReadingEntityClass=xa,d.ValueWritingEntityClass=ja,d.VariableDeclarationState=Vr,d.VariableInputMapState=I2,d.VariableInstanceState=Lr,d.VariableOutputMapState=A2,d.WaitOperation=cA,d.WaitOperationInputIds=Vh,d.WaitOperationOutputIds=Lh,d.appendToListOperation=Qa,d.appendToListOperationElementToAppendArgument=ml,d.appendToListOperationElementToAppendArgumentParentRef=Eh,d.appendToListOperationElementToAppendArgumentRef=yh,d.appendToListOperationError=vh,d.appendToListOperationErrorParentRef=gh,d.appendToListOperationListArgument=fl,d.appendToListOperationListArgumentParentRef=Th,d.appendToListOperationListArgumentRef=uh,d.appendToListOperationListDataType=ph,d.appendToListOperationResultListDataType=mh,d.appendToListOperationResultListReturn=Rh,d.appendToListOperationResultListReturnParentRef=bh,d.appendToListOperationResultListReturnRef=fh,d.appendToListOperationSecondListDataType=hh,d.asGenerationActionExample=un,d.booleanPrototype=Vn,d.capitalizeFirstLetter=Co,d.checkAreCustomEntitiesCompatibleAsDataType=cP,d.checkAreDataTypesCompatible=jt,d.checkArePropertiesCompatibleAsDataType=lP,d.checkIsBranchDependentButNotDirectlyOnBranch=Ja,d.checkIsBranchDependentOnBranch=z2,d.checkIsCallableEntityReachable=Ha,d.checkIsCanvasEntity=p7,d.checkIsDetachedBranch=nA,d.checkIsDetachedBranchShallow=Wu,d.checkIsGlobalVariable=d7,d.checkIsGloballyDeclared=Ju,d.checkIsMethod=aA,d.checkIsNestedScope=zo,d.checkScopeCompatibility=Wa,d.countedLoopActionDescriptor=ds,d.countedLoopActionDescriptorDynamicReturnDeclaration=WT,d.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=JT,d.countedLoopActionDescriptorStringArgumentDeclaration=qT,d.countedLoopActionDescriptorStringArgumentDeclarationDataType=jT,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=UT,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=FT,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=xT,d.countedLoopActionDescriptorStringArgumentDeclarationParentRef=kT,d.countedLoopBodyActionDescriptor=_l,d.countedLoopBodyActionDescriptorAnyDynamicArgument=KT,d.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=ZT,d.countedLoopBodyActionDescriptorAnyDynamicReturn=QT,d.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=XT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=wl,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=HT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=YT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=zT,d.createCustomEntityFromJSONObject=ko,d.createEntityError=Y,d.createNestedDataTypeForEntity=$P,d.createNewInstanceOperation=rr,d.createNewInstanceOperationEntityToInstanciateArgument=pf,d.createNewInstanceOperationEntityToInstanciateArgumentRef=cf,d.createNewInstanceOperationEntityToInstanciateDataType=df,d.createNewInstanceOperationError=mf,d.createNewInstanceOperationErrorParentRef=ff,d.createNewInstanceOperationNewEntityDataArgument=lf,d.createNewInstanceOperationNewEntityDataArgumentDataType=of,d.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=sf,d.createNewInstanceOperationNewEntityDataArgumentParentRef=af,d.createNewInstanceOperationOutputEntityDeclaration=hf,d.createNewInstanceOperationOutputEntityDeclarationParentRef=yf,d.createNewInstanceOperationRef=uf,d.createSemanticId=ze,d.createStateFromGenerationTargetType=C7,d.createStateFromType=qt,d.createStateFromTypeAndSubscribe=g,d.cronJobBuiltInBaseEntity=Yl,d.cronJobBuiltInBaseEntityExpressionProperty=ib,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=NA,d.cronJobBuiltInBaseEntityExpressionPropertyRef=nb,d.cronJobBuiltInBaseEntityRef=rb,d.cronJobTriggeredFunctionDeclarationBlueprint=Wl,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=eb,d.customEntityToZodSchema=Vb,d.dataTypeCompatibilityToErrorExplanation=VP,d.datePrototype=fn,d.dateValueAutogenerationSchema=ld,d.deletePersistedEntityMethod=Jl,d.deletePersistedEntityMethodParentRef=ZE,d.deleteRootProject=H7,d.endpointBuiltInBaseEntity=us,d.endpointBuiltInBaseEntityRef=rE,d.endpointBuiltInBaseEntityRefFour=$E,d.endpointBuiltInBaseEntityRefThree=pE,d.endpointBuiltInBaseEntityRefTwo=lE,d.endpointBuiltInCorsProperty=iE,d.endpointBuiltInCorsPropertyDataType=nE,d.endpointBuiltInCorsPropertyDataTypeRef=eE,d.endpointBuiltInCorsPropertyRef=tE,d.endpointBuiltInMethodProperty=Ml,d.endpointBuiltInMethodPropertyDataType=uE,d.endpointBuiltInMethodPropertyDataTypeRef=cE,d.endpointBuiltInMethodPropertyRef=dE,d.endpointBuiltInPathProperty=Nl,d.endpointBuiltInPathPropertyDataType=oE,d.endpointBuiltInPathPropertyDataTypeRef=aE,d.endpointBuiltInPathPropertyRef=sE,d.endpointPathParamsArgumentDeclaration=Ll,d.endpointPathParamsArgumentDeclarationRef=vE,d.endpointPathParamsVariableDataType=IE,d.endpointPathParamsVariableDataTypeRef=gE,d.endpointReachedTriggerActionDescriptor=jl,d.endpointReachedTriggerActionDescriptorRef=DE,d.endpointReachedTriggerActionDescriptorRefFour=OE,d.endpointReachedTriggerActionDescriptorRefThree=AE,d.endpointReachedTriggerActionDescriptorRefTwo=PE,d.endpointRequestBodyArgumentDeclaration=$l,d.endpointRequestBodyArgumentDeclarationRef=mE,d.endpointRequestBodyVariableDataType=TE,d.endpointRequestHeadersArgumentDeclaration=Vl,d.endpointRequestHeadersArgumentDeclarationRef=hE,d.endpointRequestHeadersVariableDataType=fE,d.endpointRequestHeadersVariableDataTypeRef=yE,d.endpointRequestQueryParamsArgumentDeclaration=Gl,d.endpointRequestQueryParamsArgumentDeclarationRef=bE,d.endpointRequestQueryParamsVariableDataType=RE,d.endpointRequestQueryParamsVariableDataTypeRef=EE,d.endpointResponseBodyDataType=LE,d.endpointResponseBodyReturnDeclaration=xl,d.endpointResponseBodyReturnDeclarationRef=VE,d.endpointResponseCodeDataType=CE,d.endpointResponseCodeReturnDeclaration=Fl,d.endpointResponseCodeReturnDeclarationRef=SE,d.endpointResponseHeadersDataType=NE,d.endpointResponseHeadersDataTypeRef=wE,d.endpointResponseHeadersReturnDeclaration=Ul,d.endpointResponseHeadersReturnDeclarationRef=_E,d.endpointReturnStatementRef=BE,d.endpointReturnStatementRefThree=GE,d.endpointReturnStatementRefTwo=ME,d.enumOptionsProperty=tp,d.enumOptionsPropertyDataType=Qu,d.enumOptionsPropertyDataTypeRef=Ku,d.enumOptionsPropertyRef=Xu,d.enumPrototype=Ln,d.enumPrototypeRef=ep,d.executionBuiltInEntity=zl,d.executionBuiltInEntityAbortMethod=Hl,d.executionBuiltInEntityAbortMethodParentRef=ab,d.filterOutDuplicateEntities=E,d.filterOutDuplicateErrors=c9,d.findEntityFromKeys=_u,d.findReferenceToSelfInList=ZP,d.findReferencesToSelfInProject=i7,d.flattenCalls=pn,d.flattenCanvasAncestorsUntil=qo,d.flattenCustomEntityExtensionAndImplementationTypes=xu,d.flattenCustomEntityExtensionTypes=Yo,d.flattenCustomEntityExtensions=Fu,d.flattenCustomEntityImplementations=Uu,d.flattenCustomEntityImplementionTypes=Wo,d.flattenDerivedCanvasEntities=St,d.flattenDetachedBranch=iA,d.flattenElementCalls=Me,d.flattenElementCallsOnTheSameScope=r7,d.flattenProjectElements=zP,d.flattenRelatedCanvasElementsOnTheLeft=tA,d.flattenRelatedCanvasElementsOnTheRight=eA,d.flattenVariableReads=HP,d.flattenVariableWrites=YP,d.flattenVariables=re,d.fromZodParseToEntityGenerationErrors=vu,d.generate=NS,d.generateActionExample=x2,d.generateExecutionDataType=xk,d.generateMutablePropertiesExplanation=Mo,d.generateRandomBoolean=oR,d.generateRandomDate=Fb,d.generateRandomDateAfter=Lb,d.generateRandomDateBefore=Gb,d.generateRandomDateBetweenRange=$b,d.generateRandomNumber=nR,d.generateRandomNumberAfter=Qb,d.generateRandomNumberBefore=eR,d.generateRandomNumberBetweenRange=tR,d.generateRandomText=sR,d.generateRandomTextAfter=rR,d.generateRandomTextBefore=iR,d.generateRandomTextBetweenRange=aR,d.generateUniqueUUID=Xb,d.getAllActionDescriptorsForConditions=xo,d.getAllActionDescriptorsForGlobalEvents=Fo,d.getAllActionDescriptorsForLoops=Uo,d.getAllActionDescriptorsForOperations=J2,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=_P,d.getBaseBuiltInEntities=_n,d.getBaseSchemaBasedOnType=DP,d.getBuiltInEntityOwner=tr,d.getCallableEntityReferenceSchema=He,d.getCallableEntityTypeSchema=zI,d.getCallerEntityReferenceSchema=h3,d.getCallerEntityTypeSchema=y3,d.getCalls=Vu,d.getCanvasEntitiesDerivedFromInternalCalls=QP,d.getCanvasEntitiesDerivedFromWrites=Mi,d.getCanvasEntityDerivedFromValueReadingEntity=$u,d.getCanvasEntityReferenceSchema=w3,d.getCanvasEntityTypeSchema=B3,d.getChildrenEntityWithValues=K2,d.getColumnProperties=T7,d.getCommonAncestor=Mu,d.getCommonChildren=FP,d.getCustomEntityExtends=Vi,d.getDatabaseEntities=f7,d.getDatabaseEntity=E7,d.getDeclaration=Cr,d.getDeepestScope=oA,d.getDraggableCallableEntityReferenceSchema=KI,d.getDraggableCallableEntityTypeSchema=ZI,d.getDraggableCallerEntityReferenceSchema=m3,d.getDraggableCallerEntityTypeSchema=f3,d.getDraggableExecutableEntityReferenceSchema=R3,d.getDraggableExecutableEntityTypeSchema=b3,d.getDraggablePassThroughCallableEntityReferenceSchema=go,d.getDraggablePassThroughCallableEntityTypeSchema=Ro,d.getDraggablePlayableEntityReferenceSchema=P3,d.getDraggablePlayableEntityTypeSchema=D3,d.getEntityArgumentDeclarations=Gu,d.getEntityInputMaps=KP,d.getEntityOutputMaps=o7,d.getEntityReferenceSchema=C3,d.getEntityReturnDeclarations=XP,d.getEntityTypeSchema=S3,d.getEntityWithLogicScopeReferenceSchema=An,d.getEntityWithLogicScopeTypeSchema=g3,d.getEntityWithValueReferenceSchema=HI,d.getEntityWithValueTypeSchema=p3,d.getEntryPointEntityReferenceSchema=Ye,d.getEntryPointEntityTypeSchema=Hn,d.getEventEntityReferenceSchema=Eo,d.getEventEntityTypeSchema=To,d.getExecutableEntityReferenceSchema=E3,d.getExecutableEntityTypeSchema=T3,d.getExtendedBuiltInEntity=l7,d.getExtendedCustomEntity=ku,d.getGenerationTargetSchemaBasedOnType=PP,d.getHeadIfPartOfDetachedBranch=rA,d.getHighestScope=sA,d.getImplementedBuiltInEntity=c7,d.getIsInteractive=qu,d.getLastInListOperation=hl,d.getLastInListOperationError=lh,d.getLastInListOperationErrorParentRef=oh,d.getLastInListOperationInputListArgument=ih,d.getLastInListOperationInputListArgumentParentRef=rh,d.getLastInListOperationInputListArgumentRef=Qy,d.getLastInListOperationInputListDataType=eh,d.getLastInListOperationOutputElementDataType=nh,d.getLastInListOperationOutputElementReturn=sh,d.getLastInListOperationOutputElementReturnParentRef=ah,d.getLastInListOperationOutputElementReturnRef=th,d.getLinkedEntitiesFromArgumentDeclaration=n7,d.getLowestPersistedEntityImplementation=ju,d.getParentCanvasEntities=bt,d.getParentCanvasEntity=et,d.getParentEntryPoint=Z2,d.getPassThroughCallableEntityReferenceSchema=Ee,d.getPassThroughCallableEntityTypeSchema=bo,d.getPeristedEntities=h7,d.getPlayableEntityReferenceSchema=I3,d.getPlayableEntityTypeSchema=v3,d.getProject=Y7,d.getPrototypeByType=Ho,d.getReferenceEntityId=N,d.getReferencedEntitiesStateOrErrors=Lo,d.getReferencedEntityStateOrErrors=Iu,d.getRelatedCanvasElementsOnTheLeft=kr,d.getRelatedCanvasElementsOnTheRight=er,d.getRootEntryPointScopeOwner=Yu,d.getScopeOwner=Rt,d.getTerminationReferenceSchema=O3,d.getTerminationTypeSchema=A3,d.getUsedArgFromDeclaration=a7,d.getUsedReturnFromDeclaration=s7,d.getValueReadingEntityReferenceSchema=YI,d.getValueReadingEntityTypeSchema=Pn,d.getValueWritingEntityReferenceSchema=u3,d.getValueWritingEntityTypeSchema=wa,d.getVariableFromInputMapping=xP,d.getVariableFromReturnVariablePointer=qP,d.getVariableReferenceSchema=Yn,d.getVariableTypeSchema=Ir,d.getVariablesFromArgumentDeclarations=Jo,d.getVariablesFromInputMaps=jP,d.getVariablesFromOutputMapping=JP,d.getVariablesFromOutputMaps=WP,d.getVariablesFromReturnDeclarations=kP,d.getVariablesInSameOrHigherScope=yu,d.getWrites=Lu,d.groupCallsBasedOnParallelizableExecution=Q2,d.handleAfterEntityImplementationSideEffects=GP,d.handleBeforeEntityImplementationSideEffects=LP,d.httpRequestBodyArgument=rs,d.httpRequestBodyArgumentRef=jf,d.httpRequestBodyDataType=kf,d.httpRequestHeadersArgument=ns,d.httpRequestHeadersArgumentRef=Uf,d.httpRequestHeadersDataType=xf,d.httpRequestMethodArgument=es,d.httpRequestMethodArgumentRef=$f,d.httpRequestMethodDataType=Ff,d.httpRequestMethodDataTypeRef=Lf,d.httpRequestOperation=Fi,d.httpRequestOperationErrorValueDescriptor=vl,d.httpRequestOperationErrorValueDescriptorDatatype=lm,d.httpRequestOperationErrorValueDescriptorRef=om,d.httpRequestOperationRef=rm,d.httpRequestOperationRefEight=am,d.httpRequestOperationRefFive=tm,d.httpRequestOperationRefFour=em,d.httpRequestOperationRefNine=sm,d.httpRequestOperationRefSeven=im,d.httpRequestOperationRefSix=nm,d.httpRequestOperationRefThree=Qf,d.httpRequestOperationRefTwo=Xf,d.httpRequestQueryParamsArgument=gl,d.httpRequestQueryParamsArgumentRef=Mf,d.httpRequestQueryParamsDataType=Vf,d.httpRequestVariableURLArgument=ts,d.httpRequestVariableURLArgumentRef=_f,d.httpRequestVariableURLDataType=Nf,d.httpRequestVariableURLDataTypeRef=Bf,d.httpResponseBodyReturnDataType=Kf,d.httpResponseBodyReturnDataTypeRef=zf,d.httpResponseBodyReturnReturn=ss,d.httpResponseBodyReturnReturnRef=Zf,d.httpResponseCodeDataType=Jf,d.httpResponseCodeReturn=is,d.httpResponseCodeReturnRef=qf,d.httpResponseHeadersDataType=Hf,d.httpResponseHeadersDataTypeRef=Wf,d.httpResponseHeadersReturn=as,d.httpResponseHeadersReturnRef=Yf,d.implement=jo,d.inferArgumentDeclarationDataType=dP,d.inferDataType=dn,d.inferInputMapDataType=du,d.inferOutputMapDataType=pu,d.inferPropertyDataType=yP,d.inferReturnDeclarationDataType=uu,d.inferValueDescriptorDataType=hP,d.inferVariableDeclarationDataType=pP,d.inferVariableInstanceDataType=uP,d.initProject=pA,d.iterateOverListActionDescriptorListArgumentDeclaration=Im,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=gm,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Rm,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=vm,d.iterateOverListLoopActionDescriptor=ar,d.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=Pm,d.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Dm,d.iterateOverListLoopBodyActionDescriptor=ls,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=Mm,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Nm,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=Lm,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=Vm,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=os,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Om,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Am,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Sm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=_m,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Bm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Cm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=wm,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=iT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=nT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=tT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=rT,d.iterateOverObjectKeysLoopActionDescriptor=xi,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=sT,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=aT,d.iterateOverObjectKeysLoopBodyActionDescriptor=ET,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=fT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=hT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=TT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=mT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Cl,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=lT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=oT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=cT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=yT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=uT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=dT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=pT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=IT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=gT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=RT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=vT,d.iterateOverObjectValuesLoopActionDescriptor=ji,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=PT,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=DT,d.iterateOverObjectValuesLoopBodyActionDescriptor=GT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=MT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=NT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=LT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=VT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Bl,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=OT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=AT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=ST,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=_T,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=BT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=CT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=wT,d.iterateOverStringActionDescriptorDynamicReturnDeclaration=km,d.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=jm,d.iterateOverStringActionDescriptorStringArgumentDeclaration=xm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Fm,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=$m,d.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Um,d.iterateOverStringLoopActionDescriptor=cs,d.iterateOverStringLoopBodyActionDescriptor=Sl,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=Km,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Zm,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Qm,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Xm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Al,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Jm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=qm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Wm,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Ol,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Hm,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Ym,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=zm,d.joinListOperation=ul,d.joinListOperationError=_y,d.joinListOperationErrorParentRef=wy,d.joinListOperationFirstListArgument=Ay,d.joinListOperationFirstListArgumentParentRef=Py,d.joinListOperationFirstListArgumentRef=by,d.joinListOperationFirstListDataType=Ry,d.joinListOperationResultListDataType=Dy,d.joinListOperationResultListReturn=By,d.joinListOperationResultListReturnParentRef=Cy,d.joinListOperationResultListReturnRef=Iy,d.joinListOperationSecondListArgument=Sy,d.joinListOperationSecondListArgumentParentRef=Oy,d.joinListOperationSecondListArgumentRef=gy,d.joinListOperationSecondListDataType=vy,d.joinListWithLastSeparator=U,d.joinStringsOperation=$i,d.joinStringsOperationDynamicStringArgument=Xp,d.joinStringsOperationDynamicStringArgumentParentRef=Kp,d.joinStringsOperationDynamicStringArgumentRef=zp,d.joinStringsOperationDynamicStringDataType=Zp,d.joinStringsOperationError=Hp,d.joinStringsOperationErrorParentRef=Yp,d.joinStringsOperationFirstStringArgument=Ka,d.joinStringsOperationFirstStringArgumentParentRef=$p,d.joinStringsOperationFirstStringArgumentRef=_p,d.joinStringsOperationFirstStringDataType=Np,d.joinStringsOperationResultStringDataType=Gp,d.joinStringsOperationResultStringReturn=Gi,d.joinStringsOperationResultStringReturnParentRef=Wp,d.joinStringsOperationResultStringReturnRef=Lp,d.joinStringsOperationSecondStringArgument=Xa,d.joinStringsOperationSecondStringArgumentParentRef=Jp,d.joinStringsOperationSecondStringArgumentRef=Mp,d.joinStringsOperationSecondStringDataType=Vp,d.joinStringsOperationSeparatorStringArgument=qp,d.joinStringsOperationSeparatorStringArgumentParentRef=kp,d.joinStringsOperationSeparatorStringArgumentRef=Fp,d.joinStringsOperationSeparatorStringDataType=jp,d.joinStringsOperationSeparatorStringDataTypeDefaultValue=xp,d.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=Up,d.keyValuePrototype=Li,d.lowercaseFirstLetter=oP,d.manualFlowActionDescriptorDeclarationArgumentDeclaration=Dl,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=ym,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=pm,d.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=hm,d.manualFlowLoopActionDescriptor=Il,d.manualFlowLoopActionDescriptorDynamicReturnDeclaration=um,d.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=dm,d.manualFlowLoopBodyActionDescriptor=Pl,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=mm,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=fm,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Em,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=Tm,d.mapActionDescriptorToTypeItRepresents=y7,d.mergeEntityErrorsList=d9,d.mergeListOfEntities=u7,d.methodDefaultValue=Gf,d.mockClientProject=PI,d.moreThanOrEqualCondition=ti,d.moreThanOrEqualConditionLeftHandArgument=pb,d.moreThanOrEqualConditionLeftHandArgumentDataType=db,d.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=cb,d.moreThanOrEqualConditionLeftHandArgumentParentRef=ub,d.moreThanOrEqualConditionRightHandArgument=mb,d.moreThanOrEqualConditionRightHandArgumentDataType=hb,d.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=yb,d.moreThanOrEqualConditionRightHandArgumentParentRef=fb,d.notEmptyCondition=dr,d.notEmptyConditionArgument=ob,d.notEmptyConditionRef=sb,d.nullPrototype=TA,d.numberAdditionOperation=Za,d.numberAdditionOperationDynamicSummandArgument=hp,d.numberAdditionOperationDynamicSummandArgumentType=yp,d.numberAdditionOperationDynamicSummandArgumentTypeParentRef=pp,d.numberAdditionOperationError=up,d.numberAdditionOperationErrorParentRef=dp,d.numberAdditionOperationFirstNumberArgument=il,d.numberAdditionOperationFirstNumberArgumentRef=np,d.numberAdditionOperationFirstNumberDataType=rp,d.numberAdditionOperationRef=lp,d.numberAdditionOperationRefThree=sl,d.numberAdditionOperationRefTwo=cp,d.numberAdditionOperationResultNumberDataType=op,d.numberAdditionOperationResultNumberReturn=ol,d.numberAdditionOperationResultNumberReturnRef=sp,d.numberAdditionOperationSecondNumberArgument=al,d.numberAdditionOperationSecondNumberArgumentRef=ip,d.numberAdditionOperationSecondNumberDataType=ap,d.numberPrototype=X,d.numberSubtractionOperation=cl,d.numberSubtractionOperationDynamicSubtrahendArgument=Bp,d.numberSubtractionOperationDynamicSubtrahendArgumentType=Cp,d.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Sp,d.numberSubtractionOperationError=Op,d.numberSubtractionOperationErrorParentRef=Ap,d.numberSubtractionOperationFirstNumberArgument=gp,d.numberSubtractionOperationFirstNumberArgumentRef=fp,d.numberSubtractionOperationFirstNumberDataType=mp,d.numberSubtractionOperationRef=ll,d.numberSubtractionOperationRefThree=Dp,d.numberSubtractionOperationRefTwo=vp,d.numberSubtractionOperationResultNumberDataType=Rp,d.numberSubtractionOperationResultNumberReturn=Pp,d.numberSubtractionOperationResultNumberReturnRef=bp,d.numberSubtractionOperationSecondNumberArgument=Ip,d.numberSubtractionOperationSecondNumberArgumentRef=Tp,d.numberSubtractionOperationSecondNumberDataType=Ep,d.numberValueAutogenerationSchema=od,d.parallelExecutionOperation=Wt,d.parallelExecutionOperationError=Mh,d.parallelExecutionOperationErrorParentRef=Nh,d.parallelExecutionOperationListOfExecutionResultsDataType=Bh,d.parallelExecutionOperationListOfExecutionResultsReturn=El,d.parallelExecutionOperationListOfExecutionResultsReturnRef=Ch,d.parallelExecutionOperationListOfFunctionsArgument=Tl,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Sh,d.parallelExecutionOperationListOfFunctionsArgumentRef=Oh,d.parallelExecutionOperationListOfFunctionsBlueprint=Ah,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=Ph,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=Dh,d.parallelExecutionOperationRef=wh,d.parallelExecutionOperationRefThree=_h,d.persistedBuiltInBaseEntity=vt,d.persistedBuiltInBaseEntityDatabaseProperty=Qr,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=BA,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=XE,d.persistedBuiltInBaseEntityDatabasePropertyRef=KE,d.processOutputGlobalValueDescriptorDataType=bb,d.processOutputGlobalValueDescriptorReturn=Kl,d.processOutputGlobalValueDescriptorReturnRef=Eb,d.projectPublicationCompletedGlobalEvent=ms,d.propertyToZodSchema=Mb,d.relationalDatabaseBuiltInBaseEntity=En,d.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=ql,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=HE,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=zE,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=YE,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=kl,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=JE,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=WE,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=ps,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=FE,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=UE,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=fs,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=kE,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=qE,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=hs,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=DA,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=jE,d.relationalDatabaseBuiltInBaseEntityRef=Xr,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=ys,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=vA,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=xE,d.resolveActionDescriptorName=gP,d.resolveBaseEntityName=mP,d.resolveBuiltInBaseEntityDataTypeLabel=TP,d.resolveConditionOperatorLabel=_o,d.resolveCustomEntityDataTypeLabel=EP,d.resolveDataType=Bo,d.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Nu,d.resolveDataTypeLabel=hu,d.resolveEntityDataTypeLabel=Jk,d.resolveEntityName=C,d.resolveFirstCallsSecond=e7,d.resolveFirstWritesSecond=t7,d.resolvePrimaryKeyProperty=m7,d.resolvePrimitiveEntityName=RP,d.resolveSearchName=bP,d.resolveVariableScope=jk,d.sequentialExecutionOperation=Tn,d.sequentialExecutionOperationError=ef,d.sequentialExecutionOperationErrorParentRef=Qh,d.sequentialExecutionOperationListOfExecutionResultsDataType=Zh,d.sequentialExecutionOperationListOfExecutionResultsReturn=Rl,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=Xh,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=zh,d.sequentialExecutionOperationListOfFunctionsArgument=bl,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Hh,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Kh,d.sequentialExecutionOperationListOfFunctionsArgumentRef=Yh,d.sequentialExecutionOperationListOfFunctionsBlueprint=Wh,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=Jh,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=qh,d.softDeletePersistedEntityMethod=_A,d.softDeletePersistedEntityMethodParentRef=QE,d.sortCallsBasedOnExecutionDependencies=UP,d.sortChildrenEntitiesBasedOnExecutionDependencies=X2,d.splitListOperation=yl,d.splitListOperationError=Zy,d.splitListOperationErrorParentRef=zy,d.splitListOperationFirstOutputListDataType=Fy,d.splitListOperationFirstOutputListReturn=Jy,d.splitListOperationFirstOutputListReturnParentRef=qy,d.splitListOperationFirstOutputListReturnRef=pl,d.splitListOperationInputListArgument=xy,d.splitListOperationInputListArgumentParentRef=Uy,d.splitListOperationInputListArgumentRef=Vy,d.splitListOperationInputListDataType=Ly,d.splitListOperationSecondOutputListDataType=Wy,d.splitListOperationSecondOutputListReturn=Hy,d.splitListOperationSecondOutputListReturnParentRef=Yy,d.splitListOperationSplitIndexArgument=ky,d.splitListOperationSplitIndexArgumentParentRef=jy,d.splitListOperationSplitIndexArgumentRef=Gy,d.splitListOperationSplitIndexDataType=$y,d.splitStringOperation=dl,d.splitStringOperationError=fy,d.splitStringOperationErrorParentRef=hy,d.splitStringOperationFirstPartResultStringDataType=iy,d.splitStringOperationFirstPartResultStringReturn=yy,d.splitStringOperationFirstPartResultStringReturnParentRef=py,d.splitStringOperationFirstPartResultStringReturnRef=ry,d.splitStringOperationIndexArgument=dy,d.splitStringOperationIndexArgumentParentRef=cy,d.splitStringOperationIndexArgumentRef=ty,d.splitStringOperationIndexDataType=ny,d.splitStringOperationSecondPartResultStringDataType=sy,d.splitStringOperationSecondPartResultStringReturn=EA,d.splitStringOperationSecondPartResultStringReturnParentRef=uy,d.splitStringOperationSecondPartResultStringReturnRef=ay,d.splitStringOperationStringArgument=ly,d.splitStringOperationStringArgumentParentRef=oy,d.splitStringOperationStringArgumentRef=Qp,d.splitStringOperationStringDataType=ey,d.stringPrototype=x,d.stringValueAutogenerationSchema=sd,d.suggestNewIdForEntity=Ru,d.test_primitive_entities_export=z7,d.toCamelCase=kk,d.toEntityState=Mt,d.toKebabCase=fP,d.toLowerCaseKebabCase=wo,d.toPascalCase=qk,d.untypedDataPrototype=Ke,d.updateErrorsList=ie,d.updateValueReader=Ya,d.urlDefaultValue=wf,d.uuidPrototype=za,d.validateArgumentDeclarationName=Eu,d.validateCalledByErrorIdInAction=k2,d.validateCalledByIdInAction=j2,d.validateCallers=wP,d.validateConditionEntityDeclaration=W2,d.validateCustomEntityName=No,d.validateDataOperation=ir,d.validateDataOperationDataToValidateArgument=Rf,d.validateDataOperationDataToValidateArgumentParentRef=bf,d.validateDataOperationDataToValidateArgumentRef=Tf,d.validateDataOperationDataToValidateDataType=Ef,d.validateDataOperationEntityToMatchTypeArgument=Df,d.validateDataOperationEntityToMatchTypeArgumentParentRef=If,d.validateDataOperationEntityToMatchTypeArgumentRef=gf,d.validateDataOperationEntityToMatchTypeDataType=vf,d.validateDataOperationError=Sf,d.validateDataOperationErrorParentRef=Of,d.validateDataOperationOutputEntityDeclaration=Af,d.validateDataOperationOutputEntityDeclarationParentRef=Pf,d.validateEntryCaller=BP,d.validateErrorCaller=CP,d.validateFunctionCallDeclaration=NP,d.validateFunctionDeclarationName=fu,d.validateGeneratedEntityParentIsNotBuiltInEntity=$2,d.validateGeneration=L2,d.validateGenerationTarget=Le,d.validateGenerationUpdate=G2,d.validateLoopEntityDeclaration=Y2,d.validateName=Wk,d.validateOperationEntityDeclaration=MP,d.validatePropertyName=Tu,d.validateReachability=wn,d.validateReadsValueInActionPayload=q2,d.validateReferenceObject=Vo,d.validateReferenceToOne=Du,d.validateReferences=We,d.validateReturnDeclarationName=bu,d.validateSuccessCaller=SP,d.validateValueReaderGenerationUpdate=qa,d.validateValueWritter=Bu,d.validateVariableDeclarationName=mu,d.validateVariableInternalCallUse=wu,d.valueAutogenerationCurrentDateAndTimeSchema=OI,d.valueAutogenerationGenericSchema=to,d.valueAutogenerationOptions=cd,d.valueAutogenerationOptionsSchema=AI,d.valueAutogenerationRandomBooleanSchema=ad,d.valueAutogenerationRandomDateBetweenSchema=LI,d.valueAutogenerationRandomDateFromSchema=MI,d.valueAutogenerationRandomDateSchema=io,d.valueAutogenerationRandomDateUntilSchema=VI,d.valueAutogenerationRandomNumberBetweenSchema=BI,d.valueAutogenerationRandomNumberFromSchema=SI,d.valueAutogenerationRandomNumberSchema=no,d.valueAutogenerationRandomNumberUntilSchema=CI,d.valueAutogenerationRandomSchema=Da,d.valueAutogenerationRandomTextBetweenSchema=NI,d.valueAutogenerationRandomTextFromSchema=wI,d.valueAutogenerationRandomTextSchema=ro,d.valueAutogenerationRandomTextUntilSchema=_I,d.valueAutogenerationRangeValueTypesSchema=Ia,d.valueAutogenerationUniqueSchema=id,d.waitOperation=ut,d.waitOperationMillisecondsNumberArgument=nr,d.waitOperationMillisecondsNumberArgumentRef=Gh,d.waitOperationMillisecondsNumberDataType=$h,d.waitOperationOperationError=xh,d.waitOperationOperationErrorParentRef=Uh,d.waitOperationRef=Fh,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
371
|
+
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:i}}get allBasePropertiesFromExtendedAndImplementedEntities(){return E([...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 E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...a,...e]},[]),...this.implements.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...a,...e]},[])])}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 b({id:`${this.id}--${f.InvalidParentUpdate}`,code:f.InvalidParentUpdate,severity:T.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}}addSelfToProject(){const e=[this],t=[],i=[];if(this.parent.type===n.DataType){const a=this.parent;a.entity=this,e.push(a)}else this.project.addCustomEntity(this);return{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,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=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=g(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>g(e,this.project)),this.implements=this.initialData.implements.map(e=>g(e,this.project)),this.syncImplementationProperties(),this.addExtendedProperties(),this.addSuggestions(),this)}syncImplementationProperties(){return this.implementedPropertiesFromOriginalParents.forEach(t=>{if(this.properties.find(o=>{var l;return((l=o.implements)==null?void 0:l.id)===t.id}))return;const a=this.properties.find(o=>o.name===t.name&&!!o.abstract&&!o.implements);if(a){a.implements=t,a.abstract=!1;return}const s=t.clone(this);s.initChildren(),s.implements=t,s.abstract=!1,this.addProperty(s)}),this}addExtendedProperties(){const e=this.properties,t=this.extendedPropertiesFromOriginalParents,i=new Set(e.map(a=>a.name));return t.forEach(a=>{if(i.has(a.name))return;i.add(a.name);const s=a.clone(this);s.initChildren(),this.addProperty(s)}),this}addSuggestions(){return this.implements.forEach(e=>{R7(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=g(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),g7(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),l=g(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(y=>{y.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(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],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});i.push(...o),a.push(...l)}),this.methods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:l}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...l)}),{affected:E(i),removed:E(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(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.methods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.abstractMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedProperties.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.suggestedMethods.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),{affected:E(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.extends.flatMap(i=>i.toFlat(e)),...this.implements.flatMap(i=>i.toFlat(e)),...this.properties.flatMap(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.extends.flatMap(i=>i.toFlatIds(e)),...this.implements.flatMap(i=>i.toFlatIds(e)),...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),implements:this.implements.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),implements:this.implements.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.toFlatJSON(e)),...this.implements.flatMap(i=>i.toFlatJSON(e)),...this.extends.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){const e=this.parent.type===n.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===n.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===n.CustomEntity).flatMap(i=>i.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=b7(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,i=!0){var R,v,P;const a=this.toJSON(),s=t||ze(C(this,this.project),n.CustomEntity,this.project);a.properties=[],a.methods=[],a.abstractMethods=[];const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=qt(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const y=(R=this.properties)==null?void 0:R.map((A,D)=>A.clone(p,l+"-property-"+D+"-id",i));p.properties=y;const h=(v=this.methods)==null?void 0:v.map((A,D)=>A.clone(p,l+"-method-"+D+"-id",i));p.methods=h;const m=(P=this.abstractMethods)==null?void 0:P.map((A,D)=>A.clone(p,l+"-abstract-method-"+D+"-id",i));return p.abstractMethods=m,p}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return jo(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(i=>i.type===n.CustomEntity||i.type===n.BuiltInBaseEntity&&i.interactive);return E([...this.methods,...this.extends.flatMap(i=>i.getAllInteractiveMethods()),...e.flatMap(i=>i.getAllInteractiveMethods())])}inferFromInputs(e){if(this.parent.type!==n.DataType||!this.parent.inferred)return this;const t=[];e.forEach(s=>{t.find(l=>C(l,this.project)===C(s,this.project))||t.push(s)});const i=this.properties.filter(s=>!s.getDataType());t.forEach(s=>{const o=i.find(m=>C(m,this.project)===C(s,this.project));if(!o)return;const p=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),y=dn(p),h=y==null?void 0:y.clone(o,o.id+"--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=>C(v,this.project)===C(s,this.project));if(o){if(s.setDeclaration(o),!o.getDataType()){const P=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),A=dn(P),D=A==null?void 0:A.clone(o,o.id+"--data-type",!0);D&&o.setDataType(D)}return}const l={id:s.id+"--inferred-property",type:n.Property,version:1,name:C(s,this.project),description:s.description,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,primary:!1,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=g(l,this.project);p.setParent(this),p.initChildren();const h=Cr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),m=dn(h),R=m==null?void 0:m.clone(p,l.id+"--data-type",!0);return R&&p.setDataType(R),this.addProperty(p),s.setDeclaration(p),p}),this)}};c(Ne,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),c(Ne,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),c(Ne,"BASE_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,...Ne.INMUTABLE_BASE_PROPERTIES]),c(Ne,"MUTABLE_META_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,"x","y"]),c(Ne,"INMUTABLE_META_PROPERTIES",[...Ne.INMUTABLE_BASE_PROPERTIES]),c(Ne,"META_PROPERTIES",[...Ne.MUTABLE_META_PROPERTIES,...Ne.INMUTABLE_META_PROPERTIES]),c(Ne,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),c(Ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),c(Ne,"UPSTREAM_PROPERTIES",[...Ne.MUTABLE_UPSTREAM_PROPERTIES,...Ne.INMUTABLE_UPSTREAM_PROPERTIES]),c(Ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),c(Ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),c(Ne,"DOWNSTREAM_PROPERTIES",[...Ne.MUTABLE_DOWNSTREAM_PROPERTIES,...Ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),c(Ne,"PROPERTIES",[...Ne.META_PROPERTIES,...Ne.UPSTREAM_PROPERTIES,...Ne.DOWNSTREAM_PROPERTIES]);let qr=Ne;function O7(r){const e=O9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class Xt{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",n.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(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>g(i,this.project))}get allBasePropertiesFromExtendedAndImplementedEntities(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...i]},[]))}get extendedPropertiesFromOriginalParents(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...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(){return 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(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e)),...this.extends.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e)),...this.extends.flatMap(i=>i.toFlatIds(e))])}toJSON(){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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.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=O7(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}clone(){return new Xt(this.toJSON(),this.project)}implement(e,t){return jo(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(i=>i.type===n.BuiltInBaseEntity&&i.interactive||i.type===n.PrimitiveEntity).forEach(i=>{i instanceof Xt&&e.push(...i.getAllInteractiveMethods())})),E(e)}}function S7(r){const e=E9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class kt{constructor(e,t){c(this,"initialData");c(this,"id");c(this,"version");c(this,"name");c(this,"description",null);c(this,"type",n.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(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.parent=this,a})}get allBasePropertiesFromExtendedAndImplementedEntities(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.allBasePropertiesFromExtendedAndImplementedEntities].filter(a=>!a.abstract);return[...e,...i]},[]))}get extendedPropertiesFromOriginalParents(){return E(this.extends.reduce((e,t)=>{const i=[...t.ownDeclaredProperties,...t.extendedPropertiesFromOriginalParents].filter(a=>!a.abstract);return[...e,...i]},[]))}get implementedPropertiesFromOriginalParents(){return E([...this.extends.reduce((e,t)=>{const i=t.implementedPropertiesFromOriginalParents,a=[...t.ownDeclaredProperties].filter(s=>!!s.abstract&&!i.find(o=>o.name===s.name));return[...i,...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(){return 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(i=>i.toFlat(e)),...this.methods.flatMap(i=>i.toFlat(e)),...this.abstractMethods.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.properties.flatMap(i=>i.toFlatIds(e)),...this.methods.flatMap(i=>i.toFlatIds(e)),...this.abstractMethods.flatMap(i=>i.toFlatIds(e))])}toJSON(){return{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(e=>e.toJSON()),methods:this.methods.map(e=>e.toJSON()),abstractMethods:this.abstractMethods.map(e=>e.toJSON()),extends:this.extends.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+_.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){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(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:this.extends.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(i=>i.toFlatJSON(e)),...this.methods.flatMap(i=>i.toFlatJSON(e)),...this.abstractMethods.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.methods.flatMap(i=>i.toFlatGenerationTarget(e)),...this.abstractMethods.flatMap(i=>i.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=S7(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}clone(){return new kt(this.toJSON(),this.project)}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(i=>i.type===n.BuiltInBaseEntity&&i.interactive||i.type===n.PrimitiveEntity).forEach(i=>{i instanceof Xt&&e.push(...i.getAllInteractiveMethods())}),E(e)}}function qt(r,e){if(!r)throw new Error("Entity is null");const t=e.get(r.id);switch(r.type){case n.PrimitiveValue:return t||new _i(r,e);case n.CustomEntity:return t||new qr(r,e);case n.PrimitiveEntity:return t||new kt(r,e);case n.FunctionDeclaration:return t||new wr(r,e);case n.GlobalEvent:return t||new Bi(r,e);case n.DataType:return t||new Ci(r,e);case n.Property:return t||new Br(r,e);case n.FunctionCall:return t||new jr(r,e);case n.Condition:return t||new Mr(r,e);case n.Operation:return t||new _r(r,e);case n.VariableDeclaration:return t||new Vr(r,e);case n.VariableInstance:return t||new Lr(r,e);case n.OutputMap:return t||new Bn(r,e);case n.ReturnDeclaration:return t||new Nt(r,e);case n.ArgumentDeclaration:return t||new Fr(r,e);case n.InputMap:return t||new Cn(r,e);case n.Project:return t||new _(r);case n.InstalledProject:return t||new $r(r,e);case n.ActionDescriptor:return t||new te(r,e);case n.ReturnStatement:return t||new Ur(r,e);case n.Loop:return t||new Nr(r,e);case n.Search:return t||new Gr(r,e);case n.ValueDescriptor:return t||new xr(r,e);case n.BuiltInBaseEntity:return t||new Xt(r,e);case n.InternalCall:return t||new wi(r,e);case n.ContinueStatement:return t||new bt(r,e);case n.BreakStatement:return t||new Ni(r,e);default:throw new Error("Invalid entity type: "+r.type)}}function g(r,e){if(!r)throw new Error("Entity is null");const t=qt(r,e);return t.subscribe(),t}function C7(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case n.PrimitiveValue:return _i.fromGenerationTarget(r,e);case n.CustomEntity:return qr.fromGenerationTarget(r,e);case n.FunctionDeclaration:return wr.fromGenerationTarget(r,e);case n.GlobalEvent:return Bi.fromGenerationTarget(r,e);case n.DataType:return Ci.fromGenerationTarget(r,e);case n.Property:return Br.fromGenerationTarget(r,e);case n.FunctionCall:return jr.fromGenerationTarget(r,e);case n.Condition:return Mr.fromGenerationTarget(r,e);case n.Operation:return _r.fromGenerationTarget(r,e);case n.VariableDeclaration:return Vr.fromGenerationTarget(r,e);case n.VariableInstance:return Lr.fromGenerationTarget(r,e);case n.OutputMap:return Bn.fromGenerationTarget(r,e);case n.ReturnDeclaration:return Nt.fromGenerationTarget(r,e);case n.ArgumentDeclaration:return Fr.fromGenerationTarget(r,e);case n.InputMap:return Cn.fromGenerationTarget(r,e);case n.InstalledProject:return $r.fromGenerationTarget(r,e);case n.ReturnStatement:return Ur.fromGenerationTarget(r,e);case n.Loop:return Nr.fromGenerationTarget(r,e);case n.Search:return Gr.fromGenerationTarget(r,e);case n.ActionDescriptor:return te.fromGenerationTarget(r,e);case n.ValueDescriptor:return xr.fromGenerationTarget(r,e);case n.InternalCall:return wi.fromGenerationTarget(r,e);case n.ContinueStatement:return bt.fromGenerationTarget(r,e);case n.BreakStatement:return Ni.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const ee=class ee{constructor(e){c(this,"initialData");c(this,"id");c(this,"version");c(this,"type",n.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",[]);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;try{(!ee.UUID||ee.UUID.isBackup)&&(ee.UUID=xs==null?void 0:xs()),ee.UUID||(ee.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),ee.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){ee.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Le(i)),{errors:a,modifiedData:i}}async inject(...e){return await Promise.all(e.map(t=>new Promise(async i=>{await t.init(this),i(null)}))),this}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return{updated:E(e),added:E(t),removed:E(i),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.entities=this.initialData.entities.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=g(e,this);return t.setParent(this),t.initChildren(),t}),this.attachOrphanReferences(),this.validate(),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(){return this}async create(){return this}async update(e){return this}async delete(){return 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(i=>i.toFlat(e)),...this.functions.flatMap(i=>i.toFlat(e)),...this.events.flatMap(i=>i.toFlat(e)),...this.projects.flatMap(i=>i.toFlat(e)),...this.variableDeclarations.flatMap(i=>i.toFlat(e)),...this.variableInstances.flatMap(i=>i.toFlat(e)),...this.conditions.flatMap(i=>i.toFlat(e)),...this.operations.flatMap(i=>i.toFlat(e)),...this.functionCalls.flatMap(i=>i.toFlat(e)),...this.loops.flatMap(i=>i.toFlat(e)),...this.searches.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),Array.from(e))}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toJSON()),functions:this.functions.map(e=>e.toJSON()),events:this.events.map(e=>e.toJSON()),projects:this.projects.map(e=>e.toJSON()),variableDeclarations:this.variableDeclarations.map(e=>e.toJSON()),variableInstances:this.variableInstances.map(e=>e.toJSON()),conditions:this.conditions.map(e=>e.toJSON()),operations:this.operations.map(e=>e.toJSON()),functionCalls:this.functionCalls.map(e=>e.toJSON()),loops:this.loops.map(e=>e.toJSON()),searches:this.searches.map(e=>e.toJSON())}}toReference(){return{id:this.id+"--"+ee.UUID.uuid()+"--ref",type:n.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,entities:this.entities.map(e=>e.toReference()),functions:this.functions.map(e=>e.toReference()),events:this.events.map(e=>e.toReference()),projects:this.projects.map(e=>e.toReference()),variableDeclarations:this.variableDeclarations.map(e=>e.toReference()),variableInstances:this.variableInstances.map(e=>e.toReference()),conditions:this.conditions.map(e=>e.toReference()),operations:this.operations.map(e=>e.toReference()),functionCalls:this.functionCalls.map(e=>e.toReference()),loops:this.loops.map(e=>e.toReference()),searches:this.searches.map(e=>e.toReference())}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.entities.flatMap(i=>i.toFlatJSON(e)),...this.functions.flatMap(i=>i.toFlatJSON(e)),...this.events.flatMap(i=>i.toFlatJSON(e)),...this.projects.flatMap(i=>i.toFlatJSON(e)),...this.variableDeclarations.flatMap(i=>i.toFlatJSON(e)),...this.variableInstances.flatMap(i=>i.toFlatJSON(e)),...this.conditions.flatMap(i=>i.toFlatJSON(e)),...this.operations.flatMap(i=>i.toFlatJSON(e)),...this.functionCalls.flatMap(i=>i.toFlatJSON(e)),...this.loops.flatMap(i=>i.toFlatJSON(e)),...this.searches.flatMap(i=>i.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(i=>i.toFlatGenerationTarget(e)),...this.functions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.events.flatMap(i=>i.toFlatGenerationTarget(e)),...this.projects.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableDeclarations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.variableInstances.flatMap(i=>i.toFlatGenerationTarget(e)),...this.conditions.flatMap(i=>i.toFlatGenerationTarget(e)),...this.operations.flatMap(i=>i.toFlatGenerationTarget(e)),...this.functionCalls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.loops.flatMap(i=>i.toFlatGenerationTarget(e)),...this.searches.flatMap(i=>i.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=q3(),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 new ee(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=g(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=g(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=g(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=g(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=g(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=g(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=g(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=g(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=g(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=g(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=g(e,this);return this.addSearch(t),this}addSearch(e){return this.searches.includes(e)||this.searches.push(e),this}removeCustomEntity(e){const t=this.entities.findIndex(i=>i.id===e.id);if(t>-1){const i=this.entities[t];return this.entities.splice(t,1),i}return null}removeFunctionDeclaration(e){const t=this.functions.findIndex(i=>i.id===e.id);if(t>-1){const i=this.functions[t];return this.functions.splice(t,1),i}return null}removeExternalProject(e){const t=this.projects.findIndex(i=>i.id===e.id);if(t>-1){const i=this.projects[t];return this.projects.splice(t,1),i}return null}removeGlobalEvent(e){const t=this.events.findIndex(i=>i.id===e.id);if(t>-1){const i=this.events[t];return this.events.splice(t,1),i}return null}removeTopLevelVariableDeclaration(e){if(e.type!==n.VariableDeclaration)return null;const t=this.variableDeclarations.findIndex(i=>i.id===e.id);if(t>-1){const i=this.variableDeclarations[t];return this.variableDeclarations.splice(t,1),i}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,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Me(i);return[...t,...a.filter(s=>s.type===n.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=re(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=re(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return E([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=re(i).filter(o=>o.type===n.VariableDeclaration);return[...t,...s]},[])])}attachOrphanReferences(){const e=this.getVariableInstances(),t=this.getVariableDeclarations();return e.forEach(i=>{if(!i.declaration){const a=i.initialData,s=a.declaration.entityId||a.declaration.id,o=t.find(l=>l.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===V.PERSISTED_ENTITY)||null}};c(ee,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),c(ee,"MUTABLE_BASE_PROPERTIES",["name","description"]),c(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),c(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),c(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),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",[]),c(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),c(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),c(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),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 _=ee;class lA extends te{constructor(t){super(Wt,t);c(this,"id",le.Parallel);c(this,"name",le.Parallel);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Wt);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Wt.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Wt.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Wt.error?g(Wt.error,this.project):null}}class cA extends te{constructor(t){super(pt,t);c(this,"id",pt.id);c(this,"name",pt.name);c(this,"description",pt.description);c(this,"version",pt.version);c(this,"autoexecutable",!1);c(this,"initialData",pt);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=pt.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=pt.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=pt.error?g(pt.error,this.project):null}}class dA extends te{constructor(t){super(Tn,t);c(this,"id",le.Sequential);c(this,"name",le.Sequential);c(this,"description","Execute a list of actions one after the other");c(this,"version",1);c(this,"autoexecutable",!0);c(this,"initialData",Tn);c(this,"type",n.ActionDescriptor);c(this,"inputs",[]);c(this,"outputs",[]);c(this,"error",null);c(this,"project");this.project=t,this.inputs=Tn.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=Tn.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Tn.error?g(Tn.error,this.project):null}}class B7 extends te{constructor(e){super(Fi,e)}}class w7 extends te{constructor(e){super(rr,e)}}class _7 extends te{constructor(t){super(ir,t);c(this,"autoexecutable",!0)}getEntityToMatchInputMap(t){return t.inputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(t){return t.inputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(t){return t.outputs.find(i=>{var a;return((a=i.declaration)==null?void 0:a.id)===B.operation[ce.Validate].outputs.outputEntity.id})||null}getEntityToMatch(t){let i=null;if(t.readsValue){const s=t.readsValue.getDataType();s&&s.entity&&s.entity.type===n.CustomEntity&&(i=s.entity)}const a=t.getDefaultValue();return!i&&a&&a.valueAsType&&!Array.isArray(a.valueAsType)&&a.valueAsType.type===n.CustomEntity&&(i=a.valueAsType),i}syncOperationInstance(t){const i=this.getEntityToMatchInputMap(t);i&&this.syncEntityToMatchInputMapDataType(i);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)!==B.operation[ce.Validate].inputs.entityToMatch.id)return null;if(!t.dataType){const l={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},p=g(l,t.project);p.setParent(t),p.initChildren(),t.setDataType(p)}(s=t.dataType)==null||s.sync({inferred:!0,like:!1,asType:!0});const i=this.getEntityToMatch(t);return(o=t.dataType)==null||o.setEntity(i),t.dataType}syncDataToValidateInputMapDataType(t){var o,l,p;if(((o=t.declaration)==null?void 0:o.id)!==B.operation[ce.Validate].inputs.dataToValidate.id)return null;const i=this.getEntityToMatchInputMap(t.parent);if(!i||!this.getEntityToMatch(i))return null;if(!t.dataType){const y={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},h=g(y,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(i);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)!==B.operation[ce.Validate].outputs.outputEntity.id)return null;const i=this.getEntityToMatchInputMap(t.parent);if(!i||!this.getEntityToMatch(i))return null;if(!t.dataType){const y={id:t.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,like:!0,inferred:!0,defaultValue:null,parent:t.toReference()},h=g(y,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(i);return(p=t.dataType)==null||p.setEntity(s),t.dataType}inferInputMapDataType(t){var i,a;return((i=t.declaration)==null?void 0:i.id)===B.operation[ce.Validate].inputs.entityToMatch.id?this.syncEntityToMatchInputMapDataType(t):((a=t.declaration)==null?void 0:a.id)===B.operation[ce.Validate].inputs.dataToValidate.id?this.syncDataToValidateInputMapDataType(t):null}inferOutputMapDataType(t){var i;return((i=t.declaration)==null?void 0:i.id)===B.operation[ce.Validate].outputs.outputEntity.id?this.syncOutputDataOutputMapDataType(t):null}}class N7 extends te{constructor(e){super(ul,e)}}class M7 extends te{constructor(e){super(yl,e)}}class V7 extends te{constructor(e){super(hl,e)}}class L7 extends te{constructor(e){super(Qa,e)}}class G7 extends te{constructor(e){super(Za,e)}}class $7 extends te{constructor(e){super($i,e)}}function F7(r){const e=[new dA(r),new lA(r),new cA(r),new B7(r),new w7(r),new _7(r),new L7(r),new N7(r),new V7(r),new M7(r),new G7(r),new $7(r),new te(dl,r),new te(cl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class uA extends Xt{constructor(t){super(nt,t);c(this,"initialData");c(this,"id",V.PERSISTED_ENTITY);c(this,"version",1);c(this,"name",V.PERSISTED_ENTITY);c(this,"description",nt.description);c(this,"type",n.BuiltInBaseEntity);c(this,"abstract",nt.abstract);c(this,"static",nt.static);c(this,"properties",[]);c(this,"methods",[]);c(this,"abstractMethods",[]);c(this,"extends",[]);c(this,"errors",[]);c(this,"project");this.initialData=nt,this.project=t,this.id=nt.id,this.version=nt.version,this.name=nt.name,this.static=nt.static,this.abstract=nt.abstract,this.properties=this.initialData.properties.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=g(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>g(i,this.project))}}function U7(r){const e=[new uA(r),new Xt(us,r),new Xt(En,r),new Xt(Yl,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function x7(r){const e=[new kt(x,r),new kt(Vn,r),new kt(X,r),new kt(Ke,r),new kt(Ln,r),new kt(fn,r),new kt(za,r),new kt(Li,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function j7(r){const e=[new te(ms,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function k7(r){const e=[new te(ds,r),new te(ar,r),new te(cs,r),new te(xi,r),new te(ji,r),new te(Il,r)];e.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarations=e;const t=[new te(_l,r),new te(ls,r),new te(Sl,r),new te(TT,r),new te(LT,r),new te(Pl,r)];return t.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarationsBodies=t,e}function q7(r){const e=[new xr(Kl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function J7(r){const e=[new te(dr,r),new te(ti,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}const Jr={},Ko={};async function W7(r,e={}){const t={...DI};return t.id=r.id,e.empty?{data:{id:r.id,type:n.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function pA(r){const e=new _(r);return x7(e),U7(e),F7(e),j7(e),k7(e),q7(e),J7(e),e.getAllBuiltIn().forEach(i=>{e.builtInInstances[i.id]||(e.builtInInstances[i.id]=i,delete e.instances[i.id])}),e.initChildren(),e}async function Y7(r,e={}){if(r.id&&Jr[r.id])return Jr[r.id];if(r.id&&Ko[r.id])return await Ko[r.id],Jr[r.id];const t=W7(r,e);r.id&&(Ko[r.id]=t);const i=await t;if(i.data){const a=pA(i.data);return Jr[r.id]=a,r.id&&delete Ko[r.id],a}return null}function H7(r){return Jr[r.id]&&delete Jr[r.id],null}const z7="test_primitive_entities_export";d.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Cu,d.ActionDescriptorState=te,d.ActionInputMapState=D2,d.ActionOutputMapState=O2,d.AppendToListOperationInputIds=lh,d.AppendToListOperationOutputIds=ch,d.ArgumentDeclarationState=Fr,d.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Pu,d.BUILT_IN_BASE_ENTITY_IDS=B,d.BUILT_IN_ENTITY_TYPES=zr,d.BaseCanvasDraggableState=l2,d.BaseEntityNames=V,d.BaseState=o2,d.BaseValueDescriptorIds=rl,d.BreakStatementState=Ni,d.BuiltInBaseEntityState=Xt,d.CACHED_PROJECTS_BY_ID=Jr,d.CALLABLE_ENTITIES_EXPLANATION=F2,d.CALLABLE_TYPES=Mn,d.CALLER_ENTITIES_EXPLANATION=PP,d.CALLER_TYPES=hn,d.CALLS_UPDATE_EXPLANATION=Xn,d.COMPARISON_CONDITIONS=mb,d.CONDITIONS=LA,d.CUSTOM_ENTITY_OPERATIONS=Sf,d.CallableEntityClass=d2,d.CallerEntityClass=gu,d.ChildEntityState=c2,d.ComparisonOperatorTypes=$e,d.ConditionState=Mr,d.ContinueStatementState=bt,d.CreateNewInputIds=tf,d.CreateNewOutputIds=nf,d.CustomEntityState=qr,d.DRAGGABLE_CALLABLE_TYPES=tl,d.DRAGGABLE_CALLER_TYPES=Hu,d.DRAGGABLE_ELEMENT_TYPES=nl,d.DRAGGABLE_EXECUTABLE_TYPES=hA,d.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=el,d.DataTypeCompatibilityTypes=xt,d.DataTypeParentChildRelation=Ze,d.DataTypeState=Ci,d.ENTITIES_WITH_VALLUES_EXPLANATION=Go,d.ENTITY_TYPES=fA,d.ENTITY_WITH_LOGIC_SCOPE_TYPES=ut,d.ENTITY_WITH_NAMES_TYPES=zu,d.ENTITY_WITH_VALUE_TYPES=Yu,d.ENTRY_POINT_ENTITIES_EXPLANATION=ka,d.ENTRY_POINT_TYPES=Ue,d.EVENT_TYPES=Hr,d.EXECUTABLE_TYPES=yA,d.EXECUTION_OPERATIONS=ef,d.EntityError=Er,d.EntityErrorSeverity=T,d.EntityGenerationError=b,d.EntityGenerationErrorCode=f,d.EntityInstanceErrorCode=M,d.EntityOperations=ce,d.EntityType=n,d.EntityWithLogicScopeClass=h2,d.EntityWithValueClass=y2,d.EntryPointEntityClass=u2,d.ExecutionOperations=le,d.ExecutionTerminationType=vP,d.FunctionCallState=jr,d.FunctionDeclarationState=wr,d.GLOBAL_EVENT_DECLARATIONS=GA,d.GetLastInListOperationInputIds=Zy,d.GetLastInListOperationOutputIds=Ky,d.GlobalEventNames=yn,d.GlobalEventState=Bi,d.HTTPOperations=tt,d.HTTP_OPERATIONS=lm,d.InputMapState=Cn,d.InstalledProjectState=$r,d.InternalCallState=wi,d.JoinListOperationInputIds=my,d.JoinListOperationOutputIds=Ty,d.LIST_OPERATIONS=vh,d.ListOperations=H,d.LoopState=Nr,d.LoopTypes=$,d.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Qn,d.NUMBER_OPERATIONS=Bp,d.NumberOperations=Te,d.OPERATION_DECLARATIONS=bA,d.OperationState=_r,d.OutputMapParentChildRelation=Yr,d.OutputMapState=Bn,d.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=$o,d.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Kn,d.PASS_THROUGH_CALLABLE_TYPES=je,d.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Su,d.ParallelExecutionOperation=lA,d.PassThroughCallableEntityClass=p2,d.PersistedEntity=uA,d.PersistedEntityMethods=Ct,d.PrimitiveEntityState=kt,d.PrimitiveTypes=I,d.PrimitiveValueParentChildRelation=Qo,d.PrimitiveValueState=_i,d.ProjectState=_,d.PropertyState=Br,d.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=U2,d.ReturnDeclarationState=Nt,d.ReturnStatementState=Ur,d.STANDALONE_CONDITIONS=ob,d.STRING_OPERATIONS=fy,d.ScopeCompatibilityType=Zo,d.SearchState=Gr,d.SequentialExecutionOperation=dA,d.SequentialExecutionOperationInputIds=xh,d.SequentialExecutionOperationOutputIds=jh,d.SharedEntityErrorCode=S,d.SharedStateFunctionality=gP,d.SplitListOperationInputIds=_y,d.SplitListOperationOutputIds=Ny,d.StandaloneOperatorTypes=Vt,d.StringOperations=K,d.TERMINATION_TYPES=Ve,d.USER_MANAGED_ENTITY_TYPES=mA,d.UserManagedEntityStateFunctionality=s2,d.VALUE_READING_ENTITIES_EXPLANATION=Ou,d.VALUE_READING_TYPES=Nn,d.VALUE_WRITING_ENTITIES_EXPLANATION=AP,d.VALUE_WRITING_TYPES=xe,d.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=Au,d.VARIABLE_TYPES=Fe,d.ValueAutogenerationType=Je,d.ValueDescriptorParentChildRelation=O,d.ValueDescriptorState=xr,d.ValueReadingEntityClass=xa,d.ValueWritingEntityClass=ja,d.VariableDeclarationState=Vr,d.VariableInputMapState=I2,d.VariableInstanceState=Lr,d.VariableOutputMapState=A2,d.WaitOperation=cA,d.WaitOperationInputIds=Mh,d.WaitOperationOutputIds=Vh,d.appendToListOperation=Qa,d.appendToListOperationElementToAppendArgument=ml,d.appendToListOperationElementToAppendArgumentParentRef=Th,d.appendToListOperationElementToAppendArgumentRef=ph,d.appendToListOperationError=gh,d.appendToListOperationErrorParentRef=Rh,d.appendToListOperationListArgument=fl,d.appendToListOperationListArgumentParentRef=mh,d.appendToListOperationListArgumentRef=dh,d.appendToListOperationListDataType=uh,d.appendToListOperationResultListDataType=fh,d.appendToListOperationResultListReturn=bh,d.appendToListOperationResultListReturnParentRef=Eh,d.appendToListOperationResultListReturnRef=hh,d.appendToListOperationSecondListDataType=yh,d.asGenerationActionExample=un,d.booleanPrototype=Vn,d.capitalizeFirstLetter=Co,d.checkAreCustomEntitiesCompatibleAsDataType=lP,d.checkAreDataTypesCompatible=jt,d.checkArePropertiesCompatibleAsDataType=oP,d.checkIsBranchDependentButNotDirectlyOnBranch=Ja,d.checkIsBranchDependentOnBranch=z2,d.checkIsCallableEntityReachable=Ha,d.checkIsCanvasEntity=p7,d.checkIsDetachedBranch=nA,d.checkIsDetachedBranchShallow=Ju,d.checkIsGlobalVariable=d7,d.checkIsGloballyDeclared=qu,d.checkIsMethod=aA,d.checkIsNestedScope=zo,d.checkScopeCompatibility=Wa,d.countedLoopActionDescriptor=ds,d.countedLoopActionDescriptorDynamicReturnDeclaration=JT,d.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=qT,d.countedLoopActionDescriptorStringArgumentDeclaration=kT,d.countedLoopActionDescriptorStringArgumentDeclarationDataType=xT,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=FT,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=$T,d.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=UT,d.countedLoopActionDescriptorStringArgumentDeclarationParentRef=jT,d.countedLoopBodyActionDescriptor=_l,d.countedLoopBodyActionDescriptorAnyDynamicArgument=ZT,d.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=zT,d.countedLoopBodyActionDescriptorAnyDynamicReturn=XT,d.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=KT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=wl,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=YT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=WT,d.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=HT,d.createCustomEntityFromJSONObject=ko,d.createEntityError=Y,d.createNestedDataTypeForEntity=GP,d.createNewInstanceOperation=rr,d.createNewInstanceOperationEntityToInstanciateArgument=uf,d.createNewInstanceOperationEntityToInstanciateArgumentRef=lf,d.createNewInstanceOperationEntityToInstanciateDataType=cf,d.createNewInstanceOperationError=ff,d.createNewInstanceOperationErrorParentRef=hf,d.createNewInstanceOperationNewEntityDataArgument=of,d.createNewInstanceOperationNewEntityDataArgumentDataType=sf,d.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=af,d.createNewInstanceOperationNewEntityDataArgumentParentRef=rf,d.createNewInstanceOperationOutputEntityDeclaration=yf,d.createNewInstanceOperationOutputEntityDeclarationParentRef=pf,d.createNewInstanceOperationRef=df,d.createSemanticId=ze,d.createStateFromGenerationTargetType=C7,d.createStateFromType=qt,d.createStateFromTypeAndSubscribe=g,d.cronJobBuiltInBaseEntity=Yl,d.cronJobBuiltInBaseEntityExpressionProperty=rb,d.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=NA,d.cronJobBuiltInBaseEntityExpressionPropertyRef=tb,d.cronJobBuiltInBaseEntityRef=nb,d.cronJobTriggeredFunctionDeclarationBlueprint=Wl,d.cronJobTriggeredFunctionDeclarationBlueprintParentRef=QE,d.customEntityToZodSchema=Mb,d.dataTypeCompatibilityToErrorExplanation=MP,d.datePrototype=fn,d.dateValueAutogenerationSchema=ld,d.deletePersistedEntityMethod=Jl,d.deletePersistedEntityMethodParentRef=zE,d.deleteRootProject=H7,d.endpointBuiltInBaseEntity=us,d.endpointBuiltInBaseEntityRef=nE,d.endpointBuiltInBaseEntityRefFour=GE,d.endpointBuiltInBaseEntityRefThree=uE,d.endpointBuiltInBaseEntityRefTwo=oE,d.endpointBuiltInCorsProperty=rE,d.endpointBuiltInCorsPropertyDataType=tE,d.endpointBuiltInCorsPropertyDataTypeRef=QT,d.endpointBuiltInCorsPropertyRef=eE,d.endpointBuiltInMethodProperty=Ml,d.endpointBuiltInMethodPropertyDataType=dE,d.endpointBuiltInMethodPropertyDataTypeRef=lE,d.endpointBuiltInMethodPropertyRef=cE,d.endpointBuiltInPathProperty=Nl,d.endpointBuiltInPathPropertyDataType=sE,d.endpointBuiltInPathPropertyDataTypeRef=iE,d.endpointBuiltInPathPropertyRef=aE,d.endpointPathParamsArgumentDeclaration=Ll,d.endpointPathParamsArgumentDeclarationRef=gE,d.endpointPathParamsVariableDataType=vE,d.endpointPathParamsVariableDataTypeRef=RE,d.endpointReachedTriggerActionDescriptor=jl,d.endpointReachedTriggerActionDescriptorRef=IE,d.endpointReachedTriggerActionDescriptorRefFour=AE,d.endpointReachedTriggerActionDescriptorRefThree=PE,d.endpointReachedTriggerActionDescriptorRefTwo=DE,d.endpointRequestBodyArgumentDeclaration=$l,d.endpointRequestBodyArgumentDeclarationRef=fE,d.endpointRequestBodyVariableDataType=mE,d.endpointRequestHeadersArgumentDeclaration=Vl,d.endpointRequestHeadersArgumentDeclarationRef=yE,d.endpointRequestHeadersVariableDataType=hE,d.endpointRequestHeadersVariableDataTypeRef=pE,d.endpointRequestQueryParamsArgumentDeclaration=Gl,d.endpointRequestQueryParamsArgumentDeclarationRef=EE,d.endpointRequestQueryParamsVariableDataType=bE,d.endpointRequestQueryParamsVariableDataTypeRef=TE,d.endpointResponseBodyDataType=VE,d.endpointResponseBodyReturnDeclaration=xl,d.endpointResponseBodyReturnDeclarationRef=ME,d.endpointResponseCodeDataType=SE,d.endpointResponseCodeReturnDeclaration=Fl,d.endpointResponseCodeReturnDeclarationRef=OE,d.endpointResponseHeadersDataType=_E,d.endpointResponseHeadersDataTypeRef=BE,d.endpointResponseHeadersReturnDeclaration=Ul,d.endpointResponseHeadersReturnDeclarationRef=wE,d.endpointReturnStatementRef=CE,d.endpointReturnStatementRefThree=LE,d.endpointReturnStatementRefTwo=NE,d.enumOptionsProperty=ep,d.enumOptionsPropertyDataType=Xu,d.enumOptionsPropertyDataTypeRef=Zu,d.enumOptionsPropertyRef=Ku,d.enumPrototype=Ln,d.enumPrototypeRef=Qu,d.executionBuiltInEntity=zl,d.executionBuiltInEntityAbortMethod=Hl,d.executionBuiltInEntityAbortMethodParentRef=ib,d.filterOutDuplicateEntities=E,d.filterOutDuplicateErrors=c9,d.findEntityFromKeys=_u,d.findReferenceToSelfInList=zP,d.findReferencesToSelfInProject=i7,d.flattenCalls=pn,d.flattenCanvasAncestorsUntil=qo,d.flattenCustomEntityExtensionAndImplementationTypes=xu,d.flattenCustomEntityExtensionTypes=Yo,d.flattenCustomEntityExtensions=Fu,d.flattenCustomEntityImplementations=Uu,d.flattenCustomEntityImplementionTypes=Wo,d.flattenDerivedCanvasEntities=St,d.flattenDetachedBranch=iA,d.flattenElementCalls=Me,d.flattenElementCallsOnTheSameScope=r7,d.flattenProjectElements=HP,d.flattenRelatedCanvasElementsOnTheLeft=eA,d.flattenRelatedCanvasElementsOnTheRight=QP,d.flattenVariableReads=YP,d.flattenVariableWrites=WP,d.flattenVariables=re,d.fromZodParseToEntityGenerationErrors=vu,d.generate=NS,d.generateActionExample=x2,d.generateExecutionDataType=xk,d.generateMutablePropertiesExplanation=Mo,d.generateRandomBoolean=sR,d.generateRandomDate=$b,d.generateRandomDateAfter=Vb,d.generateRandomDateBefore=Lb,d.generateRandomDateBetweenRange=Gb,d.generateRandomNumber=tR,d.generateRandomNumberAfter=Xb,d.generateRandomNumberBefore=Qb,d.generateRandomNumberBetweenRange=eR,d.generateRandomText=aR,d.generateRandomTextAfter=nR,d.generateRandomTextBefore=rR,d.generateRandomTextBetweenRange=iR,d.generateUniqueUUID=Kb,d.getAllActionDescriptorsForConditions=xo,d.getAllActionDescriptorsForGlobalEvents=Fo,d.getAllActionDescriptorsForLoops=Uo,d.getAllActionDescriptorsForOperations=J2,d.getAllGloballyDeclaredFunctionDeclarationsExplanation=wP,d.getBaseBuiltInEntities=_n,d.getBaseSchemaBasedOnType=IP,d.getBuiltInEntityOwner=tr,d.getCallableEntityReferenceSchema=He,d.getCallableEntityTypeSchema=HI,d.getCallerEntityReferenceSchema=h3,d.getCallerEntityTypeSchema=y3,d.getCalls=Vu,d.getCanvasEntitiesDerivedFromInternalCalls=XP,d.getCanvasEntitiesDerivedFromWrites=Mi,d.getCanvasEntityDerivedFromValueReadingEntity=$u,d.getCanvasEntityReferenceSchema=w3,d.getCanvasEntityTypeSchema=B3,d.getChildrenEntityWithValues=K2,d.getColumnProperties=T7,d.getCommonAncestor=Mu,d.getCommonChildren=$P,d.getCustomEntityExtends=Vi,d.getDatabaseEntities=f7,d.getDatabaseEntity=E7,d.getDeclaration=Cr,d.getDeepestScope=oA,d.getDraggableCallableEntityReferenceSchema=ZI,d.getDraggableCallableEntityTypeSchema=zI,d.getDraggableCallerEntityReferenceSchema=m3,d.getDraggableCallerEntityTypeSchema=f3,d.getDraggableExecutableEntityReferenceSchema=R3,d.getDraggableExecutableEntityTypeSchema=b3,d.getDraggablePassThroughCallableEntityReferenceSchema=go,d.getDraggablePassThroughCallableEntityTypeSchema=Ro,d.getDraggablePlayableEntityReferenceSchema=P3,d.getDraggablePlayableEntityTypeSchema=D3,d.getEntityArgumentDeclarations=Gu,d.getEntityInputMaps=ZP,d.getEntityOutputMaps=o7,d.getEntityReferenceSchema=C3,d.getEntityReturnDeclarations=KP,d.getEntityTypeSchema=S3,d.getEntityWithLogicScopeReferenceSchema=An,d.getEntityWithLogicScopeTypeSchema=g3,d.getEntityWithValueReferenceSchema=YI,d.getEntityWithValueTypeSchema=p3,d.getEntryPointEntityReferenceSchema=Ye,d.getEntryPointEntityTypeSchema=Hn,d.getEventEntityReferenceSchema=Eo,d.getEventEntityTypeSchema=To,d.getExecutableEntityReferenceSchema=E3,d.getExecutableEntityTypeSchema=T3,d.getExtendedBuiltInEntity=l7,d.getExtendedCustomEntity=ju,d.getGenerationTargetSchemaBasedOnType=DP,d.getHeadIfPartOfDetachedBranch=rA,d.getHighestScope=sA,d.getImplementedBuiltInEntity=c7,d.getIsInteractive=ku,d.getLastInListOperation=hl,d.getLastInListOperationError=oh,d.getLastInListOperationErrorParentRef=sh,d.getLastInListOperationInputListArgument=rh,d.getLastInListOperationInputListArgumentParentRef=nh,d.getLastInListOperationInputListArgumentRef=Xy,d.getLastInListOperationInputListDataType=Qy,d.getLastInListOperationOutputElementDataType=th,d.getLastInListOperationOutputElementReturn=ah,d.getLastInListOperationOutputElementReturnParentRef=ih,d.getLastInListOperationOutputElementReturnRef=eh,d.getLinkedEntitiesFromArgumentDeclaration=n7,d.getLowestPersistedEntityImplementation=tA,d.getParentCanvasEntities=Rt,d.getParentCanvasEntity=et,d.getParentEntryPoint=Z2,d.getPassThroughCallableEntityReferenceSchema=Ee,d.getPassThroughCallableEntityTypeSchema=bo,d.getPeristedEntities=h7,d.getPlayableEntityReferenceSchema=I3,d.getPlayableEntityTypeSchema=v3,d.getProject=Y7,d.getPrototypeByType=Ho,d.getReferenceEntityId=N,d.getReferencedEntitiesStateOrErrors=Lo,d.getReferencedEntityStateOrErrors=Iu,d.getRelatedCanvasElementsOnTheLeft=kr,d.getRelatedCanvasElementsOnTheRight=er,d.getRootEntryPointScopeOwner=Wu,d.getScopeOwner=gt,d.getTerminationReferenceSchema=O3,d.getTerminationTypeSchema=A3,d.getUsedArgFromDeclaration=a7,d.getUsedReturnFromDeclaration=s7,d.getValueReadingEntityReferenceSchema=WI,d.getValueReadingEntityTypeSchema=Pn,d.getValueWritingEntityReferenceSchema=u3,d.getValueWritingEntityTypeSchema=wa,d.getVariableFromInputMapping=UP,d.getVariableFromReturnVariablePointer=kP,d.getVariableReferenceSchema=Yn,d.getVariableTypeSchema=Ir,d.getVariablesFromArgumentDeclarations=Jo,d.getVariablesFromInputMaps=xP,d.getVariablesFromOutputMapping=qP,d.getVariablesFromOutputMaps=JP,d.getVariablesFromReturnDeclarations=jP,d.getVariablesInSameOrHigherScope=yu,d.getWrites=Lu,d.groupCallsBasedOnParallelizableExecution=Q2,d.handleAfterEntityImplementationSideEffects=LP,d.handleBeforeEntityImplementationSideEffects=VP,d.httpRequestBodyArgument=rs,d.httpRequestBodyArgumentRef=xf,d.httpRequestBodyDataType=jf,d.httpRequestHeadersArgument=ns,d.httpRequestHeadersArgumentRef=Ff,d.httpRequestHeadersDataType=Uf,d.httpRequestMethodArgument=es,d.httpRequestMethodArgumentRef=Gf,d.httpRequestMethodDataType=$f,d.httpRequestMethodDataTypeRef=Vf,d.httpRequestOperation=Fi,d.httpRequestOperationErrorValueDescriptor=vl,d.httpRequestOperationErrorValueDescriptorDatatype=om,d.httpRequestOperationErrorValueDescriptorRef=sm,d.httpRequestOperationRef=nm,d.httpRequestOperationRefEight=im,d.httpRequestOperationRefFive=em,d.httpRequestOperationRefFour=Qf,d.httpRequestOperationRefNine=am,d.httpRequestOperationRefSeven=rm,d.httpRequestOperationRefSix=tm,d.httpRequestOperationRefThree=Xf,d.httpRequestOperationRefTwo=Kf,d.httpRequestQueryParamsArgument=gl,d.httpRequestQueryParamsArgumentRef=Nf,d.httpRequestQueryParamsDataType=Mf,d.httpRequestVariableURLArgument=ts,d.httpRequestVariableURLArgumentRef=wf,d.httpRequestVariableURLDataType=_f,d.httpRequestVariableURLDataTypeRef=Cf,d.httpResponseBodyReturnDataType=Zf,d.httpResponseBodyReturnDataTypeRef=Hf,d.httpResponseBodyReturnReturn=ss,d.httpResponseBodyReturnReturnRef=zf,d.httpResponseCodeDataType=qf,d.httpResponseCodeReturn=is,d.httpResponseCodeReturnRef=kf,d.httpResponseHeadersDataType=Yf,d.httpResponseHeadersDataTypeRef=Jf,d.httpResponseHeadersReturn=as,d.httpResponseHeadersReturnRef=Wf,d.implement=jo,d.inferArgumentDeclarationDataType=cP,d.inferDataType=dn,d.inferInputMapDataType=du,d.inferOutputMapDataType=pu,d.inferPropertyDataType=pP,d.inferReturnDeclarationDataType=uu,d.inferValueDescriptorDataType=yP,d.inferVariableDeclarationDataType=uP,d.inferVariableInstanceDataType=dP,d.initProject=pA,d.iterateOverListActionDescriptorListArgumentDeclaration=vm,d.iterateOverListActionDescriptorListArgumentDeclarationDataType=Rm,d.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=bm,d.iterateOverListActionDescriptorListArgumentDeclarationParentRef=gm,d.iterateOverListLoopActionDescriptor=ar,d.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=Dm,d.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Im,d.iterateOverListLoopBodyActionDescriptor=ls,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=Nm,d.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=_m,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=Vm,d.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=Mm,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=os,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Am,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Pm,d.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Om,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=wm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Cm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Sm,d.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Bm,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=rT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=tT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=eT,d.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=nT,d.iterateOverObjectKeysLoopActionDescriptor=xi,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=aT,d.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=iT,d.iterateOverObjectKeysLoopBodyActionDescriptor=TT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=hT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=yT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=mT,d.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=fT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Cl,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=oT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=sT,d.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=lT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=pT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=dT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=cT,d.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=uT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=vT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=RT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=bT,d.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=gT,d.iterateOverObjectValuesLoopActionDescriptor=ji,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=DT,d.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=IT,d.iterateOverObjectValuesLoopBodyActionDescriptor=LT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=NT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=_T,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=VT,d.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=MT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Bl,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=AT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=PT,d.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=OT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=wT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=CT,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=ST,d.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=BT,d.iterateOverStringActionDescriptorDynamicReturnDeclaration=jm,d.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=xm,d.iterateOverStringActionDescriptorStringArgumentDeclaration=Um,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=$m,d.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Gm,d.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Fm,d.iterateOverStringLoopActionDescriptor=cs,d.iterateOverStringLoopBodyActionDescriptor=Sl,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=Zm,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=zm,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Xm,d.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Km,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Al,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=qm,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=km,d.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Jm,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Ol,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Ym,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Wm,d.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Hm,d.joinListOperation=ul,d.joinListOperationError=wy,d.joinListOperationErrorParentRef=By,d.joinListOperationFirstListArgument=Py,d.joinListOperationFirstListArgumentParentRef=Dy,d.joinListOperationFirstListArgumentRef=Ey,d.joinListOperationFirstListDataType=by,d.joinListOperationResultListDataType=Iy,d.joinListOperationResultListReturn=Cy,d.joinListOperationResultListReturnParentRef=Sy,d.joinListOperationResultListReturnRef=vy,d.joinListOperationSecondListArgument=Oy,d.joinListOperationSecondListArgumentParentRef=Ay,d.joinListOperationSecondListArgumentRef=Ry,d.joinListOperationSecondListDataType=gy,d.joinListWithLastSeparator=U,d.joinStringsOperation=$i,d.joinStringsOperationDynamicStringArgument=Kp,d.joinStringsOperationDynamicStringArgumentParentRef=Zp,d.joinStringsOperationDynamicStringArgumentRef=Hp,d.joinStringsOperationDynamicStringDataType=zp,d.joinStringsOperationError=Yp,d.joinStringsOperationErrorParentRef=Wp,d.joinStringsOperationFirstStringArgument=Ka,d.joinStringsOperationFirstStringArgumentParentRef=Gp,d.joinStringsOperationFirstStringArgumentRef=wp,d.joinStringsOperationFirstStringDataType=_p,d.joinStringsOperationResultStringDataType=Lp,d.joinStringsOperationResultStringReturn=Gi,d.joinStringsOperationResultStringReturnParentRef=Jp,d.joinStringsOperationResultStringReturnRef=Vp,d.joinStringsOperationSecondStringArgument=Xa,d.joinStringsOperationSecondStringArgumentParentRef=qp,d.joinStringsOperationSecondStringArgumentRef=Np,d.joinStringsOperationSecondStringDataType=Mp,d.joinStringsOperationSeparatorStringArgument=kp,d.joinStringsOperationSeparatorStringArgumentParentRef=jp,d.joinStringsOperationSeparatorStringArgumentRef=$p,d.joinStringsOperationSeparatorStringDataType=xp,d.joinStringsOperationSeparatorStringDataTypeDefaultValue=Up,d.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=Fp,d.keyValuePrototype=Li,d.lowercaseFirstLetter=sP,d.manualFlowActionDescriptorDeclarationArgumentDeclaration=Dl,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=pm,d.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=um,d.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=ym,d.manualFlowLoopActionDescriptor=Il,d.manualFlowLoopActionDescriptorDynamicReturnDeclaration=dm,d.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=cm,d.manualFlowLoopBodyActionDescriptor=Pl,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=fm,d.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=hm,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Tm,d.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=mm,d.mapActionDescriptorToTypeItRepresents=y7,d.mergeEntityErrorsList=d9,d.mergeListOfEntities=u7,d.methodDefaultValue=Lf,d.mockClientProject=DI,d.moreThanOrEqualCondition=ti,d.moreThanOrEqualConditionLeftHandArgument=ub,d.moreThanOrEqualConditionLeftHandArgumentDataType=cb,d.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=lb,d.moreThanOrEqualConditionLeftHandArgumentParentRef=db,d.moreThanOrEqualConditionRightHandArgument=fb,d.moreThanOrEqualConditionRightHandArgumentDataType=yb,d.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=pb,d.moreThanOrEqualConditionRightHandArgumentParentRef=hb,d.notEmptyCondition=dr,d.notEmptyConditionArgument=sb,d.notEmptyConditionRef=ab,d.nullPrototype=TA,d.numberAdditionOperation=Za,d.numberAdditionOperationDynamicSummandArgument=yp,d.numberAdditionOperationDynamicSummandArgumentType=pp,d.numberAdditionOperationDynamicSummandArgumentTypeParentRef=up,d.numberAdditionOperationError=dp,d.numberAdditionOperationErrorParentRef=cp,d.numberAdditionOperationFirstNumberArgument=il,d.numberAdditionOperationFirstNumberArgumentRef=tp,d.numberAdditionOperationFirstNumberDataType=np,d.numberAdditionOperationRef=op,d.numberAdditionOperationRefThree=sl,d.numberAdditionOperationRefTwo=lp,d.numberAdditionOperationResultNumberDataType=sp,d.numberAdditionOperationResultNumberReturn=ol,d.numberAdditionOperationResultNumberReturnRef=ap,d.numberAdditionOperationSecondNumberArgument=al,d.numberAdditionOperationSecondNumberArgumentRef=rp,d.numberAdditionOperationSecondNumberDataType=ip,d.numberPrototype=X,d.numberSubtractionOperation=cl,d.numberSubtractionOperationDynamicSubtrahendArgument=Cp,d.numberSubtractionOperationDynamicSubtrahendArgumentType=Sp,d.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Op,d.numberSubtractionOperationError=Ap,d.numberSubtractionOperationErrorParentRef=Pp,d.numberSubtractionOperationFirstNumberArgument=Rp,d.numberSubtractionOperationFirstNumberArgumentRef=hp,d.numberSubtractionOperationFirstNumberDataType=fp,d.numberSubtractionOperationRef=ll,d.numberSubtractionOperationRefThree=Ip,d.numberSubtractionOperationRefTwo=gp,d.numberSubtractionOperationResultNumberDataType=bp,d.numberSubtractionOperationResultNumberReturn=Dp,d.numberSubtractionOperationResultNumberReturnRef=Ep,d.numberSubtractionOperationSecondNumberArgument=vp,d.numberSubtractionOperationSecondNumberArgumentRef=mp,d.numberSubtractionOperationSecondNumberDataType=Tp,d.numberValueAutogenerationSchema=od,d.parallelExecutionOperation=Wt,d.parallelExecutionOperationError=Nh,d.parallelExecutionOperationErrorParentRef=_h,d.parallelExecutionOperationListOfExecutionResultsDataType=Ch,d.parallelExecutionOperationListOfExecutionResultsReturn=El,d.parallelExecutionOperationListOfExecutionResultsReturnRef=Sh,d.parallelExecutionOperationListOfFunctionsArgument=Tl,d.parallelExecutionOperationListOfFunctionsArgumentDatatype=Oh,d.parallelExecutionOperationListOfFunctionsArgumentRef=Ah,d.parallelExecutionOperationListOfFunctionsBlueprint=Ph,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=Dh,d.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=Ih,d.parallelExecutionOperationRef=Bh,d.parallelExecutionOperationRefThree=wh,d.persistedBuiltInBaseEntity=nt,d.persistedBuiltInBaseEntityDatabaseProperty=Qr,d.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=BA,d.persistedBuiltInBaseEntityDatabasePropertyParentRef=KE,d.persistedBuiltInBaseEntityDatabasePropertyRef=ZE,d.processOutputGlobalValueDescriptorDataType=Eb,d.processOutputGlobalValueDescriptorReturn=Kl,d.processOutputGlobalValueDescriptorReturnRef=Tb,d.projectPublicationCompletedGlobalEvent=ms,d.propertyToZodSchema=Nb,d.relationalDatabaseBuiltInBaseEntity=En,d.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=ql,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=YE,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=HE,d.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=WE,d.relationalDatabaseBuiltInBaseEntityDefaultProperty=kl,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=qE,d.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=JE,d.relationalDatabaseBuiltInBaseEntityIdentifierProperty=ps,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=$E,d.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=FE,d.relationalDatabaseBuiltInBaseEntityMinSizeProperty=fs,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=jE,d.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=kE,d.relationalDatabaseBuiltInBaseEntityPasswordProperty=hs,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=DA,d.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=xE,d.relationalDatabaseBuiltInBaseEntityRef=Xr,d.relationalDatabaseBuiltInBaseEntityUsernameProperty=ys,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=vA,d.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=UE,d.resolveActionDescriptorName=RP,d.resolveBaseEntityName=fP,d.resolveBuiltInBaseEntityDataTypeLabel=mP,d.resolveConditionOperatorLabel=_o,d.resolveCustomEntityDataTypeLabel=TP,d.resolveDataType=Bo,d.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Nu,d.resolveDataTypeLabel=hu,d.resolveEntityDataTypeLabel=Jk,d.resolveEntityName=C,d.resolveFirstCallsSecond=e7,d.resolveFirstWritesSecond=t7,d.resolvePrimaryKeyProperty=m7,d.resolvePrimitiveEntityName=bP,d.resolveSearchName=EP,d.resolveVariableScope=jk,d.sequentialExecutionOperation=Tn,d.sequentialExecutionOperationError=Qh,d.sequentialExecutionOperationErrorParentRef=Xh,d.sequentialExecutionOperationListOfExecutionResultsDataType=zh,d.sequentialExecutionOperationListOfExecutionResultsReturn=Rl,d.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=Kh,d.sequentialExecutionOperationListOfExecutionResultsReturnRef=Hh,d.sequentialExecutionOperationListOfFunctionsArgument=bl,d.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Yh,d.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Zh,d.sequentialExecutionOperationListOfFunctionsArgumentRef=Wh,d.sequentialExecutionOperationListOfFunctionsBlueprint=Jh,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=qh,d.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=kh,d.softDeletePersistedEntityMethod=_A,d.softDeletePersistedEntityMethodParentRef=XE,d.sortCallsBasedOnExecutionDependencies=FP,d.sortChildrenEntitiesBasedOnExecutionDependencies=X2,d.splitListOperation=yl,d.splitListOperationError=zy,d.splitListOperationErrorParentRef=Hy,d.splitListOperationFirstOutputListDataType=$y,d.splitListOperationFirstOutputListReturn=qy,d.splitListOperationFirstOutputListReturnParentRef=ky,d.splitListOperationFirstOutputListReturnRef=pl,d.splitListOperationInputListArgument=Uy,d.splitListOperationInputListArgumentParentRef=Fy,d.splitListOperationInputListArgumentRef=My,d.splitListOperationInputListDataType=Vy,d.splitListOperationSecondOutputListDataType=Jy,d.splitListOperationSecondOutputListReturn=Yy,d.splitListOperationSecondOutputListReturnParentRef=Wy,d.splitListOperationSplitIndexArgument=jy,d.splitListOperationSplitIndexArgumentParentRef=xy,d.splitListOperationSplitIndexArgumentRef=Ly,d.splitListOperationSplitIndexDataType=Gy,d.splitStringOperation=dl,d.splitStringOperationError=hy,d.splitStringOperationErrorParentRef=yy,d.splitStringOperationFirstPartResultStringDataType=ry,d.splitStringOperationFirstPartResultStringReturn=py,d.splitStringOperationFirstPartResultStringReturnParentRef=uy,d.splitStringOperationFirstPartResultStringReturnRef=ny,d.splitStringOperationIndexArgument=cy,d.splitStringOperationIndexArgumentParentRef=ly,d.splitStringOperationIndexArgumentRef=ey,d.splitStringOperationIndexDataType=ty,d.splitStringOperationSecondPartResultStringDataType=ay,d.splitStringOperationSecondPartResultStringReturn=EA,d.splitStringOperationSecondPartResultStringReturnParentRef=dy,d.splitStringOperationSecondPartResultStringReturnRef=iy,d.splitStringOperationStringArgument=oy,d.splitStringOperationStringArgumentParentRef=sy,d.splitStringOperationStringArgumentRef=Xp,d.splitStringOperationStringDataType=Qp,d.stringPrototype=x,d.stringValueAutogenerationSchema=sd,d.suggestNewIdForEntity=Ru,d.test_primitive_entities_export=z7,d.toCamelCase=kk,d.toEntityState=Mt,d.toKebabCase=hP,d.toLowerCaseKebabCase=wo,d.toPascalCase=qk,d.untypedDataPrototype=Ke,d.updateErrorsList=ie,d.updateValueReader=Ya,d.urlDefaultValue=Bf,d.uuidPrototype=za,d.validateArgumentDeclarationName=Eu,d.validateCalledByErrorIdInAction=k2,d.validateCalledByIdInAction=j2,d.validateCallers=BP,d.validateConditionEntityDeclaration=W2,d.validateCustomEntityName=No,d.validateDataOperation=ir,d.validateDataOperationDataToValidateArgument=bf,d.validateDataOperationDataToValidateArgumentParentRef=Ef,d.validateDataOperationDataToValidateArgumentRef=mf,d.validateDataOperationDataToValidateDataType=Tf,d.validateDataOperationEntityToMatchTypeArgument=If,d.validateDataOperationEntityToMatchTypeArgumentParentRef=vf,d.validateDataOperationEntityToMatchTypeArgumentRef=Rf,d.validateDataOperationEntityToMatchTypeDataType=gf,d.validateDataOperationError=Of,d.validateDataOperationErrorParentRef=Af,d.validateDataOperationOutputEntityDeclaration=Pf,d.validateDataOperationOutputEntityDeclarationParentRef=Df,d.validateEntryCaller=CP,d.validateErrorCaller=SP,d.validateFunctionCallDeclaration=_P,d.validateFunctionDeclarationName=fu,d.validateGeneratedEntityParentIsNotBuiltInEntity=$2,d.validateGeneration=L2,d.validateGenerationTarget=Le,d.validateGenerationUpdate=G2,d.validateLoopEntityDeclaration=Y2,d.validateName=Wk,d.validateOperationEntityDeclaration=NP,d.validatePropertyName=Tu,d.validateReachability=wn,d.validateReadsValueInActionPayload=q2,d.validateReferenceObject=Vo,d.validateReferenceToOne=Du,d.validateReferences=We,d.validateReturnDeclarationName=bu,d.validateSuccessCaller=OP,d.validateValueReaderGenerationUpdate=qa,d.validateValueWritter=Bu,d.validateVariableDeclarationName=mu,d.validateVariableInternalCallUse=wu,d.valueAutogenerationCurrentDateAndTimeSchema=AI,d.valueAutogenerationGenericSchema=to,d.valueAutogenerationOptions=cd,d.valueAutogenerationOptionsSchema=PI,d.valueAutogenerationRandomBooleanSchema=ad,d.valueAutogenerationRandomDateBetweenSchema=VI,d.valueAutogenerationRandomDateFromSchema=NI,d.valueAutogenerationRandomDateSchema=io,d.valueAutogenerationRandomDateUntilSchema=MI,d.valueAutogenerationRandomNumberBetweenSchema=CI,d.valueAutogenerationRandomNumberFromSchema=OI,d.valueAutogenerationRandomNumberSchema=no,d.valueAutogenerationRandomNumberUntilSchema=SI,d.valueAutogenerationRandomSchema=Da,d.valueAutogenerationRandomTextBetweenSchema=_I,d.valueAutogenerationRandomTextFromSchema=BI,d.valueAutogenerationRandomTextSchema=ro,d.valueAutogenerationRandomTextUntilSchema=wI,d.valueAutogenerationRangeValueTypesSchema=Ia,d.valueAutogenerationUniqueSchema=id,d.waitOperation=pt,d.waitOperationMillisecondsNumberArgument=nr,d.waitOperationMillisecondsNumberArgumentRef=Lh,d.waitOperationMillisecondsNumberDataType=Gh,d.waitOperationOperationError=Uh,d.waitOperationOperationErrorParentRef=Fh,d.waitOperationRef=$h,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|