@elyx-code/project-logic-tree 0.0.6084 → 0.0.6085

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.
@@ -1,4 +1,4 @@
1
- (function(c,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(c=typeof globalThis<"u"?globalThis:c||self,n(c["@elyx-code/project-logic-tree"]={}))})(this,function(c){"use strict";var H7=Object.defineProperty;var z7=(c,n,V)=>n in c?H7(c,n,{enumerable:!0,configurable:!0,writable:!0,value:V}):c[n]=V;var d=(c,n,V)=>(z7(c,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||{}),We=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(We||{}),P=(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.JSON="json",r.Date="date",r.UUID="uuid",r.File="file",r))(P||{}),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||{}),W=(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))(W||{}),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||{}),nt=(r=>(r.HttpRequest="base-http-request",r))(nt||{}),$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||{}),Mt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Mt||{}),$=(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||{}),Ke=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(Ke||{}),pn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(pn||{}),Ct=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Ct||{}),Wr=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(Wr||{});const Bn=[n.VariableDeclaration,n.VariableInstance,n.InputMap,n.ReturnDeclaration],xe=[n.VariableDeclaration,n.VariableInstance,n.ArgumentDeclaration,n.OutputMap],Ju=[...Bn,...xe],Fe=[n.VariableDeclaration,n.VariableInstance],Yr=[n.GlobalEvent],je=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.InternalCall,n.Loop],Xo=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.Loop],Ue=[n.FunctionDeclaration,...Yr],wn=[...je,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],Qo=[...Xo,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],yn=[...je,...Ue],Wu=[...Xo,...Ue],LA=[...wn,...Ue],GA=[...Qo,...Ue],ut=[...Ue,n.Loop],Ve=[n.ReturnStatement,n.BreakStatement,n.ContinueStatement],$A=[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],el=[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],Yu=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor],Hr=[n.BuiltInBaseEntity,n.PrimitiveEntity],FA=[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 tl=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(tl||{});const B={[n.PrimitiveEntity]:{[P.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[P.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[P.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[P.JSON]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[P.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"}}}}},[P.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[P.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[P.Null]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",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"},identifier:{id:"persisted-built-in-base-entity-identifier-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"}}},[nt.HttpRequest]:{id:nt.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"}}}},[Mt.NotEmpty]:{id:Mt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[n.GlobalEvent]:{[pn.PROJECT_PUBLICATION_COMPLETED]:{id:pn.PROJECT_PUBLICATION_COMPLETED}}},qt=B[n.PrimitiveEntity],x={type:n.PrimitiveEntity,id:qt.string.id,description:"A string of characters.",version:1,name:P.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},_n={type:n.PrimitiveEntity,id:qt.boolean.id,description:"A 'true' or 'false' value.",version:1,name:P.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},X={type:n.PrimitiveEntity,id:qt.number.id,description:"A number value.",version:1,name:P.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},UA={type:n.PrimitiveEntity,id:qt.null.id,description:"An explicitly empty value.",version:1,name:P.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xe={type:n.PrimitiveEntity,id:"730e8ea9-8498-439a-9001-b07de55aaa7d",description:"A complex data structure with any combination of properties with names and values.",version:1,name:P.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Hu={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:n.GenericReference,entityId:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",entityType:n.DataType},zu={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:n.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:n.Property},Zu={like:!1,inferred:!1,id:qt.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:{id:qt.enum.properties.options.dataType.defaultValue.id,type:n.PrimitiveValue,version:1,name:P.JSON,autogeneration:null,value:[],valueAsType:null,parent:Hu},parent:zu},Ku={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:n.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:n.PrimitiveEntity},Xu={hidden:!1,required:!0,id:qt.enum.properties.options.id,name:"Options",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Zu,description:"Options for the enum. Each option is a text value.",parent:Ku},Nn={type:n.PrimitiveEntity,id:qt.enum.id,description:"A set of text options to choose from.",version:1,name:P.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Xu],methods:[]},hn={type:n.PrimitiveEntity,id:qt.date.id,description:"A date and time value.",version:1,name:P.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Wa={type:n.PrimitiveEntity,id:qt.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:P.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[x],properties:[],methods:[]},nl={type:n.PrimitiveEntity,id:qt.json.id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:P.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xt=B[n.Operation][Te.Addition],Qu={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Xt.inputs.firstSummand.id,entityType:n.ValueDescriptor},ep={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:Qu},tp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Xt.inputs.secondSummand.id,entityType:n.ValueDescriptor},np={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},rp={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Xt.outputs.result.id,entityType:n.ValueDescriptor},ip={like:!1,inferred:!1,id:Xt.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:rp},ap={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Addition,entityType:n.ActionDescriptor},rl={id:Xt.inputs.firstSummand.id,type:n.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",dataType:ep,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ap},sp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Addition,entityType:n.ActionDescriptor},il={id:Xt.inputs.secondSummand.id,type:n.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",dataType:np,required:!0,parentRelationType:O.FixedArguments,index:1,parent:sp},al={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Addition,entityType:n.ActionDescriptor},sl={parentRelationType:O.FixedReturns,id:Xt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:ip,required:!0,index:0,parent:al},op={type:n.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Te.Addition,entityType:n.ActionDescriptor},lp={parentRelationType:O.FixedReturns,id:Xt.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:op},cp={type:n.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:Xt.inputs.dynamicSummand.id,entityType:n.ValueDescriptor},dp={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:cp},up={parentRelationType:O.DynamicArgument,id:Xt.inputs.dynamicSummand.id,type:n.ValueDescriptor,description:"A number to add",version:1,name:"Summand",dataType:dp,required:!0,index:2,parent:al},Ya={id:Te.Addition,type:n.ActionDescriptor,description:"Sum numbers",version:1,name:Te.Addition,inputs:[rl,il,up],error:lp,outputs:[sl],parent:null},Qt=B[n.Operation][Te.Subtraction],pp={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Qt.inputs.minuend.id,entityType:n.ValueDescriptor},yp={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:pp},hp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Qt.inputs.subtrahend.id,entityType:n.ValueDescriptor},fp={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:hp},mp={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Qt.outputs.result.id,entityType:n.ValueDescriptor},Tp={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:mp},ol={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Ep={id:Qt.inputs.minuend.id,type:n.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",dataType:yp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ol},bp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Rp={id:Qt.inputs.subtrahend.id,type:n.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",dataType:fp,required:!0,parentRelationType:O.FixedArguments,index:1,parent:bp},gp={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Subtraction,entityType:n.ActionDescriptor},vp={parentRelationType:O.FixedReturns,id:Qt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",dataType:Tp,required:!0,index:0,parent:gp},Ip={type:n.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Te.Subtraction,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:Ip},Pp={type:n.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:Qt.inputs.dynamicSubtrahend.id,entityType:n.ValueDescriptor},Ap={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:Pp},Op={id:Qt.inputs.dynamicSubtrahend.id,type:n.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",dataType:Ap,required:!0,parentRelationType:O.DynamicArgument,index:2,parent:ol},ll={id:Te.Subtraction,type:n.ActionDescriptor,description:"Substract numbers",version:1,name:Te.Subtraction,inputs:[Ep,Rp,Op],error:Dp,outputs:[vp],parent:null},Sp={[Te.Addition]:Ya,[Te.Subtraction]:ll},Jt=B[n.Operation][K.Join],Cp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},Bp={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:Cp},wp={type:n.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Jt.inputs.second.id,entityType:n.ValueDescriptor},_p={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:wp},Np={type:n.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Jt.outputs.result.id,entityType:n.ValueDescriptor},Mp={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:Np},Vp={type:n.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Ha={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:Bp,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Vp},Lp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},Gp={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},$p={type:n.PrimitiveValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:P.String,value:"",valueAsType:null,autogeneration:null,parent:Gp},Fp={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:$p,constant:!1,parent:Lp},Up={type:n.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},xp={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:Fp,parentRelationType:O.FixedArguments,required:!1,index:0,parent:Up},jp={type:n.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},za={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:_p,parentRelationType:O.FixedArguments,required:!0,index:2,parent:jp},kp={type:n.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Ni={parentRelationType:O.FixedReturns,id:Jt.outputs.result.id,type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:Mp,required:!0,index:0,parent:kp},qp={type:n.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Jp={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:qp},Wp={type:n.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Jt.inputs.dynamicString.id,entityType:n.ValueDescriptor},Yp={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:Wp},Hp={type:n.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},zp={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:Yp,parentRelationType:O.DynamicArgument,required:!0,index:3,parent:Hp},Mi={id:K.Join,type:n.ActionDescriptor,version:1,name:K.Join,description:"Join text values together, to form a single resulting text value.",inputs:[xp,Ha,za,zp],outputs:[Ni],error:Jp,parent:null},fn=B[n.Operation][K.Split],Zp={type:n.GenericReference,id:"split-string-string-argument-declaration",entityId:fn.inputs.stringValue.id,entityType:n.ValueDescriptor},Kp={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:Zp},Xp={type:n.GenericReference,id:"split-string-index-argument-declaration",entityId:fn.inputs.indexLocation.id,entityType:n.ValueDescriptor},Qp={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:Xp},ey={type:n.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:fn.outputs.firstPartResult.id,entityType:n.ValueDescriptor},ty={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:ey},ny={type:n.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:fn.outputs.secondPartResult.id,entityType:n.ValueDescriptor},ry={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:ny},iy={type:n.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},ay={id:fn.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:Kp,parentRelationType:O.FixedArguments,required:!0,index:0,parent:iy},sy={type:n.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},oy={id:fn.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:Qp,parentRelationType:O.FixedArguments,required:!0,index:1,parent:sy},ly={type:n.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},xA={parentRelationType:O.FixedReturns,id:fn.outputs.secondPartResult.id,type:n.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",dataType:ry,required:!0,index:1,parent:ly},cy={type:n.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},dy={parentRelationType:O.FixedReturns,id:fn.outputs.firstPartResult.id,type:n.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",dataType:ty,required:!0,index:0,parent:cy},uy={type:n.GenericReference,id:"split-string-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},py={parentRelationType:O.FixedReturns,id:fn.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:uy},cl={id:K.Split,type:n.ActionDescriptor,version:1,name:K.Split,description:"Split a text into two, at the given index location.",inputs:[ay,oy],outputs:[dy],error:py,parent:null},yy={[K.Join]:Mi,[K.Split]:cl};var hy=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(hy||{}),fy=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(fy||{});const my={type:n.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:n.ValueDescriptor},Ty={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:my},Ey={type:n.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:n.ValueDescriptor},by={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:Ey},Ry={type:n.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:n.ValueDescriptor},gy={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:Ry},vy={type:n.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Iy={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:Ty,parentRelationType:O.FixedArguments,required:!0,index:0,parent:vy},Dy={type:n.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Py={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:by,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Dy},Ay={type:n.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Oy={parentRelationType:O.FixedReturns,id:"join-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:gy,required:!0,index:0,parent:Ay},Sy={type:n.GenericReference,id:"join-list-operation-error-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Cy={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:Sy},dl={id:W.Join,type:n.ActionDescriptor,version:1,name:W.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[Iy,Py],error:Cy,outputs:[Oy],parent:null};var By=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(By||{}),wy=(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))(wy||{});const _y={type:n.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:n.ValueDescriptor},Ny={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:_y},My={type:n.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:n.ValueDescriptor},Vy={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:My},ul={type:n.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:n.ValueDescriptor},Ly={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:ul},Gy={type:n.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},$y={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:Ny,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Gy},Fy={type:n.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Uy={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:Vy,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Fy},xy={type:n.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:W.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:Ly,required:!0,index:0,parent:xy},ky={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:ul},qy={type:n.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Jy={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:ky,required:!0,index:0,parent:qy},Wy={type:n.GenericReference,id:"split-list-operation-error-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Yy={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:Wy},pl={id:W.Split,type:n.ActionDescriptor,version:1,name:W.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:[$y,Uy],outputs:[jy,Jy],error:Yy,parent:null};var Hy=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(Hy||{}),zy=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(zy||{});const Zy={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},Ky={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:Zy},Xy={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},Qy={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:Xy},eh={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},th={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:Ky,parentRelationType:O.FixedArguments,required:!0,index:0,parent:eh},nh={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},rh={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:Qy,required:!0,index:0,parent:nh},ih={type:n.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},ah={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:ih},yl={id:W.GetLast,type:n.ActionDescriptor,version:1,name:W.GetLast,description:"Outputs the last element of a given list.",inputs:[th],outputs:[rh],error:ah,parent:null};var sh=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(sh||{}),oh=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(oh||{});const lh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:n.ValueDescriptor},ch={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:lh},dh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:n.ValueDescriptor},uh={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:dh},ph={type:n.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:n.ValueDescriptor},yh={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:ph},hh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},hl={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:ch,parentRelationType:O.FixedArguments,required:!0,index:0,parent:hh},fh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},fl={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:uh,parentRelationType:O.FixedArguments,required:!0,index:1,parent:fh},mh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},Th={parentRelationType:O.FixedReturns,id:"append-to-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:yh,required:!0,index:0,parent:mh},Eh={type:n.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},bh={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:Eh},Za={id:W.Append,type:n.ActionDescriptor,version:1,name:W.Append,description:"Adds a given element to the end of a list value.",inputs:[hl,fl],error:bh,outputs:[Th],parent:null},Rh={[W.Join]:dl,[W.Split]:pl,[W.GetLast]:yl,[W.Append]:Za},zr=B[n.Operation][le.Parallel],gh={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},vh={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},Ih={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:[vh],outputs:[gh],error:null,parent:null},Dh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:zr.inputs.listOfActions.id,entityType:n.ValueDescriptor},Ph={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ih,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Dh},Ah={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:zr.outputs.results.id,entityType:n.ValueDescriptor},Oh={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:Ah},Sh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:le.Parallel,entityType:n.ActionDescriptor},ml={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:Ph,required:!0,index:0,parent:Sh,parentRelationType:O.FixedArguments},Ch={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:le.Parallel,entityType:n.ActionDescriptor},Tl={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:Oh,required:!0,index:0,parent:Ch,parentRelationType:O.FixedReturns},Bh={type:n.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:le.Parallel,entityType:n.ActionDescriptor},wh={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:Bh,parentRelationType:O.ReturnedError},Wt={id:le.Parallel,type:n.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:le.Parallel,inputs:[ml],outputs:[Tl],error:wh,parent:null};var _h=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(_h||{}),Nh=(r=>(r.Error="wait-operation-error-return-delaration",r))(Nh||{});const Mh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:n.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},Vh={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:Mh},Lh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:n.ActionDescriptor,entityId:le.Wait},tr={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:Vh,required:!0,index:0,parent:Lh,parentRelationType:O.FixedArguments},Gh={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:le.Wait,entityType:n.ActionDescriptor},$h={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:Gh,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:[tr],outputs:[],error:$h,parent:null};var Fh=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(Fh||{}),Uh=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(Uh||{});const xh={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},kh={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:[xh],error:null,parent:null},qh={type:n.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:n.ValueDescriptor},Jh={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:kh,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:qh},Wh={type:n.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:n.ValueDescriptor},Yh={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:Wh},Hh={type:n.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},El={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:Jh,required:!0,index:0,parent:Hh,parentRelationType:O.FixedArguments},zh={type:n.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},bl={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:Yh,required:!0,index:0,parent:zh,parentRelationType:O.FixedReturns},Zh={type:n.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},Kh={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:Zh,parentRelationType:O.ReturnedError},mn={id:le.Sequential,type:n.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:le.Sequential,inputs:[El],outputs:[bl],error:Kh,parent:null},Xh={[le.Parallel]:Wt,[le.Wait]:pt,[le.Sequential]:mn};var Qh=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(Qh||{}),ef=(r=>(r.Error="create-new-instance-error-return-delaration",r))(ef||{});const tf={type:n.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},nf={type:n.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:n.ValueDescriptor},rf={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:nf},af={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:rf,required:!0,parentRelationType:O.FixedArguments,index:1,parent:tf},sf={type:n.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},of={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:sf},lf={type:n.GenericReference,id:"create-new-instance-operation-ref",entityType:n.ActionDescriptor,entityId:ce.CreateNewInstance},cf={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:of,required:!0,parentRelationType:O.FixedArguments,index:0,parent:lf},df={type:n.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},uf={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:df,required:!0,index:0},pf={type:n.GenericReference,id:"create-new-instance-error-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},yf={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:pf},nr={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:[cf,af],outputs:[uf],error:yf,parent:null},Zr=B[n.Operation][ce.Validate],hf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Zr.inputs.dataToValidate.id},ff={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:hf},mf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},Tf={id:Zr.inputs.dataToValidate.id,type:n.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:ff,required:!0,parentRelationType:O.FixedArguments,index:0,parent:mf},Ef={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Zr.inputs.entityToMatch.id},bf={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:Ef},Rf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},gf={id:Zr.inputs.entityToMatch.id,type:n.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:bf,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Rf},vf={type:n.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},If={id:Zr.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:vf,required:!0,index:0,parentRelationType:O.FixedReturns},Df={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Pf={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:Df,parentRelationType:O.ReturnedError},rr={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:[gf,Tf],outputs:[If],error:Pf,parent:null},Af={[ce.CreateNewInstance]:nr,[ce.Validate]:rr},Qe=B[n.Operation]["base-http-request"],Of={type:n.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:n.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},Sf={id:"http-request-url-default-value-id",type:n.PrimitiveValue,version:1,value:"https://some-url.com",name:P.String,valueAsType:null,parent:Of,autogeneration:null},Cf={type:n.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Qe.inputs.url.id,entityType:n.ValueDescriptor},Bf={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:Sf,constant:!1,parent:Cf},wf={type:n.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Qe.inputs.query.id,entityType:n.ValueDescriptor},_f={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:wf},Nf={type:n.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:n.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},Mf={id:"http-request-method-default-value-id",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,valueAsType:null,parent:Nf,autogeneration:null},Vf={type:n.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Qe.inputs.method.id,entityType:n.ValueDescriptor},Lf={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:Mf,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:Vf},Gf={type:n.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Qe.inputs.headers.id,entityType:n.ValueDescriptor},$f={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gf},Ff={type:n.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Qe.inputs.body.id,entityType:n.ValueDescriptor},Uf={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ff},xf={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Qe.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:xf},kf={type:n.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:n.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},qf={type:n.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:n.ValueDescriptor,entityId:Qe.outputs.headers.id},Jf={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-headers-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:P.JSON,parent:kf,valueAsType:null,autogeneration:null},constant:!1,parent:qf},Wf={type:n.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:n.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},Yf={type:n.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:n.ValueDescriptor,entityId:Qe.outputs.body.id},Hf={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-body-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:P.JSON,parent:Wf,valueAsType:null,autogeneration:null},constant:!1,parent:Yf},zf={type:n.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Ka={id:Qe.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:Lf,required:!1,index:0,parentRelationType:O.FixedArguments,parent:zf},Zf={type:n.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Xa={id:Qe.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:Bf,required:!1,index:1,parentRelationType:O.FixedArguments,parent:Zf},Kf={type:n.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Rl={id:Qe.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:_f,required:!1,index:2,parentRelationType:O.FixedArguments,parent:Kf},Xf={type:n.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Qa={id:Qe.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:$f,required:!1,index:3,parent:Xf,parentRelationType:O.FixedArguments},Qf={type:n.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},es={id:Qe.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 JSON data structure or a text value.",version:1,name:"Body",dataType:Uf,required:!1,index:4,parentRelationType:O.FixedArguments,parent:Qf},em={type:n.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},ts={id:Qe.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:em},tm={type:n.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},ns={parentRelationType:O.FixedReturns,id:Qe.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:Jf,required:!0,index:1,parent:tm},nm={type:n.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},rs={parentRelationType:O.FixedReturns,id:Qe.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 JSON data structure or a text value.",version:1,name:"Body",dataType:Hf,required:!0,index:2,parent:nm},rm={type:n.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},im={type:n.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:n.ValueDescriptor,entityId:Qe.outputs.error.id},am={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:im},gl={parentRelationType:O.ReturnedError,id:Qe.outputs.error.id,type:n.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:am,required:!0,index:0,parent:rm},Vi={type:n.ActionDescriptor,id:nt.HttpRequest,name:nt.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:[Ka,Xa,Rl,Qa,es],outputs:[ts,ns,rs],error:gl,parent:null},sm={[nt.HttpRequest]:Vi},jA={...yy,...Sp,...Rh,...Xh,...Af,...sm},kA=B[n.Loop]["manual-flow-loop"],om={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ManualFlow,entityType:n.ActionDescriptor},lm={id:kA.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:om,parentRelationType:O.DynamicReturn},vl={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:[lm],error:null,parent:null},Li=B[n.Loop]["manual-flow-loop"],cm={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},dm={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:cm},um={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Li.body.id,entityType:n.ActionDescriptor},Il={id:Li.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:dm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:um},pm={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Li.body.id,entityType:n.ActionDescriptor},ym={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:pm},hm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Li.body.id,entityType:n.ActionDescriptor},fm={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:hm},Dl={id:Li.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[Il,ym],outputs:[fm],error:null,parent:null},mm=B[n.Loop]["list-loop"],Tm={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},Em={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:Tm},bm={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},Rm={id:mm.inputs.list.id,type:n.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:Em,index:0,parent:bm,parentRelationType:O.FixedArguments},gm={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},vm={id:mm.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:gm,parentRelationType:O.DynamicReturn},ir={id:$.List,type:n.ActionDescriptor,version:1,name:$.List,description:"Iterates over a list of entities",inputs:[Rm],outputs:[vm],error:null,parent:null},ar=B[n.Loop]["list-loop"],Im={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},Dm={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:Im},Pm={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},is={id:ar.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:Dm,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Pm},Am={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},Om={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:Am},Sm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},Cm={id:ar.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:Om,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Sm},Bm={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},wm={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:Bm},_m={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},Nm={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:_m},as={id:ar.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[Cm,is,wm],outputs:[Nm],error:null,parent:null},Mm=B[n.Loop]["string-loop"],Vm={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},Lm={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:Vm},Gm={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},$m={id:Mm.inputs.string.id,type:n.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",required:!0,dataType:Lm,index:0,parent:Gm,parentRelationType:O.FixedArguments},Fm={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},Um={id:Mm.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:Fm,parentRelationType:O.DynamicReturn},ss={id:$.String,type:n.ActionDescriptor,version:1,name:$.String,description:"Iterates over a string of entities",inputs:[$m],outputs:[Um],error:null,parent:null},sr=B[n.Loop]["string-loop"],xm={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:xm},km={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Pl={id:sr.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:km},qm={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},Jm={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:qm},Wm={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Al={id:sr.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:Jm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Wm},Ym={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Hm={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:Ym},zm={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Zm={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:zm},Ol={id:sr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Al,Pl,Hm],outputs:[Zm],error:null,parent:null},Km=B[n.Loop]["object-keys-loop"],Xm={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},Qm={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:Xe,asType:!1,defaultValue:null,parent:Xm},eT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},tT={id:Km.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:Qm,index:0,parent:eT,parentRelationType:O.FixedArguments},nT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},rT={id:Km.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:nT,parentRelationType:O.DynamicReturn},Gi={id:$.ObjectKeys,type:n.ActionDescriptor,version:1,name:$.ObjectKeys,description:"Iterates over a object of entities",inputs:[tT],outputs:[rT],error:null,parent:null},or=B[n.Loop]["object-keys-loop"],iT={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},aT={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:iT},sT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Sl={id:or.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:aT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:sT},oT={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},lT={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:oT},cT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},dT={id:or.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:lT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:cT},uT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},pT={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:uT},yT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},hT={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:yT},fT={id:or.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[dT,Sl,pT],outputs:[hT],error:null,parent:null},mT=B[n.Loop]["object-values-loop"],TT={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},ET={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:Xe,asType:!1,defaultValue:null,parent:TT},bT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},RT={id:mT.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:ET,index:0,parent:bT,parentRelationType:O.FixedArguments},gT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},vT={id:mT.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:gT,parentRelationType:O.DynamicReturn},$i={id:$.ObjectValues,type:n.ActionDescriptor,version:1,name:$.ObjectValues,description:"Iterates over a object of entities",inputs:[RT],outputs:[vT],error:null,parent:null},lr=B[n.Loop]["object-values-loop"],IT={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},DT={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:IT},PT={id:"iterate-over-object-values-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-values that is being iterated over. This value is passed to the child actions.",dataType:DT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:PT},AT={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},OT={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:AT},ST={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},CT={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-values loop. Keeps track of the number of iterations that have been executed.",dataType:OT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:ST},BT={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},wT={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:BT},_T={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},NT={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:_T},MT={id:lr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[CT,Cl,wT],outputs:[NT],error:null,parent:null},VT=B[n.Loop]["counted-loop"],LT={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},GT={id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:n.PrimitiveValue,name:P.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:LT},$T={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},FT={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:GT,parent:$T},UT={id:"counted-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},xT={id:VT.inputs.number.id,type:n.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:FT,index:0,parent:UT,parentRelationType:O.FixedArguments},jT={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},kT={id:VT.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},os={id:$.Counted,type:n.ActionDescriptor,version:1,name:$.Counted,description:"Iterates a given number of times",inputs:[xT],outputs:[kT],error:null,parent:null},Fi=B[n.Loop]["counted-loop"],qT={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},JT={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:qT},WT={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Fi.body.id,entityType:n.ActionDescriptor},Bl={id:Fi.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:JT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:WT},YT={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Fi.body.id,entityType:n.ActionDescriptor},HT={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:YT},zT={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Fi.body.id,entityType:n.ActionDescriptor},ZT={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:zT},wl={id:Fi.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Bl,HT],outputs:[ZT],error:null,parent:null},ls=B[n.BuiltInBaseEntity][V.KEY_VALUE_PARAM],qA={id:"key-value-param-built-in-base-entity-name-property-data-type-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property-data-type",entityType:n.DataType},KT={id:"key-value-param-built-in-base-entity-name-property-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property",entityType:n.Property},JA={like:!1,inferred:!1,id:"key-value-param-built-in-base-entity-name-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:KT},XT={id:"key-value-param-built-in-base-entity-name-property-parent-ref",type:n.GenericReference,entityId:ls.id,entityType:n.BuiltInBaseEntity},QT={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-name-property",name:"Parameter name",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:JA,description:"The name of the path parameter",parent:XT},WA={id:"key-value-param-built-in-base-entity-value-property-data-type-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property-data-type",entityType:n.DataType},eE={id:"key-value-param-built-in-base-entity-value-property-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property",entityType:n.Property},YA={like:!1,inferred:!1,id:"key-value-param-built-in-base-entity-value-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:eE},tE={id:"key-value-param-built-in-base-entity-value-property-parent-ref",type:n.GenericReference,entityId:ls.id,entityType:n.BuiltInBaseEntity},nE={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-value-property",name:"Parameter Value",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:1,dataType:YA,description:"The value of the path parameter",parent:tE},cs={id:ls.id,version:1,description:'An entity with a "name" and "value" property representing a breakdown of a key-value pair.',name:ls.id,type:n.BuiltInBaseEntity,abstract:!1,static:!1,interactive:!0,properties:[QT,nE],abstractMethods:[],methods:[],extends:[]},Ui=B[n.BuiltInBaseEntity][V.HTTP_ENDPOINT].properties,rE={id:"endpointBuiltInCorsPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},iE={id:"endpointBuiltInCorsPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:Ui.cors.id},aE={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:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:["*"],parent:rE,autogeneration:null,valueAsType:null},parent:iE},sE={id:"endpointBuiltInBaseEntityRef",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},oE={hidden:!0,required:!0,id:Ui.cors.id,name:"Allowed origins",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:aE,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:sE},lE={id:"endpointBuiltInPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInPathPropertyDataType"},cE={id:"endpointBuiltInPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:Ui.path.id},dE={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:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.String,value:"/",parent:lE,autogeneration:null,valueAsType:null},parent:cE},uE={id:"endpointBuiltInBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},_l={hidden:!1,required:!0,id:Ui.path.id,name:"Path",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:dE,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:uE},pE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},yE={id:"endpointBuiltInMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"endpointBuiltInMethodProperty"},hE={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Nn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,parent:pE,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:yE},fE={id:"endpointBuiltInBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Nl={hidden:!1,required:!0,id:Ui.method.id,name:"Method",version:1,type:n.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:hE,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:fE},mE={id:"endpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestHeadersVariableDataType"},TE={id:"endpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},EE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:mE,autogeneration:null,valueAsType:null},parent:TE},bE={id:"endpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},RE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:bE},gE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},vE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},IE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:cs,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:[],parent:gE,autogeneration:null,valueAsType:null},parent:vE},DE={id:"endpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointPathParamsVariableDataType"},PE={id:"endpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},AE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:cs,asType:!1,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:[],parent:DE,autogeneration:null,valueAsType:null},parent:PE},OE={id:"endpointReachedTriggerActionDescriptorRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ml={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:EE,required:!0,index:0,parentRelationType:O.FixedArguments,parent:OE},SE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Vl={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:AE,required:!0,index:1,parentRelationType:O.FixedArguments,parent:SE},CE={id:"endpointReachedTriggerActionDescriptorRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ll={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:IE,required:!0,index:2,parentRelationType:O.FixedArguments,parent:CE},BE={id:"endpointReachedTriggerActionDescriptorRefFour",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Gl={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ValueDescriptor,name:"Request body",dataType:RE,index:3,required:!0,parentRelationType:O.FixedArguments,parent:BE},wE={id:"endpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},_E={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:wE},NE={id:"endpointReturnStatementRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},$l={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:_E,required:!0,index:0,parentRelationType:O.FixedReturns,parent:NE},ME={id:"endpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointResponseHeadersDataType"},VE={id:"endpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},LE={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:ME,autogeneration:null,valueAsType:null},parent:VE},GE={id:"endpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Fl={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:LE,required:!1,index:1,parentRelationType:O.FixedReturns,parent:GE},$E={id:"endpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},FE={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:$E},UE={id:"endpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Ul={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ValueDescriptor,name:"Response body",dataType:FE,required:!1,index:2,parentRelationType:O.FixedReturns,parent:UE},xE={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},xl={id:"endpointReachedTriggerActionDescriptor",type:n.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[Ml,Vl,Ll,Gl],outputs:[$l,Fl,Ul],error:null,parent:xE},ds={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:[oE,_l,Nl],abstractMethods:[xl],extends:[],methods:[]},Vt=B[n.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,jE={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},kE={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:Vt.properties.identifier.id,entityType:n.Property},HA={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:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:null,parent:jE,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:kE},Kr={id:"relational-database-built-in-base-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},us={hidden:!1,required:!0,id:Vt.properties.identifier.id,name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:HA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Kr},zA={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},qE={id:"relational-database-built-in-base-entity-username-property-ref-id",type:n.GenericReference,entityId:Vt.properties.username.id,entityType:n.Property},ZA={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:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.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:qE},ps={hidden:!1,required:!0,id:Vt.properties.username.id,name:"Username",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:ZA,description:"The username that will be used to connect to the database.",parent:Kr},KA={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:Vt.properties.password.id,entityType:n.Property},XA={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},ys={hidden:!1,required:!0,id:Vt.properties.password.id,name:"Password",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:XA,description:"The password that will be used to connect to the database.",parent:Kr},WE={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},YE={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:n.GenericReference,entityId:Vt.properties.minSize.id,entityType:n.Property},QA={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:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:WE,autogeneration:null,valueAsType:null},parent:YE},hs={hidden:!0,required:!0,id:Vt.properties.minSize.id,name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:QA,description:"The minimum size of the database in GB.",parent:Kr},HE={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},zE={id:"relational-database-built-in-base-entity-default-property-ref-id",type:n.GenericReference,entityId:Vt.properties.default.id,entityType:n.Property},eO={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:_n,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!1,parent:HE,autogeneration:null,valueAsType:null},parent:zE},jl={hidden:!0,required:!0,id:Vt.properties.default.id,name:"Default",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:eO,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Kr},ZE={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:Vt.properties.autoscaling.id,entityType:n.Property},KE={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},tO={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:_n,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!1,parent:KE,autogeneration:null,valueAsType:null},parent:ZE},XE={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},kl={hidden:!0,required:!0,id:Vt.properties.autoscaling.id,name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:tO,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:XE},Mn={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:[us,ps,ys,hs,jl,kl],abstractMethods:[],methods:[],extends:[]},QE={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.DeletePersistedEntity},ql={type:n.FunctionDeclaration,id:Ct.DeletePersistedEntity,name:Ct.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:QE,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},eb={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.SoftDeletePersistedEntity},tb={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:eb,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},nb=B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties,nO={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},rb={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},rO={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:Mn,asType:!1,defaultValue:null,parent:rb},ib={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},xi={hidden:!0,required:!0,id:nb.database.id,name:"Database",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:rO,description:"The database that the entity belongs to.",parent:ib},ab={id:"persisted-built-in-base-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-data-type-id",entityType:n.DataType},sb={id:"persisted-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-id",entityType:n.Property},iO={like:!1,inferred:!1,id:"persisted-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:Wa,asType:!1,defaultValue:{id:"persisted-built-in-base-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.UUID,value:null,parent:ab,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:sb},ob={id:"persisted-built-in-base-entity-identifier-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},lb={hidden:!1,required:!0,id:nb.identifier.id,name:"Identifier",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:iO,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:ob},aO={id:"persisted-built-in-base-entity-deleted-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-data-type-id",entityType:n.DataType},cb={id:"persisted-built-in-base-entity-deleted-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-id",entityType:n.Property},db={like:!1,inferred:!1,id:"persisted-built-in-base-entity-deleted-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:hn,asType:!1,defaultValue:null,parent:cb},ub={id:"persisted-built-in-base-entity-deleted-at-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},pb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-deleted-at-property-id",name:"Deleted at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:db,description:"The date and time when the entity was deleted.",parent:ub},sO={id:"persisted-built-in-base-entity-created-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-data-type-id",entityType:n.DataType},yb={id:"persisted-built-in-base-entity-created-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-id",entityType:n.Property},hb={like:!1,inferred:!1,id:"persisted-built-in-base-entity-created-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:hn,asType:!1,defaultValue:null,parent:yb},fb={id:"persisted-built-in-base-entity-created-at-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},mb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-created-at-property-id",name:"Created at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:hb,description:"The date and time when the entity was created.",parent:fb},oO={id:"persisted-built-in-base-entity-updated-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-data-type-id",entityType:n.DataType},Tb={id:"persisted-built-in-base-entity-updated-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-id",entityType:n.Property},Eb={like:!1,inferred:!1,id:"persisted-built-in-base-entity-updated-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:hn,asType:!1,defaultValue:null,parent:Tb},bb={id:"persisted-built-in-base-entity-updated-at-property-parent-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},Rb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-updated-at-property-id",name:"Updated at",version:1,type:n.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,dataType:Eb,description:"The date and time when the entity was last updated.",parent:bb},ke={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:[xi,lb,pb,mb,Rb],methods:[ql,tb],extends:[]},gb={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},Jl={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:gb},vb=B[n.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,lO={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},Ib={id:"cron-job-built-in-base-entity-expression-property-ref",type:n.GenericReference,entityId:vb.properties.expression.id,entityType:n.Property},cO={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:Ib},Db={id:"cron-job-built-in-base-entity-ref",type:n.GenericReference,entityId:V.CRON_JOB,entityType:n.BuiltInBaseEntity},Pb={hidden:!1,required:!0,id:vb.properties.expression.id,name:"Cron expression",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:cO,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:Db},Wl={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:[Pb],methods:[],abstractMethods:[Jl],extends:[]},Ab={type:n.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:n.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Yl={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},Hl={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:[Yl],abstractMethods:[]},dO=B[n.Condition]["not-empty"],Ob={type:n.GenericReference,id:"not-empty-condition-ref",entityType:n.ActionDescriptor,entityId:Mt.NotEmpty},Sb={id:dO.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:Ob},cr={type:n.ActionDescriptor,id:Mt.NotEmpty,version:1,name:Mt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[Sb],outputs:[],error:null},Cb={[Mt.NotEmpty]:cr},Xr=B[n.Condition]["more-than-or-equal"],Bb={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:Xr.inputs.leftHand.id},wb={type:n.DataType,id:Xr.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:Bb},_b={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},Nb={id:Xr.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:wb,required:!0,parentRelationType:O.FixedArguments,index:0,parent:_b},Mb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:Xr.inputs.rightHand.id},Vb={type:n.DataType,id:Xr.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:Mb},Lb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},Gb={id:Xr.inputs.rightHand.id,type:n.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:Vb,required:!0,parentRelationType:O.FixedArguments,index:1,parent:Lb},Qr={type:n.ActionDescriptor,id:$e.MoreThanOrEqual,version:1,name:$e.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[Nb,Gb],outputs:[],error:null},$b={[$e.MoreThanOrEqual]:Qr},uO={...Cb,...$b},fs={type:n.ActionDescriptor,id:pn.PROJECT_PUBLICATION_COMPLETED,version:1,name:pn.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},pO={[pn.PROJECT_PUBLICATION_COMPLETED]:fs},zl=B[n.ValueDescriptor][tl.ActionOngoingProcessOutputValue],Fb={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:zl.id},Ub={like:!1,inferred:!1,id:zl.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Hl,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Fb},Zl={id:zl.id,type:n.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:Ub,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 Kl;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Kl||(Kl={}));const G=ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vn=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"]),yO=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 ei=(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 xb=ei;function hO(r){xb=r}function ms(){return xb}const Ts=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}},fO=[];function L(r,e){const t=ms(),i=Ts({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ei?void 0:ei].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"}),ti=r=>({status:"dirty",value:r}),yt=r=>({status:"valid",value:r}),Xl=r=>r.status==="aborted",Ql=r=>r.status==="dirty",ji=r=>r.status==="valid",ki=r=>typeof Promise<"u"&&r instanceof Promise;function Es(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 jb(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 qi,Ji;class en{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 kb=(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 Vn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Vn(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:Vn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ki(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:Vn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return kb(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:Vn(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(ki(a)?a:Promise.resolve(a));return kb(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 nn.create(this,this._def)}nullable(){return Fn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ht.create(this,this._def)}promise(){return ai.create(this,this._def)}or(e){return zi.create([this,e],this._def)}and(e){return Zi.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 ta({...Z(this._def),innerType:this,defaultValue:t,typeName:q.ZodDefault})}brand(){return new nc({typeName:q.ZodBranded,type:this,...Z(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new na({...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 ra.create(this,e)}readonly(){return ia.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mO=/^c[^\s-]{8,}$/i,TO=/^[0-9a-z]+$/,EO=/^[0-9A-HJKMNP-TV-Z]{26}$/,bO=/^[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,RO=/^[a-z0-9_-]{21}$/i,gO=/^[-+]?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)?)??$/,vO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,IO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ec;const DO=/^(?:(?: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])$/,PO=/^(([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})))$/,AO=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qb="((\\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])))",OO=new RegExp(`^${qb}$`);function Jb(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 SO(r){return new RegExp(`^${Jb(r)}$`)}function Wb(r){let e=`${qb}T${Jb(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 CO(r,e){return!!((e==="v4"||!e)&&DO.test(r)||(e==="v6"||!e)&&PO.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")vO.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")ec||(ec=new RegExp(IO,"u")),ec.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")bO.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")RO.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")mO.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")TO.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")EO.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"?Wb(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"?OO.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?SO(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"?gO.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"duration",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?CO(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"?AO.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 BO(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 Ln 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"?BO(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 Ln({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Ln({...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)}}Ln.create=r=>new Ln({checks:[],typeName:q.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class Gn 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 Gn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Gn({...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}}Gn.create=r=>{var e;return new Gn({checks:[],typeName:q.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};class Wi 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)}}Wi.create=r=>new Wi({typeName:q.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class dr 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 dr({...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}}dr.create=r=>new dr({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:q.ZodDate,...Z(r)});class bs 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)}}bs.create=r=>new bs({typeName:q.ZodSymbol,...Z(r)});class Yi 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)}}Yi.create=r=>new Yi({typeName:q.ZodUndefined,...Z(r)});class Hi 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)}}Hi.create=r=>new Hi({typeName:q.ZodNull,...Z(r)});class ni extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return yt(e.data)}}ni.create=r=>new ni({typeName:q.ZodAny,...Z(r)});class ur extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return yt(e.data)}}ur.create=r=>new ur({typeName:q.ZodUnknown,...Z(r)});class Tn extends Q{_parse(e){const t=this._getOrReturnCtx(e);return L(t,{code:w.invalid_type,expected:G.never,received:t.parsedType}),J}}Tn.create=r=>new Tn({typeName:q.ZodNever,...Z(r)});class Rs 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)}}Rs.create=r=>new Rs({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 en(t,o,t.path,l)))).then(o=>it.mergeArray(i,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new en(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 ri(r){if(r instanceof qe){const e={};for(const t in r.shape){const i=r.shape[t];e[t]=nn.create(ri(i))}return new qe({...r._def,shape:()=>e})}else return r instanceof Ht?new Ht({...r._def,type:ri(r.element)}):r instanceof nn?nn.create(ri(r.unwrap())):r instanceof Fn?Fn.create(ri(r.unwrap())):r instanceof tn?tn.create(r.items.map(e=>ri(e))):r}class qe 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 Tn&&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 en(a,m,a.path,y)),alwaysSet:y in a.data})}if(this._def.catchall instanceof Tn){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 en(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 qe({...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 qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new qe({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 qe({...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 qe({...this._def,shape:()=>t})}omit(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new qe({...this._def,shape:()=>t})}deepPartial(){return ri(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 qe({...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 nn;)s=s._def.innerType;t[i]=s}}),new qe({...this._def,shape:()=>t})}keyof(){return Yb(ne.objectKeys(this.shape))}}qe.create=(r,e)=>new qe({shape:()=>r,unknownKeys:"strip",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)}),qe.strictCreate=(r,e)=>new qe({shape:()=>r,unknownKeys:"strict",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)}),qe.lazycreate=(r,e)=>new qe({shape:r,unknownKeys:"strip",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)});class zi 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}}zi.create=(r,e)=>new zi({options:r,typeName:q.ZodUnion,...Z(e)});const En=r=>r instanceof Xi?En(r.schema):r instanceof zt?En(r.innerType()):r instanceof Qi?[r.value]:r instanceof $n?r.options:r instanceof ea?ne.objectValues(r.enum):r instanceof ta?En(r._def.innerType):r instanceof Yi?[void 0]:r instanceof Hi?[null]:r instanceof nn?[void 0,...En(r.unwrap())]:r instanceof Fn?[null,...En(r.unwrap())]:r instanceof nc||r instanceof ia?En(r.unwrap()):r instanceof na?En(r._def.innerType):[];class gs 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=En(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 gs({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...Z(i)})}}function tc(r,e){const t=Vn(r),i=Vn(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=tc(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=tc(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 Zi extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Xl(s)||Xl(o))return J;const l=tc(s.value,o.value);return l.valid?((Ql(s)||Ql(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}))}}Zi.create=(r,e,t)=>new Zi({left:r,right:e,typeName:q.ZodIntersection,...Z(t)});class tn 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 en(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 tn({...this._def,rest:e})}}tn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tn({items:r,typeName:q.ZodTuple,rest:null,...Z(e)})};class Ki 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 en(i,l,i.path,l)),value:o._parse(new en(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 Ki({keyType:e,valueType:t,typeName:q.ZodRecord,...Z(i)}):new Ki({keyType:Yt.create(),valueType:e,typeName:q.ZodRecord,...Z(t)})}}class vs 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 en(i,l,i.path,[y,"key"])),value:s._parse(new en(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}}}}vs.create=(r,e,t)=>new vs({valueType:e,keyType:r,typeName:q.ZodMap,...Z(t)});class pr 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 en(i,p,i.path,y)));return i.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new pr({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new pr({...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)}}pr.create=(r,e)=>new pr({valueType:r,minSize:null,maxSize:null,typeName:q.ZodSet,...Z(e)});class ii 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 Ts({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ms(),ei].filter(y=>!!y),issueData:{code:w.invalid_arguments,argumentsError:p}})}function a(l,p){return Ts({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ms(),ei].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 ai){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 ii({...this._def,args:tn.create(e).rest(ur.create())})}returns(e){return new ii({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new ii({args:e||tn.create([]).rest(ur.create()),returns:t||ur.create(),typeName:q.ZodFunction,...Z(i)})}}class Xi 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})}}Xi.create=(r,e)=>new Xi({getter:r,typeName:q.ZodLazy,...Z(e)});class Qi 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}}Qi.create=(r,e)=>new Qi({value:r,typeName:q.ZodLiteral,...Z(e)});function Yb(r,e){return new $n({values:r,typeName:q.ZodEnum,...Z(e)})}class $n extends Q{constructor(){super(...arguments),qi.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(Es(this,qi,"f")||jb(this,qi,new Set(this._def.values),"f"),!Es(this,qi,"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 $n.create(e,{...this._def,...t})}exclude(e,t=this._def){return $n.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}qi=new WeakMap,$n.create=Yb;class ea extends Q{constructor(){super(...arguments),Ji.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(Es(this,Ji,"f")||jb(this,Ji,new Set(ne.getValidEnumValues(this._def.values)),"f"),!Es(this,Ji,"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}}Ji=new WeakMap,ea.create=(r,e)=>new ea({values:r,typeName:q.ZodNativeEnum,...Z(e)});class ai 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})))}}ai.create=(r,e)=>new ai({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"?ti(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"?ti(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 nn extends Q{_parse(e){return this._getType(e)===G.undefined?yt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nn.create=(r,e)=>new nn({innerType:r,typeName:q.ZodOptional,...Z(e)});class Fn extends Q{_parse(e){return this._getType(e)===G.null?yt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fn.create=(r,e)=>new Fn({innerType:r,typeName:q.ZodNullable,...Z(e)});class ta 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}}ta.create=(r,e)=>new ta({innerType:r,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});class na 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 ki(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}}na.create=(r,e)=>new na({innerType:r,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});class Is 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}}}Is.create=r=>new Is({typeName:q.ZodNaN,...Z(r)});const wO=Symbol("zod_brand");class nc 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 ra 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(),ti(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 ra({in:e,out:t,typeName:q.ZodPipeline})}}class ia extends Q{_parse(e){const t=this._def.innerType._parse(e),i=a=>(ji(a)&&(a.value=Object.freeze(a.value)),a);return ki(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}ia.create=(r,e)=>new ia({innerType:r,typeName:q.ZodReadonly,...Z(e)});function Hb(r,e={},t){return r?ni.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})}}):ni.create()}const _O={object:qe.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 NO=(r,e={message:`Input not instance of ${r.name}`})=>Hb(t=>t instanceof r,e),Ds=Yt.create,rc=Ln.create,MO=Is.create,VO=Gn.create,ic=Wi.create,zb=dr.create,LO=bs.create,GO=Yi.create,Zb=Hi.create,$O=ni.create,Ps=ur.create,FO=Tn.create,UO=Rs.create,xO=Ht.create,Kb=qe.create,jO=qe.strictCreate,kO=zi.create,qO=gs.create,JO=Zi.create,WO=tn.create,Xb=Ki.create,YO=vs.create,HO=pr.create,zO=ii.create,ZO=Xi.create,KO=Qi.create,Qb=$n.create,XO=ea.create,QO=ai.create,eR=zt.create,eS=nn.create,tS=Fn.create,nS=zt.createWithPreprocess,rS=ra.create;var u=Object.freeze({__proto__:null,defaultErrorMap:ei,setErrorMap:hO,getErrorMap:ms,makeIssue:Ts,EMPTY_PATH:fO,addIssueToContext:L,ParseStatus:it,INVALID:J,DIRTY:ti,OK:yt,isAborted:Xl,isDirty:Ql,isValid:ji,isAsync:ki,get util(){return ne},get objectUtil(){return Kl},ZodParsedType:G,getParsedType:Vn,ZodType:Q,datetimeRegex:Wb,ZodString:Yt,ZodNumber:Ln,ZodBigInt:Gn,ZodBoolean:Wi,ZodDate:dr,ZodSymbol:bs,ZodUndefined:Yi,ZodNull:Hi,ZodAny:ni,ZodUnknown:ur,ZodNever:Tn,ZodVoid:Rs,ZodArray:Ht,ZodObject:qe,ZodUnion:zi,ZodDiscriminatedUnion:gs,ZodIntersection:Zi,ZodTuple:tn,ZodRecord:Ki,ZodMap:vs,ZodSet:pr,ZodFunction:ii,ZodLazy:Xi,ZodLiteral:Qi,ZodEnum:$n,ZodNativeEnum:ea,ZodPromise:ai,ZodEffects:zt,ZodTransformer:zt,ZodOptional:nn,ZodNullable:Fn,ZodDefault:ta,ZodCatch:na,ZodNaN:Is,BRAND:wO,ZodBranded:nc,ZodPipeline:ra,ZodReadonly:ia,custom:Hb,Schema:Q,ZodSchema:Q,late:_O,get ZodFirstPartyTypeKind(){return q},coerce:{string:r=>Yt.create({...r,coerce:!0}),number:r=>Ln.create({...r,coerce:!0}),boolean:r=>Wi.create({...r,coerce:!0}),bigint:r=>Gn.create({...r,coerce:!0}),date:r=>dr.create({...r,coerce:!0})},any:$O,array:xO,bigint:VO,boolean:ic,date:zb,discriminatedUnion:qO,effect:eR,enum:Qb,function:zO,instanceof:NO,intersection:JO,lazy:ZO,literal:KO,map:YO,nan:MO,nativeEnum:XO,never:FO,null:Zb,nullable:tS,number:rc,object:Kb,oboolean:()=>ic().optional(),onumber:()=>rc().optional(),optional:eS,ostring:()=>Ds().optional(),pipeline:rS,preprocess:nS,promise:QO,record:Xb,set:HO,strictObject:jO,string:Ds,symbol:LO,transformer:eR,tuple:WO,undefined:GO,union:kO,unknown:Ps,void:UO,NEVER:J,ZodIssueCode:w,quotelessJson:yO,ZodError:It});function tR(r){var a,s,o;if(!(r!=null&&r.dataType))return Ps();const e=r.dataType.isNullable||!1,t=r.dataType.isList||!1;let i=Ps();if(((a=r.dataType.entity)==null?void 0:a.type)===n.PrimitiveEntity)switch(r.dataType.entity.name){case P.String:i=Ds();break;case P.JSON:i=Xb(Ps());break;case P.Number:i=rc();break;case P.Boolean:i=ic();break;case P.Date:i=zb();break;case P.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);i=Qb(l);break}case P.Null:i=Zb();break;case P.UUID:i=Ds().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===n.CustomEntity)i=nR(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 nR(r){const e=Kb({});for(const t of r.properties){const i=tR(t);e.shape[t.name]=i}return e}function rR(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function iR(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function aR(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function sR(r){return r.rangeStart&&r.rangeEnd?aR(r):r.rangeStart?rR(r):r.rangeEnd?iR(r):new Date}function iS(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var oR={},As={},Os={};Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=sS;let Ss;const aS=new Uint8Array(16);function sS(){if(!Ss&&(Ss=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ss))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ss(aS)}var Un={},yr={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=void 0;var oS=/^(?:[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;Cs.default=oS,Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=void 0;var lS=cS(Cs);function cS(r){return r&&r.__esModule?r:{default:r}}function dS(r){return typeof r=="string"&&lS.default.test(r)}var uS=dS;yr.default=uS,Object.defineProperty(Un,"__esModule",{value:!0}),Un.default=void 0,Un.unsafeStringify=lR;var pS=yS(yr);function yS(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 lR(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 hS(r,e=0){const t=lR(r,e);if(!(0,pS.default)(t))throw TypeError("Stringified UUID is invalid");return t}var fS=hS;Un.default=fS,Object.defineProperty(As,"__esModule",{value:!0}),As.default=void 0;var mS=ES(Os),TS=Un;function ES(r){return r&&r.__esModule?r:{default:r}}let cR,ac,sc=0,oc=0;function bS(r,e,t){let i=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||cR,o=r.clockseq!==void 0?r.clockseq:ac;if(s==null||o==null){const R=r.random||(r.rng||mS.default)();s==null&&(s=cR=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=ac=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:oc+1;const y=l-sc+(p-oc)/1e4;if(y<0&&r.clockseq===void 0&&(o=o+1&16383),(y<0||l>sc)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");sc=l,oc=p,ac=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,TS.unsafeStringify)(a)}var RS=bS;As.default=RS;var Bs={},xn={},aa={};Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;var gS=vS(yr);function vS(r){return r&&r.__esModule?r:{default:r}}function IS(r){if(!(0,gS.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 DS=IS;aa.default=DS,Object.defineProperty(xn,"__esModule",{value:!0}),xn.URL=xn.DNS=void 0,xn.default=CS;var PS=Un,AS=OS(aa);function OS(r){return r&&r.__esModule?r:{default:r}}function SS(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const dR="6ba7b810-9dad-11d1-80b4-00c04fd430c8";xn.DNS=dR;const uR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";xn.URL=uR;function CS(r,e,t){function i(a,s,o,l){var p;if(typeof a=="string"&&(a=SS(a)),typeof s=="string"&&(s=(0,AS.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,PS.unsafeStringify)(y)}try{i.name=r}catch{}return i.DNS=dR,i.URL=uR,i}var ws={};Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;function BS(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 wS(_S(NS(r),r.length*8))}function wS(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 pR(r){return(r+64>>>9<<4)+14+1}function _S(r,e){r[e>>5]|=128<<e%32,r[pR(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=jn(t,l),i=jn(i,p),a=jn(a,y),s=jn(s,h)}return[t,i,a,s]}function NS(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(pR(e));for(let i=0;i<e;i+=8)t[i>>5]|=(r[i/8]&255)<<i%32;return t}function jn(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function MS(r,e){return r<<e|r>>>32-e}function _s(r,e,t,i,a,s){return jn(MS(jn(jn(e,r),jn(i,s)),a),t)}function at(r,e,t,i,a,s,o){return _s(e&t|~e&i,r,e,a,s,o)}function st(r,e,t,i,a,s,o){return _s(e&i|t&~i,r,e,a,s,o)}function ot(r,e,t,i,a,s,o){return _s(e^t^i,r,e,a,s,o)}function lt(r,e,t,i,a,s,o){return _s(t^(e|~i),r,e,a,s,o)}var VS=BS;ws.default=VS,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var LS=yR(xn),GS=yR(ws);function yR(r){return r&&r.__esModule?r:{default:r}}var $S=(0,LS.default)("v3",48,GS.default);Bs.default=$S;var Ns={},Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var FS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Ms.default=FS,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var hR=fR(Ms),US=fR(Os),xS=Un;function fR(r){return r&&r.__esModule?r:{default:r}}function jS(r,e,t){if(hR.default.randomUUID&&!e&&!r)return hR.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,xS.unsafeStringify)(i)}var kS=jS;Ns.default=kS;var Vs={},Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;function qS(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 lc(r,e){return r<<e|r>>>32-e}function JS(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]=lc(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 D=Math.floor(v/20),A=lc(p,5)+qS(D,y,h,m)+R+e[D]+l[v]>>>0;R=m,m=h,h=lc(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 WS=JS;Ls.default=WS,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=void 0;var YS=mR(xn),HS=mR(Ls);function mR(r){return r&&r.__esModule?r:{default:r}}var zS=(0,YS.default)("v5",80,HS.default);Vs.default=zS;var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=void 0;var ZS="00000000-0000-0000-0000-000000000000";Gs.default=ZS;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.default=void 0;var KS=XS(yr);function XS(r){return r&&r.__esModule?r:{default:r}}function QS(r){if(!(0,KS.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var eC=QS;$s.default=eC,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(As),t=h(Bs),i=h(Ns),a=h(Vs),s=h(Gs),o=h($s),l=h(yr),p=h(Un),y=h(aa);function h(m){return m&&m.__esModule?m:{default:m}}}(oR);function cc(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}cc.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},cc.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var tC=cc,nC=tC;function sa(r,e){var t=new nC(r,e);return function(i){return t.convert(i)}}sa.BIN="01",sa.OCT="01234567",sa.DEC="0123456789",sa.HEX="0123456789abcdef";var rC=sa;const{v4:dc,validate:iC}=oR,Fs=rC,uc={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},aC={consistentLength:!0};let pc;const TR=(r,e,t)=>{const i=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},ER=(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("-")},sC=r=>Math.ceil(Math.log(2**128)/Math.log(r));var oC=(()=>{const r=(e,t)=>{const i=e||uc.flickrBase58,a={...aC,...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=sC(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},l=Fs(Fs.HEX,i),p=Fs(i,Fs.HEX),y=()=>TR(dc(),l,o),m={alphabet:i,fromUUID:R=>TR(R,l,o),maxLength:s,generate:y,new:y,toUUID:R=>ER(R,p),uuid:dc,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const D=a.consistentLength?R.length===s:R.length<=s,A=R.split("").every(I=>i.includes(I));return v===!1?D&&A:D&&A&&iC(ER(R,p))}};return Object.freeze(m),m};return r.constants=uc,r.uuid=dc,r.generate=()=>(pc||(pc=r(uc.flickrBase58).generate),pc()),r})();const Us=iS(oC);function bR(){return Us().uuid()}function RR(r){return r.rangeStart+Math.random()}function gR(r){const e=r.rangeEnd;return Math.random()*e}function vR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function IR(r){return r.rangeStart&&r.rangeEnd?vR(r):r.rangeStart?RR(r):r.rangeEnd?gR(r):Math.random()}function DR(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function PR(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 OR(r){return r.rangeStart&&r.rangeEnd?AR(r):r.rangeStart?DR(r):r.rangeEnd?PR(r):Math.random().toString(36)}function SR(r){return Math.random()>=.5}function lC(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case We.CurrentDateAndTime:if(r.name===P.Date)return new Date;case We.Random:{if(r.name===P.Date)return sR(r.autogeneration);if(r.name===P.Number)return IR(r.autogeneration);if(r.name===P.String)return OR(r.autogeneration);if(r.name===P.Boolean)return SR(r.autogeneration)}case We.Unique:if(r.name===P.UUID)return bR();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const Y="e7eb5382-3d99-44fd-972a-b8b1e819f6be",yc="global-user-variable-id",CR="last-executed-timestamp-variable-id",cC={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},dC={id:"alternative-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:n.Property},uC={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:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:null,parent:cC,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:dC},xs={id:"alternative-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},pC={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:us,static:!0,index:0,dataType:uC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:xs};n.GenericReference,n.DataType;const yC={id:"alternative-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:n.Property},hC={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:yC},fC={hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:1,dataType:hC,description:"The username that will be used to connect to the database.",parent:xs};n.GenericReference,n.DataType;const mC={id:"alternative-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:n.Property},TC={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:mC},EC={hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:2,dataType:TC,description:"The password that will be used to connect to the database.",parent:xs},bC={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},RC={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},gC={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:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:bC,autogeneration:null,valueAsType:null},parent:RC},vC={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:hs,static:!0,index:3,dataType:gC,description:"The minimum size of the database in GB.",parent:xs},IC={id:"alternative-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},BR={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:[pC,fC,EC,vC],methods:[],abstractMethods:[],extends:[],implements:[Mn],x:0,y:0,parent:IC},DC={id:"animal-prototype-database-property-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-id",entityType:n.Property},PC={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},AC={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:Mn,asType:!1,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:BR,autogeneration:null,parent:PC},parent:DC},OC={id:"animal-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},SC={hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:xi,static:!0,index:0,dataType:AC,description:"The database that the entity belongs to.",parent:OC},CC={type:n.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:n.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},BC={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:CC},wC={type:n.GenericReference,id:"e2b9e456-f2b3-4dc7-85a2-fbb68ed0c9c7",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},_C={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:BC,abstract:!1,parent:wC},NC={type:n.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:n.Project,entityId:Y},MC={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:[SC,_C],methods:[],extends:[],implements:[ke],x:0,y:0,parent:NC},VC={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},LC={id:"default-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:n.Property},GC={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:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"main",parent:VC,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:LC},si={id:"default-relational-database-entity-ref-id",type:n.GenericReference,entityId:V.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},$C={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:us,static:!0,index:0,dataType:GC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:si};n.GenericReference,n.DataType;const FC={id:"default-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:n.Property},UC={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},xC={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:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"root",parent:UC,autogeneration:null,valueAsType:null},parent:FC},jC={hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:1,dataType:xC,description:"The username that will be used to connect to the database.",parent:si};n.GenericReference,n.DataType;const kC={id:"default-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:n.Property},qC={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},JC={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:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"password",parent:qC,autogeneration:null,valueAsType:null},parent:kC},WC={hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:2,dataType:JC,description:"The password that will be used to connect to the database.",parent:si},YC={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},HC={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},zC={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:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:YC,autogeneration:null,valueAsType:null},parent:HC},ZC={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:hs,static:!0,index:3,dataType:zC,description:"The minimum size of the database in GB.",parent:si},KC={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},XC={id:"default-relational-database-entity-default-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:n.Property},QC={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:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!0,parent:KC,autogeneration:null,valueAsType:null},parent:XC},eB={hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:n.Property,private:!1,abstract:!1,implements:jl,static:!0,index:4,dataType:QC,description:"Whether this database is automatically picked by other entities as the default database.",parent:si},tB={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},nB={id:"default-relational-database-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:n.Property},rB={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:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!0,parent:tB,autogeneration:null,valueAsType:null},parent:nB},iB={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:kl,static:!0,index:5,dataType:rB,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:si},aB={id:"default-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},hc={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:[eB,iB,$C,jC,WC,ZC],methods:[],abstractMethods:[],extends:[],implements:[Mn],x:0,y:0,parent:aB},sB={id:"user-prototype-database-property-data-type-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:n.DataType},oB={id:"user-prototype-database-property-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-id",entityType:n.Property},lB={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:Mn,asType:!1,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:hc,autogeneration:null,parent:sB},parent:oB},cB={id:"user-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},dB={hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:xi,static:!0,index:0,dataType:lB,description:"The database that the entity belongs to.",parent:cB},uB={type:n.GenericReference,id:"user-prototype-parent-ref-id",entityType:n.Project,entityId:Y},fc={type:n.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[ke],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[dB],methods:[],x:0,y:0,parent:uB},pB={type:n.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:n.Property,entityId:"person-date-of-birth-property-id"},yB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:hn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:pB},hB={type:n.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},fB={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:yB,abstract:!1,parent:hB},mB={type:n.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:n.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},TB={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:mB},EB={type:n.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},bB={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:TB,abstract:!1,parent:EB},RB={type:n.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:n.Project,entityId:Y},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:[bB,fB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[fc],x:0,y:0,parent:RB},gB={type:n.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},vB={type:n.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:n.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},IB={type:n.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},DB={type:n.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:n.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},PB={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:DB},mc={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:n.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:PB,implements:null,readsValue:IB,required:!0,index:0,parent:vB},AB={type:n.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},OB={type:n.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},wR={type:n.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[mc],calledByError:[],calledByEntry:[AB],calledBySuccess:[],throws:null,x:0,y:0,parent:OB},SB={type:n.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},CB={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:SB},_R={id:"500dee3a-3435-4453-9699-0d053f646523",type:n.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:CB,implements:null,required:!0,writesValues:[mc],index:0,parent:gB},BB={type:n.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},NR={type:n.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[_R],calls:[wR],returnStatements:[wR],index:0,collapsed:!1,private:!1,x:0,y:0,parent:BB},wB={type:n.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:n.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},_B={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:wB},NB={type:n.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:n.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},MB={type:n.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},VB={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:n.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:_B,readsValue:NB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:MB},LB={type:n.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},GB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:n.OutputMap,version:1,declaration:mc,writesValues:[VB],index:0,parent:LB},$B={type:n.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},FB={type:n.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},UB={type:n.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},xB={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:UB},jB={type:n.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},kB={type:n.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},qB={type:n.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},JB={type:n.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},MR={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:n.InputMap,version:1,declaration:_R,name:null,description:null,readsValue:JB,defaultValue:null,index:0,parent:qB},WB={type:n.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:xB,readsValue:jB,writesValues:[MR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:kB},YB={type:n.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:NR,inputs:[MR],outputs:[GB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[$B],calledBySuccess:[],parent:FB,error:null,x:0,y:0},HB={type:n.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},zB={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:HB},ZB={type:n.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},KB={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:n.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:zB,implements:null,required:!0,index:0,writesValues:[WB],parent:ZB},XB={type:n.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},QB={type:n.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[KB],collapsed:!0,returnStatements:[],calls:[YB],private:!1,index:0,implements:null,x:0,y:0,parent:XB},ew={type:n.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:n.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},tw={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:ew},nw={type:n.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},rw={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:tw,abstract:!1,parent:nw},iw={type:n.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:n.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},aw={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:iw},sw={type:n.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},ow={hidden:!1,required:!0,type:n.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:aw,implements:null,static:!1,private:!0,abstract:!1,parent:sw},lw={type:n.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:n.Project,entityId:Y},oi={type:n.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[rw,ow],methods:[NR,QB],extends:[],implements:[ke],x:0,y:0,parent:lw},oa="bitcoin-api-response-id",VR="time-property-id",LR="disclaimer-property-id",GR="chart-name-property-id",$R="bpi-property-id",js="bpi-entity-id",FR="usd-property-id",UR="gbp-property-id",xR="eur-property-id",li="currency-entity-id",jR="currency-code-property-id",kR="currency-symbol-property-id",qR="currency-rate-property-id",JR="currency-description-property-id",WR="currency-rate-number-property-id",cw={type:n.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:n.Property,entityId:jR},dw={like:!1,inferred:!1,id:"code-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:cw},uw={type:n.GenericReference,id:"code-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},pw={hidden:!1,required:!0,type:n.Property,id:jR,version:1,name:"code",description:null,dataType:dw,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:uw},yw={type:n.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:n.Property,entityId:kR},hw={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["&#36;","&pound;","&euro;"],constant:!1,parent:yw},fw={type:n.GenericReference,id:"symbol-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},mw={hidden:!1,required:!0,type:n.Property,id:kR,version:1,name:"symbol",description:null,index:0,dataType:hw,implements:null,static:!1,private:!1,abstract:!1,parent:fw},Tw={type:n.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:n.Property,entityId:qR},Ew={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:Tw},bw={type:n.GenericReference,id:"rate-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Rw={hidden:!1,required:!0,type:n.Property,id:qR,version:1,name:"rate",description:null,index:0,dataType:Ew,implements:null,static:!1,private:!1,abstract:!1,parent:bw},gw={type:n.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:n.Property,entityId:JR},vw={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:gw},Iw={type:n.GenericReference,id:"description-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Dw={hidden:!1,required:!0,type:n.Property,id:JR,version:1,name:"description",description:null,dataType:vw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Iw},Pw={type:n.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:n.Property,entityId:WR},Aw={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:Pw},Ow={type:n.GenericReference,id:"rate-number-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Sw={hidden:!1,required:!0,type:n.Property,id:WR,version:1,name:"rate_float",description:null,dataType:Aw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Ow},Cw={type:n.GenericReference,id:"currency-prototype-parent-ref-id",entityType:n.Project,entityId:Y},ks={type:n.CustomEntity,id:li,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[pw,mw,Rw,Dw,Sw],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:Cw},Bw={type:n.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:n.Property,entityId:FR},ww={like:!1,inferred:!1,id:"usd-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Bw},_w={type:n.GenericReference,id:"usd-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},Nw={hidden:!1,required:!0,id:FR,type:n.Property,version:1,name:"USD",description:null,index:0,dataType:ww,implements:null,static:!1,private:!1,abstract:!1,parent:_w},Mw={type:n.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:n.Property,entityId:UR},Vw={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Mw},Lw={type:n.GenericReference,id:"gbp-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},Gw={hidden:!1,required:!0,id:UR,type:n.Property,version:1,name:"GBP",description:null,index:0,dataType:Vw,implements:null,static:!1,private:!1,abstract:!1,parent:Lw},$w={type:n.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:n.Property,entityId:xR},Fw={like:!1,inferred:!1,id:"eur-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:$w},Uw={type:n.GenericReference,id:"eur-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},xw={hidden:!1,required:!0,id:xR,type:n.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:Fw,private:!1,abstract:!1,parent:Uw},jw={type:n.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:n.Project,entityId:Y},YR={type:n.CustomEntity,id:js,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[Nw,Gw,xw],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:jw},kw={type:n.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:n.Property,entityId:VR},qw={like:!1,inferred:!1,id:"time-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nl,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kw},Jw={type:n.GenericReference,id:"time-property-parent-ref-id",entityType:n.CustomEntity,entityId:oa},Ww={hidden:!1,required:!0,type:n.Property,id:VR,version:1,name:"time",description:null,index:0,dataType:qw,implements:null,static:!1,private:!1,abstract:!1,parent:Jw},Yw={type:n.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:n.Property,entityId:LR},Hw={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:Yw},zw={type:n.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:n.CustomEntity,entityId:oa},Zw={hidden:!1,required:!0,type:n.Property,id:LR,version:1,name:"disclaimer",description:null,index:0,dataType:Hw,implements:null,static:!1,private:!1,abstract:!1,parent:zw},Kw={type:n.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:n.Property,entityId:GR},Xw={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:Kw},Qw={type:n.GenericReference,id:"chart-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:oa},e_={hidden:!1,required:!0,type:n.Property,id:GR,version:1,name:"chartName",description:null,index:0,dataType:Xw,implements:null,static:!1,private:!1,abstract:!1,parent:Qw},t_={type:n.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:n.Property,entityId:$R},n_={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:YR,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:t_},r_={type:n.GenericReference,id:"bpi-property-parent-ref-id",entityType:n.CustomEntity,entityId:oa},i_={hidden:!1,required:!0,type:n.Property,id:$R,version:1,name:"bpi",description:null,implements:null,index:0,dataType:n_,static:!1,private:!1,abstract:!1,parent:r_},a_={type:n.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:n.Project,entityId:Y},HR={type:n.CustomEntity,id:oa,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[Ww,Zw,e_,i_],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:a_},s_={type:n.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},o_={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:s_},l_={type:n.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:n.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},c_={type:n.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:n.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},d_={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:c_},u_={type:n.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},zR={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:d_,readsValue:u_,required:!0,index:0,parent:l_},p_={type:n.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},y_={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:n.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,dataType:o_,writesValues:[zR],required:!0,index:0,parent:p_},h_={type:n.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},f_={type:n.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},m_={type:n.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},ZR={type:n.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[zR],calledByError:[],calledByEntry:[f_],calledBySuccess:[],throws:null,x:0,y:0,parent:m_},T_={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:[y_],calls:[ZR],index:0,collapsed:!1,implements:null,returnStatements:[ZR],private:!1,x:0,y:0,parent:h_},E_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},b_={type:n.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},R_={type:n.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:n.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},g_={type:n.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},v_={type:n.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:n.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},I_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:v_},Tc={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:I_,implements:null,readsValue:g_,required:!0,index:0,parent:R_},D_={type:n.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Ec={type:n.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[Tc],calledByError:[],calledByEntry:[],calledBySuccess:[E_,D_],throws:null,x:0,y:0,parent:b_},P_={type:n.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},A_={type:n.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},KR={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Rl,name:null,description:null,readsValue:A_,defaultValue:null,parent:P_,index:2},O_={type:n.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},S_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:O_},C_={type:n.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},B_={type:n.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:n.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},w_={type:n.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:n.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},XR={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:S_,readsValue:B_,writesValues:[Tc],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[w_],successCalls:[Ec],errorCalls:[],internalCalls:[],x:0,y:0,parent:C_},__={type:n.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:n.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},N_={type:n.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},M_={type:n.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:Xa,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:P.String,valueAsType:null,parent:__,autogeneration:null},index:1,parent:N_},V_={type:n.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},L_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:n.OutputMap,version:1,declaration:rs,index:2,writesValues:[XR],parent:V_},G_={type:n.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},$_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:G_},F_={type:n.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},U_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:n.InputMap,version:1,name:null,description:null,declaration:Qa,index:3,readsValue:null,defaultValue:null,parent:F_},x_={type:n.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},j_={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:n.InputMap,version:1,declaration:es,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:x_},k_={type:n.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},q_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:n.OutputMap,version:1,declaration:ns,index:1,writesValues:[],parent:k_},J_={type:n.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},W_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:n.OutputMap,version:1,declaration:ts,index:0,writesValues:[],parent:J_},Y_={type:n.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},H_={type:n.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},z_={type:n.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},Z_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},K_={type:n.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:n.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},X_={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:K_},Q_={type:n.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:n.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},QR={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:X_,implements:null,required:!0,readsValue:null,index:0,parent:Q_},eN={type:n.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[Z_],throws:QR,x:0,y:0,parent:z_},tN={type:n.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},nN={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:n.OutputMap,declaration:gl,version:1,writesValues:[QR],index:0,parentRelationType:Wr.Error,parent:tN},rN={type:n.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Vi,inputs:[$_,M_,KR,U_,j_],outputs:[W_,q_,L_],process:null,calledByError:[],calledByEntry:[Y_],calledBySuccess:[],successCalls:[Ec,XR],errorCalls:[eN],error:nN,x:0,y:0,parent:H_},iN={type:n.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:n.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},aN={type:n.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},sN={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Ha,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"?name=",name:P.String,parent:iN,valueAsType:null,autogeneration:null},index:0,parent:aN},oN={type:n.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},lN={type:n.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},cN={type:n.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},dN={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:cN},uN={type:n.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:n.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},pN={type:n.GenericReference,id:"assembled-query-string-called-by-ref",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},eg={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:dN,readsValue:uN,writesValues:[KR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[pN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:lN},yN={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:n.OutputMap,version:1,writesValues:[eg],declaration:Ni,index:0,parent:oN},hN={type:n.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},fN={type:n.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},mN={type:n.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:n.ArgumentDeclaration},TN={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},tg={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:n.InputMap,declaration:za,name:null,description:null,readsValue:mN,defaultValue:null,index:1,parent:TN},EN={type:n.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:Mi,version:1,inputs:[tg,sN],outputs:[yN],process:null,calledByError:[],calledByEntry:[hN],calledBySuccess:[],successCalls:[eg],errorCalls:[],error:null,x:0,y:0,parent:fN},bN={type:n.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:n.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},RN={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:bN},gN={type:n.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},ng={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:RN,implements:null,required:!1,writesValues:[tg],index:0,parent:gN},vN={type:n.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:n.Project,entityId:Y},rg={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:[ng],calls:[EN,rN],returnStatements:[Ec],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:vN},IN={type:n.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},DN={type:n.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},PN={type:n.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},AN={type:n.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},ig={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:n.InputMap,declaration:ng,name:null,description:null,readsValue:PN,defaultValue:null,index:0,parent:AN},ON={type:n.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},SN={type:n.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:n.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},CN={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:SN},BN={type:n.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:n.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},wN={type:n.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},_N={type:n.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},ag={type:n.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:CN,readsValue:BN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[_N],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:wN},NN={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.OutputMap,version:1,declaration:Tc,writesValues:[ag],index:0,parent:ON},MN={type:n.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:rg,inputs:[ig],outputs:[NN],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[IN],successCalls:[ag],errorCalls:[],error:null,x:0,y:0,parent:DN},VN={type:n.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},LN={type:n.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},GN={type:n.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},$N={type:n.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},sg={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:n.InputMap,declaration:cr.inputs[0],name:null,description:null,readsValue:GN,defaultValue:null,index:0,parent:$N},FN={type:n.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:cr,inputs:[sg],calledByError:[],calledByEntry:[VN],calledBySuccess:[],successCalls:[MN],errorCalls:[],x:0,y:0,parent:LN},UN={type:n.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},xN={type:n.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:n.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},jN={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xN},kN={type:n.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},qN={type:n.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},JN={type:n.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},og={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:jN,readsValue:qN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[JN],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:kN},WN={type:n.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},YN={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WN},HN={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:n.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:YN,implements:null,required:!0,index:1,writesValues:[og],parent:UN},zN={type:n.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},ZN={type:n.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},KN={type:n.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},XN={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:KN},QN={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:n.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:XN,implements:null,required:!0,index:0,writesValues:[sg,ig],parent:ZN},eM={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:[QN,HN],calls:[FN,og],index:1,private:!1,implements:null,x:0,y:0,parent:zN},tM={type:n.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},nM={type:n.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-manager-property-id"},rM={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:tM,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:nM},iM={type:n.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},aM={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:rM,abstract:!1,parent:iM},sM={type:n.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-start-date-property-id"},oM={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:hn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:sM},lM={type:n.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},cM={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:oM,abstract:!1,parent:lM},dM={type:n.GenericReference,id:"employee-department-property-ref-id",entityType:n.Property,entityId:"employee-department-property-id"},uM={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:dM},pM={type:n.GenericReference,id:"employee-department-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},yM={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:uM,abstract:!1,parent:pM},hM={type:n.GenericReference,id:"employee-prototype-parent-ref-id",entityType:n.Project,entityId:Y},Lt={type:n.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[yM,cM,aM],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ht],x:0,y:0,parent:hM},fM={type:n.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:n.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},mM={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:fM},TM={type:n.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},EM={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:mM,abstract:!1,parent:TM},bM={type:n.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:n.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},RM={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bM},gM={type:n.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bc={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:RM,abstract:!1,parent:gM},vM={type:n.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:n.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},IM={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:vM},DM={type:n.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},PM={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:IM,private:!0,abstract:!1,parent:DM},AM={type:n.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:n.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},OM={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:AM},SM={type:n.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},CM={hidden:!1,required:!0,type:n.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:OM,implements:null,private:!0,static:!1,abstract:!1,parent:SM},BM={type:n.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:n.Project,entityId:Y},Gt={type:n.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[EM,bc,PM,CM],static:!1,abstract:!1,abstractMethods:[],methods:[T_,eM],extends:[],implements:[ke],x:0,y:0,parent:BM},wM={type:n.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:n.Project,entityId:Y},Rc={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:wM};n.GenericReference,n.DataType;const _M={id:"cron-job-entity-expression-property-ref-id",type:n.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:n.Property},NM={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:_M},MM={id:"cron-job-entity-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},VM={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:NM,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:MM},LM={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},GM={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},$M={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:n.FunctionCall,declaration:Rc,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[LM],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:GM},FM={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},UM={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:Jl,calls:[$M],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:FM},xM={id:"cron-job-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},jM={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:[VM],static:!0,abstract:!1,abstractMethods:[],extends:[Wl],implements:[],methods:[UM],x:0,y:0,parent:xM},kM={type:n.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:n.Project,entityId:Y},qM={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:[ds],x:0,y:0,parent:kM},lg="f558fbf8-67de-4545-9804-6ae621e0b2d4",JM={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},WM={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},YM={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:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:JM,autogeneration:null,valueAsType:null},parent:WM},HM={id:"getCompanyByIdEndpointReachedEntityEventRef",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},zM={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},ZM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},KM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:zM,autogeneration:null,valueAsType:null},parent:ZM},XM={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:KM,implements:Ml,required:!0,index:0,parent:HM},QM={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},eV={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:YM,implements:Vl,required:!0,index:1,parent:QM},tV={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},nV={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},rV={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},iV={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:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:nV,autogeneration:null,valueAsType:null},parent:rV},aV={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:iV,implements:Ll,required:!0,index:2,parent:tV},sV={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},oV={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},lV={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:oV},cV={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:lV,implements:Gl,index:3,required:!0,parent:sV},dV={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},uV={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:dV},pV={id:"getCompanyByIdEndpointReturnStatementRef",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},yV={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:uV,implements:$l,readsValue:null,required:!0,index:0,parent:pV},hV={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},fV={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},mV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:hV,autogeneration:null,valueAsType:null},parent:fV},TV={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},EV={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:mV,implements:Fl,readsValue:null,required:!0,index:1,parent:TV},bV={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},RV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:bV},gV={id:"getCompanyByIdEndpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},vV={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ReturnDeclaration,name:"Response body",implements:Ul,dataType:RV,readsValue:null,required:!0,index:2,parent:gV},IV={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:n.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:n.FunctionDeclaration},DV={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},PV={id:"getCompanyByIdEndpointReturnStatement",type:n.ReturnStatement,version:1,outputs:[yV,EV,vV],calledByError:[],calledByEntry:[IV],calledBySuccess:[],throws:null,x:0,y:0,parent:DV},AV={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:lg},OV={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:n.FunctionDeclaration,inputs:[XM,eV,aV,cV],returnStatements:[PV],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:xl,index:0,private:!1,x:0,y:0,parent:AV},SV={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},CV={id:"getCompanyByIdEndpointPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointPathProperty"},BV={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:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.String,value:"/company/{id}",parent:SV,valueAsType:null,autogeneration:null},parent:CV},wV={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},_V={hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:_l,dataType:BV,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:wV},NV={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},MV={id:"getCompanyByIdEndpointMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointMethodProperty"},VV={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Nn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,parent:NV,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:MV},LV={id:"getCompanyByIdEndpointBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:V.HTTP_ENDPOINT},GV={hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Nl,index:0,dataType:VV,description:null,parent:LV},$V={type:n.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:n.Project,entityId:Y},FV={type:n.CustomEntity,id:lg,version:1,name:"Get given company data by id",description:null,properties:[_V,GV],methods:[OV],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[ds],x:0,y:0,parent:$V},UV={id:"product-prototype-database-property-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-id",entityType:n.Property},xV={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},jV={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:Mn,asType:!1,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:hc,autogeneration:null,parent:xV},parent:UV},kV={id:"product-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},qV={hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:xi,static:!0,index:0,dataType:jV,description:"The database that the entity belongs to.",parent:kV},JV={type:n.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:n.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},WV={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:JV},YV={type:n.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:n.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},HV={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:WV,abstract:!1,parent:YV},zV={type:n.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:n.Project,entityId:Y},ZV={type:n.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[ke],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[qV,HV],methods:[],x:0,y:0,parent:zV},la="project-loaded-event-id",rn="get-bitcoin-price-http-call-operation-id",cg="get-bitcoin-price-http-call-response-body-id",qs="validate-bitcoin-price-response-operation-ids",KV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:cg},XV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:n.Operation,entityId:qs},dg={id:"validate-bitcoin-data-to-validate-input-map-id",type:n.InputMap,version:1,declaration:rr.inputs[1],name:null,description:null,readsValue:KV,defaultValue:null,index:0,parent:XV},QV={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"},e1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:n.Operation,entityId:qs},t1={id:"validate-bitcoin-type-to-match-input-map-id",type:n.InputMap,version:1,declaration:rr.inputs[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:n.PrimitiveValue,version:1,name:P.EntityTemplate,valueAsType:HR,value:null,parent:QV,autogeneration:null},index:0,parent:e1},n1={type:n.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:n.Operation,entityId:qs},r1={id:"validate-bitcoin-validated-entity-output-map-id",type:n.OutputMap,version:1,declaration:rr.outputs[0],writesValues:[],index:0,parent:n1},i1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:n.GlobalEvent,entityId:la},a1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:n.Operation,entityId:rn},s1={type:n.Operation,id:qs,version:1,declaration:rr,inputs:[t1,dg],outputs:[r1],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[a1],parent:i1},o1={type:n.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:n.FunctionCall,entityId:rn},l1={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:n.InputMap,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:o1},c1={type:n.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:n.FunctionCall,entityId:rn},d1={type:n.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:n.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},u1={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:null,defaultValue:{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:P.String,parent:d1,valueAsType:null,autogeneration:null},index:1,parent:c1},p1={type:n.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:n.FunctionCall,entityId:rn},y1={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:n.InputMap,declaration:Qa,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:p1},h1={type:n.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:n.FunctionCall,entityId:rn},f1={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:n.InputMap,declaration:es,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:h1},m1={type:n.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:n.FunctionCall,entityId:rn},T1={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:n.OutputMap,declaration:ns,writesValues:[],index:1,parent:m1},E1={type:n.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:n.FunctionCall,entityId:rn},b1={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:n.OutputMap,declaration:ts,writesValues:[],index:0,parent:E1},R1={type:n.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:n.FunctionCall,entityId:rn},g1={id:cg,type:n.OutputMap,version:1,declaration:rs,writesValues:[dg],index:2,parent:R1},v1={type:n.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:n.FunctionDeclaration,entityId:rn},I1={type:n.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:n.GlobalEvent,entityId:la},D1={type:n.Operation,id:rn,version:1,declaration:Vi,inputs:[l1,u1,y1,f1],outputs:[b1,T1,g1],process:null,parent:I1,calledByError:[],calledByEntry:[v1],calledBySuccess:[],successCalls:[s1],errorCalls:[],error:null,x:0,y:0},P1={type:n.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:n.GlobalEvent,entityId:la},A1={type:n.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:n.GlobalEvent,entityId:la},O1={process:null,type:n.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:Rc,inputs:[],outputs:[],calledByError:[],calledByEntry:[P1],calledBySuccess:[],parent:A1,successCalls:[],errorCalls:[],error:null,x:0,y:0},S1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:n.GenericReference,entityType:n.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},C1={type:n.GlobalEvent,id:la,version:1,name:pn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:fs,parent:S1,inputs:[],calls:[O1,D1],x:0,y:0},$t="abort-execution-func-declaration-id",ca="abort-execution-func-exec-var-declaration-id",Js="abort-execution-func-small-wait-op-id",gc="abort-execution-func-long-wait-op-id",ug="abort-execution-func-long-wait-process-output-id",pg="abort-execution-func-exec-var-instance-write-id",yg="abort-execution-func-long-wait-return-stmt-id",hg="abort-execution-func-small-wait-return-stmt-id",B1="abort-execution-func-exec-var-instance-abort-call-id",vc="abort-execution-func-exec-var-instance-abort-internal-call-id",fg="abort-execution-func-exec-second-wait-op-id",w1={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"},_1={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"},N1={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:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:_1},constant:!1,parent:w1},M1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:hg},V1={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:N1,implements:null,readsValue:null,required:!0,index:0,parent:M1},L1={type:n.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Js},G1={type:n.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},mg={type:n.ReturnStatement,id:hg,version:1,outputs:[V1],calledByError:[],calledByEntry:[],calledBySuccess:[L1],throws:null,x:0,y:0,parent:G1},$1={type:n.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"second-wait-argument-map-id"},F1={type:n.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:fg},U1={id:"second-wait-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:P.Number,parent:$1},index:0,parent:F1},x1={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},j1={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.InternalCall,entityId:vc},k1={id:fg,type:n.Operation,version:1,declaration:pt,inputs:[U1],outputs:[],process:null,successCalls:[mg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[j1],error:null,parent:x1},q1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:n.VariableInstance,entityId:pg},J1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:n.Operation,entityId:Js},W1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},Y1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ca},H1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:n.InternalCall,entityId:vc},z1={id:B1,type:n.VariableInstance,version:1,declaration:Y1,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[H1],parent:W1},Tg={id:vc,type:n.InternalCall,version:1,inputs:[],outputs:[],declaration:Yl,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[q1,J1],successCalls:[k1],errorCalls:[],error:null,index:0,parent:z1},Z1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},K1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:ca},X1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:$t},Q1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ca},e0={type:n.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:n.OutputMap,entityId:ug},Ic={id:pg,type:n.VariableInstance,version:1,declaration:Q1,inputs:[],outputs:[],calledByError:[],calledByEntry:[X1],calledBySuccess:[K1],successCalls:[Tg],errorCalls:[],x:0,y:0,readsValue:e0,writesValues:[],internalCalls:[],parent:Z1},t0={type:n.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:ca};n.GenericReference,n.DataType;const n0={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Hl,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:t0,defaultValue:null},r0={type:n.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},i0={type:n.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},a0={id:ca,type:n.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:n0,inputs:[],outputs:[],calledByError:[],calledByEntry:[i0],calledBySuccess:[],successCalls:[Ic],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:r0},s0={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"},o0={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"},l0={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:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:o0},constant:!1,parent:s0},c0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:yg},d0={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:l0,readsValue:null,required:!0,index:0,parent:c0},u0={type:n.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:gc},p0={type:n.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},Eg={type:n.ReturnStatement,id:yg,version:1,outputs:[d0],calledByError:[],calledByEntry:[],calledBySuccess:[u0],throws:null,x:0,y:0,parent:p0},y0={type:n.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"long-argument-map-id"},bg={type:n.GenericReference,id:"long-argument-map-parent-ref-id",entityType:n.Operation,entityId:gc},h0={id:"long-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:n.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:P.Number,parent:y0},index:0,parent:bg},f0={type:n.GenericReference,id:"long-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},m0={type:n.GenericReference,id:"long-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},T0={id:ug,type:n.OutputMap,version:1,declaration:Zl,writesValues:[Ic],index:0,parent:bg},E0={id:gc,type:n.Operation,version:1,declaration:pt,inputs:[h0],outputs:[],process:T0,successCalls:[Eg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[m0],calledBySuccess:[],error:null,parent:f0},b0={type:n.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"small-wait-argument-map-id"},R0={type:n.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:Js},g0={id:"small-wait-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:P.Number,parent:b0},index:0,parent:R0},v0={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},I0={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},D0={id:Js,type:n.Operation,version:1,declaration:pt,inputs:[g0],outputs:[],process:null,successCalls:[Tg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[I0],calledBySuccess:[],error:null,parent:v0},P0={type:n.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:n.Project,entityId:Y},Rg={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:[Eg,mg],calls:[D0,a0,Ic,E0],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:P0},A0={type:n.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:n.Project,entityId:Y},O0={id:"call-execution-abort-func-id",type:n.FunctionCall,version:1,declaration:Rg,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:A0},Dc="manual-hello-world-loop-func-decl-id",gg="manual-hello-world-loop-func-return-statement-id",an="manual-hello-world-loop-id",da="manual-hello-world-loop-body-id",Pc="manual-hello-world-loop-break-statement-id",ua="manual-hello-world-loop-current-iteration-number-output-map-id",Ac="manual-hello-world-loop-previous-iterations-results-output-map-id",Oc="assembled-hello-world-text-output-id",vg="assembled-hello-world-list-output-id",pa="iteration-number-is-equal-or-greater-than-10-condition-id",Ws="join-hello-world-and-number-operation-id",Ys="append-string-to-list-operation-id",Ig="hello-world-loop-output-map-id",S0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:n.ReturnStatement,entityId:gg},C0={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"},B0={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:C0},w0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:n.OutputMap,entityId:Ig},Dg={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:n.ReturnDeclaration,name:"Results",description:null,dataType:B0,implements:null,readsValue:w0,required:!0,index:0,parent:S0},_0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:n.Loop,entityId:an},N0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:n.FunctionDeclaration,entityId:Dc},Pg={type:n.ReturnStatement,id:gg,version:1,outputs:[Dg],calledByError:[],calledByEntry:[],calledBySuccess:[_0],parent:N0,throws:null,x:0,y:0},M0={type:n.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:n.BreakStatement,entityId:Pc},V0={type:n.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Oc},Ag={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,dataType:null,readsValue:V0,implements:null,required:!0,index:0,parent:M0},L0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:ua},G0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:n.BreakStatement,entityId:Pc},Og={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:L0,required:!0,index:1,parent:G0},$0={type:n.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:n.Condition,entityId:pa},F0={type:n.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:n.Loop,entityId:an},Sg={type:n.BreakStatement,id:Pc,version:1,outputs:[Ag,Og],calledByError:[],calledByEntry:[],calledBySuccess:[$0],parent:F0,throws:null,x:0,y:0},U0={type:n.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:n.ContinueStatement,entityId:"hello-world-loop-continue-statement"},x0={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"},j0={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:x0},k0={type:n.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Oc},Cg={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,implements:null,dataType:j0,readsValue:k0,required:!0,index:0,parent:U0},q0={type:n.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:n.Condition,entityId:pa},J0={type:n.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:n.Loop,entityId:an},Bg={type:n.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[Cg],calledBySuccess:[],calledByError:[q0],calledByEntry:[],parent:J0,throws:null,x:0,y:0};n.GenericReference,n.InputMap;const W0={type:n.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},Y0={type:n.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Ac},wg={id:"append-string-to-list-base-string-map-id",type:n.InputMap,version:1,declaration:hl,name:null,description:null,readsValue:Y0,defaultValue:null,index:0,parent:W0},H0={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},z0={id:vg,type:n.OutputMap,version:1,writesValues:[Ag],declaration:Ni,index:0,parent:H0},Z0={type:n.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:n.Condition,entityId:pa},K0={type:n.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:vg},X0={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ys},_g={id:"latest-string-to-add-input-map-id",version:1,type:n.InputMap,declaration:fl,name:null,description:null,readsValue:K0,defaultValue:null,index:1,parent:X0},Q0={type:n.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:n.FunctionDeclaration,entityId:an},eL={type:n.Operation,id:Ys,declaration:Za,version:1,inputs:[wg,_g],outputs:[z0],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[Z0],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:Q0},tL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:da},nL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:n.Loop,entityId:an},rL={type:n.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:ua},Ng={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:n.Condition,entityId:pa},iL={id:"current-iteration-number-to-check-map-id",version:1,type:n.InputMap,declaration:Qr.inputs[0],name:null,description:null,readsValue:rL,index:0,defaultValue:null,parent:Ng},aL={type:n.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"max-num-iterations-value-map-id"},sL={id:"max-num-iterations-value-map-id",version:1,type:n.InputMap,declaration:Qr.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:10,autogeneration:null,valueAsType:null,parent:aL},parent:Ng},oL={type:n.Condition,id:pa,version:1,declaration:Qr,inputs:[iL,sL],calledByError:[],calledByEntry:[tL],calledBySuccess:[],successCalls:[Sg,eL],errorCalls:[Bg],x:0,y:0,parent:nL},lL={type:n.GenericReference,id:"base-string-map-ref-id",entityType:n.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},cL={type:n.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ws},dL={id:"join-hello-world-and-number-base-string-map-id",type:n.InputMap,version:1,declaration:Ha,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"Hello world ",name:P.String,parent:lL,valueAsType:null,autogeneration:null},index:0,parent:cL},uL={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ws},pL={id:Oc,type:n.OutputMap,version:1,writesValues:[_g,Cg],declaration:Ni,index:0,parent:uL},yL={type:n.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:da},hL={type:n.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:ua},fL={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ws},Mg={id:"current-iteration-number-input-map-id",version:1,type:n.InputMap,declaration:za,name:null,description:null,readsValue:hL,defaultValue:null,index:1,parent:fL},mL={type:n.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:n.FunctionDeclaration,entityId:an},TL={type:n.Operation,id:Ws,declaration:Mi,version:1,inputs:[dL,Mg],outputs:[pL],process:null,calledByError:[],calledByEntry:[yL],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:mL},EL={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:Ac,entityType:n.ArgumentDeclaration},bL={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:EL},RL={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.FunctionDeclaration},gL={id:Ac,type:n.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:bL,implements:null,writesValues:[wg],index:1,parent:RL},vL={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:n.GenericReference,entityId:da,entityType:n.FunctionDeclaration},IL={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:ua,entityType:n.ArgumentDeclaration};n.DataType;const DL={id:ua,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:Il,dataType:null,writesValues:[Mg,Og],index:0,parent:vL},PL={id:"manual-flow-loop-body-parent-ref-id",type:n.GenericReference,entityId:an,entityType:n.Loop},AL={id:da,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[DL,gL],calls:[oL,TL],implements:Dl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:PL},OL={type:n.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:n.Loop,entityId:an},Vg={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:OL},SL={type:n.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:n.Loop,entityId:an},CL={type:n.OutputMap,id:Ig,version:1,declaration:Vg,writesValues:[Dg],index:0,parent:SL},BL={id:"manual-hello-world-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},wL={id:"manual-hello-world-loop-called-by-ref-id",type:n.GenericReference,entityId:Dc,entityType:n.FunctionDeclaration},_L={id:an,type:n.Loop,version:1,declaration:vl,inputs:[],outputsDeclarations:[Vg],outputs:[CL],body:AL,successCalls:[Pg],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[wL],calledBySuccess:[],breakStatements:[Sg],continueStatements:[Bg],x:0,y:0,parent:BL},NL={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Lg={type:n.FunctionDeclaration,id:Dc,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[_L],returnStatements:[Pg],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:NL},ML={type:n.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:n.Project,entityId:Y},VL={id:"call-hello-world-loop-id",type:n.FunctionCall,version:1,declaration:Lg,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:ML},bn="company-dto-function-declaration-id",Sc="company-dto-func-declaration-argument-dcl-id",sn="company-dto-function-company-variable-id",kn="company-dto-function-company-dto-variable-id",ci="iterate-over-employee-list-loop-id",Gg="iterate-over-employee-list-loop-employee-dto-output-map-id",Cc="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",ya="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",$g="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",LL="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",Fg="iterate-over-employee-list-continue-statement-id",Hs="iterate-over-employee-list-loop-body-id",Ug="company-dto-func-declaration-return-statement-id",xg="company-dto-func-declaration-return-decl-id",jg="company-dto-func-declaration-company-variable-id-output-map-id",kg="company-dto-func-declaration-company-variable-employess-output-map-id",qg="company-dto-func-declaration-company-variable-name-output-map-id",GL="company-dto-func-declaration-company-dto-variable-input-map-id",$L="company-dto-func-declaration-company-dto-variable-employess-input-map-id",FL="company-dto-func-declaration-company-dto-variable-name-input-map-id",zs="company-dto-func-declaration-owner-variable-id",UL="company-dto-func-declaration-company-dto-variable-owner-input-map-id",Jg="company-dto-func-declaration-company-variable-owner-output-map-id",Wg="company-dto-func-declaration-owner-variable-id-output-map-id",Zs="company-dto-func-declaration-bank-account-variable-id",xL="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",Yg="company-dto-func-declaration-company-variable-bank-account-output-map-id",Hg="company-dto-func-declaration-bank-account-variable-id-output-map-id",jL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:xg},kL={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:jL},qL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Ug},JL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:kn},zg={isError:!1,id:xg,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:kL,readsValue:JL,required:!0,index:0,parent:qL},WL={type:n.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:kn},YL={type:n.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},Bc={type:n.ReturnStatement,id:Ug,version:1,outputs:[zg],calledByError:[],calledByEntry:[],calledBySuccess:[WL],throws:null,x:0,y:0,parent:YL},HL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Wg},zL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Zg={id:UL,type:n.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:HL,parent:zL},ZL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Hg},KL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Kg={id:xL,type:n.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:ZL,parent:KL},XL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:qg},QL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Xg={id:FL,type:n.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:XL,parent:QL},eG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Gg},tG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Qg={id:$L,type:n.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:eG,parent:tG},nG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:jg},rG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},ev={id:GL,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:nG,parent:rG},iG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},aG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:Zs},sG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:zs},oG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:n.VariableDeclaration,entityId:ci},wc={id:kn,type:n.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[aG,sG,oG],successCalls:[Bc],errorCalls:[],readsValue:null,writesValues:[zg],inputs:[ev,Xg,Kg,Zg,Qg],outputs:[],internalCalls:[],parent:iG,x:0,y:0},hr="employee-dto-func-declaration-id",_c="employee-dto-func-declaration-argument-dcl-id",tv="employee-dto-func-declaration-return-statement-id",nv="employee-dto-func-declaration-return-decl-id",fr="employee-dto-func-declaration-employee-variable-id",mr="employee-dto-func-declaration-employee-dto-variable-id",Ks="employee-dto-func-declaration-manager-variable-id",rv="employee-dto-func-declaration-employee-variable-id-output-map-id",iv="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",av="employee-dto-func-declaration-employee-variable-department-output-map-id",sv="employee-dto-func-declaration-employee-variable-manager-output-map-id",ov="employee-dto-func-declaration-manager-variable-id-output-map-id",lG="employee-dto-func-declaration-employee-dto-variable-input-map-id",cG="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",dG="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",uG="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",pG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:nv},yG={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:pG},hG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:tv},fG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:mr},lv={isError:!1,id:nv,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:yG,implements:null,readsValue:fG,required:!0,index:0,parent:hG},mG={type:n.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:mr},TG={type:n.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},Nc={type:n.ReturnStatement,id:tv,version:1,outputs:[lv],calledByError:[],calledByEntry:[],calledBySuccess:[mG],throws:null,x:0,y:0,parent:TG},EG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:ov},bG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},cv={id:uG,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:EG,parent:bG},RG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:av},gG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},dv={id:dG,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:RG,parent:gG},vG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:iv},IG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},uv={id:cG,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:vG,parent:IG},DG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:rv},PG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},pv={id:lG,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:DG,parent:PG},AG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},OG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ks},SG={id:mr,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[OG],successCalls:[Nc],errorCalls:[],readsValue:null,writesValues:[lv],inputs:[pv,uv,dv,cv],outputs:[],internalCalls:[],parent:AG,x:0,y:0},CG={type:n.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},BG={id:ov,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[cv],parent:CG},wG={type:n.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},_G={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:wG,defaultValue:null},NG={type:n.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:sv},MG={type:n.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr};n.GenericReference,n.VariableDeclaration;const yv={id:Ks,type:n.VariableDeclaration,version:1,name:"Manager",dataType:_G,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[SG],errorCalls:[],readsValue:NG,writesValues:[],inputs:[],outputs:[BG],internalCalls:[],parent:MG,x:0,y:0},VG={type:n.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},LG={id:sv,type:n.OutputMap,version:1,declaration:Lt.properties[2],index:3,writesValues:[yv],parent:VG},GG={type:n.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},$G={id:av,type:n.OutputMap,version:1,declaration:Lt.properties[0],index:2,writesValues:[dv],parent:GG},FG={type:n.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},UG={id:iv,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[uv],parent:FG},xG={type:n.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},jG={id:rv,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[pv],parent:xG},kG={type:n.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},qG={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:kG,defaultValue:null},JG={type:n.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},WG={type:n.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:_c},YG={type:n.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:hr},hv={id:fr,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:qG,description:"A variable holding a company employee",calledByError:[],calledByEntry:[YG],calledBySuccess:[],successCalls:[yv],errorCalls:[],readsValue:WG,writesValues:[],inputs:[],outputs:[jG,UG,$G,LG],internalCalls:[],parent:JG,x:0,y:0},HG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:_c,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:Lt,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:HG,defaultValue:null},ZG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:hr,entityType:n.FunctionDeclaration},KG={type:n.ArgumentDeclaration,id:_c,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,dataType:zG,index:0,writesValues:[hv],parent:ZG},XG={type:n.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Mc={type:n.FunctionDeclaration,id:hr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[KG],calls:[hv],implements:null,returnStatements:[Nc],collapsed:!1,private:!1,x:0,y:0,parent:XG},QG={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:$g,entityType:n.ReturnDeclaration},e$={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:QG},t$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:n.GenericReference,entityId:ya,entityType:n.OutputMap},n$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:n.GenericReference,entityId:Fg,entityType:n.ContinueStatement},fv={isError:!1,id:$g,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:t$,dataType:e$,implements:null,required:!0,index:0,parent:n$},r$={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:n.GenericReference,entityId:ya,entityType:n.FunctionCall},i$={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},mv={id:Fg,type:n.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[r$],outputs:[fv],throws:null,x:0,y:0,parent:i$},a$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ya,entityType:n.FunctionCall},s$={id:LL,type:n.OutputMap,version:1,declaration:Nc.outputs[0],writesValues:[fv],index:0,parent:a$},o$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Cc,entityType:n.ArgumentDeclaration},l$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:n.GenericReference,entityId:ya,entityType:n.FunctionCall},Tv={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:Mc.inputs[0],readsValue:o$,index:0,defaultValue:null,parent:l$},c$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},d$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},u$={id:ya,type:n.FunctionCall,version:1,declaration:Mc,inputs:[Tv],process:null,outputs:[s$],calledByError:[],calledByEntry:[c$],calledBySuccess:[],successCalls:[mv],errorCalls:[],error:null,x:0,y:0,parent:d$},p$={type:n.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Cc,entityType:n.ArgumentDeclaration},y$={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:Lt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:p$},h$={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},f$={id:Cc,type:n.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:y$,required:!0,implements:is,index:0,writesValues:[Tv],parent:h$},m$={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},T$={id:Hs,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[f$],calls:[u$],implements:as,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:m$},E$={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},b$={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:n.GenericReference,entityId:kg,entityType:n.OutputMap},Ev={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ir.inputs[0],defaultValue:null,readsValue:b$,index:0,parent:E$},R$={id:"iterate-over-employee-list-loop-parent-ref-id",type:n.GenericReference,entityId:bn,entityType:n.FunctionDeclaration},g$={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},v$={id:Gg,type:n.OutputMap,version:1,declaration:ir.outputs[0],writesValues:[Qg],index:0,parent:g$},I$={type:n.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:n.VariableDeclaration,entityId:sn},D$={id:ci,type:n.Loop,version:1,declaration:ir,inputs:[Ev],successCalls:[wc],errorCalls:[],outputsDeclarations:[],outputs:[v$],body:T$,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[I$],breakStatements:[],continueStatements:[mv],error:null,x:0,y:0,parent:R$},P$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},A$={id:Hg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[Kg],parent:P$},O$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},S$={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:O$,defaultValue:null},C$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Yg},B$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn};n.GenericReference,n.VariableDeclaration;const bv={id:Zs,type:n.VariableDeclaration,version:1,name:"Bank account",dataType:S$,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[wc],errorCalls:[],readsValue:C$,writesValues:[],inputs:[],outputs:[A$],internalCalls:[],parent:B$,x:0,y:0},w$={type:n.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:zs},_$={id:Wg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[Zg],parent:w$},N$={type:n.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:zs},M$={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:N$,defaultValue:null},V$={type:n.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Jg},L$={type:n.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn};n.GenericReference,n.VariableDeclaration;const Rv={id:zs,type:n.VariableDeclaration,version:1,name:"Owner",dataType:M$,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[wc],errorCalls:[],readsValue:V$,writesValues:[],inputs:[],outputs:[_$],internalCalls:[],parent:L$,x:0,y:0},G$={type:n.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},$$={id:Jg,type:n.OutputMap,version:1,declaration:Gt.properties[2],index:4,writesValues:[Rv],parent:G$},F$={type:n.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},U$={id:Yg,type:n.OutputMap,version:1,declaration:Gt.properties[2],index:3,writesValues:[bv],parent:F$},x$={type:n.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},j$={id:qg,type:n.OutputMap,version:1,declaration:Gt.properties[0],index:2,writesValues:[Xg],parent:x$},k$={type:n.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},q$={id:kg,type:n.OutputMap,version:1,declaration:Gt.properties[3],index:1,writesValues:[Ev],parent:k$},J$={type:n.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},W$={id:jg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[ev],parent:J$},Y$={type:n.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},H$={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:Y$,defaultValue:null},z$={type:n.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},Z$={type:n.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Sc},K$={type:n.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:bn},gv={id:sn,type:n.VariableDeclaration,version:1,name:"Company",dataType:H$,description:"A variable holding a company",calledByError:[],calledByEntry:[K$],calledBySuccess:[],successCalls:[bv,Rv,D$],errorCalls:[],readsValue:Z$,writesValues:[],inputs:[],outputs:[W$,q$,j$,U$,$$],internalCalls:[],parent:z$,x:0,y:0},X$={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Sc,entityType:n.ArgumentDeclaration},Q$={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:X$,defaultValue:null},eF={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:bn,entityType:n.FunctionDeclaration},tF={type:n.ArgumentDeclaration,id:Sc,version:1,name:"Company",description:"The company to create a DTO for",required:!0,implements:null,dataType:Q$,index:0,writesValues:[gv],parent:eF},nF={type:n.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Vc={type:n.FunctionDeclaration,id:bn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[tF],calls:[gv],implements:null,index:null,returnStatements:[Bc],collapsed:!1,private:!1,x:0,y:0,parent:nF},ha="exec-in-parallel-operation-call-id",fa="exec-sequentially-operation-call-id",ft="concurrency-and-wait-function-declaration-id",vv="concurrency-and-wait-return-statement-id",Iv="concurrency-and-wait-return-declaration-id",Lc="exec-in-parallel-argument-map-id",Dv="exec-sequentially-argument-map-id",Gc="wait-for-2-seconds-operation-id",Pv="wait-for-2-seconds-argument-map-id",$c="map-company-dto-function-call-id",Av="map-company-dto-function-call-company-dto-output-map-id",ma="company-dto-variable-one-id",Fc="company-dto-variable-one-instance-id",rF="company-dto-variable-two-id",iF={type:n.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Iv},aF={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iF},sF={type:n.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:vv},oF={type:n.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:ma},Ov={isError:!1,id:Iv,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:aF,implements:null,readsValue:oF,required:!0,index:0,parent:sF},lF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Gc},cF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},Sv={type:n.ReturnStatement,id:vv,version:1,outputs:[Ov],calledByError:[],calledByEntry:[],calledBySuccess:[lF],throws:null,x:0,y:0,parent:cF},dF={type:n.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:n.VariableInstance,entityId:Fc},uF={type:n.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:n.VariableInstance,entityId:Fc},pF={type:n.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},Cv={id:rF,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[dF],internalCalls:[],writesValues:[Ov],readsValue:uF,x:0,y:0,parent:pF},yF={type:n.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:n.VariableDeclaration,entityId:ma},hF={type:n.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:ma},fF={type:n.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},mF={type:n.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ma},Bv={id:Fc,type:n.VariableInstance,version:1,declaration:mF,inputs:[],outputs:[],successCalls:[Cv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[yF],internalCalls:[],writesValues:[Cv],readsValue:hF,x:0,y:0,parent:fF},TF={type:n.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:n.FunctionCall,entityId:$c},EF={type:n.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:n.OutputMap,entityId:Av},bF={type:n.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},wv={id:ma,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[Bv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[TF],internalCalls:[],writesValues:[Bv],readsValue:EF,x:0,y:0,parent:bF},_v={type:n.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:n.FunctionCall,entityId:$c},RF={id:"map-company-dto-function-call-company-input-map-id",type:n.InputMap,version:1,declaration:Vc.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:_v},gF={id:Av,type:n.OutputMap,version:1,declaration:Bc.outputs[0],writesValues:[wv],index:0,parent:_v},vF={id:"map-company-dto-function-call-called-by-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},IF={id:"map-company-dto-function-call-parent-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},DF={id:$c,type:n.FunctionCall,version:1,declaration:Vc,successCalls:[wv],process:null,errorCalls:[],inputs:[RF],outputs:[gF],calledByError:[],calledByEntry:[vF],calledBySuccess:[],parent:IF,x:0,y:0,error:null},PF={type:n.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:CR},AF={type:n.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:n.DataType,entityId:"last-timestamp-variable-datatype-id"},OF={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:hn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:PF,defaultValue:{id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,name:P.Date,value:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:AF,valueAsType:null}},SF={type:n.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:n.Project,entityId:Y},Uc={id:CR,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:OF,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:SF},CF={type:n.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:Pv},BF={type:n.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:n.Operation,entityId:Gc},wF={id:Pv,type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:P.Number,parent:CF},index:0,parent:BF},_F={type:n.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},NF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:fa},MF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:ha},Nv={id:Gc,type:n.Operation,version:1,declaration:Wt,inputs:[wF],outputs:[],process:null,successCalls:[Sv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[NF,MF],calledBySuccess:[],error:null,parent:_F},VF={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"},LF={type:n.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:n.Operation,entityId:"wait-for-random-amount-id"},GF={id:"wait-for-random-amount-input-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:n.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:We.Random,rangeStart:1e3,rangeEnd:4e3},name:P.Number,parent:VF},index:0,parent:LF},$F={type:n.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:n.Project,entityId:Y},di={id:"wait-for-random-amount-id",type:n.Operation,version:1,declaration:Wt,inputs:[GF],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:$F},Mv="list-of-functions-variable-id",FF={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"},UF={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:FF},xF={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"},jF={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:xF},kF={type:n.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Mv},qF={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:[UF],error:null,outputs:[jF],parent:null},JF={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"},WF={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qF,asType:!1,isList:!0,isNullable:!1,defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.ActionDescriptor,value:null,valueAsType:[di,di,di,di,di],autogeneration:null,parent:JF},constant:!1,parent:kF},YF={type:n.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft};n.GenericReference,n.InputMap;const HF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:n.InputMap,entityId:Dv},zF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:n.InputMap,entityId:Lc},Vv={id:Mv,type:n.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:WF,parent:YF,readsValue:null,writesValues:[HF,zF],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},ZF={type:n.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:n.Operation,entityId:ha},KF={type:n.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},XF={type:n.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-in-parallel-return-map-id"},QF={type:n.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:n.Operation,entityId:ha},Lv={id:"exec-in-parallel-result-variable-id",type:n.VariableInstance,version:1,declaration:Uc,readsValue:XF,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[QF],successCalls:[],errorCalls:[],internalCalls:[],parent:KF,x:0,y:0},eU={id:"exec-in-parallel-return-map-id",type:n.OutputMap,version:1,declaration:Tl,writesValues:[Lv],index:0,parent:ZF},tU={type:n.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:n.Operation,entityId:ha},nU={id:Lc,type:n.InputMap,version:1,declaration:ml,name:null,description:null,readsValue:Vv,defaultValue:null,index:0,parent:tU},rU={type:n.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},iU={type:n.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},aU={process:null,id:ha,type:n.Operation,version:1,declaration:Wt,inputs:[nU],outputs:[eU],successCalls:[Nv,Lv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[iU],calledBySuccess:[],error:null,parent:rU},sU={type:n.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:n.Operation,entityId:fa},oU={type:n.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},lU={type:n.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-sequentially-return-map-id"},cU={type:n.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:n.Operation,entityId:fa},Gv={id:"exec-sequentially-result-variable-id",type:n.VariableInstance,version:1,declaration:Uc,readsValue:lU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[cU],successCalls:[],errorCalls:[],internalCalls:[],parent:oU,x:0,y:0},dU={id:"exec-sequentially-return-map-id",type:n.OutputMap,version:1,declaration:bl,writesValues:[Gv],index:0,parent:sU},uU={type:n.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:n.Operation,entityId:fa},pU={id:Dv,type:n.InputMap,version:1,declaration:El,name:null,description:null,readsValue:Vv,defaultValue:null,index:0,parent:uU},yU={type:n.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},hU={type:n.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},fU={id:fa,type:n.Operation,version:1,declaration:mn,inputs:[pU],process:null,outputs:[dU],successCalls:[Nv,Gv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[hU],calledBySuccess:[],error:null,parent:yU},mU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:Y},TU={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:[fU,aU,DF],returnStatements:[Sv],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:mU},EU={type:n.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:n.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},bU={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EU},RU={type:n.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:n.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},gU={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:bU,readsValue:null,required:!0,index:0,parent:RU},vU={type:n.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},IU={type:n.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},$v={type:n.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[gU],calledByError:[],calledByEntry:[IU],calledBySuccess:[],throws:null,x:0,y:0,parent:vU},DU={type:n.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:n.Project,entityId:Y},PU={type:n.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[$v],index:null,implements:null,returnStatements:[$v],collapsed:!1,private:!1,x:0,y:0,parent:DU},xc="get-current-date-and-time-func-decl-id",Fv="get-current-date-and-time-return-statement-id",Uv="get-current-date-and-time-return-declaration-id",xv="get-current-date-and-time-return-declaration-data-type-id",AU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:n.DataType,entityId:xv},OU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Uv},SU={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:xv,version:1,entity:hn,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,defaultValue:{id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.Date,valueAsType:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:AU},constant:!1,parent:OU},CU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:n.ReturnStatement,entityId:Fv};n.ReturnDeclaration;const BU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:xc},wU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:xc};n.ReturnStatement;const _U={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:Y},NU={type:n.FunctionDeclaration,id:xc,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:_U},jv="do-math-return-statement-id",kv="do-math-return-declaration-id",MU={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"},VU={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:MU},LU={type:n.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},GU={type:n.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:n.ReturnDeclaration,entityId:kv},$U={type:n.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:VU,readsValue:null,writesValues:[GU],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:LU},FU={type:n.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:n.ReturnStatement,entityId:jv},UU={type:n.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:n.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},xU={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:UU},jU={isError:!1,id:kv,version:1,type:n.ReturnDeclaration,name:"Result",description:null,implements:null,dataType:xU,readsValue:$U,required:!0,index:0,parent:FU},kU={type:n.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},qU={type:n.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},qv={type:n.ReturnStatement,id:jv,version:1,outputs:[jU],calledByError:[],calledByEntry:[],calledBySuccess:[kU],parent:qU,throws:null,x:0,y:0},JU={type:n.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:n.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},WU={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:JU},YU={type:n.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},HU={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"},Jv={type:n.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:WU,description:null,readsValue:zU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[HU],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:YU},ZU={type:n.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},KU={type:n.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},XU={type:n.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:n.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},QU={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:XU},e4={type:n.GenericReference,id:"do-math-func-return-two-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Wv={type:n.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[e4],successCalls:[],errorCalls:[],dataType:QU,readsValue:KU,writesValues:[],internalCalls:[],parent:ZU,x:0,y:0},Yv={type:n.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},t4={type:n.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},n4={type:n.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},r4={type:n.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:n.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},Hv={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:n.InputMap,declaration:rl,name:null,description:null,readsValue:r4,defaultValue:null,index:0,parent:n4},i4={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:n.OutputMap,version:1,declaration:sl,writesValues:[Jv,Wv],index:0,parent:t4},a4={type:n.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},s4={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:n.GenericReference,entityType:n.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},zv={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:n.InputMap,declaration:il,name:null,description:null,readsValue:s4,defaultValue:null,index:1,parent:a4},o4={type:n.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Ya,version:1,inputs:[Hv,zv],outputs:[i4],calledByError:[],calledByEntry:[Yv],calledBySuccess:[],process:null,successCalls:[qv,Jv,Wv],errorCalls:[],parent:Yv,error:null,x:0,y:0},l4={type:n.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:n.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},c4={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:n.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:n.ArgumentDeclaration},Zv={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:{id:"do-math-func-argument-two-default-value-id",type:n.PrimitiveValue,version:1,value:1,name:P.Number,parent:l4,valueAsType:null,autogeneration:null},constant:!1,parent:c4},d4={type:n.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:n.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},u4={type:n.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},p4={type:n.GenericReference,id:"do-math-func-var-called-by-ref",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Kv={type:n.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:Zv,inputs:[],outputs:[],calledByError:[],calledByEntry:[p4],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:d4,writesValues:[zv],internalCalls:[],x:0,y:0,parent:u4},y4={entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:n.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},h4={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:n.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:Zv,implements:null,writesValues:[Kv],required:!0,index:1,parent:y4},f4={type:n.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:n.Project,entityId:Y},m4={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},T4={type:n.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:n.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},E4={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:n.ArgumentDeclaration},b4={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:{id:"do-math-func-argument-one-default-value-id",type:n.PrimitiveValue,version:1,value:5,name:P.Number,parent:T4,valueAsType:null,autogeneration:null},constant:!1,parent:E4},R4={id:"d8895765-f705-457e-85fa-25d130926769",type:n.ArgumentDeclaration,version:1,name:"N",dataType:b4,description:"The number to add",implements:null,writesValues:[Hv],required:!0,index:0,parent:m4},g4={type:n.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[R4,h4],calls:[o4,Kv],implements:null,index:null,collapsed:!1,returnStatements:[qv],private:!1,x:0,y:0,parent:f4},mt="replace-bank-account-in-company-func-declaration-id",jc="company-entity-to-modify-arg-declaration-id",kc="account-number-to-create-arg-decl-id",ui="company-main-variable-id",pi="search-person-by-id-id",Xv="new-bank-account-owner-arg-decl-id",Qv="search-person-by-id-output-declaration-id",qc="search-person-by-id-output-entity-map-id",Ta="person-not-empty-condition-id",Xs="create-new-bank-account-instance-operation-id",eI="create-new-bank-account-instance-operation-output-entity-map-id",tI="company-bank-account-output-map-id",Jc="old-bank-account-var-declaration-id",nI="old-bank-account-var-instance-id",rI="company-variable-instance-id",Wc="delete-bank-account-internal-call-id",Ea="new-bank-account-data-variable-declaration-id",v4={type:n.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},I4={type:n.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:n.InternalCall,entityId:Wc},D4={type:n.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ui},P4={type:n.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:rI},A4={type:n.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:eI},iI={type:n.InputMap,id:"bank-account-input-map-id",version:1,readsValue:A4,declaration:bc,name:null,description:null,index:0,defaultValue:null,parent:P4},O4={type:n.VariableInstance,id:rI,version:1,declaration:D4,inputs:[iI],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[I4],successCalls:[],errorCalls:[],internalCalls:[],parent:v4,readsValue:null,writesValues:[],x:0,y:0},S4={type:n.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},C4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,defaultValue:null,parent:S4},B4={type:n.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:tI},w4={type:n.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},_4={type:n.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:ui},N4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:n.Operation,entityId:Xs};n.GenericReference,n.VariableInstance;const M4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Jc},V4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:n.VariableDeclaration,entityId:Jc},L4={type:n.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:n.FunctionDeclaration,entityId:mt},G4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:n.InternalCall,entityId:Wc},$4={type:n.VariableInstance,id:nI,version:1,declaration:V4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[G4],errorCalls:[],parent:L4,readsValue:null,writesValues:[],x:0,y:0},aI={process:null,type:n.InternalCall,id:Wc,version:1,declaration:ql,index:0,successCalls:[O4],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[N4,M4],parent:$4},sI={type:n.VariableDeclaration,id:Jc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:C4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[_4],successCalls:[aI],internalCalls:[],errorCalls:[],parent:w4,readsValue:B4,writesValues:[],x:0,y:0},F4={type:n.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},U4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,constant:!1,defaultValue:null,parent:F4},x4={type:n.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:jc},j4={type:n.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},k4={type:n.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},q4={type:n.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},J4={id:tI,version:1,type:n.OutputMap,declaration:bc,index:0,parent:q4,writesValues:[sI]},oI={type:n.VariableDeclaration,id:ui,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:U4,inputs:[],outputs:[J4],calledByError:[],calledByEntry:[k4],calledBySuccess:[],successCalls:[sI],errorCalls:[],parent:j4,internalCalls:[],readsValue:x4,writesValues:[],x:0,y:0},W4={type:n.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ea},Y4={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.OutputMap,entityId:qc},lI={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account owner",description:null,readsValue:Y4,index:1,defaultValue:null,parent:W4},H4={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:kc},z4={type:n.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ea},cI={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account number",description:null,readsValue:H4,defaultValue:null,index:0,parent:z4},dI={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:n.Operation,entityId:Xs},Z4={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:n.InputMap,declaration:nr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:n.PrimitiveValue,name:P.EntityTemplate,value:null,valueAsType:oi,autogeneration:null},parent:dI},K4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ea},uI={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:n.InputMap,declaration:nr.inputs[1],name:null,description:null,index:1,readsValue:K4,defaultValue:null,parent:dI},X4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:n.Operation,entityId:Xs},Q4={id:eI,version:1,type:n.OutputMap,declaration:nr.outputs[0],index:0,writesValues:[iI],parent:X4},ex={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:Ta},tx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ea},nx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},pI={process:null,id:Xs,type:n.Operation,version:1,declaration:nr,inputs:[Z4,uI],error:null,outputs:[Q4],successCalls:[aI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[tx,ex],parent:nx,x:0,y:0},rx={type:n.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},ix={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:Ta},ax={id:Ea,type:n.VariableDeclaration,version:1,inputs:[cI,lI],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[uI],successCalls:[pI],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[ix],calledByEntry:[],x:0,y:0,parent:rx},sx={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},ox={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,P.String;const lx={id:"person-not-found-thrown-error-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:n.ReturnStatement},cx={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:lx,implements:null,required:!0,index:0,readsValue:null},dx={id:"person-not-found-error-return-statement-called-by-ref-id",type:n.GenericReference,entityId:Ta,entityType:n.Condition},ux={id:"person-not-found-error-return-statement-parent-ref-id",type:n.GenericReference,entityId:mt,entityType:n.FunctionDeclaration},px={id:"person-not-found-error-return-statement-id",type:n.ReturnStatement,version:1,throws:cx,outputs:[],calledBySuccess:[],calledByError:[dx],calledByEntry:[],x:0,y:0,parent:ux},yx={type:n.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:n.Search,entityId:pi},hx={type:n.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},fx={type:n.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:qc},mx={type:n.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:n.Condition,entityId:Ta},yI={id:"person-entity-to-check-map-id",version:1,type:n.InputMap,declaration:cr.inputs[0],name:null,description:null,readsValue:fx,index:0,defaultValue:null,parent:mx},Tx={type:n.Condition,id:Ta,version:1,declaration:cr,inputs:[yI],calledByError:[],calledByEntry:[],calledBySuccess:[yx],successCalls:[ax,pI],errorCalls:[px],x:0,y:0,parent:hx},Ex={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:n.ValueDescriptor,entityId:Qv},bx={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:Ex},Rx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:n.Search,entityId:pi},hI={id:Qv,type:n.ValueDescriptor,version:1,dataType:bx,name:"Found person",description:"The person entity that was found",parent:Rx,required:!0,index:0},gx={type:n.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:n.Search,entityId:pi},vx={type:n.OutputMap,id:qc,version:1,declaration:hI,parent:gx,writesValues:[yI,lI],index:0},Ix={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 Dx={type:n.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:n.Search,entityId:pi},fI={id:"search-person-by-id-input-declaration-id",type:n.ArgumentDeclaration,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",implements:null,index:0,required:!0,parent:Dx,writesValues:[]},Px={type:n.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:n.Search,entityId:pi},Ax={id:"search-person-by-id-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Xv,entityType:n.ArgumentDeclaration},mI={type:n.InputMap,id:"search-person-by-id-input-map",version:1,declaration:fI,name:null,description:null,readsValue:Ax,defaultValue:null,parent:Px,index:0},Ox={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},Sx={type:n.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},Cx={type:n.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},Bx={type:n.Search,id:pi,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:Ox,inputsDeclarations:[fI],inputs:[mI],outputsDeclarations:[hI],outputs:[vx],calledByError:[],calledByEntry:[Cx],calledBySuccess:[],error:null,successCalls:[Tx],errorCalls:[],parent:Sx,x:0,y:0};n.GenericReference,n.DataType;const wx={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:kc,entityType:n.ArgumentDeclaration},_x={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:wx},Nx={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},Mx={id:kc,type:n.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:_x,implements:null,writesValues:[cI],required:!0,index:1,parent:Nx};n.GenericReference,n.DataType;const Vx={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},Lx={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Wa,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:Vx},Gx={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},$x={id:Xv,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:Lx,implements:null,writesValues:[mI],required:!1,index:1,parent:Gx},Fx={type:n.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:n.Project,entityId:Y},Ux={type:n.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:n.FunctionDeclaration,entityId:mt};n.GenericReference,n.DataType;const xx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:jc,entityType:n.ArgumentDeclaration},jx={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:xx},kx={id:jc,type:n.ArgumentDeclaration,version:1,name:"Company",dataType:jx,implements:null,description:"The company to replace the bank account for",writesValues:[oI],required:!0,index:0,parent:Ux},qx={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:[kx,Mx,$x],index:null,implements:null,calls:[Bx,oI],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:Fx},Jx={type:n.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Wx={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:Jx,x:0,y:0},Yx={type:n.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:n.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},Hx={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:[Wx],events:[],implements:Hx,parent:Yx,x:0,y:0},Yc="global-counted-test-loop-id",TI="global-counted-test-loop-body-id",EI="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",Zx={type:n.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:EI,entityType:n.ArgumentDeclaration},Kx={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:Zx},Xx={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:TI,entityType:n.FunctionDeclaration},Qx={id:EI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Kx,implements:Bl,required:!0,index:0,writesValues:[],parent:Xx},ej={id:"global-counted-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Yc,entityType:n.Loop},tj={id:TI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Qx],calls:[],implements:wl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:ej},yi="random-company-employee-test-variable-id",Hc="manager-global-variable-id",bI="global-user-instance-id",Rn="employee-mapped-dto-variable-id",qn="employee-mapped-dto-variable-instance-id",RI="random-employee-id-output-map-id",gI="random-employee-birth-date-output-map-id",vI="random-employee-department-output-map-id",II="random-employee-manager-output-map-id",DI="manager-global-id-output-map-id",PI="global-user-instance-id-output-map-id",nj="employee-mapped-dto-requester-id-input-map-id",AI="employee-mapped-dto-now-timestamp-input-map-id",rj="employee-mapped-dto-id-input-map-id",ij="employee-mapped-dto-birth-date-input-map-id",aj="employee-mapped-dto-department-input-map-id",sj="employee-mapped-dto-manager-input-map-id",oj={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:n.GenericReference,entityId:Yc,entityType:n.Loop};n.GenericReference,n.VariableDeclaration;const lj={id:"global-counted-test-loop-iteration-number-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:os.inputs[0],defaultValue:null,readsValue:null,index:0,parent:oj},cj={id:"global-counted-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},dj={id:"global-counted-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},uj={id:Yc,type:n.Loop,version:1,declaration:os,inputs:[lj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:tj,calledByError:[],calledByEntry:[],calledBySuccess:[dj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:cj},zc="global-object-keys-test-loop-id",OI="global-object-keys-test-loop-body-id",SI="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",pj={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},yj={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:pj},hj={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:OI,entityType:n.FunctionDeclaration},fj={id:SI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:yj,implements:Sl,required:!0,index:0,writesValues:[],parent:hj},mj={id:"global-object-keys-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},Tj={id:OI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[fj],calls:[],implements:Gi,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:mj},Ej={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},bj={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Rn,entityType:n.VariableDeclaration},CI={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:Gi.inputs[0],defaultValue:null,readsValue:bj,index:0,parent:Ej},Rj={id:"global-object-keys-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},gj={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},vj={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:n.GenericReference,entityId:Rn,entityType:n.VariableDeclaration},Zc={id:zc,type:n.Loop,version:1,declaration:Gi,inputs:[CI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Tj,calledByError:[],calledByEntry:[],calledBySuccess:[vj,gj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Rj},Kc="global-object-values-test-loop-id",BI="global-object-values-test-loop-body-id",wI="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",Ij={type:n.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:wI,entityType:n.ArgumentDeclaration},Dj={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:Ij},Pj={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:BI,entityType:n.FunctionDeclaration},Aj={id:wI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Dj,implements:Cl,required:!0,index:0,writesValues:[],parent:Pj},Oj={id:"global-object-values-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Sj={id:BI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Aj],calls:[],implements:$i,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Oj},Cj={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Bj={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},_I={id:"global-object-values-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:$i.inputs[0],defaultValue:null,readsValue:Bj,index:0,parent:Cj},wj={id:"global-object-values-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},_j={id:"global-object-values-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},NI={id:Kc,type:n.Loop,version:1,declaration:$i,inputs:[_I],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Sj,calledByError:[],calledByEntry:[],calledBySuccess:[_j],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:wj},Xc="global-test-iterate-over-string-loop-id",Qc="global-test-iterate-over-string-loop-body-id",Qs="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",MI="global-test-iterate-over-string-loop-iteration-list-input-map-id",Nj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:Qs,entityType:n.ArgumentDeclaration},Mj={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:Nj},Vj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.FunctionDeclaration},Lj={id:Qs,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Mj,implements:Pl,required:!0,index:1,writesValues:[],parent:Vj},Gj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:Qs,entityType:n.ArgumentDeclaration},$j={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:Gj},Fj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.FunctionDeclaration},Uj={id:Qs,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:$j,implements:Al,required:!0,index:0,writesValues:[],parent:Fj},xj={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:n.GenericReference,entityId:Xc,entityType:n.Loop},jj={id:Qc,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Uj,Lj],calls:[],implements:Ol,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:xj},kj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:Xc,entityType:n.Loop},qj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:n.GenericReference,entityId:MI,entityType:n.InputMap},Jj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:n.PrimitiveValue,name:P.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:We.Random,rangeStart:4,rangeEnd:5},parent:qj},Wj={id:MI,type:n.InputMap,version:1,name:null,description:null,declaration:ss.inputs[0],defaultValue:Jj,readsValue:null,index:0,parent:kj},Yj={id:"global-test-iterate-over-string-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},Hj={id:Xc,type:n.Loop,version:1,declaration:ss,inputs:[Wj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:jj,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Yj},ed="iterate-over-list-loop-id",VI="iterate-over-list-loop-body-id",LI="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:LI,entityType:n.ArgumentDeclaration},Zj={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},Kj={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:VI,entityType:n.FunctionDeclaration},Xj={id:LI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Zj,implements:is,required:!0,index:0,writesValues:[],parent:Kj},Qj={id:"iterate-over-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},e8={id:VI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Xj],calls:[],implements:as,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Qj},t8={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},n8={id:"iterate-over-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ir.inputs[0],defaultValue:null,readsValue:null,index:0,parent:t8},r8={id:"iterate-over-list-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},i8={id:ed,type:n.Loop,version:1,declaration:ir,inputs:[n8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:e8,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:r8};var td=(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))(td||{}),GI=(r=>(r.COUNT="count",r.SUM="sum",r.AVG="avg",r.MIN="min",r.MAX="max",r))(GI||{});const a8={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:GI.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:td.NEQ,value:null}]},where:[{name:"employee_count",operation:td.GT,value:1}]},s8={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},o8={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},$I={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:o8},l8={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},c8={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:n.OutputMap,version:1,declaration:$I,writesValues:[],index:0,parent:l8},d8={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:[$I],inputs:[],outputs:[c8],query:a8,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:s8},u8={type:n.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:DI},p8={type:n.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},FI={id:sj,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:u8,parent:p8},y8={type:n.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:vI},h8={type:n.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},UI={id:aj,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:y8,parent:h8},f8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:gI},m8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},xI={id:ij,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:f8,parent:m8},T8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:RI},E8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},jI={id:rj,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:T8,parent:E8},b8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:PI},R8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},kI={id:nj,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:b8,parent:R8},g8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Hc},v8={id:DI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[FI],parent:g8},I8={type:n.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Hc},D8={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:I8,defaultValue:null},P8={type:n.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:II},A8={type:n.GenericReference,id:"manager-variable-parent-ref-id",entityType:n.Project,entityId:Y},qI={id:Hc,type:n.VariableDeclaration,version:1,name:"Manager",dataType:D8,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:P8,writesValues:[],inputs:[],outputs:[v8],internalCalls:[],parent:A8,x:0,y:0},O8={type:n.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},S8={id:II,type:n.OutputMap,version:1,declaration:Lt.properties[2],index:3,writesValues:[qI],parent:O8},C8={type:n.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},B8={id:vI,type:n.OutputMap,version:1,declaration:Lt.properties[0],index:2,writesValues:[UI],parent:C8},w8={type:n.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},_8={id:gI,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[xI],parent:w8},N8={type:n.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},M8={id:RI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[jI],parent:N8},V8={type:n.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},L8={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:V8,defaultValue:null},G8={type:n.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:n.Project,entityId:Y},$8={id:yi,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:L8,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[M8,_8,B8,S8],internalCalls:[],parent:G8,x:0,y:0},F8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:AI},U8={type:n.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:P.Date,version:1,valueAsType:null,value:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:F8},x8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:qn},j8={id:AI,type:n.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:U8,index:5,readsValue:null,parent:x8},k8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:n.VariableDeclaration,entityId:Rn},q8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:qn},J8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:n.Project,entityId:Y},W8={id:qn,type:n.VariableInstance,version:1,declaration:k8,calledByError:[],calledByEntry:[],calledBySuccess:[q8],successCalls:[Zc,NI],errorCalls:[],readsValue:null,writesValues:[_I],inputs:[j8],outputs:[],internalCalls:[],parent:J8,x:0,y:0},Y8={type:n.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:n.Project,entityId:Y},H8={id:Rn,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:[Zc,W8],errorCalls:[],readsValue:null,writesValues:[CI],inputs:[kI,jI,xI,UI,FI],outputs:[],internalCalls:[],parent:Y8,x:0,y:0},z8={type:n.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:n.VariableDeclaration,entityId:yc},Z8={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:fc,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:z8,defaultValue:null},K8={type:n.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:n.Project,entityId:Y},JI={id:yc,type:n.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:Z8,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:K8},X8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableInstance,entityId:bI},Q8={id:PI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[kI],parent:X8},e9={type:n.GenericReference,id:"global-user-instance-parent-ref-id",entityType:n.Project,entityId:Y},t9={id:bI,type:n.VariableInstance,version:1,declaration:JI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[Q8],internalCalls:[],parent:e9,x:0,y:0},n9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:yc},r9={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"},i9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:_n,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:n9,defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:P.Boolean,version:1,value:null,type:n.PrimitiveValue,autogeneration:{type:We.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:r9}},a9={type:n.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:n.Project,entityId:Y},WI={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:i9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:a9},s9={type:n.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:n.Project,entityId:Y},o9={id:"is-test-environment-variable-instance-id",type:n.VariableInstance,version:1,declaration:WI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:s9,x:0,y:0},YI={type:n.Project,id:Y,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:[hc,fc,ht,ZV,Lt,ks,YR,HR,oi,qM,Gt,FV,BR,MC,jM],functions:[TU,Rg,Mc,PU,NU,Lg,Vc,Rc,qx,rg,g4],events:[C1],variableDeclarations:[WI,JI,Uc,$8,qI,H8],variableInstances:[o9,t9],conditions:[],operations:[di],functionCalls:[O0,VL],loops:[i8,Zc,NI,Hj,uj],searches:[d8]};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.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){d(this,"id");d(this,"message");d(this,"issue");d(this,"severity");d(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 Tr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Tr{constructor(e){d(this,"id");d(this,"message");d(this,"issue");d(this,"severity");d(this,"code");d(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 Tr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function l9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function H(r){const e=r.entity.errors.find(i=>i.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Tr(r)}}function c9(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 ba=u.union([u.string(),u.number(),u.boolean(),u.date()]),HI=u.enum([We.CurrentDateAndTime,We.Random,We.Unique]),eo=u.object({type:HI,rangeStart:ba.nullable(),rangeEnd:ba.nullable()}),Ra=eo.extend({type:u.literal(We.Random),rangeStart:ba,rangeEnd:ba}),nd=eo.extend({type:u.literal(We.Unique),rangeStart:u.null(),rangeEnd:u.null()}),zI=eo.extend({type:u.literal(We.CurrentDateAndTime),rangeStart:u.null(),rangeEnd:u.null()}),to=Ra.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),ZI=to.extend({rangeStart:u.number(),rangeEnd:u.null()}),KI=to.extend({rangeStart:u.null(),rangeEnd:u.number()}),XI=to.extend({rangeStart:u.number(),rangeEnd:u.number()}),no=Ra.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),QI=no.extend({rangeStart:u.number(),rangeEnd:u.null()}),eD=no.extend({rangeStart:u.null(),rangeEnd:u.number()}),tD=no.extend({rangeStart:u.number(),rangeEnd:u.number()}),ro=Ra.extend({rangeStart:u.date().nullable(),rangeEnd:u.date().nullable()}),nD=ro.extend({rangeStart:u.date(),rangeEnd:u.null()}),rD=ro.extend({rangeStart:u.null(),rangeEnd:u.date()}),iD=ro.extend({rangeStart:u.date(),rangeEnd:u.date()}),rd=Ra.extend({rangeStart:u.null(),rangeEnd:u.null()}),id=u.union([QI,eD,tD]),ad=u.union([ZI,KI,XI]),sd=u.union([nD,rD,iD,zI]),od=u.union([id,ad,sd,nd,rd]);function ga(){return u.union([u.object({type:u.literal(n.ValueDescriptor)}),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.ValueDescriptor)})}function ld(){return u.object({id:u.string(),type:u.literal(n.ValueDescriptor),name:u.string(),required:u.boolean()})}function d9(){return ld().merge(u.object({version:u.number(),index:u.number()}))}function u9(){return ld().merge(u.object({}))}function p9(){return u.object({dataType:gr(),parent:br()})}function y9(){return d9().merge(p9())}function io(){return u.union([u.object({type:u.literal(n.PrimitiveEntity)}),u.record(u.string(),u.any())])}function ao(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.PrimitiveEntity)})}function so(){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 h9(){return so().merge(u.object({version:u.number()}))}function f9(){return so().merge(u.object({}))}function m9(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([io(),hi()]))})}function T9(){return h9().merge(m9())}function Er(){return u.union([u.object({type:u.literal(n.Property)}),u.record(u.string(),u.any())])}function sD(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Property)})}function cd(){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 E9(){return cd().merge(u.object({version:u.number(),index:u.number()}))}function b9(){return cd().merge(u.object({}))}function R9(){return u.object({dataType:gr(),implements:Er().nullable(),parent:u.union([Dr(),ao(),oo()])})}function g9(){return E9().merge(R9())}function v9(){return u.enum([V.CRON_JOB,V.EXECUTION,V.HTTP_ENDPOINT,V.PERSISTED_ENTITY,V.RELATIONAL_DATABASE])}function hi(){return u.union([u.object({type:u.literal(n.BuiltInBaseEntity)}),u.record(u.string(),u.any())])}function oo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BuiltInBaseEntity)})}function dd(){return u.object({id:u.string(),version:u.number(),type:u.literal(n.BuiltInBaseEntity),name:v9(),description:u.string().nullable(),abstract:u.boolean(),static:u.boolean()})}function I9(){return dd()}function D9(){return dd().merge(u.object({}))}function P9(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([hi(),io()]))})}function A9(){return I9().merge(P9())}function on(){return u.union([u.object({type:u.literal(n.ActionDescriptor)}),u.record(u.string(),u.any())])}function br(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ActionDescriptor)})}function lo(){return u.object({id:u.string(),type:u.literal(n.ActionDescriptor),name:u.string(),description:u.string().nullable()})}function O9(){return lo().merge(u.object({version:u.number()}))}function S9(){return lo().merge(u.object({}))}function C9(){return u.object({inputs:u.array(ga()),outputs:u.array(ga()),parent:u.union([Dt(),Dr(),oo(),ao()]).nullable()})}function oD(){return O9().merge(C9())}function fi(){return u.union([u.object({type:u.literal(n.Loop)}),u.record(u.string(),u.any())])}function ln(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Loop)})}function lD(){return u.object({id:u.string(),type:u.literal(n.Loop)})}function B9(){return lD().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function w9(){return lD().merge(u.object({declaration:u.union([u.string(),Bt()])}))}function _9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),declaration:on(),inputs:u.array(Zt()),outputs:u.array(Tt()),outputsDeclarations:u.array(ga()),successCalls:u.array(ze()),errorCalls:u.array(ze()),error:Tt(),body:Bt(),parent:u.union([Dn(),Dt()]),breakStatements:u.array(bi()),continueStatements:u.array(mi())})}function N9(){return B9().merge(_9())}function mi(){return u.union([u.object({type:u.literal(n.ContinueStatement)}),u.record(u.string(),u.any())])}function Ti(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ContinueStatement)})}function ud(){return u.object({id:u.string(),type:u.literal(n.ContinueStatement)})}function M9(){return ud().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function V9(){return ud().merge(u.object({}))}function L9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:ln()})}function G9(){return M9().merge(L9())}function Rr(){return u.union([u.object({type:u.literal(n.ReturnStatement)}),u.record(u.string(),u.any())])}function Ei(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnStatement)})}function pd(){return u.object({id:u.string(),type:u.literal(n.ReturnStatement)})}function $9(){return pd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function F9(){return pd().merge(u.object({}))}function U9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:Dn()})}function x9(){return $9().merge(U9())}function gn(){return u.union([u.object({type:u.literal(n.ReturnDeclaration)}),u.record(u.string(),u.any())])}function cD(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnDeclaration)})}function yd(){return u.object({id:u.string(),type:u.literal(n.ReturnDeclaration),name:u.string(),description:u.string().nullable(),isError:u.boolean()})}function j9(){return yd().merge(u.object({version:u.number(),index:u.number()}))}function k9(){return yd().merge(u.object({}))}function q9(){return u.object({dataType:gr().nullable(),readsValue:Oa().nullable(),parent:u.union([Ei(),br(),vn(),Ti()])})}function J9(){return j9().merge(q9())}function bi(){return u.union([u.object({type:u.literal(n.BreakStatement)}),u.record(u.string(),u.any())])}function vn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BreakStatement)})}function hd(){return u.object({id:u.string(),type:u.literal(n.BreakStatement)})}function W9(){return hd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function Y9(){return hd().merge(u.object({}))}function H9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:ln()})}function z9(){return W9().merge(H9())}function Tt(){return u.union([u.object({type:u.literal(n.OutputMap)}),u.record(u.string(),u.any())])}function fd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.OutputMap)})}function md(){return u.object({id:u.string(),type:u.literal(n.OutputMap)})}function Z9(){return md().merge(u.object({version:u.number(),index:u.number()}))}function K9(){return md().merge(u.object({}))}function X9(){return u.object({writesValues:u.array(In()),declaration:u.union([gn(),Er()]),parent:u.union([Ee(),ln(),vn()])})}function Q9(){return Z9().merge(X9())}function Ri(){return u.union([u.object({type:u.literal(n.FunctionCall)}),u.record(u.string(),u.any())])}function va(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionCall)})}function Td(){return u.object({id:u.string(),type:u.literal(n.FunctionCall)})}function e6(){return Td().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function t6(){return Td().merge(u.object({}))}function n6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:Bt(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.optional(Tt()),parent:u.union([Dn(),Dt()])})}function r6(){return e6().merge(n6())}function i6(){return u.enum([$e.Equal,$e.NotEqual,$e.MoreThan,$e.MoreThanOrEqual,$e.LessThan,$e.LessThanOrEqual,$e.And,$e.Or,Mt.Empty,Mt.NotEmpty])}function Ia(){return u.union([u.object({type:u.literal(n.Condition)}),u.record(u.string(),u.any())])}function co(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Condition)})}function Ed(){return u.object({id:u.string(),type:u.literal(n.Condition)})}function a6(){return Ed().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function s6(){return Ed().merge(u.object({}))}function o6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),leftValue:Zt(),rightValue:Zt().nullable(),operator:i6(),parent:u.union([Dn(),Dt()])})}function l6(){return a6().merge(o6())}function Da(){return u.union([u.object({type:u.literal(n.Search)}),u.record(u.string(),u.any())])}function Pa(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Search)})}function bd(){return u.object({id:u.string(),type:u.literal(n.Search),name:u.string(),query:u.any(),description:u.string().nullable()})}function c6(){return bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function d6(){return bd().merge(u.object({}))}function u6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),inputsDeclarations:u.array(Ir()),inputs:u.array(Zt()),outputsDeclarations:u.array(ga()),outputs:u.array(Tt()),parent:u.union([Dn(),Dt()]),error:Tt().nullable()})}function p6(){return c6().merge(u6())}function Aa(){return u.union([u.object({type:u.literal(n.InternalCall)}),u.record(u.string(),u.any())])}function Rd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InternalCall)})}function gd(){return u.object({id:u.string(),type:u.literal(n.InternalCall),index:u.number()})}function y6(){return gd().merge(u.object({version:u.number(),index:u.number()}))}function h6(){return gd().merge(u.object({declaration:u.union([u.string(),Bt()])}))}function f6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:Bt(),inputs:u.array(Zt()),outputs:u.array(Tt()),parent:Jn(),error:u.optional(Tt())})}function m6(){return y6().merge(f6())}function Zt(){return u.union([u.object({type:u.literal(n.InputMap)}),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.InputMap)})}function vd(){return u.object({id:u.string(),type:u.literal(n.InputMap),name:u.string().nullable().optional(),description:u.string().nullable().optional()})}function T6(){return vd().merge(u.object({version:u.number(),index:u.number()}))}function E6(){return vd().merge(u.object({}))}function b6(){return u.object({defaultValue:Id().nullable(),declaration:u.union([Ir(),Er()]).nullable(),readsValue:Oa().nullable(),parent:u.union([Ee(),uo(),ln(),vn()])})}function R6(){return T6().merge(b6())}function gi(){return u.union([u.object({type:u.literal(n.Operation)}),u.record(u.string(),u.any())])}function vi(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Operation)})}function po(){return u.object({id:u.string(),type:u.literal(n.Operation)})}function g6(){return po().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function v6(){return po().merge(u.object({}))}function I6(){return po().merge(u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:on(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.array(Tt()),parent:u.union([Dn(),Dt()])}))}function D6(){return g6().merge(I6())}function yo(){return u.union([u.string(),u.number(),u.boolean(),u.null(),u.date()])}function dD(){return u.record(u.string(),yo())}function P6(){return u.array(u.union([yo(),dD()]))}function uD(){return u.union([yo(),dD(),P6()])}function pD(){return u.union([yo(),uD()])}function yD(){return u.enum([P.String,P.Number,P.Boolean,P.Null,P.Date,P.JSON,P.Enum,P.File,P.UUID,P.EntityTemplate,P.ActionDescriptor])}function A6(){return u.union([Dr(),vi(),Sa()])}function O6(){return u.object({id:u.string(),name:yD(),type:u.literal(n.PrimitiveValue),value:pD(),autogeneration:od.nullable()})}function S6(){return O6().merge(u.object({}))}function Kt(){return u.object({id:u.string(),version:u.number(),name:yD(),type:u.literal(n.PrimitiveValue),value:pD(),valueAsType:A6().nullable(),autogeneration:od.nullable(),parent:u.union([Dd(),uo()])})}function C6(){return Kt().extend({name:u.literal(P.String),value:u.string(),autogeneration:id.nullable()})}function B6(){return Kt().extend({name:u.literal(P.Number),value:u.number(),autogeneration:ad.nullable()})}function w6(){return Kt().extend({name:u.literal(P.Boolean),value:u.boolean(),autogeneration:rd.nullable()})}function _6(){return Kt().extend({name:u.literal(P.Null),value:u.null(),autogeneration:u.null()})}function N6(){return Kt().extend({name:u.literal(P.Date),value:u.date(),autogeneration:sd.nullable()})}function M6(){return Kt().extend({name:u.literal(P.JSON),value:uD(),autogeneration:u.null()})}function V6(){return Kt().extend({name:u.literal(P.Enum),value:u.string(),autogeneration:u.null()})}function L6(){return Kt().extend({name:u.literal(P.File),value:u.string(),autogeneration:u.null()})}function G6(){return Kt().extend({name:u.literal(P.UUID),value:u.string(),autogeneration:nd.nullable()})}function $6(){return Kt().extend({name:u.literal(P.EntityTemplate),value:Dr(),autogeneration:u.null()})}function F6(){return Kt().extend({name:u.literal(P.ActionDescriptor),value:Sa(),autogeneration:u.null()})}function Id(){return u.union([C6(),B6(),w6(),_6(),N6(),M6(),V6(),L6(),G6(),$6(),F6()])}function gr(){return u.union([u.object({type:u.literal(n.DataType)}),u.record(u.string(),u.any())])}function Dd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.DataType)})}function Pd(){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 U6(){return Pd().merge(u.object({version:u.number()}))}function x6(){return Pd().merge(u.object({}))}function j6(){return u.object({defaultValue:Id().nullable(),entity:u.union([Ii(),hi(),io(),on()]).nullable(),parent:u.union([sD(),mD(),aD()])})}function k6(){return U6().merge(j6())}function Ad(){return u.union([u.object({type:u.literal(n.VariableDeclaration)}),u.record(u.string(),u.any())])}function q6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableDeclaration)})}function Od(){return u.object({id:u.string(),type:u.literal(n.VariableDeclaration),name:u.string(),description:u.string().nullable()})}function J6(){return Od().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function W6(){return Od().merge(u.object({}))}function Y6(){return u.object({dataType:gr().nullable(),readsValue:Oa().nullable(),writesValues:u.array(In()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(ze()),errorCalls:u.array(ze()),internalCalls:u.array(Aa()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),parent:u.union([Dn(),Dt()])})}function H6(){return J6().merge(Y6())}function hD(){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 Sd(){return u.object({id:u.string(),type:u.literal(n.VariableInstance)})}function Z6(){return Sd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function K6(){return Sd().merge(u.object({}))}function X6(){return u.object({declaration:Ad(),dataType:gr().nullable(),readsValue:Oa().nullable(),writesValues:u.array(In()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(ze()),errorCalls:u.array(ze()),internalCalls:u.array(Aa()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),parent:u.union([Dn(),Dt()])})}function Q6(){return Z6().merge(X6())}function Cd(){return u.union([u.object({type:u.literal(n.InstalledProject)}),u.record(u.string(),u.any())])}function ho(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InstalledProject)})}function e3(){return u.object({id:u.string(),type:u.literal(n.InstalledProject)})}function t3(){return u.object({version:u.number(),x:u.number(),y:u.number()})}function n3(){return u.object({})}function r3(){return u.object({implements:Dt(),description:u.string().nullable(),functions:u.array(Bt()),events:u.array(Bd()),parent:Dt()})}function i3(){return t3().merge(r3())}function Bd(){return u.union([u.object({type:u.literal(n.GlobalEvent)}),u.record(u.string(),u.any())])}function a3(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.GlobalEvent)})}function fo(){return u.object({id:u.string(),type:u.literal(n.GlobalEvent),name:u.string(),collapsed:u.boolean()})}function s3(){return fo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function o3(){return fo().merge(u.object({}))}function l3(){return fo().merge(u.object({returnStatements:u.array(Rr()),implements:u.array(oD()),inputs:u.array(Ir()),calls:u.array(ze()),parent:u.union([Dt(),ho()])}))}function c3(){return s3().merge(l3())}function vr(){return u.union([Ad(),hD()])}function Jn(){return u.union([q6(),z6()])}function In(){return u.union([vr(),Zt(),gn()])}function fD(){return u.union([Jn(),uo(),cD()])}function Oa(){return u.union([vr(),Ir(),Tt(),gi(),Aa(),Ri()])}function d3(){return u.union([Jn(),wd(),fd(),vi(),Rd(),va()])}function u3(){return u.union([Ir(),Tt(),In()])}function mD(){return u.union([wd(),fd(),fD()])}function mo(){return Bd()}function To(){return a3()}function Eo(){return u.union([gi(),Ri(),Ia(),Da(),vr(),Aa(),fi()])}function Ee(){return u.union([vi(),va(),co(),Pa(),Jn(),Rd(),ln()])}function bo(){return u.union([gi(),Ri(),Ia(),Da(),vr(),fi()])}function Ro(){return u.union([vi(),va(),co(),Pa(),Jn(),ln()])}function TD(){return u.union([Eo(),Rr(),bi(),mi()])}function ze(){return u.union([Ee(),Ei(),vn(),Ti()])}function ED(){return u.union([bo(),Rr(),bi(),mi()])}function bD(){return u.union([Ro(),Ei(),vn(),Ti()])}function Wn(){return u.union([Bt(),mo()])}function He(){return u.union([Sa(),To()])}function p3(){return u.union([Eo(),Wn()])}function y3(){return u.union([Ee(),He()])}function h3(){return u.union([bo(),Wn()])}function f3(){return u.union([Ro(),He()])}function m3(){return u.union([TD(),Wn()])}function T3(){return u.union([ze(),He()])}function E3(){return u.union([ED(),Wn()])}function b3(){return u.union([bD(),He()])}function R3(){return u.union([Wn(),fi()])}function Dn(){return u.union([He(),ln()])}function g3(){return u.union([Eo(),Wn()])}function v3(){return u.union([Ee(),He()])}function I3(){return u.union([bo(),Wn()])}function D3(){return u.union([Ro(),He()])}function P3(){return u.union([Rr(),bi(),mi()])}function A3(){return u.union([Ei(),vn(),Ti()])}function O3(){return u.union([hi(),F3(),Cd(),Ii(),Bt(),mo(),vr(),Zt(),Tt(),Ia(),gi(),Ri(),gn(),Ir(),io(),gr(),Er(),on(),Rr(),mi(),bi(),fi(),Da(),on(),on(),ga(),Aa()])}function S3(){return u.union([oo(),Dt(),ho(),Dr(),Sa(),To(),Jn(),uo(),fd(),co(),vi(),va(),cD(),wd(),ao(),Dd(),sD(),br(),Ei(),Ti(),vn(),ln(),Pa(),br(),br(),aD(),Rd()])}function C3(){return u.union([Cd(),Ii(),Bt(),mo(),vr(),Ia(),gi(),Ri(),Rr(),mi(),bi(),fi(),Da()])}function B3(){return u.union([ho(),Dr(),Sa(),To(),Jn(),co(),vi(),va(),Ei(),Ti(),vn(),ln(),Pa()])}function Ir(){return u.union([u.object({type:u.literal(n.ArgumentDeclaration)}),u.record(u.string(),u.any())])}function wd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ArgumentDeclaration)})}function _d(){return u.object({id:u.string(),type:u.literal(n.ArgumentDeclaration)})}function w3(){return _d().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function _3(){return _d().merge(u.object({}))}function N3(){return u.object({dataType:gr().nullable(),writesValues:u.array(In()),parent:u.union([He(),br(),br(),Pa(),vn()])})}function M3(){return w3().merge(N3())}function Bt(){return u.union([u.object({type:u.literal(n.FunctionDeclaration)}),u.record(u.string(),u.any())])}function Sa(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionDeclaration)})}function Nd(){return u.object({id:u.string(),type:u.literal(n.FunctionDeclaration),name:u.string(),description:u.string().nullable()})}function V3(){return Nd().merge(u.object({version:u.number(),x:u.number(),y:u.number(),index:u.number().nullable()}))}function L3(){return Nd()}function G3(){return u.object({inputs:u.array(Ir()),implements:on().nullable(),returnStatements:u.array(Rr()),parent:u.union([Dt(),ho(),Dr(),ln(),oo(),ao()])})}function $3(){return V3().merge(G3())}function F3(){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 Md(){return u.object({id:u.string(),type:u.literal(n.Project),name:u.string(),description:u.string().nullable()})}function U3(){return Md().merge(u.object({version:u.number()}))}function x3(){return Md()}function j3(){return u.object({entities:u.array(Ii()),functions:u.array(Bt()),events:u.array(Bd()),projects:u.array(Cd()),variableDeclarations:u.array(Ad()),variableInstances:u.array(hD()),conditions:u.array(Ia()),operations:u.array(gi()),functionCalls:u.array(Ri()),loops:u.array(fi()),searches:u.array(Da())})}function k3(){return U3().merge(j3())}function Ii(){return u.union([u.object({type:u.literal(n.CustomEntity)}),u.record(u.string(),u.any())])}function Dr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.CustomEntity)})}function Vd(){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 q3(){return Vd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function J3(){return Vd().merge(u.object({}))}function W3(){return u.union([Dt(),Dd()])}function Y3(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([Ii(),hi()])),implements:u.array(u.union([Ii(),hi()])),parent:W3()})}function H3(){return q3().merge(Y3())}function z3(r){const e=H3(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>X3(r,h)),s=r.extends.flatMap(h=>Q3(r,h)),o=tk(r),l=ek(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return ie(r.errors,p)}function Z3(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 K3(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 X3(r,e){const t=[];if(!e.abstract){const h=H({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=H({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=H({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=H({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=H({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 Q3(r,e){const t=[],i=[];if(e.abstract){const s=H({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=H({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=H({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 ek(r){const e=[];if(!r.properties.length){const t=H({id:r.id+"--"+M.NoProperties,message:"No properties implemented",issue:null,severity:T.Warning,code:M.NoProperties,entity:r});e.push(t.error)}return r.properties.forEach(t=>{t.validate()}),e}function tk(r){const e=[];if(r.abstract){if(r.methods.length){const t=H({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=H({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=H({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=H({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=H({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=H({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=H({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=H({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 nk(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var rk=class extends Error{constructor(e,t){super(e,t);d(this,"name");d(this,"details");this.name="ZodValidationError",this.details=ik(t)}toString(){return this.message}};function ik(r){if(r){const e=r.cause;if(nk(e))return e.issues}return[]}function ak(r){return r.length!==0}var sk=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function ok(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+'["'+lk(t)+'"]';if(!sk.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function lk(r){return r.replace(/"/g,'\\"')}var ck="; ",dk=99,RD="Validation error",uk=": ",pk=", or ";function yk(r={}){const{issueSeparator:e=ck,unionSeparator:t=pk,prefixSeparator:i=uk,prefix:a=RD,includePath:s=!0,maxIssuesInMessage:o=dk}=r;return l=>{const p=l.slice(0,o).map(y=>go({issue:y,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return hk(p,a,i)}}function go(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=>go({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=>go({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=>go({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&ak(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 "${ok(e.path)}"`}return e.message}function hk(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:RD}function fk(r,e={}){const i=mk(e)([r]);return new rk(i,{cause:new It([r])})}function mk(r){return"messageBuilder"in r?r.messageBuilder:yk(r)}var gD="1.13.7",vD=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},vo=Array.prototype,Ld=Object.prototype,ID=typeof Symbol<"u"?Symbol.prototype:null,Tk=vo.push,Ca=vo.slice,Ba=Ld.toString,Ek=Ld.hasOwnProperty,DD=typeof ArrayBuffer<"u",bk=typeof DataView<"u",Rk=Array.isArray,PD=Object.keys,AD=Object.create,OD=DD&&ArrayBuffer.isView,gk=isNaN,vk=isFinite,SD=!{toString:null}.propertyIsEnumerable("toString"),CD=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Ik=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 Yn(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function Dk(r){return r===null}function BD(r){return r===void 0}function wD(r){return r===!0||r===!1||Ba.call(r)==="[object Boolean]"}function Pk(r){return!!(r&&r.nodeType===1)}function ct(r){var e="[object "+r+"]";return function(t){return Ba.call(t)===e}}const Gd=ct("String"),_D=ct("Number"),Ak=ct("Date"),Ok=ct("RegExp"),Sk=ct("Error"),ND=ct("Symbol"),MD=ct("ArrayBuffer");var VD=ct("Function"),Ck=vD.document&&vD.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof Ck!="function"&&(VD=function(r){return typeof r=="function"||!1});const Et=VD,LD=ct("Object");var GD=bk&&(!/\[native code\]/.test(String(DataView))||LD(new DataView(new ArrayBuffer(8)))),$d=typeof Map<"u"&&LD(new Map),Bk=ct("DataView");function wk(r){return r!=null&&Et(r.getInt8)&&MD(r.buffer)}const Io=GD?wk:Bk,Pr=Rk||ct("Array");function Hn(r,e){return r!=null&&Ek.call(r,e)}var Fd=ct("Arguments");(function(){Fd(arguments)||(Fd=function(r){return Hn(r,"callee")})})();const Ud=Fd;function _k(r){return!ND(r)&&vk(r)&&!isNaN(parseFloat(r))}function $D(r){return _D(r)&&gk(r)}function FD(r){return function(){return r}}function UD(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=Ik}}function xD(r){return function(e){return e==null?void 0:e[r]}}const Do=xD("byteLength"),Nk=UD(Do);var Mk=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Vk(r){return OD?OD(r)&&!Io(r):Nk(r)&&Mk.test(Ba.call(r))}const jD=DD?Vk:FD(!1),At=xD("length");function Lk(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 kD(r,e){e=Lk(e);var t=CD.length,i=r.constructor,a=Et(i)&&i.prototype||Ld,s="constructor";for(Hn(r,s)&&!e.contains(s)&&e.push(s);t--;)s=CD[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function et(r){if(!Yn(r))return[];if(PD)return PD(r);var e=[];for(var t in r)Hn(r,t)&&e.push(t);return SD&&kD(r,e),e}function wa(r){if(r==null)return!0;var e=At(r);return typeof e=="number"&&(Pr(r)||Gd(r)||Ud(r))?e===0:At(et(r))===0}function qD(r,e){var t=et(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=gD,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 JD(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,Do(r))}var WD="[object DataView]";function xd(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:YD(r,e,t,i)}function YD(r,e,t,i){r instanceof se&&(r=r._wrapped),e instanceof se&&(e=e._wrapped);var a=Ba.call(r);if(a!==Ba.call(e))return!1;if(GD&&a=="[object Object]"&&Io(r)){if(!Io(e))return!1;a=WD}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 ID.valueOf.call(r)===ID.valueOf.call(e);case"[object ArrayBuffer]":case WD:return YD(JD(r),JD(e),t,i)}var s=a==="[object Array]";if(!s&&jD(r)){var o=Do(r);if(o!==Do(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(!xd(r[y],e[y],t,i))return!1}else{var h=et(r),m;if(y=h.length,et(e).length!==y)return!1;for(;y--;)if(m=h[y],!(Hn(e,m)&&xd(r[m],e[m],t,i)))return!1}return t.pop(),i.pop(),!0}function Gk(r,e){return xd(r,e)}function _a(r){if(!Yn(r))return[];var e=[];for(var t in r)e.push(t);return SD&&kD(r,e),e}function jd(r){var e=At(r);return function(t){if(t==null)return!1;var i=_a(t);if(At(i))return!1;for(var a=0;a<e;a++)if(!Et(t[r[a]]))return!1;return r!==ZD||!Et(t[kd])}}var kd="forEach",HD="has",qd=["clear","delete"],zD=["get",HD,"set"],$k=qd.concat(kd,zD),ZD=qd.concat(zD),Fk=["add"].concat(qd,kd,HD);const Uk=$d?jd($k):ct("Map"),xk=$d?jd(ZD):ct("WeakMap"),jk=$d?jd(Fk):ct("Set"),kk=ct("WeakSet");function Di(r){for(var e=et(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=r[e[a]];return i}function qk(r){for(var e=et(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],r[e[a]]];return i}function KD(r){for(var e={},t=et(r),i=0,a=t.length;i<a;i++)e[r[t[i]]]=t[i];return e}function Jd(r){var e=[];for(var t in r)Et(r[t])&&e.push(t);return e.sort()}function Wd(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 XD=Wd(_a),Po=Wd(et),QD=Wd(_a,!0);function Jk(){return function(){}}function eP(r){if(!Yn(r))return{};if(AD)return AD(r);var e=Jk();e.prototype=r;var t=new e;return e.prototype=null,t}function Wk(r,e){var t=eP(r);return e&&Po(t,e),t}function Yk(r){return Yn(r)?Pr(r)?r.slice():XD({},r):r}function Hk(r,e){return e(r),r}function tP(r){return Pr(r)?r:[r]}se.toPath=tP;function Na(r){return se.toPath(r)}function Yd(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 nP(r,e,t){var i=Yd(r,Na(e));return BD(i)?t:i}function zk(r,e){e=Na(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!Hn(r,a))return!1;r=r[a]}return!!t}function Hd(r){return r}function Ma(r){return r=Po({},r),function(e){return qD(e,r)}}function zd(r){return r=Na(r),function(e){return Yd(e,r)}}function Va(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 rP(r,e,t){return r==null?Hd:Et(r)?Va(r,e,t):Yn(r)&&!Pr(r)?Ma(r):zd(r)}function Zd(r,e){return rP(r,e,1/0)}se.iteratee=Zd;function Ot(r,e,t){return se.iteratee!==Zd?se.iteratee(r,e):rP(r,e,t)}function Zk(r,e,t){e=Ot(e,t);for(var i=et(r),a=i.length,s={},o=0;o<a;o++){var l=i[o];s[l]=e(r[l],l,r)}return s}function iP(){}function Kk(r){return r==null?iP:function(e){return nP(r,e)}}function Xk(r,e,t){var i=Array(Math.max(0,r));e=Va(e,t,1);for(var a=0;a<r;a++)i[a]=e(a);return i}function Kd(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const La=Date.now||function(){return new Date().getTime()};function aP(r){var e=function(s){return r[s]},t="(?:"+et(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 sP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Qk=aP(sP),e5=KD(sP),t5=aP(e5),n5=se.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Xd=/(.)^/,r5={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},i5=/\\|'|\r|\n|\u2028|\u2029/g;function a5(r){return"\\"+r5[r]}var s5=/^\s*(\w|\$)+\s*$/;function o5(r,e,t){!e&&t&&(e=t),e=QD({},e,se.templateSettings);var i=RegExp([(e.escape||Xd).source,(e.interpolate||Xd).source,(e.evaluate||Xd).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(i,function(y,h,m,R,v){return s+=r.slice(a,v).replace(i5,a5),a=v+y.length,h?s+=`'+
1
+ (function(c,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(c=typeof globalThis<"u"?globalThis:c||self,n(c["@elyx-code/project-logic-tree"]={}))})(this,function(c){"use strict";var z7=Object.defineProperty;var Z7=(c,n,M)=>n in c?z7(c,n,{enumerable:!0,configurable:!0,writable:!0,value:M}):c[n]=M;var d=(c,n,M)=>(Z7(c,typeof n!="symbol"?n+"":n,M),M);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||{}),M=(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))(M||{}),We=(r=>(r.CurrentDateAndTime="current-date-and-time",r.Unique="unique",r.Random="random",r))(We||{}),P=(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.JSON="json",r.Date="date",r.UUID="uuid",r.File="file",r))(P||{}),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||{}),W=(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))(W||{}),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||{}),nt=(r=>(r.HttpRequest="base-http-request",r))(nt||{}),$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||{}),Mt=(r=>(r.Empty="empty",r.NotEmpty="not-empty",r))(Mt||{}),$=(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||{}),Ke=(r=>(r.OrDataTypeGroup="or-data-type-group",r.AndDataTypeGroup="and-data-type-group",r))(Ke||{}),pn=(r=>(r.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",r))(pn||{}),Ct=(r=>(r.DeletePersistedEntity="base-delete-persisted-entity",r.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",r.AbortExecution="base-abort-execution",r))(Ct||{}),Wr=(r=>(r.Error="error",r.Task="task",r.Return="return",r))(Wr||{});const Bn=[n.VariableDeclaration,n.VariableInstance,n.InputMap,n.ReturnDeclaration],xe=[n.VariableDeclaration,n.VariableInstance,n.ArgumentDeclaration,n.OutputMap],Wu=[...Bn,...xe],Fe=[n.VariableDeclaration,n.VariableInstance],Yr=[n.GlobalEvent],je=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.InternalCall,n.Loop],Xo=[n.Operation,n.FunctionCall,n.Condition,n.Search,n.VariableDeclaration,n.VariableInstance,n.Loop],Ue=[n.FunctionDeclaration,...Yr],wn=[...je,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],Qo=[...Xo,n.ReturnStatement,n.BreakStatement,n.ContinueStatement],yn=[...je,...Ue],Yu=[...Xo,...Ue],LA=[...wn,...Ue],GA=[...Qo,...Ue],ut=[...Ue,n.Loop],Ve=[n.ReturnStatement,n.BreakStatement,n.ContinueStatement],$A=[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],el=[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],Hu=[n.CustomEntity,n.FunctionDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.Property,n.VariableDeclaration,n.Search,n.Project,n.InstalledProject,n.ActionDescriptor,n.ValueDescriptor],Hr=[n.BuiltInBaseEntity,n.PrimitiveEntity],FA=[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 tl=(r=>(r.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",r))(tl||{});const B={[n.PrimitiveEntity]:{[P.String]:{id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",properties:{}},[P.Boolean]:{id:"f596545d-1565-4faa-9969-d95fa5edfea4",properties:{}},[P.Number]:{id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",properties:{}},[P.JSON]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",properties:{}},[P.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"}}}}},[P.UUID]:{id:"4a6234aa-c0f6-4731-b4dd-750388029226",properties:{}},[P.Date]:{id:"dc58f38b-d574-4956-aac6-32ce9529b937",properties:{}},[P.Null]:{id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",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]:{[M.KEY_VALUE_PARAM]:{id:M.KEY_VALUE_PARAM},[M.HTTP_ENDPOINT]:{id:M.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"}}},[M.PERSISTED_ENTITY]:{id:M.PERSISTED_ENTITY,properties:{database:{id:"persisted-built-in-base-entity-database-property-id"},identifier:{id:"persisted-built-in-base-entity-identifier-property-id"}}},[M.RELATIONAL_DATABASE]:{id:M.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"}}},[M.CRON_JOB]:{id:M.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"}}},[nt.HttpRequest]:{id:nt.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"}}}},[Mt.NotEmpty]:{id:Mt.NotEmpty,inputs:{leftHand:{id:"condition-not-empty-input-id"}}}},[n.GlobalEvent]:{[pn.PROJECT_PUBLICATION_COMPLETED]:{id:pn.PROJECT_PUBLICATION_COMPLETED}}},qt=B[n.PrimitiveEntity],x={type:n.PrimitiveEntity,id:qt.string.id,description:"A string of characters.",version:1,name:P.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},_n={type:n.PrimitiveEntity,id:qt.boolean.id,description:"A 'true' or 'false' value.",version:1,name:P.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},X={type:n.PrimitiveEntity,id:qt.number.id,description:"A number value.",version:1,name:P.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},UA={type:n.PrimitiveEntity,id:qt.null.id,description:"An explicitly empty value.",version:1,name:P.Null,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xe={type:n.PrimitiveEntity,id:"730e8ea9-8498-439a-9001-b07de55aaa7d",description:"A complex data structure with any combination of properties with names and values.",version:1,name:P.JSON,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},Zu={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:n.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:n.Property},Ku={like:!1,inferred:!1,id:qt.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:{id:qt.enum.properties.options.dataType.defaultValue.id,type:n.PrimitiveValue,version:1,name:P.JSON,autogeneration:null,value:[],valueAsType:null,parent:zu},parent:Zu},Xu={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:n.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:n.PrimitiveEntity},Qu={hidden:!1,required:!0,id:qt.enum.properties.options.id,name:"Options",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Ku,description:"Options for the enum. Each option is a text value.",parent:Xu},Nn={type:n.PrimitiveEntity,id:qt.enum.id,description:"A set of text options to choose from.",version:1,name:P.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Qu],methods:[]},hn={type:n.PrimitiveEntity,id:qt.date.id,description:"A date and time value.",version:1,name:P.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Wa={type:n.PrimitiveEntity,id:qt.uuid.id,description:"A unique identifier in the form of a 36-character string.",version:1,name:P.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[x],properties:[],methods:[]},nl={type:n.PrimitiveEntity,id:qt.json.id,description:"A complex data structure with any combination of properties with names and values.",version:1,name:P.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xt=B[n.Operation][Te.Addition],ep={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Xt.inputs.firstSummand.id,entityType:n.ValueDescriptor},tp={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:ep},np={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Xt.inputs.secondSummand.id,entityType:n.ValueDescriptor},rp={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:np},ip={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Xt.outputs.result.id,entityType:n.ValueDescriptor},ap={like:!1,inferred:!1,id:Xt.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:ip},sp={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Addition,entityType:n.ActionDescriptor},rl={id:Xt.inputs.firstSummand.id,type:n.ValueDescriptor,version:1,name:"Summand",description:"The first number to add",dataType:tp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:sp},op={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Addition,entityType:n.ActionDescriptor},il={id:Xt.inputs.secondSummand.id,type:n.ValueDescriptor,description:"The second number to add",version:1,name:"Summand",dataType:rp,required:!0,parentRelationType:O.FixedArguments,index:1,parent:op},al={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Addition,entityType:n.ActionDescriptor},sl={parentRelationType:O.FixedReturns,id:Xt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:ap,required:!0,index:0,parent:al},lp={type:n.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:Te.Addition,entityType:n.ActionDescriptor},cp={parentRelationType:O.FixedReturns,id:Xt.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:lp},dp={type:n.GenericReference,id:"number-addition-operation-dynamic-summand-argument-type-parent-ref",entityId:Xt.inputs.dynamicSummand.id,entityType:n.ValueDescriptor},up={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:dp},pp={parentRelationType:O.DynamicArgument,id:Xt.inputs.dynamicSummand.id,type:n.ValueDescriptor,description:"A number to add",version:1,name:"Summand",dataType:up,required:!0,index:2,parent:al},Ya={id:Te.Addition,type:n.ActionDescriptor,description:"Sum numbers",version:1,name:Te.Addition,inputs:[rl,il,pp],error:cp,outputs:[sl],parent:null},Qt=B[n.Operation][Te.Subtraction],yp={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:Qt.inputs.minuend.id,entityType:n.ValueDescriptor},hp={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:yp},fp={type:n.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:Qt.inputs.subtrahend.id,entityType:n.ValueDescriptor},mp={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:fp},Tp={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:Qt.outputs.result.id,entityType:n.ValueDescriptor},Ep={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:Tp},ol={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Te.Subtraction,entityType:n.ActionDescriptor},bp={id:Qt.inputs.minuend.id,type:n.ValueDescriptor,version:1,name:"Minuend",description:"Base number to substract from",dataType:hp,required:!0,parentRelationType:O.FixedArguments,index:0,parent:ol},Rp={type:n.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:Te.Subtraction,entityType:n.ActionDescriptor},gp={id:Qt.inputs.subtrahend.id,type:n.ValueDescriptor,description:"The second number to substract",version:1,name:"Subtrahend",dataType:mp,required:!0,parentRelationType:O.FixedArguments,index:1,parent:Rp},vp={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Ip={parentRelationType:O.FixedReturns,id:Qt.outputs.result.id,type:n.ValueDescriptor,description:"The result number of the subtraction",version:1,name:"Result",dataType:Ep,required:!0,index:0,parent:vp},Dp={type:n.GenericReference,id:"number-subtraction-operation-error-parent-ref",entityId:Te.Subtraction,entityType:n.ActionDescriptor},Pp={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},Ap={type:n.GenericReference,id:"number-subtraction-operation-dynamic-subtrahend-argument-type-parent-ref",entityId:Qt.inputs.dynamicSubtrahend.id,entityType:n.ValueDescriptor},Op={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:Ap},Sp={id:Qt.inputs.dynamicSubtrahend.id,type:n.ValueDescriptor,version:1,name:"Subtrahend",description:"A number to substract",dataType:Op,required:!0,parentRelationType:O.DynamicArgument,index:2,parent:ol},ll={id:Te.Subtraction,type:n.ActionDescriptor,description:"Substract numbers",version:1,name:Te.Subtraction,inputs:[bp,gp,Sp],error:Pp,outputs:[Ip],parent:null},Cp={[Te.Addition]:Ya,[Te.Subtraction]:ll},Jt=B[n.Operation][K.Join],Bp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},wp={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:Bp},_p={type:n.GenericReference,id:"join-strings-second-string-argument-declaration",entityId:Jt.inputs.second.id,entityType:n.ValueDescriptor},Np={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:_p},Mp={type:n.GenericReference,id:"join-strings-result-string-return-delaration",entityId:Jt.outputs.result.id,entityType:n.ValueDescriptor},Vp={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:Mp},Lp={type:n.GenericReference,id:"join-strings-operation-first-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Ha={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:wp,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Lp},Gp={type:n.GenericReference,id:"join-strings-first-string-argument-declaration",entityId:Jt.inputs.first.id,entityType:n.ValueDescriptor},$p={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},Fp={type:n.PrimitiveValue,id:"join-strings-separator-string-data-type-default-value-id",version:1,name:P.String,value:"",valueAsType:null,autogeneration:null,parent:$p},Up={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:Fp,constant:!1,parent:Gp},xp={type:n.GenericReference,id:"join-strings-operation-separator-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},jp={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:Up,parentRelationType:O.FixedArguments,required:!1,index:0,parent:xp},kp={type:n.GenericReference,id:"join-strings-operation-second-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},za={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:Np,parentRelationType:O.FixedArguments,required:!0,index:2,parent:kp},qp={type:n.GenericReference,id:"join-strings-operation-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Mi={parentRelationType:O.FixedReturns,id:Jt.outputs.result.id,type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:Vp,required:!0,index:0,parent:qp},Jp={type:n.GenericReference,id:"join-strings-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Wp={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:Jp},Yp={type:n.GenericReference,id:"join-strings-dynamic-string-argument-declaration",entityId:Jt.inputs.dynamicString.id,entityType:n.ValueDescriptor},Hp={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:Yp},zp={type:n.GenericReference,id:"join-strings-operation-dynamic-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},Zp={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:Hp,parentRelationType:O.DynamicArgument,required:!0,index:3,parent:zp},Vi={id:K.Join,type:n.ActionDescriptor,version:1,name:K.Join,description:"Join text values together, to form a single resulting text value.",inputs:[jp,Ha,za,Zp],outputs:[Mi],error:Wp,parent:null},fn=B[n.Operation][K.Split],Kp={type:n.GenericReference,id:"split-string-string-argument-declaration",entityId:fn.inputs.stringValue.id,entityType:n.ValueDescriptor},Xp={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:Kp},Qp={type:n.GenericReference,id:"split-string-index-argument-declaration",entityId:fn.inputs.indexLocation.id,entityType:n.ValueDescriptor},ey={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:Qp},ty={type:n.GenericReference,id:"split-string-first-part-result-string-return-delaration",entityId:fn.outputs.firstPartResult.id,entityType:n.ValueDescriptor},ny={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:ty},ry={type:n.GenericReference,id:"split-string-second-part-result-string-return-delaration",entityId:fn.outputs.secondPartResult.id,entityType:n.ValueDescriptor},iy={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:ry},ay={type:n.GenericReference,id:"split-string-operation-string-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},sy={id:fn.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:Xp,parentRelationType:O.FixedArguments,required:!0,index:0,parent:ay},oy={type:n.GenericReference,id:"split-string-operation-index-argument-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},ly={id:fn.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:ey,parentRelationType:O.FixedArguments,required:!0,index:1,parent:oy},cy={type:n.GenericReference,id:"split-string-operation-second-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},xA={parentRelationType:O.FixedReturns,id:fn.outputs.secondPartResult.id,type:n.ValueDescriptor,version:1,name:"Second part",description:"The secont part of the resulting text value.",dataType:iy,required:!0,index:1,parent:cy},dy={type:n.GenericReference,id:"split-string-operation-first-part-result-string-return-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},uy={parentRelationType:O.FixedReturns,id:fn.outputs.firstPartResult.id,type:n.ValueDescriptor,version:1,name:"First part",description:"The first part of the resulting text value.",dataType:ny,required:!0,index:0,parent:dy},py={type:n.GenericReference,id:"split-string-operation-error-parent-ref",entityId:K.Join,entityType:n.ActionDescriptor},yy={parentRelationType:O.FixedReturns,id:fn.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:py},cl={id:K.Split,type:n.ActionDescriptor,version:1,name:K.Split,description:"Split a text into two, at the given index location.",inputs:[sy,ly],outputs:[uy],error:yy,parent:null},hy={[K.Join]:Vi,[K.Split]:cl};var fy=(r=>(r.FirstInputList="join-list-first-list-argument-declaration",r.SecondInputList="join-list-second-list-argument-declaration",r))(fy||{}),my=(r=>(r.ResultList="join-list-result-list-return-delaration",r.Error="join-list-error-return-delaration",r))(my||{});const Ty={type:n.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:n.ValueDescriptor},Ey={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:Ty},by={type:n.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:n.ValueDescriptor},Ry={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:by},gy={type:n.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:n.ValueDescriptor},vy={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:gy},Iy={type:n.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Dy={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:Ey,parentRelationType:O.FixedArguments,required:!0,index:0,parent:Iy},Py={type:n.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Ay={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:Ry,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Py},Oy={type:n.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},Sy={parentRelationType:O.FixedReturns,id:"join-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:vy,required:!0,index:0,parent:Oy},Cy={type:n.GenericReference,id:"join-list-operation-error-parent-ref",entityId:W.Join,entityType:n.ActionDescriptor},By={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:Cy},dl={id:W.Join,type:n.ActionDescriptor,version:1,name:W.Join,description:"Join two lists together, to form a single resulting list value.",inputs:[Dy,Ay],error:By,outputs:[Sy],parent:null};var wy=(r=>(r.InputList="list-to-split-argument-declaration",r.SplitIndex="split-list-index-argument-declaration",r))(wy||{}),_y=(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))(_y||{});const Ny={type:n.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:n.ValueDescriptor},My={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:Ny},Vy={type:n.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:n.ValueDescriptor},Ly={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:Vy},ul={type:n.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:n.ValueDescriptor},Gy={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:ul},$y={type:n.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Fy={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:My,parentRelationType:O.FixedArguments,required:!0,index:0,parent:$y},Uy={type:n.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},xy={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:Ly,parentRelationType:O.FixedArguments,required:!0,index:1,parent:Uy},jy={type:n.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},ky={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:Gy,required:!0,index:0,parent:jy},qy={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:ul},Jy={type:n.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Wy={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:qy,required:!0,index:0,parent:Jy},Yy={type:n.GenericReference,id:"split-list-operation-error-parent-ref",entityId:W.Split,entityType:n.ActionDescriptor},Hy={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:Yy},pl={id:W.Split,type:n.ActionDescriptor,version:1,name:W.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:[Fy,xy],outputs:[ky,Wy],error:Hy,parent:null};var zy=(r=>(r.InputList="get-last-in-list-input-list-argument-declaration",r))(zy||{}),Zy=(r=>(r.OutputElement="get-last-in-list-output-element-return-delaration",r.Error="get-last-in-list-error-return-delaration",r))(Zy||{});const Ky={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},Xy={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:Ky},Qy={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},eh={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:Qy},th={type:n.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},nh={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:Xy,parentRelationType:O.FixedArguments,required:!0,index:0,parent:th},rh={type:n.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},ih={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:eh,required:!0,index:0,parent:rh},ah={type:n.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:W.GetLast,entityType:n.ActionDescriptor},sh={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:ah},yl={id:W.GetLast,type:n.ActionDescriptor,version:1,name:W.GetLast,description:"Outputs the last element of a given list.",inputs:[nh],outputs:[ih],error:sh,parent:null};var oh=(r=>(r.List="append-to-list-lsit-argument-declaration",r.ElementToAppend="append-to-list-element-to-append-argument-declaration",r))(oh||{}),lh=(r=>(r.ResultList="append-to-list-result-list-return-delaration",r.Error="append-to-list-error-return-delaration",r))(lh||{});const ch={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:n.ValueDescriptor},dh={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:ch},uh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:n.ValueDescriptor},ph={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:uh},yh={type:n.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:n.ValueDescriptor},hh={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:yh},fh={type:n.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},hl={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:dh,parentRelationType:O.FixedArguments,required:!0,index:0,parent:fh},mh={type:n.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},fl={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:ph,parentRelationType:O.FixedArguments,required:!0,index:1,parent:mh},Th={type:n.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},Eh={parentRelationType:O.FixedReturns,id:"append-to-list-result-list-return-delaration",type:n.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:hh,required:!0,index:0,parent:Th},bh={type:n.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:W.Append,entityType:n.ActionDescriptor},Rh={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:bh},Za={id:W.Append,type:n.ActionDescriptor,version:1,name:W.Append,description:"Adds a given element to the end of a list value.",inputs:[hl,fl],error:Rh,outputs:[Eh],parent:null},gh={[W.Join]:dl,[W.Split]:pl,[W.GetLast]:yl,[W.Append]:Za},zr=B[n.Operation][le.Parallel],vh={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},Ih={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},Dh={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:[Ih],outputs:[vh],error:null,parent:null},Ph={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:zr.inputs.listOfActions.id,entityType:n.ValueDescriptor},Ah={like:!1,inferred:!1,id:"parallel-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dh,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ph},Oh={type:n.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:zr.outputs.results.id,entityType:n.ValueDescriptor},Sh={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:Oh},Ch={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:le.Parallel,entityType:n.ActionDescriptor},ml={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:Ah,required:!0,index:0,parent:Ch,parentRelationType:O.FixedArguments},Bh={type:n.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:le.Parallel,entityType:n.ActionDescriptor},Tl={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:Sh,required:!0,index:0,parent:Bh,parentRelationType:O.FixedReturns},wh={type:n.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:le.Parallel,entityType:n.ActionDescriptor},_h={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:wh,parentRelationType:O.ReturnedError},Wt={id:le.Parallel,type:n.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:le.Parallel,inputs:[ml],outputs:[Tl],error:_h,parent:null};var Nh=(r=>(r.MillisecondsNumber="wait-milliseconds-number-argument-declaration",r))(Nh||{}),Mh=(r=>(r.Error="wait-operation-error-return-delaration",r))(Mh||{});const Vh={type:n.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:n.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},Lh={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:Vh},Gh={type:n.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:n.ActionDescriptor,entityId:le.Wait},tr={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:Lh,required:!0,index:0,parent:Gh,parentRelationType:O.FixedArguments},$h={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:le.Wait,entityType:n.ActionDescriptor},Fh={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:$h,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:[tr],outputs:[],error:Fh,parent:null};var Uh=(r=>(r.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",r))(Uh||{}),xh=(r=>(r.ListOfExecutionResults="sequential-execution-result-return-delaration",r.Error="sequential-execution-error-return-delaration",r))(xh||{});const jh={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},kh={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},qh={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:[kh],outputs:[jh],error:null,parent:null},Jh={type:n.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:n.ValueDescriptor},Wh={like:!1,inferred:!1,id:"sequential-execution-list-of-functions-argument-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qh,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Jh},Yh={type:n.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:n.ValueDescriptor},Hh={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:Yh},zh={type:n.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},El={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:Wh,required:!0,index:0,parent:zh,parentRelationType:O.FixedArguments},Zh={type:n.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},bl={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:Hh,required:!0,index:0,parent:Zh,parentRelationType:O.FixedReturns},Kh={type:n.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:le.Sequential,entityType:n.ActionDescriptor},Xh={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:Kh,parentRelationType:O.ReturnedError},mn={id:le.Sequential,type:n.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:le.Sequential,inputs:[El],outputs:[bl],error:Xh,parent:null},Qh={[le.Parallel]:Wt,[le.Wait]:pt,[le.Sequential]:mn};var ef=(r=>(r.EntityToInstanciate="entity-to-instanciate-argument-declaration",r.NewEntityData="new-entity-data-argument-declaration",r))(ef||{}),tf=(r=>(r.Error="create-new-instance-error-return-delaration",r))(tf||{});const nf={type:n.GenericReference,id:"new-entity-data-argument-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},rf={type:n.GenericReference,id:"new-entity-data-argument-data-type-parent-ref",entityId:"new-entity-data-argument-declaration",entityType:n.ValueDescriptor},af={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:rf},sf={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:af,required:!0,parentRelationType:O.FixedArguments,index:1,parent:nf},of={type:n.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},lf={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:of},cf={type:n.GenericReference,id:"create-new-instance-operation-ref",entityType:n.ActionDescriptor,entityId:ce.CreateNewInstance},df={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:lf,required:!0,parentRelationType:O.FixedArguments,index:0,parent:cf},uf={type:n.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},pf={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:uf,required:!0,index:0},yf={type:n.GenericReference,id:"create-new-instance-error-parent-ref",entityId:ce.CreateNewInstance,entityType:n.ActionDescriptor},hf={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:yf},nr={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:[df,sf],outputs:[pf],error:hf,parent:null},Zr=B[n.Operation][ce.Validate],ff={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Zr.inputs.dataToValidate.id},mf={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:ff},Tf={type:n.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},Ef={id:Zr.inputs.dataToValidate.id,type:n.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:mf,required:!0,parentRelationType:O.FixedArguments,index:0,parent:Tf},bf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:n.ValueDescriptor,entityId:Zr.inputs.entityToMatch.id},Rf={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:bf},gf={type:n.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:n.ActionDescriptor,entityId:ce.Validate},vf={id:Zr.inputs.entityToMatch.id,type:n.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:Rf,required:!0,index:0,parentRelationType:O.FixedArguments,parent:gf},If={type:n.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Df={id:Zr.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:If,required:!0,index:0,parentRelationType:O.FixedReturns},Pf={type:n.GenericReference,id:"wait-operation-error-parent-ref",entityId:ce.Validate,entityType:n.ActionDescriptor},Af={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:Pf,parentRelationType:O.ReturnedError},rr={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:[vf,Ef],outputs:[Df],error:Af,parent:null},Of={[ce.CreateNewInstance]:nr,[ce.Validate]:rr},Qe=B[n.Operation]["base-http-request"],Sf={type:n.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:n.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},Cf={id:"http-request-url-default-value-id",type:n.PrimitiveValue,version:1,value:"https://some-url.com",name:P.String,valueAsType:null,parent:Sf,autogeneration:null},Bf={type:n.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Qe.inputs.url.id,entityType:n.ValueDescriptor},wf={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:Cf,constant:!1,parent:Bf},_f={type:n.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Qe.inputs.query.id,entityType:n.ValueDescriptor},Nf={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:_f},Mf={type:n.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:n.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},Vf={id:"http-request-method-default-value-id",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,valueAsType:null,parent:Mf,autogeneration:null},Lf={type:n.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Qe.inputs.method.id,entityType:n.ValueDescriptor},Gf={like:!1,inferred:!1,id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:Vf,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:Lf},$f={type:n.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Qe.inputs.headers.id,entityType:n.ValueDescriptor},Ff={like:!1,inferred:!1,id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:$f},Uf={type:n.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Qe.inputs.body.id,entityType:n.ValueDescriptor},xf={like:!1,inferred:!1,id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Uf},jf={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:Qe.outputs.code.id},kf={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:jf},qf={type:n.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:n.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},Jf={type:n.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:n.ValueDescriptor,entityId:Qe.outputs.headers.id},Wf={like:!1,inferred:!1,id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-headers-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:P.JSON,parent:qf,valueAsType:null,autogeneration:null},constant:!1,parent:Jf},Yf={type:n.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:n.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},Hf={type:n.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:n.ValueDescriptor,entityId:Qe.outputs.body.id},zf={like:!1,inferred:!1,id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-body-default-value-id",type:n.PrimitiveValue,version:1,value:{},name:P.JSON,parent:Yf,valueAsType:null,autogeneration:null},constant:!1,parent:Hf},Zf={type:n.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Ka={id:Qe.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:Gf,required:!1,index:0,parentRelationType:O.FixedArguments,parent:Zf},Kf={type:n.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Xa={id:Qe.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:wf,required:!1,index:1,parentRelationType:O.FixedArguments,parent:Kf},Xf={type:n.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Rl={id:Qe.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:Nf,required:!1,index:2,parentRelationType:O.FixedArguments,parent:Xf},Qf={type:n.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},Qa={id:Qe.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:Ff,required:!1,index:3,parent:Qf,parentRelationType:O.FixedArguments},em={type:n.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},es={id:Qe.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 JSON data structure or a text value.",version:1,name:"Body",dataType:xf,required:!1,index:4,parentRelationType:O.FixedArguments,parent:em},tm={type:n.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},ts={id:Qe.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:kf,required:!0,index:0,parentRelationType:O.FixedReturns,parent:tm},nm={type:n.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},ns={parentRelationType:O.FixedReturns,id:Qe.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:Wf,required:!0,index:1,parent:nm},rm={type:n.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},rs={parentRelationType:O.FixedReturns,id:Qe.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 JSON data structure or a text value.",version:1,name:"Body",dataType:zf,required:!0,index:2,parent:rm},im={type:n.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:n.ActionDescriptor,entityId:nt.HttpRequest},am={type:n.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:n.ValueDescriptor,entityId:Qe.outputs.error.id},sm={like:!1,inferred:!1,id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:am},gl={parentRelationType:O.ReturnedError,id:Qe.outputs.error.id,type:n.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:sm,required:!0,index:0,parent:im},Li={type:n.ActionDescriptor,id:nt.HttpRequest,name:nt.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:[Ka,Xa,Rl,Qa,es],outputs:[ts,ns,rs],error:gl,parent:null},om={[nt.HttpRequest]:Li},jA={...hy,...Cp,...gh,...Qh,...Of,...om},kA=B[n.Loop]["manual-flow-loop"],lm={id:"manual-flow-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ManualFlow,entityType:n.ActionDescriptor},cm={id:kA.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:lm,parentRelationType:O.DynamicReturn},vl={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:[cm],error:null,parent:null},Gi=B[n.Loop]["manual-flow-loop"],dm={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},um={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:dm},pm={id:"manual-flow-loop-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Gi.body.id,entityType:n.ActionDescriptor},Il={id:Gi.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:um,required:!0,index:0,parentRelationType:O.FixedArguments,parent:pm},ym={id:"manual-flow-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Gi.body.id,entityType:n.ActionDescriptor},hm={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:ym},fm={id:"manual-flow-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Gi.body.id,entityType:n.ActionDescriptor},mm={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:fm},Dl={id:Gi.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the manual flow loop.",inputs:[Il,hm],outputs:[mm],error:null,parent:null},Tm=B[n.Loop]["list-loop"],Em={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},bm={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:Em},Rm={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},gm={id:Tm.inputs.list.id,type:n.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:bm,index:0,parent:Rm,parentRelationType:O.FixedArguments},vm={id:"iterate-over-list-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.List,entityType:n.ActionDescriptor},Im={id:Tm.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:vm,parentRelationType:O.DynamicReturn},ir={id:$.List,type:n.ActionDescriptor,version:1,name:$.List,description:"Iterates over a list of entities",inputs:[gm],outputs:[Im],error:null,parent:null},ar=B[n.Loop]["list-loop"],Dm={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},Pm={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:Dm},Am={id:"iterate-over-list-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},is={id:ar.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:Pm,required:!0,index:1,parentRelationType:O.FixedArguments,parent:Am},Om={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},Sm={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:Om},Cm={id:"iterate-over-list-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},Bm={id:ar.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:Sm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Cm},wm={id:"iterate-over-list-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},_m={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:wm},Nm={id:"iterate-over-list-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:ar.body.id,entityType:n.ActionDescriptor},Mm={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:Nm},as={id:ar.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the list loop.",inputs:[Bm,is,_m],outputs:[Mm],error:null,parent:null},Vm=B[n.Loop]["string-loop"],Lm={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},Gm={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:Lm},$m={id:"iterate-over-string-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},Fm={id:Vm.inputs.string.id,type:n.ValueDescriptor,version:1,name:"Texts",description:"The text to iterate over the characters of",required:!0,dataType:Gm,index:0,parent:$m,parentRelationType:O.FixedArguments},Um={id:"iterate-over-string-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.String,entityType:n.ActionDescriptor},xm={id:Vm.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:Um,parentRelationType:O.DynamicReturn},ss={id:$.String,type:n.ActionDescriptor,version:1,name:$.String,description:"Iterates over a string of entities",inputs:[Fm],outputs:[xm],error:null,parent:null},sr=B[n.Loop]["string-loop"],jm={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},km={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:jm},qm={id:"iterate-over-string-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Pl={id:sr.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:km,required:!0,index:1,parentRelationType:O.FixedArguments,parent:qm},Jm={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},Wm={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:Jm},Ym={id:"iterate-over-string-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Al={id:sr.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:Wm,required:!0,index:0,parentRelationType:O.FixedArguments,parent:Ym},Hm={id:"iterate-over-string-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:sr.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:Hm},Zm={id:"iterate-over-string-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:sr.body.id,entityType:n.ActionDescriptor},Km={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:Zm},Ol={id:sr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Al,Pl,zm],outputs:[Km],error:null,parent:null},Xm=B[n.Loop]["object-keys-loop"],Qm={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},eT={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:Xe,asType:!1,defaultValue:null,parent:Qm},tT={id:"iterate-over-object-keys-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},nT={id:Xm.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:eT,index:0,parent:tT,parentRelationType:O.FixedArguments},rT={id:"iterate-over-object-keys-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectKeys,entityType:n.ActionDescriptor},iT={id:Xm.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:rT,parentRelationType:O.DynamicReturn},$i={id:$.ObjectKeys,type:n.ActionDescriptor,version:1,name:$.ObjectKeys,description:"Iterates over a object of entities",inputs:[nT],outputs:[iT],error:null,parent:null},or=B[n.Loop]["object-keys-loop"],aT={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},sT={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:aT},oT={id:"iterate-over-object-keys-loop-body-current-value-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},Sl={id:or.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:sT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:oT},lT={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},cT={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:lT},dT={id:"iterate-over-object-keys-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},uT={id:or.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:cT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:dT},pT={id:"iterate-over-object-keys-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},yT={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:pT},hT={id:"iterate-over-object-keys-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:or.body.id,entityType:n.ActionDescriptor},fT={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:hT},mT={id:or.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-keys loop.",inputs:[uT,Sl,yT],outputs:[fT],error:null,parent:null},TT=B[n.Loop]["object-values-loop"],ET={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},bT={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:Xe,asType:!1,defaultValue:null,parent:ET},RT={id:"iterate-over-object-values-loop-object-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},gT={id:TT.inputs.object.id,type:n.ValueDescriptor,version:1,name:"Object",description:"The object to iterate over",required:!0,dataType:bT,index:0,parent:RT,parentRelationType:O.FixedArguments},vT={id:"iterate-over-object-values-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.ObjectValues,entityType:n.ActionDescriptor},IT={id:TT.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:vT,parentRelationType:O.DynamicReturn},Fi={id:$.ObjectValues,type:n.ActionDescriptor,version:1,name:$.ObjectValues,description:"Iterates over a object of entities",inputs:[gT],outputs:[IT],error:null,parent:null},lr=B[n.Loop]["object-values-loop"],DT={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},PT={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:DT},AT={id:"iterate-over-object-values-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-values that is being iterated over. This value is passed to the child actions.",dataType:PT,required:!0,index:1,parentRelationType:O.FixedArguments,parent:AT},OT={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},ST={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:OT},CT={id:"iterate-over-object-values-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},BT={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-values loop. Keeps track of the number of iterations that have been executed.",dataType:ST,required:!0,index:0,parentRelationType:O.FixedArguments,parent:CT},wT={id:"iterate-over-object-values-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},_T={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:wT},NT={id:"iterate-over-object-values-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:lr.body.id,entityType:n.ActionDescriptor},MT={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:NT},VT={id:lr.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the object-values loop.",inputs:[BT,Cl,_T],outputs:[MT],error:null,parent:null},LT=B[n.Loop]["counted-loop"],GT={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},$T={id:"counted-loop-string-argument-declaration-data-type-default-value-id",type:n.PrimitiveValue,name:P.Number,version:1,value:5,valueAsType:null,autogeneration:null,parent:GT},FT={id:"counted-loop-string-argument-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:"counted-loop-string-argument-declaration-id",entityType:n.ValueDescriptor},UT={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:$T,parent:FT},xT={id:"counted-loop-string-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},jT={id:LT.inputs.number.id,type:n.ValueDescriptor,version:1,name:"Number of iterations",description:"The number of iterations to perform",required:!0,dataType:UT,index:0,parent:xT,parentRelationType:O.FixedArguments},kT={id:"counted-loop-dynamic-return-declaration-parent-ref-id",type:n.GenericReference,entityId:$.Counted,entityType:n.ActionDescriptor},qT={id:LT.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:kT,parentRelationType:O.DynamicReturn},os={id:$.Counted,type:n.ActionDescriptor,version:1,name:$.Counted,description:"Iterates a given number of times",inputs:[jT],outputs:[qT],error:null,parent:null},Ui=B[n.Loop]["counted-loop"],JT={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},WT={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:JT},YT={id:"counted-loop-body-current-iteration-number-declaration-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},Bl={id:Ui.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:WT,required:!0,index:0,parentRelationType:O.FixedArguments,parent:YT},HT={id:"counted-loop-body-any-dynamic-argument-parent-ref-id",type:n.GenericReference,entityId:Ui.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:HT},ZT={id:"counted-loop-body-any-dynamic-return-parent-ref-id",type:n.GenericReference,entityId:Ui.body.id,entityType:n.ActionDescriptor},KT={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:ZT},wl={id:Ui.body.id,type:n.ActionDescriptor,version:1,name:"Iteration logic trigger",description:"Describes the body of the string loop.",inputs:[Bl,zT],outputs:[KT],error:null,parent:null},ls=B[n.BuiltInBaseEntity][M.KEY_VALUE_PARAM],qA={id:"key-value-param-built-in-base-entity-name-property-data-type-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property-data-type",entityType:n.DataType},XT={id:"key-value-param-built-in-base-entity-name-property-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property",entityType:n.Property},JA={like:!1,inferred:!1,id:"key-value-param-built-in-base-entity-name-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:XT},QT={id:"key-value-param-built-in-base-entity-name-property-parent-ref",type:n.GenericReference,entityId:ls.id,entityType:n.BuiltInBaseEntity},eE={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-name-property",name:"Parameter name",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:JA,description:"The name of the path parameter",parent:QT},WA={id:"key-value-param-built-in-base-entity-value-property-data-type-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property-data-type",entityType:n.DataType},tE={id:"key-value-param-built-in-base-entity-value-property-ref",type:n.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property",entityType:n.Property},YA={like:!1,inferred:!1,id:"key-value-param-built-in-base-entity-value-property-data-type",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:x,asType:!1,defaultValue:null,parent:tE},nE={id:"key-value-param-built-in-base-entity-value-property-parent-ref",type:n.GenericReference,entityId:ls.id,entityType:n.BuiltInBaseEntity},rE={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-value-property",name:"Parameter Value",version:1,type:n.Property,private:!1,abstract:!1,implements:null,static:!1,index:1,dataType:YA,description:"The value of the path parameter",parent:nE},cs={id:ls.id,version:1,description:'An entity with a "name" and "value" property representing a breakdown of a key-value pair.',name:ls.id,type:n.BuiltInBaseEntity,abstract:!1,static:!1,interactive:!0,properties:[eE,rE],abstractMethods:[],methods:[],extends:[]},xi=B[n.BuiltInBaseEntity][M.HTTP_ENDPOINT].properties,iE={id:"endpointBuiltInCorsPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},aE={id:"endpointBuiltInCorsPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:xi.cors.id},sE={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:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:["*"],parent:iE,autogeneration:null,valueAsType:null},parent:aE},oE={id:"endpointBuiltInBaseEntityRef",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},lE={hidden:!0,required:!0,id:xi.cors.id,name:"Allowed origins",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:sE,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:oE},cE={id:"endpointBuiltInPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInPathPropertyDataType"},dE={id:"endpointBuiltInPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:xi.path.id},uE={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:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.String,value:"/",parent:cE,autogeneration:null,valueAsType:null},parent:dE},pE={id:"endpointBuiltInBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},_l={hidden:!1,required:!0,id:xi.path.id,name:"Path",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:uE,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:pE},yE={id:"endpointBuiltInMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},hE={id:"endpointBuiltInMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"endpointBuiltInMethodProperty"},fE={like:!1,inferred:!1,id:"endpointBuiltInMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Nn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,parent:yE,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:hE},mE={id:"endpointBuiltInBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},Nl={hidden:!1,required:!0,id:xi.method.id,name:"Method",version:1,type:n.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:fE,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:mE},TE={id:"endpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestHeadersVariableDataType"},EE={id:"endpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},bE={like:!1,inferred:!1,id:"endpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:TE,autogeneration:null,valueAsType:null},parent:EE},RE={id:"endpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},gE={like:!1,inferred:!1,id:"endpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:RE},vE={id:"endpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},IE={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},DE={like:!1,inferred:!1,id:"endpointRequestQueryParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:cs,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:[],parent:vE,autogeneration:null,valueAsType:null},parent:IE},PE={id:"endpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointPathParamsVariableDataType"},AE={id:"endpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},OE={like:!1,inferred:!1,id:"endpointPathParamsVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:cs,asType:!1,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:[],parent:PE,autogeneration:null,valueAsType:null},parent:AE},SE={id:"endpointReachedTriggerActionDescriptorRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ml={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:bE,required:!0,index:0,parentRelationType:O.FixedArguments,parent:SE},CE={id:"endpointReachedTriggerActionDescriptorRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Vl={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:OE,required:!0,index:1,parentRelationType:O.FixedArguments,parent:CE},BE={id:"endpointReachedTriggerActionDescriptorRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Ll={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:DE,required:!0,index:2,parentRelationType:O.FixedArguments,parent:BE},wE={id:"endpointReachedTriggerActionDescriptorRefFour",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Gl={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ValueDescriptor,name:"Request body",dataType:gE,index:3,required:!0,parentRelationType:O.FixedArguments,parent:wE},_E={id:"endpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},NE={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:_E},ME={id:"endpointReturnStatementRef",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},$l={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:NE,required:!0,index:0,parentRelationType:O.FixedReturns,parent:ME},VE={id:"endpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"endpointResponseHeadersDataType"},LE={id:"endpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},GE={like:!1,inferred:!1,id:"endpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:VE,autogeneration:null,valueAsType:null},parent:LE},$E={id:"endpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Fl={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:GE,required:!1,index:1,parentRelationType:O.FixedReturns,parent:$E},FE={id:"endpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},UE={like:!1,inferred:!1,id:"endpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:FE},xE={id:"endpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ActionDescriptor,entityId:"endpointReturnStatement"},Ul={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ValueDescriptor,name:"Response body",dataType:UE,required:!1,index:2,parentRelationType:O.FixedReturns,parent:xE},jE={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},xl={id:"endpointReachedTriggerActionDescriptor",type:n.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",inputs:[Ml,Vl,Ll,Gl],outputs:[$l,Fl,Ul],error:null,parent:jE},ds={id:M.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:M.HTTP_ENDPOINT,type:n.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[lE,_l,Nl],abstractMethods:[xl],extends:[],methods:[]},Vt=B[n.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,kE={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},qE={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:Vt.properties.identifier.id,entityType:n.Property},HA={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:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:null,parent:kE,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:qE},Kr={id:"relational-database-built-in-base-entity-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},us={hidden:!1,required:!0,id:Vt.properties.identifier.id,name:"Identifier name",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:HA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Kr},zA={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},JE={id:"relational-database-built-in-base-entity-username-property-ref-id",type:n.GenericReference,entityId:Vt.properties.username.id,entityType:n.Property},ZA={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:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.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:JE},ps={hidden:!1,required:!0,id:Vt.properties.username.id,name:"Username",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:ZA,description:"The username that will be used to connect to the database.",parent:Kr},KA={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},WE={id:"relational-database-built-in-base-entity-password-property-ref-id",type:n.GenericReference,entityId:Vt.properties.password.id,entityType:n.Property},XA={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:WE},ys={hidden:!1,required:!0,id:Vt.properties.password.id,name:"Password",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:XA,description:"The password that will be used to connect to the database.",parent:Kr},YE={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},HE={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:n.GenericReference,entityId:Vt.properties.minSize.id,entityType:n.Property},QA={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:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:YE,autogeneration:null,valueAsType:null},parent:HE},hs={hidden:!0,required:!0,id:Vt.properties.minSize.id,name:"Minimum GB size",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:QA,description:"The minimum size of the database in GB.",parent:Kr},zE={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},ZE={id:"relational-database-built-in-base-entity-default-property-ref-id",type:n.GenericReference,entityId:Vt.properties.default.id,entityType:n.Property},eO={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:_n,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!1,parent:zE,autogeneration:null,valueAsType:null},parent:ZE},jl={hidden:!0,required:!0,id:Vt.properties.default.id,name:"Default",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:eO,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Kr},KE={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:Vt.properties.autoscaling.id,entityType:n.Property},XE={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},tO={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:_n,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!1,parent:XE,autogeneration:null,valueAsType:null},parent:KE},QE={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},kl={hidden:!0,required:!0,id:Vt.properties.autoscaling.id,name:"Auto-scaling",version:1,type:n.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:tO,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:QE},Mn={id:M.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:M.RELATIONAL_DATABASE,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[us,ps,ys,hs,jl,kl],abstractMethods:[],methods:[],extends:[]},eb={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.DeletePersistedEntity},ql={type:n.FunctionDeclaration,id:Ct.DeletePersistedEntity,name:Ct.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:eb,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},tb={type:n.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:n.BuiltInBaseEntity,id:Ct.SoftDeletePersistedEntity},nb={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:tb,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},rb=B[n.BuiltInBaseEntity][M.PERSISTED_ENTITY].properties,nO={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},ib={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},rO={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:Mn,asType:!1,defaultValue:null,parent:ib},ab={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},ji={hidden:!0,required:!0,id:rb.database.id,name:"Database",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:rO,description:"The database that the entity belongs to.",parent:ab},sb={id:"persisted-built-in-base-entity-identifier-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-data-type-id",entityType:n.DataType},ob={id:"persisted-built-in-base-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-id",entityType:n.Property},iO={like:!1,inferred:!1,id:"persisted-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:Wa,asType:!1,defaultValue:{id:"persisted-built-in-base-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.UUID,value:null,parent:sb,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:ob},lb={id:"persisted-built-in-base-entity-identifier-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},cb={hidden:!1,required:!0,id:rb.identifier.id,name:"Identifier",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:iO,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:lb},aO={id:"persisted-built-in-base-entity-deleted-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-data-type-id",entityType:n.DataType},db={id:"persisted-built-in-base-entity-deleted-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-id",entityType:n.Property},ub={like:!1,inferred:!1,id:"persisted-built-in-base-entity-deleted-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:hn,asType:!1,defaultValue:null,parent:db},pb={id:"persisted-built-in-base-entity-deleted-at-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},yb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-deleted-at-property-id",name:"Deleted at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:ub,description:"The date and time when the entity was deleted.",parent:pb},sO={id:"persisted-built-in-base-entity-created-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-data-type-id",entityType:n.DataType},hb={id:"persisted-built-in-base-entity-created-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-id",entityType:n.Property},fb={like:!1,inferred:!1,id:"persisted-built-in-base-entity-created-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:hn,asType:!1,defaultValue:null,parent:hb},mb={id:"persisted-built-in-base-entity-created-at-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},Tb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-created-at-property-id",name:"Created at",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!1,index:0,dataType:fb,description:"The date and time when the entity was created.",parent:mb},oO={id:"persisted-built-in-base-entity-updated-at-property-data-type-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-data-type-id",entityType:n.DataType},Eb={id:"persisted-built-in-base-entity-updated-at-property-ref-id",type:n.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-id",entityType:n.Property},bb={like:!1,inferred:!1,id:"persisted-built-in-base-entity-updated-at-property-data-type-id",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:hn,asType:!1,defaultValue:null,parent:Eb},Rb={id:"persisted-built-in-base-entity-updated-at-property-parent-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},gb={hidden:!1,required:!0,id:"persisted-built-in-base-entity-updated-at-property-id",name:"Updated at",version:1,type:n.Property,private:!1,implements:null,abstract:!0,static:!1,index:0,dataType:bb,description:"The date and time when the entity was last updated.",parent:Rb},ke={id:M.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:M.PERSISTED_ENTITY,type:n.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[ji,cb,yb,Tb,gb],methods:[ql,nb],extends:[]},vb={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},Jl={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:vb},Ib=B[n.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,lO={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},Db={id:"cron-job-built-in-base-entity-expression-property-ref",type:n.GenericReference,entityId:Ib.properties.expression.id,entityType:n.Property},cO={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:Db},Pb={id:"cron-job-built-in-base-entity-ref",type:n.GenericReference,entityId:M.CRON_JOB,entityType:n.BuiltInBaseEntity},Ab={hidden:!1,required:!0,id:Ib.properties.expression.id,name:"Cron expression",version:1,type:n.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:cO,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:Pb},Wl={id:M.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:M.CRON_JOB,type:n.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[Ab],methods:[],abstractMethods:[Jl],extends:[]},Ob={type:n.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:n.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Yl={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:Ob},Hl={id:M.EXECUTION,type:n.BuiltInBaseEntity,version:1,name:M.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:[Yl],abstractMethods:[]},dO=B[n.Condition]["not-empty"],Sb={type:n.GenericReference,id:"not-empty-condition-ref",entityType:n.ActionDescriptor,entityId:Mt.NotEmpty},Cb={id:dO.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},cr={type:n.ActionDescriptor,id:Mt.NotEmpty,version:1,name:Mt.NotEmpty,description:"Checks if the value is not empty",parent:null,inputs:[Cb],outputs:[],error:null},Bb={[Mt.NotEmpty]:cr},Xr=B[n.Condition]["more-than-or-equal"],wb={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:Xr.inputs.leftHand.id},_b={type:n.DataType,id:Xr.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:wb},Nb={type:n.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},Mb={id:Xr.inputs.leftHand.id,type:n.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:_b,required:!0,parentRelationType:O.FixedArguments,index:0,parent:Nb},Vb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-data-type-parent-ref",entityType:n.ValueDescriptor,entityId:Xr.inputs.rightHand.id},Lb={type:n.DataType,id:Xr.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:Vb},Gb={type:n.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:n.ActionDescriptor,entityId:$e.MoreThanOrEqual},$b={id:Xr.inputs.rightHand.id,type:n.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:Lb,required:!0,parentRelationType:O.FixedArguments,index:1,parent:Gb},Qr={type:n.ActionDescriptor,id:$e.MoreThanOrEqual,version:1,name:$e.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,inputs:[Mb,$b],outputs:[],error:null},Fb={[$e.MoreThanOrEqual]:Qr},uO={...Bb,...Fb},fs={type:n.ActionDescriptor,id:pn.PROJECT_PUBLICATION_COMPLETED,version:1,name:pn.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},pO={[pn.PROJECT_PUBLICATION_COMPLETED]:fs},zl=B[n.ValueDescriptor][tl.ActionOngoingProcessOutputValue],Ub={type:n.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:n.ValueDescriptor,entityId:zl.id},xb={like:!1,inferred:!1,id:zl.dataType.id,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Hl,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ub},Zl={id:zl.id,type:n.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:xb,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 Kl;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Kl||(Kl={}));const G=ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vn=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"]),yO=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 ei=(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 jb=ei;function hO(r){jb=r}function ms(){return jb}const Ts=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}},fO=[];function L(r,e){const t=ms(),i=Ts({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ei?void 0:ei].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"}),ti=r=>({status:"dirty",value:r}),yt=r=>({status:"valid",value:r}),Xl=r=>r.status==="aborted",Ql=r=>r.status==="dirty",ki=r=>r.status==="valid",qi=r=>typeof Promise<"u"&&r instanceof Promise;function Es(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 kb(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 Ji,Wi;class en{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 qb=(r,e)=>{if(ki(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 Vn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Vn(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:Vn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qi(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:Vn(e)},s=this._parseSync({data:e,path:a.path,parent:a});return qb(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:Vn(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(qi(a)?a:Promise.resolve(a));return qb(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 nn.create(this,this._def)}nullable(){return Fn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ht.create(this,this._def)}promise(){return ai.create(this,this._def)}or(e){return Zi.create([this,e],this._def)}and(e){return Ki.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 na({...Z(this._def),innerType:this,defaultValue:t,typeName:q.ZodDefault})}brand(){return new nc({typeName:q.ZodBranded,type:this,...Z(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ra({...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 ia.create(this,e)}readonly(){return aa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mO=/^c[^\s-]{8,}$/i,TO=/^[0-9a-z]+$/,EO=/^[0-9A-HJKMNP-TV-Z]{26}$/,bO=/^[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,RO=/^[a-z0-9_-]{21}$/i,gO=/^[-+]?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)?)??$/,vO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,IO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ec;const DO=/^(?:(?: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])$/,PO=/^(([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})))$/,AO=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Jb="((\\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])))",OO=new RegExp(`^${Jb}$`);function Wb(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 SO(r){return new RegExp(`^${Wb(r)}$`)}function Yb(r){let e=`${Jb}T${Wb(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 CO(r,e){return!!((e==="v4"||!e)&&DO.test(r)||(e==="v6"||!e)&&PO.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")vO.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")ec||(ec=new RegExp(IO,"u")),ec.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")bO.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")RO.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")mO.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")TO.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")EO.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"?Yb(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"?OO.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{code:w.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?SO(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"?gO.test(e.data)||(a=this._getOrReturnCtx(e,a),L(a,{validation:"duration",code:w.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?CO(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"?AO.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 BO(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 Ln 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"?BO(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 Ln({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Ln({...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)}}Ln.create=r=>new Ln({checks:[],typeName:q.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class Gn 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 Gn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:j.toString(a)}]})}_addCheck(e){return new Gn({...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}}Gn.create=r=>{var e;return new Gn({checks:[],typeName:q.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...Z(r)})};class Yi 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)}}Yi.create=r=>new Yi({typeName:q.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...Z(r)});class dr 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 dr({...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}}dr.create=r=>new dr({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:q.ZodDate,...Z(r)});class bs 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)}}bs.create=r=>new bs({typeName:q.ZodSymbol,...Z(r)});class Hi 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)}}Hi.create=r=>new Hi({typeName:q.ZodUndefined,...Z(r)});class zi 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)}}zi.create=r=>new zi({typeName:q.ZodNull,...Z(r)});class ni extends Q{constructor(){super(...arguments),this._any=!0}_parse(e){return yt(e.data)}}ni.create=r=>new ni({typeName:q.ZodAny,...Z(r)});class ur extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return yt(e.data)}}ur.create=r=>new ur({typeName:q.ZodUnknown,...Z(r)});class Tn extends Q{_parse(e){const t=this._getOrReturnCtx(e);return L(t,{code:w.invalid_type,expected:G.never,received:t.parsedType}),J}}Tn.create=r=>new Tn({typeName:q.ZodNever,...Z(r)});class Rs 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)}}Rs.create=r=>new Rs({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 en(t,o,t.path,l)))).then(o=>it.mergeArray(i,o));const s=[...t.data].map((o,l)=>a.type._parseSync(new en(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 ri(r){if(r instanceof qe){const e={};for(const t in r.shape){const i=r.shape[t];e[t]=nn.create(ri(i))}return new qe({...r._def,shape:()=>e})}else return r instanceof Ht?new Ht({...r._def,type:ri(r.element)}):r instanceof nn?nn.create(ri(r.unwrap())):r instanceof Fn?Fn.create(ri(r.unwrap())):r instanceof tn?tn.create(r.items.map(e=>ri(e))):r}class qe 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 Tn&&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 en(a,m,a.path,y)),alwaysSet:y in a.data})}if(this._def.catchall instanceof Tn){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 en(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 qe({...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 qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new qe({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 qe({...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 qe({...this._def,shape:()=>t})}omit(e){const t={};return ne.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new qe({...this._def,shape:()=>t})}deepPartial(){return ri(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 qe({...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 nn;)s=s._def.innerType;t[i]=s}}),new qe({...this._def,shape:()=>t})}keyof(){return Hb(ne.objectKeys(this.shape))}}qe.create=(r,e)=>new qe({shape:()=>r,unknownKeys:"strip",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)}),qe.strictCreate=(r,e)=>new qe({shape:()=>r,unknownKeys:"strict",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)}),qe.lazycreate=(r,e)=>new qe({shape:r,unknownKeys:"strip",catchall:Tn.create(),typeName:q.ZodObject,...Z(e)});class Zi 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}}Zi.create=(r,e)=>new Zi({options:r,typeName:q.ZodUnion,...Z(e)});const En=r=>r instanceof Qi?En(r.schema):r instanceof zt?En(r.innerType()):r instanceof ea?[r.value]:r instanceof $n?r.options:r instanceof ta?ne.objectValues(r.enum):r instanceof na?En(r._def.innerType):r instanceof Hi?[void 0]:r instanceof zi?[null]:r instanceof nn?[void 0,...En(r.unwrap())]:r instanceof Fn?[null,...En(r.unwrap())]:r instanceof nc||r instanceof aa?En(r.unwrap()):r instanceof ra?En(r._def.innerType):[];class gs 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=En(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 gs({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...Z(i)})}}function tc(r,e){const t=Vn(r),i=Vn(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=tc(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=tc(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 Ki extends Q{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Xl(s)||Xl(o))return J;const l=tc(s.value,o.value);return l.valid?((Ql(s)||Ql(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}))}}Ki.create=(r,e,t)=>new Ki({left:r,right:e,typeName:q.ZodIntersection,...Z(t)});class tn 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 en(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 tn({...this._def,rest:e})}}tn.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tn({items:r,typeName:q.ZodTuple,rest:null,...Z(e)})};class Xi 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 en(i,l,i.path,l)),value:o._parse(new en(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 Xi({keyType:e,valueType:t,typeName:q.ZodRecord,...Z(i)}):new Xi({keyType:Yt.create(),valueType:e,typeName:q.ZodRecord,...Z(t)})}}class vs 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 en(i,l,i.path,[y,"key"])),value:s._parse(new en(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}}}}vs.create=(r,e,t)=>new vs({valueType:e,keyType:r,typeName:q.ZodMap,...Z(t)});class pr 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 en(i,p,i.path,y)));return i.common.async?Promise.all(l).then(p=>o(p)):o(l)}min(e,t){return new pr({...this._def,minSize:{value:e,message:j.toString(t)}})}max(e,t){return new pr({...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)}}pr.create=(r,e)=>new pr({valueType:r,minSize:null,maxSize:null,typeName:q.ZodSet,...Z(e)});class ii 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 Ts({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ms(),ei].filter(y=>!!y),issueData:{code:w.invalid_arguments,argumentsError:p}})}function a(l,p){return Ts({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ms(),ei].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 ai){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 ii({...this._def,args:tn.create(e).rest(ur.create())})}returns(e){return new ii({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new ii({args:e||tn.create([]).rest(ur.create()),returns:t||ur.create(),typeName:q.ZodFunction,...Z(i)})}}class Qi 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})}}Qi.create=(r,e)=>new Qi({getter:r,typeName:q.ZodLazy,...Z(e)});class ea 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}}ea.create=(r,e)=>new ea({value:r,typeName:q.ZodLiteral,...Z(e)});function Hb(r,e){return new $n({values:r,typeName:q.ZodEnum,...Z(e)})}class $n extends Q{constructor(){super(...arguments),Ji.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(Es(this,Ji,"f")||kb(this,Ji,new Set(this._def.values),"f"),!Es(this,Ji,"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 $n.create(e,{...this._def,...t})}exclude(e,t=this._def){return $n.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}Ji=new WeakMap,$n.create=Hb;class ta extends Q{constructor(){super(...arguments),Wi.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(Es(this,Wi,"f")||kb(this,Wi,new Set(ne.getValidEnumValues(this._def.values)),"f"),!Es(this,Wi,"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}}Wi=new WeakMap,ta.create=(r,e)=>new ta({values:r,typeName:q.ZodNativeEnum,...Z(e)});class ai 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})))}}ai.create=(r,e)=>new ai({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"?ti(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"?ti(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(!ki(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=>ki(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 nn extends Q{_parse(e){return this._getType(e)===G.undefined?yt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nn.create=(r,e)=>new nn({innerType:r,typeName:q.ZodOptional,...Z(e)});class Fn extends Q{_parse(e){return this._getType(e)===G.null?yt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fn.create=(r,e)=>new Fn({innerType:r,typeName:q.ZodNullable,...Z(e)});class na 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}}na.create=(r,e)=>new na({innerType:r,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});class ra 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 qi(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}}ra.create=(r,e)=>new ra({innerType:r,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});class Is 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}}}Is.create=r=>new Is({typeName:q.ZodNaN,...Z(r)});const wO=Symbol("zod_brand");class nc 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 ia 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(),ti(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 ia({in:e,out:t,typeName:q.ZodPipeline})}}class aa extends Q{_parse(e){const t=this._def.innerType._parse(e),i=a=>(ki(a)&&(a.value=Object.freeze(a.value)),a);return qi(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}aa.create=(r,e)=>new aa({innerType:r,typeName:q.ZodReadonly,...Z(e)});function zb(r,e={},t){return r?ni.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})}}):ni.create()}const _O={object:qe.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 NO=(r,e={message:`Input not instance of ${r.name}`})=>zb(t=>t instanceof r,e),Ds=Yt.create,rc=Ln.create,MO=Is.create,VO=Gn.create,ic=Yi.create,Zb=dr.create,LO=bs.create,GO=Hi.create,Kb=zi.create,$O=ni.create,Ps=ur.create,FO=Tn.create,UO=Rs.create,xO=Ht.create,Xb=qe.create,jO=qe.strictCreate,kO=Zi.create,qO=gs.create,JO=Ki.create,WO=tn.create,Qb=Xi.create,YO=vs.create,HO=pr.create,zO=ii.create,ZO=Qi.create,KO=ea.create,eR=$n.create,XO=ta.create,QO=ai.create,tR=zt.create,eS=nn.create,tS=Fn.create,nS=zt.createWithPreprocess,rS=ia.create;var u=Object.freeze({__proto__:null,defaultErrorMap:ei,setErrorMap:hO,getErrorMap:ms,makeIssue:Ts,EMPTY_PATH:fO,addIssueToContext:L,ParseStatus:it,INVALID:J,DIRTY:ti,OK:yt,isAborted:Xl,isDirty:Ql,isValid:ki,isAsync:qi,get util(){return ne},get objectUtil(){return Kl},ZodParsedType:G,getParsedType:Vn,ZodType:Q,datetimeRegex:Yb,ZodString:Yt,ZodNumber:Ln,ZodBigInt:Gn,ZodBoolean:Yi,ZodDate:dr,ZodSymbol:bs,ZodUndefined:Hi,ZodNull:zi,ZodAny:ni,ZodUnknown:ur,ZodNever:Tn,ZodVoid:Rs,ZodArray:Ht,ZodObject:qe,ZodUnion:Zi,ZodDiscriminatedUnion:gs,ZodIntersection:Ki,ZodTuple:tn,ZodRecord:Xi,ZodMap:vs,ZodSet:pr,ZodFunction:ii,ZodLazy:Qi,ZodLiteral:ea,ZodEnum:$n,ZodNativeEnum:ta,ZodPromise:ai,ZodEffects:zt,ZodTransformer:zt,ZodOptional:nn,ZodNullable:Fn,ZodDefault:na,ZodCatch:ra,ZodNaN:Is,BRAND:wO,ZodBranded:nc,ZodPipeline:ia,ZodReadonly:aa,custom:zb,Schema:Q,ZodSchema:Q,late:_O,get ZodFirstPartyTypeKind(){return q},coerce:{string:r=>Yt.create({...r,coerce:!0}),number:r=>Ln.create({...r,coerce:!0}),boolean:r=>Yi.create({...r,coerce:!0}),bigint:r=>Gn.create({...r,coerce:!0}),date:r=>dr.create({...r,coerce:!0})},any:$O,array:xO,bigint:VO,boolean:ic,date:Zb,discriminatedUnion:qO,effect:tR,enum:eR,function:zO,instanceof:NO,intersection:JO,lazy:ZO,literal:KO,map:YO,nan:MO,nativeEnum:XO,never:FO,null:Kb,nullable:tS,number:rc,object:Xb,oboolean:()=>ic().optional(),onumber:()=>rc().optional(),optional:eS,ostring:()=>Ds().optional(),pipeline:rS,preprocess:nS,promise:QO,record:Qb,set:HO,strictObject:jO,string:Ds,symbol:LO,transformer:tR,tuple:WO,undefined:GO,union:kO,unknown:Ps,void:UO,NEVER:J,ZodIssueCode:w,quotelessJson:yO,ZodError:It});function nR(r){var a,s,o;if(!(r!=null&&r.dataType))return Ps();const e=r.dataType.isNullable||!1,t=r.dataType.isList||!1;let i=Ps();if(((a=r.dataType.entity)==null?void 0:a.type)===n.PrimitiveEntity)switch(r.dataType.entity.name){case P.String:i=Ds();break;case P.JSON:i=Qb(Ps());break;case P.Number:i=rc();break;case P.Boolean:i=ic();break;case P.Date:i=Zb();break;case P.Enum:{const l=r.dataType.options||[];if(l.length===0)throw new Error(`Enum property ${r.name} has no options`);i=eR(l);break}case P.Null:i=Kb();break;case P.UUID:i=Ds().uuid();break}else if(((s=r.dataType.entity)==null?void 0:s.type)===n.CustomEntity)i=rR(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 rR(r){const e=Xb({});for(const t of r.properties){const i=nR(t);e.shape[t.name]=i}return e}function iR(r){const e=r.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function aR(r){const e=r.rangeEnd;return new Date(Math.random()*e.getTime())}function sR(r){const e=r.rangeStart,t=r.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function oR(r){return r.rangeStart&&r.rangeEnd?sR(r):r.rangeStart?iR(r):r.rangeEnd?aR(r):new Date}function iS(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var lR={},As={},Os={};Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=sS;let Ss;const aS=new Uint8Array(16);function sS(){if(!Ss&&(Ss=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ss))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ss(aS)}var Un={},yr={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=void 0;var oS=/^(?:[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;Cs.default=oS,Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=void 0;var lS=cS(Cs);function cS(r){return r&&r.__esModule?r:{default:r}}function dS(r){return typeof r=="string"&&lS.default.test(r)}var uS=dS;yr.default=uS,Object.defineProperty(Un,"__esModule",{value:!0}),Un.default=void 0,Un.unsafeStringify=cR;var pS=yS(yr);function yS(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 cR(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 hS(r,e=0){const t=cR(r,e);if(!(0,pS.default)(t))throw TypeError("Stringified UUID is invalid");return t}var fS=hS;Un.default=fS,Object.defineProperty(As,"__esModule",{value:!0}),As.default=void 0;var mS=ES(Os),TS=Un;function ES(r){return r&&r.__esModule?r:{default:r}}let dR,ac,sc=0,oc=0;function bS(r,e,t){let i=e&&t||0;const a=e||new Array(16);r=r||{};let s=r.node||dR,o=r.clockseq!==void 0?r.clockseq:ac;if(s==null||o==null){const R=r.random||(r.rng||mS.default)();s==null&&(s=dR=[R[0]|1,R[1],R[2],R[3],R[4],R[5]]),o==null&&(o=ac=(R[6]<<8|R[7])&16383)}let l=r.msecs!==void 0?r.msecs:Date.now(),p=r.nsecs!==void 0?r.nsecs:oc+1;const y=l-sc+(p-oc)/1e4;if(y<0&&r.clockseq===void 0&&(o=o+1&16383),(y<0||l>sc)&&r.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");sc=l,oc=p,ac=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,TS.unsafeStringify)(a)}var RS=bS;As.default=RS;var Bs={},xn={},sa={};Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0;var gS=vS(yr);function vS(r){return r&&r.__esModule?r:{default:r}}function IS(r){if(!(0,gS.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 DS=IS;sa.default=DS,Object.defineProperty(xn,"__esModule",{value:!0}),xn.URL=xn.DNS=void 0,xn.default=CS;var PS=Un,AS=OS(sa);function OS(r){return r&&r.__esModule?r:{default:r}}function SS(r){r=unescape(encodeURIComponent(r));const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}const uR="6ba7b810-9dad-11d1-80b4-00c04fd430c8";xn.DNS=uR;const pR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";xn.URL=pR;function CS(r,e,t){function i(a,s,o,l){var p;if(typeof a=="string"&&(a=SS(a)),typeof s=="string"&&(s=(0,AS.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,PS.unsafeStringify)(y)}try{i.name=r}catch{}return i.DNS=uR,i.URL=pR,i}var ws={};Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;function BS(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 wS(_S(NS(r),r.length*8))}function wS(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 yR(r){return(r+64>>>9<<4)+14+1}function _S(r,e){r[e>>5]|=128<<e%32,r[yR(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=jn(t,l),i=jn(i,p),a=jn(a,y),s=jn(s,h)}return[t,i,a,s]}function NS(r){if(r.length===0)return[];const e=r.length*8,t=new Uint32Array(yR(e));for(let i=0;i<e;i+=8)t[i>>5]|=(r[i/8]&255)<<i%32;return t}function jn(r,e){const t=(r&65535)+(e&65535);return(r>>16)+(e>>16)+(t>>16)<<16|t&65535}function MS(r,e){return r<<e|r>>>32-e}function _s(r,e,t,i,a,s){return jn(MS(jn(jn(e,r),jn(i,s)),a),t)}function at(r,e,t,i,a,s,o){return _s(e&t|~e&i,r,e,a,s,o)}function st(r,e,t,i,a,s,o){return _s(e&i|t&~i,r,e,a,s,o)}function ot(r,e,t,i,a,s,o){return _s(e^t^i,r,e,a,s,o)}function lt(r,e,t,i,a,s,o){return _s(t^(e|~i),r,e,a,s,o)}var VS=BS;ws.default=VS,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var LS=hR(xn),GS=hR(ws);function hR(r){return r&&r.__esModule?r:{default:r}}var $S=(0,LS.default)("v3",48,GS.default);Bs.default=$S;var Ns={},Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var FS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Ms.default=FS,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var fR=mR(Ms),US=mR(Os),xS=Un;function mR(r){return r&&r.__esModule?r:{default:r}}function jS(r,e,t){if(fR.default.randomUUID&&!e&&!r)return fR.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,xS.unsafeStringify)(i)}var kS=jS;Ns.default=kS;var Vs={},Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;function qS(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 lc(r,e){return r<<e|r>>>32-e}function JS(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]=lc(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 D=Math.floor(v/20),A=lc(p,5)+qS(D,y,h,m)+R+e[D]+l[v]>>>0;R=m,m=h,h=lc(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 WS=JS;Ls.default=WS,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=void 0;var YS=TR(xn),HS=TR(Ls);function TR(r){return r&&r.__esModule?r:{default:r}}var zS=(0,YS.default)("v5",80,HS.default);Vs.default=zS;var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.default=void 0;var ZS="00000000-0000-0000-0000-000000000000";Gs.default=ZS;var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.default=void 0;var KS=XS(yr);function XS(r){return r&&r.__esModule?r:{default:r}}function QS(r){if(!(0,KS.default)(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var eC=QS;$s.default=eC,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(As),t=h(Bs),i=h(Ns),a=h(Vs),s=h(Gs),o=h($s),l=h(yr),p=h(Un),y=h(sa);function h(m){return m&&m.__esModule?m:{default:m}}}(lR);function cc(r,e){if(!r||!e||!r.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=r,this.dstAlphabet=e}cc.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},cc.prototype.isValid=function(r){for(var e=0;e<r.length;++e)if(this.srcAlphabet.indexOf(r[e])===-1)return!1;return!0};var tC=cc,nC=tC;function oa(r,e){var t=new nC(r,e);return function(i){return t.convert(i)}}oa.BIN="01",oa.OCT="01234567",oa.DEC="0123456789",oa.HEX="0123456789abcdef";var rC=oa;const{v4:dc,validate:iC}=lR,Fs=rC,uc={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},aC={consistentLength:!0};let pc;const ER=(r,e,t)=>{const i=e(r.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},bR=(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("-")},sC=r=>Math.ceil(Math.log(2**128)/Math.log(r));var oC=(()=>{const r=(e,t)=>{const i=e||uc.flickrBase58,a={...aC,...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=sC(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},l=Fs(Fs.HEX,i),p=Fs(i,Fs.HEX),y=()=>ER(dc(),l,o),m={alphabet:i,fromUUID:R=>ER(R,l,o),maxLength:s,generate:y,new:y,toUUID:R=>bR(R,p),uuid:dc,validate:(R,v=!1)=>{if(!R||typeof R!="string")return!1;const D=a.consistentLength?R.length===s:R.length<=s,A=R.split("").every(I=>i.includes(I));return v===!1?D&&A:D&&A&&iC(bR(R,p))}};return Object.freeze(m),m};return r.constants=uc,r.uuid=dc,r.generate=()=>(pc||(pc=r(uc.flickrBase58).generate),pc()),r})();const Us=iS(oC);function RR(){return Us().uuid()}function gR(r){return r.rangeStart+Math.random()}function vR(r){const e=r.rangeEnd;return Math.random()*e}function IR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random()*(t-e)+e}function DR(r){return r.rangeStart&&r.rangeEnd?IR(r):r.rangeStart?gR(r):r.rangeEnd?vR(r):Math.random()}function PR(r){const e=r.rangeStart;return Math.random().toString(36).substring(e)}function AR(r){const e=r.rangeEnd;return Math.random().toString(36).substring(0,e)}function OR(r){const e=r.rangeStart,t=r.rangeEnd;return Math.random().toString(36).substring(e,t)}function SR(r){return r.rangeStart&&r.rangeEnd?OR(r):r.rangeStart?PR(r):r.rangeEnd?AR(r):Math.random().toString(36)}function CR(r){return Math.random()>=.5}function lC(r){if(!r||!r.autogeneration)return null;switch(r.autogeneration.type){case We.CurrentDateAndTime:if(r.name===P.Date)return new Date;case We.Random:{if(r.name===P.Date)return oR(r.autogeneration);if(r.name===P.Number)return DR(r.autogeneration);if(r.name===P.String)return SR(r.autogeneration);if(r.name===P.Boolean)return CR(r.autogeneration)}case We.Unique:if(r.name===P.UUID)return RR();default:throw new Error(`Generating a ${r.autogeneration.type} value for a ${r.name} is not supported`)}}const Y="e7eb5382-3d99-44fd-972a-b8b1e819f6be",yc="global-user-variable-id",BR="last-executed-timestamp-variable-id",cC={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},dC={id:"alternative-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:n.Property},uC={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:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:null,parent:cC,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:dC},xs={id:"alternative-relational-database-entity-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},pC={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:us,static:!0,index:0,dataType:uC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:xs};n.GenericReference,n.DataType;const yC={id:"alternative-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:n.Property},hC={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:yC},fC={hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:1,dataType:hC,description:"The username that will be used to connect to the database.",parent:xs};n.GenericReference,n.DataType;const mC={id:"alternative-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:n.Property},TC={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:mC},EC={hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:2,dataType:TC,description:"The password that will be used to connect to the database.",parent:xs},bC={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},RC={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},gC={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:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:bC,autogeneration:null,valueAsType:null},parent:RC},vC={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:hs,static:!0,index:3,dataType:gC,description:"The minimum size of the database in GB.",parent:xs},IC={id:"alternative-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},wR={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:[pC,fC,EC,vC],methods:[],abstractMethods:[],extends:[],implements:[Mn],x:0,y:0,parent:IC},DC={id:"animal-prototype-database-property-ref-id",type:n.GenericReference,entityId:"animal-prototype-database-property-id",entityType:n.Property},PC={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},AC={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:Mn,asType:!1,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:wR,autogeneration:null,parent:PC},parent:DC},OC={id:"animal-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},SC={hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:ji,static:!0,index:0,dataType:AC,description:"The database that the entity belongs to.",parent:OC},CC={type:n.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:n.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},BC={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:CC},wC={type:n.GenericReference,id:"e2b9e456-f2b3-4dc7-85a2-fbb68ed0c9c7",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},_C={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:BC,abstract:!1,parent:wC},NC={type:n.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:n.Project,entityId:Y},MC={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:[SC,_C],methods:[],extends:[],implements:[ke],x:0,y:0,parent:NC},VC={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},LC={id:"default-relational-database-entity-identifier-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:n.Property},GC={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:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"main",parent:VC,autogeneration:{type:We.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:LC},si={id:"default-relational-database-entity-ref-id",type:n.GenericReference,entityId:M.PERSISTED_ENTITY,entityType:n.BuiltInBaseEntity},$C={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:us,static:!0,index:0,dataType:GC,description:"The name of the main database inside of the server instance where the data will be stored.",parent:si};n.GenericReference,n.DataType;const FC={id:"default-relational-database-entity-username-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:n.Property},UC={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},xC={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:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"root",parent:UC,autogeneration:null,valueAsType:null},parent:FC},jC={hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:n.Property,private:!1,abstract:!1,implements:ps,static:!0,index:1,dataType:xC,description:"The username that will be used to connect to the database.",parent:si};n.GenericReference,n.DataType;const kC={id:"default-relational-database-entity-password-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:n.Property},qC={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},JC={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:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"password",parent:qC,autogeneration:null,valueAsType:null},parent:kC},WC={hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:n.Property,private:!1,abstract:!1,implements:ys,static:!0,index:2,dataType:JC,description:"The password that will be used to connect to the database.",parent:si},YC={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},HC={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},zC={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:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:6,parent:YC,autogeneration:null,valueAsType:null},parent:HC},ZC={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:hs,static:!0,index:3,dataType:zC,description:"The minimum size of the database in GB.",parent:si},KC={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},XC={id:"default-relational-database-entity-default-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:n.Property},QC={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:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!0,parent:KC,autogeneration:null,valueAsType:null},parent:XC},eB={hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:n.Property,private:!1,abstract:!1,implements:jl,static:!0,index:4,dataType:QC,description:"Whether this database is automatically picked by other entities as the default database.",parent:si},tB={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},nB={id:"default-relational-database-entity-autoscaling-property-ref-id",type:n.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:n.Property},rB={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:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.Boolean,value:!0,parent:tB,autogeneration:null,valueAsType:null},parent:nB},iB={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:kl,static:!0,index:5,dataType:rB,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:si},aB={id:"default-relational-database-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},hc={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:[eB,iB,$C,jC,WC,ZC],methods:[],abstractMethods:[],extends:[],implements:[Mn],x:0,y:0,parent:aB},sB={id:"user-prototype-database-property-data-type-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:n.DataType},oB={id:"user-prototype-database-property-ref-id",type:n.GenericReference,entityId:"user-prototype-database-property-id",entityType:n.Property},lB={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:Mn,asType:!1,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:hc,autogeneration:null,parent:sB},parent:oB},cB={id:"user-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},dB={hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:ji,static:!0,index:0,dataType:lB,description:"The database that the entity belongs to.",parent:cB},uB={type:n.GenericReference,id:"user-prototype-parent-ref-id",entityType:n.Project,entityId:Y},fc={type:n.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[ke],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[dB],methods:[],x:0,y:0,parent:uB},pB={type:n.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:n.Property,entityId:"person-date-of-birth-property-id"},yB={like:!1,inferred:!1,id:"person-date-of-birth-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:hn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:pB},hB={type:n.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},fB={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:yB,abstract:!1,parent:hB},mB={type:n.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:n.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},TB={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:mB},EB={type:n.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:n.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},bB={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:TB,abstract:!1,parent:EB},RB={type:n.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:n.Project,entityId:Y},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:[bB,fB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[fc],x:0,y:0,parent:RB},gB={type:n.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},vB={type:n.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:n.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},IB={type:n.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},DB={type:n.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:n.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},PB={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:DB},mc={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:n.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:PB,implements:null,readsValue:IB,required:!0,index:0,parent:vB},AB={type:n.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},OB={type:n.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:n.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},_R={type:n.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[mc],calledByError:[],calledByEntry:[AB],calledBySuccess:[],throws:null,x:0,y:0,parent:OB},SB={type:n.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:n.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},CB={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:SB},NR={id:"500dee3a-3435-4453-9699-0d053f646523",type:n.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:CB,implements:null,required:!0,writesValues:[mc],index:0,parent:gB},BB={type:n.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},MR={type:n.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[NR],calls:[_R],returnStatements:[_R],index:0,collapsed:!1,private:!1,x:0,y:0,parent:BB},wB={type:n.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:n.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},_B={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:wB},NB={type:n.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:n.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},MB={type:n.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},VB={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:n.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:_B,readsValue:NB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:MB},LB={type:n.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},GB={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:n.OutputMap,version:1,declaration:mc,writesValues:[VB],index:0,parent:LB},$B={type:n.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},FB={type:n.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},UB={type:n.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},xB={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:UB},jB={type:n.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},kB={type:n.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},qB={type:n.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:n.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},JB={type:n.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:n.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},VR={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:n.InputMap,version:1,declaration:NR,name:null,description:null,readsValue:JB,defaultValue:null,index:0,parent:qB},WB={type:n.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:xB,readsValue:jB,writesValues:[VR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:kB},YB={type:n.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:MR,inputs:[VR],outputs:[GB],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[$B],calledBySuccess:[],parent:FB,error:null,x:0,y:0},HB={type:n.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:n.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},zB={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:HB},ZB={type:n.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:n.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},KB={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:n.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:zB,implements:null,required:!0,index:0,writesValues:[WB],parent:ZB},XB={type:n.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},QB={type:n.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[KB],collapsed:!0,returnStatements:[],calls:[YB],private:!1,index:0,implements:null,x:0,y:0,parent:XB},ew={type:n.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:n.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},tw={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:ew},nw={type:n.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},rw={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:tw,abstract:!1,parent:nw},iw={type:n.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:n.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},aw={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:iw},sw={type:n.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:n.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},ow={hidden:!1,required:!0,type:n.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:aw,implements:null,static:!1,private:!0,abstract:!1,parent:sw},lw={type:n.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:n.Project,entityId:Y},oi={type:n.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[rw,ow],methods:[MR,QB],extends:[],implements:[ke],x:0,y:0,parent:lw},la="bitcoin-api-response-id",LR="time-property-id",GR="disclaimer-property-id",$R="chart-name-property-id",FR="bpi-property-id",js="bpi-entity-id",UR="usd-property-id",xR="gbp-property-id",jR="eur-property-id",li="currency-entity-id",kR="currency-code-property-id",qR="currency-symbol-property-id",JR="currency-rate-property-id",WR="currency-description-property-id",YR="currency-rate-number-property-id",cw={type:n.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:n.Property,entityId:kR},dw={like:!1,inferred:!1,id:"code-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:cw},uw={type:n.GenericReference,id:"code-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},pw={hidden:!1,required:!0,type:n.Property,id:kR,version:1,name:"code",description:null,dataType:dw,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:uw},yw={type:n.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:n.Property,entityId:qR},hw={like:!1,inferred:!1,id:"symbol-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["&#36;","&pound;","&euro;"],constant:!1,parent:yw},fw={type:n.GenericReference,id:"symbol-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},mw={hidden:!1,required:!0,type:n.Property,id:qR,version:1,name:"symbol",description:null,index:0,dataType:hw,implements:null,static:!1,private:!1,abstract:!1,parent:fw},Tw={type:n.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:n.Property,entityId:JR},Ew={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:Tw},bw={type:n.GenericReference,id:"rate-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Rw={hidden:!1,required:!0,type:n.Property,id:JR,version:1,name:"rate",description:null,index:0,dataType:Ew,implements:null,static:!1,private:!1,abstract:!1,parent:bw},gw={type:n.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:n.Property,entityId:WR},vw={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:gw},Iw={type:n.GenericReference,id:"description-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Dw={hidden:!1,required:!0,type:n.Property,id:WR,version:1,name:"description",description:null,dataType:vw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Iw},Pw={type:n.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:n.Property,entityId:YR},Aw={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:Pw},Ow={type:n.GenericReference,id:"rate-number-property-parent-ref-id",entityType:n.CustomEntity,entityId:li},Sw={hidden:!1,required:!0,type:n.Property,id:YR,version:1,name:"rate_float",description:null,dataType:Aw,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:Ow},Cw={type:n.GenericReference,id:"currency-prototype-parent-ref-id",entityType:n.Project,entityId:Y},ks={type:n.CustomEntity,id:li,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[pw,mw,Rw,Dw,Sw],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:Cw},Bw={type:n.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:n.Property,entityId:UR},ww={like:!1,inferred:!1,id:"usd-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Bw},_w={type:n.GenericReference,id:"usd-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},Nw={hidden:!1,required:!0,id:UR,type:n.Property,version:1,name:"USD",description:null,index:0,dataType:ww,implements:null,static:!1,private:!1,abstract:!1,parent:_w},Mw={type:n.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:n.Property,entityId:xR},Vw={like:!1,inferred:!1,id:"gbp-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Mw},Lw={type:n.GenericReference,id:"gbp-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},Gw={hidden:!1,required:!0,id:xR,type:n.Property,version:1,name:"GBP",description:null,index:0,dataType:Vw,implements:null,static:!1,private:!1,abstract:!1,parent:Lw},$w={type:n.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:n.Property,entityId:jR},Fw={like:!1,inferred:!1,id:"eur-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ks,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:$w},Uw={type:n.GenericReference,id:"eur-property-parent-ref-id",entityType:n.CustomEntity,entityId:js},xw={hidden:!1,required:!0,id:jR,type:n.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:Fw,private:!1,abstract:!1,parent:Uw},jw={type:n.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:n.Project,entityId:Y},HR={type:n.CustomEntity,id:js,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[Nw,Gw,xw],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:jw},kw={type:n.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:n.Property,entityId:LR},qw={like:!1,inferred:!1,id:"time-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nl,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kw},Jw={type:n.GenericReference,id:"time-property-parent-ref-id",entityType:n.CustomEntity,entityId:la},Ww={hidden:!1,required:!0,type:n.Property,id:LR,version:1,name:"time",description:null,index:0,dataType:qw,implements:null,static:!1,private:!1,abstract:!1,parent:Jw},Yw={type:n.GenericReference,id:"disclaimer-property-data-type-parent-ref-id",entityType:n.Property,entityId:GR},Hw={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:Yw},zw={type:n.GenericReference,id:"disclaimer-property-parent-ref-id",entityType:n.CustomEntity,entityId:la},Zw={hidden:!1,required:!0,type:n.Property,id:GR,version:1,name:"disclaimer",description:null,index:0,dataType:Hw,implements:null,static:!1,private:!1,abstract:!1,parent:zw},Kw={type:n.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:n.Property,entityId:$R},Xw={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:Kw},Qw={type:n.GenericReference,id:"chart-name-property-parent-ref-id",entityType:n.CustomEntity,entityId:la},e_={hidden:!1,required:!0,type:n.Property,id:$R,version:1,name:"chartName",description:null,index:0,dataType:Xw,implements:null,static:!1,private:!1,abstract:!1,parent:Qw},t_={type:n.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:n.Property,entityId:FR},n_={like:!1,inferred:!1,id:"bpi-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:HR,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:t_},r_={type:n.GenericReference,id:"bpi-property-parent-ref-id",entityType:n.CustomEntity,entityId:la},i_={hidden:!1,required:!0,type:n.Property,id:FR,version:1,name:"bpi",description:null,implements:null,index:0,dataType:n_,static:!1,private:!1,abstract:!1,parent:r_},a_={type:n.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:n.Project,entityId:Y},zR={type:n.CustomEntity,id:la,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[Ww,Zw,e_,i_],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:a_},s_={type:n.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},o_={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:s_},l_={type:n.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:n.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},c_={type:n.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:n.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},d_={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:c_},u_={type:n.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:n.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},ZR={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:d_,readsValue:u_,required:!0,index:0,parent:l_},p_={type:n.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},y_={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:n.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,implements:null,dataType:o_,writesValues:[ZR],required:!0,index:0,parent:p_},h_={type:n.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},f_={type:n.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},m_={type:n.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},KR={type:n.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[ZR],calledByError:[],calledByEntry:[f_],calledBySuccess:[],throws:null,x:0,y:0,parent:m_},T_={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:[y_],calls:[KR],index:0,collapsed:!1,implements:null,returnStatements:[KR],private:!1,x:0,y:0,parent:h_},E_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},b_={type:n.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},R_={type:n.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:n.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},g_={type:n.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},v_={type:n.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:n.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},I_={like:!1,inferred:!1,id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:v_},Tc={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:I_,implements:null,readsValue:g_,required:!0,index:0,parent:R_},D_={type:n.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Ec={type:n.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[Tc],calledByError:[],calledByEntry:[],calledBySuccess:[E_,D_],throws:null,x:0,y:0,parent:b_},P_={type:n.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},A_={type:n.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},XR={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Rl,name:null,description:null,readsValue:A_,defaultValue:null,parent:P_,index:2},O_={type:n.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:n.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},S_={like:!1,inferred:!1,id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:O_},C_={type:n.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},B_={type:n.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:n.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},w_={type:n.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:n.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},QR={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:S_,readsValue:B_,writesValues:[Tc],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[w_],successCalls:[Ec],errorCalls:[],internalCalls:[],x:0,y:0,parent:C_},__={type:n.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:n.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},N_={type:n.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},M_={type:n.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:Xa,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:n.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:P.String,valueAsType:null,parent:__,autogeneration:null},index:1,parent:N_},V_={type:n.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},L_={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:n.OutputMap,version:1,declaration:rs,index:2,writesValues:[QR],parent:V_},G_={type:n.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},$_={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:n.InputMap,version:1,declaration:Ka,name:null,description:null,readsValue:null,index:0,defaultValue:null,parent:G_},F_={type:n.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},U_={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:n.InputMap,version:1,name:null,description:null,declaration:Qa,index:3,readsValue:null,defaultValue:null,parent:F_},x_={type:n.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},j_={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:n.InputMap,version:1,declaration:es,name:null,description:null,readsValue:null,index:4,defaultValue:null,parent:x_},k_={type:n.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},q_={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:n.OutputMap,version:1,declaration:ns,index:1,writesValues:[],parent:k_},J_={type:n.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},W_={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:n.OutputMap,version:1,declaration:ts,index:0,writesValues:[],parent:J_},Y_={type:n.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},H_={type:n.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},z_={type:n.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},Z_={type:n.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:n.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},K_={type:n.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:n.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},X_={like:!1,inferred:!1,id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:K_},Q_={type:n.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:n.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},eg={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:X_,implements:null,required:!0,readsValue:null,index:0,parent:Q_},eN={type:n.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[Z_],throws:eg,x:0,y:0,parent:z_},tN={type:n.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:n.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},nN={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:n.OutputMap,declaration:gl,version:1,writesValues:[eg],index:0,parentRelationType:Wr.Error,parent:tN},rN={type:n.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:Li,inputs:[$_,M_,XR,U_,j_],outputs:[W_,q_,L_],process:null,calledByError:[],calledByEntry:[Y_],calledBySuccess:[],successCalls:[Ec,QR],errorCalls:[eN],error:nN,x:0,y:0,parent:H_},iN={type:n.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:n.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},aN={type:n.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},sN={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:n.InputMap,version:1,declaration:Ha,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"?name=",name:P.String,parent:iN,valueAsType:null,autogeneration:null},index:0,parent:aN},oN={type:n.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},lN={type:n.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},cN={type:n.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:n.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},dN={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:cN},uN={type:n.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:n.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},pN={type:n.GenericReference,id:"assembled-query-string-called-by-ref",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},tg={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:dN,readsValue:uN,writesValues:[XR],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[pN],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:lN},yN={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:n.OutputMap,version:1,writesValues:[tg],declaration:Mi,index:0,parent:oN},hN={type:n.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},fN={type:n.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},mN={type:n.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:n.ArgumentDeclaration},TN={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},ng={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:n.InputMap,declaration:za,name:null,description:null,readsValue:mN,defaultValue:null,index:1,parent:TN},EN={type:n.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:Vi,version:1,inputs:[ng,sN],outputs:[yN],process:null,calledByError:[],calledByEntry:[hN],calledBySuccess:[],successCalls:[tg],errorCalls:[],error:null,x:0,y:0,parent:fN},bN={type:n.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:n.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},RN={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:bN},gN={type:n.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:n.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},rg={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:RN,implements:null,required:!1,writesValues:[ng],index:0,parent:gN},vN={type:n.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:n.Project,entityId:Y},ig={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:[rg],calls:[EN,rN],returnStatements:[Ec],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:vN},IN={type:n.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},DN={type:n.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},PN={type:n.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},AN={type:n.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},ag={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:n.InputMap,declaration:rg,name:null,description:null,readsValue:PN,defaultValue:null,index:0,parent:AN},ON={type:n.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},SN={type:n.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:n.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},CN={like:!1,inferred:!1,id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:_n,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:SN},BN={type:n.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:n.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},wN={type:n.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},_N={type:n.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:n.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},sg={type:n.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:CN,readsValue:BN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[_N],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:wN},NN={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:n.OutputMap,version:1,declaration:Tc,writesValues:[sg],index:0,parent:ON},MN={type:n.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:ig,inputs:[ag],outputs:[NN],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[IN],successCalls:[sg],errorCalls:[],error:null,x:0,y:0,parent:DN},VN={type:n.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},LN={type:n.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},GN={type:n.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},$N={type:n.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:n.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},og={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:n.InputMap,declaration:cr.inputs[0],name:null,description:null,readsValue:GN,defaultValue:null,index:0,parent:$N},FN={type:n.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:cr,inputs:[og],calledByError:[],calledByEntry:[VN],calledBySuccess:[],successCalls:[MN],errorCalls:[],x:0,y:0,parent:LN},UN={type:n.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},xN={type:n.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:n.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},jN={like:!1,inferred:!1,id:"d64152ea-831f-4426-9506-a39bfa170513",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xN},kN={type:n.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},qN={type:n.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},JN={type:n.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},lg={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:jN,readsValue:qN,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[JN],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:kN},WN={type:n.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:n.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},YN={like:!1,inferred:!1,id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WN},HN={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:n.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:YN,implements:null,required:!0,index:1,writesValues:[lg],parent:UN},zN={type:n.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},ZN={type:n.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:n.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},KN={type:n.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:n.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},XN={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:KN},QN={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:n.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:XN,implements:null,required:!0,index:0,writesValues:[og,ag],parent:ZN},eM={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:[QN,HN],calls:[FN,lg],index:1,private:!1,implements:null,x:0,y:0,parent:zN},tM={type:n.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},nM={type:n.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-manager-property-id"},rM={like:!1,inferred:!1,id:"employee-manager-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:tM,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:nM},iM={type:n.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},aM={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:rM,abstract:!1,parent:iM},sM={type:n.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:n.Property,entityId:"employee-start-date-property-id"},oM={like:!1,inferred:!1,id:"employee-start-date-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:hn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:sM},lM={type:n.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},cM={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:oM,abstract:!1,parent:lM},dM={type:n.GenericReference,id:"employee-department-property-ref-id",entityType:n.Property,entityId:"employee-department-property-id"},uM={like:!1,inferred:!1,id:"employee-department-property-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Nn,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:dM},pM={type:n.GenericReference,id:"employee-department-property-parent-ref-id",entityType:n.CustomEntity,entityId:"employee-entity-id"},yM={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:uM,abstract:!1,parent:pM},hM={type:n.GenericReference,id:"employee-prototype-parent-ref-id",entityType:n.Project,entityId:Y},Lt={type:n.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[yM,cM,aM],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ht],x:0,y:0,parent:hM},fM={type:n.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:n.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},mM={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:fM},TM={type:n.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},EM={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:mM,abstract:!1,parent:TM},bM={type:n.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:n.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},RM={like:!1,inferred:!1,id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:oi,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bM},gM={type:n.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bc={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:RM,abstract:!1,parent:gM},vM={type:n.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:n.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},IM={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:vM},DM={type:n.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},PM={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:IM,private:!0,abstract:!1,parent:DM},AM={type:n.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:n.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},OM={like:!1,inferred:!1,id:"ad44250b-40c2-48f7-a480-381fa938f562",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:AM},SM={type:n.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:n.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},CM={hidden:!1,required:!0,type:n.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:OM,implements:null,private:!0,static:!1,abstract:!1,parent:SM},BM={type:n.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:n.Project,entityId:Y},Gt={type:n.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[EM,bc,PM,CM],static:!1,abstract:!1,abstractMethods:[],methods:[T_,eM],extends:[],implements:[ke],x:0,y:0,parent:BM},wM={type:n.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:n.Project,entityId:Y},Rc={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:wM};n.GenericReference,n.DataType;const _M={id:"cron-job-entity-expression-property-ref-id",type:n.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:n.Property},NM={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:_M},MM={id:"cron-job-entity-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},VM={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:NM,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:MM},LM={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},GM={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},$M={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:n.FunctionCall,declaration:Rc,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[LM],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:GM},FM={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:n.GenericReference,entityId:"cron-job-entity-id",entityType:n.CustomEntity},UM={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:Jl,calls:[$M],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:FM},xM={id:"cron-job-entity-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},jM={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:[VM],static:!0,abstract:!1,abstractMethods:[],extends:[Wl],implements:[],methods:[UM],x:0,y:0,parent:xM},kM={type:n.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:n.Project,entityId:Y},qM={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:[ds],x:0,y:0,parent:kM},cg="f558fbf8-67de-4545-9804-6ae621e0b2d4",JM={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},WM={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},YM={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:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:JM,autogeneration:null,valueAsType:null},parent:WM},HM={id:"getCompanyByIdEndpointReachedEntityEventRef",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},zM={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},ZM={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},KM={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:zM,autogeneration:null,valueAsType:null},parent:ZM},XM={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:KM,implements:Ml,required:!0,index:0,parent:HM},QM={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},eV={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:YM,implements:Vl,required:!0,index:1,parent:QM},tV={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},nV={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},rV={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},iV={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:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:nV,autogeneration:null,valueAsType:null},parent:rV},aV={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:iV,implements:Ll,required:!0,index:2,parent:tV},sV={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},oV={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},lV={like:!1,inferred:!1,id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:oV},cV={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:n.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:lV,implements:Gl,index:3,required:!0,parent:sV},dV={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},uV={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:dV},pV={id:"getCompanyByIdEndpointReturnStatementRef",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},yV={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:uV,implements:$l,readsValue:null,required:!0,index:0,parent:pV},hV={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},fV={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},mV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.JSON,value:{},parent:hV,autogeneration:null,valueAsType:null},parent:fV},TV={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},EV={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:mV,implements:Fl,readsValue:null,required:!0,index:1,parent:TV},bV={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:n.GenericReference,entityType:n.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},RV={like:!1,inferred:!1,id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:bV},gV={id:"getCompanyByIdEndpointReturnStatementRefThree",type:n.GenericReference,entityType:n.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},vV={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:n.ReturnDeclaration,name:"Response body",implements:Ul,dataType:RV,readsValue:null,required:!0,index:2,parent:gV},IV={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:n.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:n.FunctionDeclaration},DV={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},PV={id:"getCompanyByIdEndpointReturnStatement",type:n.ReturnStatement,version:1,outputs:[yV,EV,vV],calledByError:[],calledByEntry:[IV],calledBySuccess:[],throws:null,x:0,y:0,parent:DV},AV={id:"endpointBuiltInBaseEntityRefFour",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:cg},OV={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:n.FunctionDeclaration,inputs:[XM,eV,aV,cV],returnStatements:[PV],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:xl,index:0,private:!1,x:0,y:0,parent:AV},SV={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},CV={id:"getCompanyByIdEndpointPathPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointPathProperty"},BV={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:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,name:P.String,value:"/company/{id}",parent:SV,valueAsType:null,autogeneration:null},parent:CV},wV={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},_V={hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:_l,dataType:BV,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:wV},NV={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:n.GenericReference,entityType:n.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},MV={id:"getCompanyByIdEndpointMethodPropertyRef",type:n.GenericReference,entityType:n.Property,entityId:"getCompanyByIdEndpointMethodProperty"},VV={like:!1,inferred:!1,id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Nn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:n.PrimitiveValue,version:1,value:"GET",name:P.Enum,parent:NV,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:MV},LV={id:"getCompanyByIdEndpointBaseEntityRefThree",type:n.GenericReference,entityType:n.BuiltInBaseEntity,entityId:M.HTTP_ENDPOINT},GV={hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:n.Property,private:!1,abstract:!1,static:!0,implements:Nl,index:0,dataType:VV,description:null,parent:LV},$V={type:n.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:n.Project,entityId:Y},FV={type:n.CustomEntity,id:cg,version:1,name:"Get given company data by id",description:null,properties:[_V,GV],methods:[OV],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[ds],x:0,y:0,parent:$V},UV={id:"product-prototype-database-property-ref-id",type:n.GenericReference,entityId:"product-prototype-database-property-id",entityType:n.Property},xV={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},jV={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:Mn,asType:!1,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.EntityTemplate,valueAsType:hc,autogeneration:null,parent:xV},parent:UV},kV={id:"product-prototype-database-property-parent-ref-id",type:n.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:n.CustomEntity},qV={hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:n.Property,private:!1,abstract:!1,implements:ji,static:!0,index:0,dataType:jV,description:"The database that the entity belongs to.",parent:kV},JV={type:n.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:n.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},WV={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:JV},YV={type:n.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:n.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},HV={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:WV,abstract:!1,parent:YV},zV={type:n.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:n.Project,entityId:Y},ZV={type:n.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[ke],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[qV,HV],methods:[],x:0,y:0,parent:zV},ca="project-loaded-event-id",rn="get-bitcoin-price-http-call-operation-id",dg="get-bitcoin-price-http-call-response-body-id",qs="validate-bitcoin-price-response-operation-ids",KV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:dg},XV={type:n.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:n.Operation,entityId:qs},ug={id:"validate-bitcoin-data-to-validate-input-map-id",type:n.InputMap,version:1,declaration:rr.inputs[1],name:null,description:null,readsValue:KV,defaultValue:null,index:0,parent:XV},QV={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"},e1={type:n.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:n.Operation,entityId:qs},t1={id:"validate-bitcoin-type-to-match-input-map-id",type:n.InputMap,version:1,declaration:rr.inputs[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:n.PrimitiveValue,version:1,name:P.EntityTemplate,valueAsType:zR,value:null,parent:QV,autogeneration:null},index:0,parent:e1},n1={type:n.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:n.Operation,entityId:qs},r1={id:"validate-bitcoin-validated-entity-output-map-id",type:n.OutputMap,version:1,declaration:rr.outputs[0],writesValues:[],index:0,parent:n1},i1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:n.GlobalEvent,entityId:ca},a1={type:n.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:n.Operation,entityId:rn},s1={type:n.Operation,id:qs,version:1,declaration:rr,inputs:[t1,ug],outputs:[r1],process:null,successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[a1],parent:i1},o1={type:n.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:n.FunctionCall,entityId:rn},l1={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:n.InputMap,declaration:Ka,name:null,description:null,readsValue:null,defaultValue:null,index:0,parent:o1},c1={type:n.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:n.FunctionCall,entityId:rn},d1={type:n.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:n.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},u1={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:n.InputMap,declaration:Xa,name:null,description:null,readsValue:null,defaultValue:{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:P.String,parent:d1,valueAsType:null,autogeneration:null},index:1,parent:c1},p1={type:n.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:n.FunctionCall,entityId:rn},y1={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:n.InputMap,declaration:Qa,name:null,description:null,readsValue:null,defaultValue:null,index:2,parent:p1},h1={type:n.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:n.FunctionCall,entityId:rn},f1={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:n.InputMap,declaration:es,name:null,description:null,readsValue:null,defaultValue:null,index:3,parent:h1},m1={type:n.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:n.FunctionCall,entityId:rn},T1={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:n.OutputMap,declaration:ns,writesValues:[],index:1,parent:m1},E1={type:n.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:n.FunctionCall,entityId:rn},b1={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:n.OutputMap,declaration:ts,writesValues:[],index:0,parent:E1},R1={type:n.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:n.FunctionCall,entityId:rn},g1={id:dg,type:n.OutputMap,version:1,declaration:rs,writesValues:[ug],index:2,parent:R1},v1={type:n.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:n.FunctionDeclaration,entityId:rn},I1={type:n.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:n.GlobalEvent,entityId:ca},D1={type:n.Operation,id:rn,version:1,declaration:Li,inputs:[l1,u1,y1,f1],outputs:[b1,T1,g1],process:null,parent:I1,calledByError:[],calledByEntry:[v1],calledBySuccess:[],successCalls:[s1],errorCalls:[],error:null,x:0,y:0},P1={type:n.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:n.GlobalEvent,entityId:ca},A1={type:n.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:n.GlobalEvent,entityId:ca},O1={process:null,type:n.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:Rc,inputs:[],outputs:[],calledByError:[],calledByEntry:[P1],calledBySuccess:[],parent:A1,successCalls:[],errorCalls:[],error:null,x:0,y:0},S1={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:n.GenericReference,entityType:n.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},C1={type:n.GlobalEvent,id:ca,version:1,name:pn.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:fs,parent:S1,inputs:[],calls:[O1,D1],x:0,y:0},$t="abort-execution-func-declaration-id",da="abort-execution-func-exec-var-declaration-id",Js="abort-execution-func-small-wait-op-id",gc="abort-execution-func-long-wait-op-id",pg="abort-execution-func-long-wait-process-output-id",yg="abort-execution-func-exec-var-instance-write-id",hg="abort-execution-func-long-wait-return-stmt-id",fg="abort-execution-func-small-wait-return-stmt-id",B1="abort-execution-func-exec-var-instance-abort-call-id",vc="abort-execution-func-exec-var-instance-abort-internal-call-id",mg="abort-execution-func-exec-second-wait-op-id",w1={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"},_1={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"},N1={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:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:_1},constant:!1,parent:w1},M1={type:n.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:fg},V1={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:N1,implements:null,readsValue:null,required:!0,index:0,parent:M1},L1={type:n.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Js},G1={type:n.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},Tg={type:n.ReturnStatement,id:fg,version:1,outputs:[V1],calledByError:[],calledByEntry:[],calledBySuccess:[L1],throws:null,x:0,y:0,parent:G1},$1={type:n.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"second-wait-argument-map-id"},F1={type:n.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:mg},U1={id:"second-wait-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:P.Number,parent:$1},index:0,parent:F1},x1={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},j1={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.InternalCall,entityId:vc},k1={id:mg,type:n.Operation,version:1,declaration:pt,inputs:[U1],outputs:[],process:null,successCalls:[Tg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[j1],error:null,parent:x1},q1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:n.VariableInstance,entityId:yg},J1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:n.Operation,entityId:Js},W1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},Y1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:da},H1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:n.InternalCall,entityId:vc},z1={id:B1,type:n.VariableInstance,version:1,declaration:Y1,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[H1],parent:W1},Eg={id:vc,type:n.InternalCall,version:1,inputs:[],outputs:[],declaration:Yl,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[q1,J1],successCalls:[k1],errorCalls:[],error:null,index:0,parent:z1},Z1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},K1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:da},X1={type:n.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:$t},Q1={type:n.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:da},e0={type:n.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:n.OutputMap,entityId:pg},Ic={id:yg,type:n.VariableInstance,version:1,declaration:Q1,inputs:[],outputs:[],calledByError:[],calledByEntry:[X1],calledBySuccess:[K1],successCalls:[Eg],errorCalls:[],x:0,y:0,readsValue:e0,writesValues:[],internalCalls:[],parent:Z1},t0={type:n.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:da};n.GenericReference,n.DataType;const n0={like:!1,inferred:!1,id:"abort-exec-func-var-decl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:Hl,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:t0,defaultValue:null},r0={type:n.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:n.FunctionDeclaration,entityId:$t},i0={type:n.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},a0={id:da,type:n.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:n0,inputs:[],outputs:[],calledByError:[],calledByEntry:[i0],calledBySuccess:[],successCalls:[Ic],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:r0},s0={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"},o0={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"},l0={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:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:o0},constant:!1,parent:s0},c0={type:n.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:n.ReturnStatement,entityId:hg},d0={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:l0,readsValue:null,required:!0,index:0,parent:c0},u0={type:n.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:gc},p0={type:n.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},bg={type:n.ReturnStatement,id:hg,version:1,outputs:[d0],calledByError:[],calledByEntry:[],calledBySuccess:[u0],throws:null,x:0,y:0,parent:p0},y0={type:n.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"long-argument-map-id"},Rg={type:n.GenericReference,id:"long-argument-map-parent-ref-id",entityType:n.Operation,entityId:gc},h0={id:"long-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:n.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:P.Number,parent:y0},index:0,parent:Rg},f0={type:n.GenericReference,id:"long-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},m0={type:n.GenericReference,id:"long-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},T0={id:pg,type:n.OutputMap,version:1,declaration:Zl,writesValues:[Ic],index:0,parent:Rg},E0={id:gc,type:n.Operation,version:1,declaration:pt,inputs:[h0],outputs:[],process:T0,successCalls:[bg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[m0],calledBySuccess:[],error:null,parent:f0},b0={type:n.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:"small-wait-argument-map-id"},R0={type:n.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:n.Operation,entityId:Js},g0={id:"small-wait-argument-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:n.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:P.Number,parent:b0},index:0,parent:R0},v0={type:n.GenericReference,id:"small-wait-parent-ref-id",entityType:n.FunctionDeclaration,entityId:$t},I0={type:n.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:$t},D0={id:Js,type:n.Operation,version:1,declaration:pt,inputs:[g0],outputs:[],process:null,successCalls:[Eg],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[I0],calledBySuccess:[],error:null,parent:v0},P0={type:n.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:n.Project,entityId:Y},gg={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:[bg,Tg],calls:[D0,a0,Ic,E0],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:P0},A0={type:n.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:n.Project,entityId:Y},O0={id:"call-execution-abort-func-id",type:n.FunctionCall,version:1,declaration:gg,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:A0},Dc="manual-hello-world-loop-func-decl-id",vg="manual-hello-world-loop-func-return-statement-id",an="manual-hello-world-loop-id",ua="manual-hello-world-loop-body-id",Pc="manual-hello-world-loop-break-statement-id",pa="manual-hello-world-loop-current-iteration-number-output-map-id",Ac="manual-hello-world-loop-previous-iterations-results-output-map-id",Oc="assembled-hello-world-text-output-id",Ig="assembled-hello-world-list-output-id",ya="iteration-number-is-equal-or-greater-than-10-condition-id",Ws="join-hello-world-and-number-operation-id",Ys="append-string-to-list-operation-id",Dg="hello-world-loop-output-map-id",S0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:n.ReturnStatement,entityId:vg},C0={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"},B0={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:C0},w0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:n.OutputMap,entityId:Dg},Pg={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:n.ReturnDeclaration,name:"Results",description:null,dataType:B0,implements:null,readsValue:w0,required:!0,index:0,parent:S0},_0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:n.Loop,entityId:an},N0={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:n.FunctionDeclaration,entityId:Dc},Ag={type:n.ReturnStatement,id:vg,version:1,outputs:[Pg],calledByError:[],calledByEntry:[],calledBySuccess:[_0],parent:N0,throws:null,x:0,y:0},M0={type:n.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:n.BreakStatement,entityId:Pc},V0={type:n.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Oc},Og={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,dataType:null,readsValue:V0,implements:null,required:!0,index:0,parent:M0},L0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:pa},G0={type:n.GenericReference,id:"hello-world-loop-break-statement-counter-ref-id",entityType:n.BreakStatement,entityId:Pc},Sg={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:L0,required:!0,index:1,parent:G0},$0={type:n.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:n.Condition,entityId:ya},F0={type:n.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:n.Loop,entityId:an},Cg={type:n.BreakStatement,id:Pc,version:1,outputs:[Og,Sg],calledByError:[],calledByEntry:[],calledBySuccess:[$0],parent:F0,throws:null,x:0,y:0},U0={type:n.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:n.ContinueStatement,entityId:"hello-world-loop-continue-statement"},x0={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"},j0={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:x0},k0={type:n.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:n.OutputMap,entityId:Oc},Bg={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:n.ReturnDeclaration,name:"Iteration result",description:null,implements:null,dataType:j0,readsValue:k0,required:!0,index:0,parent:U0},q0={type:n.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:n.Condition,entityId:ya},J0={type:n.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:n.Loop,entityId:an},wg={type:n.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[Bg],calledBySuccess:[],calledByError:[q0],calledByEntry:[],parent:J0,throws:null,x:0,y:0};n.GenericReference,n.InputMap;const W0={type:n.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},Y0={type:n.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Ac},_g={id:"append-string-to-list-base-string-map-id",type:n.InputMap,version:1,declaration:hl,name:null,description:null,readsValue:Y0,defaultValue:null,index:0,parent:W0},H0={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ys},z0={id:Ig,type:n.OutputMap,version:1,writesValues:[Og],declaration:Mi,index:0,parent:H0},Z0={type:n.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:n.Condition,entityId:ya},K0={type:n.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Ig},X0={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ys},Ng={id:"latest-string-to-add-input-map-id",version:1,type:n.InputMap,declaration:fl,name:null,description:null,readsValue:K0,defaultValue:null,index:1,parent:X0},Q0={type:n.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:n.FunctionDeclaration,entityId:an},eL={type:n.Operation,id:Ys,declaration:Za,version:1,inputs:[_g,Ng],outputs:[z0],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[Z0],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:Q0},tL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ua},nL={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:n.Loop,entityId:an},rL={type:n.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:pa},Mg={type:n.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:n.Condition,entityId:ya},iL={id:"current-iteration-number-to-check-map-id",version:1,type:n.InputMap,declaration:Qr.inputs[0],name:null,description:null,readsValue:rL,index:0,defaultValue:null,parent:Mg},aL={type:n.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:"max-num-iterations-value-map-id"},sL={id:"max-num-iterations-value-map-id",version:1,type:n.InputMap,declaration:Qr.inputs[1],name:null,description:null,readsValue:null,index:1,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:n.PrimitiveValue,version:1,name:P.Number,value:10,autogeneration:null,valueAsType:null,parent:aL},parent:Mg},oL={type:n.Condition,id:ya,version:1,declaration:Qr,inputs:[iL,sL],calledByError:[],calledByEntry:[tL],calledBySuccess:[],successCalls:[Cg,eL],errorCalls:[wg],x:0,y:0,parent:nL},lL={type:n.GenericReference,id:"base-string-map-ref-id",entityType:n.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},cL={type:n.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:n.Operation,entityId:Ws},dL={id:"join-hello-world-and-number-base-string-map-id",type:n.InputMap,version:1,declaration:Ha,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:n.PrimitiveValue,version:1,value:"Hello world ",name:P.String,parent:lL,valueAsType:null,autogeneration:null},index:0,parent:cL},uL={type:n.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:n.Operation,entityId:Ws},pL={id:Oc,type:n.OutputMap,version:1,writesValues:[Ng,Bg],declaration:Mi,index:0,parent:uL},yL={type:n.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ua},hL={type:n.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:pa},fL={type:n.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:n.Operation,entityId:Ws},Vg={id:"current-iteration-number-input-map-id",version:1,type:n.InputMap,declaration:za,name:null,description:null,readsValue:hL,defaultValue:null,index:1,parent:fL},mL={type:n.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:n.FunctionDeclaration,entityId:an},TL={type:n.Operation,id:Ws,declaration:Vi,version:1,inputs:[dL,Vg],outputs:[pL],process:null,calledByError:[],calledByEntry:[yL],calledBySuccess:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:mL},EL={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:Ac,entityType:n.ArgumentDeclaration},bL={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:EL},RL={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:n.GenericReference,entityId:ua,entityType:n.FunctionDeclaration},gL={id:Ac,type:n.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:bL,implements:null,writesValues:[_g],index:1,parent:RL},vL={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:n.GenericReference,entityId:ua,entityType:n.FunctionDeclaration},IL={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:n.GenericReference,entityId:pa,entityType:n.ArgumentDeclaration};n.DataType;const DL={id:pa,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:Il,dataType:null,writesValues:[Vg,Sg],index:0,parent:vL},PL={id:"manual-flow-loop-body-parent-ref-id",type:n.GenericReference,entityId:an,entityType:n.Loop},AL={id:ua,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[DL,gL],calls:[oL,TL],implements:Dl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:PL},OL={type:n.GenericReference,id:"hello-world-loop-iteration-result-inline-output-declaration-parent-ref-id",entityType:n.Loop,entityId:an},Lg={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:OL},SL={type:n.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:n.Loop,entityId:an},CL={type:n.OutputMap,id:Dg,version:1,declaration:Lg,writesValues:[Pg],index:0,parent:SL},BL={id:"manual-hello-world-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},wL={id:"manual-hello-world-loop-called-by-ref-id",type:n.GenericReference,entityId:Dc,entityType:n.FunctionDeclaration},_L={id:an,type:n.Loop,version:1,declaration:vl,inputs:[],outputsDeclarations:[Lg],outputs:[CL],body:AL,successCalls:[Ag],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[wL],calledBySuccess:[],breakStatements:[Cg],continueStatements:[wg],x:0,y:0,parent:BL},NL={type:n.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Gg={type:n.FunctionDeclaration,id:Dc,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[_L],returnStatements:[Ag],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:NL},ML={type:n.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:n.Project,entityId:Y},VL={id:"call-hello-world-loop-id",type:n.FunctionCall,version:1,declaration:Gg,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:ML},bn="company-dto-function-declaration-id",Sc="company-dto-func-declaration-argument-dcl-id",sn="company-dto-function-company-variable-id",kn="company-dto-function-company-dto-variable-id",ci="iterate-over-employee-list-loop-id",$g="iterate-over-employee-list-loop-employee-dto-output-map-id",Cc="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",ha="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",Fg="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",LL="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",Ug="iterate-over-employee-list-continue-statement-id",Hs="iterate-over-employee-list-loop-body-id",xg="company-dto-func-declaration-return-statement-id",jg="company-dto-func-declaration-return-decl-id",kg="company-dto-func-declaration-company-variable-id-output-map-id",qg="company-dto-func-declaration-company-variable-employess-output-map-id",Jg="company-dto-func-declaration-company-variable-name-output-map-id",GL="company-dto-func-declaration-company-dto-variable-input-map-id",$L="company-dto-func-declaration-company-dto-variable-employess-input-map-id",FL="company-dto-func-declaration-company-dto-variable-name-input-map-id",zs="company-dto-func-declaration-owner-variable-id",UL="company-dto-func-declaration-company-dto-variable-owner-input-map-id",Wg="company-dto-func-declaration-company-variable-owner-output-map-id",Yg="company-dto-func-declaration-owner-variable-id-output-map-id",Zs="company-dto-func-declaration-bank-account-variable-id",xL="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",Hg="company-dto-func-declaration-company-variable-bank-account-output-map-id",zg="company-dto-func-declaration-bank-account-variable-id-output-map-id",jL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:jg},kL={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:jL},qL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:xg},JL={type:n.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:kn},Zg={isError:!1,id:jg,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:kL,readsValue:JL,required:!0,index:0,parent:qL},WL={type:n.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:kn},YL={type:n.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},Bc={type:n.ReturnStatement,id:xg,version:1,outputs:[Zg],calledByError:[],calledByEntry:[],calledBySuccess:[WL],throws:null,x:0,y:0,parent:YL},HL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Yg},zL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Kg={id:UL,type:n.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,index:5,readsValue:HL,parent:zL},ZL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:zg},KL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Xg={id:xL,type:n.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,index:4,readsValue:ZL,parent:KL},XL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:Jg},QL={type:n.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},Qg={id:FL,type:n.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,index:3,readsValue:XL,parent:QL},eG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:$g},tG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},ev={id:$L,type:n.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,index:2,readsValue:eG,parent:tG},nG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:kg},rG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:kn},tv={id:GL,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,index:1,readsValue:nG,parent:rG},iG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},aG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:n.VariableDeclaration,entityId:Zs},sG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:zs},oG={type:n.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:n.VariableDeclaration,entityId:ci},wc={id:kn,type:n.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[aG,sG,oG],successCalls:[Bc],errorCalls:[],readsValue:null,writesValues:[Zg],inputs:[tv,Qg,Xg,Kg,ev],outputs:[],internalCalls:[],parent:iG,x:0,y:0},hr="employee-dto-func-declaration-id",_c="employee-dto-func-declaration-argument-dcl-id",nv="employee-dto-func-declaration-return-statement-id",rv="employee-dto-func-declaration-return-decl-id",fr="employee-dto-func-declaration-employee-variable-id",mr="employee-dto-func-declaration-employee-dto-variable-id",Ks="employee-dto-func-declaration-manager-variable-id",iv="employee-dto-func-declaration-employee-variable-id-output-map-id",av="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",sv="employee-dto-func-declaration-employee-variable-department-output-map-id",ov="employee-dto-func-declaration-employee-variable-manager-output-map-id",lv="employee-dto-func-declaration-manager-variable-id-output-map-id",lG="employee-dto-func-declaration-employee-dto-variable-input-map-id",cG="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",dG="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",uG="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",pG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:rv},yG={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:pG},hG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:nv},fG={type:n.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:mr},cv={isError:!1,id:rv,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:yG,implements:null,readsValue:fG,required:!0,index:0,parent:hG},mG={type:n.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:n.Operation,entityId:mr},TG={type:n.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},Nc={type:n.ReturnStatement,id:nv,version:1,outputs:[cv],calledByError:[],calledByEntry:[],calledBySuccess:[mG],throws:null,x:0,y:0,parent:TG},EG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:lv},bG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},dv={id:uG,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:EG,parent:bG},RG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:sv},gG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},uv={id:dG,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:RG,parent:gG},vG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:av},IG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},pv={id:cG,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:vG,parent:IG},DG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:iv},PG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:mr},yv={id:lG,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:DG,parent:PG},AG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},OG={type:n.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ks},SG={id:mr,type:n.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[OG],successCalls:[Nc],errorCalls:[],readsValue:null,writesValues:[cv],inputs:[yv,pv,uv,dv],outputs:[],internalCalls:[],parent:AG,x:0,y:0},CG={type:n.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},BG={id:lv,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[dv],parent:CG},wG={type:n.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Ks},_G={like:!1,inferred:!1,id:"employee-dto-func-manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:wG,defaultValue:null},NG={type:n.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:ov},MG={type:n.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr};n.GenericReference,n.VariableDeclaration;const hv={id:Ks,type:n.VariableDeclaration,version:1,name:"Manager",dataType:_G,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[SG],errorCalls:[],readsValue:NG,writesValues:[],inputs:[],outputs:[BG],internalCalls:[],parent:MG,x:0,y:0},VG={type:n.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},LG={id:ov,type:n.OutputMap,version:1,declaration:Lt.properties[2],index:3,writesValues:[hv],parent:VG},GG={type:n.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},$G={id:sv,type:n.OutputMap,version:1,declaration:Lt.properties[0],index:2,writesValues:[uv],parent:GG},FG={type:n.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},UG={id:av,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[pv],parent:FG},xG={type:n.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},jG={id:iv,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[yv],parent:xG},kG={type:n.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:fr},qG={like:!1,inferred:!1,id:"employee-dto-func-employee-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:kG,defaultValue:null},JG={type:n.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:hr},WG={type:n.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:_c},YG={type:n.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:hr},fv={id:fr,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:qG,description:"A variable holding a company employee",calledByError:[],calledByEntry:[YG],calledBySuccess:[],successCalls:[hv],errorCalls:[],readsValue:WG,writesValues:[],inputs:[],outputs:[jG,UG,$G,LG],internalCalls:[],parent:JG,x:0,y:0},HG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:_c,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:Lt,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:HG,defaultValue:null},ZG={type:n.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:hr,entityType:n.FunctionDeclaration},KG={type:n.ArgumentDeclaration,id:_c,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,implements:null,dataType:zG,index:0,writesValues:[fv],parent:ZG},XG={type:n.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Mc={type:n.FunctionDeclaration,id:hr,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[KG],calls:[fv],implements:null,returnStatements:[Nc],collapsed:!1,private:!1,x:0,y:0,parent:XG},QG={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:Fg,entityType:n.ReturnDeclaration},e$={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:QG},t$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:n.GenericReference,entityId:ha,entityType:n.OutputMap},n$={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:n.GenericReference,entityId:Ug,entityType:n.ContinueStatement},mv={isError:!1,id:Fg,type:n.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:t$,dataType:e$,implements:null,required:!0,index:0,parent:n$},r$={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionCall},i$={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},Tv={id:Ug,type:n.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[r$],outputs:[mv],throws:null,x:0,y:0,parent:i$},a$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionCall},s$={id:LL,type:n.OutputMap,version:1,declaration:Nc.outputs[0],writesValues:[mv],index:0,parent:a$},o$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Cc,entityType:n.ArgumentDeclaration},l$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:n.GenericReference,entityId:ha,entityType:n.FunctionCall},Ev={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:Mc.inputs[0],readsValue:o$,index:0,defaultValue:null,parent:l$},c$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},d$={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},u$={id:ha,type:n.FunctionCall,version:1,declaration:Mc,inputs:[Ev],process:null,outputs:[s$],calledByError:[],calledByEntry:[c$],calledBySuccess:[],successCalls:[Tv],errorCalls:[],error:null,x:0,y:0,parent:d$},p$={type:n.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Cc,entityType:n.ArgumentDeclaration},y$={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:Lt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:p$},h$={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Hs,entityType:n.FunctionDeclaration},f$={id:Cc,type:n.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:y$,required:!0,implements:is,index:0,writesValues:[Ev],parent:h$},m$={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},T$={id:Hs,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[f$],calls:[u$],implements:as,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:m$},E$={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},b$={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:n.GenericReference,entityId:qg,entityType:n.OutputMap},bv={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ir.inputs[0],defaultValue:null,readsValue:b$,index:0,parent:E$},R$={id:"iterate-over-employee-list-loop-parent-ref-id",type:n.GenericReference,entityId:bn,entityType:n.FunctionDeclaration},g$={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:n.GenericReference,entityId:ci,entityType:n.Loop},v$={id:$g,type:n.OutputMap,version:1,declaration:ir.outputs[0],writesValues:[ev],index:0,parent:g$},I$={type:n.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:n.VariableDeclaration,entityId:sn},D$={id:ci,type:n.Loop,version:1,declaration:ir,inputs:[bv],successCalls:[wc],errorCalls:[],outputsDeclarations:[],outputs:[v$],body:T$,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[I$],breakStatements:[],continueStatements:[Tv],error:null,x:0,y:0,parent:R$},P$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},A$={id:zg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[Xg],parent:P$},O$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Zs},S$={like:!1,inferred:!1,id:"company-dto-func-bank-account-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:O$,defaultValue:null},C$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Hg},B$={type:n.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn};n.GenericReference,n.VariableDeclaration;const Rv={id:Zs,type:n.VariableDeclaration,version:1,name:"Bank account",dataType:S$,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[wc],errorCalls:[],readsValue:C$,writesValues:[],inputs:[],outputs:[A$],internalCalls:[],parent:B$,x:0,y:0},w$={type:n.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:zs},_$={id:Yg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[Kg],parent:w$},N$={type:n.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:zs},M$={like:!1,inferred:!1,id:"company-dto-func-owner-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:N$,defaultValue:null},V$={type:n.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:Wg},L$={type:n.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn};n.GenericReference,n.VariableDeclaration;const gv={id:zs,type:n.VariableDeclaration,version:1,name:"Owner",dataType:M$,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[wc],errorCalls:[],readsValue:V$,writesValues:[],inputs:[],outputs:[_$],internalCalls:[],parent:L$,x:0,y:0},G$={type:n.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},$$={id:Wg,type:n.OutputMap,version:1,declaration:Gt.properties[2],index:4,writesValues:[gv],parent:G$},F$={type:n.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},U$={id:Hg,type:n.OutputMap,version:1,declaration:Gt.properties[2],index:3,writesValues:[Rv],parent:F$},x$={type:n.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},j$={id:Jg,type:n.OutputMap,version:1,declaration:Gt.properties[0],index:2,writesValues:[Qg],parent:x$},k$={type:n.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},q$={id:qg,type:n.OutputMap,version:1,declaration:Gt.properties[3],index:1,writesValues:[bv],parent:k$},J$={type:n.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},W$={id:kg,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[tv],parent:J$},Y$={type:n.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:sn},H$={like:!1,inferred:!1,id:"company-dto-func-company-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:Y$,defaultValue:null},z$={type:n.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:bn},Z$={type:n.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:Sc},K$={type:n.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:n.FunctionDeclaration,entityId:bn},vv={id:sn,type:n.VariableDeclaration,version:1,name:"Company",dataType:H$,description:"A variable holding a company",calledByError:[],calledByEntry:[K$],calledBySuccess:[],successCalls:[Rv,gv,D$],errorCalls:[],readsValue:Z$,writesValues:[],inputs:[],outputs:[W$,q$,j$,U$,$$],internalCalls:[],parent:z$,x:0,y:0},X$={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Sc,entityType:n.ArgumentDeclaration},Q$={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,parent:X$,defaultValue:null},eF={type:n.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:bn,entityType:n.FunctionDeclaration},tF={type:n.ArgumentDeclaration,id:Sc,version:1,name:"Company",description:"The company to create a DTO for",required:!0,implements:null,dataType:Q$,index:0,writesValues:[vv],parent:eF},nF={type:n.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:n.Project,entityId:Y},Vc={type:n.FunctionDeclaration,id:bn,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[tF],calls:[vv],implements:null,index:null,returnStatements:[Bc],collapsed:!1,private:!1,x:0,y:0,parent:nF},fa="exec-in-parallel-operation-call-id",ma="exec-sequentially-operation-call-id",ft="concurrency-and-wait-function-declaration-id",Iv="concurrency-and-wait-return-statement-id",Dv="concurrency-and-wait-return-declaration-id",Lc="exec-in-parallel-argument-map-id",Pv="exec-sequentially-argument-map-id",Gc="wait-for-2-seconds-operation-id",Av="wait-for-2-seconds-argument-map-id",$c="map-company-dto-function-call-id",Ov="map-company-dto-function-call-company-dto-output-map-id",Ta="company-dto-variable-one-id",Fc="company-dto-variable-one-instance-id",rF="company-dto-variable-two-id",iF={type:n.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:Dv},aF={like:!1,inferred:!1,id:"returned-company-dto-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iF},sF={type:n.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:n.ReturnStatement,entityId:Iv},oF={type:n.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ta},Sv={isError:!1,id:Dv,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:aF,implements:null,readsValue:oF,required:!0,index:0,parent:sF},lF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:n.Operation,entityId:Gc},cF={type:n.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},Cv={type:n.ReturnStatement,id:Iv,version:1,outputs:[Sv],calledByError:[],calledByEntry:[],calledBySuccess:[lF],throws:null,x:0,y:0,parent:cF},dF={type:n.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:n.VariableInstance,entityId:Fc},uF={type:n.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:n.VariableInstance,entityId:Fc},pF={type:n.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},Bv={id:rF,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[dF],internalCalls:[],writesValues:[Sv],readsValue:uF,x:0,y:0,parent:pF},yF={type:n.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:n.VariableDeclaration,entityId:Ta},hF={type:n.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:Ta},fF={type:n.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},mF={type:n.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:Ta},wv={id:Fc,type:n.VariableInstance,version:1,declaration:mF,inputs:[],outputs:[],successCalls:[Bv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[yF],internalCalls:[],writesValues:[Bv],readsValue:hF,x:0,y:0,parent:fF},TF={type:n.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:n.FunctionCall,entityId:$c},EF={type:n.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:n.OutputMap,entityId:Ov},bF={type:n.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},_v={id:Ta,type:n.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[wv],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[TF],internalCalls:[],writesValues:[wv],readsValue:EF,x:0,y:0,parent:bF},Nv={type:n.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:n.FunctionCall,entityId:$c},RF={id:"map-company-dto-function-call-company-input-map-id",type:n.InputMap,version:1,declaration:Vc.inputs[0],name:null,description:null,defaultValue:null,index:0,readsValue:null,parent:Nv},gF={id:Ov,type:n.OutputMap,version:1,declaration:Bc.outputs[0],writesValues:[_v],index:0,parent:Nv},vF={id:"map-company-dto-function-call-called-by-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},IF={id:"map-company-dto-function-call-parent-ref-id",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:ft},DF={id:$c,type:n.FunctionCall,version:1,declaration:Vc,successCalls:[_v],process:null,errorCalls:[],inputs:[RF],outputs:[gF],calledByError:[],calledByEntry:[vF],calledBySuccess:[],parent:IF,x:0,y:0,error:null},PF={type:n.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:BR},AF={type:n.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:n.DataType,entityId:"last-timestamp-variable-datatype-id"},OF={like:!1,inferred:!1,id:"last-timestamp-variable-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:hn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:PF,defaultValue:{id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,name:P.Date,value:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:AF,valueAsType:null}},SF={type:n.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:n.Project,entityId:Y},Uc={id:BR,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:OF,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:SF},CF={type:n.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:n.InputMap,entityId:Av},BF={type:n.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:n.Operation,entityId:Gc},wF={id:Av,type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:n.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:P.Number,parent:CF},index:0,parent:BF},_F={type:n.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},NF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:n.FunctionDeclaration,entityId:ma},MF={type:n.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:n.FunctionDeclaration,entityId:fa},Mv={id:Gc,type:n.Operation,version:1,declaration:Wt,inputs:[wF],outputs:[],process:null,successCalls:[Cv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[NF,MF],calledBySuccess:[],error:null,parent:_F},VF={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"},LF={type:n.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:n.Operation,entityId:"wait-for-random-amount-id"},GF={id:"wait-for-random-amount-input-map-id",type:n.InputMap,version:1,declaration:tr,name:null,description:null,readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:n.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:We.Random,rangeStart:1e3,rangeEnd:4e3},name:P.Number,parent:VF},index:0,parent:LF},$F={type:n.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:n.Project,entityId:Y},di={id:"wait-for-random-amount-id",type:n.Operation,version:1,declaration:Wt,inputs:[GF],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:$F},Vv="list-of-functions-variable-id",FF={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"},UF={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:FF},xF={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"},jF={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:xF},kF={type:n.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Vv},qF={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:[UF],error:null,outputs:[jF],parent:null},JF={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"},WF={like:!1,inferred:!1,id:"list-of-functions-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:qF,asType:!1,isList:!0,isNullable:!1,defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:n.PrimitiveValue,version:1,name:P.ActionDescriptor,value:null,valueAsType:[di,di,di,di,di],autogeneration:null,parent:JF},constant:!1,parent:kF},YF={type:n.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft};n.GenericReference,n.InputMap;const HF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:n.InputMap,entityId:Pv},zF={type:n.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:n.InputMap,entityId:Lc},Lv={id:Vv,type:n.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:WF,parent:YF,readsValue:null,writesValues:[HF,zF],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},ZF={type:n.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:n.Operation,entityId:fa},KF={type:n.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},XF={type:n.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-in-parallel-return-map-id"},QF={type:n.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:n.Operation,entityId:fa},Gv={id:"exec-in-parallel-result-variable-id",type:n.VariableInstance,version:1,declaration:Uc,readsValue:XF,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[QF],successCalls:[],errorCalls:[],internalCalls:[],parent:KF,x:0,y:0},eU={id:"exec-in-parallel-return-map-id",type:n.OutputMap,version:1,declaration:Tl,writesValues:[Gv],index:0,parent:ZF},tU={type:n.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:n.Operation,entityId:fa},nU={id:Lc,type:n.InputMap,version:1,declaration:ml,name:null,description:null,readsValue:Lv,defaultValue:null,index:0,parent:tU},rU={type:n.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},iU={type:n.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},aU={process:null,id:fa,type:n.Operation,version:1,declaration:Wt,inputs:[nU],outputs:[eU],successCalls:[Mv,Gv],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[iU],calledBySuccess:[],error:null,parent:rU},sU={type:n.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:n.Operation,entityId:ma},oU={type:n.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},lU={type:n.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:"exec-sequentially-return-map-id"},cU={type:n.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:n.Operation,entityId:ma},$v={id:"exec-sequentially-result-variable-id",type:n.VariableInstance,version:1,declaration:Uc,readsValue:lU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[cU],successCalls:[],errorCalls:[],internalCalls:[],parent:oU,x:0,y:0},dU={id:"exec-sequentially-return-map-id",type:n.OutputMap,version:1,declaration:bl,writesValues:[$v],index:0,parent:sU},uU={type:n.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:n.Operation,entityId:ma},pU={id:Pv,type:n.InputMap,version:1,declaration:El,name:null,description:null,readsValue:Lv,defaultValue:null,index:0,parent:uU},yU={type:n.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:n.FunctionDeclaration,entityId:ft},hU={type:n.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:ft},fU={id:ma,type:n.Operation,version:1,declaration:mn,inputs:[pU],process:null,outputs:[dU],successCalls:[Mv,$v],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[hU],calledBySuccess:[],error:null,parent:yU},mU={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:Y},TU={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:[fU,aU,DF],returnStatements:[Cv],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:mU},EU={type:n.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:n.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},bU={like:!1,inferred:!1,id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Gt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EU},RU={type:n.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:n.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},gU={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:bU,readsValue:null,required:!0,index:0,parent:RU},vU={type:n.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:n.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},IU={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:[gU],calledByError:[],calledByEntry:[IU],calledBySuccess:[],throws:null,x:0,y:0,parent:vU},DU={type:n.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:n.Project,entityId:Y},PU={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:DU},xc="get-current-date-and-time-func-decl-id",Uv="get-current-date-and-time-return-statement-id",xv="get-current-date-and-time-return-declaration-id",jv="get-current-date-and-time-return-declaration-data-type-id",AU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:n.DataType,entityId:jv},OU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:n.ReturnDeclaration,entityId:xv},SU={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:jv,version:1,entity:hn,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,defaultValue:{id:"last-timestamp-variable-default-value-id",type:n.PrimitiveValue,version:1,value:null,name:P.Date,valueAsType:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:AU},constant:!1,parent:OU},CU={type:n.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:n.ReturnStatement,entityId:Uv};n.ReturnDeclaration;const BU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:xc},wU={type:n.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:n.FunctionDeclaration,entityId:xc};n.ReturnStatement;const _U={type:n.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:n.Project,entityId:Y},NU={type:n.FunctionDeclaration,id:xc,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:_U},kv="do-math-return-statement-id",qv="do-math-return-declaration-id",MU={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"},VU={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:MU},LU={type:n.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},GU={type:n.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:n.ReturnDeclaration,entityId:qv},$U={type:n.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:VU,readsValue:null,writesValues:[GU],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:LU},FU={type:n.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:n.ReturnStatement,entityId:kv},UU={type:n.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:n.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},xU={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:UU},jU={isError:!1,id:qv,version:1,type:n.ReturnDeclaration,name:"Result",description:null,implements:null,dataType:xU,readsValue:$U,required:!0,index:0,parent:FU},kU={type:n.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},qU={type:n.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Jv={type:n.ReturnStatement,id:kv,version:1,outputs:[jU],calledByError:[],calledByEntry:[],calledBySuccess:[kU],parent:qU,throws:null,x:0,y:0},JU={type:n.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:n.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},WU={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:JU},YU={type:n.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},HU={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"},Wv={type:n.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:WU,description:null,readsValue:zU,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[HU],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:YU},ZU={type:n.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},KU={type:n.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:n.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},XU={type:n.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:n.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},QU={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:XU},e4={type:n.GenericReference,id:"do-math-func-return-two-called-by",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},Yv={type:n.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[e4],successCalls:[],errorCalls:[],dataType:QU,readsValue:KU,writesValues:[],internalCalls:[],parent:ZU,x:0,y:0},Hv={type:n.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},t4={type:n.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},n4={type:n.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},r4={type:n.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:n.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},zv={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:n.InputMap,declaration:rl,name:null,description:null,readsValue:r4,defaultValue:null,index:0,parent:n4},i4={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:n.OutputMap,version:1,declaration:sl,writesValues:[Wv,Yv],index:0,parent:t4},a4={type:n.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:n.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},s4={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:n.GenericReference,entityType:n.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},Zv={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:n.InputMap,declaration:il,name:null,description:null,readsValue:s4,defaultValue:null,index:1,parent:a4},o4={type:n.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Ya,version:1,inputs:[zv,Zv],outputs:[i4],calledByError:[],calledByEntry:[Hv],calledBySuccess:[],process:null,successCalls:[Jv,Wv,Yv],errorCalls:[],parent:Hv,error:null,x:0,y:0},l4={type:n.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:n.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},c4={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:n.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:n.ArgumentDeclaration},Kv={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:{id:"do-math-func-argument-two-default-value-id",type:n.PrimitiveValue,version:1,value:1,name:P.Number,parent:l4,valueAsType:null,autogeneration:null},constant:!1,parent:c4},d4={type:n.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:n.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},u4={type:n.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},p4={type:n.GenericReference,id:"do-math-func-var-called-by-ref",entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},Xv={type:n.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:Kv,inputs:[],outputs:[],calledByError:[],calledByEntry:[p4],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:d4,writesValues:[Zv],internalCalls:[],x:0,y:0,parent:u4},y4={entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:n.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},h4={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:n.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:Kv,implements:null,writesValues:[Xv],required:!0,index:1,parent:y4},f4={type:n.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:n.Project,entityId:Y},m4={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:n.GenericReference,entityType:n.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},T4={type:n.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:n.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},E4={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:n.ArgumentDeclaration},b4={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:{id:"do-math-func-argument-one-default-value-id",type:n.PrimitiveValue,version:1,value:5,name:P.Number,parent:T4,valueAsType:null,autogeneration:null},constant:!1,parent:E4},R4={id:"d8895765-f705-457e-85fa-25d130926769",type:n.ArgumentDeclaration,version:1,name:"N",dataType:b4,description:"The number to add",implements:null,writesValues:[zv],required:!0,index:0,parent:m4},g4={type:n.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[R4,h4],calls:[o4,Xv],implements:null,index:null,collapsed:!1,returnStatements:[Jv],private:!1,x:0,y:0,parent:f4},mt="replace-bank-account-in-company-func-declaration-id",jc="company-entity-to-modify-arg-declaration-id",kc="account-number-to-create-arg-decl-id",ui="company-main-variable-id",pi="search-person-by-id-id",Qv="new-bank-account-owner-arg-decl-id",eI="search-person-by-id-output-declaration-id",qc="search-person-by-id-output-entity-map-id",Ea="person-not-empty-condition-id",Xs="create-new-bank-account-instance-operation-id",tI="create-new-bank-account-instance-operation-output-entity-map-id",nI="company-bank-account-output-map-id",Jc="old-bank-account-var-declaration-id",rI="old-bank-account-var-instance-id",iI="company-variable-instance-id",Wc="delete-bank-account-internal-call-id",ba="new-bank-account-data-variable-declaration-id",v4={type:n.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},I4={type:n.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:n.InternalCall,entityId:Wc},D4={type:n.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:n.VariableDeclaration,entityId:ui},P4={type:n.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:iI},A4={type:n.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:tI},aI={type:n.InputMap,id:"bank-account-input-map-id",version:1,readsValue:A4,declaration:bc,name:null,description:null,index:0,defaultValue:null,parent:P4},O4={type:n.VariableInstance,id:iI,version:1,declaration:D4,inputs:[aI],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[I4],successCalls:[],errorCalls:[],internalCalls:[],parent:v4,readsValue:null,writesValues:[],x:0,y:0},S4={type:n.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},C4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:oi,asType:!1,isList:!1,isNullable:!1,constant:!1,like:!1,inferred:!1,defaultValue:null,parent:S4},B4={type:n.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:nI},w4={type:n.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},_4={type:n.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:n.VariableDeclaration,entityId:ui},N4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:n.Operation,entityId:Xs};n.GenericReference,n.VariableInstance;const M4={type:n.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:n.VariableDeclaration,entityId:Jc},V4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:n.VariableDeclaration,entityId:Jc},L4={type:n.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:n.FunctionDeclaration,entityId:mt},G4={type:n.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:n.InternalCall,entityId:Wc},$4={type:n.VariableInstance,id:rI,version:1,declaration:V4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[G4],errorCalls:[],parent:L4,readsValue:null,writesValues:[],x:0,y:0},sI={process:null,type:n.InternalCall,id:Wc,version:1,declaration:ql,index:0,successCalls:[O4],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[N4,M4],parent:$4},oI={type:n.VariableDeclaration,id:Jc,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:C4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[_4],successCalls:[sI],internalCalls:[],errorCalls:[],parent:w4,readsValue:B4,writesValues:[],x:0,y:0},F4={type:n.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},U4={type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Gt,asType:!1,isList:!1,isNullable:!1,like:!1,inferred:!1,constant:!1,defaultValue:null,parent:F4},x4={type:n.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:n.ArgumentDeclaration,entityId:jc},j4={type:n.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},k4={type:n.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},q4={type:n.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:ui},J4={id:nI,version:1,type:n.OutputMap,declaration:bc,index:0,parent:q4,writesValues:[oI]},lI={type:n.VariableDeclaration,id:ui,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:U4,inputs:[],outputs:[J4],calledByError:[],calledByEntry:[k4],calledBySuccess:[],successCalls:[oI],errorCalls:[],parent:j4,internalCalls:[],readsValue:x4,writesValues:[],x:0,y:0},W4={type:n.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:ba},Y4={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.OutputMap,entityId:qc},cI={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account owner",description:null,readsValue:Y4,index:1,defaultValue:null,parent:W4},H4={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:n.GenericReference,entityType:n.ArgumentDeclaration,entityId:kc},z4={type:n.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:ba},dI={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:n.InputMap,declaration:null,name:"Account number",description:null,readsValue:H4,defaultValue:null,index:0,parent:z4},uI={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:n.Operation,entityId:Xs},Z4={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:n.InputMap,declaration:nr.inputs[0],name:null,description:null,index:0,readsValue:null,defaultValue:{type:n.PrimitiveValue,name:P.EntityTemplate,value:null,valueAsType:oi,autogeneration:null},parent:uI},K4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-entity-data-input-map-reads-value-ref-id",entityType:n.VariableDeclaration,entityId:ba},pI={id:"create-new-bank-account-instance-operation-entity-data-input-map-id",version:1,type:n.InputMap,declaration:nr.inputs[1],name:null,description:null,index:1,readsValue:K4,defaultValue:null,parent:uI},X4={type:n.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:n.Operation,entityId:Xs},Q4={id:tI,version:1,type:n.OutputMap,declaration:nr.outputs[0],index:0,writesValues:[aI],parent:X4},ex={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:Ea},tx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.VariableDeclaration,entityId:ba},nx={type:n.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},yI={process:null,id:Xs,type:n.Operation,version:1,declaration:nr,inputs:[Z4,pI],error:null,outputs:[Q4],successCalls:[sI],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[tx,ex],parent:nx,x:0,y:0},rx={type:n.GenericReference,id:"new-bank-account-data-variable-declaration-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},ix={type:n.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:n.Condition,entityId:Ea},ax={id:ba,type:n.VariableDeclaration,version:1,inputs:[dI,cI],dataType:null,name:"New bank Account's data",description:null,readsValue:null,outputs:[],writesValues:[pI],successCalls:[yI],errorCalls:[],internalCalls:[],calledByError:[],calledBySuccess:[ix],calledByEntry:[],x:0,y:0,parent:rx},sx={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},ox={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,P.String;const lx={id:"person-not-found-thrown-error-parent-ref-id",type:n.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:n.ReturnStatement},cx={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:lx,implements:null,required:!0,index:0,readsValue:null},dx={id:"person-not-found-error-return-statement-called-by-ref-id",type:n.GenericReference,entityId:Ea,entityType:n.Condition},ux={id:"person-not-found-error-return-statement-parent-ref-id",type:n.GenericReference,entityId:mt,entityType:n.FunctionDeclaration},px={id:"person-not-found-error-return-statement-id",type:n.ReturnStatement,version:1,throws:cx,outputs:[],calledBySuccess:[],calledByError:[dx],calledByEntry:[],x:0,y:0,parent:ux},yx={type:n.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:n.Search,entityId:pi},hx={type:n.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},fx={type:n.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:n.OutputMap,entityId:qc},mx={type:n.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:n.Condition,entityId:Ea},hI={id:"person-entity-to-check-map-id",version:1,type:n.InputMap,declaration:cr.inputs[0],name:null,description:null,readsValue:fx,index:0,defaultValue:null,parent:mx},Tx={type:n.Condition,id:Ea,version:1,declaration:cr,inputs:[hI],calledByError:[],calledByEntry:[],calledBySuccess:[yx],successCalls:[ax,yI],errorCalls:[px],x:0,y:0,parent:hx},Ex={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:n.ValueDescriptor,entityId:eI},bx={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:Ex},Rx={type:n.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:n.Search,entityId:pi},fI={id:eI,type:n.ValueDescriptor,version:1,dataType:bx,name:"Found person",description:"The person entity that was found",parent:Rx,required:!0,index:0},gx={type:n.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:n.Search,entityId:pi},vx={type:n.OutputMap,id:qc,version:1,declaration:fI,parent:gx,writesValues:[hI,cI],index:0},Ix={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 Dx={type:n.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:n.Search,entityId:pi},mI={id:"search-person-by-id-input-declaration-id",type:n.ArgumentDeclaration,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",implements:null,index:0,required:!0,parent:Dx,writesValues:[]},Px={type:n.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:n.Search,entityId:pi},Ax={id:"search-person-by-id-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Qv,entityType:n.ArgumentDeclaration},TI={type:n.InputMap,id:"search-person-by-id-input-map",version:1,declaration:mI,name:null,description:null,readsValue:Ax,defaultValue:null,parent:Px,index:0},Ox={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},Sx={type:n.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:n.FunctionDeclaration,entityId:mt},Cx={type:n.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:n.FunctionDeclaration,entityId:mt},Bx={type:n.Search,id:pi,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:Ox,inputsDeclarations:[mI],inputs:[TI],outputsDeclarations:[fI],outputs:[vx],calledByError:[],calledByEntry:[Cx],calledBySuccess:[],error:null,successCalls:[Tx],errorCalls:[],parent:Sx,x:0,y:0};n.GenericReference,n.DataType;const wx={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:n.GenericReference,entityId:kc,entityType:n.ArgumentDeclaration},_x={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:wx},Nx={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},Mx={id:kc,type:n.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:_x,implements:null,writesValues:[dI],required:!0,index:1,parent:Nx};n.GenericReference,n.DataType;const Vx={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},Lx={like:!1,inferred:!1,id:"new-bank-account-owner-arg-decl-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Wa,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:Vx},Gx={entityType:n.FunctionDeclaration,entityId:mt,type:n.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},$x={id:Qv,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:Lx,implements:null,writesValues:[TI],required:!1,index:1,parent:Gx},Fx={type:n.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:n.Project,entityId:Y},Ux={type:n.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:n.FunctionDeclaration,entityId:mt};n.GenericReference,n.DataType;const xx={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:n.GenericReference,entityId:jc,entityType:n.ArgumentDeclaration},jx={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:xx},kx={id:jc,type:n.ArgumentDeclaration,version:1,name:"Company",dataType:jx,implements:null,description:"The company to replace the bank account for",writesValues:[lI],required:!0,index:0,parent:Ux},qx={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:[kx,Mx,$x],index:null,implements:null,calls:[Bx,lI],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:Fx},Jx={type:n.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:n.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},Wx={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:Jx,x:0,y:0},Yx={type:n.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:n.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},Hx={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:[Wx],events:[],implements:Hx,parent:Yx,x:0,y:0},Yc="global-counted-test-loop-id",EI="global-counted-test-loop-body-id",bI="global-counted-test-loop-body-current-iteration-value-argument-declaration-id",Zx={type:n.GenericReference,id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:bI,entityType:n.ArgumentDeclaration},Kx={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:Zx},Xx={id:"global-counted-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:EI,entityType:n.FunctionDeclaration},Qx={id:bI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Kx,implements:Bl,required:!0,index:0,writesValues:[],parent:Xx},ej={id:"global-counted-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Yc,entityType:n.Loop},tj={id:EI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Qx],calls:[],implements:wl,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:ej},yi="random-company-employee-test-variable-id",Hc="manager-global-variable-id",RI="global-user-instance-id",Rn="employee-mapped-dto-variable-id",qn="employee-mapped-dto-variable-instance-id",gI="random-employee-id-output-map-id",vI="random-employee-birth-date-output-map-id",II="random-employee-department-output-map-id",DI="random-employee-manager-output-map-id",PI="manager-global-id-output-map-id",AI="global-user-instance-id-output-map-id",nj="employee-mapped-dto-requester-id-input-map-id",OI="employee-mapped-dto-now-timestamp-input-map-id",rj="employee-mapped-dto-id-input-map-id",ij="employee-mapped-dto-birth-date-input-map-id",aj="employee-mapped-dto-department-input-map-id",sj="employee-mapped-dto-manager-input-map-id",oj={id:"global-counted-test-loop-iteration-number-input-map-parent-ref-id",type:n.GenericReference,entityId:Yc,entityType:n.Loop};n.GenericReference,n.VariableDeclaration;const lj={id:"global-counted-test-loop-iteration-number-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:os.inputs[0],defaultValue:null,readsValue:null,index:0,parent:oj},cj={id:"global-counted-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},dj={id:"global-counted-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},uj={id:Yc,type:n.Loop,version:1,declaration:os,inputs:[lj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:tj,calledByError:[],calledByEntry:[],calledBySuccess:[dj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:cj},zc="global-object-keys-test-loop-id",SI="global-object-keys-test-loop-body-id",CI="global-object-keys-test-loop-body-current-iteration-value-argument-declaration-id",pj={type:n.GenericReference,id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:CI,entityType:n.ArgumentDeclaration},yj={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:pj},hj={id:"global-object-keys-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:SI,entityType:n.FunctionDeclaration},fj={id:CI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:yj,implements:Sl,required:!0,index:0,writesValues:[],parent:hj},mj={id:"global-object-keys-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},Tj={id:SI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[fj],calls:[],implements:$i,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:mj},Ej={id:"global-object-keys-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:zc,entityType:n.Loop},bj={id:"global-object-keys-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:Rn,entityType:n.VariableDeclaration},BI={id:"global-object-keys-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:$i.inputs[0],defaultValue:null,readsValue:bj,index:0,parent:Ej},Rj={id:"global-object-keys-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},gj={id:"global-object-keys-test-loop-called-by-success-ref-two-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},vj={id:"global-object-keys-test-loop-called-by-success-ref-one-id",type:n.GenericReference,entityId:Rn,entityType:n.VariableDeclaration},Zc={id:zc,type:n.Loop,version:1,declaration:$i,inputs:[BI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Tj,calledByError:[],calledByEntry:[],calledBySuccess:[vj,gj],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Rj},Kc="global-object-values-test-loop-id",wI="global-object-values-test-loop-body-id",_I="global-object-values-test-loop-body-current-iteration-value-argument-declaration-id",Ij={type:n.GenericReference,id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:_I,entityType:n.ArgumentDeclaration},Dj={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:Ij},Pj={id:"global-object-values-test-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:wI,entityType:n.FunctionDeclaration},Aj={id:_I,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Dj,implements:Cl,required:!0,index:0,writesValues:[],parent:Pj},Oj={id:"global-object-values-test-loop-body-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Sj={id:wI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Aj],calls:[],implements:Fi,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Oj},Cj={id:"global-object-values-test-loop-iteration-object-input-map-parent-ref-id",type:n.GenericReference,entityId:Kc,entityType:n.Loop},Bj={id:"global-object-values-test-loop-iteration-object-input-map-reads-value-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},NI={id:"global-object-values-test-loop-iteration-object-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:Fi.inputs[0],defaultValue:null,readsValue:Bj,index:0,parent:Cj},wj={id:"global-object-values-test-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},_j={id:"global-object-values-test-loop-called-by-success-ref-id",type:n.GenericReference,entityId:qn,entityType:n.VariableDeclaration},MI={id:Kc,type:n.Loop,version:1,declaration:Fi,inputs:[NI],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:Sj,calledByError:[],calledByEntry:[],calledBySuccess:[_j],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:wj},Xc="global-test-iterate-over-string-loop-id",Qc="global-test-iterate-over-string-loop-body-id",Qs="global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-id",VI="global-test-iterate-over-string-loop-iteration-list-input-map-id",Nj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:Qs,entityType:n.ArgumentDeclaration},Mj={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:Nj},Vj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.FunctionDeclaration},Lj={id:Qs,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:Mj,implements:Pl,required:!0,index:1,writesValues:[],parent:Vj},Gj={type:n.GenericReference,id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-data-type-parent-ref-id",entityId:Qs,entityType:n.ArgumentDeclaration},$j={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:Gj},Fj={id:"global-test-iterate-over-string-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:Qc,entityType:n.FunctionDeclaration},Uj={id:Qs,type:n.ArgumentDeclaration,version:1,name:"Current character",description:"The current character value being processed.",dataType:$j,implements:Al,required:!0,index:0,writesValues:[],parent:Fj},xj={id:"global-test-iterate-over-string-loop-body-parent-ref-id",type:n.GenericReference,entityId:Xc,entityType:n.Loop},jj={id:Qc,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Uj,Lj],calls:[],implements:Ol,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:xj},kj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:Xc,entityType:n.Loop},qj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-parent-ref-id",type:n.GenericReference,entityId:VI,entityType:n.InputMap},Jj={id:"global-test-iterate-over-string-loop-iteration-list-input-map-default-value-id",type:n.PrimitiveValue,name:P.String,version:1,value:"Hello",valueAsType:null,autogeneration:{type:We.Random,rangeStart:4,rangeEnd:5},parent:qj},Wj={id:VI,type:n.InputMap,version:1,name:null,description:null,declaration:ss.inputs[0],defaultValue:Jj,readsValue:null,index:0,parent:kj},Yj={id:"global-test-iterate-over-string-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},Hj={id:Xc,type:n.Loop,version:1,declaration:ss,inputs:[Wj],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:jj,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:Yj},ed="iterate-over-list-loop-id",LI="iterate-over-list-loop-body-id",GI="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:GI,entityType:n.ArgumentDeclaration},Zj={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},Kj={id:"iterate-over-list-loop-body-current-iteration-value-argument-declaration-parent-ref-id",type:n.GenericReference,entityId:LI,entityType:n.FunctionDeclaration},Xj={id:GI,type:n.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:Zj,implements:is,required:!0,index:0,writesValues:[],parent:Kj},Qj={id:"iterate-over-list-loop-body-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},e8={id:LI,type:n.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each iteration of the loop.",inputs:[Xj],calls:[],implements:as,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:Qj},t8={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:n.GenericReference,entityId:ed,entityType:n.Loop},n8={id:"iterate-over-list-loop-iteration-list-input-map-id",type:n.InputMap,version:1,name:null,description:null,declaration:ir.inputs[0],defaultValue:null,readsValue:null,index:0,parent:t8},r8={id:"iterate-over-list-loop-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},i8={id:ed,type:n.Loop,version:1,declaration:ir,inputs:[n8],successCalls:[],errorCalls:[],outputsDeclarations:[],outputs:[],process:null,body:e8,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:r8};var td=(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))(td||{}),$I=(r=>(r.COUNT="count",r.SUM="sum",r.AVG="avg",r.MIN="min",r.MAX="max",r))($I||{});const a8={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:$I.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:td.NEQ,value:null}]},where:[{name:"employee_count",operation:td.GT,value:1}]},s8={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:n.GenericReference,entityId:Y,entityType:n.Project},o8={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:o8},l8={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},c8={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:l8},d8={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:[c8],query:a8,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:s8},u8={type:n.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:PI},p8={type:n.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},UI={id:sj,type:n.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,index:4,readsValue:u8,parent:p8},y8={type:n.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:II},h8={type:n.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},xI={id:aj,type:n.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,index:3,readsValue:y8,parent:h8},f8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:n.OutputMap,entityId:vI},m8={type:n.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},jI={id:ij,type:n.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,index:2,readsValue:f8,parent:m8},T8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:gI},E8={type:n.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},kI={id:rj,type:n.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,index:1,readsValue:T8,parent:E8},b8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:n.OutputMap,entityId:AI},R8={type:n.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Rn},qI={id:nj,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:b8,parent:R8},g8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:Hc},v8={id:PI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[UI],parent:g8},I8={type:n.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:Hc},D8={like:!1,inferred:!1,id:"manager-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:I8,defaultValue:null},P8={type:n.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:n.OutputMap,entityId:DI},A8={type:n.GenericReference,id:"manager-variable-parent-ref-id",entityType:n.Project,entityId:Y},JI={id:Hc,type:n.VariableDeclaration,version:1,name:"Manager",dataType:D8,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:P8,writesValues:[],inputs:[],outputs:[v8],internalCalls:[],parent:A8,x:0,y:0},O8={type:n.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},S8={id:DI,type:n.OutputMap,version:1,declaration:Lt.properties[2],index:3,writesValues:[JI],parent:O8},C8={type:n.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},B8={id:II,type:n.OutputMap,version:1,declaration:Lt.properties[0],index:2,writesValues:[xI],parent:C8},w8={type:n.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},_8={id:vI,type:n.OutputMap,version:1,declaration:ht.properties[1],index:1,writesValues:[jI],parent:w8},N8={type:n.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},M8={id:gI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[kI],parent:N8},V8={type:n.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:n.VariableDeclaration,entityId:yi},L8={like:!1,inferred:!1,id:"random-company-employee-test-variable-data-type-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Lt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:V8,defaultValue:null},G8={type:n.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:n.Project,entityId:Y},$8={id:yi,type:n.VariableDeclaration,version:1,name:"Company employee",dataType:L8,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[M8,_8,B8,S8],internalCalls:[],parent:G8,x:0,y:0},F8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:n.InputMap,entityId:OI},U8={type:n.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:P.Date,version:1,valueAsType:null,value:null,autogeneration:{type:We.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:F8},x8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:n.VariableInstance,entityId:qn},j8={id:OI,type:n.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:U8,index:5,readsValue:null,parent:x8},k8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:n.VariableDeclaration,entityId:Rn},q8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:n.VariableDeclaration,entityId:qn},J8={type:n.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:n.Project,entityId:Y},W8={id:qn,type:n.VariableInstance,version:1,declaration:k8,calledByError:[],calledByEntry:[],calledBySuccess:[q8],successCalls:[Zc,MI],errorCalls:[],readsValue:null,writesValues:[NI],inputs:[j8],outputs:[],internalCalls:[],parent:J8,x:0,y:0},Y8={type:n.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:n.Project,entityId:Y},H8={id:Rn,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:[Zc,W8],errorCalls:[],readsValue:null,writesValues:[BI],inputs:[qI,kI,jI,xI,UI],outputs:[],internalCalls:[],parent:Y8,x:0,y:0},z8={type:n.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:n.VariableDeclaration,entityId:yc},Z8={like:!1,inferred:!1,id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:fc,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:z8,defaultValue:null},K8={type:n.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:n.Project,entityId:Y},WI={id:yc,type:n.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:Z8,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:K8},X8={type:n.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:n.VariableInstance,entityId:RI},Q8={id:AI,type:n.OutputMap,version:1,declaration:ke.properties[1],index:0,writesValues:[qI],parent:X8},e9={type:n.GenericReference,id:"global-user-instance-parent-ref-id",entityType:n.Project,entityId:Y},t9={id:RI,type:n.VariableInstance,version:1,declaration:WI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[Q8],internalCalls:[],parent:e9,x:0,y:0},n9={type:n.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:n.VariableDeclaration,entityId:yc},r9={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"},i9={like:!1,inferred:!1,id:"is-test-environment-variable-dcl-datatype-id",type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:_n,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:n9,defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:P.Boolean,version:1,value:null,type:n.PrimitiveValue,autogeneration:{type:We.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:r9}},a9={type:n.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:n.Project,entityId:Y},YI={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:i9,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:a9},s9={type:n.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:n.Project,entityId:Y},o9={id:"is-test-environment-variable-instance-id",type:n.VariableInstance,version:1,declaration:YI,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:s9,x:0,y:0},HI={type:n.Project,id:Y,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:[hc,fc,ht,ZV,Lt,ks,HR,zR,oi,qM,Gt,FV,wR,MC,jM],functions:[TU,gg,Mc,PU,NU,Gg,Vc,Rc,qx,ig,g4],events:[C1],variableDeclarations:[YI,WI,Uc,$8,JI,H8],variableInstances:[o9,t9],conditions:[],operations:[di],functionCalls:[O0,VL],loops:[i8,Zc,MI,Hj,uj],searches:[d8]};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||{}),V=(r=>(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))(V||{});class b{constructor(e){d(this,"id");d(this,"message");d(this,"issue");d(this,"severity");d(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 Tr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class Tr{constructor(e){d(this,"id");d(this,"message");d(this,"issue");d(this,"severity");d(this,"code");d(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 Tr({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function l9(r){const e=new Set;return r.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function H(r){const e=r.entity.errors.find(i=>i.id===r.id);return e?{new:!1,error:e}:{new:!0,error:new Tr(r)}}function c9(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 Ra=u.union([u.string(),u.number(),u.boolean(),u.date()]),zI=u.enum([We.CurrentDateAndTime,We.Random,We.Unique]),eo=u.object({type:zI,rangeStart:Ra.nullable(),rangeEnd:Ra.nullable()}),ga=eo.extend({type:u.literal(We.Random),rangeStart:Ra,rangeEnd:Ra}),nd=eo.extend({type:u.literal(We.Unique),rangeStart:u.null(),rangeEnd:u.null()}),ZI=eo.extend({type:u.literal(We.CurrentDateAndTime),rangeStart:u.null(),rangeEnd:u.null()}),to=ga.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),KI=to.extend({rangeStart:u.number(),rangeEnd:u.null()}),XI=to.extend({rangeStart:u.null(),rangeEnd:u.number()}),QI=to.extend({rangeStart:u.number(),rangeEnd:u.number()}),no=ga.extend({rangeStart:u.number().nullable(),rangeEnd:u.number().nullable()}),eD=no.extend({rangeStart:u.number(),rangeEnd:u.null()}),tD=no.extend({rangeStart:u.null(),rangeEnd:u.number()}),nD=no.extend({rangeStart:u.number(),rangeEnd:u.number()}),ro=ga.extend({rangeStart:u.date().nullable(),rangeEnd:u.date().nullable()}),rD=ro.extend({rangeStart:u.date(),rangeEnd:u.null()}),iD=ro.extend({rangeStart:u.null(),rangeEnd:u.date()}),aD=ro.extend({rangeStart:u.date(),rangeEnd:u.date()}),rd=ga.extend({rangeStart:u.null(),rangeEnd:u.null()}),id=u.union([eD,tD,nD]),ad=u.union([KI,XI,QI]),sd=u.union([rD,iD,aD,ZI]),od=u.union([id,ad,sd,nd,rd]);function va(){return u.union([u.object({type:u.literal(n.ValueDescriptor)}),u.record(u.string(),u.any())])}function sD(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ValueDescriptor)})}function ld(){return u.object({id:u.string(),type:u.literal(n.ValueDescriptor),name:u.string(),required:u.boolean()})}function d9(){return ld().merge(u.object({version:u.number(),index:u.number()}))}function u9(){return ld().merge(u.object({}))}function p9(){return u.object({dataType:gr(),parent:br()})}function y9(){return d9().merge(p9())}function io(){return u.union([u.object({type:u.literal(n.PrimitiveEntity)}),u.record(u.string(),u.any())])}function ao(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.PrimitiveEntity)})}function so(){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 h9(){return so().merge(u.object({version:u.number()}))}function f9(){return so().merge(u.object({}))}function m9(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([io(),hi()]))})}function T9(){return h9().merge(m9())}function Er(){return u.union([u.object({type:u.literal(n.Property)}),u.record(u.string(),u.any())])}function oD(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Property)})}function cd(){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 E9(){return cd().merge(u.object({version:u.number(),index:u.number()}))}function b9(){return cd().merge(u.object({}))}function R9(){return u.object({dataType:gr(),implements:Er().nullable(),parent:u.union([Dr(),ao(),oo()])})}function g9(){return E9().merge(R9())}function v9(){return u.enum([M.CRON_JOB,M.EXECUTION,M.HTTP_ENDPOINT,M.PERSISTED_ENTITY,M.RELATIONAL_DATABASE])}function hi(){return u.union([u.object({type:u.literal(n.BuiltInBaseEntity)}),u.record(u.string(),u.any())])}function oo(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BuiltInBaseEntity)})}function dd(){return u.object({id:u.string(),version:u.number(),type:u.literal(n.BuiltInBaseEntity),name:v9(),description:u.string().nullable(),abstract:u.boolean(),static:u.boolean()})}function I9(){return dd()}function D9(){return dd().merge(u.object({}))}function P9(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([hi(),io()]))})}function A9(){return I9().merge(P9())}function on(){return u.union([u.object({type:u.literal(n.ActionDescriptor)}),u.record(u.string(),u.any())])}function br(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ActionDescriptor)})}function lo(){return u.object({id:u.string(),type:u.literal(n.ActionDescriptor),name:u.string(),description:u.string().nullable()})}function O9(){return lo().merge(u.object({version:u.number()}))}function S9(){return lo().merge(u.object({}))}function C9(){return u.object({inputs:u.array(va()),outputs:u.array(va()),parent:u.union([Dt(),Dr(),oo(),ao()]).nullable()})}function lD(){return O9().merge(C9())}function fi(){return u.union([u.object({type:u.literal(n.Loop)}),u.record(u.string(),u.any())])}function ln(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Loop)})}function cD(){return u.object({id:u.string(),type:u.literal(n.Loop)})}function B9(){return cD().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function w9(){return cD().merge(u.object({declaration:u.union([u.string(),Bt()])}))}function _9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),declaration:on(),inputs:u.array(Zt()),outputs:u.array(Tt()),outputsDeclarations:u.array(va()),successCalls:u.array(ze()),errorCalls:u.array(ze()),error:Tt(),body:Bt(),parent:u.union([Dn(),Dt()]),breakStatements:u.array(bi()),continueStatements:u.array(mi())})}function N9(){return B9().merge(_9())}function mi(){return u.union([u.object({type:u.literal(n.ContinueStatement)}),u.record(u.string(),u.any())])}function Ti(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ContinueStatement)})}function ud(){return u.object({id:u.string(),type:u.literal(n.ContinueStatement)})}function M9(){return ud().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function V9(){return ud().merge(u.object({}))}function L9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:ln()})}function G9(){return M9().merge(L9())}function Rr(){return u.union([u.object({type:u.literal(n.ReturnStatement)}),u.record(u.string(),u.any())])}function Ei(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnStatement)})}function pd(){return u.object({id:u.string(),type:u.literal(n.ReturnStatement)})}function $9(){return pd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function F9(){return pd().merge(u.object({}))}function U9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:Dn()})}function x9(){return $9().merge(U9())}function gn(){return u.union([u.object({type:u.literal(n.ReturnDeclaration)}),u.record(u.string(),u.any())])}function dD(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ReturnDeclaration)})}function yd(){return u.object({id:u.string(),type:u.literal(n.ReturnDeclaration),name:u.string(),description:u.string().nullable(),isError:u.boolean()})}function j9(){return yd().merge(u.object({version:u.number(),index:u.number()}))}function k9(){return yd().merge(u.object({}))}function q9(){return u.object({dataType:gr().nullable(),readsValue:Sa().nullable(),parent:u.union([Ei(),br(),vn(),Ti()])})}function J9(){return j9().merge(q9())}function bi(){return u.union([u.object({type:u.literal(n.BreakStatement)}),u.record(u.string(),u.any())])}function vn(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.BreakStatement)})}function hd(){return u.object({id:u.string(),type:u.literal(n.BreakStatement)})}function W9(){return hd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function Y9(){return hd().merge(u.object({}))}function H9(){return u.object({calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),outputs:u.array(gn()),throws:u.optional(gn()),parent:ln()})}function z9(){return W9().merge(H9())}function Tt(){return u.union([u.object({type:u.literal(n.OutputMap)}),u.record(u.string(),u.any())])}function fd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.OutputMap)})}function md(){return u.object({id:u.string(),type:u.literal(n.OutputMap)})}function Z9(){return md().merge(u.object({version:u.number(),index:u.number()}))}function K9(){return md().merge(u.object({}))}function X9(){return u.object({writesValues:u.array(In()),declaration:u.union([gn(),Er()]),parent:u.union([Ee(),ln(),vn()])})}function Q9(){return Z9().merge(X9())}function Ri(){return u.union([u.object({type:u.literal(n.FunctionCall)}),u.record(u.string(),u.any())])}function Ia(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.FunctionCall)})}function Td(){return u.object({id:u.string(),type:u.literal(n.FunctionCall)})}function e6(){return Td().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function t6(){return Td().merge(u.object({}))}function n6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:Bt(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.optional(Tt()),parent:u.union([Dn(),Dt()])})}function r6(){return e6().merge(n6())}function i6(){return u.enum([$e.Equal,$e.NotEqual,$e.MoreThan,$e.MoreThanOrEqual,$e.LessThan,$e.LessThanOrEqual,$e.And,$e.Or,Mt.Empty,Mt.NotEmpty])}function Da(){return u.union([u.object({type:u.literal(n.Condition)}),u.record(u.string(),u.any())])}function co(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Condition)})}function Ed(){return u.object({id:u.string(),type:u.literal(n.Condition)})}function a6(){return Ed().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function s6(){return Ed().merge(u.object({}))}function o6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),leftValue:Zt(),rightValue:Zt().nullable(),operator:i6(),parent:u.union([Dn(),Dt()])})}function l6(){return a6().merge(o6())}function Pa(){return u.union([u.object({type:u.literal(n.Search)}),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.Search)})}function bd(){return u.object({id:u.string(),type:u.literal(n.Search),name:u.string(),query:u.any(),description:u.string().nullable()})}function c6(){return bd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function d6(){return bd().merge(u.object({}))}function u6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),inputsDeclarations:u.array(Ir()),inputs:u.array(Zt()),outputsDeclarations:u.array(va()),outputs:u.array(Tt()),parent:u.union([Dn(),Dt()]),error:Tt().nullable()})}function p6(){return c6().merge(u6())}function Oa(){return u.union([u.object({type:u.literal(n.InternalCall)}),u.record(u.string(),u.any())])}function Rd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InternalCall)})}function gd(){return u.object({id:u.string(),type:u.literal(n.InternalCall),index:u.number()})}function y6(){return gd().merge(u.object({version:u.number(),index:u.number()}))}function h6(){return gd().merge(u.object({declaration:u.union([u.string(),Bt()])}))}function f6(){return u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:Bt(),inputs:u.array(Zt()),outputs:u.array(Tt()),parent:Jn(),error:u.optional(Tt())})}function m6(){return y6().merge(f6())}function Zt(){return u.union([u.object({type:u.literal(n.InputMap)}),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.InputMap)})}function vd(){return u.object({id:u.string(),type:u.literal(n.InputMap),name:u.string().nullable().optional(),description:u.string().nullable().optional()})}function T6(){return vd().merge(u.object({version:u.number(),index:u.number()}))}function E6(){return vd().merge(u.object({}))}function b6(){return u.object({defaultValue:Id().nullable(),declaration:u.union([Ir(),Er()]).nullable(),readsValue:Sa().nullable(),parent:u.union([Ee(),uo(),ln(),vn()])})}function R6(){return T6().merge(b6())}function gi(){return u.union([u.object({type:u.literal(n.Operation)}),u.record(u.string(),u.any())])}function vi(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.Operation)})}function po(){return u.object({id:u.string(),type:u.literal(n.Operation)})}function g6(){return po().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function v6(){return po().merge(u.object({}))}function I6(){return po().merge(u.object({successCalls:u.array(ze()),errorCalls:u.array(ze()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),writesValues:u.array(In()),declaration:on(),inputs:u.array(Zt()),outputs:u.array(Tt()),error:u.array(Tt()),parent:u.union([Dn(),Dt()])}))}function D6(){return g6().merge(I6())}function yo(){return u.union([u.string(),u.number(),u.boolean(),u.null(),u.date()])}function uD(){return u.record(u.string(),yo())}function P6(){return u.array(u.union([yo(),uD()]))}function pD(){return u.union([yo(),uD(),P6()])}function yD(){return u.union([yo(),pD()])}function hD(){return u.enum([P.String,P.Number,P.Boolean,P.Null,P.Date,P.JSON,P.Enum,P.File,P.UUID,P.EntityTemplate,P.ActionDescriptor])}function A6(){return u.union([Dr(),vi(),Ca()])}function O6(){return u.object({id:u.string(),name:hD(),type:u.literal(n.PrimitiveValue),value:yD(),autogeneration:od.nullable()})}function S6(){return O6().merge(u.object({}))}function Kt(){return u.object({id:u.string(),version:u.number(),name:hD(),type:u.literal(n.PrimitiveValue),value:yD(),valueAsType:A6().nullable(),autogeneration:od.nullable(),parent:u.union([Dd(),uo()])})}function C6(){return Kt().extend({name:u.literal(P.String),value:u.string(),autogeneration:id.nullable()})}function B6(){return Kt().extend({name:u.literal(P.Number),value:u.number(),autogeneration:ad.nullable()})}function w6(){return Kt().extend({name:u.literal(P.Boolean),value:u.boolean(),autogeneration:rd.nullable()})}function _6(){return Kt().extend({name:u.literal(P.Null),value:u.null(),autogeneration:u.null()})}function N6(){return Kt().extend({name:u.literal(P.Date),value:u.date(),autogeneration:sd.nullable()})}function M6(){return Kt().extend({name:u.literal(P.JSON),value:pD(),autogeneration:u.null()})}function V6(){return Kt().extend({name:u.literal(P.Enum),value:u.string(),autogeneration:u.null()})}function L6(){return Kt().extend({name:u.literal(P.File),value:u.string(),autogeneration:u.null()})}function G6(){return Kt().extend({name:u.literal(P.UUID),value:u.string(),autogeneration:nd.nullable()})}function $6(){return Kt().extend({name:u.literal(P.EntityTemplate),value:Dr(),autogeneration:u.null()})}function F6(){return Kt().extend({name:u.literal(P.ActionDescriptor),value:Ca(),autogeneration:u.null()})}function Id(){return u.union([C6(),B6(),w6(),_6(),N6(),M6(),V6(),L6(),G6(),$6(),F6()])}function gr(){return u.union([u.object({type:u.literal(n.DataType)}),u.record(u.string(),u.any())])}function Dd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.DataType)})}function Pd(){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 U6(){return Pd().merge(u.object({version:u.number()}))}function x6(){return Pd().merge(u.object({}))}function j6(){return u.object({defaultValue:Id().nullable(),entity:u.union([Ii(),hi(),io(),on()]).nullable(),parent:u.union([oD(),TD(),sD()])})}function k6(){return U6().merge(j6())}function Ad(){return u.union([u.object({type:u.literal(n.VariableDeclaration)}),u.record(u.string(),u.any())])}function q6(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.VariableDeclaration)})}function Od(){return u.object({id:u.string(),type:u.literal(n.VariableDeclaration),name:u.string(),description:u.string().nullable()})}function J6(){return Od().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function W6(){return Od().merge(u.object({}))}function Y6(){return u.object({dataType:gr().nullable(),readsValue:Sa().nullable(),writesValues:u.array(In()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(ze()),errorCalls:u.array(ze()),internalCalls:u.array(Oa()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),parent:u.union([Dn(),Dt()])})}function H6(){return J6().merge(Y6())}function fD(){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 Sd(){return u.object({id:u.string(),type:u.literal(n.VariableInstance)})}function Z6(){return Sd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function K6(){return Sd().merge(u.object({}))}function X6(){return u.object({declaration:Ad(),dataType:gr().nullable(),readsValue:Sa().nullable(),writesValues:u.array(In()),inputs:u.array(Zt()),outputs:u.array(Tt()),successCalls:u.array(ze()),errorCalls:u.array(ze()),internalCalls:u.array(Oa()),calledBySuccess:u.array(Ee()),calledByError:u.array(Ee()),calledByEntry:u.array(He()),parent:u.union([Dn(),Dt()])})}function Q6(){return Z6().merge(X6())}function Cd(){return u.union([u.object({type:u.literal(n.InstalledProject)}),u.record(u.string(),u.any())])}function ho(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.InstalledProject)})}function e3(){return u.object({id:u.string(),type:u.literal(n.InstalledProject)})}function t3(){return u.object({version:u.number(),x:u.number(),y:u.number()})}function n3(){return u.object({})}function r3(){return u.object({implements:Dt(),description:u.string().nullable(),functions:u.array(Bt()),events:u.array(Bd()),parent:Dt()})}function i3(){return t3().merge(r3())}function Bd(){return u.union([u.object({type:u.literal(n.GlobalEvent)}),u.record(u.string(),u.any())])}function a3(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.GlobalEvent)})}function fo(){return u.object({id:u.string(),type:u.literal(n.GlobalEvent),name:u.string(),collapsed:u.boolean()})}function s3(){return fo().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function o3(){return fo().merge(u.object({}))}function l3(){return fo().merge(u.object({returnStatements:u.array(Rr()),implements:u.array(lD()),inputs:u.array(Ir()),calls:u.array(ze()),parent:u.union([Dt(),ho()])}))}function c3(){return s3().merge(l3())}function vr(){return u.union([Ad(),fD()])}function Jn(){return u.union([q6(),z6()])}function In(){return u.union([vr(),Zt(),gn()])}function mD(){return u.union([Jn(),uo(),dD()])}function Sa(){return u.union([vr(),Ir(),Tt(),gi(),Oa(),Ri()])}function d3(){return u.union([Jn(),wd(),fd(),vi(),Rd(),Ia()])}function u3(){return u.union([Ir(),Tt(),In()])}function TD(){return u.union([wd(),fd(),mD()])}function mo(){return Bd()}function To(){return a3()}function Eo(){return u.union([gi(),Ri(),Da(),Pa(),vr(),Oa(),fi()])}function Ee(){return u.union([vi(),Ia(),co(),Aa(),Jn(),Rd(),ln()])}function bo(){return u.union([gi(),Ri(),Da(),Pa(),vr(),fi()])}function Ro(){return u.union([vi(),Ia(),co(),Aa(),Jn(),ln()])}function ED(){return u.union([Eo(),Rr(),bi(),mi()])}function ze(){return u.union([Ee(),Ei(),vn(),Ti()])}function bD(){return u.union([bo(),Rr(),bi(),mi()])}function RD(){return u.union([Ro(),Ei(),vn(),Ti()])}function Wn(){return u.union([Bt(),mo()])}function He(){return u.union([Ca(),To()])}function p3(){return u.union([Eo(),Wn()])}function y3(){return u.union([Ee(),He()])}function h3(){return u.union([bo(),Wn()])}function f3(){return u.union([Ro(),He()])}function m3(){return u.union([ED(),Wn()])}function T3(){return u.union([ze(),He()])}function E3(){return u.union([bD(),Wn()])}function b3(){return u.union([RD(),He()])}function R3(){return u.union([Wn(),fi()])}function Dn(){return u.union([He(),ln()])}function g3(){return u.union([Eo(),Wn()])}function v3(){return u.union([Ee(),He()])}function I3(){return u.union([bo(),Wn()])}function D3(){return u.union([Ro(),He()])}function P3(){return u.union([Rr(),bi(),mi()])}function A3(){return u.union([Ei(),vn(),Ti()])}function O3(){return u.union([hi(),F3(),Cd(),Ii(),Bt(),mo(),vr(),Zt(),Tt(),Da(),gi(),Ri(),gn(),Ir(),io(),gr(),Er(),on(),Rr(),mi(),bi(),fi(),Pa(),on(),on(),va(),Oa()])}function S3(){return u.union([oo(),Dt(),ho(),Dr(),Ca(),To(),Jn(),uo(),fd(),co(),vi(),Ia(),dD(),wd(),ao(),Dd(),oD(),br(),Ei(),Ti(),vn(),ln(),Aa(),br(),br(),sD(),Rd()])}function C3(){return u.union([Cd(),Ii(),Bt(),mo(),vr(),Da(),gi(),Ri(),Rr(),mi(),bi(),fi(),Pa()])}function B3(){return u.union([ho(),Dr(),Ca(),To(),Jn(),co(),vi(),Ia(),Ei(),Ti(),vn(),ln(),Aa()])}function Ir(){return u.union([u.object({type:u.literal(n.ArgumentDeclaration)}),u.record(u.string(),u.any())])}function wd(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.ArgumentDeclaration)})}function _d(){return u.object({id:u.string(),type:u.literal(n.ArgumentDeclaration)})}function w3(){return _d().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function _3(){return _d().merge(u.object({}))}function N3(){return u.object({dataType:gr().nullable(),writesValues:u.array(In()),parent:u.union([He(),br(),br(),Aa(),vn()])})}function M3(){return w3().merge(N3())}function Bt(){return u.union([u.object({type:u.literal(n.FunctionDeclaration)}),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.FunctionDeclaration)})}function Nd(){return u.object({id:u.string(),type:u.literal(n.FunctionDeclaration),name:u.string(),description:u.string().nullable()})}function V3(){return Nd().merge(u.object({version:u.number(),x:u.number(),y:u.number(),index:u.number().nullable()}))}function L3(){return Nd()}function G3(){return u.object({inputs:u.array(Ir()),implements:on().nullable(),returnStatements:u.array(Rr()),parent:u.union([Dt(),ho(),Dr(),ln(),oo(),ao()])})}function $3(){return V3().merge(G3())}function F3(){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 Md(){return u.object({id:u.string(),type:u.literal(n.Project),name:u.string(),description:u.string().nullable()})}function U3(){return Md().merge(u.object({version:u.number()}))}function x3(){return Md()}function j3(){return u.object({entities:u.array(Ii()),functions:u.array(Bt()),events:u.array(Bd()),projects:u.array(Cd()),variableDeclarations:u.array(Ad()),variableInstances:u.array(fD()),conditions:u.array(Da()),operations:u.array(gi()),functionCalls:u.array(Ri()),loops:u.array(fi()),searches:u.array(Pa())})}function k3(){return U3().merge(j3())}function Ii(){return u.union([u.object({type:u.literal(n.CustomEntity)}),u.record(u.string(),u.any())])}function Dr(){return u.object({id:u.string(),type:u.literal(n.GenericReference),entityId:u.string(),entityType:u.literal(n.CustomEntity)})}function Vd(){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 q3(){return Vd().merge(u.object({version:u.number(),x:u.number(),y:u.number()}))}function J3(){return Vd().merge(u.object({}))}function W3(){return u.union([Dt(),Dd()])}function Y3(){return u.object({properties:u.array(Er()),methods:u.array(Bt()),abstractMethods:u.array(on()),extends:u.array(u.union([Ii(),hi()])),implements:u.array(u.union([Ii(),hi()])),parent:W3()})}function H3(){return q3().merge(Y3())}function z3(r){const e=H3(),t=r.toJSON();e.safeParse(t).success;const a=r.implements.flatMap(h=>X3(r,h)),s=r.extends.flatMap(h=>Q3(r,h)),o=tk(r),l=ek(r);r.methods.flatMap(h=>h.validate());const p=[...a,...s,...o,...l];return ie(r.errors,p)}function Z3(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 K3(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 X3(r,e){const t=[];if(!e.abstract){const h=H({id:r.id+"--"+V.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:V.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=H({id:r.id+"--"+V.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:V.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=H({id:r.id+"--"+V.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:V.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=H({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=H({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 Q3(r,e){const t=[],i=[];if(e.abstract){const s=H({id:r.id+"--"+V.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:V.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=H({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=H({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 ek(r){const e=[];if(!r.properties.length){const t=H({id:r.id+"--"+V.NoProperties,message:"No properties implemented",issue:null,severity:T.Warning,code:V.NoProperties,entity:r});e.push(t.error)}return r.properties.forEach(t=>{t.validate()}),e}function tk(r){const e=[];if(r.abstract){if(r.methods.length){const t=H({id:r.id+"--"+V.AbstractEntityWithNonAbstractMethods,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:T.Error,code:V.AbstractEntityWithNonAbstractMethods,entity:r});e.push(t.error)}if(r.properties.some(t=>!t.abstract)){const t=H({id:r.id+"--"+V.AbstractEntityWithNonAbstractProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:T.Error,code:V.AbstractEntityWithNonAbstractProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.abstract){const a=H({id:r.id+"--"+V.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:V.StaticEntityWithNonStaticProperties,entity:r});e.push(a.error)}})}}else{if(r.abstractMethods.length){const t=H({id:r.id+"--"+V.AbstractPropertyInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract methods`,issue:null,severity:T.Error,code:V.AbstractPropertyInNonAbstractEntity,entity:r});e.push(t.error)}if(r.properties.some(t=>t.abstract)){const t=H({id:r.id+"--"+V.AbstractMethodInNonAbstractEntity,message:`Entity "${r.name}" with id "${r.id}" is not marked as abstract but has abstract properties`,issue:null,severity:T.Error,code:V.AbstractMethodInNonAbstractEntity,entity:r});e.push(t.error),r.properties.forEach(i=>{if(i.abstract){const a=H({id:r.id+"--"+V.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:V.AbstractMethodInNonAbstractEntity,entity:r});e.push(a.error)}})}}if(r.static&&r.properties.some(t=>!t.static)){const t=H({id:r.id+"--"+V.StaticEntityWithNonStaticProperties,message:`Entity "${r.name}" with id "${r.id}" is marked as static but has non-static properties`,issue:null,severity:T.Error,code:V.StaticEntityWithNonStaticProperties,entity:r});e.push(t.error),r.properties.forEach(i=>{if(!i.static){const a=H({id:r.id+"--"+V.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:V.NonStaticPropertyInStaticEntity,entity:r});e.push(a.error)}})}return e}function nk(r){return r instanceof Error&&r.name==="ZodError"&&"issues"in r&&Array.isArray(r.issues)}var rk=class extends Error{constructor(e,t){super(e,t);d(this,"name");d(this,"details");this.name="ZodValidationError",this.details=ik(t)}toString(){return this.message}};function ik(r){if(r){const e=r.cause;if(nk(e))return e.issues}return[]}function ak(r){return r.length!==0}var sk=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function ok(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+'["'+lk(t)+'"]';if(!sk.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function lk(r){return r.replace(/"/g,'\\"')}var ck="; ",dk=99,gD="Validation error",uk=": ",pk=", or ";function yk(r={}){const{issueSeparator:e=ck,unionSeparator:t=pk,prefixSeparator:i=uk,prefix:a=gD,includePath:s=!0,maxIssuesInMessage:o=dk}=r;return l=>{const p=l.slice(0,o).map(y=>go({issue:y,issueSeparator:e,unionSeparator:t,includePath:s})).join(e);return hk(p,a,i)}}function go(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=>go({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=>go({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=>go({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&ak(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 "${ok(e.path)}"`}return e.message}function hk(r,e,t){return e!==null?r.length>0?[e,r].join(t):e:r.length>0?r:gD}function fk(r,e={}){const i=mk(e)([r]);return new rk(i,{cause:new It([r])})}function mk(r){return"messageBuilder"in r?r.messageBuilder:yk(r)}var vD="1.13.7",ID=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},vo=Array.prototype,Ld=Object.prototype,DD=typeof Symbol<"u"?Symbol.prototype:null,Tk=vo.push,Ba=vo.slice,wa=Ld.toString,Ek=Ld.hasOwnProperty,PD=typeof ArrayBuffer<"u",bk=typeof DataView<"u",Rk=Array.isArray,AD=Object.keys,OD=Object.create,SD=PD&&ArrayBuffer.isView,gk=isNaN,vk=isFinite,CD=!{toString:null}.propertyIsEnumerable("toString"),BD=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Ik=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 Yn(r){var e=typeof r;return e==="function"||e==="object"&&!!r}function Dk(r){return r===null}function wD(r){return r===void 0}function _D(r){return r===!0||r===!1||wa.call(r)==="[object Boolean]"}function Pk(r){return!!(r&&r.nodeType===1)}function ct(r){var e="[object "+r+"]";return function(t){return wa.call(t)===e}}const Gd=ct("String"),ND=ct("Number"),Ak=ct("Date"),Ok=ct("RegExp"),Sk=ct("Error"),MD=ct("Symbol"),VD=ct("ArrayBuffer");var LD=ct("Function"),Ck=ID.document&&ID.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof Ck!="function"&&(LD=function(r){return typeof r=="function"||!1});const Et=LD,GD=ct("Object");var $D=bk&&(!/\[native code\]/.test(String(DataView))||GD(new DataView(new ArrayBuffer(8)))),$d=typeof Map<"u"&&GD(new Map),Bk=ct("DataView");function wk(r){return r!=null&&Et(r.getInt8)&&VD(r.buffer)}const Io=$D?wk:Bk,Pr=Rk||ct("Array");function Hn(r,e){return r!=null&&Ek.call(r,e)}var Fd=ct("Arguments");(function(){Fd(arguments)||(Fd=function(r){return Hn(r,"callee")})})();const Ud=Fd;function _k(r){return!MD(r)&&vk(r)&&!isNaN(parseFloat(r))}function FD(r){return ND(r)&&gk(r)}function UD(r){return function(){return r}}function xD(r){return function(e){var t=r(e);return typeof t=="number"&&t>=0&&t<=Ik}}function jD(r){return function(e){return e==null?void 0:e[r]}}const Do=jD("byteLength"),Nk=xD(Do);var Mk=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Vk(r){return SD?SD(r)&&!Io(r):Nk(r)&&Mk.test(wa.call(r))}const kD=PD?Vk:UD(!1),At=jD("length");function Lk(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 qD(r,e){e=Lk(e);var t=BD.length,i=r.constructor,a=Et(i)&&i.prototype||Ld,s="constructor";for(Hn(r,s)&&!e.contains(s)&&e.push(s);t--;)s=BD[t],s in r&&r[s]!==a[s]&&!e.contains(s)&&e.push(s)}function et(r){if(!Yn(r))return[];if(AD)return AD(r);var e=[];for(var t in r)Hn(r,t)&&e.push(t);return CD&&qD(r,e),e}function _a(r){if(r==null)return!0;var e=At(r);return typeof e=="number"&&(Pr(r)||Gd(r)||Ud(r))?e===0:At(et(r))===0}function JD(r,e){var t=et(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=vD,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 WD(r){return new Uint8Array(r.buffer||r,r.byteOffset||0,Do(r))}var YD="[object DataView]";function xd(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:HD(r,e,t,i)}function HD(r,e,t,i){r instanceof se&&(r=r._wrapped),e instanceof se&&(e=e._wrapped);var a=wa.call(r);if(a!==wa.call(e))return!1;if($D&&a=="[object Object]"&&Io(r)){if(!Io(e))return!1;a=YD}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 DD.valueOf.call(r)===DD.valueOf.call(e);case"[object ArrayBuffer]":case YD:return HD(WD(r),WD(e),t,i)}var s=a==="[object Array]";if(!s&&kD(r)){var o=Do(r);if(o!==Do(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(!xd(r[y],e[y],t,i))return!1}else{var h=et(r),m;if(y=h.length,et(e).length!==y)return!1;for(;y--;)if(m=h[y],!(Hn(e,m)&&xd(r[m],e[m],t,i)))return!1}return t.pop(),i.pop(),!0}function Gk(r,e){return xd(r,e)}function Na(r){if(!Yn(r))return[];var e=[];for(var t in r)e.push(t);return CD&&qD(r,e),e}function jd(r){var e=At(r);return function(t){if(t==null)return!1;var i=Na(t);if(At(i))return!1;for(var a=0;a<e;a++)if(!Et(t[r[a]]))return!1;return r!==KD||!Et(t[kd])}}var kd="forEach",zD="has",qd=["clear","delete"],ZD=["get",zD,"set"],$k=qd.concat(kd,ZD),KD=qd.concat(ZD),Fk=["add"].concat(qd,kd,zD);const Uk=$d?jd($k):ct("Map"),xk=$d?jd(KD):ct("WeakMap"),jk=$d?jd(Fk):ct("Set"),kk=ct("WeakSet");function Di(r){for(var e=et(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=r[e[a]];return i}function qk(r){for(var e=et(r),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],r[e[a]]];return i}function XD(r){for(var e={},t=et(r),i=0,a=t.length;i<a;i++)e[r[t[i]]]=t[i];return e}function Jd(r){var e=[];for(var t in r)Et(r[t])&&e.push(t);return e.sort()}function Wd(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 QD=Wd(Na),Po=Wd(et),eP=Wd(Na,!0);function Jk(){return function(){}}function tP(r){if(!Yn(r))return{};if(OD)return OD(r);var e=Jk();e.prototype=r;var t=new e;return e.prototype=null,t}function Wk(r,e){var t=tP(r);return e&&Po(t,e),t}function Yk(r){return Yn(r)?Pr(r)?r.slice():QD({},r):r}function Hk(r,e){return e(r),r}function nP(r){return Pr(r)?r:[r]}se.toPath=nP;function Ma(r){return se.toPath(r)}function Yd(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 rP(r,e,t){var i=Yd(r,Ma(e));return wD(i)?t:i}function zk(r,e){e=Ma(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!Hn(r,a))return!1;r=r[a]}return!!t}function Hd(r){return r}function Va(r){return r=Po({},r),function(e){return JD(e,r)}}function zd(r){return r=Ma(r),function(e){return Yd(e,r)}}function La(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 iP(r,e,t){return r==null?Hd:Et(r)?La(r,e,t):Yn(r)&&!Pr(r)?Va(r):zd(r)}function Zd(r,e){return iP(r,e,1/0)}se.iteratee=Zd;function Ot(r,e,t){return se.iteratee!==Zd?se.iteratee(r,e):iP(r,e,t)}function Zk(r,e,t){e=Ot(e,t);for(var i=et(r),a=i.length,s={},o=0;o<a;o++){var l=i[o];s[l]=e(r[l],l,r)}return s}function aP(){}function Kk(r){return r==null?aP:function(e){return rP(r,e)}}function Xk(r,e,t){var i=Array(Math.max(0,r));e=La(e,t,1);for(var a=0;a<r;a++)i[a]=e(a);return i}function Kd(r,e){return e==null&&(e=r,r=0),r+Math.floor(Math.random()*(e-r+1))}const Ga=Date.now||function(){return new Date().getTime()};function sP(r){var e=function(s){return r[s]},t="(?:"+et(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 oP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Qk=sP(oP),e5=XD(oP),t5=sP(e5),n5=se.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Xd=/(.)^/,r5={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},i5=/\\|'|\r|\n|\u2028|\u2029/g;function a5(r){return"\\"+r5[r]}var s5=/^\s*(\w|\$)+\s*$/;function o5(r,e,t){!e&&t&&(e=t),e=eP({},e,se.templateSettings);var i=RegExp([(e.escape||Xd).source,(e.interpolate||Xd).source,(e.evaluate||Xd).source].join("|")+"|$","g"),a=0,s="__p+='";r.replace(i,function(y,h,m,R,v){return s+=r.slice(a,v).replace(i5,a5),a=v+y.length,h?s+=`'+
2
2
  ((__t=(`+h+`))==null?'':_.escape(__t))+
3
3
  '`:m?s+=`'+
4
4
  ((__t=(`+m+`))==null?'':__t)+
@@ -10,16 +10,16 @@ __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 l5(r,e,t){e=Na(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 c5=0;function d5(r){var e=++c5+"";return r?r+e:e}function u5(r){var e=se(r);return e._chain=!0,e}function oP(r,e,t,i,a){if(!(i instanceof e))return r.apply(t,a);var s=eP(r.prototype),o=r.apply(s,a);return Yn(o)?o:s}var Pi=Pt(function(r,e){var t=Pi.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 oP(r,i,this,this,o)};return i});Pi.placeholder=se;const lP=Pt(function(r,e,t){if(!Et(r))throw new TypeError("Bind must be called on a function");var i=Pt(function(a){return oP(r,i,e,this,t.concat(a))});return i}),wt=UD(At);function Ar(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(wt(l)&&(Pr(l)||Ud(l)))if(e>1)Ar(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 p5=Pt(function(r,e){e=Ar(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]=lP(r[i],r)}return r});function y5(r,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return Hn(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const cP=Pt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),h5=Pi(cP,se,1);function f5(r,e,t){var i,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:La(),i=null,o=r.apply(a,s),i||(a=s=null)},y=function(){var h=La();!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 m5(r,e,t){var i,a,s,o,l,p=function(){var h=La()-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=La(),i||(i=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return y.cancel=function(){clearTimeout(i),i=s=l=null},y}function T5(r,e){return Pi(e,r)}function Qd(r){return function(){return!r.apply(this,arguments)}}function E5(){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 b5(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function dP(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const R5=Pi(dP,2);function uP(r,e,t){e=Ot(e,t);for(var i=et(r),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(r[a],a,r))return a}function pP(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 eu=pP(1),yP=pP(-1);function hP(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 fP(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(Ca.call(i,o,l),$D),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 mP=fP(1,eu,hP),g5=fP(-1,yP);function tu(r,e,t){var i=wt(r)?eu:uP,a=i(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function v5(r,e){return tu(r,Ma(e))}function Pn(r,e,t){e=Va(e,t);var i,a;if(wt(r))for(i=0,a=r.length;i<a;i++)e(r[i],i,r);else{var s=et(r);for(i=0,a=s.length;i<a;i++)e(r[s[i]],s[i],r)}return r}function Or(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 TP(r){var e=function(t,i,a,s){var o=!wt(t)&&et(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,Va(i,s,4),a,o)}}const nu=TP(1),EP=TP(-1);function Ai(r,e,t){var i=[];return e=Ot(e,t),Pn(r,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function I5(r,e,t){return Ai(r,Qd(Ot(e)),t)}function bP(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 RP(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 An(r,e,t,i){return wt(r)||(r=Di(r)),(typeof t!="number"||i)&&(t=0),mP(r,e,t)>=0}const D5=Pt(function(r,e,t){var i,a;return Et(e)?a=e:(e=Na(e),i=e.slice(0,-1),e=e[e.length-1]),Or(r,function(s){var o=a;if(!o){if(i&&i.length&&(s=Yd(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function ru(r,e){return Or(r,zd(e))}function P5(r,e){return Ai(r,Ma(e))}function gP(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=wt(r)?r:Di(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),Pn(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 A5(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=wt(r)?r:Di(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),Pn(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 O5=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function vP(r){return r?Pr(r)?Ca.call(r):Gd(r)?r.match(O5):wt(r)?Or(r,Hd):Di(r):[]}function IP(r,e,t){if(e==null||t)return wt(r)||(r=Di(r)),r[Kd(r.length-1)];var i=vP(r),a=At(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Kd(o,s),p=i[o];i[o]=i[l],i[l]=p}return i.slice(0,e)}function S5(r){return IP(r,1/0)}function C5(r,e,t){var i=0;return e=Ot(e,t),ru(Or(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 Ao(r,e){return function(t,i,a){var s=e?[[],[]]:{};return i=Ot(i,a),Pn(t,function(o,l){var p=i(o,l,t);r(s,o,p)}),s}}const B5=Ao(function(r,e,t){Hn(r,t)?r[t].push(e):r[t]=[e]}),w5=Ao(function(r,e,t){r[t]=e}),_5=Ao(function(r,e,t){Hn(r,t)?r[t]++:r[t]=1}),N5=Ao(function(r,e,t){r[t?0:1].push(e)},!0);function M5(r){return r==null?0:wt(r)?r.length:et(r).length}function V5(r,e,t){return e in t}const DP=Pt(function(r,e){var t={},i=e[0];if(r==null)return t;Et(i)?(e.length>1&&(i=Va(i,e[1])),e=_a(r)):(i=V5,e=Ar(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}),L5=Pt(function(r,e){var t=e[0],i;return Et(t)?(t=Qd(t),e.length>1&&(i=e[1])):(e=Or(Ar(e,!1,!1),String),t=function(a,s){return!An(e,s)}),DP(r,t,i)});function PP(r,e,t){return Ca.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function iu(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:PP(r,r.length-e)}function Oo(r,e,t){return Ca.call(r,e==null||t?1:e)}function G5(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:Oo(r,Math.max(0,r.length-e))}function $5(r){return Ai(r,Boolean)}function F5(r,e){return Ar(r,e,!1)}const AP=Pt(function(r,e){return e=Ar(e,!0,!0),Ai(r,function(t){return!An(e,t)})}),U5=Pt(function(r,e){return AP(r,e)});function au(r,e,t,i){wD(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?An(s,y)||(s.push(y),a.push(p)):An(a,p)||a.push(p)}return a}const x5=Pt(function(r){return au(Ar(r,!0,!0))});function j5(r){for(var e=[],t=arguments.length,i=0,a=At(r);i<a;i++){var s=r[i];if(!An(e,s)){var o;for(o=1;o<t&&An(arguments[o],s);o++);o===t&&e.push(s)}}return e}function su(r){for(var e=r&&gP(r,At).length||0,t=Array(e),i=0;i<e;i++)t[i]=ru(r,i);return t}const k5=Pt(su);function q5(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 J5(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 W5(r,e){if(e==null||e<1)return[];for(var t=[],i=0,a=r.length;i<a;)t.push(Ca.call(r,i,i+=e));return t}function ou(r,e){return r._chain?se(e).chain():e}function OP(r){return Pn(Jd(r),function(e){var t=se[e]=r[e];se.prototype[e]=function(){var i=[this._wrapped];return Tk.apply(i,arguments),ou(this,t.apply(se,i))}}),se}Pn(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=vo[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]),ou(this,t)}}),Pn(["concat","join","slice"],function(r){var e=vo[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),ou(this,t)}});var SP=OP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:gD,after:b5,all:bP,allKeys:_a,any:RP,assign:Po,before:dP,bind:lP,bindAll:p5,chain:u5,chunk:W5,clone:Yk,collect:Or,compact:$5,compose:E5,constant:FD,contains:An,countBy:_5,create:Wk,debounce:m5,default:se,defaults:QD,defer:h5,delay:cP,detect:tu,difference:AP,drop:Oo,each:Pn,escape:Qk,every:bP,extend:XD,extendOwn:Po,filter:Ai,find:tu,findIndex:eu,findKey:uP,findLastIndex:yP,findWhere:v5,first:iu,flatten:F5,foldl:nu,foldr:EP,forEach:Pn,functions:Jd,get:nP,groupBy:B5,has:zk,head:iu,identity:Hd,include:An,includes:An,indexBy:w5,indexOf:mP,initial:PP,inject:nu,intersection:j5,invert:KD,invoke:D5,isArguments:Ud,isArray:Pr,isArrayBuffer:MD,isBoolean:wD,isDataView:Io,isDate:Ak,isElement:Pk,isEmpty:wa,isEqual:Gk,isError:Sk,isFinite:_k,isFunction:Et,isMap:Uk,isMatch:qD,isNaN:$D,isNull:Dk,isNumber:_D,isObject:Yn,isRegExp:Ok,isSet:jk,isString:Gd,isSymbol:ND,isTypedArray:jD,isUndefined:BD,isWeakMap:xk,isWeakSet:kk,iteratee:Zd,keys:et,last:G5,lastIndexOf:g5,map:Or,mapObject:Zk,matcher:Ma,matches:Ma,max:gP,memoize:y5,methods:Jd,min:A5,mixin:OP,negate:Qd,noop:iP,now:La,object:q5,omit:L5,once:R5,pairs:qk,partial:Pi,partition:N5,pick:DP,pluck:ru,property:zd,propertyOf:Kk,random:Kd,range:J5,reduce:nu,reduceRight:EP,reject:I5,rest:Oo,restArguments:Pt,result:l5,sample:IP,select:Ai,shuffle:S5,size:M5,some:RP,sortBy:C5,sortedIndex:hP,tail:Oo,take:iu,tap:Hk,template:o5,templateSettings:n5,throttle:f5,times:Xk,toArray:vP,toPath:tP,transpose:su,unescape:t5,union:x5,uniq:au,unique:au,uniqueId:d5,unzip:su,values:Di,where:P5,without:U5,wrap:T5,zip:k5},Symbol.toStringTag,{value:"Module"})));SP._=SP;function So(r){return r.charAt(0).toUpperCase()+r.slice(1)}function CP(r){return r.charAt(0).toLowerCase()+r.slice(1)}function BP(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:Ut(r.dataType,e.dataType).compatible}function wP(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=BP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||i.push(s)}return!(i.length>0)}var Ft=(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))(Ft||{});function Ut(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=wP(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 Y5(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 _P(r){return r.dataType?r.dataType:null}function lu(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved()?e:r.readsValue?cn(r.readsValue):null}function cu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved()?r.dataType:r.readsValue?cn(r.readsValue):null}function NP(r){return cn(r.declaration)}function MP(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function du(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function VP(r){return(r==null?void 0:r.dataType)||null}function LP(r){return(r==null?void 0:r.dataType)||null}function cn(r){switch(r.type){case n.VariableDeclaration:return MP(r);case n.ArgumentDeclaration:return _P(r);case n.ReturnDeclaration:return cu(r);case n.VariableInstance:return NP(r);case n.InputMap:return lu(r);case n.OutputMap:return du(r);case n.Property:return VP(r);case n.ValueDescriptor:return LP(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Co(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 Sr(r){return r.declaration||r}function H5(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function uu(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(...uu(r.parent))}return t}function z5(r){return r.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function Z5(r){return r.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function GP(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 Bo(r){return GP(r).toLowerCase()}function pu(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===P.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=UP(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=FP(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 K5(r){if(!r)return"Any data type";const e=r.getDataType();return pu(e)}function wo(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 Mt.Empty:return"is empty";case Mt.NotEmpty:return"is not empty"}}function $P(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 FP(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 UP(r){const e=Uu(r);if(!e){const t=Fu(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 xP(r){let e="Find ";return r.outputsDeclarations.forEach((t,i)=>{const a=Co(t),s=CP(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 jP(r){switch(r.name){case P.String:return"Text";case P.Number:return"Number";case P.Boolean:return"Boolean";case P.JSON:return"Data structure";case P.UUID:return"Unique identifier";case P.Date:return"Date";case P.EntityTemplate:return"Entity as template";case P.Enum:return"Enumeration";case P.File:return"File";case P.Null:return"Empty";case P.ActionDescriptor:return"Action descriptor";default:return r.name}}function kP(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 nt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case W.AddIndex:return"Add item at index position";case W.DeleteFirst:return"Delete first item";case W.DeleteLast:return"Delete last item";case W.DeleteIndex:return"Delete item at index position";case W.Join:return"Join lists";case W.ReplaceAllMatches:return"Replace all matches";case W.ReplaceFirst:return"Replace first match";case W.ReplaceLast:return"Replace last match";case W.Split:return"Split list";case W.ReplaceIndex:return"Replace at index position";case W.ReplaceSingleMatch:return"Replace single match";case W.GetFirst:return"Get first item";case W.GetLast:return"Get last item";case W.GetIndex:return"Get item at index position";case W.Append:return"Add item at the end";case W.Prepend:return"Add item at the start";case pn.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 So(r.type).replaceAll("-"," ")}return i}if(n.BuiltInBaseEntity===r.type)return $P([r.name]);if(Yu.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return xP(r);case n.Operation:case n.InternalCall:case n.Loop:const i=Nt(r.declaration,e);return C(i,e);case n.ActionDescriptor:return kP(r);case n.BreakStatement:const a=Nt(r.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Nt(r.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Nt(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} ${wo(l)} ${y}`}return`If ${p} ${wo(l)}`}else return`If ${wo(l)}`}case n.ReturnStatement:{const l=Nt(r.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(r.declaration){const l=Nt(r.declaration,e);return C(l,e)||""}else return r.name||"";case n.VariableInstance:{const l=Nt(r.declaration,e);return C(l,e)||""}case n.OutputMap:if(r.declaration){const l=Nt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.PrimitiveValue:return jP(r);default:return So(r.type).replaceAll("-"," ")}}function _o(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 l5(r,e,t){e=Ma(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 c5=0;function d5(r){var e=++c5+"";return r?r+e:e}function u5(r){var e=se(r);return e._chain=!0,e}function lP(r,e,t,i,a){if(!(i instanceof e))return r.apply(t,a);var s=tP(r.prototype),o=r.apply(s,a);return Yn(o)?o:s}var Pi=Pt(function(r,e){var t=Pi.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 lP(r,i,this,this,o)};return i});Pi.placeholder=se;const cP=Pt(function(r,e,t){if(!Et(r))throw new TypeError("Bind must be called on a function");var i=Pt(function(a){return lP(r,i,e,this,t.concat(a))});return i}),wt=xD(At);function Ar(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(wt(l)&&(Pr(l)||Ud(l)))if(e>1)Ar(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 p5=Pt(function(r,e){e=Ar(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]=cP(r[i],r)}return r});function y5(r,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return Hn(a,s)||(a[s]=r.apply(this,arguments)),a[s]};return t.cache={},t}const dP=Pt(function(r,e,t){return setTimeout(function(){return r.apply(null,t)},e)}),h5=Pi(dP,se,1);function f5(r,e,t){var i,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:Ga(),i=null,o=r.apply(a,s),i||(a=s=null)},y=function(){var h=Ga();!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 m5(r,e,t){var i,a,s,o,l,p=function(){var h=Ga()-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=Ga(),i||(i=setTimeout(p,e),t&&(o=r.apply(l,s))),o});return y.cancel=function(){clearTimeout(i),i=s=l=null},y}function T5(r,e){return Pi(e,r)}function Qd(r){return function(){return!r.apply(this,arguments)}}function E5(){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 b5(r,e){return function(){if(--r<1)return e.apply(this,arguments)}}function uP(r,e){var t;return function(){return--r>0&&(t=e.apply(this,arguments)),r<=1&&(e=null),t}}const R5=Pi(uP,2);function pP(r,e,t){e=Ot(e,t);for(var i=et(r),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(r[a],a,r))return a}function yP(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 eu=yP(1),hP=yP(-1);function fP(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 mP(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(Ba.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 TP=mP(1,eu,fP),g5=mP(-1,hP);function tu(r,e,t){var i=wt(r)?eu:pP,a=i(r,e,t);if(a!==void 0&&a!==-1)return r[a]}function v5(r,e){return tu(r,Va(e))}function Pn(r,e,t){e=La(e,t);var i,a;if(wt(r))for(i=0,a=r.length;i<a;i++)e(r[i],i,r);else{var s=et(r);for(i=0,a=s.length;i<a;i++)e(r[s[i]],s[i],r)}return r}function Or(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 EP(r){var e=function(t,i,a,s){var o=!wt(t)&&et(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,La(i,s,4),a,o)}}const nu=EP(1),bP=EP(-1);function Ai(r,e,t){var i=[];return e=Ot(e,t),Pn(r,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function I5(r,e,t){return Ai(r,Qd(Ot(e)),t)}function RP(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 gP(r,e,t){e=Ot(e,t);for(var i=!wt(r)&&et(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 An(r,e,t,i){return wt(r)||(r=Di(r)),(typeof t!="number"||i)&&(t=0),TP(r,e,t)>=0}const D5=Pt(function(r,e,t){var i,a;return Et(e)?a=e:(e=Ma(e),i=e.slice(0,-1),e=e[e.length-1]),Or(r,function(s){var o=a;if(!o){if(i&&i.length&&(s=Yd(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function ru(r,e){return Or(r,zd(e))}function P5(r,e){return Ai(r,Va(e))}function vP(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=wt(r)?r:Di(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),Pn(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 A5(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=wt(r)?r:Di(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),Pn(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 O5=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function IP(r){return r?Pr(r)?Ba.call(r):Gd(r)?r.match(O5):wt(r)?Or(r,Hd):Di(r):[]}function DP(r,e,t){if(e==null||t)return wt(r)||(r=Di(r)),r[Kd(r.length-1)];var i=IP(r),a=At(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=Kd(o,s),p=i[o];i[o]=i[l],i[l]=p}return i.slice(0,e)}function S5(r){return DP(r,1/0)}function C5(r,e,t){var i=0;return e=Ot(e,t),ru(Or(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 Ao(r,e){return function(t,i,a){var s=e?[[],[]]:{};return i=Ot(i,a),Pn(t,function(o,l){var p=i(o,l,t);r(s,o,p)}),s}}const B5=Ao(function(r,e,t){Hn(r,t)?r[t].push(e):r[t]=[e]}),w5=Ao(function(r,e,t){r[t]=e}),_5=Ao(function(r,e,t){Hn(r,t)?r[t]++:r[t]=1}),N5=Ao(function(r,e,t){r[t?0:1].push(e)},!0);function M5(r){return r==null?0:wt(r)?r.length:et(r).length}function V5(r,e,t){return e in t}const PP=Pt(function(r,e){var t={},i=e[0];if(r==null)return t;Et(i)?(e.length>1&&(i=La(i,e[1])),e=Na(r)):(i=V5,e=Ar(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}),L5=Pt(function(r,e){var t=e[0],i;return Et(t)?(t=Qd(t),e.length>1&&(i=e[1])):(e=Or(Ar(e,!1,!1),String),t=function(a,s){return!An(e,s)}),PP(r,t,i)});function AP(r,e,t){return Ba.call(r,0,Math.max(0,r.length-(e==null||t?1:e)))}function iu(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[0]:AP(r,r.length-e)}function Oo(r,e,t){return Ba.call(r,e==null||t?1:e)}function G5(r,e,t){return r==null||r.length<1?e==null||t?void 0:[]:e==null||t?r[r.length-1]:Oo(r,Math.max(0,r.length-e))}function $5(r){return Ai(r,Boolean)}function F5(r,e){return Ar(r,e,!1)}const OP=Pt(function(r,e){return e=Ar(e,!0,!0),Ai(r,function(t){return!An(e,t)})}),U5=Pt(function(r,e){return OP(r,e)});function au(r,e,t,i){_D(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?An(s,y)||(s.push(y),a.push(p)):An(a,p)||a.push(p)}return a}const x5=Pt(function(r){return au(Ar(r,!0,!0))});function j5(r){for(var e=[],t=arguments.length,i=0,a=At(r);i<a;i++){var s=r[i];if(!An(e,s)){var o;for(o=1;o<t&&An(arguments[o],s);o++);o===t&&e.push(s)}}return e}function su(r){for(var e=r&&vP(r,At).length||0,t=Array(e),i=0;i<e;i++)t[i]=ru(r,i);return t}const k5=Pt(su);function q5(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 J5(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 W5(r,e){if(e==null||e<1)return[];for(var t=[],i=0,a=r.length;i<a;)t.push(Ba.call(r,i,i+=e));return t}function ou(r,e){return r._chain?se(e).chain():e}function SP(r){return Pn(Jd(r),function(e){var t=se[e]=r[e];se.prototype[e]=function(){var i=[this._wrapped];return Tk.apply(i,arguments),ou(this,t.apply(se,i))}}),se}Pn(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var e=vo[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]),ou(this,t)}}),Pn(["concat","join","slice"],function(r){var e=vo[r];se.prototype[r]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),ou(this,t)}});var CP=SP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:vD,after:b5,all:RP,allKeys:Na,any:gP,assign:Po,before:uP,bind:cP,bindAll:p5,chain:u5,chunk:W5,clone:Yk,collect:Or,compact:$5,compose:E5,constant:UD,contains:An,countBy:_5,create:Wk,debounce:m5,default:se,defaults:eP,defer:h5,delay:dP,detect:tu,difference:OP,drop:Oo,each:Pn,escape:Qk,every:RP,extend:QD,extendOwn:Po,filter:Ai,find:tu,findIndex:eu,findKey:pP,findLastIndex:hP,findWhere:v5,first:iu,flatten:F5,foldl:nu,foldr:bP,forEach:Pn,functions:Jd,get:rP,groupBy:B5,has:zk,head:iu,identity:Hd,include:An,includes:An,indexBy:w5,indexOf:TP,initial:AP,inject:nu,intersection:j5,invert:XD,invoke:D5,isArguments:Ud,isArray:Pr,isArrayBuffer:VD,isBoolean:_D,isDataView:Io,isDate:Ak,isElement:Pk,isEmpty:_a,isEqual:Gk,isError:Sk,isFinite:_k,isFunction:Et,isMap:Uk,isMatch:JD,isNaN:FD,isNull:Dk,isNumber:ND,isObject:Yn,isRegExp:Ok,isSet:jk,isString:Gd,isSymbol:MD,isTypedArray:kD,isUndefined:wD,isWeakMap:xk,isWeakSet:kk,iteratee:Zd,keys:et,last:G5,lastIndexOf:g5,map:Or,mapObject:Zk,matcher:Va,matches:Va,max:vP,memoize:y5,methods:Jd,min:A5,mixin:SP,negate:Qd,noop:aP,now:Ga,object:q5,omit:L5,once:R5,pairs:qk,partial:Pi,partition:N5,pick:PP,pluck:ru,property:zd,propertyOf:Kk,random:Kd,range:J5,reduce:nu,reduceRight:bP,reject:I5,rest:Oo,restArguments:Pt,result:l5,sample:DP,select:Ai,shuffle:S5,size:M5,some:gP,sortBy:C5,sortedIndex:fP,tail:Oo,take:iu,tap:Hk,template:o5,templateSettings:n5,throttle:f5,times:Xk,toArray:IP,toPath:nP,transpose:su,unescape:t5,union:x5,uniq:au,unique:au,uniqueId:d5,unzip:su,values:Di,where:P5,without:U5,wrap:T5,zip:k5},Symbol.toStringTag,{value:"Module"})));CP._=CP;function So(r){return r.charAt(0).toUpperCase()+r.slice(1)}function BP(r){return r.charAt(0).toLowerCase()+r.slice(1)}function wP(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:Ut(r.dataType,e.dataType).compatible}function _P(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=wP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||i.push(s)}return!(i.length>0)}var Ft=(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))(Ft||{});function Ut(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=_P(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 Y5(r){const e=r.project.builtInBaseEntities.find(a=>a.id===M.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 NP(r){return r.dataType?r.dataType:null}function lu(r){var t;const e=(t=r.declaration)==null?void 0:t.getDataType();return e&&e.isResolved()?e:r.readsValue?cn(r.readsValue):null}function cu(r){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved()?r.dataType:r.readsValue?cn(r.readsValue):null}function MP(r){return cn(r.declaration)}function VP(r){return r.dataType&&!r.dataType.inferred?r.dataType:(r.dataType&&r.dataType.inferred,r.inferDataTypeAndSyncInstancesInputsAndOutputs(),r.dataType)}function du(r){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function LP(r){return(r==null?void 0:r.dataType)||null}function GP(r){return(r==null?void 0:r.dataType)||null}function cn(r){switch(r.type){case n.VariableDeclaration:return VP(r);case n.ArgumentDeclaration:return NP(r);case n.ReturnDeclaration:return cu(r);case n.VariableInstance:return MP(r);case n.InputMap:return lu(r);case n.OutputMap:return du(r);case n.Property:return LP(r);case n.ValueDescriptor:return GP(r);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function Co(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 Sr(r){return r.declaration||r}function H5(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function uu(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(...uu(r.parent))}return t}function z5(r){return r.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function Z5(r){return r.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function $P(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 Bo(r){return $P(r).toLowerCase()}function pu(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===P.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=xP(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=UP(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 K5(r){if(!r)return"Any data type";const e=r.getDataType();return pu(e)}function wo(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 Mt.Empty:return"is empty";case Mt.NotEmpty:return"is not empty"}}function FP(r){return r.includes(M.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(M.PERSISTED_ENTITY)?"Persisted entity":r.includes(M.CRON_JOB)?"Scheduled execution":r.includes(M.RELATIONAL_DATABASE)?"Relational database":"Entity"}function UP(r){switch(r.name){case M.HTTP_ENDPOINT:return"HTTP endpoint";case M.PERSISTED_ENTITY:return"Persisted entity";case M.CRON_JOB:return"Scheduled execution";case M.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function xP(r){const e=xu(r);if(!e){const t=Fu(r);return t.includes(M.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(M.PERSISTED_ENTITY)?"Persisted entity":t.includes(M.CRON_JOB)?"Scheduled execution":t.includes(M.RELATIONAL_DATABASE)?"Relational database":C(r,r.project)+" entity"}return C(e,r.project)+" entity"}function jP(r){let e="Find ";return r.outputsDeclarations.forEach((t,i)=>{const a=Co(t),s=BP(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 kP(r){switch(r.name){case P.String:return"Text";case P.Number:return"Number";case P.Boolean:return"Boolean";case P.JSON:return"Data structure";case P.UUID:return"Unique identifier";case P.Date:return"Date";case P.EntityTemplate:return"Entity as template";case P.Enum:return"Enumeration";case P.File:return"File";case P.Null:return"Empty";case P.ActionDescriptor:return"Action descriptor";default:return r.name}}function qP(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 nt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case W.AddIndex:return"Add item at index position";case W.DeleteFirst:return"Delete first item";case W.DeleteLast:return"Delete last item";case W.DeleteIndex:return"Delete item at index position";case W.Join:return"Join lists";case W.ReplaceAllMatches:return"Replace all matches";case W.ReplaceFirst:return"Replace first match";case W.ReplaceLast:return"Replace last match";case W.Split:return"Split list";case W.ReplaceIndex:return"Replace at index position";case W.ReplaceSingleMatch:return"Replace single match";case W.GetFirst:return"Get first item";case W.GetLast:return"Get last item";case W.GetIndex:return"Get item at index position";case W.Append:return"Add item at the end";case W.Prepend:return"Add item at the start";case pn.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 So(r.type).replaceAll("-"," ")}return i}if(n.BuiltInBaseEntity===r.type)return FP([r.name]);if(Hu.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return jP(r);case n.Operation:case n.InternalCall:case n.Loop:const i=Nt(r.declaration,e);return C(i,e);case n.ActionDescriptor:return qP(r);case n.BreakStatement:const a=Nt(r.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Nt(r.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Nt(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} ${wo(l)} ${y}`}return`If ${p} ${wo(l)}`}else return`If ${wo(l)}`}case n.ReturnStatement:{const l=Nt(r.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(r.declaration){const l=Nt(r.declaration,e);return C(l,e)||""}else return r.name||"";case n.VariableInstance:{const l=Nt(r.declaration,e);return C(l,e)||""}case n.OutputMap:if(r.declaration){const l=Nt(r.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.PrimitiveValue:return kP(r);default:return So(r.type).replaceAll("-"," ")}}function _o(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 yu(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 hu(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&&Nt(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=uu(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 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=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 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=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=Vu(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 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=RA(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
- Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function X5(r,e){switch(r.type){case n.CustomEntity:return _o(r,e);case n.FunctionDeclaration:return yu(r,e);case n.VariableDeclaration:return hu(r,e);case n.Property:return fu(r,e);case n.ArgumentDeclaration:return mu(r,e);case n.ReturnDeclaration:return Tu(r,e);default:return[]}}function Ze(r,e,t){const a=`${Bo(r)}-${e}-id`;return t.instances[a]?_.UUID.uuid():a}function Eu(r,e){let t="",i=null;if(r.parent){const s=e.get(r.parent);s&&(i=s)}let a="";return i&&(a=`${Bo(C(i,e))}-`),t=`${a}${Bo(C(r,e))}-id`,e.instances[t]?_.UUID.uuid():t}function Q5(r){var o;const e=g9(),t=r.toJSON();e.safeParse(t).success;const a=e2(r);(o=r.dataType)==null||o.validate();const s=[...a];if(r.id==="80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"){const l=H({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 e2(r){const e=[];if(!r.implements)return e;const t=r.implements;if(!t.abstract){const a=H({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=H({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=H({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(!Ut(r.dataType,t.dataType)){const a=H({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 t2(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=er(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=Qn(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+=`
18
+ 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=gA(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
+ Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}}return t}function X5(r,e){switch(r.type){case n.CustomEntity:return _o(r,e);case n.FunctionDeclaration:return yu(r,e);case n.VariableDeclaration:return hu(r,e);case n.Property:return fu(r,e);case n.ArgumentDeclaration:return mu(r,e);case n.ReturnDeclaration:return Tu(r,e);default:return[]}}function Ze(r,e,t){const a=`${Bo(r)}-${e}-id`;return t.instances[a]?_.UUID.uuid():a}function Eu(r,e){let t="",i=null;if(r.parent){const s=e.get(r.parent);s&&(i=s)}let a="";return i&&(a=`${Bo(C(i,e))}-`),t=`${a}${Bo(C(r,e))}-id`,e.instances[t]?_.UUID.uuid():t}function Q5(r){var o;const e=g9(),t=r.toJSON();e.safeParse(t).success;const a=e2(r);(o=r.dataType)==null||o.validate();const s=[...a];if(r.id==="80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"){const l=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return s}function e2(r){const e=[];if(!r.implements)return e;const t=r.implements;if(!t.abstract){const a=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});e.push(a.error)}if(r.static&&!t.static){const a=H({id:`${r.id}--${V.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:V.NonStaticPropertyImplementsStatic,entity:r});e.push(a.error)}if(!r.static&&t.static){const a=H({id:`${r.id}--${V.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:V.StaticPropertyImplementsNonStatic,entity:r});e.push(a.error)}if(!Ut(r.dataType,t.dataType)){const a=H({id:`${r.id}--${V.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:V.PropertyImplementsIncompatibleType,entity:r});e.push(a.error)}return ie(r.errors,e)}function t2(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=er(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=Qn(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
20
  ${Kn}`,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=Ye(r,{},e);return t.push(...i.errors),t}const be=class be{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"private");d(this,"abstract");d(this,"index");d(this,"static");d(this,"required");d(this,"type",n.Property);d(this,"hidden",!1);d(this,"dataType",null);d(this,"implements",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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}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,abstract:e.abstract,static:e.static,required:e.required||!1,hidden:!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=t2(i,t),o=fu(i,t);return a.push(...s,...o,...Le(i)),{errors:a,modifiedData:i}}get isExtendedProperty(){const e=this.parent.allBaseRelatedPropertiesFromExtendedAndImplementedEntities.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
- ${Lo}`,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}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,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,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,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=Q5(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,dataType:null,implements:this.implements,parent:l},y=kt(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}};d(be,"MUTABLE_BASE_PROPERTIES",["name","description","private","abstract","static","required"]),d(be,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(be,"BASE_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,...be.INMUTABLE_BASE_PROPERTIES]),d(be,"MUTABLE_META_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,"index"]),d(be,"INMUTABLE_META_PROPERTIES",[...be.INMUTABLE_BASE_PROPERTIES]),d(be,"META_PROPERTIES",[...be.MUTABLE_META_PROPERTIES,...be.INMUTABLE_META_PROPERTIES]),d(be,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(be,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),d(be,"UPSTREAM_PROPERTIES",[...be.MUTABLE_UPSTREAM_PROPERTIES,...be.INMUTABLE_UPSTREAM_PROPERTIES]),d(be,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),d(be,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(be,"DOWNSTREAM_PROPERTIES",[...be.MUTABLE_DOWNSTREAM_PROPERTIES,...be.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(be,"PROPERTIES",[...be.META_PROPERTIES,...be.UPSTREAM_PROPERTIES,...be.DOWNSTREAM_PROPERTIES]);let Cr=be;function n2(r){const e=$3(),t=r.toJSON();e.safeParse(t).success;const a=r2(r),s=i2(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=H({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 r2(r){const e=[];if(!r.calls.length){const t=H({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 i2(r){const e=[];return r.implements,ie(r.errors,e)}const Re=class Re{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"collapsed");d(this,"private");d(this,"index",null);d(this,"type",n.FunctionDeclaration);d(this,"implements",null);d(this,"inputs",[]);d(this,"returnStatements",[]);d(this,"calls",[]);d(this,"parent");d(this,"detachedChildren",[]);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(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=yu(i,t),l=i.parent?t.get(i.parent):null;if(l&&l.type===n.CustomEntity){const m=l,v=Qn(m).filter(D=>!D.interactive);if(v.length){let D=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)}").`;D+=`
22
+ ${Lo}`,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}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,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,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,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=Q5(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,dataType:null,implements:this.implements,parent:l},y=kt(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}};d(be,"MUTABLE_BASE_PROPERTIES",["name","description","private","abstract","static","required"]),d(be,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(be,"BASE_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,...be.INMUTABLE_BASE_PROPERTIES]),d(be,"MUTABLE_META_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,"index"]),d(be,"INMUTABLE_META_PROPERTIES",[...be.INMUTABLE_BASE_PROPERTIES]),d(be,"META_PROPERTIES",[...be.MUTABLE_META_PROPERTIES,...be.INMUTABLE_META_PROPERTIES]),d(be,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(be,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),d(be,"UPSTREAM_PROPERTIES",[...be.MUTABLE_UPSTREAM_PROPERTIES,...be.INMUTABLE_UPSTREAM_PROPERTIES]),d(be,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),d(be,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(be,"DOWNSTREAM_PROPERTIES",[...be.MUTABLE_DOWNSTREAM_PROPERTIES,...be.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(be,"PROPERTIES",[...be.META_PROPERTIES,...be.UPSTREAM_PROPERTIES,...be.DOWNSTREAM_PROPERTIES]);let Cr=be;function n2(r){const e=$3(),t=r.toJSON();e.safeParse(t).success;const a=r2(r),s=i2(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=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});l.push(p.error)}return ie(r.errors,l)}function r2(r){const e=[];if(!r.calls.length){const t=H({id:`${r.id}--${V.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:V.ScopeWithoutLogic,entity:r});e.push(t.error)}return ie(r.errors,e)}function i2(r){const e=[];return r.implements,ie(r.errors,e)}const Re=class Re{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"collapsed");d(this,"private");d(this,"index",null);d(this,"type",n.FunctionDeclaration);d(this,"implements",null);d(this,"inputs",[]);d(this,"returnStatements",[]);d(this,"calls",[]);d(this,"parent");d(this,"detachedChildren",[]);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(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=yu(i,t),l=i.parent?t.get(i.parent):null;if(l&&l.type===n.CustomEntity){const m=l,v=Qn(m).filter(D=>!D.interactive);if(v.length){let D=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)}").`;D+=`
23
23
  ${Kn}`,a.push(new b({id:`${e.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:D,issue:null}))}else{const D=m.methods.find(F=>{var k;return((k=F.implements)==null?void 0:k.id)===i.implements});D&&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 '${D.id}' that implements the same base method.
24
24
  A ${n.FunctionDeclaration} that has a parent of type '${n.CustomEntity}' is considered a method of that entity, and cannot implement the same '${n.ActionDescriptor}' more than once.
25
25
  ${n.ActionDescriptor} entities inside a ${n.CustomEntity} are considered abstract methods that can be implemented by ${n.FunctionDeclaration} entities inside the same parent.
@@ -29,12 +29,12 @@ If you want to implement a new method, you can create a new 'function-declaratio
29
29
  If you want to modify the existing implementation, you can update the existing method instead, but it will have to match the same base ${n.ActionDescriptor} signature, otherwise the implementation will have a validation error.`,issue:null}))}}else if(l&&l.type===n.Loop){const m=l.body;m&&((h=m.implements)==null?void 0:h.id)===i.implements&&a.push(new b({id:`${i.id}--${S.MethodOverwrite}`,code:S.MethodOverwrite,severity:T.Error,message:`The '${n.FunctionDeclaration}' with id "${i.id}" is being added as the 'body' of the ${n.Loop} with id "${l.id}", but the loop already has a function-declaration body. A loop can only have one function-declaration body at a time. You can edit the existing body instead, but it will have to match the same base signature, otherwise the implementation will have a validation error.`,issue:null}))}const p=i.parent&&t.get(i.parent)||t.getBuiltIn(i.parent),y=p?er(p):null;return y&&a.push(new b({id:`${e.id}--${f.BuiltInEntityParent}`,code:f.BuiltInEntityParent,severity:T.Error,message:`The entity with id '${e.id}' and type '${e.type}', belongs to a built-in system entity "${C(y,t)}" with id '${y.id}', and therefore it cannot be created as it would affect a built in entity, which are inmutable.`,issue:null})),a.push(...s.errors,...o,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&(this.parent.type===n.Project?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.
30
30
  This is likely an incorrect strategy because this is a globally declared '${this.type}' entity which can only have the root project as its parent.`,issue:null})):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.
31
31
  This is likely an incorrect strategy because this function declaration is a method, since it belongs to a '${this.parent.type}' entity, 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.
32
- Please consider that any updates might affect the overlap with the signature of the parent entity's action descriptors.`,issue:null}))),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===n.CustomEntity?(this.parent.addMethod(this),e.push(this.parent)):this.parent.type===n.Loop&&(this.parent.setBody(this),e.push(this.parent)),{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}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.indexOf(e);return t!==-1&&this.inputs.splice(t,1),this}setParent(e){return this.parent=e,this}setImplements(e){return this.implements=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}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),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent),t.initChildren()):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.initialData.implements&&(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.description=e.description||this.description,this.private=e.private||this.private,this.index=e.index||(e.index!==0?this.index:0),this.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,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(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(){var e;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,parent:this.parent.toReference(),calls:this.calls.map(t=>t.toJSON()),inputs:this.inputs.map(t=>t.toJSON()),implements:((e=this.implements)==null?void 0:e.toJSON())||null,returnStatements:this.returnStatements.map(t=>t.toJSON())}}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,description:this.description,index:this.index,collapsed:this.collapsed,private:this.private,x:this.x,y:this.y,inputs:this.inputs.map(t=>t.toReference()),calls:this.calls.map(t=>t.toReference()),returnStatements:this.returnStatements.map(t=>t.toReference()),implements:((e=this.implements)==null?void 0:e.toReference())||null,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)),...this.implements?this.implements.toFlatJSON(e):[]])}toGenerationTarget(){var t;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,private:this.private,implements:((t=this.implements)==null?void 0:t.id)||null,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.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=n2(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(e=null,t=null,i=!0,a=!1){var m;const s=this.toJSON(),o=t||Ze(C(this,this.project),n.FunctionDeclaration,this.project);s.inputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const y=kt(s,this.project);e?y.setParent(e):y.setParent(this.parent),i&&y.subscribe(),y.initChildren();const h=(m=this.inputs)==null?void 0:m.map((R,v)=>R.clone(this,p+"-argument-declaration-"+v+"-id",i));return y.inputs=h,y}getVariableInstances(){return re(this).filter(i=>i.type===n.VariableInstance)}getArgument(e){return this.inputs.find(t=>t.id===e)||null}createCall(e=this.project,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.FunctionCall,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],error:t.error||null,process:t.process||null,calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],calledByEntry:t.calledByEntry||[],declaration:this.toJSON(),x:0,y:0},a=g(i,this.project);return a.setParent(e),a.initChildren(),e===this.project&&this.project.addFunctionCall(a),a}createInternalCall(e,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.InternalCall,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],error:t.error||null,process:t.process||null,calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],calledByEntry:t.calledByEntry||[],declaration:this.toShallowJSON(),index:e.internalCalls.length},a=g(i,this.project);return a.setParent(e),a.initChildren(),a}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}getUniqueReturnDeclarations(){const e=[],i=[...this.returnStatements].flatMap(a=>a.outputs);if(this.implements){const a=this.implements.outputs;return i.forEach(s=>{const o=a.find(p=>p===s.implements),l=e.find(p=>p.implements===s.implements);o&&!l&&e.push(s)}),E(e)}else return i.forEach(a=>{e.find(o=>o===a||C(o,this.project)===C(a,this.project)&&Ut(o.dataType,a.dataType))||e.push(a)}),E(e)}};d(Re,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),d(Re,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Re,"BASE_PROPERTIES",[...Re.MUTABLE_BASE_PROPERTIES,...Re.INMUTABLE_BASE_PROPERTIES]),d(Re,"MUTABLE_META_PROPERTIES",[...Re.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),d(Re,"INMUTABLE_META_PROPERTIES",[...Re.INMUTABLE_BASE_PROPERTIES]),d(Re,"META_PROPERTIES",[...Re.MUTABLE_META_PROPERTIES,...Re.INMUTABLE_META_PROPERTIES]),d(Re,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(Re,"INMUATABLE_UPSTREAM_PROPERTIES",["parent","implements"]),d(Re,"UPSTREAM_PROPERTIES",[...Re.MUTABLE_UPSTREAM_PROPERTIES,...Re.INMUATABLE_UPSTREAM_PROPERTIES]),d(Re,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),d(Re,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),d(Re,"DOWNSTREAM_PROPERTIES",[...Re.MUTABLE_DOWNSTREAM_PROPERTIES,...Re.INMUATABLE_DOWNSTREAM_PROPERTIES]),d(Re,"PROPERTIES",[...Re.META_PROPERTIES,...Re.UPSTREAM_PROPERTIES,...Re.DOWNSTREAM_PROPERTIES]);let Br=Re;function a2(r){const e=k6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.entity&&r.andChildrenGroup||r.entity&&r.orChildrenGroup||r.andChildrenGroup&&r.orChildrenGroup){const s=H({id:r.id+"--"+M.InvalidPropertiesCombination,message:`Data type with id "${r.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:T.Error,code:M.InvalidPropertiesCombination,entity:r});a.push(s.error)}return ie(r.errors,a)}function s2(r,e){const t=[],i=[n.CustomEntity,n.ActionDescriptor,n.Property,n.ArgumentDeclaration,n.ReturnDeclaration,n.VariableDeclaration,n.ValueDescriptor,n.DataType],a=`'${U(i,"', '","' or '")}'`;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 s=e.get(r.parent);s?i.includes(s.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 ${a}.`,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}))}else 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}" is missing a 'parent' reference. The 'parent' of a 'data-type' entity must be a reference to an entity of type ${a}.`,issue:null}));if(r.entity){if(r.id===r.entity)return t.push(new b({id:`${r.id}--${r.entity}--${f.SelfReference}`,code:f.SelfReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at 'entity'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null})),t;const s=e.get(r.entity);s?[n.CustomEntity,n.PrimitiveEntity,n.ActionDescriptor,n.BuiltInBaseEntity].includes(s.type)||t.push(new b({id:`${r.id}--${r.entity}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'entity' reference that isn't pointing to an entity of type 'custom-entity', 'primitive-entity', 'action-descriptor' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${r.entity}--${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.entity}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return t}const ge=class ge{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"isNullable");d(this,"isList",null);d(this,"constant");d(this,"asType",null);d(this,"type",n.DataType);d(this,"options");d(this,"parentRelationType");d(this,"like");d(this,"defaultValue",null);d(this,"entity",null);d(this,"andChildrenGroup",null);d(this,"orChildrenGroup",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"inferred",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.isNullable=e.isNullable,this.isList=e.isList,this.constant=e.constant,this.asType=e.asType,this.options=e.options,this.parentRelationType=e.parentRelationType,this.inferred=e.inferred||!1,this.like=e.like||!1}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;e.entity&&(s=t.get(e.entity));const o={id:e.id,version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:e.parentRelationType,isList:e.isList,isNullable:e.isNullable,constant:e.constant,like:e.like||!1,inferred:!1,defaultValue:null,entity:s,asType:e.asType,parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var p;let i=JSON.parse(JSON.stringify(e));const a=[],s=s2(i,t);if(a.push(...s,...Le(i)),i.entity){const y=t.get(i.entity);if(y.type===n.CustomEntity){const m=Qn(y).filter(R=>!R.interactive);if(m.length){const R=m.length>1?`entities with ids '${U(m.map(v=>v.id),"', '","' and '")}'`:`entity with id '${m[0].id}'`;a.push(new b({id:`${e.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:`The entity with id '${e.id}' and type '${e.type}', cannot reference 'custom-entity' with id '${i.entity}' at 'entity'. The entity extends or implements non-interactive built-in-base-entity ${R}.
32
+ Please consider that any updates might affect the overlap with the signature of the parent entity's action descriptors.`,issue:null}))),{errors:t,modifiedData:e}}addSelfToProject(){const e=[this],t=[],i=[];return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===n.CustomEntity?(this.parent.addMethod(this),e.push(this.parent)):this.parent.type===n.Loop&&(this.parent.setBody(this),e.push(this.parent)),{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}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.indexOf(e);return t!==-1&&this.inputs.splice(t,1),this}setParent(e){return this.parent=e,this}setImplements(e){return this.implements=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}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),[n.BreakStatement,n.ContinueStatement].includes(t.type)?(t.setParent(this.parent),t.initChildren()):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.initialData.implements&&(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.description=e.description||this.description,this.private=e.private||this.private,this.index=e.index||(e.index!==0?this.index:0),this.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,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(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(){var e;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,x:this.x,y:this.y,collapsed:this.collapsed,private:this.private,parent:this.parent.toReference(),calls:this.calls.map(t=>t.toJSON()),inputs:this.inputs.map(t=>t.toJSON()),implements:((e=this.implements)==null?void 0:e.toJSON())||null,returnStatements:this.returnStatements.map(t=>t.toJSON())}}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,description:this.description,index:this.index,collapsed:this.collapsed,private:this.private,x:this.x,y:this.y,inputs:this.inputs.map(t=>t.toReference()),calls:this.calls.map(t=>t.toReference()),returnStatements:this.returnStatements.map(t=>t.toReference()),implements:((e=this.implements)==null?void 0:e.toReference())||null,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)),...this.implements?this.implements.toFlatJSON(e):[]])}toGenerationTarget(){var t;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,private:this.private,implements:((t=this.implements)==null?void 0:t.id)||null,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.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=n2(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(e=null,t=null,i=!0,a=!1){var m;const s=this.toJSON(),o=t||Ze(C(this,this.project),n.FunctionDeclaration,this.project);s.inputs=[];const l=o.split("-id"),p=l[l.length-1||0]||o;s.id=o;const y=kt(s,this.project);e?y.setParent(e):y.setParent(this.parent),i&&y.subscribe(),y.initChildren();const h=(m=this.inputs)==null?void 0:m.map((R,v)=>R.clone(this,p+"-argument-declaration-"+v+"-id",i));return y.inputs=h,y}getVariableInstances(){return re(this).filter(i=>i.type===n.VariableInstance)}getArgument(e){return this.inputs.find(t=>t.id===e)||null}createCall(e=this.project,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.FunctionCall,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],error:t.error||null,process:t.process||null,calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],calledByEntry:t.calledByEntry||[],declaration:this.toJSON(),x:0,y:0},a=g(i,this.project);return a.setParent(e),a.initChildren(),e===this.project&&this.project.addFunctionCall(a),a}createInternalCall(e,t={}){const i={id:t.id||_.UUID.uuid(),version:t.version||1,type:n.InternalCall,parent:e.toReference(),successCalls:t.successCalls||[],errorCalls:t.errorCalls||[],inputs:t.inputs||[],outputs:t.outputs||[],error:t.error||null,process:t.process||null,calledBySuccess:t.calledBySuccess||[],calledByError:t.calledByError||[],calledByEntry:t.calledByEntry||[],declaration:this.toShallowJSON(),index:e.internalCalls.length},a=g(i,this.project);return a.setParent(e),a.initChildren(),a}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}getUniqueReturnDeclarations(){const e=[],i=[...this.returnStatements].flatMap(a=>a.outputs);if(this.implements){const a=this.implements.outputs;return i.forEach(s=>{const o=a.find(p=>p===s.implements),l=e.find(p=>p.implements===s.implements);o&&!l&&e.push(s)}),E(e)}else return i.forEach(a=>{e.find(o=>o===a||C(o,this.project)===C(a,this.project)&&Ut(o.dataType,a.dataType))||e.push(a)}),E(e)}};d(Re,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),d(Re,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Re,"BASE_PROPERTIES",[...Re.MUTABLE_BASE_PROPERTIES,...Re.INMUTABLE_BASE_PROPERTIES]),d(Re,"MUTABLE_META_PROPERTIES",[...Re.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),d(Re,"INMUTABLE_META_PROPERTIES",[...Re.INMUTABLE_BASE_PROPERTIES]),d(Re,"META_PROPERTIES",[...Re.MUTABLE_META_PROPERTIES,...Re.INMUTABLE_META_PROPERTIES]),d(Re,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(Re,"INMUATABLE_UPSTREAM_PROPERTIES",["parent","implements"]),d(Re,"UPSTREAM_PROPERTIES",[...Re.MUTABLE_UPSTREAM_PROPERTIES,...Re.INMUATABLE_UPSTREAM_PROPERTIES]),d(Re,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),d(Re,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),d(Re,"DOWNSTREAM_PROPERTIES",[...Re.MUTABLE_DOWNSTREAM_PROPERTIES,...Re.INMUATABLE_DOWNSTREAM_PROPERTIES]),d(Re,"PROPERTIES",[...Re.META_PROPERTIES,...Re.UPSTREAM_PROPERTIES,...Re.DOWNSTREAM_PROPERTIES]);let Br=Re;function a2(r){const e=k6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.entity&&r.andChildrenGroup||r.entity&&r.orChildrenGroup||r.andChildrenGroup&&r.orChildrenGroup){const s=H({id:r.id+"--"+V.InvalidPropertiesCombination,message:`Data type with id "${r.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:T.Error,code:V.InvalidPropertiesCombination,entity:r});a.push(s.error)}return ie(r.errors,a)}function s2(r,e){const t=[],i=[n.CustomEntity,n.ActionDescriptor,n.Property,n.ArgumentDeclaration,n.ReturnDeclaration,n.VariableDeclaration,n.ValueDescriptor,n.DataType],a=`'${U(i,"', '","' or '")}'`;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 s=e.get(r.parent);s?i.includes(s.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 ${a}.`,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}))}else 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}" is missing a 'parent' reference. The 'parent' of a 'data-type' entity must be a reference to an entity of type ${a}.`,issue:null}));if(r.entity){if(r.id===r.entity)return t.push(new b({id:`${r.id}--${r.entity}--${f.SelfReference}`,code:f.SelfReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a reference to itself at 'entity'. This is not allowed. Change the reference string or the 'entityId' property of the reference object.`,issue:null})),t;const s=e.get(r.entity);s?[n.CustomEntity,n.PrimitiveEntity,n.ActionDescriptor,n.BuiltInBaseEntity].includes(s.type)||t.push(new b({id:`${r.id}--${r.entity}--${f.InvalidImplementsReference}`,code:f.InvalidImplementsReference,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has an 'entity' reference that isn't pointing to an entity of type 'custom-entity', 'primitive-entity', 'action-descriptor' or 'built-in-base-entity'.`,issue:null})):t.push(new b({id:`${r.id}--${r.entity}--${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.entity}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return t}const ge=class ge{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"isNullable");d(this,"isList",null);d(this,"constant");d(this,"asType",null);d(this,"type",n.DataType);d(this,"options");d(this,"parentRelationType");d(this,"like");d(this,"defaultValue",null);d(this,"entity",null);d(this,"andChildrenGroup",null);d(this,"orChildrenGroup",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"inferred",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.isNullable=e.isNullable,this.isList=e.isList,this.constant=e.constant,this.asType=e.asType,this.options=e.options,this.parentRelationType=e.parentRelationType,this.inferred=e.inferred||!1,this.like=e.like||!1}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s=null;e.entity&&(s=t.get(e.entity));const o={id:e.id,version:1,type:n.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:e.parentRelationType,isList:e.isList,isNullable:e.isNullable,constant:e.constant,like:e.like||!1,inferred:!1,defaultValue:null,entity:s,asType:e.asType,parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var p;let i=JSON.parse(JSON.stringify(e));const a=[],s=s2(i,t);if(a.push(...s,...Le(i)),i.entity){const y=t.get(i.entity);if(y.type===n.CustomEntity){const m=Qn(y).filter(R=>!R.interactive);if(m.length){const R=m.length>1?`entities with ids '${U(m.map(v=>v.id),"', '","' and '")}'`:`entity with id '${m[0].id}'`;a.push(new b({id:`${e.id}--${f.NonInteractiveEntityReferenced}`,code:f.NonInteractiveEntityReferenced,severity:T.Error,message:`The entity with id '${e.id}' and type '${e.type}', cannot reference 'custom-entity' with id '${i.entity}' at 'entity'. The entity extends or implements non-interactive built-in-base-entity ${R}.
33
33
  ${Kn}`,issue:null}))}}}const o=i.parent&&t.get(i.parent)||t.getBuiltIn(i.parent),l=o?er(o):null;if(l)a.push(new b({id:`${e.id}--${f.BuiltInEntityParent}`,code:f.BuiltInEntityParent,severity:T.Error,message:`The entity with id '${e.id}' and type '${e.type}', belongs to a built-in system entity "${C(l,t)}" with id '${l.id}', and therefore it cannot be created as it would affect a built in entity, which are inmutable.`,issue:null}));else if(o){const y=o.type,h=[n.Property,n.VariableDeclaration,n.ArgumentDeclaration,n.ReturnDeclaration,n.ValueDescriptor];if(h.includes(y)&&(i.parentRelationType&&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}', cannot have a 'parentRelationType' property set of type '${y}'.
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
  ${dn({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===Ke.AndDataTypeGroup||i.parentRelationType===Ke.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===Ke.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===Ke.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===Ke.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===Ke.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===Ke.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===Ke.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=a2(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,D,A,I;let a=e||this.parent;const s=t||Ze(pu(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=kt(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=(D=this.andChildrenGroup)==null?void 0:D.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&&((I=this.entity)==null?void 0:I.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)||er(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===P.JSON)}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}};d(ge,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),d(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),d(ge,"MUTABLE_META_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,"inferred"]),d(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),d(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),d(ge,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),d(ge,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),d(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),d(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let Oi=ge;function o2(r){var l;const e=D6(),t=r.toJSON();e.safeParse(t).success;const a=l2(r),s=Cn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=H({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 l2(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),ie(r.errors,e)}const de=class de{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.Operation);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"process",null);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"error",null);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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=nA(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===Ke.AndDataTypeGroup||i.parentRelationType===Ke.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===Ke.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===Ke.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===Ke.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===Ke.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===Ke.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===Ke.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=a2(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,D,A,I;let a=e||this.parent;const s=t||Ze(pu(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=kt(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=(D=this.andChildrenGroup)==null?void 0:D.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&&((I=this.entity)==null?void 0:I.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)||er(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===P.JSON)}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}};d(ge,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType","like"]),d(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),d(ge,"MUTABLE_META_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,"inferred"]),d(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),d(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),d(ge,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),d(ge,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),d(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),d(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let Oi=ge;function o2(r){var l;const e=D6(),t=r.toJSON();e.safeParse(t).success;const a=l2(r),s=Cn(r),o=[...a,...s];if(r.id==="exec-sequentially-operation-call-id"){const p=H({id:`${r.id}--${V.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:V.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 l2(r){const e=[];return r.inputs.forEach(t=>{t.validate()}),ie(r.errors,e)}const de=class de{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.Operation);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"process",null);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"error",null);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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=rA(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
  - `)}.
@@ -54,13 +54,13 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
54
54
  ${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.
55
55
  ${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.
56
56
  ${Uo(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=u2(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}}};d(ve,"MUTABLE_BASE_PROPERTIES",["operator"]),d(ve,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(ve,"BASE_PROPERTIES",[...ve.MUTABLE_BASE_PROPERTIES,...ve.INMUTABLE_BASE_PROPERTIES]),d(ve,"MUTABLE_META_PROPERTIES",["x","y"]),d(ve,"INMUTABLE_META_PROPERTIES",[...ve.INMUTABLE_BASE_PROPERTIES]),d(ve,"META_PROPERTIES",[...ve.MUTABLE_META_PROPERTIES,...ve.INMUTABLE_META_PROPERTIES]),d(ve,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),d(ve,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(ve,"UPSTREAM_PROPERTIES",[...ve.MUTABLE_UPSTREAM_PROPERTIES,...ve.INMUTABLE_UPSTREAM_PROPERTIES]),d(ve,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),d(ve,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ve,"DOWNSTREAM_PROPERTIES",[...ve.MUTABLE_DOWNSTREAM_PROPERTIES,...ve.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ve,"PROPERTIES",[...ve.META_PROPERTIES,...ve.UPSTREAM_PROPERTIES,...ve.DOWNSTREAM_PROPERTIES]);let Nr=ve;class qP{constructor(){d(this,"initialData")}}class p2{}class y2 extends qP{}class h2{}class f2{}class m2{}class bu{}class T2 extends bu{}class E2 extends bu{}class b2{}class Ga{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=Nt(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 $a{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 R2{}function g2(r){var l;const e=H6(),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=[...Cn(r)];if(r.id==="random-company-employee-test-variable-id"){const p=H({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=H({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=Cu(r);return s.push(...o),ie(r.errors,s)}const pe=class pe{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"dataType",null);d(this,"x");d(this,"y");d(this,"type",n.VariableDeclaration);d(this,"writesValues",[]);d(this,"readsValue",null);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"internalCalls",[]);d(this,"parent");d(this,"variableInstances",[]);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);i=s.modifiedData;const o=hu(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=Ua(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=u2(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}}};d(ve,"MUTABLE_BASE_PROPERTIES",["operator"]),d(ve,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(ve,"BASE_PROPERTIES",[...ve.MUTABLE_BASE_PROPERTIES,...ve.INMUTABLE_BASE_PROPERTIES]),d(ve,"MUTABLE_META_PROPERTIES",["x","y"]),d(ve,"INMUTABLE_META_PROPERTIES",[...ve.INMUTABLE_BASE_PROPERTIES]),d(ve,"META_PROPERTIES",[...ve.MUTABLE_META_PROPERTIES,...ve.INMUTABLE_META_PROPERTIES]),d(ve,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),d(ve,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(ve,"UPSTREAM_PROPERTIES",[...ve.MUTABLE_UPSTREAM_PROPERTIES,...ve.INMUTABLE_UPSTREAM_PROPERTIES]),d(ve,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),d(ve,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ve,"DOWNSTREAM_PROPERTIES",[...ve.MUTABLE_DOWNSTREAM_PROPERTIES,...ve.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ve,"PROPERTIES",[...ve.META_PROPERTIES,...ve.UPSTREAM_PROPERTIES,...ve.DOWNSTREAM_PROPERTIES]);let Nr=ve;class JP{constructor(){d(this,"initialData")}}class p2{}class y2 extends JP{}class h2{}class f2{}class m2{}class bu{}class T2 extends bu{}class E2 extends bu{}class b2{}class $a{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=Nt(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 Fa{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 R2{}function g2(r){var l;const e=H6(),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=[...Cn(r)];if(r.id==="random-company-employee-test-variable-id"){const p=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}if(r.id==="company-dto-variable-one-id"){const p=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});s.push(p.error)}const o=Cu(r);return s.push(...o),ie(r.errors,s)}const pe=class pe{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"dataType",null);d(this,"x");d(this,"y");d(this,"type",n.VariableDeclaration);d(this,"writesValues",[]);d(this,"readsValue",null);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"internalCalls",[]);d(this,"parent");d(this,"variableInstances",[]);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(i,{parent:{list:!1,types:[...ut,n.Project],optional:!0}},t);i=s.modifiedData;const o=hu(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=xa(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()),$a.initWritesValues(this,this.parent),Ga.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),ka(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=g2(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=cn(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)}};d(pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(pe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),d(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),d(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),d(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),d(pe,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),d(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),d(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),d(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),d(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Mr=pe;function v2(r){const e=Q6(),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=[...Cn(r)];if(r.id==="exec-sequentially-result-variable-id"){const l=H({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=Cu(r);return s.push(...o),ie(r.errors,s)}const ye=class ye{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.VariableInstance);d(this,"writesValues",[]);d(this,"readsValue",null);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"internalCalls",[]);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(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=Ua(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()),Fa.initWritesValues(this,this.parent),$a.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),qa(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=g2(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=cn(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)}};d(pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(pe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),d(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),d(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),d(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),d(pe,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),d(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),d(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),d(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),d(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Mr=pe;function v2(r){const e=Q6(),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=[...Cn(r)];if(r.id==="exec-sequentially-result-variable-id"){const l=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}const o=Cu(r);return s.push(...o),ie(r.errors,s)}const ye=class ye{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.VariableInstance);d(this,"writesValues",[]);d(this,"readsValue",null);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"internalCalls",[]);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(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=xa(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
- 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 $a.initWritesValues(this,this.parent),Ga.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),ka(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=v2(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=cn(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)}};d(ye,"MUTABLE_BASE_PROPERTIES",[]),d(ye,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(ye,"BASE_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,...ye.INMUTABLE_BASE_PROPERTIES]),d(ye,"MUTABLE_META_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,"x","y"]),d(ye,"INMUTABLE_META_PROPERTIES",[...ye.INMUTABLE_BASE_PROPERTIES]),d(ye,"META_PROPERTIES",[...ye.MUTABLE_META_PROPERTIES,...ye.INMUTABLE_META_PROPERTIES]),d(ye,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),d(ye,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),d(ye,"UPSTREAM_PROPERTIES",[...ye.MUTABLE_UPSTREAM_PROPERTIES,...ye.INMUTABLE_UPSTREAM_PROPERTIES]),d(ye,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),d(ye,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ye,"DOWNSTREAM_PROPERTIES",[...ye.MUTABLE_DOWNSTREAM_PROPERTIES,...ye.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ye,"PROPERTIES",[...ye.META_PROPERTIES,...ye.UPSTREAM_PROPERTIES,...ye.DOWNSTREAM_PROPERTIES]);let Vr=ye;function I2(r){var s;const e=J9(),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=H({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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"index");d(this,"required");d(this,"isError");d(this,"type",n.ReturnDeclaration);d(this,"dataType",null);d(this,"readsValue",null);d(this,"implements",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(i,{parent:{list:!1,types:[n.ReturnStatement,n.Search,n.BreakStatement,n.ContinueStatement]}},t),o=Tu(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(D=>D.id!==y.id),...m.continueStatements.filter(D=>D.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.
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 Fa.initWritesValues(this,this.parent),$a.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),qa(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=v2(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=cn(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)}};d(ye,"MUTABLE_BASE_PROPERTIES",[]),d(ye,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(ye,"BASE_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,...ye.INMUTABLE_BASE_PROPERTIES]),d(ye,"MUTABLE_META_PROPERTIES",[...ye.MUTABLE_BASE_PROPERTIES,"x","y"]),d(ye,"INMUTABLE_META_PROPERTIES",[...ye.INMUTABLE_BASE_PROPERTIES]),d(ye,"META_PROPERTIES",[...ye.MUTABLE_META_PROPERTIES,...ye.INMUTABLE_META_PROPERTIES]),d(ye,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),d(ye,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),d(ye,"UPSTREAM_PROPERTIES",[...ye.MUTABLE_UPSTREAM_PROPERTIES,...ye.INMUTABLE_UPSTREAM_PROPERTIES]),d(ye,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),d(ye,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ye,"DOWNSTREAM_PROPERTIES",[...ye.MUTABLE_DOWNSTREAM_PROPERTIES,...ye.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ye,"PROPERTIES",[...ye.META_PROPERTIES,...ye.UPSTREAM_PROPERTIES,...ye.DOWNSTREAM_PROPERTIES]);let Vr=ye;function I2(r){var s;const e=J9(),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=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});a.push(o.error)}return ie(r.errors,a)}const Ie=class Ie{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"index");d(this,"required");d(this,"isError");d(this,"type",n.ReturnDeclaration);d(this,"dataType",null);d(this,"readsValue",null);d(this,"implements",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(i,{parent:{list:!1,types:[n.ReturnStatement,n.Search,n.BreakStatement,n.ContinueStatement]}},t),o=Tu(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(D=>D.id!==y.id),...m.continueStatements.filter(D=>D.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.
64
64
  ${Iu}`,issue:null}));else{const D=(p=(l=R[0])==null?void 0:l.outputs[0])==null?void 0:p.name;D!==i.name&&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 new 'return-declaration' doesn't have the same name "${D}" as the return declarations on the other statements in the same scope.
65
65
  ${Iu}`,issue:null}))}}else if(y&&y.type===n.ReturnStatement){const h=y.parent;if(h&&Ue.includes(h.type)){const m=h.implements;if(m){const R=m.outputs.find(k=>k.name===i.name),v=m.outputs.filter(k=>!y.outputs.find(me=>me.type===n.ReturnDeclaration&&me.name===k.name)),D=y.outputs.filter(k=>k.type===n.ReturnDeclaration),A=D.find(k=>k.name===i.name),I=D.length?`The parent entity already implements the following return declarations: ${U(D.map(k=>`'${k.id}' (${k.name})`),", "," and ")}.`:"The parent entity does not yet have any implemented return declarations.",F=v.length?`The parent entity is still missing the following returns in the implementation: ${U(v.map(k=>`'${k.id}' (${k.name})`),", "," and ")}.`:"The parent entity has all the returns it needs implemented.";R?A&&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}' should not exist in a parent entity of type '${y.type}' with id '${y.id}' that implements a ${n.ActionDescriptor} with fixed outputs.
66
66
  Adding a new return would make the implementation invalid. An return with the same name already exists in the parent entity.
@@ -68,11 +68,11 @@ ${I}
68
68
  ${F}`,issue:null})):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}' should not exist in a parent entity of type '${y.type}' with id '${y.id}' that implements a ${n.ActionDescriptor} with fixed outputs.
69
69
  Adding a new return would make the implementation invalid. There are no returns in the descriptor with the same name.
70
70
  ${I}
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=Ua(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 Ga.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),ka(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=I2(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=kt(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=cu(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}};d(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),d(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),d(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),d(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),d(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),d(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),d(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),d(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let _t=Ie;function D2(r){var o;const e=p6(),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=[...Cn(r)];if(r.id==="search-person-by-id-id"){const l=H({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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"query");d(this,"type",n.Search);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"inputsDeclarations",[]);d(this,"inputs",[]);d(this,"outputsDeclarations",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"error",null);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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.
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=xa(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 $a.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),qa(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=I2(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=kt(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=cu(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}};d(Ie,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),d(Ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(Ie,"BASE_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,...Ie.INMUTABLE_BASE_PROPERTIES]),d(Ie,"MUTABLE_META_PROPERTIES",[...Ie.MUTABLE_BASE_PROPERTIES,"index"]),d(Ie,"INMUTABLE_META_PROPERTIES",[...Ie.INMUTABLE_BASE_PROPERTIES]),d(Ie,"META_PROPERTIES",[...Ie.MUTABLE_META_PROPERTIES,...Ie.INMUTABLE_META_PROPERTIES]),d(Ie,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),d(Ie,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),d(Ie,"UPSTREAM_PROPERTIES",[...Ie.MUTABLE_UPSTREAM_PROPERTIES,...Ie.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ie,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ie,"DOWNSTREAM_PROPERTIES",[...Ie.MUTABLE_DOWNSTREAM_PROPERTIES,...Ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ie,"PROPERTIES",[...Ie.META_PROPERTIES,...Ie.UPSTREAM_PROPERTIES,...Ie.DOWNSTREAM_PROPERTIES]);let _t=Ie;function D2(r){var o;const e=p6(),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=[...Cn(r)];if(r.id==="search-person-by-id-id"){const l=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});s.push(l.error)}return ie(r.errors,s)}const Ge=class Ge{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"query");d(this,"type",n.Search);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"inputsDeclarations",[]);d(this,"inputs",[]);d(this,"outputsDeclarations",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"error",null);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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=>a.id===e.declaration.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)}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)}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=D2(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)}};d(Ge,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),d(Ge,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(Ge,"BASE_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,...Ge.INMUTABLE_BASE_PROPERTIES]),d(Ge,"MUTABLE_META_PROPERTIES",[...Ge.MUTABLE_BASE_PROPERTIES,"x","y"]),d(Ge,"INMUTABLE_META_PROPERTIES",[...Ge.INMUTABLE_BASE_PROPERTIES]),d(Ge,"META_PROPERTIES",[...Ge.MUTABLE_META_PROPERTIES,...Ge.INMUTABLE_META_PROPERTIES]),d(Ge,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),d(Ge,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),d(Ge,"UPSTREAM_PROPERTIES",[...Ge.MUTABLE_UPSTREAM_PROPERTIES,...Ge.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),d(Ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ge,"DOWNSTREAM_PROPERTIES",[...Ge.MUTABLE_DOWNSTREAM_PROPERTIES,...Ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ge,"PROPERTIES",[..._t.META_PROPERTIES,..._t.UPSTREAM_PROPERTIES,..._t.DOWNSTREAM_PROPERTIES]);let Lr=Ge;function P2(r){const e=i3(),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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"type",n.InstalledProject);d(this,"implements");d(this,"functions",[]);d(this,"events",[]);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=P2(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)}};d(De,"MUTABLE_BASE_PROPERTIES",[]),d(De,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),d(De,"BASE_PROPERTIES",[...De.MUTABLE_BASE_PROPERTIES,...De.INMUTABLE_BASE_PROPERTIES]),d(De,"MUTABLE_META_PROPERTIES",["x","y"]),d(De,"INMUTABLE_META_PROPERTIES",[...De.INMUTABLE_BASE_PROPERTIES]),d(De,"META_PROPERTIES",[...De.MUTABLE_META_PROPERTIES,...De.INMUTABLE_META_PROPERTIES]),d(De,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(De,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),d(De,"UPSTREAM_PROPERTIES",[...De.MUTABLE_UPSTREAM_PROPERTIES,...De.INMUTABLE_UPSTREAM_PROPERTIES]),d(De,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),d(De,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(De,"DOWNSTREAM_PROPERTIES",[...De.MUTABLE_DOWNSTREAM_PROPERTIES,...De.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(De,"PROPERTIES",[...De.META_PROPERTIES,...De.UPSTREAM_PROPERTIES,...De.DOWNSTREAM_PROPERTIES]);let Gr=De;function A2(r){var l;const e=m6(),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=Cn(r),s=O2(r),o=[...a,...s];return ie(r.errors,o)}function O2(r){const e=[],t=Co(r.parent),i=t==null?void 0:t.entity;if(!i)e.push(H({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(H({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=xu(i),s=[];[n.CustomEntity,n.BuiltInBaseEntity,n.PrimitiveEntity].includes(i.type)&&s.push(...i.getAllInteractiveMethods());let o="";a?i.methods.length?o=`
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=ju(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(H({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(H({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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"index");d(this,"type",n.InternalCall);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"process",null);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"error",null);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"parent");d(this,"project");d(this,"errors",[]);d(this,"initialized",!1);d(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=Ye(i,{parent:{list:!1,types:Fe}},t);i=s.modifiedData;const o=N(i.parent),l=t.get(o);if(l){const p=Co(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=xu(y);let m="";h?y.methods.length?m=`
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=ju(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 @@ ${Kn}`);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&&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=A2(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)}};d(he,"MUTABLE_BASE_PROPERTIES",[]),d(he,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(he,"BASE_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,...he.INMUTABLE_BASE_PROPERTIES]),d(he,"MUTABLE_META_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,"index"]),d(he,"INMUTABLE_META_PROPERTIES",[...he.INMUTABLE_BASE_PROPERTIES]),d(he,"META_PROPERTIES",[...he.MUTABLE_META_PROPERTIES,...he.INMUTABLE_META_PROPERTIES]),d(he,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),d(he,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(he,"UPSTREAM_PROPERTIES",[...he.MUTABLE_UPSTREAM_PROPERTIES,...he.INMUTABLE_UPSTREAM_PROPERTIES]),d(he,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),d(he,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(he,"DOWNSTREAM_PROPERTIES",[...he.MUTABLE_DOWNSTREAM_PROPERTIES,...he.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(he,"PROPERTIES",[...he.META_PROPERTIES,...he.UPSTREAM_PROPERTIES,...he.DOWNSTREAM_PROPERTIES]);let Ci=he;function S2(r){const e=R6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-argument-map-id"){const s=H({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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"index");d(this,"name",null);d(this,"description",null);d(this,"declaration",null);d(this,"type",n.InputMap);d(this,"defaultValue",null);d(this,"readsValue",null);d(this,"dataType",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(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=A2(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)}};d(he,"MUTABLE_BASE_PROPERTIES",[]),d(he,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(he,"BASE_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,...he.INMUTABLE_BASE_PROPERTIES]),d(he,"MUTABLE_META_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,"index"]),d(he,"INMUTABLE_META_PROPERTIES",[...he.INMUTABLE_BASE_PROPERTIES]),d(he,"META_PROPERTIES",[...he.MUTABLE_META_PROPERTIES,...he.INMUTABLE_META_PROPERTIES]),d(he,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),d(he,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(he,"UPSTREAM_PROPERTIES",[...he.MUTABLE_UPSTREAM_PROPERTIES,...he.INMUTABLE_UPSTREAM_PROPERTIES]),d(he,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),d(he,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(he,"DOWNSTREAM_PROPERTIES",[...he.MUTABLE_DOWNSTREAM_PROPERTIES,...he.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(he,"PROPERTIES",[...he.META_PROPERTIES,...he.UPSTREAM_PROPERTIES,...he.DOWNSTREAM_PROPERTIES]);let Ci=he;function S2(r){const e=R6(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-argument-map-id"){const s=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});a.push(s.error)}return ie(r.errors,a)}const Pe=class Pe{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"index");d(this,"name",null);d(this,"description",null);d(this,"declaration",null);d(this,"type",n.InputMap);d(this,"defaultValue",null);d(this,"readsValue",null);d(this,"dataType",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(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.
@@ -117,8 +117,8 @@ This means it can hold a function-call or operation as its value, to be executed
117
117
  Input maps can only be added to variables which hold an entity with properties.`,issue:null})):v&&!(R!=null&&R.inferred)&&(v.properties.find(A=>A.id===l.id)||a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.InputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The 'declaration' with '${l.id}' of the 'input-map' does not exist in the entity of the 'data-type'.
118
118
  The entity of the data-type has the following properties that can be reads as input maps, ids: '${U(v.properties.map(A=>A.id),"', '","' and '")}'`,issue:null})))}else if(je.filter(h=>Fe.includes(h)).includes(o.type)){const m=Vu(o),R=m.find(D=>D.id===i.declaration),v=`The parent entity has the following argument declarations that can be referenced by input-maps, ids: '${U(m.map(D=>D.id),"', '","' and '")}'`;R||a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.InputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent entity does not have an 'argument-declaration' with id '${i.declaration}'.
119
119
  You can't add an input-map to an entity that doesn't have a matching 'argument-declaration'.
120
- ${v}`,issue:null}))}}return a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=Ua(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.
121
- 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,s;const e=[this],t=[],i=[];if(this.parent.addInput(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),Fe.includes(this.parent.type)&&((s=this.parent.getDataType())!=null&&s.inferred)){const o=this.parent.type===n.VariableDeclaration?this.parent:this.parent.declaration;o.inferDataTypeAndSyncInstancesInputsAndOutputs(),e.push(o,...o.variableInstances)}return{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}setDeclaration(e){return this.declaration=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=g(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.declaration&&(this.declaration=g(this.initialData.declaration,this.project)),Ga.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}async load(){return this}async create(){return this}async update(e){return this.sync(e),ka(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.defaultValue&&(i.push(this.defaultValue),this.defaultValue.remove({ignoreUpstream:!0,seenEntities:t})),e||(i.push(this.parent),this.parent.removeInput(this)),{affected:i,removed:a})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.defaultValue&&(t.push(this.defaultValue),this.defaultValue.restore({seenEntities:e})),t.push(this.parent),this.parent.addInput(this),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.defaultValue?this.defaultValue.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.defaultValue?this.defaultValue.toFlatIds(e):[]])}toJSON(){var e,t,i;return{id:this.id,version:this.version,type:this.type,index:this.index,name:this.name,description:this.description,defaultValue:((e=this.defaultValue)==null?void 0:e.toJSON())||null,declaration:((t=this.declaration)==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,type:this.type,name:this.name,description:this.description,index:this.index,defaultValue:((e=this.defaultValue)==null?void 0:e.toReference())||null,declaration:((t=this.declaration)==null?void 0:t.toReference())||null,readsValue:((i=this.readsValue)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.defaultValue?this.defaultValue.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name||void 0,description:this.description||void 0,type:this.type,declaration:((e=this.declaration)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.defaultValue?this.defaultValue.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),this}validate(){const e=S2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}getShallowErrors(){return this.errors}getDefaultValue(){var e,t;return this.defaultValue||((t=(e=this.declaration)==null?void 0:e.dataType)==null?void 0:t.defaultValue)||null}setDefaultValue(e){return this.defaultValue=e,this}clone(e=null,t=null,i=!0){var h;const a=this.toJSON(),s=t||Ze(C(this,this.project),n.InputMap,this.project);a.defaultValue=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=kt(a,this.project);e?p.setParent(e):p.setParent(this.parent),i&&p.subscribe(),p.initChildren();const y=(h=this.defaultValue)==null?void 0:h.clone(p,l+"--default-value-id",i);return p.defaultValue=y||null,p}getDataType(){var t;if(this.parent.type===n.Operation)return this.parent.declaration.inferInputMapDataType(this);if(Fe.includes(this.parent.type)){const i=Sr(this.parent),a=i.getDataType();(!a||a.inferred)&&i.inferDataTypeAndSyncInstancesInputsAndOutputs()}const e=(t=this.declaration)==null?void 0:t.getDataType();if(!e){const i=cn(this);if(i)return i}return e||null}};d(Pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(Pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Pe,"BASE_PROPERTIES",[...Pe.MUTABLE_BASE_PROPERTIES,...Pe.INMUTABLE_BASE_PROPERTIES]),d(Pe,"MUTABLE_META_PROPERTIES",[...Pe.MUTABLE_BASE_PROPERTIES,"index"]),d(Pe,"INMUTABLE_META_PROPERTIES",[...Pe.INMUTABLE_BASE_PROPERTIES]),d(Pe,"META_PROPERTIES",[...Pe.MUTABLE_META_PROPERTIES,...Pe.INMUTABLE_META_PROPERTIES]),d(Pe,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),d(Pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(Pe,"UPSTREAM_PROPERTIES",[...Pe.MUTABLE_UPSTREAM_PROPERTIES,...Pe.INMUTABLE_UPSTREAM_PROPERTIES]),d(Pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),d(Pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Pe,"DOWNSTREAM_PROPERTIES",[...Pe.MUTABLE_DOWNSTREAM_PROPERTIES,...Pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Pe,"PROPERTIES",[...Pe.META_PROPERTIES,...Pe.UPSTREAM_PROPERTIES,...Pe.DOWNSTREAM_PROPERTIES]);let On=Pe;class C2 extends On{constructor(t,i){super(t,i);d(this,"declaration",null);d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}class B2 extends On{constructor(t,i){super(t,i);d(this,"name",null);d(this,"description",null);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}function w2(r){const e=Q9(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-return-map-id"){const s=H({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 fe=class fe{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"index");d(this,"type",n.OutputMap);d(this,"parentRelationType");d(this,"declaration");d(this,"writesValues",[]);d(this,"dataType");d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.index=e.index,this.parentRelationType=e.parentRelationType}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s;if(e.declaration){const p=N(e.declaration);s=t.get(p)}const o={id:e.id,version:1,type:n.OutputMap,index:(a.outputs||[]).length,declaration:s,writesValues:[],parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var l;let i=JSON.parse(JSON.stringify(e));const a=[],s=Ye(i,{parent:{list:!1,types:je.filter(p=>p!==n.Condition)},declaration:{list:!1,types:[n.ReturnDeclaration,n.Property]}},t);i=s.modifiedData;const o=t.get(i.parent);if(o&&je.filter(p=>p!==n.Condition).includes(o.type)){const p=o.outputs.find(y=>y.declaration.id===N(i.declaration));if(p)a.push(new b({id:`${i.id}--${f.OutputOverwrite}`,code:f.OutputOverwrite,severity:T.Error,message:`Entity of type '${n.OutputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent already has an output-map with id '${p.id}' that points to the same base 'return-declaration'.
120
+ ${v}`,issue:null}))}}return a.push(...s.errors,...Le(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=xa(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.
121
+ 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,s;const e=[this],t=[],i=[];if(this.parent.addInput(this),e.push(this.parent),(a=this.readsValue)==null||a.addValueReader(this),this.readsValue&&e.push(this.readsValue),Fe.includes(this.parent.type)&&((s=this.parent.getDataType())!=null&&s.inferred)){const o=this.parent.type===n.VariableDeclaration?this.parent:this.parent.declaration;o.inferDataTypeAndSyncInstancesInputsAndOutputs(),e.push(o,...o.variableInstances)}return{updated:E(e),added:E(t),removed:E(i),self:this}}setParent(e){return this.parent=e,this}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}setDeclaration(e){return this.declaration=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=g(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.declaration&&(this.declaration=g(this.initialData.declaration,this.project)),$a.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}async load(){return this}async create(){return this}async update(e){return this.sync(e),qa(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.defaultValue&&(i.push(this.defaultValue),this.defaultValue.remove({ignoreUpstream:!0,seenEntities:t})),e||(i.push(this.parent),this.parent.removeInput(this)),{affected:i,removed:a})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.readsValue&&(t.push(this.readsValue),this.readsValue.addValueReader(this)),this.defaultValue&&(t.push(this.defaultValue),this.defaultValue.restore({seenEntities:e})),t.push(this.parent),this.parent.addInput(this),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.defaultValue?this.defaultValue.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.defaultValue?this.defaultValue.toFlatIds(e):[]])}toJSON(){var e,t,i;return{id:this.id,version:this.version,type:this.type,index:this.index,name:this.name,description:this.description,defaultValue:((e=this.defaultValue)==null?void 0:e.toJSON())||null,declaration:((t=this.declaration)==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,type:this.type,name:this.name,description:this.description,index:this.index,defaultValue:((e=this.defaultValue)==null?void 0:e.toReference())||null,declaration:((t=this.declaration)==null?void 0:t.toReference())||null,readsValue:((i=this.readsValue)==null?void 0:i.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.defaultValue?this.defaultValue.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name||void 0,description:this.description||void 0,type:this.type,declaration:((e=this.declaration)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.defaultValue?this.defaultValue.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.defaultValue)==null||e.clearErrors(),this}validate(){const e=S2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}getShallowErrors(){return this.errors}getDefaultValue(){var e,t;return this.defaultValue||((t=(e=this.declaration)==null?void 0:e.dataType)==null?void 0:t.defaultValue)||null}setDefaultValue(e){return this.defaultValue=e,this}clone(e=null,t=null,i=!0){var h;const a=this.toJSON(),s=t||Ze(C(this,this.project),n.InputMap,this.project);a.defaultValue=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=kt(a,this.project);e?p.setParent(e):p.setParent(this.parent),i&&p.subscribe(),p.initChildren();const y=(h=this.defaultValue)==null?void 0:h.clone(p,l+"--default-value-id",i);return p.defaultValue=y||null,p}getDataType(){var t;if(this.parent.type===n.Operation)return this.parent.declaration.inferInputMapDataType(this);if(Fe.includes(this.parent.type)){const i=Sr(this.parent),a=i.getDataType();(!a||a.inferred)&&i.inferDataTypeAndSyncInstancesInputsAndOutputs()}const e=(t=this.declaration)==null?void 0:t.getDataType();if(!e){const i=cn(this);if(i)return i}return e||null}};d(Pe,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(Pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Pe,"BASE_PROPERTIES",[...Pe.MUTABLE_BASE_PROPERTIES,...Pe.INMUTABLE_BASE_PROPERTIES]),d(Pe,"MUTABLE_META_PROPERTIES",[...Pe.MUTABLE_BASE_PROPERTIES,"index"]),d(Pe,"INMUTABLE_META_PROPERTIES",[...Pe.INMUTABLE_BASE_PROPERTIES]),d(Pe,"META_PROPERTIES",[...Pe.MUTABLE_META_PROPERTIES,...Pe.INMUTABLE_META_PROPERTIES]),d(Pe,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),d(Pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(Pe,"UPSTREAM_PROPERTIES",[...Pe.MUTABLE_UPSTREAM_PROPERTIES,...Pe.INMUTABLE_UPSTREAM_PROPERTIES]),d(Pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),d(Pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Pe,"DOWNSTREAM_PROPERTIES",[...Pe.MUTABLE_DOWNSTREAM_PROPERTIES,...Pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Pe,"PROPERTIES",[...Pe.META_PROPERTIES,...Pe.UPSTREAM_PROPERTIES,...Pe.DOWNSTREAM_PROPERTIES]);let On=Pe;class C2 extends On{constructor(t,i){super(t,i);d(this,"declaration",null);d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}class B2 extends On{constructor(t,i){super(t,i);d(this,"name",null);d(this,"description",null);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}function w2(r){const e=Q9(),t=r.toJSON();e.safeParse(t).success;const a=[];if(r.id==="exec-sequentially-return-map-id"){const s=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});a.push(s.error)}return ie(r.errors,a)}const fe=class fe{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"index");d(this,"type",n.OutputMap);d(this,"parentRelationType");d(this,"declaration");d(this,"writesValues",[]);d(this,"dataType");d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.index=e.index,this.parentRelationType=e.parentRelationType}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i);let s;if(e.declaration){const p=N(e.declaration);s=t.get(p)}const o={id:e.id,version:1,type:n.OutputMap,index:(a.outputs||[]).length,declaration:s,writesValues:[],parent:a},l=g(o,t);return l.setParent(a),l.initChildren(),l}static validateGenerationTarget(e,t){var l;let i=JSON.parse(JSON.stringify(e));const a=[],s=Ye(i,{parent:{list:!1,types:je.filter(p=>p!==n.Condition)},declaration:{list:!1,types:[n.ReturnDeclaration,n.Property]}},t);i=s.modifiedData;const o=t.get(i.parent);if(o&&je.filter(p=>p!==n.Condition).includes(o.type)){const p=o.outputs.find(y=>y.declaration.id===N(i.declaration));if(p)a.push(new b({id:`${i.id}--${f.OutputOverwrite}`,code:f.OutputOverwrite,severity:T.Error,message:`Entity of type '${n.OutputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent already has an output-map with id '${p.id}' that points to the same base 'return-declaration'.
122
122
  Any value reads can be done with that output-map instead.
123
123
  You can't edit output-map entities as they need to match their return declarations, so you can only choose to read their outputted value if you need it.`,issue:null}));else{const y=t.get(i.declaration);if(y&&Fe.includes(o.type)){const h=Sr(o),m=h.dataType,R=(l=h.dataType)==null?void 0:l.entity;m?R?R.type===n.ActionDescriptor?a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.OutputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The data type of the 'variable-declaration' is a 'action-descriptor' entity.
124
124
  This means it can hold a function-call or operation as its value, to be executed programatically.
@@ -128,14 +128,14 @@ ${Du}`,issue:null})):a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSign
128
128
  ${Du}`,issue:null}))}else if(y){const h=o.outputs.find(m=>m.declaration.id===i.declaration);h&&a.push(new b({id:`${i.id}--${f.OutputOverwrite}`,code:f.OutputOverwrite,severity:T.Error,message:`Entity of type '${n.OutputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent already has an output-map with id '${h.id}' that points to the same declaration.
129
129
  Any value reads can be done with that output-map instead.
130
130
  You can't edit output-map entities as they need to match their return declarations, so you can only choose to read their outputted value if you need 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.
131
- 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(){const e=[this],t=[],i=[];return this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=this):this.parent.addOutput(this),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self: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}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}setDeclaration(e){return this.declaration=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,$a.initWritesValues(this,this.parent.parent),this.initialData.declaration&&(this.declaration=g(this.initialData.declaration,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.index=e.index||(e.index!==0?this.index:0),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=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),e||(i.push(this.parent),this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=null):this.parent.removeOutput(this)),{affected:i,removed:a})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),t.push(this.parent),this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=this):this.parent.addOutput(this),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.writesValues.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))])}toJSON(){return{id:this.id,version:this.version,type:this.type,index:this.index,parentRelationType:this.parentRelationType,writesValues:this.writesValues.map(e=>e.toJSON()),declaration:this.declaration.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,index:this.index,parentRelationType:this.parentRelationType,declaration:this.declaration.toReference(),writesValues:this.writesValues.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.writesValues.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,declaration:this.declaration.id,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.writesValues.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this}validate(){const e=w2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}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 fe(this.toJSON(),this.project)}getDataType(){var t;return this.parent.type===n.Operation?this.parent.declaration.inferOutputMapDataType(this):((t=this.declaration)==null?void 0:t.getDataType())||null}};d(fe,"MUTABLE_BASE_PROPERTIES",[]),d(fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(fe,"BASE_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,...fe.INMUTABLE_BASE_PROPERTIES]),d(fe,"MUTABLE_META_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,"index"]),d(fe,"INMUTABLE_META_PROPERTIES",[...fe.INMUTABLE_BASE_PROPERTIES]),d(fe,"META_PROPERTIES",[...fe.MUTABLE_META_PROPERTIES,...fe.INMUTABLE_META_PROPERTIES]),d(fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(fe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(fe,"UPSTREAM_PROPERTIES",[...fe.MUTABLE_UPSTREAM_PROPERTIES,...fe.INMUTABLE_UPSTREAM_PROPERTIES]),d(fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues"]),d(fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(fe,"DOWNSTREAM_PROPERTIES",[...fe.MUTABLE_DOWNSTREAM_PROPERTIES,...fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(fe,"PROPERTIES",[...fe.META_PROPERTIES,...fe.UPSTREAM_PROPERTIES,...fe.DOWNSTREAM_PROPERTIES]);let Sn=fe;class _2 extends Sn{constructor(t,i){super(t,i);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}class N2 extends Sn{constructor(t,i){super(t,i);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}function M2(r){var s;const e=M3(),t=r.toJSON();e.safeParse(t).success,(s=r.dataType)==null||s.validate();const a=[];if(r.id==="company-dto-func-declaration-argument-dcl-id"){const o=H({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)}if(r.id==="manual-hello-world-loop-current-iteration-number-output-map-id"){const o=H({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 Ae=class Ae{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"index");d(this,"required");d(this,"type",n.ArgumentDeclaration);d(this,"dataType",null);d(this,"writesValues",[]);d(this,"implements",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i),s={id:e.id,version:1,name:e.name,type:n.ArgumentDeclaration,index:a.inputs.length,description:e.description,required:e.required,implements:null,dataType:null,writesValues:[],parent:a},o=g(s,t);return o.setParent(a),o.initChildren(),o}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Ye(i,{parent:{list:!1,types:[n.FunctionDeclaration,n.Search,n.Condition]}},t);i=s.modifiedData;const o=mu(i,t);if(i.parent){const l=t.get(N(i.parent));if(l&&Ue.includes(l.type)){const p=l.implements;if(p){const y=p.inputs.find(A=>A.name===i.name),h=p.inputs.filter(A=>!l.inputs.find(F=>F.type===n.ArgumentDeclaration&&F.name===A.name)),m=l.inputs.filter(A=>A.type===n.ArgumentDeclaration),R=m.find(A=>A.name===i.name),v=m.length?`The parent entity already implements the following arguments: ${U(m.map(A=>`'${A.id}' (${A.name})`),", "," and ")}.`:"The parent entity does not yet have any implemented arguments.",D=h.length?`The parent entity is still missing the following arguments in the implementation: ${U(h.map(A=>`'${A.id}' (${A.name})`),", "," and ")}.`:"The parent entity has all the arguments it needs implemented.";y?R&&a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${l.type}' with id '${l.id}' that implements a ${n.ActionDescriptor} with fixed arguments.
131
+ 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(){const e=[this],t=[],i=[];return this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=this):this.parent.addOutput(this),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self: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}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}setDeclaration(e){return this.declaration=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,Fa.initWritesValues(this,this.parent.parent),this.initialData.declaration&&(this.declaration=g(this.initialData.declaration,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.index=e.index||(e.index!==0?this.index:0),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=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),e||(i.push(this.parent),this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=null):this.parent.removeOutput(this)),{affected:i,removed:a})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),t.push(this.parent),this.parentRelationType===Wr.Error?Fe.includes(this.parent.type)||(this.parent.error=this):this.parent.addOutput(this),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.writesValues.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))])}toJSON(){return{id:this.id,version:this.version,type:this.type,index:this.index,parentRelationType:this.parentRelationType,writesValues:this.writesValues.map(e=>e.toJSON()),declaration:this.declaration.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,index:this.index,parentRelationType:this.parentRelationType,declaration:this.declaration.toReference(),writesValues:this.writesValues.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.writesValues.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,type:this.type,declaration:this.declaration.id,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.writesValues.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this}validate(){const e=w2(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}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 fe(this.toJSON(),this.project)}getDataType(){var t;return this.parent.type===n.Operation?this.parent.declaration.inferOutputMapDataType(this):((t=this.declaration)==null?void 0:t.getDataType())||null}};d(fe,"MUTABLE_BASE_PROPERTIES",[]),d(fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(fe,"BASE_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,...fe.INMUTABLE_BASE_PROPERTIES]),d(fe,"MUTABLE_META_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,"index"]),d(fe,"INMUTABLE_META_PROPERTIES",[...fe.INMUTABLE_BASE_PROPERTIES]),d(fe,"META_PROPERTIES",[...fe.MUTABLE_META_PROPERTIES,...fe.INMUTABLE_META_PROPERTIES]),d(fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(fe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),d(fe,"UPSTREAM_PROPERTIES",[...fe.MUTABLE_UPSTREAM_PROPERTIES,...fe.INMUTABLE_UPSTREAM_PROPERTIES]),d(fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues"]),d(fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(fe,"DOWNSTREAM_PROPERTIES",[...fe.MUTABLE_DOWNSTREAM_PROPERTIES,...fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(fe,"PROPERTIES",[...fe.META_PROPERTIES,...fe.UPSTREAM_PROPERTIES,...fe.DOWNSTREAM_PROPERTIES]);let Sn=fe;class _2 extends Sn{constructor(t,i){super(t,i);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}class N2 extends Sn{constructor(t,i){super(t,i);d(this,"declaration");d(this,"parent");d(this,"errors",[])}toJSON(){return super.toJSON()}}function M2(r){var s;const e=M3(),t=r.toJSON();e.safeParse(t).success,(s=r.dataType)==null||s.validate();const a=[];if(r.id==="company-dto-func-declaration-argument-dcl-id"){const o=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});a.push(o.error)}if(r.id==="manual-hello-world-loop-current-iteration-number-output-map-id"){const o=H({id:`${r.id}--${V.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:V.PropertyImplementsNonAbstact,entity:r});a.push(o.error)}return ie(r.errors,a)}const Ae=class Ae{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"index");d(this,"required");d(this,"type",n.ArgumentDeclaration);d(this,"dataType",null);d(this,"writesValues",[]);d(this,"implements",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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}static fromGenerationTarget(e,t){const i=N(e.parent),a=t.get(i),s={id:e.id,version:1,name:e.name,type:n.ArgumentDeclaration,index:a.inputs.length,description:e.description,required:e.required,implements:null,dataType:null,writesValues:[],parent:a},o=g(s,t);return o.setParent(a),o.initChildren(),o}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Ye(i,{parent:{list:!1,types:[n.FunctionDeclaration,n.Search,n.Condition]}},t);i=s.modifiedData;const o=mu(i,t);if(i.parent){const l=t.get(N(i.parent));if(l&&Ue.includes(l.type)){const p=l.implements;if(p){const y=p.inputs.find(A=>A.name===i.name),h=p.inputs.filter(A=>!l.inputs.find(F=>F.type===n.ArgumentDeclaration&&F.name===A.name)),m=l.inputs.filter(A=>A.type===n.ArgumentDeclaration),R=m.find(A=>A.name===i.name),v=m.length?`The parent entity already implements the following arguments: ${U(m.map(A=>`'${A.id}' (${A.name})`),", "," and ")}.`:"The parent entity does not yet have any implemented arguments.",D=h.length?`The parent entity is still missing the following arguments in the implementation: ${U(h.map(A=>`'${A.id}' (${A.name})`),", "," and ")}.`:"The parent entity has all the arguments it needs implemented.";y?R&&a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${l.type}' with id '${l.id}' that implements a ${n.ActionDescriptor} with fixed arguments.
132
132
  Adding a new argument would make the implementation invalid. An argument with the same name already exists in the parent entity.
133
133
  ${v}
134
134
  ${D}`,issue:null})):a.push(new b({id:`${i.id}--${S.NoOverlapWithImplementedSignature}`,code:S.NoOverlapWithImplementedSignature,severity:T.Error,message:`Entity of type '${n.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${l.type}' with id '${l.id}' that implements a ${n.ActionDescriptor} with fixed arguments.
135
135
  Adding a new argument would make the implementation invalid. There are no arguments in the descriptor with the same name.
136
136
  ${v}
137
137
  ${D}`,issue:null}))}}}return a.push(...s.errors,...o,...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.
138
- 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(){const e=[this],t=[],i=[];return this.parent.addInputDeclaration(this),e.push(this.parent),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self: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}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 $a.initWritesValues(this,this.parent),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}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.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),e||(i.push(this.parent),this.parent.removeInputDeclaration(this)),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.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),t.push(this.parent),this.parent.addInputDeclaration(this),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return{affected:E(t),self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...this.writesValues.flatMap(a=>a.toFlat(e)),...((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,...this.writesValues.flatMap(a=>a.toFlatIds(e)),...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[]])}toJSON(){var e,t;return{id:this.id,version:this.version,name:this.name,type:this.type,index:this.index,description:this.description,required:this.required,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,writesValues:this.writesValues.map(i=>i.toJSON()),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,required:this.required,writesValues:this.writesValues.map(i=>i.toReference()),implements:((e=this.implements)==null?void 0:e.toReference())||null,dataType:((t=this.dataType)==null?void 0:t.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.writesValues.flatMap(a=>a.toFlatJSON(e)),...((i=this.dataType)==null?void 0:i.toFlatJSON(e))||[]])}toGenerationTarget(){return{id:this.id,name:this.name,description:this.description,type:this.type,required:this.required,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.writesValues.flatMap(a=>a.toFlatGenerationTarget(e)),...((i=this.dataType)==null?void 0:i.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||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,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this==null?void 0: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.ArgumentDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=kt(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}getDataType(){return this.dataType}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}};d(Ae,"MUTABLE_BASE_PROPERTIES",["name","description","required"]),d(Ae,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ae,"BASE_PROPERTIES",[...Ae.MUTABLE_BASE_PROPERTIES,...Ae.INMUTABLE_BASE_PROPERTIES]),d(Ae,"MUTABLE_META_PROPERTIES",[...Ae.MUTABLE_BASE_PROPERTIES,"index"]),d(Ae,"INMUTABLE_META_PROPERTIES",[...Ae.INMUTABLE_BASE_PROPERTIES]),d(Ae,"META_PROPERTIES",[...Ae.MUTABLE_META_PROPERTIES,...Ae.INMUTABLE_META_PROPERTIES]),d(Ae,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(Ae,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),d(Ae,"UPSTREAM_PROPERTIES",[...Ae.MUTABLE_UPSTREAM_PROPERTIES,...Ae.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ae,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","dataType"]),d(Ae,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ae,"DOWNSTREAM_PROPERTIES",[...Ae.MUTABLE_DOWNSTREAM_PROPERTIES,...Ae.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ae,"PROPERTIES",[...Ae.META_PROPERTIES,...Ae.UPSTREAM_PROPERTIES,...Ae.DOWNSTREAM_PROPERTIES]);let $r=Ae;function V2(r){const e=Id(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}function L2(r,e){const t=[];if(r.parent)if(r.parent){const i=e.get(r.parent);i?[n.InputMap,n.DataType].includes(i.type)?i.type===n.DataType&&i.defaultValue&&t.push(new b({id:`${r.id}--${r.parent}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a 'parent' of type 'data-type' which already has an existing default value entity with id "${i.defaultValue.id}".
138
+ 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(){const e=[this],t=[],i=[];return this.parent.addInputDeclaration(this),e.push(this.parent),this.writesValues.forEach(a=>{a.setValueWriter(this),e.push(a)}),{updated:E(e),added:E(t),removed:E(i),self: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}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 Fa.initWritesValues(this,this.parent),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}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.writesValues.forEach(s=>{i.push(s),s.readsValue=null}),e||(i.push(this.parent),this.parent.removeInputDeclaration(this)),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.writesValues.forEach(i=>{t.push(i),i.setValueWriter(this)}),t.push(this.parent),this.parent.addInputDeclaration(this),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return{affected:E(t),self:this}}toFlat(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this,...this.writesValues.flatMap(a=>a.toFlat(e)),...((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,...this.writesValues.flatMap(a=>a.toFlatIds(e)),...((i=this.dataType)==null?void 0:i.toFlatIds(e))||[]])}toJSON(){var e,t;return{id:this.id,version:this.version,name:this.name,type:this.type,index:this.index,description:this.description,required:this.required,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,implements:((t=this.implements)==null?void 0:t.toJSON())||null,writesValues:this.writesValues.map(i=>i.toJSON()),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,required:this.required,writesValues:this.writesValues.map(i=>i.toReference()),implements:((e=this.implements)==null?void 0:e.toReference())||null,dataType:((t=this.dataType)==null?void 0:t.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.writesValues.flatMap(a=>a.toFlatJSON(e)),...((i=this.dataType)==null?void 0:i.toFlatJSON(e))||[]])}toGenerationTarget(){return{id:this.id,name:this.name,description:this.description,type:this.type,required:this.required,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.writesValues.flatMap(a=>a.toFlatGenerationTarget(e)),...((i=this.dataType)==null?void 0:i.toFlatGenerationTarget(e))||[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||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,...((t=this.dataType)==null?void 0:t.getErrors())||[]]}getShallowErrors(){return this.errors}getDefaultValue(){var e;return((e=this==null?void 0: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.ArgumentDeclaration,this.project);a.dataType=null;const o=s.split("-id"),l=o[o.length-1||0]||s;a.id=s;const p=kt(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}getDataType(){return this.dataType}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}};d(Ae,"MUTABLE_BASE_PROPERTIES",["name","description","required"]),d(Ae,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ae,"BASE_PROPERTIES",[...Ae.MUTABLE_BASE_PROPERTIES,...Ae.INMUTABLE_BASE_PROPERTIES]),d(Ae,"MUTABLE_META_PROPERTIES",[...Ae.MUTABLE_BASE_PROPERTIES,"index"]),d(Ae,"INMUTABLE_META_PROPERTIES",[...Ae.INMUTABLE_BASE_PROPERTIES]),d(Ae,"META_PROPERTIES",[...Ae.MUTABLE_META_PROPERTIES,...Ae.INMUTABLE_META_PROPERTIES]),d(Ae,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(Ae,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),d(Ae,"UPSTREAM_PROPERTIES",[...Ae.MUTABLE_UPSTREAM_PROPERTIES,...Ae.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ae,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","dataType"]),d(Ae,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ae,"DOWNSTREAM_PROPERTIES",[...Ae.MUTABLE_DOWNSTREAM_PROPERTIES,...Ae.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ae,"PROPERTIES",[...Ae.META_PROPERTIES,...Ae.UPSTREAM_PROPERTIES,...Ae.DOWNSTREAM_PROPERTIES]);let $r=Ae;function V2(r){const e=Id(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}function L2(r,e){const t=[];if(r.parent)if(r.parent){const i=e.get(r.parent);i?[n.InputMap,n.DataType].includes(i.type)?i.type===n.DataType&&i.defaultValue&&t.push(new b({id:`${r.id}--${r.parent}--${f.NewEntityWouldOverriteExisting}`,code:f.NewEntityWouldOverriteExisting,severity:T.Error,message:`Entity of type "${r.type}" with id "${r.id}", has a 'parent' of type 'data-type' which already has an existing default value entity with id "${i.defaultValue.id}".
139
139
  Data types can only have one 'primitive-value' entity as 'defaultValue'.
140
140
  You can update the existing 'primitive-value' with the 'update' action, for example, like so:
141
141
  \`\`\`json
@@ -157,7 +157,7 @@ You shouldn't have to manually update a 'parent' property.
157
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=G2(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)}};d(dt,"MUTABLE_BASE_PROPERTIES",[]),d(dt,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(dt,"BASE_PROPERTIES",[...bt.MUTABLE_BASE_PROPERTIES,...bt.INMUTABLE_BASE_PROPERTIES]),d(dt,"MUTABLE_META_PROPERTIES",["x","y"]),d(dt,"INMUTABLE_META_PROPERTIES",[...bt.INMUTABLE_BASE_PROPERTIES]),d(dt,"META_PROPERTIES",[...bt.MUTABLE_META_PROPERTIES,...bt.INMUTABLE_META_PROPERTIES]),d(dt,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),d(dt,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(dt,"UPSTREAM_PROPERTIES",[...bt.MUTABLE_UPSTREAM_PROPERTIES,...bt.INMUTABLE_UPSTREAM_PROPERTIES]),d(dt,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),d(dt,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(dt,"DOWNSTREAM_PROPERTIES",[...bt.MUTABLE_DOWNSTREAM_PROPERTIES,...bt.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(dt,"PROPERTIES",[..._t.META_PROPERTIES,..._t.UPSTREAM_PROPERTIES,..._t.DOWNSTREAM_PROPERTIES]);let Fr=dt;function F2(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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.BreakStatement);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"throws",null);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(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=Ye(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=F2(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)}};d(Ce,"MUTABLE_BASE_PROPERTIES",[]),d(Ce,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ce,"BASE_PROPERTIES",[...Ce.MUTABLE_BASE_PROPERTIES,...Ce.INMUTABLE_BASE_PROPERTIES]),d(Ce,"MUTABLE_META_PROPERTIES",["x","y"]),d(Ce,"INMUTABLE_META_PROPERTIES",[...Ce.INMUTABLE_BASE_PROPERTIES]),d(Ce,"META_PROPERTIES",[...Ce.MUTABLE_META_PROPERTIES,...Ce.INMUTABLE_META_PROPERTIES]),d(Ce,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),d(Ce,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(Ce,"UPSTREAM_PROPERTIES",[...Ce.MUTABLE_UPSTREAM_PROPERTIES,...Ce.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ce,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),d(Ce,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ce,"DOWNSTREAM_PROPERTIES",[...Ce.MUTABLE_DOWNSTREAM_PROPERTIES,...Ce.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ce,"PROPERTIES",[...Ce.META_PROPERTIES,...Ce.UPSTREAM_PROPERTIES,...Ce.DOWNSTREAM_PROPERTIES]);let wi=Ce;function U2(r){const e=oD(),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 JP=(r=>(r.Success="success",r.Error="error",r.Break="break",r.Continue="continue",r.Return="return",r))(JP||{});const Be=class Be{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(this,"implementation",null);d(this,"parent",null);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(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=Qn(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+=`
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=F2(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)}};d(Ce,"MUTABLE_BASE_PROPERTIES",[]),d(Ce,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ce,"BASE_PROPERTIES",[...Ce.MUTABLE_BASE_PROPERTIES,...Ce.INMUTABLE_BASE_PROPERTIES]),d(Ce,"MUTABLE_META_PROPERTIES",["x","y"]),d(Ce,"INMUTABLE_META_PROPERTIES",[...Ce.INMUTABLE_BASE_PROPERTIES]),d(Ce,"META_PROPERTIES",[...Ce.MUTABLE_META_PROPERTIES,...Ce.INMUTABLE_META_PROPERTIES]),d(Ce,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),d(Ce,"INMUTABLE_UPSTREAM_PROPERTIES",[]),d(Ce,"UPSTREAM_PROPERTIES",[...Ce.MUTABLE_UPSTREAM_PROPERTIES,...Ce.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ce,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),d(Ce,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ce,"DOWNSTREAM_PROPERTIES",[...Ce.MUTABLE_DOWNSTREAM_PROPERTIES,...Ce.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ce,"PROPERTIES",[...Ce.META_PROPERTIES,...Ce.UPSTREAM_PROPERTIES,...Ce.DOWNSTREAM_PROPERTIES]);let wi=Ce;function U2(r){const e=lD(),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 WP=(r=>(r.Success="success",r.Error="error",r.Break="break",r.Continue="continue",r.Return="return",r))(WP||{});const Be=class Be{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(this,"implementation",null);d(this,"parent",null);d(this,"errors",[]);d(this,"project");d(this,"initialized",!1);d(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=Ye(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=Qn(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
  ${Kn}`,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
  ${dn({describe_entity:l.entity.id})}
@@ -183,25 +183,25 @@ ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null}))),w
183
183
  ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),r.calledByEntry&&t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledByEntry" updated.
184
184
  ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),r.calledBySuccess&&t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledBySuccess" updated.
185
185
  ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null})),r.calledByError&&t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledByError" updated.
186
- ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null}))),t.length)return{errors:t,modifiedData:null,messageAddition:""};const a=Yo(e.type);if(a){(a.INMUTABLE_META_PROPERTIES||[]).forEach(I=>{["type","id"].includes(I)||r[I]&&!wa(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" updated. It is an inmutable property that is set only when the entity is created.
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(I=>{r[I]&&!wa(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" set directly. It is a downstream property that points to a downstream nested entity.
186
+ ${Zn}`,severity:T.Error,code:f.InvalidInmutablePropertyOverride,issue:null}))),t.length)return{errors:t,modifiedData:null,messageAddition:""};const a=Yo(e.type);if(a){(a.INMUTABLE_META_PROPERTIES||[]).forEach(I=>{["type","id"].includes(I)||r[I]&&!_a(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" updated. It is an inmutable property that is set only when the entity is created.
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(I=>{r[I]&&!_a(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" 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
- To modify '${I}', 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(I=>{r[I]&&!wa(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" 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(I=>{A.includes(I)||t.push(new b({id:`${e.id}--${f.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${I}" that will be ignored.`,severity:T.Warning,code:f.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?No(e):""};const s=WP(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=Ru(p,l);if(t.push(...y),t.length)return{errors:t,modifiedData:null,messageAddition:i?No(e):""};const m=e.validateGeneratedUpdate(r);return{errors:[...t,...m.errors],modifiedData:m.modifiedData,messageAddition:i?No(e):""}}function WP(r){switch(r.type){case n.PrimitiveValue:return so();case n.CustomEntity:return Vd();case n.PrimitiveEntity:return so();case n.FunctionDeclaration:return Nd();case n.GlobalEvent:return fo();case n.DataType:return Pd();case n.Property:return cd();case n.FunctionCall:return Td();case n.Condition:return Ed();case n.Operation:return po();case n.VariableDeclaration:return Od();case n.VariableInstance:return Sd();case n.OutputMap:return md();case n.ReturnDeclaration:return yd();case n.ArgumentDeclaration:return _d();case n.InputMap:return vd();case n.Project:return Md();case n.InstalledProject:return e3();case n.ActionDescriptor:return lo();case n.ReturnStatement:return pd();case n.Loop:return lo();case n.Search:return bd();case n.ValueDescriptor:return ld();case n.BuiltInBaseEntity:return dd();case n.InternalCall:return gd();case n.ContinueStatement:return ud();case n.BreakStatement:return hd();default:return null}}function YP(r){switch(r.type){case n.PrimitiveValue:return S6();case n.CustomEntity:return J3();case n.PrimitiveEntity:return f9();case n.FunctionDeclaration:return L3();case n.GlobalEvent:return o3();case n.DataType:return x6();case n.Property:return b9();case n.FunctionCall:return t6();case n.Condition:return s6();case n.Operation:return v6();case n.VariableDeclaration:return W6();case n.VariableInstance:return K6();case n.OutputMap:return K9();case n.ReturnDeclaration:return k9();case n.ArgumentDeclaration:return _3();case n.InputMap:return E6();case n.Project:return x3();case n.InstalledProject:return n3();case n.ActionDescriptor:return S9();case n.ReturnStatement:return F9();case n.Loop:return w9();case n.Search:return d6();case n.ValueDescriptor:return u9();case n.BuiltInBaseEntity:return D9();case n.InternalCall:return h6();case n.ContinueStatement:return V9();case n.BreakStatement:return Y9();default:return null}}function Mo(r){const e=[];Yn(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 Ru(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: ${fk(t).toString().replace("Validation error: ","")}`,severity:T.Error,code:S.InvalidObjectStructure,issue:t}))}function Le(r,e){const t=[],i=YP(r);if(i){const s=i.safeParse(r);t.push(...Ru(r,s))}const a=Yo(r.type);if(a){(a.DOWNSTREAM_PROPERTIES||[]).forEach(l=>{r[l]&&!wa(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.
189
+ To modify '${I}', 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(I=>{r[I]&&!_a(r[I])&&(t.push(new b({id:`${e.id}--${f.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${I}" 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(I=>{A.includes(I)||t.push(new b({id:`${e.id}--${f.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${I}" that will be ignored.`,severity:T.Warning,code:f.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?No(e):""};const s=YP(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=Ru(p,l);if(t.push(...y),t.length)return{errors:t,modifiedData:null,messageAddition:i?No(e):""};const m=e.validateGeneratedUpdate(r);return{errors:[...t,...m.errors],modifiedData:m.modifiedData,messageAddition:i?No(e):""}}function YP(r){switch(r.type){case n.PrimitiveValue:return so();case n.CustomEntity:return Vd();case n.PrimitiveEntity:return so();case n.FunctionDeclaration:return Nd();case n.GlobalEvent:return fo();case n.DataType:return Pd();case n.Property:return cd();case n.FunctionCall:return Td();case n.Condition:return Ed();case n.Operation:return po();case n.VariableDeclaration:return Od();case n.VariableInstance:return Sd();case n.OutputMap:return md();case n.ReturnDeclaration:return yd();case n.ArgumentDeclaration:return _d();case n.InputMap:return vd();case n.Project:return Md();case n.InstalledProject:return e3();case n.ActionDescriptor:return lo();case n.ReturnStatement:return pd();case n.Loop:return lo();case n.Search:return bd();case n.ValueDescriptor:return ld();case n.BuiltInBaseEntity:return dd();case n.InternalCall:return gd();case n.ContinueStatement:return ud();case n.BreakStatement:return hd();default:return null}}function HP(r){switch(r.type){case n.PrimitiveValue:return S6();case n.CustomEntity:return J3();case n.PrimitiveEntity:return f9();case n.FunctionDeclaration:return L3();case n.GlobalEvent:return o3();case n.DataType:return x6();case n.Property:return b9();case n.FunctionCall:return t6();case n.Condition:return s6();case n.Operation:return v6();case n.VariableDeclaration:return W6();case n.VariableInstance:return K6();case n.OutputMap:return K9();case n.ReturnDeclaration:return k9();case n.ArgumentDeclaration:return _3();case n.InputMap:return E6();case n.Project:return x3();case n.InstalledProject:return n3();case n.ActionDescriptor:return S9();case n.ReturnStatement:return F9();case n.Loop:return w9();case n.Search:return d6();case n.ValueDescriptor:return u9();case n.BuiltInBaseEntity:return D9();case n.InternalCall:return h6();case n.ContinueStatement:return V9();case n.BreakStatement:return Y9();default:return null}}function Mo(r){const e=[];Yn(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 Ru(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: ${fk(t).toString().replace("Validation error: ","")}`,severity:T.Error,code:S.InvalidObjectStructure,issue:t}))}function Le(r,e){const t=[],i=HP(r);if(i){const s=i.safeParse(r);t.push(...Ru(r,s))}const a=Yo(r.type);if(a){(a.DOWNSTREAM_PROPERTIES||[]).forEach(l=>{r[l]&&!_a(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 q2(r,e){const t=[];if(!r.parent)return t;const i=e.get(r.parent);return i?(Hr.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 gu(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=Mo(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 Vo(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=Mo(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 vu(r,e,t){const i=[],a=gu(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 zn=`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 ")}.`,Fa=`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. `,HP=`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(yn,", "," and ")}.`,J2=`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.
193
+ All pass-through callable entities are: ${U(je,", "," and ")}.`,Ua=`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. `,zP=`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(yn,", "," and ")}.`,J2=`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(wn,", "," and ")}.`,Zn=`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.`,Iu=`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'.`,W2=`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.`,Du=`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.`,Kn=`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.`,Pu=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${U(Bn,"', '","' and '")}'.`,zP=`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 '")}'.`,Au=`A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.
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.`,Kn=`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.`,Pu=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${U(Bn,"', '","' and '")}'.`,ZP=`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 '")}'.`,Au=`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.`,Lo=`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(Ju,"', '","' and '")}'.
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.`,Lo=`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(Wu,"', '","' and '")}'.
202
202
  Some entities with values can both write and read values, while others can only do one of the two.
203
203
  ${Pu}
204
- ${zP}.
204
+ ${ZP}.
205
205
  ${Au}`,Ou=`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,9 +221,9 @@ ${typeof r=="string"?r:JSON.stringify(r,null,2)}
221
221
  ...All the properties you want to update
222
222
  }
223
223
  }
224
- }`;return dn(i)}default:return""}}function ZP(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}".
224
+ }`;return dn(i)}default:return""}}function KP(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
- ${Fa}
226
+ ${Ua}
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?`
228
228
 
229
229
  This ${e.type} is called by ${U(a.map(o=>`${o.type} with id "${o.id}"`),", "," and ")} entities. You can reference ${a.length>1?"one of them":"it"} instead to execute this entity before the end of the logic.`:"";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 '${e.type}' entity at 'calledBySuccess' with id "${e.id}".
@@ -232,9 +232,9 @@ Termination entities are ${U(Ve,", "," and ")}.${s}`,issue:null}))}else if(!je.i
232
232
  ${zn}`,issue:null}));else if(!yn.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(yn,", "," and ")}.
234
234
  For the 'calledBySuccess' property, you specifically need to reference a pass-through callable entity.
235
- ${zn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function KP(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}".
235
+ ${zn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function XP(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
- ${Fa}`,issue:null}));else if(Ve.includes(e.type)){const i=e.calledBy||[],a=i.length?`
237
+ ${Ua}`,issue:null}));else if(Ve.includes(e.type)){const i=e.calledBy||[],a=i.length?`
238
238
 
239
239
  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 'calledByError' with id "${e.id}".
240
240
  ${e.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
@@ -242,21 +242,21 @@ Termination entities are ${U(Ve,", "," and ")}.${a}`,issue:null}))}else if(!je.i
242
242
  ${zn}`,issue:null}));else if(!yn.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(yn,", "," and ")}.
244
244
  For the 'calledByError' property, you specifically need to reference a pass-through callable entity.
245
- ${zn}`,issue:null})),t;return t}function XP(r,e){const t=[];if(Ve.includes(e.type)){const i=e.calledBy||[],a=i.length?`
245
+ ${zn}`,issue:null})),t;return t}function QP(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.
249
249
  Termination entities are ${U(Ve,", "," and ")}.${a}`,issue:null}))}else if(je.includes(e.type))t.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 a caller entity at 'calledByEntry' with id "${e.id}" that is a pass-through callable entity, not an entry-point entity.
250
250
  ${zn}.
251
- ${Fa}.
251
+ ${Ua}.
252
252
 
253
253
  We have moved the reference to 'calledBySuccess' for you.`,issue:null}));else if(!yn.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(yn,", "," and ")}.
255
255
  For the 'calledByEntry' property, you specifically need to reference a pass-through callable entity.
256
- ${zn}`,issue:null})),t;return t}function QP(r,e){const t=[];let i=JSON.parse(JSON.stringify(r));if(wn.includes(i.type)){if(i.calledBySuccess){const s=Vo(i,"calledBySuccess",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=ZP(i,o.entityState);i=l.modifiedData,t.push(...l.errors)}):t.push(...s.errors)}if(i.calledByError){const s=Vo(i,"calledByError",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=KP(i,o.entityState);t.push(...l)}):t.push(...s.errors)}if(i.calledByEntry){const s=Vo(i,"calledByEntry",e);s.errors.length===0?(s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=XP(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.${Go}`,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.${Go}`,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.${Go}`,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)ja(o,R,e)?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(D=>D===m.id)?(m.successCalls||[]).find(I=>Ve.includes(I.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.
256
+ ${zn}`,issue:null})),t;return t}function eA(r,e){const t=[];let i=JSON.parse(JSON.stringify(r));if(wn.includes(i.type)){if(i.calledBySuccess){const s=Vo(i,"calledBySuccess",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=KP(i,o.entityState);i=l.modifiedData,t.push(...l.errors)}):t.push(...s.errors)}if(i.calledByError){const s=Vo(i,"calledByError",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=XP(i,o.entityState);t.push(...l)}):t.push(...s.errors)}if(i.calledByEntry){const s=Vo(i,"calledByEntry",e);s.errors.length===0?(s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const l=QP(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.${Go}`,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.${Go}`,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.${Go}`,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)ka(o,R,e)?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(D=>D===m.id)?(m.successCalls||[]).find(I=>Ve.includes(I.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(D=>D===m.id)?(m.errorCalls||[]).find(I=>Ve.includes(I.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(D=>D===m.id)&&(m.calls||[]).find(I=>Ve.includes(I.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
- 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}=ja(y,R,e);v?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(D=>D===m.id)?(m.successCalls||[]).find(I=>Ve.includes(I.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
+ 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}=ka(y,R,e);v?(Ve.includes(i.type)&&((i.calledBySuccess||[]).find(D=>D===m.id)?(m.successCalls||[]).find(I=>Ve.includes(I.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.
260
260
  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(D=>D===m.id)?(m.errorCalls||[]).find(I=>Ve.includes(I.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.
261
261
  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(D=>D===m.id)&&(m.calls||[]).find(I=>Ve.includes(I.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.
262
262
  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}" has multiple caller, but not all of them have compatible scopes. Caller of type "${m.type}" with id "${m.id}" is in a different scope than caller of type "${y.type}" with id "${y.id}". All callers should be in the same scope or a higher valid scope. Or all callers should share the global project scope.`,issue:null})]})}}),p.length)p.forEach(h=>{t.push(...h.errors)});else if(l.length&&!o&&Qo.includes(i.type)){const h=l.filter(m=>m.scope!==e);if(h.length){const m=BA(h.map(R=>R.scope));i.parent=m.id}else i.parent=e.id}}else{let s=`Entity of type "${i.type}" with id "${i.id}" isn't called by any other entity. Callable entities only get executed if they have a list of references from either 'calledByEntry', 'calledBySuccess' or 'calledByError'.
@@ -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
- ${HP}`,Ve.includes(i.type)||(s+=`
267
+ ${zP}`,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 Su(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=gt(r,e.project),a=gt(e,e.project);if(i){const s=ja(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+=`
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=ka(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 @@ ${Au}`,issue:null})):a.push(new b({id:`${o.id}--${f.InvalidReference}`,code:f.In
287
287
  ${Pu}`,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
  ${Ou}`,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
  ${Lo}
290
- ${Ou}`,issue:null})),delete s.writesValues);const p=QP(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 D=vu(o,{key:p,types:h,optional:m},t);a.push(...D)}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=vu(o,{key:p,types:h,optional:m},t);a.push(...v)}}return{errors:a,modifiedData:o}}function H2(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?`
290
+ ${Ou}`,issue:null})),delete s.writesValues);const p=eA(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 D=vu(o,{key:p,types:h,optional:m},t);a.push(...D)}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=vu(o,{key:p,types:h,optional:m},t);a.push(...v)}}return{errors:a,modifiedData:o}}function H2(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.
@@ -297,7 +297,7 @@ All caller entity types are: ${U(yn,", "," and ")}.`,issue:null}));return i}func
297
297
  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}'.
298
298
  ${a.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
299
299
  Termination entities are ${U(Ve,", "," and ")}.${o}`,issue:null}))}else Ue.includes(a.type)?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}' which is an entry-point entity and doesn't thrown errors.
300
- ${Fa}`,issue:null})):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}' which is not a valid caller entity type.
300
+ ${Ua}`,issue:null})):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}' which is not a valid caller entity type.
301
301
  For any error branch caller, for the 'calledByError' property of an entity, you specifically need to reference a pass-through callable entity.
302
302
  ${zn}`,issue:null}));return i}function Z2(r,e){const t=[],i=e.get(r);if(!i)t.push(new b({id:`last-action--${f.ReferencedEntityNotFound}`,code:f.ReferencedEntityNotFound,severity:T.Error,message:`The 'readsValue' property references an entity with id '${r}' that was not found in the project. Perhaps it should be created? Perhaps the ID is incorrect?`,issue:null}));else if(i.type===n.PrimitiveValue){const s=i.parent;let o=!1;if(s.type===n.InputMap)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 aren't value writting entities.
303
303
  All value writting entity types are: ${U(xe,", "," and ")}.
@@ -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 eA(r){return r.functions.length?`All global 'function-declaration' entity ids are:
314
+ All value writting entity types are: ${U(xe,", "," and ")}.`,issue:null}));return t}function tA(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 $o(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 Uo(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 tA(r,e){const t=[];if(!r)return[];const i=e.get(r),a=eA(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.
324
+ - `)}`}function nA(r,e){const t=[];if(!r)return[];const i=e.get(r),a=tA(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=Qn(i.parent).filter(p=>!p.interactive);let l="";o.length&&(l=`
@@ -330,7 +330,7 @@ ${Kn}`),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 nA(r,e){const t=[];if(!r)return[];const i=e.getBuiltIn(r),a=`
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 rA(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 Q2(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 rA(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=So(`${i} and ${s} have incompatible data types and cannot be connected as value-reader and value-writter.`);return t.type===Ft.AIsListBIsNot?`${l}
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 iA(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=So(`${i} and ${s} have incompatible data types and cannot be connected as value-reader and value-writter.`);return t.type===Ft.AIsListBIsNot?`${l}
345
345
  ${a} is a list, but ${o} is not. A list can't be connected to a single value.`:t.type===Ft.BIsListAIsNot?`${l}
346
346
  ${a} is not a list, but ${o} is. A single value can't be connected to a list.`:t.type===Ft.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===Ft.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===Ft.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===Ft.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===Ft.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 Ua(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=er(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=Su({...e.toGenerationTarget(),...r},i);t.push(...o);const l=Ut(e.getDataType(),i.getDataType());l.compatible||t.push(new b({id:`${e.id}--${S.ReaderWriterIncompatibleDataType}`,code:S.ReaderWriterIncompatibleDataType,severity:T.Error,message:rA(e,i,l),issue:null}))}}}return{errors:t,modifiedData:r}}function Cn(r){const e=[];if(r.parent===r.project)!r.calledBy.length&&r.type!==n.VariableDeclaration&&e.push(new Tr({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.
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 xa(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=er(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=Su({...e.toGenerationTarget(),...r},i);t.push(...o);const l=Ut(e.getDataType(),i.getDataType());l.compatible||t.push(new b({id:`${e.id}--${S.ReaderWriterIncompatibleDataType}`,code:S.ReaderWriterIncompatibleDataType,severity:T.Error,message:iA(e,i,l),issue:null}))}}}return{errors:t,modifiedData:r}}function Cn(r){const e=[];if(r.parent===r.project)!r.calledBy.length&&r.type!==n.VariableDeclaration&&e.push(new Tr({id:`${r.id}--${V.DisconnectedCallableEntity}`,code:V.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
- 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=qa(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+=`
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=Ja(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 Tr({id:`${r.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Warning,message:`${i}${a}`,issue:null,entity:r}))}}return ie(r.errors,e)}function Cu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=H({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=H({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=H({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=H({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=H({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=H({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 e7(r){var o;const e=r6(),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=[...Cn(r)];return ie(r.errors,s)}const _e=class _e{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.FunctionCall);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"process",null);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"error",null);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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=tA(o,t);a.push(...l)}else{const l=t.functions.length?`
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 Tr({id:`${r.id}--${S.UnreachableEntity}`,code:S.UnreachableEntity,severity:T.Warning,message:`${i}${a}`,issue:null,entity:r}))}}return ie(r.errors,e)}function Cu(r){const e=[];if(!r.internalCalls.length)return e;if(r.readsValue){const t=H({id:`${r.id}--${V.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:V.VariableReadsValueAndInternalCall,entity:r});e.push(t.error)}if(r.writesValues.length){const t=H({id:`${r.id}--${V.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:V.VariableWritesValuesAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedInputs().length){const t=H({id:`${r.id}--${V.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:V.VariableHasInputsAndInternalCall,entity:r});e.push(t.error)}if(r.getUsedOutputs().length){const t=H({id:`${r.id}--${V.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:V.VariableHasOutputsAndInternalCall,entity:r});e.push(t.error)}if(r.calledBy.length){const t=H({id:`${r.id}--${V.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:V.VariableIsCalledAndHasInternalCall,entity:r});e.push(t.error)}if([...r.successCalls,...r.errorCalls].length){const t=H({id:`${r.id}--${V.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:V.VariableCallsOthersAndHasInternalCall,entity:r});e.push(t.error)}return e}function e7(r){var o;const e=r6(),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=[...Cn(r)];return ie(r.errors,s)}const _e=class _e{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"x");d(this,"y");d(this,"type",n.FunctionCall);d(this,"successCalls",[]);d(this,"errorCalls",[]);d(this,"process",null);d(this,"declaration");d(this,"inputs",[]);d(this,"outputs",[]);d(this,"calledBySuccess",[]);d(this,"calledByError",[]);d(this,"calledByEntry",[]);d(this,"error",null);d(this,"parent");d(this,"errors",[]);d(this,"project");d(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=Ye(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=nA(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=e7(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(D=>{D.index>=y.index&&D.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}}};d(_e,"MUTABLE_BASE_PROPERTIES",[]),d(_e,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(_e,"BASE_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,..._e.INMUTABLE_BASE_PROPERTIES]),d(_e,"MUTABLE_META_PROPERTIES",["x","y"]),d(_e,"INMUTABLE_META_PROPERTIES",[..._e.INMUTABLE_BASE_PROPERTIES]),d(_e,"META_PROPERTIES",[..._e.MUTABLE_META_PROPERTIES,..._e.INMUTABLE_META_PROPERTIES]),d(_e,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),d(_e,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),d(_e,"UPSTREAM_PROPERTIES",[..._e.MUTABLE_UPSTREAM_PROPERTIES,..._e.INMUTABLE_UPSTREAM_PROPERTIES]),d(_e,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),d(_e,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(_e,"DOWNSTREAM_PROPERTIES",[..._e.MUTABLE_DOWNSTREAM_PROPERTIES,..._e.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(_e,"PROPERTIES",[..._e.META_PROPERTIES,..._e.UPSTREAM_PROPERTIES,..._e.DOWNSTREAM_PROPERTIES]);let xr=_e;function iA(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],D=g({id:v+"-default-value-id",version:1,type:n.PrimitiveValue,name:P.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:m==null?void 0:m.dataType.toReference()},r.project);return D.setParent(m==null?void 0:m.dataType),D.initChildren(),D.addSelfToProject(),{newEntities:[D]}}return{newEntities:[]}}const o=r.project.get(B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),l=xo(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:P.EntityTemplate,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 aA(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:P.EntityTemplate,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 xo(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=_o(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=iA(r),y=g(o,r.project);y.setParent(r.project),y.initChildren();const h=r.properties.map(v=>{const D=s+"-"+Ze(C(v,r.project),n.Property,r.project),A=v.clone(y,D);return A.abstract=!1,A.implements=v,A.setParent(y),y.addProperty(A),A}),m=r.abstractMethods.map(v=>{const D=s+Ze(v.name,n.FunctionDeclaration,r.project),A=v.implementAsFunctionDeclaration(D),I={id:D+"-parent-ref-id",type:n.GenericReference,entityId:i,entityType:n.CustomEntity},F={...A,implements:v,parent:I},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=aA(y);return{implemented:y,errors:[],entitiesChanges:{new:[y,...p.newEntities,...R.newEntities],updated:[y],deleted:[]}}}function Bu(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 sA(r,e,t=Ke.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 wu(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][P.Date].id);e.setEntity(y);break}else{const y=e.project.getBuiltIn(B[n.PrimitiveEntity][P.String].id);e.setEntity(y);break}case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.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][P.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Null].id));break}else{const m=[];let R=!1;y.forEach((D,A)=>{if(Array.isArray(D)&&(R=!0),typeof D=="object"&&!Array.isArray(D)&&D!==null){const I=jo(D,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);I.hasCreated&&m.push(I.changeSet.self),a.push(...I.changeSet.updated),s.push(...I.changeSet.added),o.push(...I.changeSet.removed)}});const v=E(m);if(!v.length&&!R){y.forEach(D=>{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:Ke.OrDataTypeGroup,parent:e.toReference()},I=g(A,e.project);switch(I.setParent(e),I.initChildren(),I.addSelfToProject(),typeof D){case"string":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.String].id));break;case"number":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):y.forEach((D,A)=>{if(typeof D=="object"&&!Array.isArray(D)&&D!==null){const I=Bu(Object.keys(D),e.project);if(I){const F=sA(I||v[0],e,Ke.OrDataTypeGroup);a.push(...F.updated),s.push(...F.added),o.push(...F.removed)}}else{const I={id:e.id+"--or-child-data-type-id--"+A,version:1,type:n.DataType,entity:null,isList:Array.isArray(D),isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ke.OrDataTypeGroup,parent:e.toReference()},F=g(I,e.project);F.setParent(e),F.initChildren(),F.addSelfToProject();const k=wu(D,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=jo(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=jo(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 jo(r,e,t,i){const a=[],s=[],o=[],l=Object.keys(r),p=Bu(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,D)=>{const A=Ze(y+" "+v,n.Property,e),I={id:A,version:1,name:v,type:n.Property,description:null,static:!1,abstract:!1,dataType:null,implements:null,index:D,hidden:!1,private:!1,required:!0,parent:R.toReference()},F=g(I,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 Je=wu(k,ae,{...t,name:v,id:A+"--data-type-entity-id"},i||R);a.push(...Je.updated),s.push(...Je.added),o.push(...Je.removed)}),{hasCreated:!0,changeSet:{updated:E(a),added:E(s),removed:E(o),self:R}}}function ko(r,e){const t=jr(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=ko(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function oA(r,e,t=new Set){const i=Xn(r),a=Xn(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,...oA(y,e,t)])),[]);return E([...o,...l])}function xa(r,e){const t=ko(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function t7(r,e){return!!ko(r,e).last}function n7(r){if(Ue.includes(r.type))return r;if([...wn,n.VariableDeclaration].includes(r.type)){const e=r.parent;return Ue.includes(e.type)?e:null}return null}function _u(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 _u(t,i)}function tt(r){if(el.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?tt(e):null}}function r7(r){return r.type===n.VariableDeclaration?[r]:je.includes(r.type)?[...r.inputs,...r.outputs||[]]:Ve.includes(r.type)?r.outputs:Yr.includes(r.type)||r.type===n.FunctionDeclaration?r.inputs:[]}function i7(r){const e=Xn(r),t=[],i=[];Wu.includes(r.type)&&t.push(...Nu(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:wn.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>xa(o,s)?-1:0),i.sort((s,o)=>xa(o,s)?-1:0),[...t,...i,...a]}function lA(r){return[...r].sort((e,t)=>xa(t,e)?-1:0)}function a7(r){const e=lA(r),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];xa(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function Rt(r){const e=r.map(t=>tt(t));return E(e)}function Nu(r){return je.includes(r.type)?[...Rt(r.successCalls),...Rt(r.errorCalls)]:Ue.includes(r.type)?Rt(r.calls):[]}function s7(r,e){return Nu(r).includes(e)}function Mu(r){return r.writesValues||[]}function o7(r,e){return Mu(r).includes(e)}function cA(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function l7(r){return r.writesValues}function dA(r=[]){return r.map(cA).filter(e=>!!e)}function qo(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function uA(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function pA(r){return Fe.includes(r.type)?r:null}function yA(r){return r.writesValues.map(pA).filter(e=>!!e)}function hA(r=[]){return r.reduce((e,t)=>t.type===n.OutputMap?[...e,...yA(t)]:e,[])}function Me(r){return je.includes(r.type)?[...un(Rt(r.successCalls)),...un(Rt(r.errorCalls))]:Ue.includes(r.type)?un(Rt(r.calls)):[]}function c7(r){return je.includes(r.type)?[...un(Rt(r.successCalls)),...un(Rt(r.errorCalls))]:Ue.includes(r.type)?un(Rt(r.calls)):[]}function fA(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 mA(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 uA(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=tt(o);return[...s,...re(l||o,e)]},[]),...dA(r.inputs),...hA(r.outputs)].reduce((s,o)=>[...s,...re(o,e)],[]);if(Yr.includes(r.type)){const t=qo(r.inputs),a=Me(r).reduce((s,o)=>{const l=tt(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=[...qo(r.inputs)],a=Me(r).reduce((s,o)=>{const l=tt(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=tt(s);return[...a,...re(o||s,e)]},[]);return[r,...i,...mA(r,e),...fA(r,e)]}return[]}function St(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...Xn(r).reduce((a,s)=>[...a,s,...St(s,e)],[])])}function un(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 TA(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,...qo(y.inputs),...un(Rt(y.calls)),...y.returnStatements],[]),o=r.functions.reduce((p,y)=>[...p,...un(Rt(y.calls)),...y.returnStatements],[]),l=r.events.reduce((p,y)=>[...p,...un(Rt(y.calls)),...y.returnStatements],[]);return[...t,...i,...a,...s,...o,...l]}function EA(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)?bA(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 d7(r){const e=TA(r.project);return EA(r,e)}function jr(r){const e=[];if(wn.includes(r.type)){r.calledBy.forEach(a=>{const s=tt(a);s&&e.push(s)});const i=[...r.inputs||[],...r.outputs||[]].map(a=>Lu(a)).filter(a=>a!==null);e.push(...E(i))}if(Fe.includes(r.type)){const t=Lu(r);t&&e.push(t)}return E(e)}function Vu(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||Yr.includes(r.type)?r.inputs:r.type===n.Search?r.inputsDeclarations:[]}function u7(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 bA(r){return je.includes(r.type)?r.inputs:[]}function RA(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 p7(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 y7(r){return r.type===n.Condition?[]:je.includes(r.type)?r.outputs:[]}function Lu(r){const e=r.readsValue;return e?tt(e):null}function gA(r){const e=r.internalCalls||[];return E(Rt(E(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function _i(r){const e=Mu(r),t=[];return e.forEach(i=>{if(Fe.includes(i.type))t.push(i);else if(Bn.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 Xn(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?[]:Xn(a));t.push(...i)}if(r.type===n.Condition){const i=r.successCalls.map(s=>tt(s)),a=r.errorCalls.map(s=>tt(s));t.push(...i,...a)}if(Yr.includes(r.type)){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>_i(s)).flat(),a=r.calls.map(s=>tt(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=>_i(o)).flat(),a=r.successCalls.map(o=>tt(o)),s=r.errorCalls.map(o=>tt(o));t.push(...E(i),...a,...s)}if(Fe.includes(r.type)){const i=_i(r),a=gA(r);t.push(...i,...a)}if(r.type===n.Loop){const i=r.outputs.map(o=>_i(o)).flat();if(r.body){const o=Xn(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>tt(o)),s=r.successCalls.map(o=>tt(o));t.push(...E(i),...s,...a)}if(r.type===n.FunctionDeclaration){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>_i(s)).flat(),a=r.calls.map(s=>tt(s));t.push(...E(i),...a)}return E(t)}function vA(r,e=!1){const t=Xn(r,e),i=[...t,...t.reduce((a,s)=>[...a,...vA(s,e)],[])];return E(i)}function IA(r){const e=jr(r),t=[...e,...e.reduce((i,a)=>[...i,...IA(a)],[])];return E(t)}function Jo(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Jo(t),...Wo(t)]:[...e,t.name],[])}function Wo(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Wo(t),...Jo(t)]:[...e,t.name],[])}function Gu(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Gu(t),...$u(t)]:[...e,t],[])}function $u(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...$u(t),...Gu(t)]:[...e,t],[])}function Fu(r){return[...Wo(r),...Jo(r)].filter((t,i,a)=>a.indexOf(t)===i)}function DA(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=DA(a);if(s)return s}return i},null)}function h7(r){const e=r.extends.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function f7(r){const e=r.implements.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function Uu(r){const e=r.extends.find(t=>t.type===n.CustomEntity);return e&&e.type===n.CustomEntity?e:null}function Qn(r){const e=[...r.implements,...r.extends].reduce((t,i)=>i.type===n.BuiltInBaseEntity?[...t,i]:i.type===n.CustomEntity?[...t,...Qn(i)]:t,[]);return E(e)}function xu(r){return r.type===n.PrimitiveEntity?!0:r.type===n.BuiltInBaseEntity?r.interactive:!Qn(r).find(i=>!i.interactive)}function m7(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 PA(r){if([...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||ju(r))return!1;const e=jr(r);return e.length===0?!0:e.some(t=>PA(t))}function ku(r){return[...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||ju(r)?!1:jr(r).length===0}function AA(r,e=0){if(ku(r)){const t=jr(r);return t.length===0?r:t.map(a=>AA(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function OA(r){const e=[];if(ku(r))e.push(r);else return[];return jr(r).forEach(i=>{e.push(...OA(i))}),e}function SA(r){return r.type===n.FunctionDeclaration&&r.parent!==r.project&&!![n.CustomEntity,n.Loop,n.InstalledProject].includes(r.parent.type)}function T7(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 Yo(r){switch(r){case n.CustomEntity:return kr;case n.FunctionDeclaration:return Br;case n.VariableDeclaration:return Mr;case n.VariableInstance:return Vr;case n.FunctionCall:return xr;case n.Operation:return wr;case n.Condition:return Nr;case n.ReturnStatement:return Fr;case n.Loop:return _r;case n.Search:return Lr;case n.InputMap:return On;case n.OutputMap:return Sn;case n.ArgumentDeclaration:return $r;case n.ReturnDeclaration:return _t;case n.Property:return Cr;case n.InstalledProject:return Gr;case n.Project:return _;case n.BuiltInBaseEntity:return xt;default:return null}}function gt(r,e){if(ut.includes(r.type))return r;if(Hr.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 qu(r,e){if(Hr.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Nt(r.parent,e);return t?t===e?ut.includes(r.type)?r:null:t.type===n.CustomEntity?r:qu(t,e):null}function Ho(r,e,t){if(r===e||e===t||r===t)return!1;const i=gt(e.parent,t);return i===r?!0:Ho(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 ja(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(Ho(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(Ho(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=_u(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 CA(r,e,t){const i=ja(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 BA(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,i)=>{const a=CA(t,i,i.project);return!a||a===i?t:i},r[0])}function Nt(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 er(r){if(!r)return null;if(Hr.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:er(e)}function ka(r,e){var t;if(r.readsValue){const i=Nt(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 qa(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=qu(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=qa(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=qa(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=tt(s);if(p.type===n.CustomEntity)return;p.type===n.Loop&&(l=p)}if(l){const p=qa(l);p.reachable||p.blocks.forEach(y=>{i(s,y.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function E7(r){return el.includes(r.type)?r.type===n.FunctionDeclaration?!SA(r):!0:!1}function b7(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 Ja(r,e){if(r.type!==n.CustomEntity||r.abstract)return!1;const t=Uu(r)||r;return!!Fu(t).includes(e)}function R7(r){const e=[];return r.entities.forEach(t=>{if(Ja(t,V.PERSISTED_ENTITY)){e.push(t);return}}),E(e)}function g7(r){const e=[];return r.entities.forEach(t=>{if(Ja(t,V.RELATIONAL_DATABASE)){e.push(t);return}}),E(e)}function v7(r){return r.type!==n.CustomEntity||r.abstract||!Ja(r,V.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>{var i;return((i=t.implements)==null?void 0:i.id)===B[n.BuiltInBaseEntity][V.PERSISTED_ENTITY].properties.identifier.id&&!t.abstract}))||null}function I7(r){if(r.type!==n.CustomEntity)return[];if(r.abstract)return[];if(!Ja(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 D7(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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"static");d(this,"abstract");d(this,"type",n.CustomEntity);d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"implements",[]);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"suggestedProperties",[]);d(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=D7(i,t),o=_o(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=e7(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(D=>{D.index>=y.index&&D.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}}};d(_e,"MUTABLE_BASE_PROPERTIES",[]),d(_e,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(_e,"BASE_PROPERTIES",[..._e.MUTABLE_BASE_PROPERTIES,..._e.INMUTABLE_BASE_PROPERTIES]),d(_e,"MUTABLE_META_PROPERTIES",["x","y"]),d(_e,"INMUTABLE_META_PROPERTIES",[..._e.INMUTABLE_BASE_PROPERTIES]),d(_e,"META_PROPERTIES",[..._e.MUTABLE_META_PROPERTIES,..._e.INMUTABLE_META_PROPERTIES]),d(_e,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),d(_e,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),d(_e,"UPSTREAM_PROPERTIES",[..._e.MUTABLE_UPSTREAM_PROPERTIES,..._e.INMUTABLE_UPSTREAM_PROPERTIES]),d(_e,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),d(_e,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(_e,"DOWNSTREAM_PROPERTIES",[..._e.MUTABLE_DOWNSTREAM_PROPERTIES,..._e.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(_e,"PROPERTIES",[..._e.META_PROPERTIES,..._e.UPSTREAM_PROPERTIES,..._e.DOWNSTREAM_PROPERTIES]);let xr=_e;function aA(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],D=g({id:v+"-default-value-id",version:1,type:n.PrimitiveValue,name:P.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:m==null?void 0:m.dataType.toReference()},r.project);return D.setParent(m==null?void 0:m.dataType),D.initChildren(),D.addSelfToProject(),{newEntities:[D]}}return{newEntities:[]}}const o=r.project.get(B["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),l=xo(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:P.EntityTemplate,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 sA(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:P.EntityTemplate,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 xo(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=_o(o,r.project);if(l.length>0)return{errors:l,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=aA(r),y=g(o,r.project);y.setParent(r.project),y.initChildren();const h=r.properties.map(v=>{const D=s+"-"+Ze(C(v,r.project),n.Property,r.project),A=v.clone(y,D);return A.abstract=!1,A.implements=v,A.setParent(y),y.addProperty(A),A}),m=r.abstractMethods.map(v=>{const D=s+Ze(v.name,n.FunctionDeclaration,r.project),A=v.implementAsFunctionDeclaration(D),I={id:D+"-parent-ref-id",type:n.GenericReference,entityId:i,entityType:n.CustomEntity},F={...A,implements:v,parent:I},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=sA(y);return{implemented:y,errors:[],entitiesChanges:{new:[y,...p.newEntities,...R.newEntities],updated:[y],deleted:[]}}}function Bu(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 oA(r,e,t=Ke.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 wu(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][P.Date].id);e.setEntity(y);break}else{const y=e.project.getBuiltIn(B[n.PrimitiveEntity][P.String].id);e.setEntity(y);break}case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":if(r===null){e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.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][P.String].id));break;case"number":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":e.setEntity(e.project.getBuiltIn(B[n.PrimitiveEntity][P.Null].id));break}else{const m=[];let R=!1;y.forEach((D,A)=>{if(Array.isArray(D)&&(R=!0),typeof D=="object"&&!Array.isArray(D)&&D!==null){const I=jo(D,e.project,{...t,id:e.id+"--or-child-data-type-entity-id-"+A},i);I.hasCreated&&m.push(I.changeSet.self),a.push(...I.changeSet.updated),s.push(...I.changeSet.added),o.push(...I.changeSet.removed)}});const v=E(m);if(!v.length&&!R){y.forEach(D=>{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:Ke.OrDataTypeGroup,parent:e.toReference()},I=g(A,e.project);switch(I.setParent(e),I.initChildren(),I.addSelfToProject(),typeof D){case"string":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.String].id));break;case"number":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Number].id));break;case"boolean":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Boolean].id));break;case"object":I.setEntity(I.project.getBuiltIn(B[n.PrimitiveEntity][P.Null].id));break}});break}else v.length===1&&!R?e.setEntity(v[0]):y.forEach((D,A)=>{if(typeof D=="object"&&!Array.isArray(D)&&D!==null){const I=Bu(Object.keys(D),e.project);if(I){const F=oA(I||v[0],e,Ke.OrDataTypeGroup);a.push(...F.updated),s.push(...F.added),o.push(...F.removed)}}else{const I={id:e.id+"--or-child-data-type-id--"+A,version:1,type:n.DataType,entity:null,isList:Array.isArray(D),isNullable:!1,defaultValue:null,asType:null,andChildrenGroup:null,orChildrenGroup:null,like:!0,inferred:!1,constant:!1,parentRelationType:Ke.OrDataTypeGroup,parent:e.toReference()},F=g(I,e.project);F.setParent(e),F.initChildren(),F.addSelfToProject();const k=wu(D,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=jo(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=jo(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 jo(r,e,t,i){const a=[],s=[],o=[],l=Object.keys(r),p=Bu(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,D)=>{const A=Ze(y+" "+v,n.Property,e),I={id:A,version:1,name:v,type:n.Property,description:null,static:!1,abstract:!1,dataType:null,implements:null,index:D,hidden:!1,private:!1,required:!0,parent:R.toReference()},F=g(I,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 Je=wu(k,ae,{...t,name:v,id:A+"--data-type-entity-id"},i||R);a.push(...Je.updated),s.push(...Je.added),o.push(...Je.removed)}),{hasCreated:!0,changeSet:{updated:E(a),added:E(s),removed:E(o),self:R}}}function ko(r,e){const t=jr(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=ko(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function lA(r,e,t=new Set){const i=Xn(r),a=Xn(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,...lA(y,e,t)])),[]);return E([...o,...l])}function ja(r,e){const t=ko(r,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function t7(r,e){return!!ko(r,e).last}function n7(r){if(Ue.includes(r.type))return r;if([...wn,n.VariableDeclaration].includes(r.type)){const e=r.parent;return Ue.includes(e.type)?e:null}return null}function _u(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 _u(t,i)}function tt(r){if(el.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?tt(e):null}}function r7(r){return r.type===n.VariableDeclaration?[r]:je.includes(r.type)?[...r.inputs,...r.outputs||[]]:Ve.includes(r.type)?r.outputs:Yr.includes(r.type)||r.type===n.FunctionDeclaration?r.inputs:[]}function i7(r){const e=Xn(r),t=[],i=[];Yu.includes(r.type)&&t.push(...Nu(r));const a=e.filter(s=>{const o=t.includes(s);return o?!1:wn.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 cA(r){return[...r].sort((e,t)=>ja(t,e)?-1:0)}function a7(r){const e=cA(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=>tt(t));return E(e)}function Nu(r){return je.includes(r.type)?[...Rt(r.successCalls),...Rt(r.errorCalls)]:Ue.includes(r.type)?Rt(r.calls):[]}function s7(r,e){return Nu(r).includes(e)}function Mu(r){return r.writesValues||[]}function o7(r,e){return Mu(r).includes(e)}function dA(r){var e;return Fe.includes((e=r==null?void 0:r.readsValue)==null?void 0:e.type)?r.readsValue:null}function l7(r){return r.writesValues}function uA(r=[]){return r.map(dA).filter(e=>!!e)}function qo(r=[]){return r.map(e=>e.writesValues).flat().filter(e=>Fe.includes(e.type))}function pA(r=[]){return r.map(e=>e.readsValue).filter(e=>!!e&&Fe.includes(e.type))}function yA(r){return Fe.includes(r.type)?r:null}function hA(r){return r.writesValues.map(yA).filter(e=>!!e)}function fA(r=[]){return r.reduce((e,t)=>t.type===n.OutputMap?[...e,...hA(t)]:e,[])}function Me(r){return je.includes(r.type)?[...un(Rt(r.successCalls)),...un(Rt(r.errorCalls))]:Ue.includes(r.type)?un(Rt(r.calls)):[]}function c7(r){return je.includes(r.type)?[...un(Rt(r.successCalls)),...un(Rt(r.errorCalls))]:Ue.includes(r.type)?un(Rt(r.calls)):[]}function mA(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 TA(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 pA(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=tt(o);return[...s,...re(l||o,e)]},[]),...uA(r.inputs),...fA(r.outputs)].reduce((s,o)=>[...s,...re(o,e)],[]);if(Yr.includes(r.type)){const t=qo(r.inputs),a=Me(r).reduce((s,o)=>{const l=tt(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=[...qo(r.inputs)],a=Me(r).reduce((s,o)=>{const l=tt(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=tt(s);return[...a,...re(o||s,e)]},[]);return[r,...i,...TA(r,e),...mA(r,e)]}return[]}function St(r,e=new Set){return e.has(r.id)?[]:(e.add(r.id),[...Xn(r).reduce((a,s)=>[...a,s,...St(s,e)],[])])}function un(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 EA(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,...qo(y.inputs),...un(Rt(y.calls)),...y.returnStatements],[]),o=r.functions.reduce((p,y)=>[...p,...un(Rt(y.calls)),...y.returnStatements],[]),l=r.events.reduce((p,y)=>[...p,...un(Rt(y.calls)),...y.returnStatements],[]);return[...t,...i,...a,...s,...o,...l]}function bA(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)?RA(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 d7(r){const e=EA(r.project);return bA(r,e)}function jr(r){const e=[];if(wn.includes(r.type)){r.calledBy.forEach(a=>{const s=tt(a);s&&e.push(s)});const i=[...r.inputs||[],...r.outputs||[]].map(a=>Lu(a)).filter(a=>a!==null);e.push(...E(i))}if(Fe.includes(r.type)){const t=Lu(r);t&&e.push(t)}return E(e)}function Vu(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||Yr.includes(r.type)?r.inputs:r.type===n.Search?r.inputsDeclarations:[]}function u7(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 RA(r){return je.includes(r.type)?r.inputs:[]}function gA(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 p7(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 y7(r){return r.type===n.Condition?[]:je.includes(r.type)?r.outputs:[]}function Lu(r){const e=r.readsValue;return e?tt(e):null}function vA(r){const e=r.internalCalls||[];return E(Rt(E(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function _i(r){const e=Mu(r),t=[];return e.forEach(i=>{if(Fe.includes(i.type))t.push(i);else if(Bn.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 Xn(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?[]:Xn(a));t.push(...i)}if(r.type===n.Condition){const i=r.successCalls.map(s=>tt(s)),a=r.errorCalls.map(s=>tt(s));t.push(...i,...a)}if(Yr.includes(r.type)){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>_i(s)).flat(),a=r.calls.map(s=>tt(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=>_i(o)).flat(),a=r.successCalls.map(o=>tt(o)),s=r.errorCalls.map(o=>tt(o));t.push(...E(i),...a,...s)}if(Fe.includes(r.type)){const i=_i(r),a=vA(r);t.push(...i,...a)}if(r.type===n.Loop){const i=r.outputs.map(o=>_i(o)).flat();if(r.body){const o=Xn(r.body,e);t.push(...o)}const a=r.errorCalls.map(o=>tt(o)),s=r.successCalls.map(o=>tt(o));t.push(...E(i),...s,...a)}if(r.type===n.FunctionDeclaration){if(r.collapsed&&e)return[];const i=r.inputs.map(s=>_i(s)).flat(),a=r.calls.map(s=>tt(s));t.push(...E(i),...a)}return E(t)}function IA(r,e=!1){const t=Xn(r,e),i=[...t,...t.reduce((a,s)=>[...a,...IA(s,e)],[])];return E(i)}function DA(r){const e=jr(r),t=[...e,...e.reduce((i,a)=>[...i,...DA(a)],[])];return E(t)}function Jo(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Jo(t),...Wo(t)]:[...e,t.name],[])}function Wo(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,n.CustomEntity,...Wo(t),...Jo(t)]:[...e,t.name],[])}function Gu(r){return r.extends.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...Gu(t),...$u(t)]:[...e,t],[])}function $u(r){return r.implements.reduce((e,t)=>t.type===n.CustomEntity?[...e,t,...$u(t),...Gu(t)]:[...e,t],[])}function Fu(r){return[...Wo(r),...Jo(r)].filter((t,i,a)=>a.indexOf(t)===i)}function Uu(r){return r.implements.length===0&&r.extends.length===0?null:r.implements.find(i=>i.type===n.BuiltInBaseEntity&&i.name===M.PERSISTED_ENTITY)?r:[...r.implements,...r.extends].reduce((i,a)=>{if(a.type===n.CustomEntity){const s=Uu(a);if(s)return s}return i},null)}function h7(r){const e=r.extends.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function f7(r){const e=r.implements.find(t=>t.type===n.BuiltInBaseEntity);return e&&e.type===n.BuiltInBaseEntity?e:null}function xu(r){const e=r.extends.find(t=>t.type===n.CustomEntity);return e&&e.type===n.CustomEntity?e:null}function Qn(r){const e=[...r.implements,...r.extends].reduce((t,i)=>i.type===n.BuiltInBaseEntity?[...t,i]:i.type===n.CustomEntity?[...t,...Qn(i)]:t,[]);return E(e)}function ju(r){return r.type===n.PrimitiveEntity?!0:r.type===n.BuiltInBaseEntity?r.interactive:!Qn(r).find(i=>!i.interactive)}function m7(r){return r.parent===r.project&&r.project.variableDeclarations.includes(r)}function ku(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 PA(r){if([...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||ku(r))return!1;const e=jr(r);return e.length===0?!0:e.some(t=>PA(t))}function qu(r){return[...Ue,n.CustomEntity,n.InstalledProject,n.Project].includes(r.type)||ku(r)?!1:jr(r).length===0}function AA(r,e=0){if(qu(r)){const t=jr(r);return t.length===0?r:t.map(a=>AA(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function OA(r){const e=[];if(qu(r))e.push(r);else return[];return jr(r).forEach(i=>{e.push(...OA(i))}),e}function SA(r){return r.type===n.FunctionDeclaration&&r.parent!==r.project&&!![n.CustomEntity,n.Loop,n.InstalledProject].includes(r.parent.type)}function T7(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 Yo(r){switch(r){case n.CustomEntity:return kr;case n.FunctionDeclaration:return Br;case n.VariableDeclaration:return Mr;case n.VariableInstance:return Vr;case n.FunctionCall:return xr;case n.Operation:return wr;case n.Condition:return Nr;case n.ReturnStatement:return Fr;case n.Loop:return _r;case n.Search:return Lr;case n.InputMap:return On;case n.OutputMap:return Sn;case n.ArgumentDeclaration:return $r;case n.ReturnDeclaration:return _t;case n.Property:return Cr;case n.InstalledProject:return Gr;case n.Project:return _;case n.BuiltInBaseEntity:return xt;default:return null}}function gt(r,e){if(ut.includes(r.type))return r;if(Hr.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 Ju(r,e){if(Hr.includes(r.type)||e.getBuiltIn(r.id))return null;const t=Nt(r.parent,e);return t?t===e?ut.includes(r.type)?r:null:t.type===n.CustomEntity?r:Ju(t,e):null}function Ho(r,e,t){if(r===e||e===t||r===t)return!1;const i=gt(e.parent,t);return i===r?!0:Ho(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 ka(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(Ho(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(Ho(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const l=_u(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 CA(r,e,t){const i=ka(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 BA(r){return r.length===0?null:r.length===1?r[0]:r.reduce((t,i)=>{const a=CA(t,i,i.project);return!a||a===i?t:i},r[0])}function Nt(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 er(r){if(!r)return null;if(Hr.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:er(e)}function qa(r,e){var t;if(r.readsValue){const i=Nt(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 Ja(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=Ju(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=Ja(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=Ja(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=tt(s);if(p.type===n.CustomEntity)return;p.type===n.Loop&&(l=p)}if(l){const p=Ja(l);p.reachable||p.blocks.forEach(y=>{i(s,y.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function E7(r){return el.includes(r.type)?r.type===n.FunctionDeclaration?!SA(r):!0:!1}function b7(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 Ni(r,e){if(r.type!==n.CustomEntity||r.abstract)return!1;const t=xu(r)||r;return!!Fu(t).includes(e)}function R7(r){const e=[];return r.entities.forEach(t=>{if(Ni(t,M.PERSISTED_ENTITY)){e.push(t);return}}),E(e)}function g7(r){const e=[];return r.entities.forEach(t=>{if(Ni(t,M.RELATIONAL_DATABASE)){e.push(t);return}}),E(e)}function v7(r){return r.type!==n.CustomEntity||r.abstract||!Ni(r,M.PERSISTED_ENTITY)?null:(r==null?void 0:r.properties.find(t=>{var i;return((i=t.implements)==null?void 0:i.id)===B[n.BuiltInBaseEntity][M.PERSISTED_ENTITY].properties.identifier.id&&!t.abstract}))||null}function I7(r){if(r.type!==n.CustomEntity)return[];if(r.abstract)return[];if(!Ni(r,M.PERSISTED_ENTITY))return[];const e=[],t=r.properties.filter(i=>{var a;return((a=i.implements)==null?void 0:a.id)!==B[n.BuiltInBaseEntity][M.PERSISTED_ENTITY].properties.database.id&&!i.abstract});return e.push(...t),e}function D7(r){var i;if(!r||r.type!==n.CustomEntity||!Ni(r,M.PERSISTED_ENTITY))return null;const t=Uu(r).properties.find(a=>{var s;return((s=a.implements)==null?void 0:s.id)===B[n.BuiltInBaseEntity][M.PERSISTED_ENTITY].properties.database.id});return t?(i=t.getDefaultValue())==null?void 0:i.valueAsType:null}function P7(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){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"x");d(this,"y");d(this,"static");d(this,"abstract");d(this,"type",n.CustomEntity);d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"implements",[]);d(this,"project");d(this,"errors",[]);d(this,"parent");d(this,"initialized",!1);d(this,"suggestedProperties",[]);d(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=P7(i,t),o=_o(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
  ${dn({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=>{Z3(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)}),K3(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=z3(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,D;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=kt(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const y=(R=this.properties)==null?void 0:R.map((A,I)=>A.clone(p,l+"-property-"+I+"-id",i));p.properties=y;const h=(v=this.methods)==null?void 0:v.map((A,I)=>A.clone(p,l+"-method-"+I+"-id",i));p.methods=h;const m=(D=this.abstractMethods)==null?void 0:D.map((A,I)=>A.clone(p,l+"-abstract-method-"+I+"-id",i));return p.abstractMethods=m,p}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return xo(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=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),y=cn(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 D=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),A=cn(D),I=A==null?void 0:A.clone(o,o.id+"--data-type",!0);I&&o.setDataType(I)}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,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=g(l,this.project);p.setParent(this),p.initChildren();const h=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),m=cn(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)}};d(Ne,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),d(Ne,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ne,"BASE_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,...Ne.INMUTABLE_BASE_PROPERTIES]),d(Ne,"MUTABLE_META_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,"x","y"]),d(Ne,"INMUTABLE_META_PROPERTIES",[...Ne.INMUTABLE_BASE_PROPERTIES]),d(Ne,"META_PROPERTIES",[...Ne.MUTABLE_META_PROPERTIES,...Ne.INMUTABLE_META_PROPERTIES]),d(Ne,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),d(Ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),d(Ne,"UPSTREAM_PROPERTIES",[...Ne.MUTABLE_UPSTREAM_PROPERTIES,...Ne.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),d(Ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ne,"DOWNSTREAM_PROPERTIES",[...Ne.MUTABLE_DOWNSTREAM_PROPERTIES,...Ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ne,"PROPERTIES",[...Ne.META_PROPERTIES,...Ne.UPSTREAM_PROPERTIES,...Ne.DOWNSTREAM_PROPERTIES]);let kr=Ne;function P7(r){const e=A9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class xt{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.BuiltInBaseEntity);d(this,"abstract",!1);d(this,"static");d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"interactive",!1);d(this,"errors",[]);d(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=P7(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 xo(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 A7(r){const e=T9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class jt{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.PrimitiveEntity);d(this,"static");d(this,"abstract");d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"errors",[]);d(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=A7(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 jt(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 kt(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 Bi(r,e);case n.CustomEntity:return t||new kr(r,e);case n.PrimitiveEntity:return t||new jt(r,e);case n.FunctionDeclaration:return t||new Br(r,e);case n.GlobalEvent:return t||new Si(r,e);case n.DataType:return t||new Oi(r,e);case n.Property:return t||new Cr(r,e);case n.FunctionCall:return t||new xr(r,e);case n.Condition:return t||new Nr(r,e);case n.Operation:return t||new wr(r,e);case n.VariableDeclaration:return t||new Mr(r,e);case n.VariableInstance:return t||new Vr(r,e);case n.OutputMap:return t||new Sn(r,e);case n.ReturnDeclaration:return t||new _t(r,e);case n.ArgumentDeclaration:return t||new $r(r,e);case n.InputMap:return t||new On(r,e);case n.Project:return t||new _(r);case n.InstalledProject:return t||new Gr(r,e);case n.ActionDescriptor:return t||new te(r,e);case n.ReturnStatement:return t||new Fr(r,e);case n.Loop:return t||new _r(r,e);case n.Search:return t||new Lr(r,e);case n.ValueDescriptor:return t||new Ur(r,e);case n.BuiltInBaseEntity:return t||new xt(r,e);case n.InternalCall:return t||new Ci(r,e);case n.ContinueStatement:return t||new bt(r,e);case n.BreakStatement:return t||new wi(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=kt(r,e);return t.subscribe(),t}function O7(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case n.PrimitiveValue:return Bi.fromGenerationTarget(r,e);case n.CustomEntity:return kr.fromGenerationTarget(r,e);case n.FunctionDeclaration:return Br.fromGenerationTarget(r,e);case n.GlobalEvent:return Si.fromGenerationTarget(r,e);case n.DataType:return Oi.fromGenerationTarget(r,e);case n.Property:return Cr.fromGenerationTarget(r,e);case n.FunctionCall:return xr.fromGenerationTarget(r,e);case n.Condition:return Nr.fromGenerationTarget(r,e);case n.Operation:return wr.fromGenerationTarget(r,e);case n.VariableDeclaration:return Mr.fromGenerationTarget(r,e);case n.VariableInstance:return Vr.fromGenerationTarget(r,e);case n.OutputMap:return Sn.fromGenerationTarget(r,e);case n.ReturnDeclaration:return _t.fromGenerationTarget(r,e);case n.ArgumentDeclaration:return $r.fromGenerationTarget(r,e);case n.InputMap:return On.fromGenerationTarget(r,e);case n.InstalledProject:return Gr.fromGenerationTarget(r,e);case n.ReturnStatement:return Fr.fromGenerationTarget(r,e);case n.Loop:return _r.fromGenerationTarget(r,e);case n.Search:return Lr.fromGenerationTarget(r,e);case n.ActionDescriptor:return te.fromGenerationTarget(r,e);case n.ValueDescriptor:return Ur.fromGenerationTarget(r,e);case n.InternalCall:return Ci.fromGenerationTarget(r,e);case n.ContinueStatement:return bt.fromGenerationTarget(r,e);case n.BreakStatement:return wi.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const ee=class ee{constructor(e){d(this,"initialData");d(this,"id");d(this,"version");d(this,"type",n.Project);d(this,"name",null);d(this,"description",null);d(this,"x");d(this,"y");d(this,"entities",[]);d(this,"projects",[]);d(this,"functions",[]);d(this,"events",[]);d(this,"variableDeclarations",[]);d(this,"variableInstances",[]);d(this,"conditions",[]);d(this,"operations",[]);d(this,"functionCalls",[]);d(this,"loops",[]);d(this,"searches",[]);d(this,"primitives",[]);d(this,"builtInBaseEntities",[]);d(this,"operationDeclarations",[]);d(this,"globalEventActionDescriptors",[]);d(this,"loopDeclarations",[]);d(this,"loopDeclarationsBodies",[]);d(this,"conditionDeclarations",[]);d(this,"valueDescriptors",[]);d(this,"dataTypes",[]);d(this,"project");d(this,"instances",{});d(this,"builtInInstances",{});d(this,"errors",[]);d(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=Us==null?void 0:Us()),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=k3(),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}};d(ee,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),d(ee,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),d(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),d(ee,"INMUTABLE_META_PROPERTIES",[...ee.INMUTABLE_BASE_PROPERTIES]),d(ee,"META_PROPERTIES",[...ee.MUTABLE_META_PROPERTIES,...ee.INMUTABLE_META_PROPERTIES]),d(ee,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),d(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),d(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),d(ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ee,"DOWNSTREAM_PROPERTIES",[...ee.MUTABLE_DOWNSTREAM_PROPERTIES,...ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ee,"PROPERTIES",[...ee.META_PROPERTIES,...ee.UPSTREAM_PROPERTIES,...ee.DOWNSTREAM_PROPERTIES]);let _=ee;class wA extends te{constructor(t){super(Wt,t);d(this,"id",le.Parallel);d(this,"name",le.Parallel);d(this,"description","Execute a list of actions one after the other");d(this,"version",1);d(this,"autoexecutable",!0);d(this,"initialData",Wt);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(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 _A extends te{constructor(t){super(pt,t);d(this,"id",pt.id);d(this,"name",pt.name);d(this,"description",pt.description);d(this,"version",pt.version);d(this,"autoexecutable",!1);d(this,"initialData",pt);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(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 NA extends te{constructor(t){super(mn,t);d(this,"id",le.Sequential);d(this,"name",le.Sequential);d(this,"description","Execute a list of actions one after the other");d(this,"version",1);d(this,"autoexecutable",!0);d(this,"initialData",mn);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(this,"project");this.project=t,this.inputs=mn.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=mn.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=mn.error?g(mn.error,this.project):null}}class S7 extends te{constructor(e){super(Vi,e)}}class C7 extends te{constructor(e){super(nr,e)}}class B7 extends te{constructor(t){super(rr,t);d(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 w7 extends te{constructor(e){super(dl,e)}}class _7 extends te{constructor(e){super(pl,e)}}class N7 extends te{constructor(e){super(yl,e)}}class M7 extends te{constructor(e){super(Za,e)}}class V7 extends te{constructor(e){super(Ya,e)}}class L7 extends te{constructor(e){super(Mi,e)}}function G7(r){const e=[new NA(r),new wA(r),new _A(r),new S7(r),new C7(r),new B7(r),new M7(r),new w7(r),new N7(r),new _7(r),new V7(r),new L7(r),new te(cl,r),new te(ll,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class MA extends xt{constructor(t){super(ke,t);d(this,"initialData");d(this,"id",V.PERSISTED_ENTITY);d(this,"version",1);d(this,"name",V.PERSISTED_ENTITY);d(this,"description",ke.description);d(this,"type",n.BuiltInBaseEntity);d(this,"abstract",ke.abstract);d(this,"static",ke.static);d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"errors",[]);d(this,"project");this.initialData=ke,this.project=t,this.id=ke.id,this.version=ke.version,this.name=ke.name,this.static=ke.static,this.abstract=ke.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 $7(r){const e=[new MA(r),new xt(ds,r),new xt(Mn,r),new xt(Wl,r),new xt(cs,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function F7(r){const e=[new jt(x,r),new jt(_n,r),new jt(X,r),new jt(Xe,r),new jt(Nn,r),new jt(hn,r),new jt(Wa,r),new jt(nl,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function U7(r){const e=[new te(fs,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function x7(r){const e=[new te(os,r),new te(ir,r),new te(ss,r),new te(Gi,r),new te($i,r),new te(vl,r)];e.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarations=e;const t=[new te(wl,r),new te(as,r),new te(Ol,r),new te(fT,r),new te(MT,r),new te(Dl,r)];return t.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarationsBodies=t,e}function j7(r){const e=[new Ur(Zl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function k7(r){const e=[new te(cr,r),new te(Qr,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}const qr={},Zo={};async function q7(r,e={}){const t={...YI};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 VA(r){const e=new _(r);return F7(e),$7(e),G7(e),U7(e),x7(e),j7(e),k7(e),e.getAllBuiltIn().forEach(i=>{e.builtInInstances[i.id]||(e.builtInInstances[i.id]=i,delete e.instances[i.id])}),e.initChildren(),e}async function J7(r,e={}){if(r.id&&qr[r.id])return qr[r.id];if(r.id&&Zo[r.id])return await Zo[r.id],qr[r.id];const t=q7(r,e);r.id&&(Zo[r.id]=t);const i=await t;if(i.data){const a=VA(i.data);return qr[r.id]=a,r.id&&delete Zo[r.id],a}return null}function W7(r){return qr[r.id]&&delete qr[r.id],null}const Y7="test_primitive_entities_export";c.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Ou,c.ActionDescriptorState=te,c.ActionInputMapState=B2,c.ActionOutputMapState=N2,c.AppendToListOperationInputIds=sh,c.AppendToListOperationOutputIds=oh,c.ArgumentDeclarationState=$r,c.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Iu,c.BUILT_IN_BASE_ENTITY_IDS=B,c.BUILT_IN_ENTITY_TYPES=Hr,c.BaseCanvasDraggableState=h2,c.BaseEntityNames=V,c.BaseState=y2,c.BaseValueDescriptorIds=tl,c.BreakStatementState=wi,c.BuiltInBaseEntityState=xt,c.CACHED_PROJECTS_BY_ID=qr,c.CALLABLE_ENTITIES_EXPLANATION=J2,c.CALLABLE_TYPES=wn,c.CALLER_ENTITIES_EXPLANATION=HP,c.CALLER_TYPES=yn,c.CALLS_UPDATE_EXPLANATION=Zn,c.COMPARISON_CONDITIONS=$b,c.CONDITIONS=uO,c.CUSTOM_ENTITY_OPERATIONS=Af,c.CallableEntityClass=m2,c.CallerEntityClass=bu,c.ChildEntityState=f2,c.ComparisonOperatorTypes=$e,c.ConditionState=Nr,c.ContinueStatementState=bt,c.CreateNewInputIds=Qh,c.CreateNewOutputIds=ef,c.CustomEntityState=kr,c.DRAGGABLE_CALLABLE_TYPES=Qo,c.DRAGGABLE_CALLER_TYPES=Wu,c.DRAGGABLE_ELEMENT_TYPES=el,c.DRAGGABLE_EXECUTABLE_TYPES=GA,c.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Xo,c.DataTypeCompatibilityTypes=Ft,c.DataTypeParentChildRelation=Ke,c.DataTypeState=Oi,c.ENTITIES_WITH_VALLUES_EXPLANATION=Lo,c.ENTITY_TYPES=$A,c.ENTITY_WITH_LOGIC_SCOPE_TYPES=ut,c.ENTITY_WITH_NAMES_TYPES=Yu,c.ENTITY_WITH_VALUE_TYPES=Ju,c.ENTRY_POINT_ENTITIES_EXPLANATION=Fa,c.ENTRY_POINT_TYPES=Ue,c.EVENT_TYPES=Yr,c.EXECUTABLE_TYPES=LA,c.EXECUTION_OPERATIONS=Xh,c.EntityError=Tr,c.EntityErrorSeverity=T,c.EntityGenerationError=b,c.EntityGenerationErrorCode=f,c.EntityInstanceErrorCode=M,c.EntityOperations=ce,c.EntityType=n,c.EntityWithLogicScopeClass=R2,c.EntityWithValueClass=b2,c.EntryPointEntityClass=T2,c.ExecutionOperations=le,c.ExecutionTerminationType=JP,c.FunctionCallState=xr,c.FunctionDeclarationState=Br,c.GLOBAL_EVENT_DECLARATIONS=pO,c.GetLastInListOperationInputIds=Hy,c.GetLastInListOperationOutputIds=zy,c.GlobalEventNames=pn,c.GlobalEventState=Si,c.HTTPOperations=nt,c.HTTP_OPERATIONS=sm,c.InputMapState=On,c.InstalledProjectState=Gr,c.InternalCallState=Ci,c.JoinListOperationInputIds=hy,c.JoinListOperationOutputIds=fy,c.LIST_OPERATIONS=Rh,c.ListOperations=W,c.LoopState=_r,c.LoopTypes=$,c.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Kn,c.NUMBER_OPERATIONS=Sp,c.NumberOperations=Te,c.OPERATION_DECLARATIONS=jA,c.OperationState=wr,c.OutputMapParentChildRelation=Wr,c.OutputMapState=Sn,c.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=Go,c.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=zn,c.PASS_THROUGH_CALLABLE_TYPES=je,c.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Au,c.ParallelExecutionOperation=wA,c.PassThroughCallableEntityClass=E2,c.PersistedEntity=MA,c.PersistedEntityMethods=Ct,c.PrimitiveEntityState=jt,c.PrimitiveTypes=P,c.PrimitiveValueState=Bi,c.ProjectState=_,c.PropertyState=Cr,c.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=W2,c.ReturnDeclarationState=_t,c.ReturnStatementState=Fr,c.STANDALONE_CONDITIONS=Cb,c.STRING_OPERATIONS=yy,c.ScopeCompatibilityType=zo,c.SearchState=Lr,c.SequentialExecutionOperation=NA,c.SequentialExecutionOperationInputIds=Fh,c.SequentialExecutionOperationOutputIds=Uh,c.SharedEntityErrorCode=S,c.SharedStateFunctionality=qP,c.SplitListOperationInputIds=By,c.SplitListOperationOutputIds=wy,c.StandaloneOperatorTypes=Mt,c.StringOperations=K,c.TERMINATION_TYPES=Ve,c.USER_MANAGED_ENTITY_TYPES=FA,c.UserManagedEntityStateFunctionality=p2,c.VALUE_READING_ENTITIES_EXPLANATION=Pu,c.VALUE_READING_TYPES=Bn,c.VALUE_WRITING_ENTITIES_EXPLANATION=zP,c.VALUE_WRITING_TYPES=xe,c.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=Du,c.VARIABLE_TYPES=Fe,c.ValueAutogenerationType=We,c.ValueDescriptorParentChildRelation=O,c.ValueDescriptorState=Ur,c.ValueReadingEntityClass=Ga,c.ValueWritingEntityClass=$a,c.VariableDeclarationState=Mr,c.VariableInputMapState=C2,c.VariableInstanceState=Vr,c.VariableOutputMapState=_2,c.WaitOperation=_A,c.WaitOperationInputIds=_h,c.WaitOperationOutputIds=Nh,c.appendToListOperation=Za,c.appendToListOperationElementToAppendArgument=fl,c.appendToListOperationElementToAppendArgumentParentRef=fh,c.appendToListOperationElementToAppendArgumentRef=dh,c.appendToListOperationError=bh,c.appendToListOperationErrorParentRef=Eh,c.appendToListOperationListArgument=hl,c.appendToListOperationListArgumentParentRef=hh,c.appendToListOperationListArgumentRef=lh,c.appendToListOperationListDataType=ch,c.appendToListOperationResultListDataType=yh,c.appendToListOperationResultListReturn=Th,c.appendToListOperationResultListReturnParentRef=mh,c.appendToListOperationResultListReturnRef=ph,c.appendToListOperationSecondListDataType=uh,c.asGenerationActionExample=dn,c.booleanPrototype=_n,c.capitalizeFirstLetter=So,c.checkAreCustomEntitiesCompatibleAsDataType=wP,c.checkAreDataTypesCompatible=Ut,c.checkArePropertiesCompatibleAsDataType=BP,c.checkIsBranchDependentButNotDirectlyOnBranch=xa,c.checkIsBranchDependentOnBranch=t7,c.checkIsCallableEntityReachable=qa,c.checkIsCanvasEntity=E7,c.checkIsDetachedBranch=PA,c.checkIsDetachedBranchShallow=ku,c.checkIsGlobalVariable=m7,c.checkIsGloballyDeclared=ju,c.checkIsMethod=SA,c.checkIsNestedScope=Ho,c.checkScopeCompatibility=ja,c.countedLoopActionDescriptor=os,c.countedLoopActionDescriptorDynamicReturnDeclaration=kT,c.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=jT,c.countedLoopActionDescriptorStringArgumentDeclaration=xT,c.countedLoopActionDescriptorStringArgumentDeclarationDataType=FT,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=GT,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=LT,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=$T,c.countedLoopActionDescriptorStringArgumentDeclarationParentRef=UT,c.countedLoopBodyActionDescriptor=wl,c.countedLoopBodyActionDescriptorAnyDynamicArgument=HT,c.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=YT,c.countedLoopBodyActionDescriptorAnyDynamicReturn=ZT,c.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=zT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Bl,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=JT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=qT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=WT,c.createCustomEntityFromJSONObject=jo,c.createEntityError=H,c.createNestedDataTypeForEntity=sA,c.createNewInstanceOperation=nr,c.createNewInstanceOperationEntityToInstanciateArgument=cf,c.createNewInstanceOperationEntityToInstanciateArgumentRef=sf,c.createNewInstanceOperationEntityToInstanciateDataType=of,c.createNewInstanceOperationError=yf,c.createNewInstanceOperationErrorParentRef=pf,c.createNewInstanceOperationNewEntityDataArgument=af,c.createNewInstanceOperationNewEntityDataArgumentDataType=rf,c.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=nf,c.createNewInstanceOperationNewEntityDataArgumentParentRef=tf,c.createNewInstanceOperationOutputEntityDeclaration=uf,c.createNewInstanceOperationOutputEntityDeclarationParentRef=df,c.createNewInstanceOperationRef=lf,c.createSemanticId=Ze,c.createStateFromGenerationTargetType=O7,c.createStateFromType=kt,c.createStateFromTypeAndSubscribe=g,c.cronJobBuiltInBaseEntity=Wl,c.cronJobBuiltInBaseEntityExpressionProperty=Pb,c.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=lO,c.cronJobBuiltInBaseEntityExpressionPropertyRef=Ib,c.cronJobBuiltInBaseEntityRef=Db,c.cronJobTriggeredFunctionDeclarationBlueprint=Jl,c.cronJobTriggeredFunctionDeclarationBlueprintParentRef=gb,c.customEntityToZodSchema=nR,c.dataTypeCompatibilityToErrorExplanation=rA,c.datePrototype=hn,c.dateValueAutogenerationSchema=sd,c.deletePersistedEntityMethod=ql,c.deletePersistedEntityMethodParentRef=QE,c.deleteRootProject=W7,c.endpointBuiltInBaseEntity=ds,c.endpointBuiltInBaseEntityRef=sE,c.endpointBuiltInBaseEntityRefFour=xE,c.endpointBuiltInBaseEntityRefThree=fE,c.endpointBuiltInBaseEntityRefTwo=uE,c.endpointBuiltInCorsProperty=oE,c.endpointBuiltInCorsPropertyDataType=aE,c.endpointBuiltInCorsPropertyDataTypeRef=rE,c.endpointBuiltInCorsPropertyRef=iE,c.endpointBuiltInMethodProperty=Nl,c.endpointBuiltInMethodPropertyDataType=hE,c.endpointBuiltInMethodPropertyDataTypeRef=pE,c.endpointBuiltInMethodPropertyRef=yE,c.endpointBuiltInPathProperty=_l,c.endpointBuiltInPathPropertyDataType=dE,c.endpointBuiltInPathPropertyDataTypeRef=lE,c.endpointBuiltInPathPropertyRef=cE,c.endpointPathParamsArgumentDeclaration=Vl,c.endpointPathParamsArgumentDeclarationRef=PE,c.endpointPathParamsVariableDataType=AE,c.endpointPathParamsVariableDataTypeRef=DE,c.endpointReachedTriggerActionDescriptor=xl,c.endpointReachedTriggerActionDescriptorRef=OE,c.endpointReachedTriggerActionDescriptorRefFour=BE,c.endpointReachedTriggerActionDescriptorRefThree=CE,c.endpointReachedTriggerActionDescriptorRefTwo=SE,c.endpointRequestBodyArgumentDeclaration=Gl,c.endpointRequestBodyArgumentDeclarationRef=bE,c.endpointRequestBodyVariableDataType=RE,c.endpointRequestHeadersArgumentDeclaration=Ml,c.endpointRequestHeadersArgumentDeclarationRef=TE,c.endpointRequestHeadersVariableDataType=EE,c.endpointRequestHeadersVariableDataTypeRef=mE,c.endpointRequestQueryParamsArgumentDeclaration=Ll,c.endpointRequestQueryParamsArgumentDeclarationRef=vE,c.endpointRequestQueryParamsVariableDataType=IE,c.endpointRequestQueryParamsVariableDataTypeRef=gE,c.endpointResponseBodyDataType=FE,c.endpointResponseBodyReturnDeclaration=Ul,c.endpointResponseBodyReturnDeclarationRef=$E,c.endpointResponseCodeDataType=_E,c.endpointResponseCodeReturnDeclaration=$l,c.endpointResponseCodeReturnDeclarationRef=wE,c.endpointResponseHeadersDataType=LE,c.endpointResponseHeadersDataTypeRef=ME,c.endpointResponseHeadersReturnDeclaration=Fl,c.endpointResponseHeadersReturnDeclarationRef=VE,c.endpointReturnStatementRef=NE,c.endpointReturnStatementRefThree=UE,c.endpointReturnStatementRefTwo=GE,c.enumOptionsProperty=Xu,c.enumOptionsPropertyDataType=Zu,c.enumOptionsPropertyDataTypeRef=Hu,c.enumOptionsPropertyRef=zu,c.enumPrototype=Nn,c.enumPrototypeRef=Ku,c.executionBuiltInEntity=Hl,c.executionBuiltInEntityAbortMethod=Yl,c.executionBuiltInEntityAbortMethodParentRef=Ab,c.filterOutDuplicateEntities=E,c.filterOutDuplicateErrors=l9,c.findEntityFromKeys=Bu,c.findReferenceToSelfInList=EA,c.findReferencesToSelfInProject=d7,c.flattenCalls=un,c.flattenCanvasAncestorsUntil=ko,c.flattenCustomEntityExtensionAndImplementationTypes=Fu,c.flattenCustomEntityExtensionTypes=Wo,c.flattenCustomEntityExtensions=Gu,c.flattenCustomEntityImplementations=$u,c.flattenCustomEntityImplementionTypes=Jo,c.flattenDerivedCanvasEntities=St,c.flattenDetachedBranch=OA,c.flattenElementCalls=Me,c.flattenElementCallsOnTheSameScope=c7,c.flattenProjectElements=TA,c.flattenRelatedCanvasElementsOnTheLeft=IA,c.flattenRelatedCanvasElementsOnTheRight=vA,c.flattenVariableReads=mA,c.flattenVariableWrites=fA,c.flattenVariables=re,c.fromZodParseToEntityGenerationErrors=Ru,c.generate=lC,c.generateActionExample=Y2,c.generateExecutionDataType=Y5,c.generateMutablePropertiesExplanation=No,c.generateRandomBoolean=SR,c.generateRandomDate=sR,c.generateRandomDateAfter=rR,c.generateRandomDateBefore=iR,c.generateRandomDateBetweenRange=aR,c.generateRandomNumber=IR,c.generateRandomNumberAfter=RR,c.generateRandomNumberBefore=gR,c.generateRandomNumberBetweenRange=vR,c.generateRandomText=OR,c.generateRandomTextAfter=DR,c.generateRandomTextBefore=PR,c.generateRandomTextBetweenRange=AR,c.generateUniqueUUID=bR,c.getAllActionDescriptorsForConditions=Uo,c.getAllActionDescriptorsForGlobalEvents=$o,c.getAllActionDescriptorsForLoops=Fo,c.getAllActionDescriptorsForOperations=K2,c.getAllGloballyDeclaredFunctionDeclarationsExplanation=eA,c.getBaseBuiltInEntities=Qn,c.getBaseSchemaBasedOnType=WP,c.getBuiltInEntityOwner=er,c.getCallableEntityReferenceSchema=ze,c.getCallableEntityTypeSchema=TD,c.getCallerEntityReferenceSchema=y3,c.getCallerEntityTypeSchema=p3,c.getCalls=Nu,c.getCanvasEntitiesDerivedFromInternalCalls=gA,c.getCanvasEntitiesDerivedFromWrites=_i,c.getCanvasEntityDerivedFromValueReadingEntity=Lu,c.getCanvasEntityReferenceSchema=B3,c.getCanvasEntityTypeSchema=C3,c.getChildrenEntityWithValues=r7,c.getColumnProperties=I7,c.getCommonAncestor=_u,c.getCommonChildren=oA,c.getCustomEntityExtends=Ja,c.getDatabaseEntities=g7,c.getDeclaration=Sr,c.getDeepestScope=BA,c.getDraggableCallableEntityReferenceSchema=bD,c.getDraggableCallableEntityTypeSchema=ED,c.getDraggableCallerEntityReferenceSchema=f3,c.getDraggableCallerEntityTypeSchema=h3,c.getDraggableExecutableEntityReferenceSchema=b3,c.getDraggableExecutableEntityTypeSchema=E3,c.getDraggablePassThroughCallableEntityReferenceSchema=Ro,c.getDraggablePassThroughCallableEntityTypeSchema=bo,c.getDraggablePlayableEntityReferenceSchema=D3,c.getDraggablePlayableEntityTypeSchema=I3,c.getEntityArgumentDeclarations=Vu,c.getEntityInputMaps=bA,c.getEntityOutputMaps=y7,c.getEntityReferenceSchema=S3,c.getEntityReturnDeclarations=RA,c.getEntityTypeSchema=O3,c.getEntityWithLogicScopeReferenceSchema=Dn,c.getEntityWithLogicScopeTypeSchema=R3,c.getEntityWithValueReferenceSchema=mD,c.getEntityWithValueTypeSchema=u3,c.getEntryPointEntityReferenceSchema=He,c.getEntryPointEntityTypeSchema=Wn,c.getEventEntityReferenceSchema=To,c.getEventEntityTypeSchema=mo,c.getExecutableEntityReferenceSchema=T3,c.getExecutableEntityTypeSchema=m3,c.getExtendedBuiltInEntity=h7,c.getExtendedCustomEntity=Uu,c.getGenerationTargetSchemaBasedOnType=YP,c.getHeadIfPartOfDetachedBranch=AA,c.getHighestScope=CA,c.getImplementedBuiltInEntity=f7,c.getIsInteractive=xu,c.getLastInListOperation=yl,c.getLastInListOperationError=ah,c.getLastInListOperationErrorParentRef=ih,c.getLastInListOperationInputListArgument=th,c.getLastInListOperationInputListArgumentParentRef=eh,c.getLastInListOperationInputListArgumentRef=Zy,c.getLastInListOperationInputListDataType=Ky,c.getLastInListOperationOutputElementDataType=Qy,c.getLastInListOperationOutputElementReturn=rh,c.getLastInListOperationOutputElementReturnParentRef=nh,c.getLastInListOperationOutputElementReturnRef=Xy,c.getLinkedEntitiesFromArgumentDeclaration=l7,c.getLowestPersistedEntityImplementation=DA,c.getParentCanvasEntities=Rt,c.getParentCanvasEntity=tt,c.getParentEntryPoint=n7,c.getPassThroughCallableEntityReferenceSchema=Ee,c.getPassThroughCallableEntityTypeSchema=Eo,c.getPeristedEntities=R7,c.getPlayableEntityReferenceSchema=v3,c.getPlayableEntityTypeSchema=g3,c.getProject=J7,c.getPrototypeByType=Yo,c.getReferenceEntityId=N,c.getReferencedEntitiesStateOrErrors=Vo,c.getReferencedEntityStateOrErrors=gu,c.getRelatedCanvasElementsOnTheLeft=jr,c.getRelatedCanvasElementsOnTheRight=Xn,c.getRootEntryPointScopeOwner=qu,c.getScopeOwner=gt,c.getTerminationReferenceSchema=A3,c.getTerminationTypeSchema=P3,c.getUsedArgFromDeclaration=u7,c.getUsedReturnFromDeclaration=p7,c.getValueReadingEntityReferenceSchema=fD,c.getValueReadingEntityTypeSchema=In,c.getValueWritingEntityReferenceSchema=d3,c.getValueWritingEntityTypeSchema=Oa,c.getVariableFromInputMapping=cA,c.getVariableFromReturnVariablePointer=pA,c.getVariableReferenceSchema=Jn,c.getVariableTypeSchema=vr,c.getVariablesFromArgumentDeclarations=qo,c.getVariablesFromInputMaps=dA,c.getVariablesFromOutputMapping=yA,c.getVariablesFromOutputMaps=hA,c.getVariablesFromReturnDeclarations=uA,c.getVariablesInSameOrHigherScope=uu,c.getWrites=Mu,c.groupCallsBasedOnParallelizableExecution=a7,c.handleAfterEntityImplementationSideEffects=aA,c.handleBeforeEntityImplementationSideEffects=iA,c.httpRequestBodyArgument=es,c.httpRequestBodyArgumentRef=Ff,c.httpRequestBodyDataType=Uf,c.httpRequestHeadersArgument=Qa,c.httpRequestHeadersArgumentRef=Gf,c.httpRequestHeadersDataType=$f,c.httpRequestMethodArgument=Ka,c.httpRequestMethodArgumentRef=Vf,c.httpRequestMethodDataType=Lf,c.httpRequestMethodDataTypeRef=Nf,c.httpRequestOperation=Vi,c.httpRequestOperationErrorValueDescriptor=gl,c.httpRequestOperationErrorValueDescriptorDatatype=am,c.httpRequestOperationErrorValueDescriptorRef=im,c.httpRequestOperationRef=em,c.httpRequestOperationRefEight=nm,c.httpRequestOperationRefFive=Xf,c.httpRequestOperationRefFour=Kf,c.httpRequestOperationRefNine=rm,c.httpRequestOperationRefSeven=tm,c.httpRequestOperationRefSix=Qf,c.httpRequestOperationRefThree=Zf,c.httpRequestOperationRefTwo=zf,c.httpRequestQueryParamsArgument=Rl,c.httpRequestQueryParamsArgumentRef=wf,c.httpRequestQueryParamsDataType=_f,c.httpRequestVariableURLArgument=Xa,c.httpRequestVariableURLArgumentRef=Cf,c.httpRequestVariableURLDataType=Bf,c.httpRequestVariableURLDataTypeRef=Of,c.httpResponseBodyReturnDataType=Hf,c.httpResponseBodyReturnDataTypeRef=Wf,c.httpResponseBodyReturnReturn=rs,c.httpResponseBodyReturnReturnRef=Yf,c.httpResponseCodeDataType=jf,c.httpResponseCodeReturn=ts,c.httpResponseCodeReturnRef=xf,c.httpResponseHeadersDataType=Jf,c.httpResponseHeadersDataTypeRef=kf,c.httpResponseHeadersReturn=ns,c.httpResponseHeadersReturnRef=qf,c.implement=xo,c.inferArgumentDeclarationDataType=_P,c.inferDataType=cn,c.inferInputMapDataType=lu,c.inferOutputMapDataType=du,c.inferPropertyDataType=VP,c.inferReturnDeclarationDataType=cu,c.inferValueDescriptorDataType=LP,c.inferVariableDeclarationDataType=MP,c.inferVariableInstanceDataType=NP,c.initProject=VA,c.iterateOverListActionDescriptorListArgumentDeclaration=Rm,c.iterateOverListActionDescriptorListArgumentDeclarationDataType=Em,c.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Tm,c.iterateOverListActionDescriptorListArgumentDeclarationParentRef=bm,c.iterateOverListLoopActionDescriptor=ir,c.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=vm,c.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=gm,c.iterateOverListLoopBodyActionDescriptor=as,c.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=wm,c.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Bm,c.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=Nm,c.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=_m,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=is,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Dm,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Im,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Pm,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Cm,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Om,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Am,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Sm,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=tT,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=Qm,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=Xm,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=eT,c.iterateOverObjectKeysLoopActionDescriptor=Gi,c.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=rT,c.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=nT,c.iterateOverObjectKeysLoopBodyActionDescriptor=fT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=pT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=uT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=hT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=yT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sl,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=aT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=iT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=sT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=dT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=lT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=oT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=cT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=RT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=ET,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=TT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=bT,c.iterateOverObjectValuesLoopActionDescriptor=$i,c.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=vT,c.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=gT,c.iterateOverObjectValuesLoopBodyActionDescriptor=MT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=wT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=BT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=NT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=_T,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Cl,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=DT,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=IT,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=PT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=CT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=OT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=AT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=ST,c.iterateOverStringActionDescriptorDynamicReturnDeclaration=Um,c.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Fm,c.iterateOverStringActionDescriptorStringArgumentDeclaration=$m,c.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Lm,c.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Vm,c.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Gm,c.iterateOverStringLoopActionDescriptor=ss,c.iterateOverStringLoopBodyActionDescriptor=Ol,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=Hm,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Ym,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Zm,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=zm,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Pl,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=jm,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=xm,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=km,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Al,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Jm,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=qm,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Wm,c.joinListOperation=dl,c.joinListOperationError=Cy,c.joinListOperationErrorParentRef=Sy,c.joinListOperationFirstListArgument=Iy,c.joinListOperationFirstListArgumentParentRef=vy,c.joinListOperationFirstListArgumentRef=my,c.joinListOperationFirstListDataType=Ty,c.joinListOperationResultListDataType=gy,c.joinListOperationResultListReturn=Oy,c.joinListOperationResultListReturnParentRef=Ay,c.joinListOperationResultListReturnRef=Ry,c.joinListOperationSecondListArgument=Py,c.joinListOperationSecondListArgumentParentRef=Dy,c.joinListOperationSecondListArgumentRef=Ey,c.joinListOperationSecondListDataType=by,c.joinListWithLastSeparator=U,c.joinStringsOperation=Mi,c.joinStringsOperationDynamicStringArgument=zp,c.joinStringsOperationDynamicStringArgumentParentRef=Hp,c.joinStringsOperationDynamicStringArgumentRef=Wp,c.joinStringsOperationDynamicStringDataType=Yp,c.joinStringsOperationError=Jp,c.joinStringsOperationErrorParentRef=qp,c.joinStringsOperationFirstStringArgument=Ha,c.joinStringsOperationFirstStringArgumentParentRef=Vp,c.joinStringsOperationFirstStringArgumentRef=Cp,c.joinStringsOperationFirstStringDataType=Bp,c.joinStringsOperationResultStringDataType=Mp,c.joinStringsOperationResultStringReturn=Ni,c.joinStringsOperationResultStringReturnParentRef=kp,c.joinStringsOperationResultStringReturnRef=Np,c.joinStringsOperationSecondStringArgument=za,c.joinStringsOperationSecondStringArgumentParentRef=jp,c.joinStringsOperationSecondStringArgumentRef=wp,c.joinStringsOperationSecondStringDataType=_p,c.joinStringsOperationSeparatorStringArgument=xp,c.joinStringsOperationSeparatorStringArgumentParentRef=Up,c.joinStringsOperationSeparatorStringArgumentRef=Lp,c.joinStringsOperationSeparatorStringDataType=Fp,c.joinStringsOperationSeparatorStringDataTypeDefaultValue=$p,c.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=Gp,c.jsonPrototype=nl,c.keyValueParamBuiltInBaseEntity=cs,c.keyValueParamBuiltInBaseEntityNameProperty=QT,c.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=qA,c.keyValueParamBuiltInBaseEntityNamePropertyParentRef=XT,c.keyValueParamBuiltInBaseEntityNamePropertyRef=KT,c.keyValueParamBuiltInBaseEntityValueProperty=nE,c.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=WA,c.keyValueParamBuiltInBaseEntityValuePropertyParentRef=tE,c.keyValueParamBuiltInBaseEntityValuePropertyRef=eE,c.lowercaseFirstLetter=CP,c.manualFlowActionDescriptorDeclarationArgumentDeclaration=Il,c.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=dm,c.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=cm,c.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=um,c.manualFlowLoopActionDescriptor=vl,c.manualFlowLoopActionDescriptorDynamicReturnDeclaration=lm,c.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=om,c.manualFlowLoopBodyActionDescriptor=Dl,c.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=ym,c.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=pm,c.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=fm,c.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=hm,c.mapActionDescriptorToTypeItRepresents=b7,c.mergeEntityErrorsList=c9,c.mergeListOfEntities=T7,c.methodDefaultValue=Mf,c.mockClientProject=YI,c.moreThanOrEqualCondition=Qr,c.moreThanOrEqualConditionLeftHandArgument=Nb,c.moreThanOrEqualConditionLeftHandArgumentDataType=wb,c.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=Bb,c.moreThanOrEqualConditionLeftHandArgumentParentRef=_b,c.moreThanOrEqualConditionRightHandArgument=Gb,c.moreThanOrEqualConditionRightHandArgumentDataType=Vb,c.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=Mb,c.moreThanOrEqualConditionRightHandArgumentParentRef=Lb,c.notEmptyCondition=cr,c.notEmptyConditionArgument=Sb,c.notEmptyConditionRef=Ob,c.nullPrototype=UA,c.numberAdditionOperation=Ya,c.numberAdditionOperationDynamicSummandArgument=up,c.numberAdditionOperationDynamicSummandArgumentType=dp,c.numberAdditionOperationDynamicSummandArgumentTypeParentRef=cp,c.numberAdditionOperationError=lp,c.numberAdditionOperationErrorParentRef=op,c.numberAdditionOperationFirstNumberArgument=rl,c.numberAdditionOperationFirstNumberArgumentRef=Qu,c.numberAdditionOperationFirstNumberDataType=ep,c.numberAdditionOperationRef=ap,c.numberAdditionOperationRefThree=al,c.numberAdditionOperationRefTwo=sp,c.numberAdditionOperationResultNumberDataType=ip,c.numberAdditionOperationResultNumberReturn=sl,c.numberAdditionOperationResultNumberReturnRef=rp,c.numberAdditionOperationSecondNumberArgument=il,c.numberAdditionOperationSecondNumberArgumentRef=tp,c.numberAdditionOperationSecondNumberDataType=np,c.numberPrototype=X,c.numberSubtractionOperation=ll,c.numberSubtractionOperationDynamicSubtrahendArgument=Op,c.numberSubtractionOperationDynamicSubtrahendArgumentType=Ap,c.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Pp,c.numberSubtractionOperationError=Dp,c.numberSubtractionOperationErrorParentRef=Ip,c.numberSubtractionOperationFirstNumberArgument=Ep,c.numberSubtractionOperationFirstNumberArgumentRef=pp,c.numberSubtractionOperationFirstNumberDataType=yp,c.numberSubtractionOperationRef=ol,c.numberSubtractionOperationRefThree=gp,c.numberSubtractionOperationRefTwo=bp,c.numberSubtractionOperationResultNumberDataType=Tp,c.numberSubtractionOperationResultNumberReturn=vp,c.numberSubtractionOperationResultNumberReturnRef=mp,c.numberSubtractionOperationSecondNumberArgument=Rp,c.numberSubtractionOperationSecondNumberArgumentRef=hp,c.numberSubtractionOperationSecondNumberDataType=fp,c.numberValueAutogenerationSchema=ad,c.parallelExecutionOperation=Wt,c.parallelExecutionOperationError=wh,c.parallelExecutionOperationErrorParentRef=Bh,c.parallelExecutionOperationListOfExecutionResultsDataType=Oh,c.parallelExecutionOperationListOfExecutionResultsReturn=Tl,c.parallelExecutionOperationListOfExecutionResultsReturnRef=Ah,c.parallelExecutionOperationListOfFunctionsArgument=ml,c.parallelExecutionOperationListOfFunctionsArgumentDatatype=Ph,c.parallelExecutionOperationListOfFunctionsArgumentRef=Dh,c.parallelExecutionOperationListOfFunctionsBlueprint=Ih,c.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=vh,c.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=gh,c.parallelExecutionOperationRef=Sh,c.parallelExecutionOperationRefThree=Ch,c.persistedBuiltInBaseEntity=ke,c.persistedBuiltInBaseEntityCreatedAtProperty=mb,c.persistedBuiltInBaseEntityCreatedAtPropertyDataType=hb,c.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=sO,c.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=fb,c.persistedBuiltInBaseEntityCreatedAtPropertyRef=yb,c.persistedBuiltInBaseEntityDatabaseProperty=xi,c.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=nO,c.persistedBuiltInBaseEntityDatabasePropertyParentRef=ib,c.persistedBuiltInBaseEntityDatabasePropertyRef=rb,c.persistedBuiltInBaseEntityDeletedAtProperty=pb,c.persistedBuiltInBaseEntityDeletedAtPropertyDataType=db,c.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=aO,c.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=ub,c.persistedBuiltInBaseEntityDeletedAtPropertyRef=cb,c.persistedBuiltInBaseEntityIdentifierProperty=lb,c.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=ab,c.persistedBuiltInBaseEntityIdentifierPropertyParentRef=ob,c.persistedBuiltInBaseEntityIdentifierPropertyRef=sb,c.persistedBuiltInBaseEntityUpdatedAtProperty=Rb,c.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=Eb,c.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=oO,c.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=bb,c.persistedBuiltInBaseEntityUpdatedAtPropertyRef=Tb,c.processOutputGlobalValueDescriptorDataType=Ub,c.processOutputGlobalValueDescriptorReturn=Zl,c.processOutputGlobalValueDescriptorReturnRef=Fb,c.projectPublicationCompletedGlobalEvent=fs,c.propertyToZodSchema=tR,c.relationalDatabaseBuiltInBaseEntity=Mn,c.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=kl,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=KE,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=XE,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=ZE,c.relationalDatabaseBuiltInBaseEntityDefaultProperty=jl,c.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=HE,c.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=zE,c.relationalDatabaseBuiltInBaseEntityIdentifierProperty=us,c.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=jE,c.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=kE,c.relationalDatabaseBuiltInBaseEntityMinSizeProperty=hs,c.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=WE,c.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=YE,c.relationalDatabaseBuiltInBaseEntityPasswordProperty=ys,c.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=KA,c.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=JE,c.relationalDatabaseBuiltInBaseEntityRef=Kr,c.relationalDatabaseBuiltInBaseEntityUsernameProperty=ps,c.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=zA,c.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=qE,c.resolveActionDescriptorName=kP,c.resolveBaseEntityName=$P,c.resolveBuiltInBaseEntityDataTypeLabel=FP,c.resolveConditionOperatorLabel=wo,c.resolveCustomEntityDataTypeLabel=UP,c.resolveDataType=Co,c.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=wu,c.resolveDataTypeLabel=pu,c.resolveEntityDataTypeLabel=K5,c.resolveEntityName=C,c.resolveFirstCallsSecond=s7,c.resolveFirstWritesSecond=o7,c.resolvePrimaryKeyProperty=v7,c.resolvePrimitiveEntityName=jP,c.resolveSearchName=xP,c.resolveVariableScope=H5,c.sequentialExecutionOperation=mn,c.sequentialExecutionOperationError=Kh,c.sequentialExecutionOperationErrorParentRef=Zh,c.sequentialExecutionOperationListOfExecutionResultsDataType=Yh,c.sequentialExecutionOperationListOfExecutionResultsReturn=bl,c.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=zh,c.sequentialExecutionOperationListOfExecutionResultsReturnRef=Wh,c.sequentialExecutionOperationListOfFunctionsArgument=El,c.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Jh,c.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Hh,c.sequentialExecutionOperationListOfFunctionsArgumentRef=qh,c.sequentialExecutionOperationListOfFunctionsBlueprint=kh,c.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=jh,c.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=xh,c.softDeletePersistedEntityMethod=tb,c.softDeletePersistedEntityMethodParentRef=eb,c.sortCallsBasedOnExecutionDependencies=lA,c.sortChildrenEntitiesBasedOnExecutionDependencies=i7,c.splitListOperation=pl,c.splitListOperationError=Yy,c.splitListOperationErrorParentRef=Wy,c.splitListOperationFirstOutputListDataType=Ly,c.splitListOperationFirstOutputListReturn=jy,c.splitListOperationFirstOutputListReturnParentRef=xy,c.splitListOperationFirstOutputListReturnRef=ul,c.splitListOperationInputListArgument=$y,c.splitListOperationInputListArgumentParentRef=Gy,c.splitListOperationInputListArgumentRef=_y,c.splitListOperationInputListDataType=Ny,c.splitListOperationSecondOutputListDataType=ky,c.splitListOperationSecondOutputListReturn=Jy,c.splitListOperationSecondOutputListReturnParentRef=qy,c.splitListOperationSplitIndexArgument=Uy,c.splitListOperationSplitIndexArgumentParentRef=Fy,c.splitListOperationSplitIndexArgumentRef=My,c.splitListOperationSplitIndexDataType=Vy,c.splitStringOperation=cl,c.splitStringOperationError=py,c.splitStringOperationErrorParentRef=uy,c.splitStringOperationFirstPartResultStringDataType=ty,c.splitStringOperationFirstPartResultStringReturn=dy,c.splitStringOperationFirstPartResultStringReturnParentRef=cy,c.splitStringOperationFirstPartResultStringReturnRef=ey,c.splitStringOperationIndexArgument=oy,c.splitStringOperationIndexArgumentParentRef=sy,c.splitStringOperationIndexArgumentRef=Xp,c.splitStringOperationIndexDataType=Qp,c.splitStringOperationSecondPartResultStringDataType=ry,c.splitStringOperationSecondPartResultStringReturn=xA,c.splitStringOperationSecondPartResultStringReturnParentRef=ly,c.splitStringOperationSecondPartResultStringReturnRef=ny,c.splitStringOperationStringArgument=ay,c.splitStringOperationStringArgumentParentRef=iy,c.splitStringOperationStringArgumentRef=Zp,c.splitStringOperationStringDataType=Kp,c.stringPrototype=x,c.stringValueAutogenerationSchema=id,c.suggestNewIdForEntity=Eu,c.test_primitive_entities_export=Y7,c.toCamelCase=z5,c.toEntityState=Nt,c.toKebabCase=GP,c.toLowerCaseKebabCase=Bo,c.toPascalCase=Z5,c.untypedObjectPrototype=Xe,c.updateErrorsList=ie,c.updateValueReader=ka,c.urlDefaultValue=Sf,c.uuidPrototype=Wa,c.validateArgumentDeclarationName=mu,c.validateCalledByErrorIdInAction=z2,c.validateCalledByIdInAction=H2,c.validateCallers=QP,c.validateConditionEntityDeclaration=X2,c.validateCustomEntityName=_o,c.validateDataOperation=rr,c.validateDataOperationDataToValidateArgument=Tf,c.validateDataOperationDataToValidateArgumentParentRef=mf,c.validateDataOperationDataToValidateArgumentRef=hf,c.validateDataOperationDataToValidateDataType=ff,c.validateDataOperationEntityToMatchTypeArgument=gf,c.validateDataOperationEntityToMatchTypeArgumentParentRef=Rf,c.validateDataOperationEntityToMatchTypeArgumentRef=Ef,c.validateDataOperationEntityToMatchTypeDataType=bf,c.validateDataOperationError=Pf,c.validateDataOperationErrorParentRef=Df,c.validateDataOperationOutputEntityDeclaration=If,c.validateDataOperationOutputEntityDeclarationParentRef=vf,c.validateEntryCaller=XP,c.validateErrorCaller=KP,c.validateFunctionCallDeclaration=tA,c.validateFunctionDeclarationName=yu,c.validateGeneratedEntityParentIsNotBuiltInEntity=q2,c.validateGeneration=j2,c.validateGenerationTarget=Le,c.validateGenerationUpdate=k2,c.validateLoopEntityDeclaration=Q2,c.validateName=X5,c.validateOperationEntityDeclaration=nA,c.validatePropertyName=fu,c.validateReachability=Cn,c.validateReadsValueInActionPayload=Z2,c.validateReferenceObject=Mo,c.validateReferenceToOne=vu,c.validateReferences=Ye,c.validateReturnDeclarationName=Tu,c.validateSuccessCaller=ZP,c.validateValueReaderGenerationUpdate=Ua,c.validateValueWritter=Su,c.validateVariableDeclarationName=hu,c.validateVariableInternalCallUse=Cu,c.valueAutogenerationCurrentDateAndTimeSchema=zI,c.valueAutogenerationGenericSchema=eo,c.valueAutogenerationOptions=od,c.valueAutogenerationOptionsSchema=HI,c.valueAutogenerationRandomBooleanSchema=rd,c.valueAutogenerationRandomDateBetweenSchema=iD,c.valueAutogenerationRandomDateFromSchema=nD,c.valueAutogenerationRandomDateSchema=ro,c.valueAutogenerationRandomDateUntilSchema=rD,c.valueAutogenerationRandomNumberBetweenSchema=XI,c.valueAutogenerationRandomNumberFromSchema=ZI,c.valueAutogenerationRandomNumberSchema=to,c.valueAutogenerationRandomNumberUntilSchema=KI,c.valueAutogenerationRandomSchema=Ra,c.valueAutogenerationRandomTextBetweenSchema=tD,c.valueAutogenerationRandomTextFromSchema=QI,c.valueAutogenerationRandomTextSchema=no,c.valueAutogenerationRandomTextUntilSchema=eD,c.valueAutogenerationRangeValueTypesSchema=ba,c.valueAutogenerationUniqueSchema=nd,c.waitOperation=pt,c.waitOperationMillisecondsNumberArgument=tr,c.waitOperationMillisecondsNumberArgumentRef=Mh,c.waitOperationMillisecondsNumberDataType=Vh,c.waitOperationOperationError=$h,c.waitOperationOperationErrorParentRef=Gh,c.waitOperationRef=Lh,Object.defineProperty(c,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 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=>{Z3(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)}),K3(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=z3(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,D;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=kt(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const y=(R=this.properties)==null?void 0:R.map((A,I)=>A.clone(p,l+"-property-"+I+"-id",i));p.properties=y;const h=(v=this.methods)==null?void 0:v.map((A,I)=>A.clone(p,l+"-method-"+I+"-id",i));p.methods=h;const m=(D=this.abstractMethods)==null?void 0:D.map((A,I)=>A.clone(p,l+"-abstract-method-"+I+"-id",i));return p.abstractMethods=m,p}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return xo(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=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),y=cn(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 D=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),A=cn(D),I=A==null?void 0:A.clone(o,o.id+"--data-type",!0);I&&o.setDataType(I)}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,index:s.index,implements:null,dataType:null,parent:this.toReference()},p=g(l,this.project);p.setParent(this),p.initChildren();const h=Sr(s.parent).getMasterInputWithValueWritterFromAllInstances(s),m=cn(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)}};d(Ne,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),d(Ne,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),d(Ne,"BASE_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,...Ne.INMUTABLE_BASE_PROPERTIES]),d(Ne,"MUTABLE_META_PROPERTIES",[...Ne.MUTABLE_BASE_PROPERTIES,"x","y"]),d(Ne,"INMUTABLE_META_PROPERTIES",[...Ne.INMUTABLE_BASE_PROPERTIES]),d(Ne,"META_PROPERTIES",[...Ne.MUTABLE_META_PROPERTIES,...Ne.INMUTABLE_META_PROPERTIES]),d(Ne,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),d(Ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),d(Ne,"UPSTREAM_PROPERTIES",[...Ne.MUTABLE_UPSTREAM_PROPERTIES,...Ne.INMUTABLE_UPSTREAM_PROPERTIES]),d(Ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),d(Ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(Ne,"DOWNSTREAM_PROPERTIES",[...Ne.MUTABLE_DOWNSTREAM_PROPERTIES,...Ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(Ne,"PROPERTIES",[...Ne.META_PROPERTIES,...Ne.UPSTREAM_PROPERTIES,...Ne.DOWNSTREAM_PROPERTIES]);let kr=Ne;function A7(r){const e=A9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class xt{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.BuiltInBaseEntity);d(this,"abstract",!1);d(this,"static");d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"interactive",!1);d(this,"errors",[]);d(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=A7(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 xo(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 O7(r){const e=T9(),t=r.toJSON();e.safeParse(t).success;const a=[];return ie(r.errors,a)}class jt{constructor(e,t){d(this,"initialData");d(this,"id");d(this,"version");d(this,"name");d(this,"description",null);d(this,"type",n.PrimitiveEntity);d(this,"static");d(this,"abstract");d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"errors",[]);d(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=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 jt(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 kt(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 Bi(r,e);case n.CustomEntity:return t||new kr(r,e);case n.PrimitiveEntity:return t||new jt(r,e);case n.FunctionDeclaration:return t||new Br(r,e);case n.GlobalEvent:return t||new Si(r,e);case n.DataType:return t||new Oi(r,e);case n.Property:return t||new Cr(r,e);case n.FunctionCall:return t||new xr(r,e);case n.Condition:return t||new Nr(r,e);case n.Operation:return t||new wr(r,e);case n.VariableDeclaration:return t||new Mr(r,e);case n.VariableInstance:return t||new Vr(r,e);case n.OutputMap:return t||new Sn(r,e);case n.ReturnDeclaration:return t||new _t(r,e);case n.ArgumentDeclaration:return t||new $r(r,e);case n.InputMap:return t||new On(r,e);case n.Project:return t||new _(r);case n.InstalledProject:return t||new Gr(r,e);case n.ActionDescriptor:return t||new te(r,e);case n.ReturnStatement:return t||new Fr(r,e);case n.Loop:return t||new _r(r,e);case n.Search:return t||new Lr(r,e);case n.ValueDescriptor:return t||new Ur(r,e);case n.BuiltInBaseEntity:return t||new xt(r,e);case n.InternalCall:return t||new Ci(r,e);case n.ContinueStatement:return t||new bt(r,e);case n.BreakStatement:return t||new wi(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=kt(r,e);return t.subscribe(),t}function S7(r,e){if(!r)throw new Error("Entity is null");switch(r.type){case n.PrimitiveValue:return Bi.fromGenerationTarget(r,e);case n.CustomEntity:return kr.fromGenerationTarget(r,e);case n.FunctionDeclaration:return Br.fromGenerationTarget(r,e);case n.GlobalEvent:return Si.fromGenerationTarget(r,e);case n.DataType:return Oi.fromGenerationTarget(r,e);case n.Property:return Cr.fromGenerationTarget(r,e);case n.FunctionCall:return xr.fromGenerationTarget(r,e);case n.Condition:return Nr.fromGenerationTarget(r,e);case n.Operation:return wr.fromGenerationTarget(r,e);case n.VariableDeclaration:return Mr.fromGenerationTarget(r,e);case n.VariableInstance:return Vr.fromGenerationTarget(r,e);case n.OutputMap:return Sn.fromGenerationTarget(r,e);case n.ReturnDeclaration:return _t.fromGenerationTarget(r,e);case n.ArgumentDeclaration:return $r.fromGenerationTarget(r,e);case n.InputMap:return On.fromGenerationTarget(r,e);case n.InstalledProject:return Gr.fromGenerationTarget(r,e);case n.ReturnStatement:return Fr.fromGenerationTarget(r,e);case n.Loop:return _r.fromGenerationTarget(r,e);case n.Search:return Lr.fromGenerationTarget(r,e);case n.ActionDescriptor:return te.fromGenerationTarget(r,e);case n.ValueDescriptor:return Ur.fromGenerationTarget(r,e);case n.InternalCall:return Ci.fromGenerationTarget(r,e);case n.ContinueStatement:return bt.fromGenerationTarget(r,e);case n.BreakStatement:return wi.fromGenerationTarget(r,e);default:throw new Error("Invalid entity type: "+r.type)}}const ee=class ee{constructor(e){d(this,"initialData");d(this,"id");d(this,"version");d(this,"type",n.Project);d(this,"name",null);d(this,"description",null);d(this,"x");d(this,"y");d(this,"entities",[]);d(this,"projects",[]);d(this,"functions",[]);d(this,"events",[]);d(this,"variableDeclarations",[]);d(this,"variableInstances",[]);d(this,"conditions",[]);d(this,"operations",[]);d(this,"functionCalls",[]);d(this,"loops",[]);d(this,"searches",[]);d(this,"primitives",[]);d(this,"builtInBaseEntities",[]);d(this,"operationDeclarations",[]);d(this,"globalEventActionDescriptors",[]);d(this,"loopDeclarations",[]);d(this,"loopDeclarationsBodies",[]);d(this,"conditionDeclarations",[]);d(this,"valueDescriptors",[]);d(this,"dataTypes",[]);d(this,"project");d(this,"instances",{});d(this,"builtInInstances",{});d(this,"errors",[]);d(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=Us==null?void 0:Us()),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=k3(),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===M.PERSISTED_ENTITY)||null}};d(ee,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),d(ee,"MUTABLE_BASE_PROPERTIES",["name","description"]),d(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),d(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),d(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),d(ee,"INMUTABLE_META_PROPERTIES",[...ee.INMUTABLE_BASE_PROPERTIES]),d(ee,"META_PROPERTIES",[...ee.MUTABLE_META_PROPERTIES,...ee.INMUTABLE_META_PROPERTIES]),d(ee,"MUTABLE_UPSTREAM_PROPERTIES",[]),d(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),d(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),d(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),d(ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),d(ee,"DOWNSTREAM_PROPERTIES",[...ee.MUTABLE_DOWNSTREAM_PROPERTIES,...ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),d(ee,"PROPERTIES",[...ee.META_PROPERTIES,...ee.UPSTREAM_PROPERTIES,...ee.DOWNSTREAM_PROPERTIES]);let _=ee;class wA extends te{constructor(t){super(Wt,t);d(this,"id",le.Parallel);d(this,"name",le.Parallel);d(this,"description","Execute a list of actions one after the other");d(this,"version",1);d(this,"autoexecutable",!0);d(this,"initialData",Wt);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(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 _A extends te{constructor(t){super(pt,t);d(this,"id",pt.id);d(this,"name",pt.name);d(this,"description",pt.description);d(this,"version",pt.version);d(this,"autoexecutable",!1);d(this,"initialData",pt);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(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 NA extends te{constructor(t){super(mn,t);d(this,"id",le.Sequential);d(this,"name",le.Sequential);d(this,"description","Execute a list of actions one after the other");d(this,"version",1);d(this,"autoexecutable",!0);d(this,"initialData",mn);d(this,"type",n.ActionDescriptor);d(this,"inputs",[]);d(this,"outputs",[]);d(this,"error",null);d(this,"project");this.project=t,this.inputs=mn.inputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.outputs=mn.outputs.map(i=>{const a=g(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=mn.error?g(mn.error,this.project):null}}class C7 extends te{constructor(e){super(Li,e)}}class B7 extends te{constructor(e){super(nr,e)}}class w7 extends te{constructor(t){super(rr,t);d(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 _7 extends te{constructor(e){super(dl,e)}}class N7 extends te{constructor(e){super(pl,e)}}class M7 extends te{constructor(e){super(yl,e)}}class V7 extends te{constructor(e){super(Za,e)}}class L7 extends te{constructor(e){super(Ya,e)}}class G7 extends te{constructor(e){super(Vi,e)}}function $7(r){const e=[new NA(r),new wA(r),new _A(r),new C7(r),new B7(r),new w7(r),new V7(r),new _7(r),new M7(r),new N7(r),new L7(r),new G7(r),new te(cl,r),new te(ll,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}class MA extends xt{constructor(t){super(ke,t);d(this,"initialData");d(this,"id",M.PERSISTED_ENTITY);d(this,"version",1);d(this,"name",M.PERSISTED_ENTITY);d(this,"description",ke.description);d(this,"type",n.BuiltInBaseEntity);d(this,"abstract",ke.abstract);d(this,"static",ke.static);d(this,"properties",[]);d(this,"methods",[]);d(this,"abstractMethods",[]);d(this,"extends",[]);d(this,"errors",[]);d(this,"project");this.initialData=ke,this.project=t,this.id=ke.id,this.version=ke.version,this.name=ke.name,this.static=ke.static,this.abstract=ke.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 F7(r){const e=[new MA(r),new xt(ds,r),new xt(Mn,r),new xt(Wl,r),new xt(cs,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.builtInBaseEntities=e,e}function U7(r){const e=[new jt(x,r),new jt(_n,r),new jt(X,r),new jt(Xe,r),new jt(Nn,r),new jt(hn,r),new jt(Wa,r),new jt(nl,r)];return e.forEach(t=>{r.subscribeBuiltInInstance(t)}),r.primitives=e,e}function x7(r){const e=[new te(fs,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.globalEventActionDescriptors=e,e}function j7(r){const e=[new te(os,r),new te(ir,r),new te(ss,r),new te($i,r),new te(Fi,r),new te(vl,r)];e.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarations=e;const t=[new te(wl,r),new te(as,r),new te(Ol,r),new te(mT,r),new te(VT,r),new te(Dl,r)];return t.forEach(i=>{i.initChildren(),r.subscribeBuiltInInstance(i)}),r.loopDeclarationsBodies=t,e}function k7(r){const e=[new Ur(Zl,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.valueDescriptors=e,e}function q7(r){const e=[new te(cr,r),new te(Qr,r)];return e.forEach(t=>{t.initChildren(),r.subscribeBuiltInInstance(t)}),r.operationDeclarations=e,e}const qr={},Zo={};async function J7(r,e={}){const t={...HI};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 VA(r){const e=new _(r);return U7(e),F7(e),$7(e),x7(e),j7(e),k7(e),q7(e),e.getAllBuiltIn().forEach(i=>{e.builtInInstances[i.id]||(e.builtInInstances[i.id]=i,delete e.instances[i.id])}),e.initChildren(),e}async function W7(r,e={}){if(r.id&&qr[r.id])return qr[r.id];if(r.id&&Zo[r.id])return await Zo[r.id],qr[r.id];const t=J7(r,e);r.id&&(Zo[r.id]=t);const i=await t;if(i.data){const a=VA(i.data);return qr[r.id]=a,r.id&&delete Zo[r.id],a}return null}function Y7(r){return qr[r.id]&&delete qr[r.id],null}const H7="test_primitive_entities_export";c.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Ou,c.ActionDescriptorState=te,c.ActionInputMapState=B2,c.ActionOutputMapState=N2,c.AppendToListOperationInputIds=oh,c.AppendToListOperationOutputIds=lh,c.ArgumentDeclarationState=$r,c.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Iu,c.BUILT_IN_BASE_ENTITY_IDS=B,c.BUILT_IN_ENTITY_TYPES=Hr,c.BaseCanvasDraggableState=h2,c.BaseEntityNames=M,c.BaseState=y2,c.BaseValueDescriptorIds=tl,c.BreakStatementState=wi,c.BuiltInBaseEntityState=xt,c.CACHED_PROJECTS_BY_ID=qr,c.CALLABLE_ENTITIES_EXPLANATION=J2,c.CALLABLE_TYPES=wn,c.CALLER_ENTITIES_EXPLANATION=zP,c.CALLER_TYPES=yn,c.CALLS_UPDATE_EXPLANATION=Zn,c.COMPARISON_CONDITIONS=Fb,c.CONDITIONS=uO,c.CUSTOM_ENTITY_OPERATIONS=Of,c.CallableEntityClass=m2,c.CallerEntityClass=bu,c.ChildEntityState=f2,c.ComparisonOperatorTypes=$e,c.ConditionState=Nr,c.ContinueStatementState=bt,c.CreateNewInputIds=ef,c.CreateNewOutputIds=tf,c.CustomEntityState=kr,c.DRAGGABLE_CALLABLE_TYPES=Qo,c.DRAGGABLE_CALLER_TYPES=Yu,c.DRAGGABLE_ELEMENT_TYPES=el,c.DRAGGABLE_EXECUTABLE_TYPES=GA,c.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Xo,c.DataTypeCompatibilityTypes=Ft,c.DataTypeParentChildRelation=Ke,c.DataTypeState=Oi,c.ENTITIES_WITH_VALLUES_EXPLANATION=Lo,c.ENTITY_TYPES=$A,c.ENTITY_WITH_LOGIC_SCOPE_TYPES=ut,c.ENTITY_WITH_NAMES_TYPES=Hu,c.ENTITY_WITH_VALUE_TYPES=Wu,c.ENTRY_POINT_ENTITIES_EXPLANATION=Ua,c.ENTRY_POINT_TYPES=Ue,c.EVENT_TYPES=Yr,c.EXECUTABLE_TYPES=LA,c.EXECUTION_OPERATIONS=Qh,c.EntityError=Tr,c.EntityErrorSeverity=T,c.EntityGenerationError=b,c.EntityGenerationErrorCode=f,c.EntityInstanceErrorCode=V,c.EntityOperations=ce,c.EntityType=n,c.EntityWithLogicScopeClass=R2,c.EntityWithValueClass=b2,c.EntryPointEntityClass=T2,c.ExecutionOperations=le,c.ExecutionTerminationType=WP,c.FunctionCallState=xr,c.FunctionDeclarationState=Br,c.GLOBAL_EVENT_DECLARATIONS=pO,c.GetLastInListOperationInputIds=zy,c.GetLastInListOperationOutputIds=Zy,c.GlobalEventNames=pn,c.GlobalEventState=Si,c.HTTPOperations=nt,c.HTTP_OPERATIONS=om,c.InputMapState=On,c.InstalledProjectState=Gr,c.InternalCallState=Ci,c.JoinListOperationInputIds=fy,c.JoinListOperationOutputIds=my,c.LIST_OPERATIONS=gh,c.ListOperations=W,c.LoopState=_r,c.LoopTypes=$,c.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Kn,c.NUMBER_OPERATIONS=Cp,c.NumberOperations=Te,c.OPERATION_DECLARATIONS=jA,c.OperationState=wr,c.OutputMapParentChildRelation=Wr,c.OutputMapState=Sn,c.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=Go,c.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=zn,c.PASS_THROUGH_CALLABLE_TYPES=je,c.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=Au,c.ParallelExecutionOperation=wA,c.PassThroughCallableEntityClass=E2,c.PersistedEntity=MA,c.PersistedEntityMethods=Ct,c.PrimitiveEntityState=jt,c.PrimitiveTypes=P,c.PrimitiveValueState=Bi,c.ProjectState=_,c.PropertyState=Cr,c.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=W2,c.ReturnDeclarationState=_t,c.ReturnStatementState=Fr,c.STANDALONE_CONDITIONS=Bb,c.STRING_OPERATIONS=hy,c.ScopeCompatibilityType=zo,c.SearchState=Lr,c.SequentialExecutionOperation=NA,c.SequentialExecutionOperationInputIds=Uh,c.SequentialExecutionOperationOutputIds=xh,c.SharedEntityErrorCode=S,c.SharedStateFunctionality=JP,c.SplitListOperationInputIds=wy,c.SplitListOperationOutputIds=_y,c.StandaloneOperatorTypes=Mt,c.StringOperations=K,c.TERMINATION_TYPES=Ve,c.USER_MANAGED_ENTITY_TYPES=FA,c.UserManagedEntityStateFunctionality=p2,c.VALUE_READING_ENTITIES_EXPLANATION=Pu,c.VALUE_READING_TYPES=Bn,c.VALUE_WRITING_ENTITIES_EXPLANATION=ZP,c.VALUE_WRITING_TYPES=xe,c.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=Du,c.VARIABLE_TYPES=Fe,c.ValueAutogenerationType=We,c.ValueDescriptorParentChildRelation=O,c.ValueDescriptorState=Ur,c.ValueReadingEntityClass=$a,c.ValueWritingEntityClass=Fa,c.VariableDeclarationState=Mr,c.VariableInputMapState=C2,c.VariableInstanceState=Vr,c.VariableOutputMapState=_2,c.WaitOperation=_A,c.WaitOperationInputIds=Nh,c.WaitOperationOutputIds=Mh,c.appendToListOperation=Za,c.appendToListOperationElementToAppendArgument=fl,c.appendToListOperationElementToAppendArgumentParentRef=mh,c.appendToListOperationElementToAppendArgumentRef=uh,c.appendToListOperationError=Rh,c.appendToListOperationErrorParentRef=bh,c.appendToListOperationListArgument=hl,c.appendToListOperationListArgumentParentRef=fh,c.appendToListOperationListArgumentRef=ch,c.appendToListOperationListDataType=dh,c.appendToListOperationResultListDataType=hh,c.appendToListOperationResultListReturn=Eh,c.appendToListOperationResultListReturnParentRef=Th,c.appendToListOperationResultListReturnRef=yh,c.appendToListOperationSecondListDataType=ph,c.asGenerationActionExample=dn,c.booleanPrototype=_n,c.capitalizeFirstLetter=So,c.checkAreCustomEntitiesCompatibleAsDataType=_P,c.checkAreDataTypesCompatible=Ut,c.checkArePropertiesCompatibleAsDataType=wP,c.checkIsBranchDependentButNotDirectlyOnBranch=ja,c.checkIsBranchDependentOnBranch=t7,c.checkIsCallableEntityReachable=Ja,c.checkIsCanvasEntity=E7,c.checkIsDetachedBranch=PA,c.checkIsDetachedBranchShallow=qu,c.checkIsGlobalVariable=m7,c.checkIsGloballyDeclared=ku,c.checkIsMethod=SA,c.checkIsNestedScope=Ho,c.checkScopeCompatibility=ka,c.countedLoopActionDescriptor=os,c.countedLoopActionDescriptorDynamicReturnDeclaration=qT,c.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=kT,c.countedLoopActionDescriptorStringArgumentDeclaration=jT,c.countedLoopActionDescriptorStringArgumentDeclarationDataType=UT,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=$T,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=GT,c.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=FT,c.countedLoopActionDescriptorStringArgumentDeclarationParentRef=xT,c.countedLoopBodyActionDescriptor=wl,c.countedLoopBodyActionDescriptorAnyDynamicArgument=zT,c.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=HT,c.countedLoopBodyActionDescriptorAnyDynamicReturn=KT,c.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=ZT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Bl,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=WT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=JT,c.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=YT,c.createCustomEntityFromJSONObject=jo,c.createEntityError=H,c.createNestedDataTypeForEntity=oA,c.createNewInstanceOperation=nr,c.createNewInstanceOperationEntityToInstanciateArgument=df,c.createNewInstanceOperationEntityToInstanciateArgumentRef=of,c.createNewInstanceOperationEntityToInstanciateDataType=lf,c.createNewInstanceOperationError=hf,c.createNewInstanceOperationErrorParentRef=yf,c.createNewInstanceOperationNewEntityDataArgument=sf,c.createNewInstanceOperationNewEntityDataArgumentDataType=af,c.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=rf,c.createNewInstanceOperationNewEntityDataArgumentParentRef=nf,c.createNewInstanceOperationOutputEntityDeclaration=pf,c.createNewInstanceOperationOutputEntityDeclarationParentRef=uf,c.createNewInstanceOperationRef=cf,c.createSemanticId=Ze,c.createStateFromGenerationTargetType=S7,c.createStateFromType=kt,c.createStateFromTypeAndSubscribe=g,c.cronJobBuiltInBaseEntity=Wl,c.cronJobBuiltInBaseEntityExpressionProperty=Ab,c.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=lO,c.cronJobBuiltInBaseEntityExpressionPropertyRef=Db,c.cronJobBuiltInBaseEntityRef=Pb,c.cronJobTriggeredFunctionDeclarationBlueprint=Jl,c.cronJobTriggeredFunctionDeclarationBlueprintParentRef=vb,c.customEntityToZodSchema=rR,c.dataTypeCompatibilityToErrorExplanation=iA,c.datePrototype=hn,c.dateValueAutogenerationSchema=sd,c.deletePersistedEntityMethod=ql,c.deletePersistedEntityMethodParentRef=eb,c.deleteRootProject=Y7,c.endpointBuiltInBaseEntity=ds,c.endpointBuiltInBaseEntityRef=oE,c.endpointBuiltInBaseEntityRefFour=jE,c.endpointBuiltInBaseEntityRefThree=mE,c.endpointBuiltInBaseEntityRefTwo=pE,c.endpointBuiltInCorsProperty=lE,c.endpointBuiltInCorsPropertyDataType=sE,c.endpointBuiltInCorsPropertyDataTypeRef=iE,c.endpointBuiltInCorsPropertyRef=aE,c.endpointBuiltInMethodProperty=Nl,c.endpointBuiltInMethodPropertyDataType=fE,c.endpointBuiltInMethodPropertyDataTypeRef=yE,c.endpointBuiltInMethodPropertyRef=hE,c.endpointBuiltInPathProperty=_l,c.endpointBuiltInPathPropertyDataType=uE,c.endpointBuiltInPathPropertyDataTypeRef=cE,c.endpointBuiltInPathPropertyRef=dE,c.endpointPathParamsArgumentDeclaration=Vl,c.endpointPathParamsArgumentDeclarationRef=AE,c.endpointPathParamsVariableDataType=OE,c.endpointPathParamsVariableDataTypeRef=PE,c.endpointReachedTriggerActionDescriptor=xl,c.endpointReachedTriggerActionDescriptorRef=SE,c.endpointReachedTriggerActionDescriptorRefFour=wE,c.endpointReachedTriggerActionDescriptorRefThree=BE,c.endpointReachedTriggerActionDescriptorRefTwo=CE,c.endpointRequestBodyArgumentDeclaration=Gl,c.endpointRequestBodyArgumentDeclarationRef=RE,c.endpointRequestBodyVariableDataType=gE,c.endpointRequestHeadersArgumentDeclaration=Ml,c.endpointRequestHeadersArgumentDeclarationRef=EE,c.endpointRequestHeadersVariableDataType=bE,c.endpointRequestHeadersVariableDataTypeRef=TE,c.endpointRequestQueryParamsArgumentDeclaration=Ll,c.endpointRequestQueryParamsArgumentDeclarationRef=IE,c.endpointRequestQueryParamsVariableDataType=DE,c.endpointRequestQueryParamsVariableDataTypeRef=vE,c.endpointResponseBodyDataType=UE,c.endpointResponseBodyReturnDeclaration=Ul,c.endpointResponseBodyReturnDeclarationRef=FE,c.endpointResponseCodeDataType=NE,c.endpointResponseCodeReturnDeclaration=$l,c.endpointResponseCodeReturnDeclarationRef=_E,c.endpointResponseHeadersDataType=GE,c.endpointResponseHeadersDataTypeRef=VE,c.endpointResponseHeadersReturnDeclaration=Fl,c.endpointResponseHeadersReturnDeclarationRef=LE,c.endpointReturnStatementRef=ME,c.endpointReturnStatementRefThree=xE,c.endpointReturnStatementRefTwo=$E,c.enumOptionsProperty=Qu,c.enumOptionsPropertyDataType=Ku,c.enumOptionsPropertyDataTypeRef=zu,c.enumOptionsPropertyRef=Zu,c.enumPrototype=Nn,c.enumPrototypeRef=Xu,c.executionBuiltInEntity=Hl,c.executionBuiltInEntityAbortMethod=Yl,c.executionBuiltInEntityAbortMethodParentRef=Ob,c.filterOutDuplicateEntities=E,c.filterOutDuplicateErrors=l9,c.findEntityFromKeys=Bu,c.findReferenceToSelfInList=bA,c.findReferencesToSelfInProject=d7,c.flattenCalls=un,c.flattenCanvasAncestorsUntil=ko,c.flattenCustomEntityExtensionAndImplementationTypes=Fu,c.flattenCustomEntityExtensionTypes=Wo,c.flattenCustomEntityExtensions=Gu,c.flattenCustomEntityImplementations=$u,c.flattenCustomEntityImplementionTypes=Jo,c.flattenDerivedCanvasEntities=St,c.flattenDetachedBranch=OA,c.flattenElementCalls=Me,c.flattenElementCallsOnTheSameScope=c7,c.flattenProjectElements=EA,c.flattenRelatedCanvasElementsOnTheLeft=DA,c.flattenRelatedCanvasElementsOnTheRight=IA,c.flattenVariableReads=TA,c.flattenVariableWrites=mA,c.flattenVariables=re,c.fromZodParseToEntityGenerationErrors=Ru,c.generate=lC,c.generateActionExample=Y2,c.generateExecutionDataType=Y5,c.generateMutablePropertiesExplanation=No,c.generateRandomBoolean=CR,c.generateRandomDate=oR,c.generateRandomDateAfter=iR,c.generateRandomDateBefore=aR,c.generateRandomDateBetweenRange=sR,c.generateRandomNumber=DR,c.generateRandomNumberAfter=gR,c.generateRandomNumberBefore=vR,c.generateRandomNumberBetweenRange=IR,c.generateRandomText=SR,c.generateRandomTextAfter=PR,c.generateRandomTextBefore=AR,c.generateRandomTextBetweenRange=OR,c.generateUniqueUUID=RR,c.getAllActionDescriptorsForConditions=Uo,c.getAllActionDescriptorsForGlobalEvents=$o,c.getAllActionDescriptorsForLoops=Fo,c.getAllActionDescriptorsForOperations=K2,c.getAllGloballyDeclaredFunctionDeclarationsExplanation=tA,c.getBaseBuiltInEntities=Qn,c.getBaseSchemaBasedOnType=YP,c.getBuiltInEntityOwner=er,c.getCallableEntityReferenceSchema=ze,c.getCallableEntityTypeSchema=ED,c.getCallerEntityReferenceSchema=y3,c.getCallerEntityTypeSchema=p3,c.getCalls=Nu,c.getCanvasEntitiesDerivedFromInternalCalls=vA,c.getCanvasEntitiesDerivedFromWrites=_i,c.getCanvasEntityDerivedFromValueReadingEntity=Lu,c.getCanvasEntityReferenceSchema=B3,c.getCanvasEntityTypeSchema=C3,c.getChildrenEntityWithValues=r7,c.getColumnProperties=I7,c.getCommonAncestor=_u,c.getCommonChildren=lA,c.getCustomEntityExtends=Ni,c.getDatabaseEntities=g7,c.getDatabaseEntity=D7,c.getDeclaration=Sr,c.getDeepestScope=BA,c.getDraggableCallableEntityReferenceSchema=RD,c.getDraggableCallableEntityTypeSchema=bD,c.getDraggableCallerEntityReferenceSchema=f3,c.getDraggableCallerEntityTypeSchema=h3,c.getDraggableExecutableEntityReferenceSchema=b3,c.getDraggableExecutableEntityTypeSchema=E3,c.getDraggablePassThroughCallableEntityReferenceSchema=Ro,c.getDraggablePassThroughCallableEntityTypeSchema=bo,c.getDraggablePlayableEntityReferenceSchema=D3,c.getDraggablePlayableEntityTypeSchema=I3,c.getEntityArgumentDeclarations=Vu,c.getEntityInputMaps=RA,c.getEntityOutputMaps=y7,c.getEntityReferenceSchema=S3,c.getEntityReturnDeclarations=gA,c.getEntityTypeSchema=O3,c.getEntityWithLogicScopeReferenceSchema=Dn,c.getEntityWithLogicScopeTypeSchema=R3,c.getEntityWithValueReferenceSchema=TD,c.getEntityWithValueTypeSchema=u3,c.getEntryPointEntityReferenceSchema=He,c.getEntryPointEntityTypeSchema=Wn,c.getEventEntityReferenceSchema=To,c.getEventEntityTypeSchema=mo,c.getExecutableEntityReferenceSchema=T3,c.getExecutableEntityTypeSchema=m3,c.getExtendedBuiltInEntity=h7,c.getExtendedCustomEntity=xu,c.getGenerationTargetSchemaBasedOnType=HP,c.getHeadIfPartOfDetachedBranch=AA,c.getHighestScope=CA,c.getImplementedBuiltInEntity=f7,c.getIsInteractive=ju,c.getLastInListOperation=yl,c.getLastInListOperationError=sh,c.getLastInListOperationErrorParentRef=ah,c.getLastInListOperationInputListArgument=nh,c.getLastInListOperationInputListArgumentParentRef=th,c.getLastInListOperationInputListArgumentRef=Ky,c.getLastInListOperationInputListDataType=Xy,c.getLastInListOperationOutputElementDataType=eh,c.getLastInListOperationOutputElementReturn=ih,c.getLastInListOperationOutputElementReturnParentRef=rh,c.getLastInListOperationOutputElementReturnRef=Qy,c.getLinkedEntitiesFromArgumentDeclaration=l7,c.getLowestPersistedEntityImplementation=Uu,c.getParentCanvasEntities=Rt,c.getParentCanvasEntity=tt,c.getParentEntryPoint=n7,c.getPassThroughCallableEntityReferenceSchema=Ee,c.getPassThroughCallableEntityTypeSchema=Eo,c.getPeristedEntities=R7,c.getPlayableEntityReferenceSchema=v3,c.getPlayableEntityTypeSchema=g3,c.getProject=W7,c.getPrototypeByType=Yo,c.getReferenceEntityId=N,c.getReferencedEntitiesStateOrErrors=Vo,c.getReferencedEntityStateOrErrors=gu,c.getRelatedCanvasElementsOnTheLeft=jr,c.getRelatedCanvasElementsOnTheRight=Xn,c.getRootEntryPointScopeOwner=Ju,c.getScopeOwner=gt,c.getTerminationReferenceSchema=A3,c.getTerminationTypeSchema=P3,c.getUsedArgFromDeclaration=u7,c.getUsedReturnFromDeclaration=p7,c.getValueReadingEntityReferenceSchema=mD,c.getValueReadingEntityTypeSchema=In,c.getValueWritingEntityReferenceSchema=d3,c.getValueWritingEntityTypeSchema=Sa,c.getVariableFromInputMapping=dA,c.getVariableFromReturnVariablePointer=yA,c.getVariableReferenceSchema=Jn,c.getVariableTypeSchema=vr,c.getVariablesFromArgumentDeclarations=qo,c.getVariablesFromInputMaps=uA,c.getVariablesFromOutputMapping=hA,c.getVariablesFromOutputMaps=fA,c.getVariablesFromReturnDeclarations=pA,c.getVariablesInSameOrHigherScope=uu,c.getWrites=Mu,c.groupCallsBasedOnParallelizableExecution=a7,c.handleAfterEntityImplementationSideEffects=sA,c.handleBeforeEntityImplementationSideEffects=aA,c.httpRequestBodyArgument=es,c.httpRequestBodyArgumentRef=Uf,c.httpRequestBodyDataType=xf,c.httpRequestHeadersArgument=Qa,c.httpRequestHeadersArgumentRef=$f,c.httpRequestHeadersDataType=Ff,c.httpRequestMethodArgument=Ka,c.httpRequestMethodArgumentRef=Lf,c.httpRequestMethodDataType=Gf,c.httpRequestMethodDataTypeRef=Mf,c.httpRequestOperation=Li,c.httpRequestOperationErrorValueDescriptor=gl,c.httpRequestOperationErrorValueDescriptorDatatype=sm,c.httpRequestOperationErrorValueDescriptorRef=am,c.httpRequestOperationRef=tm,c.httpRequestOperationRefEight=rm,c.httpRequestOperationRefFive=Qf,c.httpRequestOperationRefFour=Xf,c.httpRequestOperationRefNine=im,c.httpRequestOperationRefSeven=nm,c.httpRequestOperationRefSix=em,c.httpRequestOperationRefThree=Kf,c.httpRequestOperationRefTwo=Zf,c.httpRequestQueryParamsArgument=Rl,c.httpRequestQueryParamsArgumentRef=_f,c.httpRequestQueryParamsDataType=Nf,c.httpRequestVariableURLArgument=Xa,c.httpRequestVariableURLArgumentRef=Bf,c.httpRequestVariableURLDataType=wf,c.httpRequestVariableURLDataTypeRef=Sf,c.httpResponseBodyReturnDataType=zf,c.httpResponseBodyReturnDataTypeRef=Yf,c.httpResponseBodyReturnReturn=rs,c.httpResponseBodyReturnReturnRef=Hf,c.httpResponseCodeDataType=kf,c.httpResponseCodeReturn=ts,c.httpResponseCodeReturnRef=jf,c.httpResponseHeadersDataType=Wf,c.httpResponseHeadersDataTypeRef=qf,c.httpResponseHeadersReturn=ns,c.httpResponseHeadersReturnRef=Jf,c.implement=xo,c.inferArgumentDeclarationDataType=NP,c.inferDataType=cn,c.inferInputMapDataType=lu,c.inferOutputMapDataType=du,c.inferPropertyDataType=LP,c.inferReturnDeclarationDataType=cu,c.inferValueDescriptorDataType=GP,c.inferVariableDeclarationDataType=VP,c.inferVariableInstanceDataType=MP,c.initProject=VA,c.iterateOverListActionDescriptorListArgumentDeclaration=gm,c.iterateOverListActionDescriptorListArgumentDeclarationDataType=bm,c.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Em,c.iterateOverListActionDescriptorListArgumentDeclarationParentRef=Rm,c.iterateOverListLoopActionDescriptor=ir,c.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=Im,c.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=vm,c.iterateOverListLoopBodyActionDescriptor=as,c.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=_m,c.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=wm,c.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=Mm,c.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=Nm,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=is,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=Pm,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=Dm,c.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Am,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Bm,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Sm,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Om,c.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Cm,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=nT,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=eT,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=Qm,c.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=tT,c.iterateOverObjectKeysLoopActionDescriptor=$i,c.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=iT,c.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=rT,c.iterateOverObjectKeysLoopBodyActionDescriptor=mT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=yT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=pT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=fT,c.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=hT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sl,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=sT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=aT,c.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=oT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=uT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=cT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=lT,c.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=dT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=gT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=bT,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=ET,c.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=RT,c.iterateOverObjectValuesLoopActionDescriptor=Fi,c.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=IT,c.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=vT,c.iterateOverObjectValuesLoopBodyActionDescriptor=VT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=_T,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=wT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=MT,c.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=NT,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Cl,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=PT,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=DT,c.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=AT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=BT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=ST,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=OT,c.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=CT,c.iterateOverStringActionDescriptorDynamicReturnDeclaration=xm,c.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Um,c.iterateOverStringActionDescriptorStringArgumentDeclaration=Fm,c.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Gm,c.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Lm,c.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=$m,c.iterateOverStringLoopActionDescriptor=ss,c.iterateOverStringLoopBodyActionDescriptor=Ol,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=zm,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=Hm,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Km,c.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Zm,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Pl,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=km,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=jm,c.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=qm,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Al,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Wm,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Jm,c.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=Ym,c.joinListOperation=dl,c.joinListOperationError=By,c.joinListOperationErrorParentRef=Cy,c.joinListOperationFirstListArgument=Dy,c.joinListOperationFirstListArgumentParentRef=Iy,c.joinListOperationFirstListArgumentRef=Ty,c.joinListOperationFirstListDataType=Ey,c.joinListOperationResultListDataType=vy,c.joinListOperationResultListReturn=Sy,c.joinListOperationResultListReturnParentRef=Oy,c.joinListOperationResultListReturnRef=gy,c.joinListOperationSecondListArgument=Ay,c.joinListOperationSecondListArgumentParentRef=Py,c.joinListOperationSecondListArgumentRef=by,c.joinListOperationSecondListDataType=Ry,c.joinListWithLastSeparator=U,c.joinStringsOperation=Vi,c.joinStringsOperationDynamicStringArgument=Zp,c.joinStringsOperationDynamicStringArgumentParentRef=zp,c.joinStringsOperationDynamicStringArgumentRef=Yp,c.joinStringsOperationDynamicStringDataType=Hp,c.joinStringsOperationError=Wp,c.joinStringsOperationErrorParentRef=Jp,c.joinStringsOperationFirstStringArgument=Ha,c.joinStringsOperationFirstStringArgumentParentRef=Lp,c.joinStringsOperationFirstStringArgumentRef=Bp,c.joinStringsOperationFirstStringDataType=wp,c.joinStringsOperationResultStringDataType=Vp,c.joinStringsOperationResultStringReturn=Mi,c.joinStringsOperationResultStringReturnParentRef=qp,c.joinStringsOperationResultStringReturnRef=Mp,c.joinStringsOperationSecondStringArgument=za,c.joinStringsOperationSecondStringArgumentParentRef=kp,c.joinStringsOperationSecondStringArgumentRef=_p,c.joinStringsOperationSecondStringDataType=Np,c.joinStringsOperationSeparatorStringArgument=jp,c.joinStringsOperationSeparatorStringArgumentParentRef=xp,c.joinStringsOperationSeparatorStringArgumentRef=Gp,c.joinStringsOperationSeparatorStringDataType=Up,c.joinStringsOperationSeparatorStringDataTypeDefaultValue=Fp,c.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=$p,c.jsonPrototype=nl,c.keyValueParamBuiltInBaseEntity=cs,c.keyValueParamBuiltInBaseEntityNameProperty=eE,c.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=qA,c.keyValueParamBuiltInBaseEntityNamePropertyParentRef=QT,c.keyValueParamBuiltInBaseEntityNamePropertyRef=XT,c.keyValueParamBuiltInBaseEntityValueProperty=rE,c.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=WA,c.keyValueParamBuiltInBaseEntityValuePropertyParentRef=nE,c.keyValueParamBuiltInBaseEntityValuePropertyRef=tE,c.lowercaseFirstLetter=BP,c.manualFlowActionDescriptorDeclarationArgumentDeclaration=Il,c.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=um,c.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=dm,c.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=pm,c.manualFlowLoopActionDescriptor=vl,c.manualFlowLoopActionDescriptorDynamicReturnDeclaration=cm,c.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=lm,c.manualFlowLoopBodyActionDescriptor=Dl,c.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=hm,c.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=ym,c.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=mm,c.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=fm,c.mapActionDescriptorToTypeItRepresents=b7,c.mergeEntityErrorsList=c9,c.mergeListOfEntities=T7,c.methodDefaultValue=Vf,c.mockClientProject=HI,c.moreThanOrEqualCondition=Qr,c.moreThanOrEqualConditionLeftHandArgument=Mb,c.moreThanOrEqualConditionLeftHandArgumentDataType=_b,c.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=wb,c.moreThanOrEqualConditionLeftHandArgumentParentRef=Nb,c.moreThanOrEqualConditionRightHandArgument=$b,c.moreThanOrEqualConditionRightHandArgumentDataType=Lb,c.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=Vb,c.moreThanOrEqualConditionRightHandArgumentParentRef=Gb,c.notEmptyCondition=cr,c.notEmptyConditionArgument=Cb,c.notEmptyConditionRef=Sb,c.nullPrototype=UA,c.numberAdditionOperation=Ya,c.numberAdditionOperationDynamicSummandArgument=pp,c.numberAdditionOperationDynamicSummandArgumentType=up,c.numberAdditionOperationDynamicSummandArgumentTypeParentRef=dp,c.numberAdditionOperationError=cp,c.numberAdditionOperationErrorParentRef=lp,c.numberAdditionOperationFirstNumberArgument=rl,c.numberAdditionOperationFirstNumberArgumentRef=ep,c.numberAdditionOperationFirstNumberDataType=tp,c.numberAdditionOperationRef=sp,c.numberAdditionOperationRefThree=al,c.numberAdditionOperationRefTwo=op,c.numberAdditionOperationResultNumberDataType=ap,c.numberAdditionOperationResultNumberReturn=sl,c.numberAdditionOperationResultNumberReturnRef=ip,c.numberAdditionOperationSecondNumberArgument=il,c.numberAdditionOperationSecondNumberArgumentRef=np,c.numberAdditionOperationSecondNumberDataType=rp,c.numberPrototype=X,c.numberSubtractionOperation=ll,c.numberSubtractionOperationDynamicSubtrahendArgument=Sp,c.numberSubtractionOperationDynamicSubtrahendArgumentType=Op,c.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=Ap,c.numberSubtractionOperationError=Pp,c.numberSubtractionOperationErrorParentRef=Dp,c.numberSubtractionOperationFirstNumberArgument=bp,c.numberSubtractionOperationFirstNumberArgumentRef=yp,c.numberSubtractionOperationFirstNumberDataType=hp,c.numberSubtractionOperationRef=ol,c.numberSubtractionOperationRefThree=vp,c.numberSubtractionOperationRefTwo=Rp,c.numberSubtractionOperationResultNumberDataType=Ep,c.numberSubtractionOperationResultNumberReturn=Ip,c.numberSubtractionOperationResultNumberReturnRef=Tp,c.numberSubtractionOperationSecondNumberArgument=gp,c.numberSubtractionOperationSecondNumberArgumentRef=fp,c.numberSubtractionOperationSecondNumberDataType=mp,c.numberValueAutogenerationSchema=ad,c.parallelExecutionOperation=Wt,c.parallelExecutionOperationError=_h,c.parallelExecutionOperationErrorParentRef=wh,c.parallelExecutionOperationListOfExecutionResultsDataType=Sh,c.parallelExecutionOperationListOfExecutionResultsReturn=Tl,c.parallelExecutionOperationListOfExecutionResultsReturnRef=Oh,c.parallelExecutionOperationListOfFunctionsArgument=ml,c.parallelExecutionOperationListOfFunctionsArgumentDatatype=Ah,c.parallelExecutionOperationListOfFunctionsArgumentRef=Ph,c.parallelExecutionOperationListOfFunctionsBlueprint=Dh,c.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=Ih,c.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=vh,c.parallelExecutionOperationRef=Ch,c.parallelExecutionOperationRefThree=Bh,c.persistedBuiltInBaseEntity=ke,c.persistedBuiltInBaseEntityCreatedAtProperty=Tb,c.persistedBuiltInBaseEntityCreatedAtPropertyDataType=fb,c.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=sO,c.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=mb,c.persistedBuiltInBaseEntityCreatedAtPropertyRef=hb,c.persistedBuiltInBaseEntityDatabaseProperty=ji,c.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=nO,c.persistedBuiltInBaseEntityDatabasePropertyParentRef=ab,c.persistedBuiltInBaseEntityDatabasePropertyRef=ib,c.persistedBuiltInBaseEntityDeletedAtProperty=yb,c.persistedBuiltInBaseEntityDeletedAtPropertyDataType=ub,c.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=aO,c.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=pb,c.persistedBuiltInBaseEntityDeletedAtPropertyRef=db,c.persistedBuiltInBaseEntityIdentifierProperty=cb,c.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=sb,c.persistedBuiltInBaseEntityIdentifierPropertyParentRef=lb,c.persistedBuiltInBaseEntityIdentifierPropertyRef=ob,c.persistedBuiltInBaseEntityUpdatedAtProperty=gb,c.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=bb,c.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=oO,c.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=Rb,c.persistedBuiltInBaseEntityUpdatedAtPropertyRef=Eb,c.processOutputGlobalValueDescriptorDataType=xb,c.processOutputGlobalValueDescriptorReturn=Zl,c.processOutputGlobalValueDescriptorReturnRef=Ub,c.projectPublicationCompletedGlobalEvent=fs,c.propertyToZodSchema=nR,c.relationalDatabaseBuiltInBaseEntity=Mn,c.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=kl,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=XE,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=QE,c.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=KE,c.relationalDatabaseBuiltInBaseEntityDefaultProperty=jl,c.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=zE,c.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=ZE,c.relationalDatabaseBuiltInBaseEntityIdentifierProperty=us,c.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=kE,c.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=qE,c.relationalDatabaseBuiltInBaseEntityMinSizeProperty=hs,c.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=YE,c.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=HE,c.relationalDatabaseBuiltInBaseEntityPasswordProperty=ys,c.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=KA,c.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=WE,c.relationalDatabaseBuiltInBaseEntityRef=Kr,c.relationalDatabaseBuiltInBaseEntityUsernameProperty=ps,c.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=zA,c.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=JE,c.resolveActionDescriptorName=qP,c.resolveBaseEntityName=FP,c.resolveBuiltInBaseEntityDataTypeLabel=UP,c.resolveConditionOperatorLabel=wo,c.resolveCustomEntityDataTypeLabel=xP,c.resolveDataType=Co,c.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=wu,c.resolveDataTypeLabel=pu,c.resolveEntityDataTypeLabel=K5,c.resolveEntityName=C,c.resolveFirstCallsSecond=s7,c.resolveFirstWritesSecond=o7,c.resolvePrimaryKeyProperty=v7,c.resolvePrimitiveEntityName=kP,c.resolveSearchName=jP,c.resolveVariableScope=H5,c.sequentialExecutionOperation=mn,c.sequentialExecutionOperationError=Xh,c.sequentialExecutionOperationErrorParentRef=Kh,c.sequentialExecutionOperationListOfExecutionResultsDataType=Hh,c.sequentialExecutionOperationListOfExecutionResultsReturn=bl,c.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=Zh,c.sequentialExecutionOperationListOfExecutionResultsReturnRef=Yh,c.sequentialExecutionOperationListOfFunctionsArgument=El,c.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Wh,c.sequentialExecutionOperationListOfFunctionsArgumentParentRef=zh,c.sequentialExecutionOperationListOfFunctionsArgumentRef=Jh,c.sequentialExecutionOperationListOfFunctionsBlueprint=qh,c.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=kh,c.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=jh,c.softDeletePersistedEntityMethod=nb,c.softDeletePersistedEntityMethodParentRef=tb,c.sortCallsBasedOnExecutionDependencies=cA,c.sortChildrenEntitiesBasedOnExecutionDependencies=i7,c.splitListOperation=pl,c.splitListOperationError=Hy,c.splitListOperationErrorParentRef=Yy,c.splitListOperationFirstOutputListDataType=Gy,c.splitListOperationFirstOutputListReturn=ky,c.splitListOperationFirstOutputListReturnParentRef=jy,c.splitListOperationFirstOutputListReturnRef=ul,c.splitListOperationInputListArgument=Fy,c.splitListOperationInputListArgumentParentRef=$y,c.splitListOperationInputListArgumentRef=Ny,c.splitListOperationInputListDataType=My,c.splitListOperationSecondOutputListDataType=qy,c.splitListOperationSecondOutputListReturn=Wy,c.splitListOperationSecondOutputListReturnParentRef=Jy,c.splitListOperationSplitIndexArgument=xy,c.splitListOperationSplitIndexArgumentParentRef=Uy,c.splitListOperationSplitIndexArgumentRef=Vy,c.splitListOperationSplitIndexDataType=Ly,c.splitStringOperation=cl,c.splitStringOperationError=yy,c.splitStringOperationErrorParentRef=py,c.splitStringOperationFirstPartResultStringDataType=ny,c.splitStringOperationFirstPartResultStringReturn=uy,c.splitStringOperationFirstPartResultStringReturnParentRef=dy,c.splitStringOperationFirstPartResultStringReturnRef=ty,c.splitStringOperationIndexArgument=ly,c.splitStringOperationIndexArgumentParentRef=oy,c.splitStringOperationIndexArgumentRef=Qp,c.splitStringOperationIndexDataType=ey,c.splitStringOperationSecondPartResultStringDataType=iy,c.splitStringOperationSecondPartResultStringReturn=xA,c.splitStringOperationSecondPartResultStringReturnParentRef=cy,c.splitStringOperationSecondPartResultStringReturnRef=ry,c.splitStringOperationStringArgument=sy,c.splitStringOperationStringArgumentParentRef=ay,c.splitStringOperationStringArgumentRef=Kp,c.splitStringOperationStringDataType=Xp,c.stringPrototype=x,c.stringValueAutogenerationSchema=id,c.suggestNewIdForEntity=Eu,c.test_primitive_entities_export=H7,c.toCamelCase=z5,c.toEntityState=Nt,c.toKebabCase=$P,c.toLowerCaseKebabCase=Bo,c.toPascalCase=Z5,c.untypedObjectPrototype=Xe,c.updateErrorsList=ie,c.updateValueReader=qa,c.urlDefaultValue=Cf,c.uuidPrototype=Wa,c.validateArgumentDeclarationName=mu,c.validateCalledByErrorIdInAction=z2,c.validateCalledByIdInAction=H2,c.validateCallers=eA,c.validateConditionEntityDeclaration=X2,c.validateCustomEntityName=_o,c.validateDataOperation=rr,c.validateDataOperationDataToValidateArgument=Ef,c.validateDataOperationDataToValidateArgumentParentRef=Tf,c.validateDataOperationDataToValidateArgumentRef=ff,c.validateDataOperationDataToValidateDataType=mf,c.validateDataOperationEntityToMatchTypeArgument=vf,c.validateDataOperationEntityToMatchTypeArgumentParentRef=gf,c.validateDataOperationEntityToMatchTypeArgumentRef=bf,c.validateDataOperationEntityToMatchTypeDataType=Rf,c.validateDataOperationError=Af,c.validateDataOperationErrorParentRef=Pf,c.validateDataOperationOutputEntityDeclaration=Df,c.validateDataOperationOutputEntityDeclarationParentRef=If,c.validateEntryCaller=QP,c.validateErrorCaller=XP,c.validateFunctionCallDeclaration=nA,c.validateFunctionDeclarationName=yu,c.validateGeneratedEntityParentIsNotBuiltInEntity=q2,c.validateGeneration=j2,c.validateGenerationTarget=Le,c.validateGenerationUpdate=k2,c.validateLoopEntityDeclaration=Q2,c.validateName=X5,c.validateOperationEntityDeclaration=rA,c.validatePropertyName=fu,c.validateReachability=Cn,c.validateReadsValueInActionPayload=Z2,c.validateReferenceObject=Mo,c.validateReferenceToOne=vu,c.validateReferences=Ye,c.validateReturnDeclarationName=Tu,c.validateSuccessCaller=KP,c.validateValueReaderGenerationUpdate=xa,c.validateValueWritter=Su,c.validateVariableDeclarationName=hu,c.validateVariableInternalCallUse=Cu,c.valueAutogenerationCurrentDateAndTimeSchema=ZI,c.valueAutogenerationGenericSchema=eo,c.valueAutogenerationOptions=od,c.valueAutogenerationOptionsSchema=zI,c.valueAutogenerationRandomBooleanSchema=rd,c.valueAutogenerationRandomDateBetweenSchema=aD,c.valueAutogenerationRandomDateFromSchema=rD,c.valueAutogenerationRandomDateSchema=ro,c.valueAutogenerationRandomDateUntilSchema=iD,c.valueAutogenerationRandomNumberBetweenSchema=QI,c.valueAutogenerationRandomNumberFromSchema=KI,c.valueAutogenerationRandomNumberSchema=to,c.valueAutogenerationRandomNumberUntilSchema=XI,c.valueAutogenerationRandomSchema=ga,c.valueAutogenerationRandomTextBetweenSchema=nD,c.valueAutogenerationRandomTextFromSchema=eD,c.valueAutogenerationRandomTextSchema=no,c.valueAutogenerationRandomTextUntilSchema=tD,c.valueAutogenerationRangeValueTypesSchema=Ra,c.valueAutogenerationUniqueSchema=nd,c.waitOperation=pt,c.waitOperationMillisecondsNumberArgument=tr,c.waitOperationMillisecondsNumberArgumentRef=Vh,c.waitOperationMillisecondsNumberDataType=Lh,c.waitOperationOperationError=Fh,c.waitOperationOperationErrorParentRef=$h,c.waitOperationRef=Gh,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});