@elyx-code/project-logic-tree 0.0.6015 → 0.0.6016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5973 -5974
- package/dist/index.umd.cjs +92 -92
- package/dist/tree/state/custom-entity/custom-entity.d.ts +3 -1
- package/dist/tree/state/data-type/data-type.d.ts +2 -0
- package/dist/tree/state/input-map/input-map.d.ts +1 -0
- package/dist/tree/state/variable-declaration/variable-declaration.d.ts +1 -1
- package/dist/tree/utils/data-type.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
(function(u,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(u=typeof globalThis<"u"?globalThis:u||self,r(u["@elyx-code/project-logic-tree"]={}))})(this,function(u){"use strict";var W3=Object.defineProperty;var H3=(u,r,_)=>r in u?W3(u,r,{enumerable:!0,configurable:!0,writable:!0,value:_}):u[r]=_;var l=(u,r,_)=>(H3(u,typeof r!="symbol"?r+"":r,_),_);var r=(n=>(n.CustomEntity="custom-entity",n.BuiltInBaseEntity="built-in-base-entity",n.Project="project",n.InstalledProject="installed-project",n.GlobalEvent="global-event",n.DataType="data-type",n.FunctionCall="function-call",n.FunctionDeclaration="function-declaration",n.ActionDescriptor="action-descriptor",n.ValueDescriptor="value-descriptor",n.ArgumentDeclaration="argument-declaration",n.InputMap="input-map",n.ReturnStatement="return-statement",n.BreakStatement="break-statement",n.ContinueStatement="continue-statement",n.ReturnDeclaration="return-declaration",n.OutputMap="output-map",n.PrimitiveEntity="primitive-entity",n.PrimitiveValue="primitive-value",n.Property="property",n.Operation="operation",n.Condition="condition",n.VariableDeclaration="variable-declaration",n.VariableInstance="variable-instance",n.Search="search",n.Loop="loop",n.InternalCall="internal-call",n.GenericReference="generic-reference",n))(r||{}),_=(n=>(n.HTTP_ENDPOINT="BUILT_IN_HTTP_ENDPOINT_ENTITY",n.RELATIONAL_DATABASE="BUILT_IN_RELATIONAL_DATABASE_ENTITY",n.PERSISTED_ENTITY="BUILT_IN_PERSISTED_ENTITY_ENTITY",n.CRON_JOB="BUILT_IN_CRON_JOB_ENTITY",n.EXECUTION="BUILT_IN_EXECUTION_ENTITY",n.KEY_VALUE_PARAM="BUILT_IN_KEY_VALUE_PARAM_ENTITY",n))(_||{}),Ue=(n=>(n.CurrentDateAndTime="current-date-and-time",n.Unique="unique",n.Random="random",n))(Ue||{}),Pt=(n=>(n.DeletePersistedEntity="base-delete-persisted-entity",n.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",n.AbortExecution="base-abort-execution",n))(Pt||{}),L=(n=>(n.Fixed="fixed",n.None="none",n.Dynamic="dynamic",n))(L||{}),C=(n=>(n.FixedArguments="fixed-arguments",n.FixedReturns="fixed-returns",n.ReturnedError="returned-error",n.OngoingProcessExecution="ongoing-process-execution",n))(C||{}),v=(n=>(n.EntityTemplate="entity-template",n.ActionDescriptor="action-descriptor",n.String="string",n.Number="number",n.Boolean="boolean",n.Null="null",n.Enum="enum",n.JSON="json",n.Date="date",n.UUID="uuid",n.File="file",n))(v||{}),at=(n=>(n.Addition="addition",n.Substraction="substraction",n.Multiplication="multiplication",n.Division="division",n.Remainder="remainder",n.Exponentiation="exponentiation",n))(at||{}),ve=(n=>(n.Join="string-join",n.Split="stringSsplit",n.DeleteLast="string-delete-last",n.DeleteFirst="string-delete-first",n.DeleteIndex="string-delete-index",n.AddIndex="string-add-index",n.ReplaceFirst="string-replace-first",n.ReplaceLast="string-replace-last",n.ReplaceIndex="string-replace-index",n.ReplaceSingleMatch="string-replace-single-match",n.ReplaceAllMatches="string-replace-all-matches",n.GetIndex="string-get-index",n.GetFirst="string-get-first",n.GetLast="string-get-last",n.Append="string-append",n.Prepend="string-prepend",n))(ve||{}),k=(n=>(n.Join="list-join",n.Split="list-split",n.DeleteLast="list-delete-last",n.DeleteFirst="list-delete-first",n.DeleteIndex="list-delete-index",n.AddIndex="list-add-index",n.ReplaceFirst="list-replace-first",n.ReplaceLast="list-replace-last",n.ReplaceIndex="list-replace-index",n.ReplaceSingleMatch="list-replace-single-match",n.ReplaceAllMatches="list-replace-all-matches",n.GetIndex="list-get-index",n.GetFirst="list-get-first",n.GetLast="list-get-last",n.Append="list-append",n.Prepend="list-prepend",n))(k||{}),Pe=(n=>(n.Parallel="parallel",n.Sequential="sequential",n.Wait="wait",n))(Pe||{}),Ze=(n=>(n.CreateNewInstance="create-new-instance",n.Validate="validate",n))(Ze||{}),Ye=(n=>(n.HttpRequest="base-http-request",n))(Ye||{}),Oe=(n=>(n.Equal="equal",n.NotEqual="not-equal",n.And="and",n.Or="or",n.LessThan="less-than",n.MoreThan="more-than",n.LessThanOrEqual="less-than-or-equal",n.MoreThanOrEqual="more-than-or-equal",n))(Oe||{}),wt=(n=>(n.Empty="empty",n.NotEmpty="not-empty",n))(wt||{}),je=(n=>(n.ManualFlow="manual-flow-loop",n.Counted="counted-loop",n.List="list-loop",n.ObjectKeys="object-keys-loop",n.ObjectValues="object-values-loop",n.String="string-loop",n))(je||{}),qe=(n=>(n.OrDataTypeGroup="or-data-type-group",n.AndDataTypeGroup="and-data-type-group",n.DynamicArgumentTypes="dynamic-argument-types",n.DynamicReturnTypes="dynamic-return-types",n))(qe||{}),en=(n=>(n.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",n))(en||{}),Fd=(n=>(n.Error="error",n.Task="task",n.Return="return",n))(Fd||{});const xn=[r.VariableDeclaration,r.VariableInstance,r.InputMap,r.ReturnDeclaration],tI=[r.VariableDeclaration,r.VariableInstance,r.InputMap,r.ReturnDeclaration],Be=[r.VariableDeclaration,r.VariableInstance,r.ArgumentDeclaration,r.OutputMap],nI=[r.VariableDeclaration,r.VariableInstance,r.ArgumentDeclaration,r.OutputMap],Ud=[...xn,...Be],Ge=[r.VariableDeclaration,r.VariableInstance],Sr=[r.GlobalEvent],we=[r.Operation,r.FunctionCall,r.Condition,r.Search,r.VariableDeclaration,r.VariableInstance,r.InternalCall,r.Loop],Eo=[r.Operation,r.FunctionCall,r.Condition,r.Search,r.VariableDeclaration,r.VariableInstance,r.Loop],Me=[r.FunctionDeclaration,...Sr],Rn=[...we,r.ReturnStatement,r.BreakStatement,r.ContinueStatement],Ro=[...Eo,r.ReturnStatement,r.BreakStatement,r.ContinueStatement],tn=[...we,...Me],xd=[...Eo,...Me],rI=[...Rn,...Me],iI=[...Ro,...Me],st=[...Me,r.Loop],Ce=[r.ReturnStatement,r.BreakStatement,r.ContinueStatement],aI=[r.CustomEntity,r.BuiltInBaseEntity,r.Project,r.InstalledProject,r.GlobalEvent,r.DataType,r.FunctionCall,r.FunctionDeclaration,r.ActionDescriptor,r.ValueDescriptor,r.ArgumentDeclaration,r.InputMap,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.ReturnDeclaration,r.OutputMap,r.PrimitiveEntity,r.PrimitiveValue,r.Property,r.Operation,r.Condition,r.VariableDeclaration,r.VariableInstance,r.Search,r.Loop,r.InternalCall],bo=[r.CustomEntity,r.GlobalEvent,r.FunctionDeclaration,r.FunctionCall,r.VariableDeclaration,r.VariableInstance,r.Operation,r.Condition,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.InstalledProject,r.Loop,r.Search],jd=[r.CustomEntity,r.FunctionDeclaration,r.ArgumentDeclaration,r.ReturnDeclaration,r.Property,r.VariableDeclaration,r.Search,r.Project,r.InstalledProject,r.ActionDescriptor,r.ValueDescriptor],Or=[r.BuiltInBaseEntity,r.PrimitiveEntity],sI=[r.CustomEntity,r.FunctionDeclaration,r.ArgumentDeclaration,r.ReturnDeclaration,r.Property,r.VariableDeclaration,r.GlobalEvent,r.Search,r.Project,r.InstalledProject,r.ActionDescriptor,r.ValueDescriptor,r.InputMap,r.OutputMap,r.FunctionCall,r.Operation,r.Condition,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.VariableInstance,r.PrimitiveValue,r.InternalCall],F={type:r.PrimitiveEntity,id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",description:"A string of characters.",version:1,name:v.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},bn={type:r.PrimitiveEntity,id:"f596545d-1565-4faa-9969-d95fa5edfea4",description:"A 'true' or 'false' value.",version:1,name:v.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},De={type:r.PrimitiveEntity,id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",description:"A number value.",version:1,name:v.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xe={type:r.PrimitiveEntity,id:"730e8ea9-8498-439a-9001-b07de55aaa7d",description:"A complex data structure with any combination of properties with names and values.",version:1,name:v.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},kd={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:r.GenericReference,entityId:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",entityType:r.DataType},qd={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:r.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:r.Property},Jd={id:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:{id:"enum-options-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.JSON,autogeneration:null,value:[],valueAsType:null,parent:kd},parent:qd},Wd={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:r.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:r.PrimitiveEntity},Hd={hidden:!1,required:!0,id:"00ccfcae-2104-45ef-bf6c-50ddccd74286",name:"Options",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Jd,description:"Options for the enum. Each option is a text value.",parent:Wd},gn={type:r.PrimitiveEntity,id:"9542b8b4-2642-4eee-9db9-def7963a17a0",description:"A set of text options to choose from.",version:1,name:v.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Hd],methods:[]},nn={type:r.PrimitiveEntity,id:"dc58f38b-d574-4956-aac6-32ce9529b937",description:"A date and time value.",version:1,name:v.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ea={type:r.PrimitiveEntity,id:"4a6234aa-c0f6-4731-b4dd-750388029226",description:"A unique identifier in the form of a 36-character string.",version:1,name:v.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[F],properties:[],methods:[]},go={type:r.PrimitiveEntity,id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",description:"A complex data structure with any combination of properties with names and values.",version:1,name:v.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]};var Yd=(n=>(n.FirstInputNumber="number-addition-first-number-argument-declaration",n.SecondInputNumber="number-addition-second-number-argument-declaration",n))(Yd||{}),zd=(n=>(n.ResultNumber="number-addition-result-number-return-delaration",n.Error="number-addition-error-return-delaration",n))(zd||{});const Zd={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:"number-addition-first-number-argument-declaration",entityType:r.ValueDescriptor},Xd={id:"number-addition-first-number-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Zd},Qd={type:r.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:"number-addition-second-number-argument-declaration",entityType:r.ValueDescriptor},Kd={id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Qd},eu={type:r.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:"number-addition-result-number-return-delaration",entityType:r.ValueDescriptor},tu={id:"b761acec-0755-4582-a68b-76267038bbe1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:eu},nu={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:at.Addition,entityType:r.ActionDescriptor},vo={id:"number-addition-first-number-argument-declaration",type:r.ValueDescriptor,version:1,name:"First value",description:"The first number to add",dataType:Xd,required:!0,parentRelationType:C.FixedArguments,index:0,parent:nu},ru={type:r.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:at.Addition,entityType:r.ActionDescriptor},Io={id:"number-addition-second-number-argument-declaration",type:r.ValueDescriptor,description:"The second number to add",version:1,name:"Second value",dataType:Kd,required:!0,parentRelationType:C.FixedArguments,index:1,parent:ru},iu={type:r.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:at.Addition,entityType:r.ActionDescriptor},Po={parentRelationType:C.FixedReturns,id:"number-addition-result-number-return-delaration",type:r.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:tu,required:!0,index:0,parent:iu},au={type:r.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:at.Addition,entityType:r.ActionDescriptor},su={parentRelationType:C.FixedReturns,id:"number-addition-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:au},Ra={id:at.Addition,type:r.ActionDescriptor,description:"Add two numbers together",version:1,name:at.Addition,fixedArguments:[vo,Io],error:su,fixedReturns:[Po],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},ou={[at.Addition]:Ra};var lu=(n=>(n.FirstInputString="join-string-first-string-argument-declaration",n.SecondInputString="join-string-second-string-argument-declaration",n))(lu||{}),cu=(n=>(n.ResultString="join-string-result-string-return-delaration",n.Error="join-string-error-return-delaration",n))(cu||{});const du={type:r.GenericReference,id:"join-string-first-string-argument-declaration",entityId:"join-string-first-string-argument-declaration",entityType:r.ValueDescriptor},uu={id:"join-string-first-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:du},pu={type:r.GenericReference,id:"join-string-second-string-argument-declaration",entityId:"join-string-second-string-argument-declaration",entityType:r.ValueDescriptor},yu={id:"join-string-second-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pu},hu={type:r.GenericReference,id:"join-string-result-string-return-delaration",entityId:"join-string-result-string-return-delaration",entityType:r.ValueDescriptor},fu={id:"join-string-result-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hu},mu={type:r.GenericReference,id:"join-string-operation-first-string-argument-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},ba={id:"join-string-first-string-argument-declaration",type:r.ValueDescriptor,version:1,name:"First value",description:"The first text to join to the second one. Its value will be at the beginning of the resulting text.",dataType:uu,parentRelationType:C.FixedArguments,required:!0,index:0,parent:mu},Tu={type:r.GenericReference,id:"join-string-operation-second-string-argument-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},ga={id:"join-string-second-string-argument-declaration",type:r.ValueDescriptor,version:1,name:"Second value",description:"The second text to join to the first one. Its value will be at the end of the resulting text.",dataType:yu,parentRelationType:C.FixedArguments,required:!0,index:1,parent:Tu},Eu={type:r.GenericReference,id:"join-string-operation-result-string-return-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},yi={parentRelationType:C.FixedReturns,id:"join-string-result-string-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:fu,required:!0,index:0,parent:Eu},Ru={type:r.GenericReference,id:"join-string-operation-error-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},bu={parentRelationType:C.FixedReturns,id:"join-string-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Ru},hi={id:ve.Join,type:r.ActionDescriptor,version:1,name:ve.Join,description:"Join two text together, to form a single resulting text value.",fixedArguments:[ba,ga],fixedReturns:[yi],error:bu,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},gu={[ve.Join]:hi};var vu=(n=>(n.FirstInputList="join-list-first-list-argument-declaration",n.SecondInputList="join-list-second-list-argument-declaration",n))(vu||{}),Iu=(n=>(n.ResultList="join-list-result-list-return-delaration",n.Error="join-list-error-return-delaration",n))(Iu||{});const Pu={type:r.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:r.ValueDescriptor},Du={id:"join-list-first-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Pu},Au={type:r.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:r.ValueDescriptor},Su={id:"join-list-second-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Au},Ou={type:r.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:r.ValueDescriptor},Cu={id:"join-list-result-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ou},Bu={type:r.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},wu={id:"join-list-first-list-argument-declaration",type:r.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:Du,parentRelationType:C.FixedArguments,required:!0,index:0,parent:Bu},_u={type:r.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},Mu={id:"join-list-second-list-argument-declaration",type:r.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:Su,parentRelationType:C.FixedArguments,required:!0,index:1,parent:_u},Nu={type:r.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},$u={parentRelationType:C.FixedReturns,id:"join-list-result-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:Cu,required:!0,index:0,parent:Nu},Vu={type:r.GenericReference,id:"join-list-operation-error-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},Lu={parentRelationType:C.FixedReturns,id:"join-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Vu},Do={id:k.Join,type:r.ActionDescriptor,version:1,name:k.Join,description:"Join two lists together, to form a single resulting list value.",fixedArguments:[wu,Mu],error:Lu,fixedReturns:[$u],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var Gu=(n=>(n.InputList="list-to-split-argument-declaration",n.SplitIndex="split-list-index-argument-declaration",n))(Gu||{}),Fu=(n=>(n.FirstOutputList="split-list-first-output-list-return-delaration",n.SecondOutputList="split-list-second-output-list-return-delaration",n.Error="split-list-error-return-delaration",n))(Fu||{});const Uu={type:r.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:r.ValueDescriptor},xu={id:"split-list-operation-input-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Uu},ju={type:r.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:r.ValueDescriptor},ku={id:"split-list-operation-split-index-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ju},Ao={type:r.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:r.ValueDescriptor},qu={id:"split-list-operation-first-output-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ao},Ju={type:r.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Wu={id:"list-to-split-argument-declaration",type:r.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",dataType:xu,parentRelationType:C.FixedArguments,required:!0,index:0,parent:Ju},Hu={type:r.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Yu={id:"split-list-index-argument-declaration",type:r.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:ku,parentRelationType:C.FixedArguments,required:!0,index:1,parent:Hu},zu={type:r.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Zu={parentRelationType:C.FixedReturns,id:"split-list-first-output-list-return-delaration",type:r.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",dataType:qu,required:!0,index:0,parent:zu},Xu={id:"split-list-operation-second-output-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ao},Qu={type:r.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Ku={parentRelationType:C.FixedReturns,id:"split-list-second-output-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",dataType:Xu,required:!0,index:0,parent:Qu},ep={type:r.GenericReference,id:"split-list-operation-error-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},tp={parentRelationType:C.FixedReturns,id:"split-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:ep},So={id:k.Split,type:r.ActionDescriptor,version:1,name:k.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",fixedArguments:[Wu,Yu],fixedReturns:[Zu,Ku],error:tp,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var np=(n=>(n.InputList="get-last-in-list-input-list-argument-declaration",n))(np||{}),rp=(n=>(n.OutputElement="get-last-in-list-output-element-return-delaration",n.Error="get-last-in-list-error-return-delaration",n))(rp||{});const ip={type:r.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:r.ValueDescriptor},ap={id:"get-last-in-list-input-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:ip},sp={type:r.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:r.ValueDescriptor},op={id:"get-last-in-list-output-element-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:sp},lp={type:r.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},cp={id:"get-last-in-list-input-list-argument-declaration",type:r.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",dataType:ap,parentRelationType:C.FixedArguments,required:!0,index:0,parent:lp},dp={type:r.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},up={parentRelationType:C.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:r.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",dataType:op,required:!0,index:0,parent:dp},pp={type:r.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},yp={parentRelationType:C.FixedReturns,id:"get-last-in-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:pp},Oo={id:k.GetLast,type:r.ActionDescriptor,version:1,name:k.GetLast,description:"Outputs the last element of a given list.",fixedArguments:[cp],fixedReturns:[up],error:yp,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var hp=(n=>(n.List="append-to-list-lsit-argument-declaration",n.ElementToAppend="append-to-list-element-to-append-argument-declaration",n))(hp||{}),fp=(n=>(n.ResultList="append-to-list-result-list-return-delaration",n.Error="append-to-list-error-return-delaration",n))(fp||{});const mp={type:r.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:r.ValueDescriptor},Tp={id:"append-to-list-lsit-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:mp},Ep={type:r.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:r.ValueDescriptor},Rp={id:"append-to-list-second-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ep},bp={type:r.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:r.ValueDescriptor},gp={id:"append-to-list-result-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:bp},vp={type:r.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Co={id:"append-to-list-lsit-argument-declaration",type:r.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",dataType:Tp,parentRelationType:C.FixedArguments,required:!0,index:0,parent:vp},Ip={type:r.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Bo={id:"append-to-list-element-to-append-argument-declaration",type:r.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",dataType:Rp,parentRelationType:C.FixedArguments,required:!0,index:1,parent:Ip},Pp={type:r.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Dp={parentRelationType:C.FixedReturns,id:"append-to-list-result-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:gp,required:!0,index:0,parent:Pp},Ap={type:r.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Sp={parentRelationType:C.FixedReturns,id:"append-to-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Ap},va={id:k.Append,type:r.ActionDescriptor,version:1,name:k.Append,description:"Adds a given element to the end of a list value.",fixedArguments:[Co,Bo],error:Sp,fixedReturns:[Dp],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},Op={[k.Join]:Do,[k.Split]:So,[k.GetLast]:Oo,[k.Append]:va};var Cp=(n=>(n.ListOfFunctions="parallel-execution-list-of-functions-argument-declaration",n))(Cp||{}),Bp=(n=>(n.ListOfExecutionResults="parallel-execution-result-return-delaration",n.Error="parallel-execution-error-return-delaration",n))(Bp||{});const wp={id:"parallel-execution-list-of-functions-blueprint-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,dynamicReturnTypes:null,fixedReturns:[],error:null,parent:null},_p={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:"parallel-execution-list-of-functions-argument-declaration",entityType:r.ValueDescriptor},Mp={id:"parallel-execution-list-of-functions-argument-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:wp,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:_p},Np={type:r.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:"parallel-execution-result-return-delaration",entityType:r.ValueDescriptor},$p={id:"b761acec-0755-4582-a68b-76267038bbe1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Np},Vp={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Pe.Parallel,entityType:r.ActionDescriptor},wo={id:"parallel-execution-list-of-functions-argument-declaration",type:r.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Mp,required:!0,index:0,parent:Vp,parentRelationType:C.FixedArguments},Lp={type:r.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Pe.Parallel,entityType:r.ActionDescriptor},_o={id:"parallel-execution-result-return-delaration",type:r.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:$p,required:!0,index:0,parent:Lp,parentRelationType:C.FixedReturns},Gp={type:r.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:Pe.Parallel,entityType:r.ActionDescriptor},Fp={id:"parallel-execution-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Gp,parentRelationType:C.ReturnedError},Lt={id:Pe.Parallel,type:r.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:Pe.Parallel,fixedArguments:[wo],fixedReturns:[_o],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,error:Fp,parent:null};var Up=(n=>(n.MillisecondsNumber="wait-milliseconds-number-argument-declaration",n))(Up||{}),xp=(n=>(n.Error="wait-operation-error-return-delaration",n))(xp||{});const jp={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:r.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},kp={id:"wait-milliseconds-number-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jp},qp={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:r.ActionDescriptor,entityId:Pe.Wait},jn={id:"wait-milliseconds-number-argument-declaration",type:r.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",dataType:kp,required:!0,index:0,parent:qp,parentRelationType:C.FixedArguments},Jp={type:r.GenericReference,id:"wait-operation-error-parent-ref",entityId:Pe.Wait,entityType:r.ActionDescriptor},Wp={id:"wait-operation-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Jp,parentRelationType:C.ReturnedError},ot={id:Pe.Wait,type:r.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:Pe.Wait,fixedArguments:[jn],fixedReturns:[],error:Wp,argumentsType:L.Fixed,returnsType:L.None,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var Hp=(n=>(n.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",n))(Hp||{}),Yp=(n=>(n.ListOfExecutionResults="sequential-execution-result-return-delaration",n.Error="sequential-execution-error-return-delaration",n))(Yp||{});const zp={id:"sequential-execution-list-of-functions-blueprint-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,dynamicReturnTypes:null,fixedReturns:[],error:null,parent:null},Zp={type:r.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:r.ValueDescriptor},Xp={id:"sequential-execution-list-of-functions-argument-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zp,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Zp},Qp={type:r.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:r.ValueDescriptor},Kp={id:"sequential-execution-list-of-execution-results-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Qp},ey={type:r.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},Mo={id:"sequential-execution-list-of-functions-argument-declaration",type:r.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:Xp,required:!0,index:0,parent:ey,parentRelationType:C.FixedArguments},ty={type:r.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},No={id:"sequential-execution-result-return-delaration",type:r.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:Kp,required:!0,index:0,parent:ty,parentRelationType:C.FixedReturns},ny={type:r.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},ry={id:"sequential-execution-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:ny,parentRelationType:C.ReturnedError},rn={id:Pe.Sequential,type:r.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:Pe.Sequential,fixedArguments:[Mo],fixedReturns:[No],error:ry,returnsType:L.Fixed,argumentsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},iy={[Pe.Parallel]:Lt,[Pe.Wait]:ot,[Pe.Sequential]:rn};var ay=(n=>(n.EntityToInstanciate="entity-to-instanciate-argument-declaration",n))(ay||{}),sy=(n=>(n.Error="create-new-instance-error-return-delaration",n))(sy||{});const oy={type:r.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},ly={id:"entity-to-instanciate-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:oy},cy={type:r.GenericReference,id:"create-new-instance-operation-ref",entityType:r.ActionDescriptor,entityId:Ze.CreateNewInstance},dy={id:"entity-to-instanciate-argument-declaration",type:r.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",dataType:ly,required:!0,parentRelationType:C.FixedArguments,index:0,parent:cy},uy={type:r.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:Ze.CreateNewInstance,entityType:r.ActionDescriptor},py={parentRelationType:C.FixedReturns,id:"create-new-instance-output-entity-declaration",type:r.ValueDescriptor,version:1,dataType:null,name:"Created entity",description:"The entity that was created",parent:uy,required:!0,index:0},yy={type:r.GenericReference,id:"create-new-instance-error-parent-ref",entityId:Ze.CreateNewInstance,entityType:r.ActionDescriptor},hy={parentRelationType:C.FixedReturns,id:"create-new-instance-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:yy},Cr={id:Ze.CreateNewInstance,type:r.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:Ze.CreateNewInstance,fixedArguments:[dy],fixedReturns:[py],error:hy,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var fy=(n=>(n.EntityToMatchType="validate-data-operation-entity-to-match-type-argument-declaration",n.DataToValidate="validate-data-operation-data-to-validate-argument-declaration",n))(fy||{}),my=(n=>(n.Error="validate-data-error-return-delaration",n.OutputEntity="validate-data-output-entity-declaration",n))(my||{});const Ty={type:r.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"validate-data-operation-data-to-validate-argument-declaration"},Ey={id:"validate-data-operation-data-to-validate-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ty},Ry={type:r.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Ze.Validate},by={id:"validate-data-operation-data-to-validate-argument-declaration",type:r.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:Ey,required:!0,parentRelationType:C.FixedArguments,index:0,parent:Ry},gy={type:r.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"validate-data-operation-entity-to-match-type-argument-declaration"},vy={id:"validate-data-operation-entity-to-match-type-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:gy},Iy={type:r.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Ze.Validate},Py={id:"validate-data-operation-entity-to-match-type-argument-declaration",type:r.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:vy,required:!0,index:0,parentRelationType:C.FixedArguments,parent:Iy},Dy={type:r.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:Ze.Validate,entityType:r.ActionDescriptor},Ay={id:"validate-data-output-entity-declaration",type:r.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",parent:Dy,required:!0,index:0,parentRelationType:C.FixedReturns},Sy={type:r.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ze.Validate,entityType:r.ActionDescriptor},Oy={id:"validate-data-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Sy,parentRelationType:C.ReturnedError},kn={id:Ze.Validate,type:r.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:Ze.Validate,fixedArguments:[Py,by],fixedReturns:[Ay],error:Oy,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},Cy={[Ze.CreateNewInstance]:Cr,[Ze.Validate]:kn};var $o=(n=>(n.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",n))($o||{});const Ve={[r.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[r.BuiltInBaseEntity]:{[_.KEY_VALUE_PARAM]:{id:_.KEY_VALUE_PARAM},[_.HTTP_ENDPOINT]:{id:_.HTTP_ENDPOINT,properties:{method:"http-endpoint-built-in-method-property-id",path:"http-endpoint-built-in-path-property-id",cors:"http-endpoint-built-in-cors-property-id"}},[_.PERSISTED_ENTITY]:{id:_.PERSISTED_ENTITY,properties:{database:"persisted-built-in-base-entity-database-property-id",identifier:"persisted-built-in-base-entity-identifier-property-id"}},[_.RELATIONAL_DATABASE]:{id:_.RELATIONAL_DATABASE,properties:{identifier:"relational-database-built-in-base-entity-identifier-property-id",username:"relational-database-built-in-base-entity-username-property-id",password:"relational-database-built-in-base-entity-password-property-id",minSize:"relational-database-built-in-base-entity-min-size-property-id",default:"relational-database-built-in-base-entity-default-property-id",autoscaling:"relational-database-built-in-base-entity-autoscaling-property-id"}},[_.CRON_JOB]:{id:_.CRON_JOB,properties:{expression:"cron-job-built-in-base-entity-expression-property-id"}}},[r.Operation]:{[ve.Join]:{id:ve.Join,inputs:{first:"join-string-first-string-input-id",second:"join-string-second-string-input-id"},outputs:{result:"join-string-result-string-return-delaration-id",error:"join-string-error-return-delaration-id"}},[Ye.HttpRequest]:{id:Ye.HttpRequest,inputs:{url:"http-request-url-input-id",query:"http-request-query-input-id",method:"http-request-method-input-id",headers:"http-request-headers-input-id",body:"http-request-body-string-input-id"},outputs:{code:"http-response-code-return-delaration-id",body:"http-response-body-return-delaration-id",headers:"http-response-headers-return-delaration-id",error:"http-request-error-return-delaration-id"}}},[r.Loop]:{[je.List]:{id:je.List,inputs:{list:"iterate-over-list-loop-list-input-id"},outputs:{results:"iterate-over-list-loop-output-id"}},[je.ManualFlow]:{id:je.ManualFlow,inputs:{},outputs:{results:"manual-flow-loop-output-id"}}},[r.Condition]:{[Oe.MoreThanOrEqual]:{id:Oe.MoreThanOrEqual,inputs:{leftHand:"condition-more-than-or-equal-left-hand-input-id",rightHand:"condition-more-than-or-equal-right-hand-input-id"}},[wt.NotEmpty]:{id:wt.NotEmpty,inputs:{leftHand:"condition-not-empty-input-id"}}},[r.GlobalEvent]:{[en.PROJECT_PUBLICATION_COMPLETED]:{id:en.PROJECT_PUBLICATION_COMPLETED}}},Je=Ve[r.Operation]["base-http-request"],By={type:r.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:r.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},wy={id:"http-request-url-default-value-id",type:r.PrimitiveValue,version:1,value:"https://some-url.com",name:v.String,valueAsType:null,parent:By,autogeneration:null},_y={type:r.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Je.inputs.url,entityType:r.ValueDescriptor},My={id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:wy,constant:!1,parent:_y},Ny={type:r.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Je.inputs.query,entityType:r.ValueDescriptor},$y={id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Ny},Vy={type:r.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:r.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},Ly={id:"http-request-method-default-value-id",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,valueAsType:null,parent:Vy,autogeneration:null},Gy={type:r.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Je.inputs.method,entityType:r.ValueDescriptor},Fy={id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:Ly,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:Gy},Uy={type:r.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Je.inputs.headers,entityType:r.ValueDescriptor},xy={id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Uy},jy={type:r.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Je.inputs.body,entityType:r.ValueDescriptor},ky={id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jy},qy={type:r.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:r.ValueDescriptor,entityId:Je.outputs.code},Jy={id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qy},Wy={type:r.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:r.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},Hy={type:r.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:r.ValueDescriptor,entityId:Je.outputs.headers},Yy={id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-headers-default-value-id",type:r.PrimitiveValue,version:1,value:{},name:v.JSON,parent:Wy,valueAsType:null,autogeneration:null},constant:!1,parent:Hy},zy={type:r.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:r.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},Zy={type:r.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:r.ValueDescriptor,entityId:Je.outputs.body},Xy={id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-body-default-value-id",type:r.PrimitiveValue,version:1,value:{},name:v.JSON,parent:zy,valueAsType:null,autogeneration:null},constant:!1,parent:Zy},Qy={type:r.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Ia={id:Je.inputs.method,type:r.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:Fy,required:!1,index:0,parentRelationType:C.FixedArguments,parent:Qy},Ky={type:r.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Pa={id:Je.inputs.url,type:r.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:My,required:!1,index:1,parentRelationType:C.FixedArguments,parent:Ky},eh={type:r.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Vo={id:Je.inputs.query,type:r.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:$y,required:!1,index:2,parentRelationType:C.FixedArguments,parent:eh},th={type:r.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Da={id:Je.inputs.headers,type:r.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:xy,required:!1,index:3,parent:th,parentRelationType:C.FixedArguments},nh={type:r.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Aa={id:Je.inputs.body,type:r.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:ky,required:!1,index:4,parentRelationType:C.FixedArguments,parent:nh},rh={type:r.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Lo={id:Je.outputs.code,type:r.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:Jy,required:!0,index:0,parentRelationType:C.FixedReturns,parent:rh},ih={type:r.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Sa={parentRelationType:C.FixedReturns,id:Je.outputs.headers,type:r.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:Yy,required:!0,index:1,parent:ih},ah={type:r.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},fi={parentRelationType:C.FixedReturns,id:Je.outputs.body,type:r.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:Xy,required:!0,index:2,parent:ah},sh={type:r.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},oh={type:r.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:r.ValueDescriptor,entityId:Je.outputs.error},lh={id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:oh},Go={parentRelationType:C.ReturnedError,id:Je.outputs.error,type:r.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:lh,required:!0,index:0,parent:sh},mi={type:r.ActionDescriptor,id:Ye.HttpRequest,name:Ye.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,fixedArguments:[Ia,Pa,Vo,Da,Aa],fixedReturns:[Lo,Sa,fi],argumentsType:L.Fixed,returnsType:L.Fixed,error:Go,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},ch={[Ye.HttpRequest]:mi},oI={...gu,...ou,...Op,...iy,...Cy,...ch},dh=Ve[r.Loop]["list-loop"],uh={id:"iterate-over-list-loop-return-declaration-parent-ref-id",type:r.GenericReference,entityId:je.List,entityType:r.ActionDescriptor},ph={id:dh.outputs.results,type:r.ValueDescriptor,version:1,name:"Results",description:"List of results from the loop. One item in the list for each iteration of the loop.",dataType:null,required:!0,index:0,parent:uh,parentRelationType:C.FixedReturns},yh={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:r.ArgumentDeclaration},hh={id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:yh},fh={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:je.List,entityType:r.ActionDescriptor},mh={id:dh.inputs.list,type:r.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:hh,index:0,parent:fh,parentRelationType:C.FixedArguments},qn={id:je.List,type:r.ActionDescriptor,version:1,name:je.List,description:"Iterates over a list of entities",fixedArguments:[mh],fixedReturns:[ph],error:null,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},lI=Ve[r.Loop]["list-loop"],Th={id:"manual-flow-loop-previous-iterations-results-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:"manual-flow-loop-previous-iterations-results-declaration-id",entityType:r.ReturnDeclaration},Eh={id:"manual-flow-loop-previous-iterations-results-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:Th},Rh={id:"manual-flow-loop-previous-iterations-results-declaration-parent-ref-id",type:r.GenericReference,entityId:je.ManualFlow,entityType:r.ActionDescriptor},bh={id:lI.outputs.results,type:r.ValueDescriptor,version:1,name:"Results",description:"List of results from the loop. One item in the list for each iteration of the loop.",dataType:Eh,required:!0,index:1,parentRelationType:C.FixedReturns,parent:Rh},Fo={id:je.ManualFlow,type:r.ActionDescriptor,version:1,name:je.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.",fixedArguments:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,fixedReturns:[bh],argumentsType:L.None,returnsType:L.Fixed,error:null,parent:null},Oa=Ve[r.BuiltInBaseEntity][_.KEY_VALUE_PARAM],cI={id:"key-value-param-built-in-base-entity-name-property-data-type-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property-data-type",entityType:r.DataType},gh={id:"key-value-param-built-in-base-entity-name-property-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property",entityType:r.Property},dI={id:"key-value-param-built-in-base-entity-name-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:null,parent:gh},vh={id:"key-value-param-built-in-base-entity-name-property-parent-ref",type:r.GenericReference,entityId:Oa.id,entityType:r.BuiltInBaseEntity},Ih={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-name-property",name:"Parameter name",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:dI,description:"The name of the path parameter",parent:vh},uI={id:"key-value-param-built-in-base-entity-value-property-data-type-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property-data-type",entityType:r.DataType},Ph={id:"key-value-param-built-in-base-entity-value-property-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property",entityType:r.Property},pI={id:"key-value-param-built-in-base-entity-value-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:null,parent:Ph},Dh={id:"key-value-param-built-in-base-entity-value-property-parent-ref",type:r.GenericReference,entityId:Oa.id,entityType:r.BuiltInBaseEntity},Ah={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-value-property",name:"Parameter Value",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:1,dataType:pI,description:"The value of the path parameter",parent:Dh},Ca={id:Oa.id,version:1,description:'An entity with a "name" and "value" property representing a breakdown of a key-value pair.',name:Oa.id,type:r.BuiltInBaseEntity,abstract:!1,static:!1,interactive:!0,properties:[Ih,Ah],abstractMethods:[],methods:[],extends:[]},Ti=Ve[r.BuiltInBaseEntity][_.HTTP_ENDPOINT].properties,Sh={id:"endpointBuiltInCorsPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},Oh={id:"endpointBuiltInCorsPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:Ti.cors},Ch={id:"endpointBuiltInCorsPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:["*"],parent:Sh,autogeneration:null,valueAsType:null},parent:Oh},Bh={id:"endpointBuiltInBaseEntityRef",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},wh={hidden:!0,required:!0,id:Ti.cors,name:"Allowed origins",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:Ch,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:Bh},_h={id:"endpointBuiltInPathPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInPathPropertyDataType"},Mh={id:"endpointBuiltInPathPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:Ti.path},Nh={id:"endpointBuiltInPathPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.String,value:"/",parent:_h,autogeneration:null,valueAsType:null},parent:Mh},$h={id:"endpointBuiltInBaseEntityRefTwo",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Uo={hidden:!1,required:!0,id:Ti.path,name:"Path",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:Nh,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:$h},Vh={id:"endpointBuiltInMethodPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},Lh={id:"endpointBuiltInMethodPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"endpointBuiltInMethodProperty"},Gh={id:"endpointBuiltInMethodPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:gn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,parent:Vh,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:Lh},Fh={id:"endpointBuiltInBaseEntityRefThree",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},xo={hidden:!1,required:!0,id:Ti.method,name:"Method",version:1,type:r.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:Gh,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:Fh},Uh={id:"endpointRequestHeadersVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointRequestHeadersVariableDataType"},xh={id:"endpointRequestHeadersArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},jh={id:"endpointRequestHeadersVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:Uh,autogeneration:null,valueAsType:null},parent:xh},kh={id:"endpointRequestBodyArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},qh={id:"endpointRequestBodyVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:kh},Jh={id:"endpointRequestQueryParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},Wh={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},Hh={id:"endpointRequestQueryParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:Ca,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:[],parent:Jh,autogeneration:null,valueAsType:null},parent:Wh},Yh={id:"endpointPathParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointPathParamsVariableDataType"},zh={id:"endpointPathParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},Zh={id:"endpointPathParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Ca,asType:!1,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:[],parent:Yh,autogeneration:null,valueAsType:null},parent:zh},Xh={id:"endpointReachedTriggerActionDescriptorRef",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Qh={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:r.ValueDescriptor,name:"Request headers",dataType:jh,required:!0,index:0,parentRelationType:C.FixedArguments,parent:Xh},Kh={id:"endpointReachedTriggerActionDescriptorRefTwo",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},ef={id:"endpointPathParamsArgumentDeclaration",type:r.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:Zh,required:!0,index:1,parentRelationType:C.FixedArguments,parent:Kh},tf={id:"endpointReachedTriggerActionDescriptorRefThree",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},nf={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:r.ValueDescriptor,name:"Request query params",dataType:Hh,required:!0,index:2,parentRelationType:C.FixedArguments,parent:tf},rf={id:"endpointReachedTriggerActionDescriptorRefFour",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},af={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:r.ValueDescriptor,name:"Request body",dataType:qh,index:3,required:!0,parentRelationType:C.FixedArguments,parent:rf},sf={id:"endpointResponseCodeReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},of={id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:sf},lf={id:"endpointReturnStatementRef",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},cf={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:r.ValueDescriptor,name:"Response code",dataType:of,required:!0,index:0,parentRelationType:C.FixedReturns,parent:lf},df={id:"endpointResponseHeadersDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointResponseHeadersDataType"},uf={id:"endpointResponseHeadersReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},pf={id:"endpointResponseHeadersDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:df,autogeneration:null,valueAsType:null},parent:uf},yf={id:"endpointReturnStatementRefTwo",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},hf={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:r.ValueDescriptor,name:"Response headers",dataType:pf,required:!1,index:1,parentRelationType:C.FixedReturns,parent:yf},ff={id:"endpointResponseBodyReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},mf={id:"endpointResponseBodyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:ff},Tf={id:"endpointReturnStatementRefThree",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},Ef={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:r.ValueDescriptor,name:"Response body",dataType:mf,required:!1,index:2,parentRelationType:C.FixedReturns,parent:Tf},Rf={id:"endpointBuiltInBaseEntityRefFour",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},jo={id:"endpointReachedTriggerActionDescriptor",type:r.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",argumentsType:L.Fixed,dynamicArgumentTypes:null,fixedArguments:[Qh,ef,nf,af],returnsType:L.Fixed,fixedReturns:[cf,hf,Ef],error:null,dynamicReturnTypes:null,parent:Rf},Ba={id:_.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:_.HTTP_ENDPOINT,type:r.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[wh,Uo,xo],abstractMethods:[jo],extends:[],methods:[]},_t=Ve[r.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,bf={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-identifier-property-data-type-id",entityType:r.DataType},gf={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:r.GenericReference,entityId:_t.properties.identifier,entityType:r.Property},yI={id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:null,parent:bf,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:gf},Br={id:"relational-database-built-in-base-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},wa={hidden:!1,required:!0,id:_t.properties.identifier,name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:yI,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Br},hI={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:r.DataType},vf={id:"relational-database-built-in-base-entity-username-property-ref-id",type:r.GenericReference,entityId:_t.properties.username,entityType:r.Property},fI={id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-id",entityType:r.DataType},autogeneration:null,valueAsType:null},parent:vf},_a={hidden:!1,required:!0,id:_t.properties.username,name:"Username",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:fI,description:"The username that will be used to connect to the database.",parent:Br},mI={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:r.DataType},If={id:"relational-database-built-in-base-entity-password-property-ref-id",type:r.GenericReference,entityId:_t.properties.password,entityType:r.Property},TI={id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:If},Ma={hidden:!1,required:!0,id:_t.properties.password,name:"Password",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:TI,description:"The password that will be used to connect to the database.",parent:Br},Pf={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-min-size-property-data-type-id",entityType:r.DataType},Df={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:r.GenericReference,entityId:_t.properties.minSize,entityType:r.Property},EI={id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:Pf,autogeneration:null,valueAsType:null},parent:Df},Na={hidden:!0,required:!0,id:_t.properties.minSize,name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:EI,description:"The minimum size of the database in GB.",parent:Br},Af={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-default-property-data-type-id",entityType:r.DataType},Sf={id:"relational-database-built-in-base-entity-default-property-ref-id",type:r.GenericReference,entityId:_t.properties.default,entityType:r.Property},RI={id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:bn,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!1,parent:Af,autogeneration:null,valueAsType:null},parent:Sf},ko={hidden:!0,required:!0,id:_t.properties.default,name:"Default",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:RI,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Br},Of={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:r.GenericReference,entityId:_t.properties.autoscaling,entityType:r.Property},Cf={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",entityType:r.DataType},bI={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:bn,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!1,parent:Cf,autogeneration:null,valueAsType:null},parent:Of},Bf={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},qo={hidden:!0,required:!0,id:_t.properties.autoscaling,name:"Auto-scaling",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:bI,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:Bf},vn={id:_.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:_.RELATIONAL_DATABASE,type:r.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[wa,_a,Ma,Na,ko,qo],abstractMethods:[],methods:[],extends:[]},wf={type:r.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:r.BuiltInBaseEntity,id:Pt.DeletePersistedEntity},Jo={type:r.FunctionDeclaration,id:Pt.DeletePersistedEntity,name:Pt.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:wf,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},_f={type:r.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:r.BuiltInBaseEntity,id:Pt.SoftDeletePersistedEntity},Mf={type:r.FunctionDeclaration,id:Pt.SoftDeletePersistedEntity,name:Pt.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:_f,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},Nf=Ve[r.BuiltInBaseEntity][_.PERSISTED_ENTITY].properties,gI={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:r.DataType},$f={id:"persisted-built-in-base-entity-database-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:r.Property},vI={id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:vn,asType:!1,defaultValue:null,parent:$f},Vf={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Ei={hidden:!0,required:!0,id:Nf.database,name:"Database",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:vI,description:"The database that the entity belongs to.",parent:Vf},Lf={id:"persisted-built-in-base-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-data-type-id",entityType:r.DataType},Gf={id:"persisted-built-in-base-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-id",entityType:r.Property},II={id:"persisted-built-in-base-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Ea,asType:!1,defaultValue:{id:"persisted-built-in-base-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.UUID,value:null,parent:Lf,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:Gf},Ff={id:"persisted-built-in-base-entity-identifier-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Uf={hidden:!1,required:!0,id:Nf.identifier,name:"Identifier",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:II,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:Ff},PI={id:"persisted-built-in-base-entity-deleted-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-data-type-id",entityType:r.DataType},xf={id:"persisted-built-in-base-entity-deleted-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-id",entityType:r.Property},jf={id:"persisted-built-in-base-entity-deleted-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:nn,asType:!1,defaultValue:null,parent:xf},kf={id:"persisted-built-in-base-entity-deleted-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},qf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-deleted-at-property-id",name:"Deleted at",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:jf,description:"The date and time when the entity was deleted.",parent:kf},DI={id:"persisted-built-in-base-entity-created-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-data-type-id",entityType:r.DataType},Jf={id:"persisted-built-in-base-entity-created-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-id",entityType:r.Property},Wf={id:"persisted-built-in-base-entity-created-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:nn,asType:!1,defaultValue:null,parent:Jf},Hf={id:"persisted-built-in-base-entity-created-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Yf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-created-at-property-id",name:"Created at",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Wf,description:"The date and time when the entity was created.",parent:Hf},AI={id:"persisted-built-in-base-entity-updated-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-data-type-id",entityType:r.DataType},zf={id:"persisted-built-in-base-entity-updated-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-id",entityType:r.Property},Zf={id:"persisted-built-in-base-entity-updated-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:nn,asType:!1,defaultValue:null,parent:zf},Xf={id:"persisted-built-in-base-entity-updated-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Qf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-updated-at-property-id",name:"Updated at",version:1,type:r.Property,private:!1,implements:null,abstract:!1,static:!1,index:0,dataType:Zf,description:"The date and time when the entity was last updated.",parent:Xf},_e={id:_.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:_.PERSISTED_ENTITY,type:r.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[Ei,Uf,qf,Yf,Qf],methods:[Jo,Mf],extends:[]},Kf={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Wo={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:r.ActionDescriptor,argumentsType:L.None,returnsType:L.None,description:"Executed when the cron job is triggered",fixedArguments:[],dynamicArgumentTypes:null,error:null,fixedReturns:[],dynamicReturnTypes:null,parent:Kf},em=Ve[r.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,SI={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:r.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:r.DataType},tm={id:"cron-job-built-in-base-entity-expression-property-ref",type:r.GenericReference,entityId:em.properties.expression,entityType:r.Property},OI={id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:tm},nm={id:"cron-job-built-in-base-entity-ref",type:r.GenericReference,entityId:_.CRON_JOB,entityType:r.BuiltInBaseEntity},rm={hidden:!1,required:!0,id:em.properties.expression,name:"Cron expression",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:OI,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:nm},Ho={id:_.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:_.CRON_JOB,type:r.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[rm],methods:[],abstractMethods:[Wo],extends:[]},im={type:r.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:r.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Yo={id:"execution-built-in-entity-abort-method-id",type:r.FunctionDeclaration,version:1,name:Pt.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:im},zo={id:_.EXECUTION,type:r.BuiltInBaseEntity,version:1,name:_.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:[Yo],abstractMethods:[]},CI=Ve[r.Condition]["not-empty"],am={type:r.GenericReference,id:"not-empty-condition-ref",entityType:r.ActionDescriptor,entityId:wt.NotEmpty},sm={id:CI.inputs.leftHand,type:r.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:0,parent:am},Jn={type:r.ActionDescriptor,id:wt.NotEmpty,version:1,name:wt.NotEmpty,description:"Checks if the value is not empty",parent:null,fixedArguments:[sm],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.Fixed,returnsType:L.None,error:null},om={[wt.NotEmpty]:Jn},lm=Ve[r.Condition]["more-than-or-equal"],cm={type:r.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Oe.MoreThanOrEqual},dm={id:lm.inputs.leftHand,type:r.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:0,parent:cm},um={type:r.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Oe.MoreThanOrEqual},pm={id:lm.inputs.rightHand,type:r.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:1,parent:um},wr={type:r.ActionDescriptor,id:Oe.MoreThanOrEqual,version:1,name:Oe.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,fixedArguments:[dm,pm],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.Fixed,returnsType:L.None,error:null},ym={[Oe.MoreThanOrEqual]:wr},BI={...om,...ym},$a={type:r.ActionDescriptor,id:en.PROJECT_PUBLICATION_COMPLETED,version:1,name:en.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,fixedArguments:[],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.None,returnsType:L.None,error:null},wI={[en.PROJECT_PUBLICATION_COMPLETED]:$a},Zo=Ve[r.ValueDescriptor][$o.ActionOngoingProcessOutputValue],hm={type:r.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:r.ValueDescriptor,entityId:Zo.id},fm={id:Zo.dataType.id,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zo,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hm},Xo={id:Zo.id,type:r.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:fm,required:!0,index:0,parent:null,parentRelationType:C.OngoingProcessExecution};var z;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const s={};for(const o of a)s[o]=o;return s},n.getValidEnumValues=a=>{const s=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),o={};for(const d of s)o[d]=a[d];return n.objectValues(o)},n.objectValues=a=>n.objectKeys(a).map(function(s){return a[s]}),n.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},n.find=(a,s)=>{for(const o of a)if(s(o))return o},n.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)}n.joinValues=i,n.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(z||(z={}));var Qo;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(Qo||(Qo={}));const M=z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),In=n=>{switch(typeof n){case"undefined":return M.undefined;case"string":return M.string;case"number":return isNaN(n)?M.nan:M.number;case"boolean":return M.boolean;case"function":return M.function;case"bigint":return M.bigint;case"symbol":return M.symbol;case"object":return Array.isArray(n)?M.array:n===null?M.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?M.promise:typeof Map<"u"&&n instanceof Map?M.map:typeof Set<"u"&&n instanceof Set?M.set:typeof Date<"u"&&n instanceof Date?M.date:M.object;default:return M.unknown}},P=z.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"]),_I=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class mt 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 d=i,p=0;for(;p<o.path.length;){const h=o.path[p];p===o.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(o))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return a(this),i}static assert(e){if(!(e instanceof mt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z.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()}}mt.create=n=>new mt(n);const _r=(n,e)=>{let t;switch(n.code){case P.invalid_type:n.received===M.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case P.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,z.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:t=`Unrecognized key(s) in object: ${z.joinValues(n.keys,", ")}`;break;case P.invalid_union:t="Invalid input";break;case P.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${z.joinValues(n.options)}`;break;case P.invalid_enum_value:t=`Invalid enum value. Expected ${z.joinValues(n.options)}, received '${n.received}'`;break;case P.invalid_arguments:t="Invalid function arguments";break;case P.invalid_return_type:t="Invalid function return type";break;case P.invalid_date:t="Invalid date";break;case P.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:z.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case P.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case P.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case P.custom:t="Invalid input";break;case P.invalid_intersection_types:t="Intersection results could not be merged";break;case P.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case P.not_finite:t="Number must be finite";break;default:t=e.defaultError,z.assertNever(n)}return{message:t}};let mm=_r;function MI(n){mm=n}function Va(){return mm}const La=n=>{const{data:e,path:t,errorMaps:i,issueData:a}=n,s=[...t,...a.path||[]],o={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let d="";const p=i.filter(h=>!!h).slice().reverse();for(const h of p)d=h(o,{data:e,defaultError:d}).message;return{...a,path:s,message:d}},NI=[];function w(n,e){const t=Va(),i=La({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===_r?void 0:_r].filter(a=>!!a)});n.common.issues.push(i)}class Qe{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 x;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 Qe.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 x;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 x=Object.freeze({status:"aborted"}),Mr=n=>({status:"dirty",value:n}),lt=n=>({status:"valid",value:n}),Ko=n=>n.status==="aborted",el=n=>n.status==="dirty",Ri=n=>n.status==="valid",bi=n=>typeof Promise<"u"&&n instanceof Promise;function Ga(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)}function Tm(n,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"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?a.call(n,t):a?a.value=t:e.set(n,t),t}typeof SuppressedError=="function"&&SuppressedError;var V;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(V||(V={}));var gi,vi;class kt{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 Em=(n,e)=>{if(Ri(e))return{success:!0,data:e.value};if(!n.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 mt(n.common.issues);return this._error=t,this._error}}};function J(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:a}=n;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,d)=>{var p,h;const{message:T}=n;return o.code==="invalid_enum_value"?{message:T??d.defaultError}:typeof d.data>"u"?{message:(p=T??i)!==null&&p!==void 0?p:d.defaultError}:o.code!=="invalid_type"?{message:d.defaultError}:{message:(h=T??t)!==null&&h!==void 0?h:d.defaultError}},description:a}}class H{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 In(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Qe,ctx:{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(bi(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:In(e)},s=this._parseSync({data:e,path:a.path,parent:a});return Em(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:In(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(bi(a)?a:Promise.resolve(a));return Em(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),d=()=>s.addIssue({code:P.custom,...i(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(p=>p?!0:(d(),!1)):o?!0:(d(),!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 Ut({schema:this,typeName:U.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Jt.create(this,this._def)}nullable(){return Sn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ft.create(this,this._def)}promise(){return Lr.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Si.create(this,e,this._def)}transform(e){return new Ut({...J(this._def),schema:this,typeName:U.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new _i({...J(this._def),innerType:this,defaultValue:t,typeName:U.ZodDefault})}brand(){return new rl({typeName:U.ZodBranded,type:this,...J(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Mi({...J(this._def),innerType:this,catchValue:t,typeName:U.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ni.create(this,e)}readonly(){return $i.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $I=/^c[^\s-]{8,}$/i,VI=/^[0-9a-z]+$/,LI=/^[0-9A-HJKMNP-TV-Z]{26}$/,GI=/^[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,FI=/^[a-z0-9_-]{21}$/i,UI=/^[-+]?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)?)??$/,xI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tl;const kI=/^(?:(?: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])$/,qI=/^(([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})))$/,JI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Rm="((\\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])))",WI=new RegExp(`^${Rm}$`);function bm(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function HI(n){return new RegExp(`^${bm(n)}$`)}function gm(n){let e=`${Rm}T${bm(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function YI(n,e){return!!((e==="v4"||!e)&&kI.test(n)||(e==="v6"||!e)&&qI.test(n))}class Gt extends H{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==M.string){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.string,received:s.parsedType}),x}const i=new Qe;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:P.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),w(a,{code:P.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,d=e.data.length<s.value;(o||d)&&(a=this._getOrReturnCtx(e,a),o?w(a,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):d&&w(a,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")xI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")tl||(tl=new RegExp(jI,"u")),tl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")GI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")FI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")$I.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")VI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")LI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:P.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),w(a,{validation:"regex",code:P.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),w(a,{code:P.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),w(a,{code:P.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?gm(s).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?WI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?HI(s).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?UI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:P.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?YI(e.data,s.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:P.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?JI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:P.invalid_string,message:s.message}),i.dirty()):z.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(a=>e.test(a),{validation:t,code:P.invalid_string,...V.errToObj(i)})}_addCheck(e){return new Gt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...V.errToObj(e)})}url(e){return this._addCheck({kind:"url",...V.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...V.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...V.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...V.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...V.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...V.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...V.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...V.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...V.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,...V.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,...V.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...V.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...V.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...V.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...V.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...V.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...V.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...V.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...V.errToObj(t)})}nonempty(e){return this.min(1,V.errToObj(e))}trim(){return new Gt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gt({...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}}Gt.create=n=>{var e;return new Gt({checks:[],typeName:U.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...J(n)})};function zI(n,e){const t=(n.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=t>i?t:i,s=parseInt(n.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class Pn extends H{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)!==M.number){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.number,received:s.parsedType}),x}let i;const a=new Qe;for(const s of this._def.checks)s.kind==="int"?z.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),w(i,{code:P.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),w(i,{code:P.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),w(i,{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?zI(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),w(i,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),w(i,{code:P.not_finite,message:s.message}),a.dirty()):z.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,V.toString(t))}gt(e,t){return this.setLimit("min",e,!1,V.toString(t))}lte(e,t){return this.setLimit("max",e,!0,V.toString(t))}lt(e,t){return this.setLimit("max",e,!1,V.toString(t))}setLimit(e,t,i,a){return new Pn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:V.toString(a)}]})}_addCheck(e){return new Pn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:V.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:V.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:V.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:V.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:V.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:V.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:V.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:V.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:V.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"&&z.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)}}Pn.create=n=>new Pn({checks:[],typeName:U.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...J(n)});class Dn extends H{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)!==M.bigint){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.bigint,received:s.parsedType}),x}let i;const a=new Qe;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),w(i,{code:P.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),w(i,{code:P.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),w(i,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):z.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,V.toString(t))}gt(e,t){return this.setLimit("min",e,!1,V.toString(t))}lte(e,t){return this.setLimit("max",e,!0,V.toString(t))}lt(e,t){return this.setLimit("max",e,!1,V.toString(t))}setLimit(e,t,i,a){return new Dn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:V.toString(a)}]})}_addCheck(e){return new Dn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:V.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:V.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:V.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:V.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:V.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}}Dn.create=n=>{var e;return new Dn({checks:[],typeName:U.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...J(n)})};class Ii extends H{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==M.boolean){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.boolean,received:i.parsedType}),x}return lt(e.data)}}Ii.create=n=>new Ii({typeName:U.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...J(n)});class Wn extends H{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==M.date){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.date,received:s.parsedType}),x}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_date}),x}const i=new Qe;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:P.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),w(a,{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):z.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:V.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:V.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}}Wn.create=n=>new Wn({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:U.ZodDate,...J(n)});class Fa extends H{_parse(e){if(this._getType(e)!==M.symbol){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.symbol,received:i.parsedType}),x}return lt(e.data)}}Fa.create=n=>new Fa({typeName:U.ZodSymbol,...J(n)});class Pi extends H{_parse(e){if(this._getType(e)!==M.undefined){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.undefined,received:i.parsedType}),x}return lt(e.data)}}Pi.create=n=>new Pi({typeName:U.ZodUndefined,...J(n)});class Di extends H{_parse(e){if(this._getType(e)!==M.null){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.null,received:i.parsedType}),x}return lt(e.data)}}Di.create=n=>new Di({typeName:U.ZodNull,...J(n)});class Nr extends H{constructor(){super(...arguments),this._any=!0}_parse(e){return lt(e.data)}}Nr.create=n=>new Nr({typeName:U.ZodAny,...J(n)});class Hn extends H{constructor(){super(...arguments),this._unknown=!0}_parse(e){return lt(e.data)}}Hn.create=n=>new Hn({typeName:U.ZodUnknown,...J(n)});class an extends H{_parse(e){const t=this._getOrReturnCtx(e);return w(t,{code:P.invalid_type,expected:M.never,received:t.parsedType}),x}}an.create=n=>new an({typeName:U.ZodNever,...J(n)});class Ua extends H{_parse(e){if(this._getType(e)!==M.undefined){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.void,received:i.parsedType}),x}return lt(e.data)}}Ua.create=n=>new Ua({typeName:U.ZodVoid,...J(n)});class Ft extends H{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),a=this._def;if(t.parsedType!==M.array)return w(t,{code:P.invalid_type,expected:M.array,received:t.parsedType}),x;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(o||d)&&(w(t,{code:o?P.too_big:P.too_small,minimum:d?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&&(w(t,{code:P.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&&(w(t,{code:P.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,d)=>a.type._parseAsync(new kt(t,o,t.path,d)))).then(o=>Qe.mergeArray(i,o));const s=[...t.data].map((o,d)=>a.type._parseSync(new kt(t,o,t.path,d)));return Qe.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new Ft({...this._def,minLength:{value:e,message:V.toString(t)}})}max(e,t){return new Ft({...this._def,maxLength:{value:e,message:V.toString(t)}})}length(e,t){return new Ft({...this._def,exactLength:{value:e,message:V.toString(t)}})}nonempty(e){return this.min(1,e)}}Ft.create=(n,e)=>new Ft({type:n,minLength:null,maxLength:null,exactLength:null,typeName:U.ZodArray,...J(e)});function $r(n){if(n instanceof Ne){const e={};for(const t in n.shape){const i=n.shape[t];e[t]=Jt.create($r(i))}return new Ne({...n._def,shape:()=>e})}else return n instanceof Ft?new Ft({...n._def,type:$r(n.element)}):n instanceof Jt?Jt.create($r(n.unwrap())):n instanceof Sn?Sn.create($r(n.unwrap())):n instanceof qt?qt.create(n.items.map(e=>$r(e))):n}class Ne extends H{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=z.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==M.object){const h=this._getOrReturnCtx(e);return w(h,{code:P.invalid_type,expected:M.object,received:h.parsedType}),x}const{status:i,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),d=[];if(!(this._def.catchall instanceof an&&this._def.unknownKeys==="strip"))for(const h in a.data)o.includes(h)||d.push(h);const p=[];for(const h of o){const T=s[h],f=a.data[h];p.push({key:{status:"valid",value:h},value:T._parse(new kt(a,f,a.path,h)),alwaysSet:h in a.data})}if(this._def.catchall instanceof an){const h=this._def.unknownKeys;if(h==="passthrough")for(const T of d)p.push({key:{status:"valid",value:T},value:{status:"valid",value:a.data[T]}});else if(h==="strict")d.length>0&&(w(a,{code:P.unrecognized_keys,keys:d}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const T of d){const f=a.data[T];p.push({key:{status:"valid",value:T},value:h._parse(new kt(a,f,a.path,T)),alwaysSet:T in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const h=[];for(const T of p){const f=await T.key,b=await T.value;h.push({key:f,value:b,alwaysSet:T.alwaysSet})}return h}).then(h=>Qe.mergeObjectSync(i,h)):Qe.mergeObjectSync(i,p)}get shape(){return this._def.shape()}strict(e){return V.errToObj,new Ne({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var a,s,o,d;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:(d=V.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new Ne({...this._def,unknownKeys:"strip"})}passthrough(){return new Ne({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ne({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ne({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:U.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ne({...this._def,catchall:e})}pick(e){const t={};return z.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new Ne({...this._def,shape:()=>t})}omit(e){const t={};return z.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new Ne({...this._def,shape:()=>t})}deepPartial(){return $r(this)}partial(e){const t={};return z.objectKeys(this.shape).forEach(i=>{const a=this.shape[i];e&&!e[i]?t[i]=a:t[i]=a.optional()}),new Ne({...this._def,shape:()=>t})}required(e){const t={};return z.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Jt;)s=s._def.innerType;t[i]=s}}),new Ne({...this._def,shape:()=>t})}keyof(){return vm(z.objectKeys(this.shape))}}Ne.create=(n,e)=>new Ne({shape:()=>n,unknownKeys:"strip",catchall:an.create(),typeName:U.ZodObject,...J(e)}),Ne.strictCreate=(n,e)=>new Ne({shape:()=>n,unknownKeys:"strict",catchall:an.create(),typeName:U.ZodObject,...J(e)}),Ne.lazycreate=(n,e)=>new Ne({shape:n,unknownKeys:"strip",catchall:an.create(),typeName:U.ZodObject,...J(e)});class Ai extends H{_parse(e){const{ctx:t}=this._processInputParams(e),i=this._def.options;function a(s){for(const d of s)if(d.result.status==="valid")return d.result;for(const d of s)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const o=s.map(d=>new mt(d.ctx.common.issues));return w(t,{code:P.invalid_union,unionErrors:o}),x}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 h={...t,common:{...t.common,issues:[]},parent:null},T=p._parseSync({data:t.data,path:t.path,parent:h});if(T.status==="valid")return T;T.status==="dirty"&&!s&&(s={result:T,ctx:h}),h.common.issues.length&&o.push(h.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const d=o.map(p=>new mt(p));return w(t,{code:P.invalid_union,unionErrors:d}),x}}get options(){return this._def.options}}Ai.create=(n,e)=>new Ai({options:n,typeName:U.ZodUnion,...J(e)});const sn=n=>n instanceof Ci?sn(n.schema):n instanceof Ut?sn(n.innerType()):n instanceof Bi?[n.value]:n instanceof An?n.options:n instanceof wi?z.objectValues(n.enum):n instanceof _i?sn(n._def.innerType):n instanceof Pi?[void 0]:n instanceof Di?[null]:n instanceof Jt?[void 0,...sn(n.unwrap())]:n instanceof Sn?[null,...sn(n.unwrap())]:n instanceof rl||n instanceof $i?sn(n.unwrap()):n instanceof Mi?sn(n._def.innerType):[];class xa extends H{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.object)return w(t,{code:P.invalid_type,expected:M.object,received:t.parsedType}),x;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}):(w(t,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),x)}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=sn(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 d of o){if(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,s)}}return new xa({typeName:U.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...J(i)})}}function nl(n,e){const t=In(n),i=In(e);if(n===e)return{valid:!0,data:n};if(t===M.object&&i===M.object){const a=z.objectKeys(e),s=z.objectKeys(n).filter(d=>a.indexOf(d)!==-1),o={...n,...e};for(const d of s){const p=nl(n[d],e[d]);if(!p.valid)return{valid:!1};o[d]=p.data}return{valid:!0,data:o}}else if(t===M.array&&i===M.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<n.length;s++){const o=n[s],d=e[s],p=nl(o,d);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===M.date&&i===M.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class Si extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Ko(s)||Ko(o))return x;const d=nl(s.value,o.value);return d.valid?((el(s)||el(o))&&t.dirty(),{status:t.value,value:d.data}):(w(i,{code:P.invalid_intersection_types}),x)};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}))}}Si.create=(n,e,t)=>new Si({left:n,right:e,typeName:U.ZodIntersection,...J(t)});class qt extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==M.array)return w(i,{code:P.invalid_type,expected:M.array,received:i.parsedType}),x;if(i.data.length<this._def.items.length)return w(i,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&i.data.length>this._def.items.length&&(w(i,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...i.data].map((o,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new kt(i,o,i.path,d)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>Qe.mergeArray(t,o)):Qe.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new qt({...this._def,rest:e})}}qt.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qt({items:n,typeName:U.ZodTuple,rest:null,...J(e)})};class Oi extends H{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!==M.object)return w(i,{code:P.invalid_type,expected:M.object,received:i.parsedType}),x;const a=[],s=this._def.keyType,o=this._def.valueType;for(const d in i.data)a.push({key:s._parse(new kt(i,d,i.path,d)),value:o._parse(new kt(i,i.data[d],i.path,d)),alwaysSet:d in i.data});return i.common.async?Qe.mergeObjectAsync(t,a):Qe.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof H?new Oi({keyType:e,valueType:t,typeName:U.ZodRecord,...J(i)}):new Oi({keyType:Gt.create(),valueType:e,typeName:U.ZodRecord,...J(t)})}}class ja extends H{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!==M.map)return w(i,{code:P.invalid_type,expected:M.map,received:i.parsedType}),x;const a=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([d,p],h)=>({key:a._parse(new kt(i,d,i.path,[h,"key"])),value:s._parse(new kt(i,p,i.path,[h,"value"]))}));if(i.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of o){const h=await p.key,T=await p.value;if(h.status==="aborted"||T.status==="aborted")return x;(h.status==="dirty"||T.status==="dirty")&&t.dirty(),d.set(h.value,T.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const p of o){const h=p.key,T=p.value;if(h.status==="aborted"||T.status==="aborted")return x;(h.status==="dirty"||T.status==="dirty")&&t.dirty(),d.set(h.value,T.value)}return{status:t.value,value:d}}}}ja.create=(n,e,t)=>new ja({valueType:e,keyType:n,typeName:U.ZodMap,...J(t)});class Yn extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==M.set)return w(i,{code:P.invalid_type,expected:M.set,received:i.parsedType}),x;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(w(i,{code:P.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&&(w(i,{code:P.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 h=new Set;for(const T of p){if(T.status==="aborted")return x;T.status==="dirty"&&t.dirty(),h.add(T.value)}return{status:t.value,value:h}}const d=[...i.data.values()].map((p,h)=>s._parse(new kt(i,p,i.path,h)));return i.common.async?Promise.all(d).then(p=>o(p)):o(d)}min(e,t){return new Yn({...this._def,minSize:{value:e,message:V.toString(t)}})}max(e,t){return new Yn({...this._def,maxSize:{value:e,message:V.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Yn.create=(n,e)=>new Yn({valueType:n,minSize:null,maxSize:null,typeName:U.ZodSet,...J(e)});class Vr extends H{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.function)return w(t,{code:P.invalid_type,expected:M.function,received:t.parsedType}),x;function i(d,p){return La({data:d,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Va(),_r].filter(h=>!!h),issueData:{code:P.invalid_arguments,argumentsError:p}})}function a(d,p){return La({data:d,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Va(),_r].filter(h=>!!h),issueData:{code:P.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Lr){const d=this;return lt(async function(...p){const h=new mt([]),T=await d._def.args.parseAsync(p,s).catch(I=>{throw h.addIssue(i(p,I)),h}),f=await Reflect.apply(o,this,T);return await d._def.returns._def.type.parseAsync(f,s).catch(I=>{throw h.addIssue(a(f,I)),h})})}else{const d=this;return lt(function(...p){const h=d._def.args.safeParse(p,s);if(!h.success)throw new mt([i(p,h.error)]);const T=Reflect.apply(o,this,h.data),f=d._def.returns.safeParse(T,s);if(!f.success)throw new mt([a(T,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Vr({...this._def,args:qt.create(e).rest(Hn.create())})}returns(e){return new Vr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new Vr({args:e||qt.create([]).rest(Hn.create()),returns:t||Hn.create(),typeName:U.ZodFunction,...J(i)})}}class Ci extends H{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})}}Ci.create=(n,e)=>new Ci({getter:n,typeName:U.ZodLazy,...J(e)});class Bi extends H{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:P.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}Bi.create=(n,e)=>new Bi({value:n,typeName:U.ZodLiteral,...J(e)});function vm(n,e){return new An({values:n,typeName:U.ZodEnum,...J(e)})}class An extends H{constructor(){super(...arguments),gi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return w(t,{expected:z.joinValues(i),received:t.parsedType,code:P.invalid_type}),x}if(Ga(this,gi,"f")||Tm(this,gi,new Set(this._def.values),"f"),!Ga(this,gi,"f").has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return w(t,{received:t.data,code:P.invalid_enum_value,options:i}),x}return lt(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 An.create(e,{...this._def,...t})}exclude(e,t=this._def){return An.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}gi=new WeakMap,An.create=vm;class wi extends H{constructor(){super(...arguments),vi.set(this,void 0)}_parse(e){const t=z.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==M.string&&i.parsedType!==M.number){const a=z.objectValues(t);return w(i,{expected:z.joinValues(a),received:i.parsedType,code:P.invalid_type}),x}if(Ga(this,vi,"f")||Tm(this,vi,new Set(z.getValidEnumValues(this._def.values)),"f"),!Ga(this,vi,"f").has(e.data)){const a=z.objectValues(t);return w(i,{received:i.data,code:P.invalid_enum_value,options:a}),x}return lt(e.data)}get enum(){return this._def.values}}vi=new WeakMap,wi.create=(n,e)=>new wi({values:n,typeName:U.ZodNativeEnum,...J(e)});class Lr extends H{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.promise&&t.common.async===!1)return w(t,{code:P.invalid_type,expected:M.promise,received:t.parsedType}),x;const i=t.parsedType===M.promise?t.data:Promise.resolve(t.data);return lt(i.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Lr.create=(n,e)=>new Lr({type:n,typeName:U.ZodPromise,...J(e)});class Ut extends H{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U.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=>{w(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 d=>{if(t.value==="aborted")return x;const p=await this._def.schema._parseAsync({data:d,path:i.path,parent:i});return p.status==="aborted"?x:p.status==="dirty"||t.value==="dirty"?Mr(p.value):p});{if(t.value==="aborted")return x;const d=this._def.schema._parseSync({data:o,path:i.path,parent:i});return d.status==="aborted"?x:d.status==="dirty"||t.value==="dirty"?Mr(d.value):d}}if(a.type==="refinement"){const o=d=>{const p=a.refinement(d,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 d};if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return d.status==="aborted"?x:(d.status==="dirty"&&t.dirty(),o(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>d.status==="aborted"?x:(d.status==="dirty"&&t.dirty(),o(d.value).then(()=>({status:t.value,value:d.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(!Ri(o))return o;const d=a.transform(o.value,s);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>Ri(o)?Promise.resolve(a.transform(o.value,s)).then(d=>({status:t.value,value:d})):o);z.assertNever(a)}}Ut.create=(n,e,t)=>new Ut({schema:n,typeName:U.ZodEffects,effect:e,...J(t)}),Ut.createWithPreprocess=(n,e,t)=>new Ut({schema:e,effect:{type:"preprocess",transform:n},typeName:U.ZodEffects,...J(t)});class Jt extends H{_parse(e){return this._getType(e)===M.undefined?lt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Jt.create=(n,e)=>new Jt({innerType:n,typeName:U.ZodOptional,...J(e)});class Sn extends H{_parse(e){return this._getType(e)===M.null?lt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Sn.create=(n,e)=>new Sn({innerType:n,typeName:U.ZodNullable,...J(e)});class _i extends H{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===M.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}_i.create=(n,e)=>new _i({innerType:n,typeName:U.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...J(e)});class Mi extends H{_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 bi(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}Mi.create=(n,e)=>new Mi({innerType:n,typeName:U.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...J(e)});class ka extends H{_parse(e){if(this._getType(e)!==M.nan){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.nan,received:i.parsedType}),x}return{status:"valid",value:e.data}}}ka.create=n=>new ka({typeName:U.ZodNaN,...J(n)});const ZI=Symbol("zod_brand");class rl extends H{_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 Ni extends H{_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"?x:s.status==="dirty"?(t.dirty(),Mr(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"?x: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 Ni({in:e,out:t,typeName:U.ZodPipeline})}}class $i extends H{_parse(e){const t=this._def.innerType._parse(e),i=a=>(Ri(a)&&(a.value=Object.freeze(a.value)),a);return bi(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}$i.create=(n,e)=>new $i({innerType:n,typeName:U.ZodReadonly,...J(e)});function Im(n,e={},t){return n?Nr.create().superRefine((i,a)=>{var s,o;if(!n(i)){const d=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,p=(o=(s=d.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,h=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...h,fatal:p})}}):Nr.create()}const XI={object:Ne.lazycreate};var U;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(U||(U={}));const QI=(n,e={message:`Input not instance of ${n.name}`})=>Im(t=>t instanceof n,e),qa=Gt.create,il=Pn.create,KI=ka.create,eP=Dn.create,al=Ii.create,Pm=Wn.create,tP=Fa.create,nP=Pi.create,Dm=Di.create,rP=Nr.create,Ja=Hn.create,iP=an.create,aP=Ua.create,sP=Ft.create,Am=Ne.create,oP=Ne.strictCreate,lP=Ai.create,cP=xa.create,dP=Si.create,uP=qt.create,Sm=Oi.create,pP=ja.create,yP=Yn.create,hP=Vr.create,fP=Ci.create,mP=Bi.create,Om=An.create,TP=wi.create,EP=Lr.create,Cm=Ut.create,RP=Jt.create,bP=Sn.create,gP=Ut.createWithPreprocess,vP=Ni.create;var c=Object.freeze({__proto__:null,defaultErrorMap:_r,setErrorMap:MI,getErrorMap:Va,makeIssue:La,EMPTY_PATH:NI,addIssueToContext:w,ParseStatus:Qe,INVALID:x,DIRTY:Mr,OK:lt,isAborted:Ko,isDirty:el,isValid:Ri,isAsync:bi,get util(){return z},get objectUtil(){return Qo},ZodParsedType:M,getParsedType:In,ZodType:H,datetimeRegex:gm,ZodString:Gt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:Ii,ZodDate:Wn,ZodSymbol:Fa,ZodUndefined:Pi,ZodNull:Di,ZodAny:Nr,ZodUnknown:Hn,ZodNever:an,ZodVoid:Ua,ZodArray:Ft,ZodObject:Ne,ZodUnion:Ai,ZodDiscriminatedUnion:xa,ZodIntersection:Si,ZodTuple:qt,ZodRecord:Oi,ZodMap:ja,ZodSet:Yn,ZodFunction:Vr,ZodLazy:Ci,ZodLiteral:Bi,ZodEnum:An,ZodNativeEnum:wi,ZodPromise:Lr,ZodEffects:Ut,ZodTransformer:Ut,ZodOptional:Jt,ZodNullable:Sn,ZodDefault:_i,ZodCatch:Mi,ZodNaN:ka,BRAND:ZI,ZodBranded:rl,ZodPipeline:Ni,ZodReadonly:$i,custom:Im,Schema:H,ZodSchema:H,late:XI,get ZodFirstPartyTypeKind(){return U},coerce:{string:n=>Gt.create({...n,coerce:!0}),number:n=>Pn.create({...n,coerce:!0}),boolean:n=>Ii.create({...n,coerce:!0}),bigint:n=>Dn.create({...n,coerce:!0}),date:n=>Wn.create({...n,coerce:!0})},any:rP,array:sP,bigint:eP,boolean:al,date:Pm,discriminatedUnion:cP,effect:Cm,enum:Om,function:hP,instanceof:QI,intersection:dP,lazy:fP,literal:mP,map:pP,nan:KI,nativeEnum:TP,never:iP,null:Dm,nullable:bP,number:il,object:Am,oboolean:()=>al().optional(),onumber:()=>il().optional(),optional:RP,ostring:()=>qa().optional(),pipeline:vP,preprocess:gP,promise:EP,record:Sm,set:yP,strictObject:oP,string:qa,symbol:tP,transformer:Cm,tuple:uP,undefined:nP,union:lP,unknown:Ja,void:aP,NEVER:x,ZodIssueCode:P,quotelessJson:_I,ZodError:mt});function Bm(n){var a,s,o;if(!(n!=null&&n.dataType))return Ja();const e=n.dataType.isNullable||!1,t=n.dataType.isList||!1;let i=Ja();if(((a=n.dataType.entity)==null?void 0:a.type)===r.PrimitiveEntity)switch(n.dataType.entity.name){case v.String:i=qa();break;case v.JSON:i=Sm(Ja());break;case v.Number:i=il();break;case v.Boolean:i=al();break;case v.Date:i=Pm();break;case v.Enum:{const d=n.dataType.options||[];if(d.length===0)throw new Error(`Enum property ${n.name} has no options`);i=Om(d);break}case v.Null:i=Dm();break;case v.UUID:i=qa().uuid();break}else if(((s=n.dataType.entity)==null?void 0:s.type)===r.CustomEntity)i=wm(n.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=n.dataType.entity)==null?void 0:o.type}`);return e&&(i=i.nullable()),t&&(i=i.array()),i}function wm(n){const e=Am({});for(const t of n.properties){const i=Bm(t);e.shape[t.name]=i}return e}function _m(n){const e=n.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function Mm(n){const e=n.rangeEnd;return new Date(Math.random()*e.getTime())}function Nm(n){const e=n.rangeStart,t=n.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function $m(n){return n.rangeStart&&n.rangeEnd?Nm(n):n.rangeStart?_m(n):n.rangeEnd?Mm(n):new Date}function IP(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vm={},Wa={},Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.default=DP;let Ya;const PP=new Uint8Array(16);function DP(){if(!Ya&&(Ya=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ya))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ya(PP)}var On={},zn={},za={};Object.defineProperty(za,"__esModule",{value:!0}),za.default=void 0;var AP=/^(?:[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;za.default=AP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.default=void 0;var SP=OP(za);function OP(n){return n&&n.__esModule?n:{default:n}}function CP(n){return typeof n=="string"&&SP.default.test(n)}var BP=CP;zn.default=BP,Object.defineProperty(On,"__esModule",{value:!0}),On.default=void 0,On.unsafeStringify=Lm;var wP=_P(zn);function _P(n){return n&&n.__esModule?n:{default:n}}const ze=[];for(let n=0;n<256;++n)ze.push((n+256).toString(16).slice(1));function Lm(n,e=0){return ze[n[e+0]]+ze[n[e+1]]+ze[n[e+2]]+ze[n[e+3]]+"-"+ze[n[e+4]]+ze[n[e+5]]+"-"+ze[n[e+6]]+ze[n[e+7]]+"-"+ze[n[e+8]]+ze[n[e+9]]+"-"+ze[n[e+10]]+ze[n[e+11]]+ze[n[e+12]]+ze[n[e+13]]+ze[n[e+14]]+ze[n[e+15]]}function MP(n,e=0){const t=Lm(n,e);if(!(0,wP.default)(t))throw TypeError("Stringified UUID is invalid");return t}var NP=MP;On.default=NP,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.default=void 0;var $P=LP(Ha),VP=On;function LP(n){return n&&n.__esModule?n:{default:n}}let Gm,sl,ol=0,ll=0;function GP(n,e,t){let i=e&&t||0;const a=e||new Array(16);n=n||{};let s=n.node||Gm,o=n.clockseq!==void 0?n.clockseq:sl;if(s==null||o==null){const b=n.random||(n.rng||$P.default)();s==null&&(s=Gm=[b[0]|1,b[1],b[2],b[3],b[4],b[5]]),o==null&&(o=sl=(b[6]<<8|b[7])&16383)}let d=n.msecs!==void 0?n.msecs:Date.now(),p=n.nsecs!==void 0?n.nsecs:ll+1;const h=d-ol+(p-ll)/1e4;if(h<0&&n.clockseq===void 0&&(o=o+1&16383),(h<0||d>ol)&&n.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ol=d,ll=p,sl=o,d+=122192928e5;const T=((d&268435455)*1e4+p)%4294967296;a[i++]=T>>>24&255,a[i++]=T>>>16&255,a[i++]=T>>>8&255,a[i++]=T&255;const f=d/4294967296*1e4&268435455;a[i++]=f>>>8&255,a[i++]=f&255,a[i++]=f>>>24&15|16,a[i++]=f>>>16&255,a[i++]=o>>>8|128,a[i++]=o&255;for(let b=0;b<6;++b)a[i+b]=s[b];return e||(0,VP.unsafeStringify)(a)}var FP=GP;Wa.default=FP;var Za={},Cn={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.default=void 0;var UP=xP(zn);function xP(n){return n&&n.__esModule?n:{default:n}}function jP(n){if(!(0,UP.default)(n))throw TypeError("Invalid UUID");let e;const t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.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 kP=jP;Vi.default=kP,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.URL=Cn.DNS=void 0,Cn.default=YP;var qP=On,JP=WP(Vi);function WP(n){return n&&n.__esModule?n:{default:n}}function HP(n){n=unescape(encodeURIComponent(n));const e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}const Fm="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Cn.DNS=Fm;const Um="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Cn.URL=Um;function YP(n,e,t){function i(a,s,o,d){var p;if(typeof a=="string"&&(a=HP(a)),typeof s=="string"&&(s=(0,JP.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 h=new Uint8Array(16+a.length);if(h.set(s),h.set(a,s.length),h=t(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,o){d=d||0;for(let T=0;T<16;++T)o[d+T]=h[T];return o}return(0,qP.unsafeStringify)(h)}try{i.name=n}catch{}return i.DNS=Fm,i.URL=Um,i}var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=void 0;function zP(n){if(typeof n=="string"){const e=unescape(encodeURIComponent(n));n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t)}return ZP(XP(QP(n),n.length*8))}function ZP(n){const e=[],t=n.length*32,i="0123456789abcdef";for(let a=0;a<t;a+=8){const s=n[a>>5]>>>a%32&255,o=parseInt(i.charAt(s>>>4&15)+i.charAt(s&15),16);e.push(o)}return e}function xm(n){return(n+64>>>9<<4)+14+1}function XP(n,e){n[e>>5]|=128<<e%32,n[xm(e)-1]=e;let t=1732584193,i=-271733879,a=-1732584194,s=271733878;for(let o=0;o<n.length;o+=16){const d=t,p=i,h=a,T=s;t=Ke(t,i,a,s,n[o],7,-680876936),s=Ke(s,t,i,a,n[o+1],12,-389564586),a=Ke(a,s,t,i,n[o+2],17,606105819),i=Ke(i,a,s,t,n[o+3],22,-1044525330),t=Ke(t,i,a,s,n[o+4],7,-176418897),s=Ke(s,t,i,a,n[o+5],12,1200080426),a=Ke(a,s,t,i,n[o+6],17,-1473231341),i=Ke(i,a,s,t,n[o+7],22,-45705983),t=Ke(t,i,a,s,n[o+8],7,1770035416),s=Ke(s,t,i,a,n[o+9],12,-1958414417),a=Ke(a,s,t,i,n[o+10],17,-42063),i=Ke(i,a,s,t,n[o+11],22,-1990404162),t=Ke(t,i,a,s,n[o+12],7,1804603682),s=Ke(s,t,i,a,n[o+13],12,-40341101),a=Ke(a,s,t,i,n[o+14],17,-1502002290),i=Ke(i,a,s,t,n[o+15],22,1236535329),t=et(t,i,a,s,n[o+1],5,-165796510),s=et(s,t,i,a,n[o+6],9,-1069501632),a=et(a,s,t,i,n[o+11],14,643717713),i=et(i,a,s,t,n[o],20,-373897302),t=et(t,i,a,s,n[o+5],5,-701558691),s=et(s,t,i,a,n[o+10],9,38016083),a=et(a,s,t,i,n[o+15],14,-660478335),i=et(i,a,s,t,n[o+4],20,-405537848),t=et(t,i,a,s,n[o+9],5,568446438),s=et(s,t,i,a,n[o+14],9,-1019803690),a=et(a,s,t,i,n[o+3],14,-187363961),i=et(i,a,s,t,n[o+8],20,1163531501),t=et(t,i,a,s,n[o+13],5,-1444681467),s=et(s,t,i,a,n[o+2],9,-51403784),a=et(a,s,t,i,n[o+7],14,1735328473),i=et(i,a,s,t,n[o+12],20,-1926607734),t=tt(t,i,a,s,n[o+5],4,-378558),s=tt(s,t,i,a,n[o+8],11,-2022574463),a=tt(a,s,t,i,n[o+11],16,1839030562),i=tt(i,a,s,t,n[o+14],23,-35309556),t=tt(t,i,a,s,n[o+1],4,-1530992060),s=tt(s,t,i,a,n[o+4],11,1272893353),a=tt(a,s,t,i,n[o+7],16,-155497632),i=tt(i,a,s,t,n[o+10],23,-1094730640),t=tt(t,i,a,s,n[o+13],4,681279174),s=tt(s,t,i,a,n[o],11,-358537222),a=tt(a,s,t,i,n[o+3],16,-722521979),i=tt(i,a,s,t,n[o+6],23,76029189),t=tt(t,i,a,s,n[o+9],4,-640364487),s=tt(s,t,i,a,n[o+12],11,-421815835),a=tt(a,s,t,i,n[o+15],16,530742520),i=tt(i,a,s,t,n[o+2],23,-995338651),t=nt(t,i,a,s,n[o],6,-198630844),s=nt(s,t,i,a,n[o+7],10,1126891415),a=nt(a,s,t,i,n[o+14],15,-1416354905),i=nt(i,a,s,t,n[o+5],21,-57434055),t=nt(t,i,a,s,n[o+12],6,1700485571),s=nt(s,t,i,a,n[o+3],10,-1894986606),a=nt(a,s,t,i,n[o+10],15,-1051523),i=nt(i,a,s,t,n[o+1],21,-2054922799),t=nt(t,i,a,s,n[o+8],6,1873313359),s=nt(s,t,i,a,n[o+15],10,-30611744),a=nt(a,s,t,i,n[o+6],15,-1560198380),i=nt(i,a,s,t,n[o+13],21,1309151649),t=nt(t,i,a,s,n[o+4],6,-145523070),s=nt(s,t,i,a,n[o+11],10,-1120210379),a=nt(a,s,t,i,n[o+2],15,718787259),i=nt(i,a,s,t,n[o+9],21,-343485551),t=Bn(t,d),i=Bn(i,p),a=Bn(a,h),s=Bn(s,T)}return[t,i,a,s]}function QP(n){if(n.length===0)return[];const e=n.length*8,t=new Uint32Array(xm(e));for(let i=0;i<e;i+=8)t[i>>5]|=(n[i/8]&255)<<i%32;return t}function Bn(n,e){const t=(n&65535)+(e&65535);return(n>>16)+(e>>16)+(t>>16)<<16|t&65535}function KP(n,e){return n<<e|n>>>32-e}function Qa(n,e,t,i,a,s){return Bn(KP(Bn(Bn(e,n),Bn(i,s)),a),t)}function Ke(n,e,t,i,a,s,o){return Qa(e&t|~e&i,n,e,a,s,o)}function et(n,e,t,i,a,s,o){return Qa(e&i|t&~i,n,e,a,s,o)}function tt(n,e,t,i,a,s,o){return Qa(e^t^i,n,e,a,s,o)}function nt(n,e,t,i,a,s,o){return Qa(t^(e|~i),n,e,a,s,o)}var eD=zP;Xa.default=eD,Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=void 0;var tD=jm(Cn),nD=jm(Xa);function jm(n){return n&&n.__esModule?n:{default:n}}var rD=(0,tD.default)("v3",48,nD.default);Za.default=rD;var Ka={},es={};Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var iD={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};es.default=iD,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.default=void 0;var km=qm(es),aD=qm(Ha),sD=On;function qm(n){return n&&n.__esModule?n:{default:n}}function oD(n,e,t){if(km.default.randomUUID&&!e&&!n)return km.default.randomUUID();n=n||{};const i=n.random||(n.rng||aD.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,sD.unsafeStringify)(i)}var lD=oD;Ka.default=lD;var ts={},ns={};Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;function cD(n,e,t,i){switch(n){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 cl(n,e){return n<<e|n>>>32-e}function dD(n){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof n=="string"){const o=unescape(encodeURIComponent(n));n=[];for(let d=0;d<o.length;++d)n.push(o.charCodeAt(d))}else Array.isArray(n)||(n=Array.prototype.slice.call(n));n.push(128);const i=n.length/4+2,a=Math.ceil(i/16),s=new Array(a);for(let o=0;o<a;++o){const d=new Uint32Array(16);for(let p=0;p<16;++p)d[p]=n[o*64+p*4]<<24|n[o*64+p*4+1]<<16|n[o*64+p*4+2]<<8|n[o*64+p*4+3];s[o]=d}s[a-1][14]=(n.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(n.length-1)*8&4294967295;for(let o=0;o<a;++o){const d=new Uint32Array(80);for(let I=0;I<16;++I)d[I]=s[o][I];for(let I=16;I<80;++I)d[I]=cl(d[I-3]^d[I-8]^d[I-14]^d[I-16],1);let p=t[0],h=t[1],T=t[2],f=t[3],b=t[4];for(let I=0;I<80;++I){const B=Math.floor(I/20),G=cl(p,5)+cD(B,h,T,f)+b+e[B]+d[I]>>>0;b=f,f=T,T=cl(h,30)>>>0,h=p,p=G}t[0]=t[0]+p>>>0,t[1]=t[1]+h>>>0,t[2]=t[2]+T>>>0,t[3]=t[3]+f>>>0,t[4]=t[4]+b>>>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 uD=dD;ns.default=uD,Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var pD=Jm(Cn),yD=Jm(ns);function Jm(n){return n&&n.__esModule?n:{default:n}}var hD=(0,pD.default)("v5",80,yD.default);ts.default=hD;var rs={};Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var fD="00000000-0000-0000-0000-000000000000";rs.default=fD;var is={};Object.defineProperty(is,"__esModule",{value:!0}),is.default=void 0;var mD=TD(zn);function TD(n){return n&&n.__esModule?n:{default:n}}function ED(n){if(!(0,mD.default)(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}var RD=ED;is.default=RD,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return o.default}});var e=T(Wa),t=T(Za),i=T(Ka),a=T(ts),s=T(rs),o=T(is),d=T(zn),p=T(On),h=T(Vi);function T(f){return f&&f.__esModule?f:{default:f}}}(Vm);function dl(n,e){if(!n||!e||!n.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=n,this.dstAlphabet=e}dl.prototype.convert=function(n){var e,t,i,a={},s=this.srcAlphabet.length,o=this.dstAlphabet.length,d=n.length,p=typeof n=="string"?"":[];if(!this.isValid(n))throw new Error('Number "'+n+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return n;for(e=0;e<d;e++)a[e]=this.srcAlphabet.indexOf(n[e]);do{for(t=0,i=0,e=0;e<d;e++)t=t*s+a[e],t>=o?(a[i++]=parseInt(t/o,10),t=t%o):i>0&&(a[i++]=0);d=i,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(i!==0);return p},dl.prototype.isValid=function(n){for(var e=0;e<n.length;++e)if(this.srcAlphabet.indexOf(n[e])===-1)return!1;return!0};var bD=dl,gD=bD;function Li(n,e){var t=new gD(n,e);return function(i){return t.convert(i)}}Li.BIN="01",Li.OCT="01234567",Li.DEC="0123456789",Li.HEX="0123456789abcdef";var vD=Li;const{v4:ul,validate:ID}=Vm,as=vD,pl={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},PD={consistentLength:!0};let yl;const Wm=(n,e,t)=>{const i=e(n.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},Hm=(n,e)=>{const i=e(n).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("-")},DD=n=>Math.ceil(Math.log(2**128)/Math.log(n));var AD=(()=>{const n=(e,t)=>{const i=e||pl.flickrBase58,a={...PD,...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=DD(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},d=as(as.HEX,i),p=as(i,as.HEX),h=()=>Wm(ul(),d,o),f={alphabet:i,fromUUID:b=>Wm(b,d,o),maxLength:s,generate:h,new:h,toUUID:b=>Hm(b,p),uuid:ul,validate:(b,I=!1)=>{if(!b||typeof b!="string")return!1;const B=a.consistentLength?b.length===s:b.length<=s,G=b.split("").every(q=>i.includes(q));return I===!1?B&&G:B&&G&&ID(Hm(b,p))}};return Object.freeze(f),f};return n.constants=pl,n.uuid=ul,n.generate=()=>(yl||(yl=n(pl.flickrBase58).generate),yl()),n})();const ss=IP(AD);function Ym(){return ss().uuid()}function zm(n){return n.rangeStart+Math.random()}function Zm(n){const e=n.rangeEnd;return Math.random()*e}function Xm(n){const e=n.rangeStart,t=n.rangeEnd;return Math.random()*(t-e)+e}function Qm(n){return n.rangeStart&&n.rangeEnd?Xm(n):n.rangeStart?zm(n):n.rangeEnd?Zm(n):Math.random()}function Km(n){const e=n.rangeStart;return Math.random().toString(36).substring(e)}function eT(n){const e=n.rangeEnd;return Math.random().toString(36).substring(0,e)}function tT(n){const e=n.rangeStart,t=n.rangeEnd;return Math.random().toString(36).substring(e,t)}function nT(n){return n.rangeStart&&n.rangeEnd?tT(n):n.rangeStart?Km(n):n.rangeEnd?eT(n):Math.random().toString(36)}function rT(n){return Math.random()>=.5}function SD(n){if(!n||!n.autogeneration)return null;switch(n.autogeneration.type){case Ue.CurrentDateAndTime:if(n.name===v.Date)return new Date;case Ue.Random:{if(n.name===v.Date)return $m(n.autogeneration);if(n.name===v.Number)return Qm(n.autogeneration);if(n.name===v.String)return nT(n.autogeneration);if(n.name===v.Boolean)return rT(n.autogeneration)}case Ue.Unique:if(n.name===v.UUID)return Ym();default:throw new Error(`Generating a ${n.autogeneration.type} value for a ${n.name} is not supported`)}}const W="e7eb5382-3d99-44fd-972a-b8b1e819f6be",hl="global-user-variable-id",iT="last-executed-timestamp-variable-id",OD={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-data-type-id",entityType:r.DataType},CD={id:"alternative-relational-database-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:r.Property},BD={id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:null,parent:OD,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:CD},os={id:"alternative-relational-database-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},wD={hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!1,implements:wa,static:!0,index:0,dataType:BD,description:"The name of the main database inside of the server instance where the data will be stored.",parent:os};r.GenericReference,r.DataType;const _D={id:"alternative-relational-database-entity-username-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:r.Property},MD={id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:_D},ND={hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:r.Property,private:!1,abstract:!1,implements:_a,static:!0,index:1,dataType:MD,description:"The username that will be used to connect to the database.",parent:os};r.GenericReference,r.DataType;const $D={id:"alternative-relational-database-entity-password-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:r.Property},VD={id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:$D},LD={hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:r.Property,private:!1,abstract:!1,implements:Ma,static:!0,index:2,dataType:VD,description:"The password that will be used to connect to the database.",parent:os},GD={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-data-type-id",entityType:r.DataType},FD={id:"alternative-relational-database-entity-min-size-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:r.Property},UD={id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:GD,autogeneration:null,valueAsType:null},parent:FD},xD={hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!1,implements:Na,static:!0,index:3,dataType:UD,description:"The minimum size of the database in GB.",parent:os},jD={id:"alternative-relational-database-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},aT={id:"alternative-relational-database-entity-id",type:r.CustomEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[wD,ND,LD,xD],methods:[],abstractMethods:[],extends:[],implements:[vn],x:0,y:0,parent:jD},kD={id:"animal-prototype-database-property-ref-id",type:r.GenericReference,entityId:"animal-prototype-database-property-id",entityType:r.Property},qD={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"animal-prototype-database-property-data-type-default-value-id",entityType:r.DataType},JD={id:"animal-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:aT,autogeneration:null,parent:qD},parent:kD},WD={id:"animal-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},HD={hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ei,static:!0,index:0,dataType:JD,description:"The database that the entity belongs to.",parent:WD},YD={type:r.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:r.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},zD={id:"c1930577-9e79-48a6-8905-be24611015c1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:YD},ZD={type:r.GenericReference,id:"e2b9e456-f2b3-4dc7-85a2-fbb68ed0c9c7",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},XD={hidden:!1,required:!0,type:r.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:zD,abstract:!1,parent:ZD},QD={type:r.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:r.Project,entityId:W},KD={type:r.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:[HD,XD],methods:[],extends:[],implements:[_e],x:0,y:0,parent:QD},eA={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-identifier-property-data-type-id",entityType:r.DataType},tA={id:"default-relational-database-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:r.Property},nA={id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"main",parent:eA,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:tA},Gr={id:"default-relational-database-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},rA={hidden:!1,required:!0,id:"default-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!1,implements:wa,static:!0,index:0,dataType:nA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Gr};r.GenericReference,r.DataType;const iA={id:"default-relational-database-entity-username-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:r.Property},aA={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-username-property-data-type-id",entityType:r.DataType},sA={id:"default-relational-database-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"root",parent:aA,autogeneration:null,valueAsType:null},parent:iA},oA={hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:r.Property,private:!1,abstract:!1,implements:_a,static:!0,index:1,dataType:sA,description:"The username that will be used to connect to the database.",parent:Gr};r.GenericReference,r.DataType;const lA={id:"default-relational-database-entity-password-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:r.Property},cA={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-password-property-data-type-id",entityType:r.DataType},dA={id:"default-relational-database-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"password",parent:cA,autogeneration:null,valueAsType:null},parent:lA},uA={hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:r.Property,private:!1,abstract:!1,implements:Ma,static:!0,index:2,dataType:dA,description:"The password that will be used to connect to the database.",parent:Gr},pA={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-min-size-property-data-type-id",entityType:r.DataType},yA={id:"default-relational-database-entity-min-size-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:r.Property},hA={id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:pA,autogeneration:null,valueAsType:null},parent:yA},fA={hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!1,implements:Na,static:!0,index:3,dataType:hA,description:"The minimum size of the database in GB.",parent:Gr},mA={id:"default-relational-database-entity-default-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-default-property-data-type-id",entityType:r.DataType},TA={id:"default-relational-database-entity-default-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:r.Property},EA={id:"default-relational-database-entity-default-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!0,parent:mA,autogeneration:null,valueAsType:null},parent:TA},RA={hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:r.Property,private:!1,abstract:!1,implements:ko,static:!0,index:4,dataType:EA,description:"Whether this database is automatically picked by other entities as the default database.",parent:Gr},bA={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-data-type-id",entityType:r.DataType},gA={id:"default-relational-database-entity-autoscaling-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:r.Property},vA={id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!0,parent:bA,autogeneration:null,valueAsType:null},parent:gA},IA={hidden:!1,required:!0,id:"default-relational-database-entity-autoscaling-property-id",name:"Auto-scaling",version:1,type:r.Property,private:!1,abstract:!1,implements:qo,static:!0,index:5,dataType:vA,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:Gr},PA={id:"default-relational-database-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},fl={id:"default-relational-database-entity-id",type:r.CustomEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[RA,IA,rA,oA,uA,fA],methods:[],abstractMethods:[],extends:[],implements:[vn],x:0,y:0,parent:PA},DA={id:"user-prototype-database-property-data-type-ref-id",type:r.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:r.DataType},AA={id:"user-prototype-database-property-ref-id",type:r.GenericReference,entityId:"user-prototype-database-property-id",entityType:r.Property},SA={id:"user-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:fl,autogeneration:null,parent:DA},parent:AA},OA={id:"user-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},CA={hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ei,static:!0,index:0,dataType:SA,description:"The database that the entity belongs to.",parent:OA},BA={type:r.GenericReference,id:"user-prototype-parent-ref-id",entityType:r.Project,entityId:W},ml={type:r.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[_e],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[CA],methods:[],x:0,y:0,parent:BA},wA={type:r.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:r.Property,entityId:"person-date-of-birth-property-id"},_A={id:"person-date-of-birth-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:wA},MA={type:r.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},NA={hidden:!1,required:!0,type:r.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:_A,abstract:!1,parent:MA},$A={type:r.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:r.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},VA={id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:$A},LA={type:r.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},GA={hidden:!1,required:!0,type:r.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:VA,abstract:!1,parent:LA},FA={type:r.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:r.Project,entityId:W},ct={type:r.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:[GA,NA],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ml],x:0,y:0,parent:FA},UA={type:r.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},xA={type:r.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:r.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},jA={type:r.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:r.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},kA={type:r.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:r.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},qA={id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kA},Tl={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:r.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:qA,readsValue:jA,required:!0,index:0,parent:xA},JA={type:r.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},WA={type:r.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},sT={type:r.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Tl],calledByError:[],calledByEntry:[JA],calledBySuccess:[],throws:null,x:0,y:0,parent:WA},HA={type:r.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:r.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},YA={id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:HA},oT={id:"500dee3a-3435-4453-9699-0d053f646523",type:r.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:YA,required:!0,writesValues:[Tl],index:0,parent:UA},zA={type:r.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},lT={type:r.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[oT],calls:[sT],returnStatements:[sT],index:0,collapsed:!1,private:!1,x:0,y:0,parent:zA},ZA={type:r.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:r.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},XA={id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ZA},QA={type:r.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:r.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},KA={type:r.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},eS={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:r.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:XA,readsValue:QA,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:KA},tS={type:r.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:r.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},nS={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:r.OutputMap,version:1,declaration:Tl,writesValues:[eS],index:0,parent:tS},rS={type:r.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},iS={type:r.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},aS={type:r.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:r.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},sS={id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:aS},oS={type:r.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:r.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},lS={type:r.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},cS={type:r.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:r.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},dS={type:r.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:r.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},cT={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:r.InputMap,version:1,declaration:oT,name:null,description:null,readsValue:dS,dynamicArguments:[],defaultValue:null,index:0,parent:cS},uS={type:r.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:sS,readsValue:oS,writesValues:[cT],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:lS},pS={type:r.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:lT,inputs:[cT],outputs:[nS],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[rS],calledBySuccess:[],parent:iS,error:null,x:0,y:0},yS={type:r.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:r.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},hS={id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:yS},fS={type:r.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},mS={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:r.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:hS,required:!0,index:0,writesValues:[uS],parent:fS},TS={type:r.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},ES={type:r.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[mS],collapsed:!0,returnStatements:[],calls:[pS],private:!1,index:0,implements:null,x:0,y:0,parent:TS},RS={type:r.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:r.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},bS={id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:RS},gS={type:r.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},dT={hidden:!1,required:!0,type:r.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,implements:null,static:!1,index:0,dataType:bS,abstract:!1,parent:gS},vS={type:r.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:r.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},IS={id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:vS},PS={type:r.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},uT={hidden:!1,required:!0,type:r.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:IS,implements:null,static:!1,private:!0,abstract:!1,parent:PS},DS={type:r.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:r.Project,entityId:W},Fr={type:r.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[dT,uT],methods:[lT,ES],extends:[],implements:[_e],x:0,y:0,parent:DS},Gi="bitcoin-api-response-id",pT="time-property-id",yT="disclamer-property-id",hT="chart-name-property-id",fT="bpi-property-id",ls="bpi-entity-id",mT="usd-property-id",TT="gbp-property-id",ET="eur-property-id",Ur="currency-entity-id",RT="currency-code-property-id",bT="currency-symbol-property-id",gT="currency-rate-property-id",vT="currency-description-property-id",IT="currency-rate-number-property-id",AS={type:r.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:r.Property,entityId:RT},SS={id:"code-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:AS},OS={type:r.GenericReference,id:"code-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},CS={hidden:!1,required:!0,type:r.Property,id:RT,version:1,name:"code",description:null,dataType:SS,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:OS},BS={type:r.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:r.Property,entityId:bT},wS={id:"symbol-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["$","£","€"],constant:!1,parent:BS},_S={type:r.GenericReference,id:"symbol-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},MS={hidden:!1,required:!0,type:r.Property,id:bT,version:1,name:"symbol",description:null,index:0,dataType:wS,implements:null,static:!1,private:!1,abstract:!1,parent:_S},NS={type:r.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:r.Property,entityId:gT},$S={id:"rate-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:NS},VS={type:r.GenericReference,id:"rate-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},LS={hidden:!1,required:!0,type:r.Property,id:gT,version:1,name:"rate",description:null,index:0,dataType:$S,implements:null,static:!1,private:!1,abstract:!1,parent:VS},GS={type:r.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:r.Property,entityId:vT},FS={id:"description-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:GS},US={type:r.GenericReference,id:"description-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},xS={hidden:!1,required:!0,type:r.Property,id:vT,version:1,name:"description",description:null,dataType:FS,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:US},jS={type:r.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:r.Property,entityId:IT},kS={id:"rate-number-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jS},qS={type:r.GenericReference,id:"rate-number-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},JS={hidden:!1,required:!0,type:r.Property,id:IT,version:1,name:"rate_float",description:null,dataType:kS,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:qS},WS={type:r.GenericReference,id:"currency-prototype-parent-ref-id",entityType:r.Project,entityId:W},cs={type:r.CustomEntity,id:Ur,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[CS,MS,LS,xS,JS],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:WS},HS={type:r.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:r.Property,entityId:mT},YS={id:"usd-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:cs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:HS},zS={type:r.GenericReference,id:"usd-property-parent-ref-id",entityType:r.CustomEntity,entityId:ls},ZS={hidden:!1,required:!0,id:mT,type:r.Property,version:1,name:"USD",description:null,index:0,dataType:YS,implements:null,static:!1,private:!1,abstract:!1,parent:zS},XS={type:r.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:r.Property,entityId:TT},QS={id:"gbp-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:cs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:XS},KS={type:r.GenericReference,id:"gbp-property-parent-ref-id",entityType:r.CustomEntity,entityId:ls},eO={hidden:!1,required:!0,id:TT,type:r.Property,version:1,name:"GBP",description:null,index:0,dataType:QS,implements:null,static:!1,private:!1,abstract:!1,parent:KS},tO={type:r.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:r.Property,entityId:ET},nO={id:"eur-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:cs,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:tO},rO={type:r.GenericReference,id:"eur-property-parent-ref-id",entityType:r.CustomEntity,entityId:ls},iO={hidden:!1,required:!0,id:ET,type:r.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:nO,private:!1,abstract:!1,parent:rO},aO={type:r.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:r.Project,entityId:W},PT={type:r.CustomEntity,id:ls,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[ZS,eO,iO],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:aO},sO={type:r.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:r.Property,entityId:pT},oO={id:"time-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:go,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:sO},lO={type:r.GenericReference,id:"time-property-parent-ref-id",entityType:r.CustomEntity,entityId:Gi},cO={hidden:!1,required:!0,type:r.Property,id:pT,version:1,name:"time",description:null,index:0,dataType:oO,implements:null,static:!1,private:!1,abstract:!1,parent:lO},dO={type:r.GenericReference,id:"disclamer-property-data-type-parent-ref-id",entityType:r.Property,entityId:yT},uO={id:"disclamer-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:dO},pO={type:r.GenericReference,id:"disclamer-property-parent-ref-id",entityType:r.CustomEntity,entityId:Gi},yO={hidden:!1,required:!0,type:r.Property,id:yT,version:1,name:"disclamer",description:null,index:0,dataType:uO,implements:null,static:!1,private:!1,abstract:!1,parent:pO},hO={type:r.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:r.Property,entityId:hT},fO={id:"chart-name-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hO},mO={type:r.GenericReference,id:"chart-name-property-parent-ref-id",entityType:r.CustomEntity,entityId:Gi},TO={hidden:!1,required:!0,type:r.Property,id:hT,version:1,name:"chartName",description:null,index:0,dataType:fO,implements:null,static:!1,private:!1,abstract:!1,parent:mO},EO={type:r.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:r.Property,entityId:fT},RO={id:"bpi-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:PT,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:EO},bO={type:r.GenericReference,id:"bpi-property-parent-ref-id",entityType:r.CustomEntity,entityId:Gi},gO={hidden:!1,required:!0,type:r.Property,id:fT,version:1,name:"bpi",description:null,implements:null,index:0,dataType:RO,static:!1,private:!1,abstract:!1,parent:bO},vO={type:r.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:r.Project,entityId:W},DT={type:r.CustomEntity,id:Gi,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[cO,yO,TO,gO],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:vO},IO={type:r.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:r.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},PO={id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:IO},DO={type:r.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:r.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},AO={type:r.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:r.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},SO={id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:AO},OO={type:r.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:r.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},AT={isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",dataType:SO,readsValue:OO,required:!0,index:0,parent:DO},CO={type:r.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},BO={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:r.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,dataType:PO,writesValues:[AT],required:!0,index:0,parent:CO},wO={type:r.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},_O={type:r.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},MO={type:r.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},ST={type:r.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[AT],calledByError:[],calledByEntry:[_O],calledBySuccess:[],throws:null,x:0,y:0,parent:MO},NO={type:r.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:[BO],calls:[ST],index:0,collapsed:!1,implements:null,returnStatements:[ST],private:!1,x:0,y:0,parent:wO},$O={type:r.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},VO={type:r.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},LO={type:r.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:r.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},GO={type:r.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},FO={type:r.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:r.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},UO={id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:FO},El={isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:r.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",dataType:UO,readsValue:GO,required:!0,index:0,parent:LO},xO={type:r.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Rl={type:r.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[El],calledByError:[],calledByEntry:[],calledBySuccess:[$O,xO],throws:null,x:0,y:0,parent:VO},jO={type:r.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},kO={type:r.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:r.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},OT={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:r.InputMap,version:1,declaration:Vo,name:null,description:null,dynamicArguments:[],readsValue:kO,defaultValue:null,parent:jO,index:2},qO={type:r.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},JO={id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qO},WO={type:r.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},HO={type:r.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:r.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},YO={type:r.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:r.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},CT={type:r.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:JO,readsValue:HO,writesValues:[El],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[YO],successCalls:[Rl],errorCalls:[],internalCalls:[],x:0,y:0,parent:WO},zO={type:r.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:r.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},ZO={type:r.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},XO={type:r.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:Pa,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:r.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:v.String,valueAsType:null,parent:zO,autogeneration:null},index:1,dynamicArguments:[],parent:ZO},QO={type:r.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},KO={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:r.OutputMap,version:1,declaration:fi,index:2,writesValues:[CT],parent:QO},eC={type:r.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},tC={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:r.InputMap,version:1,declaration:Ia,name:null,description:null,dynamicArguments:[],readsValue:null,index:0,defaultValue:null,parent:eC},nC={type:r.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},rC={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:r.InputMap,version:1,name:null,description:null,declaration:Da,dynamicArguments:[],index:3,readsValue:null,defaultValue:null,parent:nC},iC={type:r.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},aC={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:r.InputMap,version:1,declaration:Aa,name:null,description:null,dynamicArguments:[],readsValue:null,index:4,defaultValue:null,parent:iC},sC={type:r.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},oC={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:r.OutputMap,version:1,declaration:Sa,index:1,writesValues:[],parent:sC},lC={type:r.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},cC={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:r.OutputMap,version:1,declaration:fi,index:0,writesValues:[],parent:lC},dC={type:r.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},uC={type:r.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},pC={type:r.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},yC={type:r.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:r.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},hC={type:r.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:r.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},fC={id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hC},mC={type:r.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:r.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},BT={isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:r.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:fC,required:!0,readsValue:null,index:0,parent:mC},TC={type:r.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[yC],throws:BT,x:0,y:0,parent:pC},EC={type:r.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},RC={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:r.OutputMap,declaration:Go,version:1,writesValues:[BT],index:0,parent:EC},bC={type:r.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:mi,inputs:[tC,XO,OT,rC,aC],outputs:[cC,oC,KO],process:null,calledByError:[],calledByEntry:[dC],calledBySuccess:[],successCalls:[Rl,CT],errorCalls:[TC],error:RC,dynamicArguments:[],x:0,y:0,parent:uC},gC={type:r.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:r.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},vC={type:r.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},IC={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:r.InputMap,version:1,declaration:ba,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:r.PrimitiveValue,version:1,value:"?name=",name:v.String,parent:gC,valueAsType:null,autogeneration:null},dynamicArguments:[],index:0,parent:vC},PC={type:r.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},DC={type:r.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},AC={type:r.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:r.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},SC={id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:AC},OC={type:r.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:r.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},CC={type:r.GenericReference,id:"assembled-query-string-called-by-ref",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},wT={type:r.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:SC,readsValue:OC,writesValues:[OT],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[CC],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:DC},BC={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:r.OutputMap,version:1,writesValues:[wT],declaration:yi,index:0,parent:PC},wC={type:r.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},_C={type:r.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},MC={type:r.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:r.ArgumentDeclaration},NC={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},_T={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:r.InputMap,declaration:ga,name:null,description:null,readsValue:MC,dynamicArguments:[],defaultValue:null,index:1,parent:NC},$C={type:r.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:hi,version:1,inputs:[IC,_T],outputs:[BC],process:null,calledByError:[],calledByEntry:[wC],calledBySuccess:[],dynamicArguments:[],successCalls:[wT],errorCalls:[],error:null,x:0,y:0,parent:_C},VC={type:r.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:r.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},LC={id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VC},GC={type:r.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},MT={id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:r.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:LC,required:!1,writesValues:[_T],index:0,parent:GC},FC={type:r.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:r.Project,entityId:W},NT={type:r.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:[MT],calls:[$C,bC],returnStatements:[Rl],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:FC},UC={type:r.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:r.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},xC={type:r.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},jC={type:r.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},kC={type:r.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},$T={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:r.InputMap,declaration:MT,name:null,description:null,readsValue:jC,dynamicArguments:[],defaultValue:null,index:0,parent:kC},qC={type:r.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},JC={type:r.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:r.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},WC={id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:JC},HC={type:r.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:r.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},YC={type:r.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},zC={type:r.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},VT={type:r.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:WC,readsValue:HC,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[zC],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:YC},ZC={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.OutputMap,version:1,declaration:El,writesValues:[VT],index:0,parent:qC},XC={type:r.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:NT,inputs:[$T],outputs:[ZC],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[UC],successCalls:[VT],errorCalls:[],error:null,x:0,y:0,parent:xC},QC={type:r.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},KC={type:r.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},eB={type:r.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},tB={type:r.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:r.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},LT={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:r.InputMap,declaration:Jn.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:eB,defaultValue:null,index:0,parent:tB},nB={type:r.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:Jn,inputs:[LT],calledByError:[],calledByEntry:[QC],calledBySuccess:[],successCalls:[XC],errorCalls:[],x:0,y:0,parent:KC},rB={type:r.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},iB={type:r.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:r.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},aB={id:"d64152ea-831f-4426-9506-a39bfa170513",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iB},sB={type:r.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},oB={type:r.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:r.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},lB={type:r.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},GT={type:r.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:aB,readsValue:oB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[lB],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:sB},cB={type:r.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:r.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},dB={id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:cB},uB={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:r.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:dB,required:!0,index:1,writesValues:[GT],parent:rB},pB={type:r.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},yB={type:r.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},hB={type:r.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},fB={id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:hB},mB={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:r.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:fB,required:!0,index:0,writesValues:[LT,$T],parent:yB},TB={type:r.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:[mB,uB],calls:[nB,GT],index:1,private:!1,implements:null,x:0,y:0,parent:pB},EB={type:r.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},RB={type:r.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:r.Property,entityId:"employee-manager-property-id"},bB={id:"employee-manager-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:EB,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:RB},gB={type:r.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},vB={hidden:!1,required:!0,type:r.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:bB,abstract:!1,parent:gB},IB={type:r.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:r.Property,entityId:"employee-start-date-property-id"},PB={id:"employee-start-date-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:IB},DB={type:r.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},AB={hidden:!1,required:!0,type:r.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:PB,abstract:!1,parent:DB},SB={type:r.GenericReference,id:"employee-department-property-ref-id",entityType:r.Property,entityId:"employee-department-property-id"},OB={id:"employee-department-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:SB},CB={type:r.GenericReference,id:"employee-department-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},BB={hidden:!1,required:!0,type:r.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:OB,abstract:!1,parent:CB},wB={type:r.GenericReference,id:"employee-prototype-parent-ref-id",entityType:r.Project,entityId:W},Dt={type:r.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[BB,AB,vB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ct],x:0,y:0,parent:wB},_B={type:r.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:r.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},MB={id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:_B},NB={type:r.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},$B={hidden:!1,required:!0,type:r.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:MB,abstract:!1,parent:NB},VB={type:r.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:r.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},LB={id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VB},GB={type:r.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bl={hidden:!1,required:!0,type:r.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:LB,abstract:!1,parent:GB},FB={type:r.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:r.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},UB={id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:FB},xB={type:r.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},jB={hidden:!1,required:!0,type:r.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:UB,private:!0,abstract:!1,parent:xB},kB={type:r.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:r.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},qB={id:"ad44250b-40c2-48f7-a480-381fa938f562",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kB},JB={type:r.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},WB={hidden:!1,required:!0,type:r.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:qB,implements:null,private:!0,static:!1,abstract:!1,parent:JB},HB={type:r.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:r.Project,entityId:W},Tt={type:r.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[$B,bl,jB,WB],static:!1,abstract:!1,abstractMethods:[],methods:[NO,TB],extends:[],implements:[_e],x:0,y:0,parent:HB},YB={type:r.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:r.Project,entityId:W},gl={type:r.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:YB};r.GenericReference,r.DataType;const zB={id:"cron-job-entity-expression-property-ref-id",type:r.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:r.Property},ZB={id:"cron-job-entity-expression-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:zB},XB={id:"cron-job-entity-ref-id",type:r.GenericReference,entityId:"cron-job-entity-id",entityType:r.CustomEntity},QB={hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:r.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",dataType:ZB,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:XB},KB={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:r.GenericReference,entityId:"show-popup-func-decl-id",entityType:r.FunctionDeclaration},ew={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:r.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:r.FunctionDeclaration},tw={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:r.FunctionCall,declaration:gl,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[KB],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:ew},nw={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:r.GenericReference,entityId:"cron-job-entity-id",entityType:r.CustomEntity},rw={id:"cron-job-entity-trigger-func-decl-id",version:1,type:r.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:Wo,calls:[tw],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:nw},iw={id:"cron-job-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},aw={id:"cron-job-entity-id",version:1,type:r.CustomEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[QB],static:!0,abstract:!1,abstractMethods:[],extends:[Ho],implements:[],methods:[rw],x:0,y:0,parent:iw},sw={type:r.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:r.Project,entityId:W},ow={type:r.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:[Ba],x:0,y:0,parent:sw},FT="f558fbf8-67de-4545-9804-6ae621e0b2d4",lw={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},cw={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},dw={id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:lw,autogeneration:null,valueAsType:null},parent:cw},uw={id:"getCompanyByIdEndpointReachedEntityEventRef",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},pw={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},yw={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},hw={id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:pw,autogeneration:null,valueAsType:null},parent:yw},fw={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:r.ArgumentDeclaration,writesValues:[],name:"Request headers",dataType:hw,required:!0,index:0,parent:uw},mw={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},Tw={id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:r.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:dw,required:!0,index:1,parent:mw},Ew={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},Rw={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},bw={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},gw={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:F,defaultValue:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:Rw,autogeneration:null,valueAsType:null},parent:bw},vw={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:r.ArgumentDeclaration,writesValues:[],name:"Request query params",dataType:gw,required:!0,index:2,parent:Ew},Iw={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},Pw={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},Dw={id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:Pw},Aw={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:r.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:Dw,index:3,required:!0,parent:Iw},Sw={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},Ow={id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Sw},Cw={id:"getCompanyByIdEndpointReturnStatementRef",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},Bw={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:r.ReturnDeclaration,name:"Response code",dataType:Ow,readsValue:null,required:!0,index:0,parent:Cw},ww={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},_w={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},Mw={id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:ww,autogeneration:null,valueAsType:null},parent:_w},Nw={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},$w={isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:r.ReturnDeclaration,name:"Response headers",dataType:Mw,readsValue:null,required:!0,index:1,parent:Nw},Vw={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},Lw={id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:Vw},Gw={id:"getCompanyByIdEndpointReturnStatementRefThree",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},Fw={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:r.ReturnDeclaration,name:"Response body",dataType:Lw,readsValue:null,required:!0,index:2,parent:Gw},Uw={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:r.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:r.FunctionDeclaration},xw={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},jw={id:"getCompanyByIdEndpointReturnStatement",type:r.ReturnStatement,version:1,outputs:[Bw,$w,Fw],calledByError:[],calledByEntry:[Uw],calledBySuccess:[],throws:null,x:0,y:0,parent:xw},kw={id:"endpointBuiltInBaseEntityRefFour",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:FT},qw={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:r.FunctionDeclaration,inputs:[fw,Tw,vw,Aw],returnStatements:[jw],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:jo,index:0,private:!1,x:0,y:0,parent:kw},Jw={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},Ww={id:"getCompanyByIdEndpointPathPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"getCompanyByIdEndpointPathProperty"},Hw={id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.String,value:"/company/{id}",parent:Jw,valueAsType:null,autogeneration:null},parent:Ww},Yw={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},zw={hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:r.Property,private:!1,abstract:!1,static:!0,implements:Uo,dataType:Hw,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:Yw},Zw={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},Xw={id:"getCompanyByIdEndpointMethodPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"getCompanyByIdEndpointMethodProperty"},Qw={id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:gn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,parent:Zw,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:Xw},Kw={id:"getCompanyByIdEndpointBaseEntityRefThree",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},e_={hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:r.Property,private:!1,abstract:!1,static:!0,implements:xo,index:0,dataType:Qw,description:null,parent:Kw},t_={type:r.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:r.Project,entityId:W},n_={type:r.CustomEntity,id:FT,version:1,name:"Get given company data by id",description:null,properties:[zw,e_],methods:[qw],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[Ba],x:0,y:0,parent:t_},r_={id:"product-prototype-database-property-ref-id",type:r.GenericReference,entityId:"product-prototype-database-property-id",entityType:r.Property},i_={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"product-prototype-database-property-data-type-default-value-id",entityType:r.DataType},a_={id:"product-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:fl,autogeneration:null,parent:i_},parent:r_},s_={id:"product-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},o_={hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ei,static:!0,index:0,dataType:a_,description:"The database that the entity belongs to.",parent:s_},l_={type:r.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:r.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},c_={id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:l_},d_={type:r.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:r.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},u_={hidden:!1,required:!0,type:r.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:c_,abstract:!1,parent:d_},p_={type:r.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:r.Project,entityId:W},y_={type:r.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[_e],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[o_,u_],methods:[],x:0,y:0,parent:p_},Fi="project-loaded-event-id",Wt="get-bitcoin-price-http-call-operation-id",UT="get-bitcoin-price-http-call-response-body-id",ds="validate-bitcoin-price-response-operation-ids",h_={type:r.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:UT},f_={type:r.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:r.Operation,entityId:ds},xT={id:"validate-bitcoin-data-to-validate-input-map-id",type:r.InputMap,version:1,declaration:kn.fixedArguments[1],name:null,description:null,readsValue:h_,defaultValue:null,dynamicArguments:[],index:0,parent:f_},m_={type:r.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},T_={type:r.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:r.Operation,entityId:ds},E_={id:"validate-bitcoin-type-to-match-input-map-id",type:r.InputMap,version:1,declaration:kn.fixedArguments[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:r.PrimitiveValue,version:1,name:v.EntityTemplate,valueAsType:DT,value:null,parent:m_,autogeneration:null},dynamicArguments:[],index:0,parent:T_},R_={type:r.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:r.Operation,entityId:ds},b_={id:"validate-bitcoin-validated-entity-output-map-id",type:r.OutputMap,version:1,declaration:kn.fixedReturns[0],writesValues:[],index:0,parent:R_},g_={type:r.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:r.GlobalEvent,entityId:Fi},v_={type:r.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:r.Operation,entityId:Wt},I_={type:r.Operation,id:ds,version:1,declaration:kn,inputs:[E_,xT],outputs:[b_],process:null,dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[v_],parent:g_},P_={type:r.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:r.FunctionCall,entityId:Wt},D_={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:r.InputMap,declaration:Ia,name:null,description:null,readsValue:null,defaultValue:null,dynamicArguments:[],index:0,parent:P_},A_={type:r.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:r.FunctionCall,entityId:Wt},S_={type:r.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:r.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},O_={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:r.InputMap,declaration:Pa,name:null,description:null,readsValue:null,defaultValue:{id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:r.PrimitiveValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:v.String,parent:S_,valueAsType:null,autogeneration:null},index:1,dynamicArguments:[],parent:A_},C_={type:r.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:r.FunctionCall,entityId:Wt},B_={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:r.InputMap,declaration:Da,name:null,description:null,readsValue:null,dynamicArguments:[],defaultValue:null,index:2,parent:C_},w_={type:r.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:r.FunctionCall,entityId:Wt},__={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:r.InputMap,declaration:Aa,name:null,description:null,readsValue:null,dynamicArguments:[],defaultValue:null,index:3,parent:w_},M_={type:r.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:r.FunctionCall,entityId:Wt},N_={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:r.OutputMap,declaration:Sa,writesValues:[],index:1,parent:M_},$_={type:r.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:r.FunctionCall,entityId:Wt},V_={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:r.OutputMap,declaration:Lo,writesValues:[],index:0,parent:$_},L_={type:r.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:r.FunctionCall,entityId:Wt},G_={id:UT,type:r.OutputMap,version:1,declaration:fi,writesValues:[xT],index:2,parent:L_},F_={type:r.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:r.FunctionDeclaration,entityId:Wt},U_={type:r.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:r.GlobalEvent,entityId:Fi},x_={type:r.Operation,id:Wt,version:1,declaration:mi,inputs:[D_,O_,B_,__],outputs:[V_,N_,G_],process:null,parent:U_,calledByError:[],calledByEntry:[F_],calledBySuccess:[],dynamicArguments:[],successCalls:[I_],errorCalls:[],error:null,x:0,y:0},j_={type:r.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:r.GlobalEvent,entityId:Fi},k_={type:r.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:r.GlobalEvent,entityId:Fi},q_={process:null,type:r.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:gl,inputs:[],outputs:[],calledByError:[],calledByEntry:[j_],calledBySuccess:[],parent:k_,successCalls:[],errorCalls:[],error:null,x:0,y:0},J_={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:r.GenericReference,entityType:r.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},W_={type:r.GlobalEvent,id:Fi,version:1,name:en.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:$a,parent:J_,inputs:[],calls:[q_,x_],x:0,y:0},Mt="abort-execution-func-declaration-id",Ui="abort-execution-func-exec-var-declaration-id",us="abort-execution-func-small-wait-op-id",vl="abort-execution-func-long-wait-op-id",jT="abort-execution-func-long-wait-process-output-id",kT="abort-execution-func-exec-var-instance-write-id",qT="abort-execution-func-long-wait-return-stmt-id",JT="abort-execution-func-small-wait-return-stmt-id",H_="abort-execution-func-exec-var-instance-abort-call-id",Il="abort-execution-func-exec-var-instance-abort-internal-call-id",WT="abort-execution-func-exec-second-wait-op-id",Y_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},z_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:r.DataType,entityId:"short-wait-return-statement-returned-hello-string-data-type-id"},Z_={id:"short-wait-return-statement-returned-hello-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:z_},constant:!1,parent:Y_},X_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:r.ReturnStatement,entityId:JT},Q_={isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:Z_,readsValue:null,required:!0,index:0,parent:X_},K_={type:r.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:us},eM={type:r.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},HT={type:r.ReturnStatement,id:JT,version:1,outputs:[Q_],calledByError:[],calledByEntry:[],calledBySuccess:[K_],throws:null,x:0,y:0,parent:eM},tM={type:r.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"second-wait-argument-map-id"},nM={type:r.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:r.Operation,entityId:WT},rM={id:"second-wait-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:r.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:v.Number,parent:tM},index:0,parent:nM},iM={type:r.GenericReference,id:"small-wait-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},aM={type:r.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:r.InternalCall,entityId:Il},sM={id:WT,type:r.Operation,version:1,declaration:ot,inputs:[rM],dynamicArguments:[],outputs:[],process:null,successCalls:[HT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[aM],error:null,parent:iM},oM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:r.VariableInstance,entityId:kT},lM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:r.Operation,entityId:us},cM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},dM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Ui},uM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:r.InternalCall,entityId:Il},pM={id:H_,type:r.VariableInstance,version:1,declaration:dM,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[uM],parent:cM},YT={id:Il,type:r.InternalCall,version:1,inputs:[],outputs:[],declaration:Yo,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[oM,lM],successCalls:[sM],errorCalls:[],error:null,index:0,parent:pM},yM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},hM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:r.VariableDeclaration,entityId:Ui},fM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:r.FunctionDeclaration,entityId:Mt},mM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Ui},TM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:r.OutputMap,entityId:jT},Pl={id:kT,type:r.VariableInstance,version:1,declaration:mM,inputs:[],outputs:[],calledByError:[],calledByEntry:[fM],calledBySuccess:[hM],successCalls:[YT],errorCalls:[],x:0,y:0,readsValue:TM,writesValues:[],internalCalls:[],parent:yM},EM={type:r.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ui};r.GenericReference,r.DataType;const RM={id:"abort-exec-func-var-decl-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:zo,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:EM,defaultValue:null},bM={type:r.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},gM={type:r.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},vM={id:Ui,type:r.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:RM,inputs:[],outputs:[],calledByError:[],calledByEntry:[gM],calledBySuccess:[],successCalls:[Pl],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:bM},IM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},PM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:r.DataType,entityId:"long-wait-return-statement-returned-hello-string-data-type-id"},DM={id:"long-wait-return-statement-returned-hello-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:PM},constant:!1,parent:IM},AM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:r.ReturnStatement,entityId:qT},SM={isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:DM,readsValue:null,required:!0,index:0,parent:AM},OM={type:r.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:vl},CM={type:r.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},zT={type:r.ReturnStatement,id:qT,version:1,outputs:[SM],calledByError:[],calledByEntry:[],calledBySuccess:[OM],throws:null,x:0,y:0,parent:CM},BM={type:r.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"long-argument-map-id"},ZT={type:r.GenericReference,id:"long-argument-map-parent-ref-id",entityType:r.Operation,entityId:vl},wM={id:"long-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:r.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:v.Number,parent:BM},index:0,parent:ZT},_M={type:r.GenericReference,id:"long-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},MM={type:r.GenericReference,id:"long-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},NM={id:jT,type:r.OutputMap,version:1,declaration:Xo,writesValues:[Pl],index:0,parent:ZT},$M={id:vl,type:r.Operation,version:1,declaration:ot,inputs:[wM],dynamicArguments:[],outputs:[],process:NM,successCalls:[zT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[MM],calledBySuccess:[],error:null,parent:_M},VM={type:r.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"small-wait-argument-map-id"},LM={type:r.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:r.Operation,entityId:us},GM={id:"small-wait-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:r.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:v.Number,parent:VM},index:0,parent:LM},FM={type:r.GenericReference,id:"small-wait-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},UM={type:r.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},xM={id:us,type:r.Operation,version:1,declaration:ot,inputs:[GM],dynamicArguments:[],outputs:[],process:null,successCalls:[YT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[UM],calledBySuccess:[],error:null,parent:FM},jM={type:r.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:r.Project,entityId:W},XT={id:"abort-execution-func-decl-id",type:r.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[zT,HT],calls:[xM,vM,Pl,$M],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:jM},kM={type:r.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:r.Project,entityId:W},qM={id:"call-execution-abort-func-id",type:r.FunctionCall,version:1,declaration:XT,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:kM},Dl="manual-hello-world-loop-func-decl-id",QT="manual-hello-world-loop-func-return-statement-id",on="manual-hello-world-loop-id",xi="manual-hello-world-loop-body-id",KT="manual-hello-world-loop-break-statement-id",ps="manual-hello-world-loop-current-iteration-number-output-map-id",Al="manual-hello-world-loop-previous-iterations-results-output-map-id",Sl="assembled-hello-world-text-output-id",eE="assembled-hello-world-list-output-id",ji="iteration-number-is-equal-or-greater-than-10-condition-id",ys="join-hello-world-and-number-operation-id",hs="append-string-to-list-operation-id",tE="hello-world-loop-output-map-id",JM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:r.ReturnStatement,entityId:QT},WM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:r.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},HM={id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WM},YM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:r.OutputMap,entityId:tE},nE={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:r.ReturnDeclaration,name:"Results",description:null,dataType:HM,readsValue:YM,required:!0,index:0,parent:JM},zM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:r.Loop,entityId:on},ZM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:r.FunctionDeclaration,entityId:Dl},rE={type:r.ReturnStatement,id:QT,version:1,outputs:[nE],calledByError:[],calledByEntry:[],calledBySuccess:[zM],parent:ZM,throws:null,x:0,y:0},XM={type:r.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:r.BreakStatement,entityId:KT},QM={type:r.GenericReference,id:"hello-world-loop-break-statement-output-data-type-ref-id",entityType:r.ReturnDeclaration,entityId:"hello-world-loop-break-statement-output-id"},KM={id:"hello-world-loop-break-statement-output-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:QM},eN={type:r.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:r.OutputMap,entityId:Sl},Ol={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:r.ReturnDeclaration,name:"Iteration result",description:null,dataType:KM,readsValue:eN,required:!0,index:0,parent:XM},tN={type:r.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:r.Condition,entityId:ji},nN={type:r.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:r.Loop,entityId:on},iE={type:r.BreakStatement,id:KT,version:1,outputs:[Ol],calledByError:[],calledByEntry:[],calledBySuccess:[tN],parent:nN,throws:null,x:0,y:0},rN={type:r.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:r.ContinueStatement,entityId:"hello-world-loop-continue-statement"},iN={type:r.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:r.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},aN={id:"hello-world-loop-continue-statement-output-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iN},sN={type:r.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:r.OutputMap,entityId:Sl},aE={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:r.ReturnDeclaration,name:"Iteration result",description:null,dataType:aN,readsValue:sN,required:!0,index:0,parent:rN},oN={type:r.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:r.Condition,entityId:ji},lN={type:r.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:r.Loop,entityId:on},sE={type:r.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[aE],calledBySuccess:[],calledByError:[oN],calledByEntry:[],parent:lN,throws:null,x:0,y:0};r.GenericReference,r.InputMap;const cN={type:r.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:r.Operation,entityId:hs},dN={type:r.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:r.OutputMap,entityId:Al},oE={id:"append-string-to-list-base-string-map-id",type:r.InputMap,version:1,declaration:Co,name:null,description:null,readsValue:dN,defaultValue:null,dynamicArguments:[],index:0,parent:cN},uN={type:r.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:r.Operation,entityId:hs},pN={id:eE,type:r.OutputMap,version:1,writesValues:[Ol],declaration:yi,index:0,parent:uN},yN={type:r.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:r.Condition,entityId:ji},hN={type:r.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:eE},fN={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:hs},lE={id:"latest-string-to-add-input-map-id",version:1,type:r.InputMap,declaration:Bo,name:null,description:null,readsValue:hN,dynamicArguments:[],defaultValue:null,index:1,parent:fN},mN={type:r.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:r.FunctionDeclaration,entityId:on},TN={type:r.Operation,id:hs,declaration:va,version:1,inputs:[oE,lE],outputs:[pN],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[yN],dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:mN},EN={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:xi},RN={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:r.Loop,entityId:on},bN={type:r.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ps},cE={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:r.Condition,entityId:ji},gN={id:"current-iteration-number-to-check-map-id",version:1,type:r.InputMap,declaration:wr.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:bN,index:1,defaultValue:null,parent:cE},vN={type:r.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:"max-num-iterations-value-map-id"},IN={id:"max-num-iterations-value-map-id",version:1,type:r.InputMap,declaration:wr.fixedArguments[1],name:null,description:null,dynamicArguments:[],readsValue:null,index:0,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:10,autogeneration:null,valueAsType:null,parent:vN},parent:cE},PN={type:r.Condition,id:ji,version:1,declaration:wr,inputs:[IN,gN],calledByError:[],calledByEntry:[EN],calledBySuccess:[],successCalls:[iE,TN],errorCalls:[sE],x:0,y:0,parent:RN},DN={type:r.GenericReference,id:"base-string-map-ref-id",entityType:r.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},AN={type:r.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:r.Operation,entityId:ys},SN={id:"join-hello-world-and-number-base-string-map-id",type:r.InputMap,version:1,declaration:ba,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:r.PrimitiveValue,version:1,value:"Hello world ",name:v.String,parent:DN,valueAsType:null,autogeneration:null},dynamicArguments:[],index:0,parent:AN},ON={type:r.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:r.Operation,entityId:ys},CN={id:Sl,type:r.OutputMap,version:1,writesValues:[lE,aE],declaration:yi,index:0,parent:ON},BN={type:r.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:xi},wN={type:r.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ps},_N={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:ys},dE={id:"current-iteration-number-input-map-id",version:1,type:r.InputMap,declaration:ga,name:null,description:null,readsValue:wN,dynamicArguments:[],defaultValue:null,index:1,parent:_N},MN={type:r.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:r.FunctionDeclaration,entityId:on},NN={type:r.Operation,id:ys,declaration:hi,version:1,inputs:[SN,dE],outputs:[CN],process:null,calledByError:[],calledByEntry:[BN],calledBySuccess:[],dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:MN},$N={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:Al,entityType:r.ArgumentDeclaration},VN={id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:$N},LN={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:r.GenericReference,entityId:xi,entityType:r.FunctionDeclaration},GN={id:Al,type:r.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:VN,writesValues:[oE],index:1,parent:LN},FN={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:r.GenericReference,entityId:xi,entityType:r.FunctionDeclaration},UN={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:ps,entityType:r.ArgumentDeclaration};r.DataType;const xN={id:ps,type:r.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,dataType:null,writesValues:[dE],index:0,parent:FN},jN={id:"manual-flow-loop-body-parent-ref-id",type:r.GenericReference,entityId:on,entityType:r.Loop},kN={id:xi,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[xN,GN],calls:[PN,NN],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:jN},qN={type:r.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:r.Loop,entityId:on},JN={type:r.OutputMap,id:tE,version:1,declaration:Ol,writesValues:[nE],index:0,parent:qN},WN={id:"manual-hello-world-loop-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},HN={id:"manual-hello-world-loop-called-by-ref-id",type:r.GenericReference,entityId:Dl,entityType:r.FunctionDeclaration},YN={id:on,type:r.Loop,version:1,declaration:Fo,inputs:[],outputs:[JN],body:kN,successCalls:[rE],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[HN],calledBySuccess:[],breakStatements:[iE],continueStatements:[sE],x:0,y:0,parent:WN},zN={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},uE={type:r.FunctionDeclaration,id:Dl,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[YN],returnStatements:[rE],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:zN},ZN={type:r.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:r.Project,entityId:W},XN={id:"call-hello-world-loop-id",type:r.FunctionCall,version:1,declaration:uE,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:ZN},ln="company-dto-function-declaration-id",Cl="company-dto-func-declaration-argument-dcl-id",Ht="company-dto-function-company-variable-id",wn="company-dto-function-company-dto-variable-id",xr="iterate-over-employee-list-loop-id",pE="iterate-over-employee-list-loop-employee-dto-output-map-id",Bl="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",ki="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",yE="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",QN="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",hE="iterate-over-employee-list-continue-statement-id",fs="iterate-over-employee-list-loop-body-id",fE="company-dto-func-declaration-return-statement-id",mE="company-dto-func-declaration-return-decl-id",TE="company-dto-func-declaration-company-variable-id-output-map-id",EE="company-dto-func-declaration-company-variable-employess-output-map-id",RE="company-dto-func-declaration-company-variable-name-output-map-id",KN="company-dto-func-declaration-company-dto-variable-input-map-id",e0="company-dto-func-declaration-company-dto-variable-employess-input-map-id",t0="company-dto-func-declaration-company-dto-variable-name-input-map-id",ms="company-dto-func-declaration-owner-variable-id",n0="company-dto-func-declaration-company-dto-variable-owner-input-map-id",bE="company-dto-func-declaration-company-variable-owner-output-map-id",gE="company-dto-func-declaration-owner-variable-id-output-map-id",Ts="company-dto-func-declaration-bank-account-variable-id",r0="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",vE="company-dto-func-declaration-company-variable-bank-account-output-map-id",IE="company-dto-func-declaration-bank-account-variable-id-output-map-id",i0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:mE},a0={id:"company-dto-func-returned-company-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:i0},s0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:fE},o0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:wn},PE={isError:!1,id:mE,type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:a0,readsValue:o0,required:!0,index:0,parent:s0},l0={type:r.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:r.Operation,entityId:wn},c0={type:r.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},wl={type:r.ReturnStatement,id:fE,version:1,outputs:[PE],calledByError:[],calledByEntry:[],calledBySuccess:[l0],throws:null,x:0,y:0,parent:c0},d0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:gE},u0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},DE={id:n0,type:r.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,dynamicArguments:[],index:5,readsValue:d0,parent:u0},p0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:IE},y0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},AE={id:r0,type:r.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:p0,parent:y0},h0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:RE},f0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},SE={id:t0,type:r.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:h0,parent:f0},m0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:pE},T0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},OE={id:e0,type:r.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:m0,parent:T0},E0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:TE},R0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},CE={id:KN,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,dynamicArguments:[],index:1,readsValue:E0,parent:R0},b0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},g0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:r.VariableDeclaration,entityId:Ts},v0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:r.VariableDeclaration,entityId:ms},I0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:r.VariableDeclaration,entityId:xr},_l={id:wn,type:r.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[g0,v0,I0],successCalls:[wl],errorCalls:[],readsValue:null,writesValues:[PE],inputs:[CE,SE,AE,DE,OE],outputs:[],internalCalls:[],parent:b0,x:0,y:0},Zn="employee-dto-func-declaration-id",Ml="employee-dto-func-declaration-argument-dcl-id",BE="employee-dto-func-declaration-return-statement-id",wE="employee-dto-func-declaration-return-decl-id",Xn="employee-dto-func-declaration-employee-variable-id",Qn="employee-dto-func-declaration-employee-dto-variable-id",Es="employee-dto-func-declaration-manager-variable-id",_E="employee-dto-func-declaration-employee-variable-id-output-map-id",ME="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",NE="employee-dto-func-declaration-employee-variable-department-output-map-id",$E="employee-dto-func-declaration-employee-variable-manager-output-map-id",VE="employee-dto-func-declaration-manager-variable-id-output-map-id",P0="employee-dto-func-declaration-employee-dto-variable-input-map-id",D0="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",A0="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",S0="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",O0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:wE},C0={id:"employee-dto-func-returned-employee-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:O0},B0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:BE},w0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Qn},LE={isError:!1,id:wE,type:r.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",dataType:C0,readsValue:w0,required:!0,index:0,parent:B0},_0={type:r.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:r.Operation,entityId:Qn},M0={type:r.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},Nl={type:r.ReturnStatement,id:BE,version:1,outputs:[LE],calledByError:[],calledByEntry:[],calledBySuccess:[_0],throws:null,x:0,y:0,parent:M0},N0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:VE},$0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},GE={id:S0,type:r.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:N0,parent:$0},V0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:NE},L0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},FE={id:A0,type:r.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:V0,parent:L0},G0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ME},F0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},UE={id:D0,type:r.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:G0,parent:F0},U0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:_E},x0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},xE={id:P0,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,dynamicArguments:[],index:1,readsValue:U0,parent:x0},j0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},k0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Es},q0={id:Qn,type:r.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[k0],successCalls:[Nl],errorCalls:[],readsValue:null,writesValues:[LE],inputs:[xE,UE,FE,GE],outputs:[],internalCalls:[],parent:j0,x:0,y:0},J0={type:r.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Es},W0={id:VE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[GE],parent:J0},H0={type:r.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Es},Y0={id:"employee-dto-func-manager-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:H0,defaultValue:null},z0={type:r.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:$E},Z0={type:r.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn};r.GenericReference,r.VariableDeclaration;const jE={id:Es,type:r.VariableDeclaration,version:1,name:"Manager",dataType:Y0,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[q0],errorCalls:[],readsValue:z0,writesValues:[],inputs:[],outputs:[W0],internalCalls:[],parent:Z0,x:0,y:0},X0={type:r.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},Q0={id:$E,type:r.OutputMap,version:1,declaration:Dt.properties[2],index:3,writesValues:[jE],parent:X0},K0={type:r.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},e1={id:NE,type:r.OutputMap,version:1,declaration:Dt.properties[0],index:2,writesValues:[FE],parent:K0},t1={type:r.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},n1={id:ME,type:r.OutputMap,version:1,declaration:ct.properties[1],index:1,writesValues:[UE],parent:t1},r1={type:r.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},i1={id:_E,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[xE],parent:r1},a1={type:r.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},s1={id:"employee-dto-func-employee-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:a1,defaultValue:null},o1={type:r.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},l1={type:r.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:Ml},c1={type:r.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:r.FunctionDeclaration,entityId:Zn},kE={id:Xn,type:r.VariableDeclaration,version:1,name:"Company employee",dataType:s1,description:"A variable holding a company employee",calledByError:[],calledByEntry:[c1],calledBySuccess:[],successCalls:[jE],errorCalls:[],readsValue:l1,writesValues:[],inputs:[],outputs:[i1,n1,e1,Q0],internalCalls:[],parent:o1,x:0,y:0},d1={type:r.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Ml,entityType:r.ArgumentDeclaration},u1={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:Dt,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:d1,defaultValue:null},p1={type:r.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:Zn,entityType:r.FunctionDeclaration},y1={type:r.ArgumentDeclaration,id:Ml,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,dataType:u1,index:0,writesValues:[kE],parent:p1},h1={type:r.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},$l={type:r.FunctionDeclaration,id:Zn,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[y1],calls:[kE],implements:null,returnStatements:[Nl],collapsed:!1,private:!1,x:0,y:0,parent:h1},f1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:yE,entityType:r.ReturnDeclaration},m1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:Dt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:f1},T1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:r.GenericReference,entityId:ki,entityType:r.OutputMap},E1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:r.GenericReference,entityId:hE,entityType:r.ContinueStatement},qE={isError:!1,id:yE,type:r.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:T1,dataType:m1,required:!0,index:0,parent:E1},R1={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:r.GenericReference,entityId:ki,entityType:r.FunctionCall},b1={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},JE={id:hE,type:r.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[R1],outputs:[qE],throws:null,x:0,y:0,parent:b1},g1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:r.GenericReference,entityId:ki,entityType:r.FunctionCall},v1={id:QN,type:r.OutputMap,version:1,declaration:Nl.outputs[0],writesValues:[qE],index:0,parent:g1},I1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:r.GenericReference,entityId:Bl,entityType:r.ArgumentDeclaration},P1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:r.GenericReference,entityId:ki,entityType:r.FunctionCall},WE={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:$l.inputs[0],readsValue:I1,index:0,defaultValue:null,dynamicArguments:[],parent:P1},D1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:r.GenericReference,entityId:fs,entityType:r.FunctionDeclaration},A1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:r.GenericReference,entityId:fs,entityType:r.FunctionDeclaration},S1={id:ki,type:r.FunctionCall,version:1,declaration:$l,inputs:[WE],process:null,outputs:[v1],calledByError:[],calledByEntry:[D1],calledBySuccess:[],successCalls:[JE],errorCalls:[],error:null,x:0,y:0,parent:A1},O1={type:r.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Bl,entityType:r.ArgumentDeclaration},C1={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:Dt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:O1},B1={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:fs,entityType:r.FunctionDeclaration},w1={id:Bl,type:r.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:C1,required:!0,index:0,writesValues:[WE],parent:B1},_1={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},M1={id:fs,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each entity in the list.",inputs:[w1],calls:[S1],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:_1},N1={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},$1={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:r.GenericReference,entityId:EE,entityType:r.OutputMap},HE={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:qn.fixedArguments[0],defaultValue:null,dynamicArguments:[],readsValue:$1,index:0,parent:N1},V1={id:"iterate-over-employee-list-loop-parent-ref-id",type:r.GenericReference,entityId:ln,entityType:r.FunctionDeclaration},L1={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},G1={id:pE,type:r.OutputMap,version:1,declaration:qn.fixedReturns[0],writesValues:[OE],index:0,parent:L1},F1={type:r.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Ht},U1={id:xr,type:r.Loop,version:1,declaration:qn,inputs:[HE],successCalls:[_l],errorCalls:[],outputs:[G1],body:M1,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[F1],breakStatements:[],continueStatements:[JE],error:null,x:0,y:0,parent:V1},x1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ts},j1={id:IE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[AE],parent:x1},k1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ts},q1={id:"company-dto-func-bank-account-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:k1,defaultValue:null},J1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:vE},W1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln};r.GenericReference,r.VariableDeclaration;const YE={id:Ts,type:r.VariableDeclaration,version:1,name:"Bank account",dataType:q1,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[_l],errorCalls:[],readsValue:J1,writesValues:[],inputs:[],outputs:[j1],internalCalls:[],parent:W1,x:0,y:0},H1={type:r.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:ms},Y1={id:gE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[DE],parent:H1},z1={type:r.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:ms},Z1={id:"company-dto-func-owner-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:z1,defaultValue:null},X1={type:r.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:bE},Q1={type:r.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln};r.GenericReference,r.VariableDeclaration;const zE={id:ms,type:r.VariableDeclaration,version:1,name:"Owner",dataType:Z1,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[_l],errorCalls:[],readsValue:X1,writesValues:[],inputs:[],outputs:[Y1],internalCalls:[],parent:Q1,x:0,y:0},K1={type:r.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},e$={id:bE,type:r.OutputMap,version:1,declaration:Tt.properties[2],index:4,writesValues:[zE],parent:K1},t$={type:r.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},n$={id:vE,type:r.OutputMap,version:1,declaration:Tt.properties[2],index:3,writesValues:[YE],parent:t$},r$={type:r.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},i$={id:RE,type:r.OutputMap,version:1,declaration:Tt.properties[0],index:2,writesValues:[SE],parent:r$},a$={type:r.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},s$={id:EE,type:r.OutputMap,version:1,declaration:Tt.properties[3],index:1,writesValues:[HE],parent:a$},o$={type:r.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},l$={id:TE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[CE],parent:o$},c$={type:r.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},d$={id:"company-dto-func-company-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:c$,defaultValue:null},u$={type:r.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},p$={type:r.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:Cl},y$={type:r.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:r.FunctionDeclaration,entityId:ln},ZE={id:Ht,type:r.VariableDeclaration,version:1,name:"Company",dataType:d$,description:"A variable holding a company",calledByError:[],calledByEntry:[y$],calledBySuccess:[],successCalls:[YE,zE,U1],errorCalls:[],readsValue:p$,writesValues:[],inputs:[],outputs:[l$,s$,i$,n$,e$],internalCalls:[],parent:u$,x:0,y:0},h$={type:r.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Cl,entityType:r.ArgumentDeclaration},f$={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:h$,defaultValue:null},m$={type:r.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:ln,entityType:r.FunctionDeclaration},T$={type:r.ArgumentDeclaration,id:Cl,version:1,name:"Company",description:"The company to create a DTO for",required:!0,dataType:f$,index:0,writesValues:[ZE],parent:m$},E$={type:r.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},Vl={type:r.FunctionDeclaration,id:ln,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[T$],calls:[ZE],implements:null,index:null,returnStatements:[wl],collapsed:!1,private:!1,x:0,y:0,parent:E$},qi="exec-in-parallel-operation-call-id",Ji="exec-sequentially-operation-call-id",dt="concurrency-and-wait-function-declaration-id",XE="concurrency-and-wait-return-statement-id",QE="concurrency-and-wait-return-declaration-id",Ll="exec-in-parallel-argument-map-id",KE="exec-sequentially-argument-map-id",Gl="wait-for-2-seconds-operation-id",eR="wait-for-2-seconds-argument-map-id",Fl="map-company-dto-function-call-id",tR="map-company-dto-function-call-company-dto-output-map-id",Wi="company-dto-variable-one-id",Ul="company-dto-variable-one-instance-id",R$="company-dto-variable-two-id",b$={type:r.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:QE},g$={id:"returned-company-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:b$},v$={type:r.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:XE},I$={type:r.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Wi},nR={isError:!1,id:QE,type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:g$,readsValue:I$,required:!0,index:0,parent:v$},P$={type:r.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:Gl},D$={type:r.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},rR={type:r.ReturnStatement,id:XE,version:1,outputs:[nR],calledByError:[],calledByEntry:[],calledBySuccess:[P$],throws:null,x:0,y:0,parent:D$},A$={type:r.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:r.VariableInstance,entityId:Ul},S$={type:r.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:r.VariableInstance,entityId:Ul},O$={type:r.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},iR={id:R$,type:r.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[A$],internalCalls:[],writesValues:[nR],readsValue:S$,x:0,y:0,parent:O$},C$={type:r.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Wi},B$={type:r.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Wi},w$={type:r.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},_$={type:r.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Wi},aR={id:Ul,type:r.VariableInstance,version:1,declaration:_$,inputs:[],outputs:[],successCalls:[iR],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[C$],internalCalls:[],writesValues:[iR],readsValue:B$,x:0,y:0,parent:w$},M$={type:r.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:r.FunctionCall,entityId:Fl},N$={type:r.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:r.OutputMap,entityId:tR},$$={type:r.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},sR={id:Wi,type:r.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[aR],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[M$],internalCalls:[],writesValues:[aR],readsValue:N$,x:0,y:0,parent:$$},oR={type:r.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:r.FunctionCall,entityId:Fl},V$={id:"map-company-dto-function-call-company-input-map-id",type:r.InputMap,version:1,declaration:Vl.inputs[0],name:null,description:null,defaultValue:null,dynamicArguments:[],index:0,readsValue:null,parent:oR},L$={id:tR,type:r.OutputMap,version:1,declaration:wl.outputs[0],writesValues:[sR],index:0,parent:oR},G$={id:"map-company-dto-function-call-called-by-ref-id",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:dt},F$={id:"map-company-dto-function-call-parent-ref-id",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:dt},U$={id:Fl,type:r.FunctionCall,version:1,declaration:Vl,successCalls:[sR],process:null,errorCalls:[],inputs:[V$],outputs:[L$],calledByError:[],calledByEntry:[G$],calledBySuccess:[],parent:F$,x:0,y:0,error:null},x$={type:r.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:iT},j$={type:r.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:r.DataType,entityId:"last-timestamp-variable-datatype-id"},k$={id:"last-timestamp-variable-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:nn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:x$,defaultValue:{id:"last-timestamp-variable-default-value-id",type:r.PrimitiveValue,version:1,name:v.Date,value:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:j$,valueAsType:null}},q$={type:r.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:r.Project,entityId:W},xl={id:iT,type:r.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",dataType:k$,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:q$},J$={type:r.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:eR},W$={type:r.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:r.Operation,entityId:Gl},H$={id:eR,type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:r.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:v.Number,parent:J$},index:0,parent:W$},Y$={type:r.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},z$={type:r.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Ji},Z$={type:r.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:r.FunctionDeclaration,entityId:qi},lR={id:Gl,type:r.Operation,version:1,declaration:Lt,inputs:[H$],dynamicArguments:[],outputs:[],process:null,successCalls:[rR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[z$,Z$],calledBySuccess:[],error:null,parent:Y$},X$={type:r.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"wait-for-random-amount-input-map-id"},Q$={type:r.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:r.Operation,entityId:"wait-for-random-amount-id"},K$={id:"wait-for-random-amount-input-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:r.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:Ue.Random,rangeStart:1e3,rangeEnd:4e3},name:v.Number,parent:X$},index:0,parent:Q$},eV={type:r.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:r.Project,entityId:W},jr={id:"wait-for-random-amount-id",type:r.Operation,version:1,declaration:Lt,inputs:[K$],dynamicArguments:[],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:eV},cR="list-of-functions-variable-id",tV={type:r.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:cR},nV={id:"list-of-functions-variable-action-descriptor-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,error:null,dynamicReturnTypes:null,fixedReturns:[],parent:null},rV={type:r.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:r.DataType,entityId:"list-of-functions-variable-data-type-id"},iV={id:"list-of-functions-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nV,asType:!1,isList:!0,isNullable:!1,defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.ActionDescriptor,value:null,valueAsType:[jr,jr,jr,jr,jr],autogeneration:null,parent:rV},constant:!1,parent:tV},aV={type:r.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt};r.GenericReference,r.InputMap;const sV={type:r.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:r.InputMap,entityId:KE},oV={type:r.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:r.InputMap,entityId:Ll},dR={id:cR,type:r.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:iV,parent:aV,readsValue:null,writesValues:[sV,oV],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},lV={type:r.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:r.Operation,entityId:qi},cV={type:r.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},dV={type:r.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:"exec-in-parallel-return-map-id"},uV={type:r.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:r.Operation,entityId:qi},uR={id:"exec-in-parallel-result-variable-id",type:r.VariableInstance,version:1,declaration:xl,readsValue:dV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[uV],successCalls:[],errorCalls:[],internalCalls:[],parent:cV,x:0,y:0},pV={id:"exec-in-parallel-return-map-id",type:r.OutputMap,version:1,declaration:_o,writesValues:[uR],index:0,parent:lV},yV={type:r.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:r.Operation,entityId:qi},hV={id:Ll,type:r.InputMap,version:1,declaration:wo,name:null,description:null,dynamicArguments:[],readsValue:dR,defaultValue:null,index:0,parent:yV},fV={type:r.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},mV={type:r.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:dt},TV={process:null,id:qi,type:r.Operation,version:1,declaration:Lt,inputs:[hV],dynamicArguments:[],outputs:[pV],successCalls:[lR,uR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[mV],calledBySuccess:[],error:null,parent:fV},EV={type:r.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:r.Operation,entityId:Ji},RV={type:r.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},bV={type:r.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:"exec-sequentially-return-map-id"},gV={type:r.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:r.Operation,entityId:Ji},pR={id:"exec-sequentially-result-variable-id",type:r.VariableInstance,version:1,declaration:xl,readsValue:bV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[gV],successCalls:[],errorCalls:[],internalCalls:[],parent:RV,x:0,y:0},vV={id:"exec-sequentially-return-map-id",type:r.OutputMap,version:1,declaration:No,writesValues:[pR],index:0,parent:EV},IV={type:r.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:r.Operation,entityId:Ji},PV={id:KE,type:r.InputMap,version:1,declaration:Mo,name:null,description:null,dynamicArguments:[],readsValue:dR,defaultValue:null,index:0,parent:IV},DV={type:r.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},AV={type:r.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:dt},SV={id:Ji,type:r.Operation,version:1,declaration:rn,inputs:[PV],process:null,dynamicArguments:[],outputs:[vV],successCalls:[lR,pR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[AV],calledBySuccess:[],error:null,parent:DV},OV={type:r.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:r.Project,entityId:W},CV={type:r.FunctionDeclaration,id:dt,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:[SV,TV,U$],returnStatements:[rR],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:OV},BV={type:r.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:r.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},wV={id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:BV},_V={type:r.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:r.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},MV={isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",dataType:wV,readsValue:null,required:!0,index:0,parent:_V},NV={type:r.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},$V={type:r.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},yR={type:r.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[MV],calledByError:[],calledByEntry:[$V],calledBySuccess:[],throws:null,x:0,y:0,parent:NV},VV={type:r.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:r.Project,entityId:W},LV={type:r.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[yR],index:null,implements:null,returnStatements:[yR],collapsed:!1,private:!1,x:0,y:0,parent:VV},jl="get-current-date-and-time-func-decl-id",hR="get-current-date-and-time-return-statement-id",fR="get-current-date-and-time-return-declaration-id",mR="get-current-date-and-time-return-declaration-data-type-id",GV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:r.DataType,entityId:mR},FV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:fR},UV={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:mR,version:1,entity:nn,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"last-timestamp-variable-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.Date,valueAsType:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:GV},constant:!1,parent:FV},xV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:r.ReturnStatement,entityId:hR};r.ReturnDeclaration;const jV={type:r.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:jl},kV={type:r.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:jl};r.ReturnStatement;const qV={type:r.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:r.Project,entityId:W},JV={type:r.FunctionDeclaration,id:jl,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:qV},TR="do-math-return-statement-id",ER="do-math-return-declaration-id",WV={type:r.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:r.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},HV={id:"do-math-func-var-to-return-one-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WV},YV={type:r.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},zV={type:r.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:r.ReturnDeclaration,entityId:ER},ZV={type:r.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:HV,readsValue:null,writesValues:[zV],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:YV},XV={type:r.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:r.ReturnStatement,entityId:TR},QV={type:r.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:r.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},KV={id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:QV},eL={isError:!1,id:ER,version:1,type:r.ReturnDeclaration,name:"Result",description:null,dataType:KV,readsValue:ZV,required:!0,index:0,parent:XV},tL={type:r.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},nL={type:r.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},RR={type:r.ReturnStatement,id:TR,version:1,outputs:[eL],calledByError:[],calledByEntry:[],calledBySuccess:[tL],parent:nL,throws:null,x:0,y:0},rL={type:r.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:r.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},iL={id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:rL},aL={type:r.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},sL={type:r.GenericReference,id:"do-math-func-return-one-called-by",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},oL={type:r.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:r.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},bR={type:r.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:iL,description:null,readsValue:oL,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[sL],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:aL},lL={type:r.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},cL={type:r.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:r.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},dL={type:r.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:r.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},uL={id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:dL},pL={type:r.GenericReference,id:"do-math-func-return-two-called-by",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},gR={type:r.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[pL],successCalls:[],errorCalls:[],dataType:uL,readsValue:cL,writesValues:[],internalCalls:[],parent:lL,x:0,y:0},vR={type:r.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},yL={type:r.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},hL={type:r.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},fL={type:r.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:r.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},IR={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:r.InputMap,declaration:vo,name:null,description:null,dynamicArguments:[],readsValue:fL,defaultValue:null,index:0,parent:hL},mL={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:r.OutputMap,version:1,declaration:Po,writesValues:[bR,gR],index:0,parent:yL},TL={type:r.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},EL={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:r.GenericReference,entityType:r.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},PR={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:r.InputMap,declaration:Io,name:null,description:null,dynamicArguments:[],readsValue:EL,defaultValue:null,index:1,parent:TL},RL={type:r.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Ra,version:1,inputs:[IR,PR],dynamicArguments:[],outputs:[mL],calledByError:[],calledByEntry:[vR],calledBySuccess:[],process:null,successCalls:[RR,bR,gR],errorCalls:[],parent:vR,error:null,x:0,y:0},bL={type:r.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:r.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},gL={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:r.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:r.ArgumentDeclaration},DR={id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"do-math-func-argument-two-default-value-id",type:r.PrimitiveValue,version:1,value:1,name:v.Number,parent:bL,valueAsType:null,autogeneration:null},constant:!1,parent:gL},vL={type:r.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:r.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},IL={type:r.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},PL={type:r.GenericReference,id:"do-math-func-var-called-by-ref",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},AR={type:r.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:DR,inputs:[],outputs:[],calledByError:[],calledByEntry:[PL],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:vL,writesValues:[PR],internalCalls:[],x:0,y:0,parent:IL},DL={entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:r.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},AL={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:r.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:DR,writesValues:[AR],required:!0,index:1,parent:DL},SL={type:r.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:r.Project,entityId:W},OL={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},CL={type:r.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:r.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},BL={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:r.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:r.ArgumentDeclaration},wL={id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"do-math-func-argument-one-default-value-id",type:r.PrimitiveValue,version:1,value:5,name:v.Number,parent:CL,valueAsType:null,autogeneration:null},constant:!1,parent:BL},_L={id:"d8895765-f705-457e-85fa-25d130926769",type:r.ArgumentDeclaration,version:1,name:"N",dataType:wL,description:"The number to add",writesValues:[IR],required:!0,index:0,parent:OL},ML={type:r.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[_L,AL],calls:[RL,AR],implements:null,index:null,collapsed:!1,returnStatements:[RR],private:!1,x:0,y:0,parent:SL},Et="replace-bank-account-in-company-func-declaration-id",kl="company-entity-to-modify-arg-declaration-id",NL="account-number-to-create-arg-decl-id",kr="company-variable-id",qr="search-person-by-id-id",SR="new-bank-account-owner-arg-decl-id",OR="search-person-by-id-output-declaration-id",ql="search-person-by-id-output-entity-map-id",Rs="person-not-empty-condition-id",bs="create-new-bank-account-instance-operation-id",CR="create-new-bank-account-instance-operation-output-entity-map-id",BR="company-bank-account-output-map-id",Jl="old-bank-account-var-declaration-id",wR="old-bank-account-var-instance-id",_R="company-variable-instance-id",Wl="delete-bank-account-internal-call-id",$L={type:r.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},VL={type:r.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:r.InternalCall,entityId:Wl},LL={type:r.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:kr},GL={type:r.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:r.VariableInstance,entityId:_R},FL={type:r.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:CR},MR={type:r.InputMap,id:"bank-account-input-map-id",version:1,readsValue:FL,declaration:bl,name:null,description:null,index:0,defaultValue:null,dynamicArguments:[],parent:GL},UL={type:r.VariableInstance,id:_R,version:1,declaration:LL,inputs:[MR],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[VL],successCalls:[],errorCalls:[],internalCalls:[],parent:$L,readsValue:null,writesValues:[],x:0,y:0},xL={type:r.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},jL={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,constant:!1,defaultValue:null,parent:xL},kL={type:r.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:BR},qL={type:r.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},JL={type:r.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:r.VariableDeclaration,entityId:kr},WL={type:r.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:r.Operation,entityId:bs};r.GenericReference,r.VariableInstance;const HL={type:r.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:r.VariableDeclaration,entityId:Jl},YL={type:r.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:r.VariableDeclaration,entityId:Jl},zL={type:r.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:r.FunctionDeclaration,entityId:Et},ZL={type:r.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:r.InternalCall,entityId:Wl},XL={type:r.VariableInstance,id:wR,version:1,declaration:YL,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[ZL],errorCalls:[],parent:zL,readsValue:null,writesValues:[],x:0,y:0},NR={process:null,type:r.InternalCall,id:Wl,version:1,declaration:Jo,index:0,successCalls:[UL],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[WL,HL],parent:XL},$R={type:r.VariableDeclaration,id:Jl,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:jL,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[JL],successCalls:[NR],internalCalls:[],errorCalls:[],parent:qL,readsValue:kL,writesValues:[],x:0,y:0},QL={type:r.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},KL={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,constant:!1,defaultValue:null,parent:QL},eG={type:r.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:kl},tG={type:r.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},nG={type:r.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Et},rG={type:r.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},iG={id:BR,version:1,type:r.OutputMap,declaration:bl,index:0,parent:rG,writesValues:[$R]},VR={type:r.VariableDeclaration,id:kr,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:KL,inputs:[],outputs:[iG],calledByError:[],calledByEntry:[nG],calledBySuccess:[],successCalls:[$R],errorCalls:[],parent:tG,internalCalls:[],readsValue:eG,writesValues:[],x:0,y:0},aG={type:r.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:r.InputMap,entityId:"create-new-bank-account-instance-operation-entity-to-create-input-map-id"},sG={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:r.GenericReference,entityType:r.OutputMap,entityId:ql},LR={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:r.InputMap,declaration:uT,name:null,description:null,dynamicArguments:[],readsValue:sG,index:1,defaultValue:null,parent:aG},oG={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:NL},lG={type:r.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:r.InputMap,entityId:"create-new-bank-account-instance-operation-entity-to-create-input-map-id"},GR={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:r.InputMap,declaration:dT,name:null,description:null,dynamicArguments:[],readsValue:oG,defaultValue:null,index:0,parent:lG},cG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:r.Operation,entityId:bs},dG={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:r.InputMap,declaration:Cr.fixedArguments[0],name:null,description:null,dynamicArguments:[GR,LR],index:0,readsValue:null,defaultValue:{type:r.PrimitiveValue,name:v.EntityTemplate,value:null,valueAsType:Fr,autogeneration:null},parent:cG},uG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:r.Operation,entityId:bs},pG={id:CR,version:1,type:r.OutputMap,declaration:Cr.fixedReturns[0],index:0,writesValues:[MR],parent:uG},yG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:r.Condition,entityId:Rs},hG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},fG={process:null,id:bs,type:r.Operation,version:1,declaration:Cr,inputs:[dG],dynamicArguments:[],error:null,outputs:[pG],successCalls:[NR],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[yG],parent:hG,x:0,y:0},mG={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-thrown-error-datatype-id",entityType:r.DataType},TG={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:r.ReturnDeclaration};r.DataType,r.PrimitiveValue,v.String;const EG={id:"person-not-found-thrown-error-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:r.ReturnStatement},RG={isError:!0,id:"person-not-found-thrown-error-id",type:r.ReturnDeclaration,version:1,dataType:null,name:"Person not found error",description:"If the person entity was not found this error is outputted",parent:EG,required:!0,index:0,readsValue:null},bG={id:"person-not-found-error-return-statement-called-by-ref-id",type:r.GenericReference,entityId:Rs,entityType:r.Condition},gG={id:"person-not-found-error-return-statement-parent-ref-id",type:r.GenericReference,entityId:Et,entityType:r.FunctionDeclaration},vG={id:"person-not-found-error-return-statement-id",type:r.ReturnStatement,version:1,throws:RG,outputs:[],calledBySuccess:[],calledByError:[bG],calledByEntry:[],x:0,y:0,parent:gG},IG={type:r.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:r.Search,entityId:qr},PG={type:r.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},DG={type:r.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ql},AG={type:r.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:r.Condition,entityId:Rs},FR={id:"person-entity-to-check-map-id",version:1,type:r.InputMap,declaration:Jn.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:DG,index:0,defaultValue:null,parent:AG},SG={type:r.Condition,id:Rs,version:1,declaration:Jn,inputs:[FR],calledByError:[],calledByEntry:[],calledBySuccess:[IG],successCalls:[fG],errorCalls:[vG],x:0,y:0,parent:PG},OG={type:r.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:r.ReturnDeclaration,entityId:OR},CG={id:"search-person-by-id-output-entity-declaration-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,constant:!1,asType:!1,isNullable:!1,entity:ct,defaultValue:null,parent:OG},BG={type:r.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:r.Search,entityId:qr},UR={isError:!1,id:OR,type:r.ReturnDeclaration,version:1,dataType:CG,name:"Found person",description:"The person entity that was found",parent:BG,required:!0,index:0,readsValue:null},wG={type:r.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:r.Search,entityId:qr},_G={type:r.OutputMap,id:ql,version:1,declaration:UR,parent:wG,writesValues:[FR,LR],index:0},MG={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:r.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:r.ArgumentDeclaration};r.DataType;const NG={type:r.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:r.Search,entityId:qr},xR={id:"search-person-by-id-input-declaration-id",type:r.ArgumentDeclaration,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",index:0,required:!0,parent:NG,writesValues:[]},$G={type:r.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:r.Search,entityId:qr},VG={id:"search-person-by-id-input-map-reads-value-ref-id",type:r.GenericReference,entityId:SR,entityType:r.ArgumentDeclaration},jR={type:r.InputMap,id:"search-person-by-id-input-map",version:1,declaration:xR,name:null,description:null,readsValue:VG,defaultValue:null,parent:$G,dynamicArguments:[],index:0},LG={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},GG={type:r.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},FG={type:r.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Et},UG={type:r.Search,id:qr,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:LG,inputsDeclarations:[xR],inputs:[jR],outputsDeclarations:[UR],outputs:[_G],calledByError:[],calledByEntry:[FG],calledBySuccess:[],error:null,successCalls:[SG],errorCalls:[],parent:GG,x:0,y:0};r.GenericReference,r.DataType;const xG={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:"account-number-to-create-arg-decl-id",entityType:r.ArgumentDeclaration},jG={id:"account-number-to-create-arg-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:xG},kG={entityType:r.FunctionDeclaration,entityId:Et,type:r.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},qG={id:"account-number-to-create-arg-decl-id",type:r.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:jG,writesValues:[GR],required:!0,index:1,parent:kG};r.GenericReference,r.DataType;const JG={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:r.ArgumentDeclaration},WG={id:"new-bank-account-owner-arg-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ea,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:JG},HG={entityType:r.FunctionDeclaration,entityId:Et,type:r.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},YG={id:SR,type:r.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:WG,writesValues:[jR],required:!1,index:1,parent:HG},zG={type:r.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:r.Project,entityId:W},ZG={type:r.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:r.FunctionDeclaration,entityId:Et};r.GenericReference,r.DataType;const XG={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:r.GenericReference,entityId:kl,entityType:r.ArgumentDeclaration},QG={id:"company-entity-to-modify-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:XG},KG={id:kl,type:r.ArgumentDeclaration,version:1,name:"Company",dataType:QG,description:"The company to replace the bank account for",writesValues:[VR],required:!0,index:0,parent:ZG},eF={type:r.FunctionDeclaration,id:Et,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:[KG,qG,YG],index:null,implements:null,calls:[UG,VR],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:zG},tF={type:r.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:r.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},nF={type:r.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:tF,x:0,y:0},rF={type:r.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:r.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},iF={type:r.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:r.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},aF={type:r.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[nF],events:[],implements:iF,parent:rF,x:0,y:0},Hl="iterate-over-list-loop-id",kR="iterate-over-list-loop-body-id",qR="iterate-over-list-loop-body-current-iteration-argument-declaration-id",sF={type:r.GenericReference,id:"iterate-over-list-loop-body-current-iteration-argument-declaration-data-type-parent-ref-id",entityId:qR,entityType:r.ArgumentDeclaration},oF={id:"iterate-over-list-loop-body-current-iteration-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:sF},lF={id:"iterate-over-list-loop-body-current-iteration-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:kR,entityType:r.FunctionDeclaration},cF={id:qR,type:r.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:oF,required:!0,index:0,writesValues:[],parent:lF},dF={id:"iterate-over-list-loop-body-parent-ref-id",type:r.GenericReference,entityId:Hl,entityType:r.Loop},uF={id:kR,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each entity in the list.",inputs:[cF],calls:[],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:dF},pF={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:r.GenericReference,entityId:Hl,entityType:r.Loop},yF={id:"iterate-over-list-loop-iteration-list-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:qn.fixedArguments[0],defaultValue:null,dynamicArguments:[],readsValue:null,index:0,parent:pF},hF={id:"iterate-over-list-loop-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},fF={id:Hl,type:r.Loop,version:1,declaration:qn,inputs:[yF],successCalls:[],errorCalls:[],outputs:[],process:null,body:uF,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:hF};var Yl=(n=>(n.EQ="eq",n.NEQ="neq",n.GT="gt",n.GTE="gte",n.LT="lt",n.LTE="lte",n.LIKE="like",n.ILIKE="ilike",n))(Yl||{}),JR=(n=>(n.COUNT="count",n.SUM="sum",n.AVG="avg",n.MIN="min",n.MAX="max",n))(JR||{});const mF={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:JR.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:Yl.NEQ,value:null}]},where:[{name:"employee_count",operation:Yl.GT,value:1}]},TF={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},EF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:r.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:r.Search},WR={isError:!1,id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:r.ReturnDeclaration,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",dataType:null,readsValue:null,required:!0,index:0,parent:EF},RF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:r.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:r.Search},bF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:r.OutputMap,version:1,declaration:WR,writesValues:[],index:0,parent:RF},gF={id:"find-companies-with-multiple-employees-and-bank-account",type:r.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:[WR],inputs:[],outputs:[bF],query:mF,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:TF},Jr="random-company-employee-test-variable-id",zl="manager-global-variable-id",HR="global-user-instance-id",Kn="employee-mapped-dto-variable-id",Zl="employee-mapped-dto-variable-instance-id",YR="random-employee-id-output-map-id",zR="random-employee-birth-date-output-map-id",ZR="random-employee-department-output-map-id",XR="random-employee-manager-output-map-id",QR="manager-global-id-output-map-id",KR="global-user-instance-id-output-map-id",vF="employee-mapped-dto-requester-id-input-map-id",eb="employee-mapped-dto-now-timestamp-input-map-id",IF="employee-mapped-dto-id-input-map-id",PF="employee-mapped-dto-birth-date-input-map-id",DF="employee-mapped-dto-department-input-map-id",AF="employee-mapped-dto-manager-input-map-id",SF={type:r.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:QR},OF={type:r.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},tb={id:AF,type:r.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:SF,parent:OF},CF={type:r.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ZR},BF={type:r.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},nb={id:DF,type:r.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:CF,parent:BF},wF={type:r.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:zR},_F={type:r.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},rb={id:PF,type:r.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:wF,parent:_F},MF={type:r.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:YR},NF={type:r.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},ib={id:IF,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,dynamicArguments:[],index:1,readsValue:MF,parent:NF},$F={type:r.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:KR},VF={type:r.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},ab={id:vF,type:r.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,dynamicArguments:[],index:0,readsValue:$F,parent:VF},LF={type:r.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:zl},GF={id:QR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[tb],parent:LF},FF={type:r.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:zl},UF={id:"manager-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:FF,defaultValue:null},xF={type:r.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:XR},jF={type:r.GenericReference,id:"manager-variable-parent-ref-id",entityType:r.Project,entityId:W},sb={id:zl,type:r.VariableDeclaration,version:1,name:"Manager",dataType:UF,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:xF,writesValues:[],inputs:[],outputs:[GF],internalCalls:[],parent:jF,x:0,y:0},kF={type:r.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},qF={id:XR,type:r.OutputMap,version:1,declaration:Dt.properties[2],index:3,writesValues:[sb],parent:kF},JF={type:r.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},WF={id:ZR,type:r.OutputMap,version:1,declaration:Dt.properties[0],index:2,writesValues:[nb],parent:JF},HF={type:r.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},YF={id:zR,type:r.OutputMap,version:1,declaration:ct.properties[1],index:1,writesValues:[rb],parent:HF},zF={type:r.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},ZF={id:YR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[ib],parent:zF},XF={type:r.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},QF={id:"random-company-employee-test-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:XF,defaultValue:null},KF={type:r.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:r.Project,entityId:W},e4={id:Jr,type:r.VariableDeclaration,version:1,name:"Company employee",dataType:QF,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[ZF,YF,WF,qF],internalCalls:[],parent:KF,x:0,y:0},t4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:eb},n4={type:r.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:v.Date,version:1,valueAsType:null,value:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:t4},r4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:r.VariableInstance,entityId:Zl},i4={id:eb,type:r.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:n4,dynamicArguments:[],index:5,readsValue:null,parent:r4},a4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:r.VariableDeclaration,entityId:Kn},s4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:r.VariableDeclaration,entityId:Zl},o4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:r.Project,entityId:W},l4={id:Zl,type:r.VariableInstance,version:1,declaration:a4,calledByError:[],calledByEntry:[],calledBySuccess:[s4],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[i4],outputs:[],internalCalls:[],parent:o4,x:0,y:0},c4={type:r.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:r.Project,entityId:W},d4={id:Kn,type:r.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[l4],errorCalls:[],readsValue:null,writesValues:[],inputs:[ab,ib,rb,nb,tb],outputs:[],internalCalls:[],parent:c4,x:0,y:0},u4={type:r.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:r.VariableDeclaration,entityId:hl},p4={id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:ml,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:u4,defaultValue:null},y4={type:r.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:r.Project,entityId:W},ob={id:hl,type:r.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:p4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:y4},h4={type:r.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:r.VariableInstance,entityId:HR},f4={id:KR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[ab],parent:h4},m4={type:r.GenericReference,id:"global-user-instance-parent-ref-id",entityType:r.Project,entityId:W},T4={id:HR,type:r.VariableInstance,version:1,declaration:ob,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[f4],internalCalls:[],parent:m4,x:0,y:0},E4={type:r.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:hl},R4={type:r.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:r.DataType,entityId:"is-test-environment-variable-dcl-datatype-id"},b4={id:"is-test-environment-variable-dcl-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:bn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:E4,defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:v.Boolean,version:1,value:null,type:r.PrimitiveValue,autogeneration:{type:Ue.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:R4}},g4={type:r.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:r.Project,entityId:W},lb={id:"is-test-environment-variable-dcl-id",type:r.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",dataType:b4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:g4},v4={type:r.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:r.Project,entityId:W},I4={id:"is-test-environment-variable-instance-id",type:r.VariableInstance,version:1,declaration:lb,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:v4,x:0,y:0},cb={type:r.Project,id:W,version:1,name:"Mocked project to compile",description:"This project is used to test all sorts of features and edge cases. It is not meant to be used in production. Or to have any functionality that makes sense",projects:[aF],entities:[fl,ml,ct,y_,Dt,cs,PT,DT,Fr,ow,Tt,n_,aT,KD,aw],functions:[CV,XT,$l,LV,JV,uE,Vl,gl,eF,NT,ML],events:[W_],variableDeclarations:[lb,ob,xl,e4,sb,d4],variableInstances:[I4,T4],conditions:[],operations:[jr],functionCalls:[qM,XN],loops:[fF],searches:[gF]};var m=(n=>(n.Error="error",n.Warning="warning",n))(m||{}),g=(n=>(n.InvalidObjectStructure="invalid-object-structure",n.NameNotUniqueInScope="name-not-unique-in-scope",n.EmptyName="empty-name",n.MissingCaller="missing-caller",n.PropertyOverwrite="property-overwrite",n.MethodOverwrite="method-overwrite",n.NoOverlapWithImplementedSignature="no-overlap-with-implemented-signature",n.ReaderWriterIncompatibleDataType="reader-writer-incompatible-data-type",n.UnreachableEntity="unreachable-entity",n.InternalCallParentMissingDataType="internal-call-parent-missing-data-type",n.InternalCallParentDeclarationEntityInvalidType="internal-call-parent-declaration-entity-invalid-type",n.InternalCallDeclarationNotFoundInParentDatatypeEntity="internal-call-declaration-not-found-in-parent-datatype-entity",n.InternalCallDeclarationIsNotFunctionDeclaration="internal-call-declaration-is-not-function-declaration",n.InternalCallDeclarationNotInParentDatatypeEntity="internal-call-declaration-not-in-parent-datatype-entity",n))(g||{}),y=(n=>(n.RootReference="root-reference",n.ReferencedEntityNotFound="referenced-entity-not-found",n.EntityIdNotUnique="entity-id-not-unique",n.BuiltInEntityGenerated="built-in-entity-generated",n.BuiltInEntityUpdated="built-in-entity-updated",n.BuiltInEntityDeleted="built-in-entity-deleted",n.UnknownEntityType="unknown-entity-type",n.MissingTypeProperty="missing-type-property",n.MissingIdProperty="missing-id-property",n.BuiltInEntityParent="built-in-entity-parent",n.InvalidBuiltInEntityReference="invalid-built-in-entity-reference",n.RecommendedImplementAbstractEntityAction="recommended-implement-abstract-entity-action",n.RecommendedImplementOperationAction="recommended-implement-operation-action",n.RecommendedImplementFunctionCallAction="recommended-implement-function-call-action",n.RecommendedImplementVariableDeclarationAction="recommended-implement-variable-declaration-action",n.RecommendedImplementVariableInstanceAction="recommended-implement-variable-instance-action",n.RecommendedImplementConditionAction="recommended-implement-condition-action",n.InvalidReferenceObjectStructure="invalid-reference-object-structure",n.ContainsSingleButShouldBeReferenceList="contains-single-but-should-be-reference-list",n.ContainsListButShouldReferenceSingle="contains-list-but-should-reference-single",n.InvalidParentReference="invalid-parent-reference",n.InvalidImplementsReference="invalid-implements-reference",n.InvalidExtendsReference="invalid-extends-reference",n.InvalidGenerationActionPayload="invalid-generation-action-payload",n.InvalidReference="invalid-reference",n.InvalidInternalCallParentRelation="invalid-internal-call-parent-relation",n.InvalidUpdateEntityOperation="invalid-update-entity-operation",n.NewEntityWouldOverriteExisting="new-entity-would-overrite-existing",n.InvalidDownstreamPropertyOverride="invalid-downstream-property-override",n.UnrecognizedProperty="unrecognized-property",n.SelfReference="self-reference",n.DuplicateReference="duplicate-reference",n.CallerWithIncompatibleScope="caller-with-incompatible-scope",n.InvalidFunctionDeclarationForFunctionCall="invalid-function-declaration-for-function-call",n.InvalidInputMapDeclaration="invalid-input-map-declaration",n.InvalidActionDescriptorForOperation="invalid-action-descriptor-for-operation",n.InvalidActionDescriptorForCondition="invalid-action-descriptor-for-condition",n.InvalidActionDescriptorForLoop="invalid-action-descriptor-for-loop",n.InvalidInmutablePropertyOverride="invalid-inmutable-property-override",n.OutputOverwrite="output-overwrite",n.InputOverwrite="input-overwrite",n.IncompatibleScope="incompatible-scope",n.InvalidParentUpdate="invalid-parent-update",n.NonInteractiveEntityReferenced="non-interactive-entity-referenced",n.InvalidParentRelationType="invalid-parent-relation-type",n))(y||{}),O=(n=>(n.ScopeWithoutLogic="scope-without-logic",n.ExtendingAbstractEntity="extending-abstract-entity",n.ImplementingNonAbstractEntity="implementing-non-abstract-entity",n.AbstractEntityWithNonAbstractMethods="abstract-entity-with-non-abstract-methods",n.AbstractEntityWithNonAbstractProperties="abstract-entity-with-non-abstract-properties",n.StaticEntityWithNonStaticProperties="static-entity-with-non-static-properties",n.NonStaticPropertyInStaticEntity="non-static-property-in-static-entity",n.AbstractPropertyInNonAbstractEntity="abstract-property-in-non-abstract-entity",n.AbstractMethodInNonAbstractEntity="abstract-method-in-non-abstract-entity",n.IncorrectEntityImplementation="incorrect-entity-implementation",n.IncorrectMethodImplementation="incorrect-method-implementation",n.IncorrectPropertyImplementation="incorrect-property-implementation",n.PropertyImplementsNonAbstact="property-implements-non-abstract",n.NonStaticPropertyImplementsStatic="non-static-property-implements-static",n.StaticPropertyImplementsNonStatic="static-property-implements-non-static",n.PropertyImplementsIncompatibleType="property-implements-incompatible-type",n.MissingPropertyImplementation="missing-property-implementation",n.MissingMethodImplementation="missing-method-implementation",n.NoProperties="no-properties",n.ReadingFromIncompatibleType="reading-from-incompatible-type",n.WritingToIncompatibleType="writing-to-incompatible-type",n.InvalidPropertiesCombination="invalid-properties-combination",n.DisconnectedCallableEntity="disconnected-callable-entity",n.VariableReadsValueAndInternalCall="variable-reads-value-and-internal-call",n.VariableWritesValuesAndInternalCall="variable-writes-values-and-internal-call",n.VariableHasInputsAndInternalCall="variable-has-inputs-and-internal-calls",n.VariableHasOutputsAndInternalCall="variable-has-outputs-and-internal-call",n.VariableIsCalledAndHasInternalCall="variable-is-called-and-has-internal-call",n.VariableCallsOthersAndHasInternalCall="variable-calls-others-and-has-internal-call",n))(O||{});class E{constructor(e){l(this,"id");l(this,"message");l(this,"issue");l(this,"severity");l(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 g?new er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class er{constructor(e){l(this,"id");l(this,"message");l(this,"issue");l(this,"severity");l(this,"code");l(this,"entity");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code,this.entity=e.entity}clone(){return new er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function P4(n){const e=new Set;return n.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function j(n){const e=n.entity.errors.find(i=>i.id===n.id);return e?{new:!1,error:e}:{new:!0,error:new er(n)}}function D4(n,e){const t=new Map;return n.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function X(n,e){const t=[];return e.forEach(i=>{const a=n.find(s=>s.id===i.id);a?t.push(a):t.push(i)}),t}const Hi=c.union([c.string(),c.number(),c.boolean(),c.date()]),db=c.enum([Ue.CurrentDateAndTime,Ue.Random,Ue.Unique]),gs=c.object({type:db,rangeStart:Hi.nullable(),rangeEnd:Hi.nullable()}),Yi=gs.extend({type:c.literal(Ue.Random),rangeStart:Hi,rangeEnd:Hi}),Xl=gs.extend({type:c.literal(Ue.Unique),rangeStart:c.null(),rangeEnd:c.null()}),ub=gs.extend({type:c.literal(Ue.CurrentDateAndTime),rangeStart:c.null(),rangeEnd:c.null()}),vs=Yi.extend({rangeStart:c.number().nullable(),rangeEnd:c.number().nullable()}),pb=vs.extend({rangeStart:c.number(),rangeEnd:c.null()}),yb=vs.extend({rangeStart:c.null(),rangeEnd:c.number()}),hb=vs.extend({rangeStart:c.number(),rangeEnd:c.number()}),Is=Yi.extend({rangeStart:c.number().nullable(),rangeEnd:c.number().nullable()}),fb=Is.extend({rangeStart:c.number(),rangeEnd:c.null()}),mb=Is.extend({rangeStart:c.null(),rangeEnd:c.number()}),Tb=Is.extend({rangeStart:c.number(),rangeEnd:c.number()}),Ps=Yi.extend({rangeStart:c.date().nullable(),rangeEnd:c.date().nullable()}),Eb=Ps.extend({rangeStart:c.date(),rangeEnd:c.null()}),Rb=Ps.extend({rangeStart:c.null(),rangeEnd:c.date()}),bb=Ps.extend({rangeStart:c.date(),rangeEnd:c.date()}),Ql=Yi.extend({rangeStart:c.null(),rangeEnd:c.null()}),Kl=c.union([fb,mb,Tb]),ec=c.union([pb,yb,hb]),tc=c.union([Eb,Rb,bb,ub]),nc=c.union([Kl,ec,tc,Xl,Ql]);function rc(){return c.union([c.object({type:c.literal(r.ValueDescriptor)}),c.record(c.string(),c.any())])}function gb(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ValueDescriptor)})}function ic(){return c.object({id:c.string(),type:c.literal(r.ValueDescriptor),name:c.string(),required:c.boolean()})}function A4(){return ic().merge(c.object({version:c.number(),index:c.number()}))}function S4(){return ic().merge(c.object({}))}function O4(){return c.object({dataType:un(),parent:cn()})}function C4(){return A4().merge(O4())}function Ds(){return c.union([c.object({type:c.literal(r.PrimitiveEntity)}),c.record(c.string(),c.any())])}function As(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.PrimitiveEntity)})}function Ss(){return c.object({id:c.string(),type:c.literal(r.PrimitiveEntity),name:c.string(),description:c.string().nullable(),static:c.boolean(),abstract:c.boolean()})}function B4(){return Ss().merge(c.object({version:c.number()}))}function w4(){return Ss().merge(c.object({}))}function _4(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([Ds(),Wr()]))})}function M4(){return B4().merge(_4())}function tr(){return c.union([c.object({type:c.literal(r.Property)}),c.record(c.string(),c.any())])}function vb(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Property)})}function ac(){return c.object({id:c.string(),type:c.literal(r.Property),name:c.string(),description:c.string().nullable(),private:c.boolean(),static:c.boolean(),required:c.boolean(),abstract:c.boolean()})}function N4(){return ac().merge(c.object({version:c.number(),index:c.number()}))}function $4(){return ac().merge(c.object({}))}function V4(){return c.object({dataType:un(),implements:tr().nullable(),parent:c.union([ar(),As(),Os()])})}function L4(){return N4().merge(V4())}function G4(){return c.enum([_.CRON_JOB,_.EXECUTION,_.HTTP_ENDPOINT,_.PERSISTED_ENTITY,_.RELATIONAL_DATABASE])}function Wr(){return c.union([c.object({type:c.literal(r.BuiltInBaseEntity)}),c.record(c.string(),c.any())])}function Os(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.BuiltInBaseEntity)})}function sc(){return c.object({id:c.string(),version:c.number(),type:c.literal(r.BuiltInBaseEntity),name:G4(),description:c.string().nullable(),abstract:c.boolean(),static:c.boolean()})}function F4(){return sc()}function U4(){return sc().merge(c.object({}))}function x4(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([Wr(),Ds()]))})}function j4(){return F4().merge(x4())}function Ib(){return c.enum([L.Dynamic,L.Fixed,L.None])}function Yt(){return c.union([c.object({type:c.literal(r.ActionDescriptor)}),c.record(c.string(),c.any())])}function cn(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ActionDescriptor)})}function Cs(){return c.object({id:c.string(),type:c.literal(r.ActionDescriptor),name:c.string(),description:c.string().nullable(),argumentsType:Ib(),returnsType:Ib()})}function k4(){return Cs().merge(c.object({version:c.number()}))}function q4(){return Cs().merge(c.object({}))}function J4(){return c.object({fixedArguments:c.array(rc()),fixedReturns:c.array(rc()),dynamicArgumentTypes:un().nullable(),dynamicReturnTypes:un().nullable(),parent:c.union([Rt(),ar(),Os(),As()]).nullable()})}function Pb(){return k4().merge(J4())}function Hr(){return c.union([c.object({type:c.literal(r.Loop)}),c.record(c.string(),c.any())])}function zt(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Loop)})}function Db(){return c.object({id:c.string(),type:c.literal(r.Loop)})}function W4(){return Db().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function H4(){return Db().merge(c.object({declaration:c.union([c.string(),St()])}))}function Y4(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),declaration:Yt(),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),error:ut(),body:St(),parent:c.union([yn(),Rt()]),breakStatements:c.array(Qr()),continueStatements:c.array(Yr())})}function z4(){return W4().merge(Y4())}function Yr(){return c.union([c.object({type:c.literal(r.ContinueStatement)}),c.record(c.string(),c.any())])}function zr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ContinueStatement)})}function oc(){return c.object({id:c.string(),type:c.literal(r.ContinueStatement)})}function Z4(){return oc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function X4(){return oc().merge(c.object({}))}function Q4(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:zt()})}function K4(){return Z4().merge(Q4())}function nr(){return c.union([c.object({type:c.literal(r.ReturnStatement)}),c.record(c.string(),c.any())])}function Zr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ReturnStatement)})}function lc(){return c.object({id:c.string(),type:c.literal(r.ReturnStatement)})}function eU(){return lc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function tU(){return lc().merge(c.object({}))}function nU(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:yn()})}function rU(){return eU().merge(nU())}function zi(){return c.union([c.object({type:c.literal(r.Search)}),c.record(c.string(),c.any())])}function Xr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Search)})}function cc(){return c.object({id:c.string(),type:c.literal(r.Search),name:c.string(),query:c.any(),description:c.string().nullable()})}function iU(){return cc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function aU(){return cc().merge(c.object({}))}function sU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),inputsDeclarations:c.array(ir()),inputs:c.array(At()),outputsDeclarations:c.array(Zt()),outputs:c.array(ut()),parent:c.union([yn(),Rt()]),error:ut().nullable()})}function oU(){return iU().merge(sU())}function Zt(){return c.union([c.object({type:c.literal(r.ReturnDeclaration)}),c.record(c.string(),c.any())])}function Ab(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ReturnDeclaration)})}function dc(){return c.object({id:c.string(),type:c.literal(r.ReturnDeclaration),name:c.string(),description:c.string().nullable(),isError:c.boolean()})}function lU(){return dc().merge(c.object({version:c.number(),index:c.number()}))}function cU(){return dc().merge(c.object({}))}function dU(){return c.object({dataType:un().nullable(),readsValue:Ki().nullable(),parent:c.union([Zr(),cn(),cn(),Xr(),dn(),zr()])})}function uU(){return lU().merge(dU())}function Qr(){return c.union([c.object({type:c.literal(r.BreakStatement)}),c.record(c.string(),c.any())])}function dn(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.BreakStatement)})}function uc(){return c.object({id:c.string(),type:c.literal(r.BreakStatement)})}function pU(){return uc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function yU(){return uc().merge(c.object({}))}function hU(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:zt()})}function fU(){return pU().merge(hU())}function ut(){return c.union([c.object({type:c.literal(r.OutputMap)}),c.record(c.string(),c.any())])}function pc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.OutputMap)})}function yc(){return c.object({id:c.string(),type:c.literal(r.OutputMap)})}function mU(){return yc().merge(c.object({version:c.number(),index:c.number()}))}function TU(){return yc().merge(c.object({}))}function EU(){return c.object({writesValues:c.array(pn()),declaration:c.union([Zt(),tr()]),parent:c.union([ye(),zt(),dn()])})}function RU(){return mU().merge(EU())}function Kr(){return c.union([c.object({type:c.literal(r.FunctionCall)}),c.record(c.string(),c.any())])}function Zi(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.FunctionCall)})}function hc(){return c.object({id:c.string(),type:c.literal(r.FunctionCall)})}function bU(){return hc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function gU(){return hc().merge(c.object({}))}function vU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:St(),inputs:c.array(At()),outputs:c.array(ut()),error:c.optional(ut()),parent:c.union([yn(),Rt()])})}function IU(){return bU().merge(vU())}function PU(){return c.enum([Oe.Equal,Oe.NotEqual,Oe.MoreThan,Oe.MoreThanOrEqual,Oe.LessThan,Oe.LessThanOrEqual,Oe.And,Oe.Or,wt.Empty,wt.NotEmpty])}function Xi(){return c.union([c.object({type:c.literal(r.Condition)}),c.record(c.string(),c.any())])}function Bs(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Condition)})}function fc(){return c.object({id:c.string(),type:c.literal(r.Condition)})}function DU(){return fc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function AU(){return fc().merge(c.object({}))}function SU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),leftValue:At(),rightValue:At().nullable(),operator:PU(),parent:c.union([yn(),Rt()])})}function OU(){return DU().merge(SU())}function Qi(){return c.union([c.object({type:c.literal(r.InternalCall)}),c.record(c.string(),c.any())])}function mc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InternalCall)})}function Tc(){return c.object({id:c.string(),type:c.literal(r.InternalCall),index:c.number()})}function CU(){return Tc().merge(c.object({version:c.number(),index:c.number()}))}function BU(){return Tc().merge(c.object({declaration:c.union([c.string(),St()])}))}function wU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:St(),inputs:c.array(At()),outputs:c.array(ut()),parent:_n(),error:c.optional(ut())})}function _U(){return CU().merge(wU())}function At(){return c.union([c.object({type:c.literal(r.InputMap)}),c.record(c.string(),c.any())])}function ws(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InputMap)})}function Ec(){return c.object({id:c.string(),type:c.literal(r.InputMap),name:c.string().nullable().optional(),description:c.string().nullable().optional()})}function MU(){return Ec().merge(c.object({version:c.number(),index:c.number()}))}function NU(){return Ec().merge(c.object({}))}function $U(){return c.object({defaultValue:Rc().nullable(),declaration:c.union([ir(),tr()]).nullable(),readsValue:Ki().nullable(),parent:c.union([ye(),ws(),zt(),dn()]),dynamicArguments:c.array(At())})}function VU(){return MU().merge($U())}function ei(){return c.union([c.object({type:c.literal(r.Operation)}),c.record(c.string(),c.any())])}function ti(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Operation)})}function _s(){return c.object({id:c.string(),type:c.literal(r.Operation)})}function LU(){return _s().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function GU(){return _s().merge(c.object({}))}function FU(){return _s().merge(c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:Yt(),inputs:c.array(At()),outputs:c.array(ut()),error:c.array(ut()),dynamicArguments:c.array(At()),parent:c.union([yn(),Rt()])}))}function UU(){return LU().merge(FU())}function Ms(){return c.union([c.string(),c.number(),c.boolean(),c.null(),c.date()])}function Sb(){return c.record(c.string(),Ms())}function xU(){return c.array(c.union([Ms(),Sb()]))}function Ob(){return c.union([Ms(),Sb(),xU()])}function Cb(){return c.union([Ms(),Ob()])}function Bb(){return c.enum([v.String,v.Number,v.Boolean,v.Null,v.Date,v.JSON,v.Enum,v.File,v.UUID,v.EntityTemplate,v.ActionDescriptor])}function jU(){return c.union([ar(),ti(),ea()])}function kU(){return c.object({id:c.string(),name:Bb(),type:c.literal(r.PrimitiveValue),value:Cb(),autogeneration:nc.nullable()})}function qU(){return kU().merge(c.object({}))}function xt(){return c.object({id:c.string(),version:c.number(),name:Bb(),type:c.literal(r.PrimitiveValue),value:Cb(),valueAsType:jU().nullable(),autogeneration:nc.nullable(),parent:c.union([bc(),ws()])})}function JU(){return xt().extend({name:c.literal(v.String),value:c.string(),autogeneration:Kl.nullable()})}function WU(){return xt().extend({name:c.literal(v.Number),value:c.number(),autogeneration:ec.nullable()})}function HU(){return xt().extend({name:c.literal(v.Boolean),value:c.boolean(),autogeneration:Ql.nullable()})}function YU(){return xt().extend({name:c.literal(v.Null),value:c.null(),autogeneration:c.null()})}function zU(){return xt().extend({name:c.literal(v.Date),value:c.date(),autogeneration:tc.nullable()})}function ZU(){return xt().extend({name:c.literal(v.JSON),value:Ob(),autogeneration:c.null()})}function XU(){return xt().extend({name:c.literal(v.Enum),value:c.string(),autogeneration:c.null()})}function QU(){return xt().extend({name:c.literal(v.File),value:c.string(),autogeneration:c.null()})}function KU(){return xt().extend({name:c.literal(v.UUID),value:c.string(),autogeneration:Xl.nullable()})}function ex(){return xt().extend({name:c.literal(v.EntityTemplate),value:ar(),autogeneration:c.null()})}function tx(){return xt().extend({name:c.literal(v.ActionDescriptor),value:ea(),autogeneration:c.null()})}function Rc(){return c.union([JU(),WU(),HU(),YU(),zU(),ZU(),XU(),QU(),KU(),ex(),tx()])}function un(){return c.union([c.object({type:c.literal(r.DataType)}),c.record(c.string(),c.any())])}function bc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.DataType)})}function gc(){return c.object({id:c.string(),type:c.literal(r.DataType),isNullable:c.boolean(),isList:c.boolean(),constant:c.boolean(),asType:c.boolean(),options:c.array(c.string()).optional()})}function nx(){return gc().merge(c.object({version:c.number()}))}function rx(){return gc().merge(c.object({}))}function ix(){return c.object({defaultValue:Rc().nullable(),entity:c.union([ni(),Wr(),Ds(),Yt()]).nullable(),parent:c.union([vb(),Mb(),cn(),gb()])})}function ax(){return nx().merge(ix())}function vc(){return c.union([c.object({type:c.literal(r.VariableDeclaration)}),c.record(c.string(),c.any())])}function sx(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.VariableDeclaration)})}function Ic(){return c.object({id:c.string(),type:c.literal(r.VariableDeclaration),name:c.string(),description:c.string().nullable()})}function ox(){return Ic().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function lx(){return Ic().merge(c.object({}))}function cx(){return c.object({dataType:un().nullable(),readsValue:Ki().nullable(),writesValues:c.array(pn()),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),internalCalls:c.array(Qi()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),parent:c.union([yn(),Rt()])})}function dx(){return ox().merge(cx())}function wb(){return c.union([c.object({type:c.literal(r.VariableInstance)}),c.record(c.string(),c.any())])}function ux(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.VariableInstance)})}function Pc(){return c.object({id:c.string(),type:c.literal(r.VariableInstance)})}function px(){return Pc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function yx(){return Pc().merge(c.object({}))}function hx(){return c.object({declaration:vc(),dataType:un().nullable(),readsValue:Ki().nullable(),writesValues:c.array(pn()),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),internalCalls:c.array(Qi()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),parent:c.union([yn(),Rt()])})}function fx(){return px().merge(hx())}function Dc(){return c.union([c.object({type:c.literal(r.InstalledProject)}),c.record(c.string(),c.any())])}function Ns(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InstalledProject)})}function mx(){return c.object({id:c.string(),type:c.literal(r.InstalledProject)})}function Tx(){return c.object({version:c.number(),x:c.number(),y:c.number()})}function Ex(){return c.object({})}function Rx(){return c.object({implements:Rt(),description:c.string().nullable(),functions:c.array(St()),events:c.array(Ac()),parent:Rt()})}function bx(){return Tx().merge(Rx())}function Ac(){return c.union([c.object({type:c.literal(r.GlobalEvent)}),c.record(c.string(),c.any())])}function gx(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.GlobalEvent)})}function $s(){return c.object({id:c.string(),type:c.literal(r.GlobalEvent),name:c.string(),collapsed:c.boolean()})}function vx(){return $s().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function Ix(){return $s().merge(c.object({}))}function Px(){return $s().merge(c.object({returnStatements:c.array(nr()),implements:c.array(Pb()),inputs:c.array(ir()),calls:c.array(ke()),parent:c.union([Rt(),Ns()])}))}function Dx(){return vx().merge(Px())}function rr(){return c.union([vc(),wb()])}function _n(){return c.union([sx(),ux()])}function pn(){return c.union([rr(),At(),Zt()])}function _b(){return c.union([_n(),ws(),Ab()])}function Ki(){return c.union([rr(),ir(),ut(),ei(),Qi(),Kr()])}function Ax(){return c.union([_n(),Sc(),pc(),ti(),mc(),Zi()])}function Sx(){return c.union([ir(),ut(),pn()])}function Mb(){return c.union([Sc(),pc(),_b()])}function Vs(){return Ac()}function Ls(){return gx()}function Gs(){return c.union([ei(),Kr(),Xi(),zi(),rr(),Qi(),Hr()])}function ye(){return c.union([ti(),Zi(),Bs(),Xr(),_n(),mc(),zt()])}function Fs(){return c.union([ei(),Kr(),Xi(),zi(),rr(),Hr()])}function Us(){return c.union([ti(),Zi(),Bs(),Xr(),_n(),zt()])}function Nb(){return c.union([Gs(),nr(),Qr(),Yr()])}function ke(){return c.union([ye(),Zr(),dn(),zr()])}function $b(){return c.union([Fs(),nr(),Qr(),Yr()])}function Vb(){return c.union([Us(),Zr(),dn(),zr()])}function Mn(){return c.union([St(),Vs()])}function xe(){return c.union([ea(),Ls()])}function Ox(){return c.union([Gs(),Mn()])}function Cx(){return c.union([ye(),xe()])}function Bx(){return c.union([Fs(),Mn()])}function wx(){return c.union([Us(),xe()])}function _x(){return c.union([Nb(),Mn()])}function Mx(){return c.union([ke(),xe()])}function Nx(){return c.union([$b(),Mn()])}function $x(){return c.union([Vb(),xe()])}function Vx(){return c.union([Mn(),Hr()])}function yn(){return c.union([xe(),zt()])}function Lx(){return c.union([Gs(),Mn()])}function Gx(){return c.union([ye(),xe()])}function Fx(){return c.union([Fs(),Mn()])}function Ux(){return c.union([Us(),xe()])}function xx(){return c.union([nr(),Qr(),Yr()])}function jx(){return c.union([Zr(),dn(),zr()])}function kx(){return c.union([Wr(),t8(),Dc(),ni(),St(),Vs(),rr(),At(),ut(),Xi(),ei(),Kr(),Zt(),ir(),Ds(),un(),tr(),Yt(),nr(),Yr(),Qr(),Hr(),zi(),Yt(),Yt(),rc(),Qi()])}function qx(){return c.union([Os(),Rt(),Ns(),ar(),ea(),Ls(),_n(),ws(),pc(),Bs(),ti(),Zi(),Ab(),Sc(),As(),bc(),vb(),cn(),Zr(),zr(),dn(),zt(),Xr(),cn(),cn(),gb(),mc()])}function Jx(){return c.union([Dc(),ni(),St(),Vs(),rr(),Xi(),ei(),Kr(),nr(),Yr(),Qr(),Hr(),zi()])}function Wx(){return c.union([Ns(),ar(),ea(),Ls(),_n(),Bs(),ti(),Zi(),Zr(),zr(),dn(),zt(),Xr()])}function ir(){return c.union([c.object({type:c.literal(r.ArgumentDeclaration)}),c.record(c.string(),c.any())])}function Sc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ArgumentDeclaration)})}function Oc(){return c.object({id:c.string(),type:c.literal(r.ArgumentDeclaration)})}function Hx(){return Oc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function Yx(){return Oc().merge(c.object({}))}function zx(){return c.object({dataType:un().nullable(),writesValues:c.array(pn()),parent:c.union([xe(),cn(),cn(),Xr(),dn()])})}function Zx(){return Hx().merge(zx())}function St(){return c.union([c.object({type:c.literal(r.FunctionDeclaration)}),c.record(c.string(),c.any())])}function ea(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.FunctionDeclaration)})}function Cc(){return c.object({id:c.string(),type:c.literal(r.FunctionDeclaration),name:c.string(),description:c.string().nullable()})}function Xx(){return Cc().merge(c.object({version:c.number(),x:c.number(),y:c.number(),index:c.number().nullable()}))}function Qx(){return Cc()}function Kx(){return c.object({inputs:c.array(ir()),implements:Yt().nullable(),returnStatements:c.array(nr()),parent:c.union([Rt(),Ns(),ar(),zt(),Os(),As()])})}function e8(){return Xx().merge(Kx())}function t8(){return c.union([c.object({type:c.literal(r.Project)}),c.record(c.string(),c.any())])}function Rt(){return c.object({entityType:c.literal(r.Project),entityId:c.string(),id:c.string(),type:c.literal(r.GenericReference)})}function Bc(){return c.object({id:c.string(),type:c.literal(r.Project),name:c.string(),description:c.string().nullable()})}function n8(){return Bc().merge(c.object({version:c.number()}))}function r8(){return Bc()}function i8(){return c.object({entities:c.array(ni()),functions:c.array(St()),events:c.array(Ac()),projects:c.array(Dc()),variableDeclarations:c.array(vc()),variableInstances:c.array(wb()),conditions:c.array(Xi()),operations:c.array(ei()),functionCalls:c.array(Kr()),loops:c.array(Hr()),searches:c.array(zi())})}function a8(){return n8().merge(i8())}function ni(){return c.union([c.object({type:c.literal(r.CustomEntity)}),c.record(c.string(),c.any())])}function ar(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.CustomEntity)})}function wc(){return c.object({id:c.string(),type:c.literal(r.CustomEntity),name:c.string(),description:c.string().nullable(),static:c.boolean(),abstract:c.boolean()})}function s8(){return wc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function o8(){return wc().merge(c.object({}))}function l8(){return c.union([Rt(),bc()])}function c8(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([ni(),Wr()])),implements:c.array(c.union([ni(),Wr()])),parent:l8()})}function d8(){return s8().merge(c8())}function u8(n){const e=d8(),t=n.toJSON();e.safeParse(t).success;const a=n.implements.flatMap(T=>h8(n,T)),s=n.extends.flatMap(T=>f8(n,T)),o=T8(n),d=m8(n);n.methods.flatMap(T=>T.validate());const p=[...a,...s,...o,...d];return X(n.errors,p)}function p8(n,e){const t=e.properties.filter(s=>s.abstract),i=[];let a=[...n.properties];return t.forEach(s=>{const o=a.find(d=>{var p;return((p=d.implements)==null?void 0:p.id)===s.id});o?a=a.filter(d=>d.id!==o.id):i.push(s)}),i}function y8(n,e){const t=e.abstractMethods,i=[];let a=[...n.methods];return t.forEach(s=>{const o=a.find(d=>{var p;return((p=d.implements)==null?void 0:p.id)===s.id});o?a=a.filter(d=>d.id!==o.id):i.push(s)}),i}function h8(n,e){const t=[];if(!e.abstract){const T=j({id:n.id+"--"+O.ImplementingNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:O.ImplementingNonAbstractEntity,entity:n});return t.push(T.error),t}const i=e.properties.filter(T=>T.abstract),a=[];let s=[...n.properties];i.forEach(T=>{const f=s.find(b=>{var I;return((I=b.implements)==null?void 0:I.id)===T.id});f?s=s.filter(b=>b.id!==f.id):a.push(T)}),a.length&&a.forEach(T=>{const f=j({id:n.id+"--"+O.MissingPropertyImplementation+"--"+T.id,message:`Property "${T.name}" with id "${T.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${n.name}" with id "${n.id}" implements it`,issue:null,severity:m.Error,code:O.MissingPropertyImplementation,entity:n});t.push(f.error)});const o=[];let d=[...n.methods];e.abstractMethods.forEach(T=>{const f=d.find(b=>{var I;return((I=b.implements)==null?void 0:I.id)===T.id});f?d=d.filter(b=>b.id!==f.id):o.push(T)}),o.length&&o.forEach(T=>{const f=j({id:n.id+"--"+O.MissingMethodImplementation+"--"+T.id,message:`Method "${T.name}" with id "${T.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${n.name}" with id "${n.id}" implements it`,issue:null,severity:m.Error,code:O.MissingMethodImplementation,entity:n});t.push(f.error)});const p=[];e.properties.forEach(T=>{const f=s.find(b=>b.name===T.name);f&&p.push([f,T])}),p.length&&p.forEach(([T])=>{const f=j({id:n.id+"--"+g.PropertyOverwrite+"--"+T.id,message:`Property "${T.name}" with id "${T.id}" of entity "${n.name}" with id "${n.id}" overwrites the property with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.PropertyOverwrite,entity:n});t.push(f.error)});const h=[];return e.methods.forEach(T=>{const f=d.find(b=>b.name===T.name);f&&h.push([f,T])}),h.length&&h.forEach(([T])=>{const f=j({id:n.id+"--"+g.MethodOverwrite+"--"+T.id,message:`Method "${T.name}" with id "${T.id}" of entity "${n.name}" with id "${n.id}" overwrites the method with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.MethodOverwrite,entity:n});t.push(f.error)}),t}function f8(n,e){const t=[],i=[];if(e.abstract){const s=j({id:n.id+"--"+O.ExtendingAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:O.ExtendingAbstractEntity,entity:n});return t.push(s.error),t}n.properties.forEach(s=>{var d;const o=e.properties.find(p=>p.name===s.name);((d=s.implements)==null?void 0:d.id)!==(o==null?void 0:o.id)&&o&&i.push(s)}),i.length&&i.forEach(s=>{const o=j({id:n.id+"--"+g.PropertyOverwrite,message:`Property "${s.name}" with id "${s.id}" of entity "${n.name}" with id "${n.id}" overwrites the property with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.PropertyOverwrite,entity:n});t.push(o.error)});const a=[];return n.methods.forEach(s=>{var d;const o=e.methods.find(p=>p.name===s.name);((d=s.implements)==null?void 0:d.id)!==(o==null?void 0:o.id)&&o&&a.push(s)}),a.length&&a.forEach(s=>{const o=j({id:n.id+"--"+g.MethodOverwrite,message:`Method "${s.name}" with id "${s.id}" of entity "${n.name}" with id "${n.id}" overwrites the method with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.MethodOverwrite,entity:n});t.push(o.error)}),t}function m8(n){const e=[];if(!n.properties.length){const t=j({id:n.id+"--"+O.NoProperties,message:"No properties implemented",issue:null,severity:m.Warning,code:O.NoProperties,entity:n});e.push(t.error)}return n.properties.forEach(t=>{t.validate()}),e}function T8(n){const e=[];if(n.abstract){if(n.methods.length){const t=j({id:n.id+"--"+O.AbstractEntityWithNonAbstractMethods,message:`Entity "${n.name}" with id "${n.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:m.Error,code:O.AbstractEntityWithNonAbstractMethods,entity:n});e.push(t.error)}if(n.properties.some(t=>!t.abstract)){const t=j({id:n.id+"--"+O.AbstractEntityWithNonAbstractProperties,message:`Entity "${n.name}" with id "${n.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:m.Error,code:O.AbstractEntityWithNonAbstractProperties,entity:n});e.push(t.error),n.properties.forEach(i=>{if(!i.abstract){const a=j({id:n.id+"--"+O.StaticEntityWithNonStaticProperties+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:m.Error,code:O.StaticEntityWithNonStaticProperties,entity:n});e.push(a.error)}})}}else{if(n.abstractMethods.length){const t=j({id:n.id+"--"+O.AbstractPropertyInNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is not marked as abstract but has abstract methods`,issue:null,severity:m.Error,code:O.AbstractPropertyInNonAbstractEntity,entity:n});e.push(t.error)}if(n.properties.some(t=>t.abstract)){const t=j({id:n.id+"--"+O.AbstractMethodInNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is not marked as abstract but has abstract properties`,issue:null,severity:m.Error,code:O.AbstractMethodInNonAbstractEntity,entity:n});e.push(t.error),n.properties.forEach(i=>{if(i.abstract){const a=j({id:n.id+"--"+O.AbstractMethodInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:m.Error,code:O.AbstractMethodInNonAbstractEntity,entity:n});e.push(a.error)}})}}if(n.static&&n.properties.some(t=>!t.static)){const t=j({id:n.id+"--"+O.StaticEntityWithNonStaticProperties,message:`Entity "${n.name}" with id "${n.id}" is marked as static but has non-static properties`,issue:null,severity:m.Error,code:O.StaticEntityWithNonStaticProperties,entity:n});e.push(t.error),n.properties.forEach(i=>{if(!i.static){const a=j({id:n.id+"--"+O.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is not marked as static but the entity is marked as static`,issue:null,severity:m.Error,code:O.NonStaticPropertyInStaticEntity,entity:n});e.push(a.error)}})}return e}function E8(n){return n instanceof Error&&n.name==="ZodError"&&"issues"in n&&Array.isArray(n.issues)}var R8=class extends Error{constructor(e,t){super(e,t);l(this,"name");l(this,"details");this.name="ZodValidationError",this.details=b8(t)}toString(){return this.message}};function b8(n){if(n){const e=n.cause;if(E8(e))return e.issues}return[]}var g8="; ",Lb="Validation error",v8=": ",I8=", or ";function P8(n,e,t){return e!==null?n.length>0?[e,n].join(t):e:n.length>0?n:Lb}var D8=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function A8(n){return n.length===1?n[0].toString():n.reduce((e,t)=>{if(typeof t=="number")return e+"["+t.toString()+"]";if(t.includes('"'))return e+'["'+S8(t)+'"]';if(!D8.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function S8(n){return n.replace(/"/g,'\\"')}function O8(n){return n.length!==0}function xs(n){const{issue:e,issueSeparator:t,unionSeparator:i,includePath:a}=n;if(e.code==="invalid_union")return e.unionErrors.reduce((s,o)=>{const d=o.issues.map(p=>xs({issue:p,issueSeparator:t,unionSeparator:i,includePath:a})).join(t);return s.includes(d)||s.push(d),s},[]).join(i);if(e.code==="invalid_arguments")return[e.message,...e.argumentsError.issues.map(s=>xs({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(e.code==="invalid_return_type")return[e.message,...e.returnTypeError.issues.map(s=>xs({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&O8(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 "${A8(e.path)}"`}return e.message}function C8(n,e={}){const{issueSeparator:t=g8,unionSeparator:i=I8,prefixSeparator:a=v8,prefix:s=Lb,includePath:o=!0}=e,d=xs({issue:n,issueSeparator:t,unionSeparator:i,includePath:o}),p=P8(d,s,a);return new R8(p,{cause:new mt([n])})}var Gb="1.13.7",Fb=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},js=Array.prototype,_c=Object.prototype,Ub=typeof Symbol<"u"?Symbol.prototype:null,B8=js.push,ta=js.slice,na=_c.toString,w8=_c.hasOwnProperty,xb=typeof ArrayBuffer<"u",_8=typeof DataView<"u",M8=Array.isArray,jb=Object.keys,kb=Object.create,qb=xb&&ArrayBuffer.isView,N8=isNaN,$8=isFinite,Jb=!{toString:null}.propertyIsEnumerable("toString"),Wb=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],V8=Math.pow(2,53)-1;function bt(n,e){return e=e==null?n.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 n.call(this,i);case 1:return n.call(this,arguments[0],i);case 2:return n.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,n.apply(this,s)}}function Nn(n){var e=typeof n;return e==="function"||e==="object"&&!!n}function L8(n){return n===null}function Hb(n){return n===void 0}function Yb(n){return n===!0||n===!1||na.call(n)==="[object Boolean]"}function G8(n){return!!(n&&n.nodeType===1)}function rt(n){var e="[object "+n+"]";return function(t){return na.call(t)===e}}const Mc=rt("String"),zb=rt("Number"),F8=rt("Date"),U8=rt("RegExp"),x8=rt("Error"),Zb=rt("Symbol"),Xb=rt("ArrayBuffer");var Qb=rt("Function"),j8=Fb.document&&Fb.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof j8!="function"&&(Qb=function(n){return typeof n=="function"||!1});const pt=Qb,Kb=rt("Object");var eg=_8&&(!/\[native code\]/.test(String(DataView))||Kb(new DataView(new ArrayBuffer(8)))),Nc=typeof Map<"u"&&Kb(new Map),k8=rt("DataView");function q8(n){return n!=null&&pt(n.getInt8)&&Xb(n.buffer)}const ks=eg?q8:k8,sr=M8||rt("Array");function $n(n,e){return n!=null&&w8.call(n,e)}var $c=rt("Arguments");(function(){$c(arguments)||($c=function(n){return $n(n,"callee")})})();const Vc=$c;function J8(n){return!Zb(n)&&$8(n)&&!isNaN(parseFloat(n))}function tg(n){return zb(n)&&N8(n)}function ng(n){return function(){return n}}function rg(n){return function(e){var t=n(e);return typeof t=="number"&&t>=0&&t<=V8}}function ig(n){return function(e){return e==null?void 0:e[n]}}const qs=ig("byteLength"),W8=rg(qs);var H8=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Y8(n){return qb?qb(n)&&!ks(n):W8(n)&&H8.test(na.call(n))}const ag=xb?Y8:ng(!1),gt=ig("length");function z8(n){for(var e={},t=n.length,i=0;i<t;++i)e[n[i]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,n.push(a)}}}function sg(n,e){e=z8(e);var t=Wb.length,i=n.constructor,a=pt(i)&&i.prototype||_c,s="constructor";for($n(n,s)&&!e.contains(s)&&e.push(s);t--;)s=Wb[t],s in n&&n[s]!==a[s]&&!e.contains(s)&&e.push(s)}function We(n){if(!Nn(n))return[];if(jb)return jb(n);var e=[];for(var t in n)$n(n,t)&&e.push(t);return Jb&&sg(n,e),e}function ra(n){if(n==null)return!0;var e=gt(n);return typeof e=="number"&&(sr(n)||Mc(n)||Vc(n))?e===0:gt(We(n))===0}function og(n,e){var t=We(e),i=t.length;if(n==null)return!i;for(var a=Object(n),s=0;s<i;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function Q(n){if(n instanceof Q)return n;if(!(this instanceof Q))return new Q(n);this._wrapped=n}Q.VERSION=Gb,Q.prototype.value=function(){return this._wrapped},Q.prototype.valueOf=Q.prototype.toJSON=Q.prototype.value,Q.prototype.toString=function(){return String(this._wrapped)};function lg(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,qs(n))}var cg="[object DataView]";function Lc(n,e,t,i){if(n===e)return n!==0||1/n===1/e;if(n==null||e==null)return!1;if(n!==n)return e!==e;var a=typeof n;return a!=="function"&&a!=="object"&&typeof e!="object"?!1:dg(n,e,t,i)}function dg(n,e,t,i){n instanceof Q&&(n=n._wrapped),e instanceof Q&&(e=e._wrapped);var a=na.call(n);if(a!==na.call(e))return!1;if(eg&&a=="[object Object]"&&ks(n)){if(!ks(e))return!1;a=cg}switch(a){case"[object RegExp]":case"[object String]":return""+n==""+e;case"[object Number]":return+n!=+n?+e!=+e:+n==0?1/+n===1/e:+n==+e;case"[object Date]":case"[object Boolean]":return+n==+e;case"[object Symbol]":return Ub.valueOf.call(n)===Ub.valueOf.call(e);case"[object ArrayBuffer]":case cg:return dg(lg(n),lg(e),t,i)}var s=a==="[object Array]";if(!s&&ag(n)){var o=qs(n);if(o!==qs(e))return!1;if(n.buffer===e.buffer&&n.byteOffset===e.byteOffset)return!0;s=!0}if(!s){if(typeof n!="object"||typeof e!="object")return!1;var d=n.constructor,p=e.constructor;if(d!==p&&!(pt(d)&&d instanceof d&&pt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in e)return!1}t=t||[],i=i||[];for(var h=t.length;h--;)if(t[h]===n)return i[h]===e;if(t.push(n),i.push(e),s){if(h=n.length,h!==e.length)return!1;for(;h--;)if(!Lc(n[h],e[h],t,i))return!1}else{var T=We(n),f;if(h=T.length,We(e).length!==h)return!1;for(;h--;)if(f=T[h],!($n(e,f)&&Lc(n[f],e[f],t,i)))return!1}return t.pop(),i.pop(),!0}function Z8(n,e){return Lc(n,e)}function ia(n){if(!Nn(n))return[];var e=[];for(var t in n)e.push(t);return Jb&&sg(n,e),e}function Gc(n){var e=gt(n);return function(t){if(t==null)return!1;var i=ia(t);if(gt(i))return!1;for(var a=0;a<e;a++)if(!pt(t[n[a]]))return!1;return n!==yg||!pt(t[Fc])}}var Fc="forEach",ug="has",Uc=["clear","delete"],pg=["get",ug,"set"],X8=Uc.concat(Fc,pg),yg=Uc.concat(pg),Q8=["add"].concat(Uc,Fc,ug);const K8=Nc?Gc(X8):rt("Map"),e6=Nc?Gc(yg):rt("WeakMap"),t6=Nc?Gc(Q8):rt("Set"),n6=rt("WeakSet");function ri(n){for(var e=We(n),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=n[e[a]];return i}function r6(n){for(var e=We(n),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],n[e[a]]];return i}function hg(n){for(var e={},t=We(n),i=0,a=t.length;i<a;i++)e[n[t[i]]]=t[i];return e}function xc(n){var e=[];for(var t in n)pt(n[t])&&e.push(t);return e.sort()}function jc(n,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=n(s),d=o.length,p=0;p<d;p++){var h=o[p];(!e||t[h]===void 0)&&(t[h]=s[h])}return t}}const fg=jc(ia),Js=jc(We),mg=jc(ia,!0);function i6(){return function(){}}function Tg(n){if(!Nn(n))return{};if(kb)return kb(n);var e=i6();e.prototype=n;var t=new e;return e.prototype=null,t}function a6(n,e){var t=Tg(n);return e&&Js(t,e),t}function s6(n){return Nn(n)?sr(n)?n.slice():fg({},n):n}function o6(n,e){return e(n),n}function Eg(n){return sr(n)?n:[n]}Q.toPath=Eg;function aa(n){return Q.toPath(n)}function kc(n,e){for(var t=e.length,i=0;i<t;i++){if(n==null)return;n=n[e[i]]}return t?n:void 0}function Rg(n,e,t){var i=kc(n,aa(e));return Hb(i)?t:i}function l6(n,e){e=aa(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!$n(n,a))return!1;n=n[a]}return!!t}function qc(n){return n}function sa(n){return n=Js({},n),function(e){return og(e,n)}}function Jc(n){return n=aa(n),function(e){return kc(e,n)}}function oa(n,e,t){if(e===void 0)return n;switch(t??3){case 1:return function(i){return n.call(e,i)};case 3:return function(i,a,s){return n.call(e,i,a,s)};case 4:return function(i,a,s,o){return n.call(e,i,a,s,o)}}return function(){return n.apply(e,arguments)}}function bg(n,e,t){return n==null?qc:pt(n)?oa(n,e,t):Nn(n)&&!sr(n)?sa(n):Jc(n)}function Wc(n,e){return bg(n,e,1/0)}Q.iteratee=Wc;function vt(n,e,t){return Q.iteratee!==Wc?Q.iteratee(n,e):bg(n,e,t)}function c6(n,e,t){e=vt(e,t);for(var i=We(n),a=i.length,s={},o=0;o<a;o++){var d=i[o];s[d]=e(n[d],d,n)}return s}function gg(){}function d6(n){return n==null?gg:function(e){return Rg(n,e)}}function u6(n,e,t){var i=Array(Math.max(0,n));e=oa(e,t,1);for(var a=0;a<n;a++)i[a]=e(a);return i}function Hc(n,e){return e==null&&(e=n,n=0),n+Math.floor(Math.random()*(e-n+1))}const la=Date.now||function(){return new Date().getTime()};function vg(n){var e=function(s){return n[s]},t="(?:"+We(n).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 Ig={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},p6=vg(Ig),y6=hg(Ig),h6=vg(y6),f6=Q.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Yc=/(.)^/,m6={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},T6=/\\|'|\r|\n|\u2028|\u2029/g;function E6(n){return"\\"+m6[n]}var R6=/^\s*(\w|\$)+\s*$/;function b6(n,e,t){!e&&t&&(e=t),e=mg({},e,Q.templateSettings);var i=RegExp([(e.escape||Yc).source,(e.interpolate||Yc).source,(e.evaluate||Yc).source].join("|")+"|$","g"),a=0,s="__p+='";n.replace(i,function(h,T,f,b,I){return s+=n.slice(a,I).replace(T6,E6),a=I+h.length,T?s+=`'+
|
|
1
|
+
(function(u,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(u=typeof globalThis<"u"?globalThis:u||self,r(u["@elyx-code/project-logic-tree"]={}))})(this,function(u){"use strict";var W3=Object.defineProperty;var H3=(u,r,_)=>r in u?W3(u,r,{enumerable:!0,configurable:!0,writable:!0,value:_}):u[r]=_;var l=(u,r,_)=>(H3(u,typeof r!="symbol"?r+"":r,_),_);var r=(n=>(n.CustomEntity="custom-entity",n.BuiltInBaseEntity="built-in-base-entity",n.Project="project",n.InstalledProject="installed-project",n.GlobalEvent="global-event",n.DataType="data-type",n.FunctionCall="function-call",n.FunctionDeclaration="function-declaration",n.ActionDescriptor="action-descriptor",n.ValueDescriptor="value-descriptor",n.ArgumentDeclaration="argument-declaration",n.InputMap="input-map",n.ReturnStatement="return-statement",n.BreakStatement="break-statement",n.ContinueStatement="continue-statement",n.ReturnDeclaration="return-declaration",n.OutputMap="output-map",n.PrimitiveEntity="primitive-entity",n.PrimitiveValue="primitive-value",n.Property="property",n.Operation="operation",n.Condition="condition",n.VariableDeclaration="variable-declaration",n.VariableInstance="variable-instance",n.Search="search",n.Loop="loop",n.InternalCall="internal-call",n.GenericReference="generic-reference",n))(r||{}),_=(n=>(n.HTTP_ENDPOINT="BUILT_IN_HTTP_ENDPOINT_ENTITY",n.RELATIONAL_DATABASE="BUILT_IN_RELATIONAL_DATABASE_ENTITY",n.PERSISTED_ENTITY="BUILT_IN_PERSISTED_ENTITY_ENTITY",n.CRON_JOB="BUILT_IN_CRON_JOB_ENTITY",n.EXECUTION="BUILT_IN_EXECUTION_ENTITY",n.KEY_VALUE_PARAM="BUILT_IN_KEY_VALUE_PARAM_ENTITY",n))(_||{}),Ue=(n=>(n.CurrentDateAndTime="current-date-and-time",n.Unique="unique",n.Random="random",n))(Ue||{}),Pt=(n=>(n.DeletePersistedEntity="base-delete-persisted-entity",n.SoftDeletePersistedEntity="base-soft-delete-persisted-entity",n.AbortExecution="base-abort-execution",n))(Pt||{}),L=(n=>(n.Fixed="fixed",n.None="none",n.Dynamic="dynamic",n))(L||{}),C=(n=>(n.FixedArguments="fixed-arguments",n.FixedReturns="fixed-returns",n.ReturnedError="returned-error",n.OngoingProcessExecution="ongoing-process-execution",n))(C||{}),v=(n=>(n.EntityTemplate="entity-template",n.ActionDescriptor="action-descriptor",n.String="string",n.Number="number",n.Boolean="boolean",n.Null="null",n.Enum="enum",n.JSON="json",n.Date="date",n.UUID="uuid",n.File="file",n))(v||{}),at=(n=>(n.Addition="addition",n.Substraction="substraction",n.Multiplication="multiplication",n.Division="division",n.Remainder="remainder",n.Exponentiation="exponentiation",n))(at||{}),ve=(n=>(n.Join="string-join",n.Split="stringSsplit",n.DeleteLast="string-delete-last",n.DeleteFirst="string-delete-first",n.DeleteIndex="string-delete-index",n.AddIndex="string-add-index",n.ReplaceFirst="string-replace-first",n.ReplaceLast="string-replace-last",n.ReplaceIndex="string-replace-index",n.ReplaceSingleMatch="string-replace-single-match",n.ReplaceAllMatches="string-replace-all-matches",n.GetIndex="string-get-index",n.GetFirst="string-get-first",n.GetLast="string-get-last",n.Append="string-append",n.Prepend="string-prepend",n))(ve||{}),k=(n=>(n.Join="list-join",n.Split="list-split",n.DeleteLast="list-delete-last",n.DeleteFirst="list-delete-first",n.DeleteIndex="list-delete-index",n.AddIndex="list-add-index",n.ReplaceFirst="list-replace-first",n.ReplaceLast="list-replace-last",n.ReplaceIndex="list-replace-index",n.ReplaceSingleMatch="list-replace-single-match",n.ReplaceAllMatches="list-replace-all-matches",n.GetIndex="list-get-index",n.GetFirst="list-get-first",n.GetLast="list-get-last",n.Append="list-append",n.Prepend="list-prepend",n))(k||{}),Pe=(n=>(n.Parallel="parallel",n.Sequential="sequential",n.Wait="wait",n))(Pe||{}),Ze=(n=>(n.CreateNewInstance="create-new-instance",n.Validate="validate",n))(Ze||{}),Ye=(n=>(n.HttpRequest="base-http-request",n))(Ye||{}),Oe=(n=>(n.Equal="equal",n.NotEqual="not-equal",n.And="and",n.Or="or",n.LessThan="less-than",n.MoreThan="more-than",n.LessThanOrEqual="less-than-or-equal",n.MoreThanOrEqual="more-than-or-equal",n))(Oe||{}),wt=(n=>(n.Empty="empty",n.NotEmpty="not-empty",n))(wt||{}),je=(n=>(n.ManualFlow="manual-flow-loop",n.Counted="counted-loop",n.List="list-loop",n.ObjectKeys="object-keys-loop",n.ObjectValues="object-values-loop",n.String="string-loop",n))(je||{}),qe=(n=>(n.OrDataTypeGroup="or-data-type-group",n.AndDataTypeGroup="and-data-type-group",n.DynamicArgumentTypes="dynamic-argument-types",n.DynamicReturnTypes="dynamic-return-types",n))(qe||{}),en=(n=>(n.PROJECT_PUBLICATION_COMPLETED="GLOBAL_EVENT_PROJECT_PUBLICATION_COMPLETED",n))(en||{}),Ld=(n=>(n.Error="error",n.Task="task",n.Return="return",n))(Ld||{});const xn=[r.VariableDeclaration,r.VariableInstance,r.InputMap,r.ReturnDeclaration],Kv=[r.VariableDeclaration,r.VariableInstance,r.InputMap,r.ReturnDeclaration],Be=[r.VariableDeclaration,r.VariableInstance,r.ArgumentDeclaration,r.OutputMap],eI=[r.VariableDeclaration,r.VariableInstance,r.ArgumentDeclaration,r.OutputMap],Gd=[...xn,...Be],Ge=[r.VariableDeclaration,r.VariableInstance],Sr=[r.GlobalEvent],we=[r.Operation,r.FunctionCall,r.Condition,r.Search,r.VariableDeclaration,r.VariableInstance,r.InternalCall,r.Loop],Eo=[r.Operation,r.FunctionCall,r.Condition,r.Search,r.VariableDeclaration,r.VariableInstance,r.Loop],Me=[r.FunctionDeclaration,...Sr],Rn=[...we,r.ReturnStatement,r.BreakStatement,r.ContinueStatement],Ro=[...Eo,r.ReturnStatement,r.BreakStatement,r.ContinueStatement],tn=[...we,...Me],Fd=[...Eo,...Me],tI=[...Rn,...Me],nI=[...Ro,...Me],st=[...Me,r.Loop],Ce=[r.ReturnStatement,r.BreakStatement,r.ContinueStatement],rI=[r.CustomEntity,r.BuiltInBaseEntity,r.Project,r.InstalledProject,r.GlobalEvent,r.DataType,r.FunctionCall,r.FunctionDeclaration,r.ActionDescriptor,r.ValueDescriptor,r.ArgumentDeclaration,r.InputMap,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.ReturnDeclaration,r.OutputMap,r.PrimitiveEntity,r.PrimitiveValue,r.Property,r.Operation,r.Condition,r.VariableDeclaration,r.VariableInstance,r.Search,r.Loop,r.InternalCall],bo=[r.CustomEntity,r.GlobalEvent,r.FunctionDeclaration,r.FunctionCall,r.VariableDeclaration,r.VariableInstance,r.Operation,r.Condition,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.InstalledProject,r.Loop,r.Search],Ud=[r.CustomEntity,r.FunctionDeclaration,r.ArgumentDeclaration,r.ReturnDeclaration,r.Property,r.VariableDeclaration,r.Search,r.Project,r.InstalledProject,r.ActionDescriptor,r.ValueDescriptor],Or=[r.BuiltInBaseEntity,r.PrimitiveEntity],iI=[r.CustomEntity,r.FunctionDeclaration,r.ArgumentDeclaration,r.ReturnDeclaration,r.Property,r.VariableDeclaration,r.GlobalEvent,r.Search,r.Project,r.InstalledProject,r.ActionDescriptor,r.ValueDescriptor,r.InputMap,r.OutputMap,r.FunctionCall,r.Operation,r.Condition,r.ReturnStatement,r.BreakStatement,r.ContinueStatement,r.VariableInstance,r.PrimitiveValue,r.InternalCall],F={type:r.PrimitiveEntity,id:"8b5fbe15-4c2b-48c0-9fd8-e5efbe3978dc",description:"A string of characters.",version:1,name:v.String,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},bn={type:r.PrimitiveEntity,id:"f596545d-1565-4faa-9969-d95fa5edfea4",description:"A 'true' or 'false' value.",version:1,name:v.Boolean,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},De={type:r.PrimitiveEntity,id:"ecb84c29-6153-4b82-86a5-fce2b5f92002",description:"A number value.",version:1,name:v.Number,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Xe={type:r.PrimitiveEntity,id:"730e8ea9-8498-439a-9001-b07de55aaa7d",description:"A complex data structure with any combination of properties with names and values.",version:1,name:v.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},xd={id:"c2f52f01-8f2e-490e-8083-72289c8189c1",type:r.GenericReference,entityId:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",entityType:r.DataType},jd={id:"4e803941-2e6a-4227-b803-b8877c0d7fee",type:r.GenericReference,entityId:"00ccfcae-2104-45ef-bf6c-50ddccd74286",entityType:r.Property},kd={id:"7dd59b70-f97b-43a7-a051-fde1842ce5d6",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:{id:"enum-options-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.JSON,autogeneration:null,value:[],valueAsType:null,parent:xd},parent:jd},qd={id:"a2983c4c-0286-4ef1-8b5c-5a52904d3200",type:r.GenericReference,entityId:"9542b8b4-2642-4eee-9db9-def7963a17a0",entityType:r.PrimitiveEntity},Jd={hidden:!1,required:!0,id:"00ccfcae-2104-45ef-bf6c-50ddccd74286",name:"Options",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:kd,description:"Options for the enum. Each option is a text value.",parent:qd},gn={type:r.PrimitiveEntity,id:"9542b8b4-2642-4eee-9db9-def7963a17a0",description:"A set of text options to choose from.",version:1,name:v.Enum,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[Jd],methods:[]},nn={type:r.PrimitiveEntity,id:"dc58f38b-d574-4956-aac6-32ce9529b937",description:"A date and time value.",version:1,name:v.Date,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]},Ta={type:r.PrimitiveEntity,id:"4a6234aa-c0f6-4731-b4dd-750388029226",description:"A unique identifier in the form of a 36-character string.",version:1,name:v.UUID,static:!1,abstract:!1,abstractMethods:[],extends:[F],properties:[],methods:[]},go={type:r.PrimitiveEntity,id:"b6f3c3c4-9c3d-4f9d-9e9e-1c0f6a3c8c6b",description:"A complex data structure with any combination of properties with names and values.",version:1,name:v.JSON,static:!1,abstract:!1,abstractMethods:[],extends:[],properties:[],methods:[]};var Wd=(n=>(n.FirstInputNumber="number-addition-first-number-argument-declaration",n.SecondInputNumber="number-addition-second-number-argument-declaration",n))(Wd||{}),Hd=(n=>(n.ResultNumber="number-addition-result-number-return-delaration",n.Error="number-addition-error-return-delaration",n))(Hd||{});const Yd={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:"number-addition-first-number-argument-declaration",entityType:r.ValueDescriptor},zd={id:"number-addition-first-number-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Yd},Zd={type:r.GenericReference,id:"9f486db2-a983-4293-9eef-81d4fc8d2d3e",entityId:"number-addition-second-number-argument-declaration",entityType:r.ValueDescriptor},Xd={id:"1d4abe83-3e87-4f74-99be-c1fd8c2f8d2d",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Zd},Qd={type:r.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:"number-addition-result-number-return-delaration",entityType:r.ValueDescriptor},Kd={id:"b761acec-0755-4582-a68b-76267038bbe1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Qd},eu={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:at.Addition,entityType:r.ActionDescriptor},vo={id:"number-addition-first-number-argument-declaration",type:r.ValueDescriptor,version:1,name:"First value",description:"The first number to add",dataType:zd,required:!0,parentRelationType:C.FixedArguments,index:0,parent:eu},tu={type:r.GenericReference,id:"c5015128-4a65-462c-9da0-1c86e83ef897",entityId:at.Addition,entityType:r.ActionDescriptor},Io={id:"number-addition-second-number-argument-declaration",type:r.ValueDescriptor,description:"The second number to add",version:1,name:"Second value",dataType:Xd,required:!0,parentRelationType:C.FixedArguments,index:1,parent:tu},nu={type:r.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:at.Addition,entityType:r.ActionDescriptor},Po={parentRelationType:C.FixedReturns,id:"number-addition-result-number-return-delaration",type:r.ValueDescriptor,description:"The result number of the addition",version:1,name:"Result",dataType:Kd,required:!0,index:0,parent:nu},ru={type:r.GenericReference,id:"number-addition-operation-error-parent-ref",entityId:at.Addition,entityType:r.ActionDescriptor},iu={parentRelationType:C.FixedReturns,id:"number-addition-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:ru},Ea={id:at.Addition,type:r.ActionDescriptor,description:"Add two numbers together",version:1,name:at.Addition,fixedArguments:[vo,Io],error:iu,fixedReturns:[Po],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},au={[at.Addition]:Ea};var su=(n=>(n.FirstInputString="join-string-first-string-argument-declaration",n.SecondInputString="join-string-second-string-argument-declaration",n))(su||{}),ou=(n=>(n.ResultString="join-string-result-string-return-delaration",n.Error="join-string-error-return-delaration",n))(ou||{});const lu={type:r.GenericReference,id:"join-string-first-string-argument-declaration",entityId:"join-string-first-string-argument-declaration",entityType:r.ValueDescriptor},cu={id:"join-string-first-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:lu},du={type:r.GenericReference,id:"join-string-second-string-argument-declaration",entityId:"join-string-second-string-argument-declaration",entityType:r.ValueDescriptor},uu={id:"join-string-second-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:du},pu={type:r.GenericReference,id:"join-string-result-string-return-delaration",entityId:"join-string-result-string-return-delaration",entityType:r.ValueDescriptor},yu={id:"join-string-result-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pu},hu={type:r.GenericReference,id:"join-string-operation-first-string-argument-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},Ra={id:"join-string-first-string-argument-declaration",type:r.ValueDescriptor,version:1,name:"First value",description:"The first text to join to the second one. Its value will be at the beginning of the resulting text.",dataType:cu,parentRelationType:C.FixedArguments,required:!0,index:0,parent:hu},fu={type:r.GenericReference,id:"join-string-operation-second-string-argument-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},ba={id:"join-string-second-string-argument-declaration",type:r.ValueDescriptor,version:1,name:"Second value",description:"The second text to join to the first one. Its value will be at the end of the resulting text.",dataType:uu,parentRelationType:C.FixedArguments,required:!0,index:1,parent:fu},mu={type:r.GenericReference,id:"join-string-operation-result-string-return-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},pi={parentRelationType:C.FixedReturns,id:"join-string-result-string-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting text value.",dataType:yu,required:!0,index:0,parent:mu},Tu={type:r.GenericReference,id:"join-string-operation-error-parent-ref",entityId:ve.Join,entityType:r.ActionDescriptor},Eu={parentRelationType:C.FixedReturns,id:"join-string-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Tu},yi={id:ve.Join,type:r.ActionDescriptor,version:1,name:ve.Join,description:"Join two text together, to form a single resulting text value.",fixedArguments:[Ra,ba],fixedReturns:[pi],error:Eu,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},Ru={[ve.Join]:yi};var bu=(n=>(n.FirstInputList="join-list-first-list-argument-declaration",n.SecondInputList="join-list-second-list-argument-declaration",n))(bu||{}),gu=(n=>(n.ResultList="join-list-result-list-return-delaration",n.Error="join-list-error-return-delaration",n))(gu||{});const vu={type:r.GenericReference,id:"join-list-operation-first-list-argument-ref",entityId:"join-list-first-list-argument-declaration",entityType:r.ValueDescriptor},Iu={id:"join-list-first-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:vu},Pu={type:r.GenericReference,id:"join-list-operation-second-list-argument-ref",entityId:"join-list-second-list-argument-declaration",entityType:r.ValueDescriptor},Du={id:"join-list-second-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Pu},Au={type:r.GenericReference,id:"join-list-operation-result-list-return-ref",entityId:"join-list-result-list-return-delaration",entityType:r.ValueDescriptor},Su={id:"join-list-result-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Au},Ou={type:r.GenericReference,id:"join-list-operation-first-list-argument-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},Cu={id:"join-list-first-list-argument-declaration",type:r.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:Iu,parentRelationType:C.FixedArguments,required:!0,index:0,parent:Ou},Bu={type:r.GenericReference,id:"join-list-operation-second-list-argument-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},wu={id:"join-list-second-list-argument-declaration",type:r.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:Du,parentRelationType:C.FixedArguments,required:!0,index:1,parent:Bu},_u={type:r.GenericReference,id:"join-list-operation-result-list-return-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},Mu={parentRelationType:C.FixedReturns,id:"join-list-result-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:Su,required:!0,index:0,parent:_u},Nu={type:r.GenericReference,id:"join-list-operation-error-parent-ref",entityId:k.Join,entityType:r.ActionDescriptor},$u={parentRelationType:C.FixedReturns,id:"join-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Nu},Do={id:k.Join,type:r.ActionDescriptor,version:1,name:k.Join,description:"Join two lists together, to form a single resulting list value.",fixedArguments:[Cu,wu],error:$u,fixedReturns:[Mu],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var Vu=(n=>(n.InputList="list-to-split-argument-declaration",n.SplitIndex="split-list-index-argument-declaration",n))(Vu||{}),Lu=(n=>(n.FirstOutputList="split-list-first-output-list-return-delaration",n.SecondOutputList="split-list-second-output-list-return-delaration",n.Error="split-list-error-return-delaration",n))(Lu||{});const Gu={type:r.GenericReference,id:"split-list-operation-input-list-argument-ref",entityId:"list-to-split-argument-declaration",entityType:r.ValueDescriptor},Fu={id:"split-list-operation-input-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Gu},Uu={type:r.GenericReference,id:"split-list-operation-split-index-argument-ref",entityId:"split-list-index-argument-declaration",entityType:r.ValueDescriptor},xu={id:"split-list-operation-split-index-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Uu},Ao={type:r.GenericReference,id:"split-list-operation-first-output-list-return-ref",entityId:"split-list-first-output-list-return-delaration",entityType:r.ValueDescriptor},ju={id:"split-list-operation-first-output-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ao},ku={type:r.GenericReference,id:"split-list-operation-input-list-argument-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},qu={id:"list-to-split-argument-declaration",type:r.ValueDescriptor,version:1,name:"List to split",description:"The list to split at the given index",dataType:Fu,parentRelationType:C.FixedArguments,required:!0,index:0,parent:ku},Ju={type:r.GenericReference,id:"split-list-operation-split-index-argument-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Wu={id:"split-list-index-argument-declaration",type:r.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:xu,parentRelationType:C.FixedArguments,required:!0,index:1,parent:Ju},Hu={type:r.GenericReference,id:"split-list-operation-first-output-list-return-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Yu={parentRelationType:C.FixedReturns,id:"split-list-first-output-list-return-delaration",type:r.ValueDescriptor,version:1,name:"First list",description:"The list of values up to the split index",dataType:ju,required:!0,index:0,parent:Hu},zu={id:"split-list-operation-second-output-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ao},Zu={type:r.GenericReference,id:"split-list-operation-second-output-list-return-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Xu={parentRelationType:C.FixedReturns,id:"split-list-second-output-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Second list",description:"The list of values up to the split index",dataType:zu,required:!0,index:0,parent:Zu},Qu={type:r.GenericReference,id:"split-list-operation-error-parent-ref",entityId:k.Split,entityType:r.ActionDescriptor},Ku={parentRelationType:C.FixedReturns,id:"split-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Qu},So={id:k.Split,type:r.ActionDescriptor,version:1,name:k.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",fixedArguments:[qu,Wu],fixedReturns:[Yu,Xu],error:Ku,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var ep=(n=>(n.InputList="get-last-in-list-input-list-argument-declaration",n))(ep||{}),tp=(n=>(n.OutputElement="get-last-in-list-output-element-return-delaration",n.Error="get-last-in-list-error-return-delaration",n))(tp||{});const np={type:r.GenericReference,id:"get-last-in-list-operation-input-list-argument-ref",entityId:"get-last-in-list-input-list-argument-declaration",entityType:r.ValueDescriptor},rp={id:"get-last-in-list-input-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:np},ip={type:r.GenericReference,id:"get-last-in-list-operation-output-element-return-ref",entityId:"get-last-in-list-output-element-return-delaration",entityType:r.ValueDescriptor},ap={id:"get-last-in-list-output-element-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:ip},sp={type:r.GenericReference,id:"get-last-in-list-operation-input-list-argument-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},op={id:"get-last-in-list-input-list-argument-declaration",type:r.ValueDescriptor,version:1,name:"List",description:"The list to get the last element from.",dataType:rp,parentRelationType:C.FixedArguments,required:!0,index:0,parent:sp},lp={type:r.GenericReference,id:"get-last-in-list-operation-output-element-return-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},cp={parentRelationType:C.FixedReturns,id:"get-last-in-list-output-element-return-delaration",type:r.ValueDescriptor,version:1,name:"Last element",description:"The last element of the given list.",dataType:ap,required:!0,index:0,parent:lp},dp={type:r.GenericReference,id:"get-last-in-list-operation-error-parent-ref",entityId:k.GetLast,entityType:r.ActionDescriptor},up={parentRelationType:C.FixedReturns,id:"get-last-in-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:dp},Oo={id:k.GetLast,type:r.ActionDescriptor,version:1,name:k.GetLast,description:"Outputs the last element of a given list.",fixedArguments:[op],fixedReturns:[cp],error:up,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var pp=(n=>(n.List="append-to-list-lsit-argument-declaration",n.ElementToAppend="append-to-list-element-to-append-argument-declaration",n))(pp||{}),yp=(n=>(n.ResultList="append-to-list-result-list-return-delaration",n.Error="append-to-list-error-return-delaration",n))(yp||{});const hp={type:r.GenericReference,id:"append-to-list-operation-lsit-argument-ref",entityId:"append-to-list-lsit-argument-declaration",entityType:r.ValueDescriptor},fp={id:"append-to-list-lsit-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:hp},mp={type:r.GenericReference,id:"append-to-list-operation-second-list-argument-ref",entityId:"append-to-list-element-to-append-argument-declaration",entityType:r.ValueDescriptor},Tp={id:"append-to-list-second-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:mp},Ep={type:r.GenericReference,id:"append-to-list-operation-result-list-return-ref",entityId:"append-to-list-result-list-return-delaration",entityType:r.ValueDescriptor},Rp={id:"append-to-list-result-list-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ep},bp={type:r.GenericReference,id:"append-to-list-operation-lsit-argument-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Co={id:"append-to-list-lsit-argument-declaration",type:r.ValueDescriptor,version:1,name:"List value",description:"The list to which the element will be appended",dataType:fp,parentRelationType:C.FixedArguments,required:!0,index:0,parent:bp},gp={type:r.GenericReference,id:"append-to-list-operation-second-list-argument-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Bo={id:"append-to-list-element-to-append-argument-declaration",type:r.ValueDescriptor,version:1,name:"Element",description:"The element that will be added at the end of the list",dataType:Tp,parentRelationType:C.FixedArguments,required:!0,index:1,parent:gp},vp={type:r.GenericReference,id:"append-to-list-operation-result-list-return-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Ip={parentRelationType:C.FixedReturns,id:"append-to-list-result-list-return-delaration",type:r.ValueDescriptor,version:1,name:"Result",description:"The resulting list value.",dataType:Rp,required:!0,index:0,parent:vp},Pp={type:r.GenericReference,id:"append-to-list-operation-error-parent-ref",entityId:k.Append,entityType:r.ActionDescriptor},Dp={parentRelationType:C.FixedReturns,id:"append-to-list-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Pp},ga={id:k.Append,type:r.ActionDescriptor,version:1,name:k.Append,description:"Adds a given element to the end of a list value.",fixedArguments:[Co,Bo],error:Dp,fixedReturns:[Ip],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},Ap={[k.Join]:Do,[k.Split]:So,[k.GetLast]:Oo,[k.Append]:ga};var Sp=(n=>(n.ListOfFunctions="parallel-execution-list-of-functions-argument-declaration",n))(Sp||{}),Op=(n=>(n.ListOfExecutionResults="parallel-execution-result-return-delaration",n.Error="parallel-execution-error-return-delaration",n))(Op||{});const Cp={id:"parallel-execution-list-of-functions-blueprint-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,dynamicReturnTypes:null,fixedReturns:[],error:null,parent:null},Bp={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityId:"parallel-execution-list-of-functions-argument-declaration",entityType:r.ValueDescriptor},wp={id:"parallel-execution-list-of-functions-argument-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Cp,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Bp},_p={type:r.GenericReference,id:"da5e9fe9-f18a-49e3-98e5-c1bf7b9b3153",entityId:"parallel-execution-result-return-delaration",entityType:r.ValueDescriptor},Mp={id:"b761acec-0755-4582-a68b-76267038bbe1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:_p},Np={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityId:Pe.Parallel,entityType:r.ActionDescriptor},wo={id:"parallel-execution-list-of-functions-argument-declaration",type:r.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:wp,required:!0,index:0,parent:Np,parentRelationType:C.FixedArguments},$p={type:r.GenericReference,id:"caac2bc7-c23c-4f01-9581-a515c2e4637f",entityId:Pe.Parallel,entityType:r.ActionDescriptor},_o={id:"parallel-execution-result-return-delaration",type:r.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:Mp,required:!0,index:0,parent:$p,parentRelationType:C.FixedReturns},Vp={type:r.GenericReference,id:"parallel-execution-operation-error-parent-ref",entityId:Pe.Parallel,entityType:r.ActionDescriptor},Lp={id:"parallel-execution-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Vp,parentRelationType:C.ReturnedError},Lt={id:Pe.Parallel,type:r.ActionDescriptor,description:"Execute a list of actions in parallel",version:1,name:Pe.Parallel,fixedArguments:[wo],fixedReturns:[_o],argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,error:Lp,parent:null};var Gp=(n=>(n.MillisecondsNumber="wait-milliseconds-number-argument-declaration",n))(Gp||{}),Fp=(n=>(n.Error="wait-operation-error-return-delaration",n))(Fp||{});const Up={type:r.GenericReference,id:"3bd4aeb2-e3b7-4120-b289-011ebb03dba5",entityType:r.ValueDescriptor,entityId:"wait-milliseconds-number-argument-declaration"},xp={id:"wait-milliseconds-number-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Up},jp={type:r.GenericReference,id:"a6c14305-d4f7-43ae-9d5e-b7dbacdc830a",entityType:r.ActionDescriptor,entityId:Pe.Wait},jn={id:"wait-milliseconds-number-argument-declaration",type:r.ValueDescriptor,version:1,name:"Milliseconds to wait",description:"The amount of milliseconds to wait before calling the next entity",dataType:xp,required:!0,index:0,parent:jp,parentRelationType:C.FixedArguments},kp={type:r.GenericReference,id:"wait-operation-error-parent-ref",entityId:Pe.Wait,entityType:r.ActionDescriptor},qp={id:"wait-operation-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:kp,parentRelationType:C.ReturnedError},ot={id:Pe.Wait,type:r.ActionDescriptor,description:"Wait for the given amount of milliseconds before calling the next entity",version:1,name:Pe.Wait,fixedArguments:[jn],fixedReturns:[],error:qp,argumentsType:L.Fixed,returnsType:L.None,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var Jp=(n=>(n.ListOfFunctions="sequential-execution-list-of-functions-argument-declaration",n))(Jp||{}),Wp=(n=>(n.ListOfExecutionResults="sequential-execution-result-return-delaration",n.Error="sequential-execution-error-return-delaration",n))(Wp||{});const Hp={id:"sequential-execution-list-of-functions-blueprint-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,dynamicReturnTypes:null,fixedReturns:[],error:null,parent:null},Yp={type:r.GenericReference,id:"parallel-execution-list-of-functions-argument-declaration-id",entityId:"sequential-execution-list-of-functions-argument-declaration",entityType:r.ValueDescriptor},zp={id:"sequential-execution-list-of-functions-argument-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Hp,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Yp},Zp={type:r.GenericReference,id:"sequential-execution-list-of-execution-results-return-declaration-id",entityId:"sequential-execution-result-return-delaration",entityType:r.ValueDescriptor},Xp={id:"sequential-execution-list-of-execution-results-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Zp},Qp={type:r.GenericReference,id:"parallel-execution-operation-list-of-functions-argument-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},Mo={id:"sequential-execution-list-of-functions-argument-declaration",type:r.ValueDescriptor,version:1,name:"Actions to execute",description:"A value, of a list of actions to be executed in parallel",dataType:zp,required:!0,index:0,parent:Qp,parentRelationType:C.FixedArguments},Kp={type:r.GenericReference,id:"parallel-execution-operation-list-of-execution-results-return-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},No={id:"sequential-execution-result-return-delaration",type:r.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:Xp,required:!0,index:0,parent:Kp,parentRelationType:C.FixedReturns},ey={type:r.GenericReference,id:"sequential-execution-operation-error-parent-ref",entityId:Pe.Sequential,entityType:r.ActionDescriptor},ty={id:"sequential-execution-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:ey,parentRelationType:C.ReturnedError},rn={id:Pe.Sequential,type:r.ActionDescriptor,description:"Execute a list of actions one after the other",version:1,name:Pe.Sequential,fixedArguments:[Mo],fixedReturns:[No],error:ty,returnsType:L.Fixed,argumentsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},ny={[Pe.Parallel]:Lt,[Pe.Wait]:ot,[Pe.Sequential]:rn};var ry=(n=>(n.EntityToInstanciate="entity-to-instanciate-argument-declaration",n))(ry||{}),iy=(n=>(n.Error="create-new-instance-error-return-delaration",n))(iy||{});const ay={type:r.GenericReference,id:"entity-to-instanciate-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"entity-to-instanciate-argument-declaration"},sy={id:"entity-to-instanciate-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:ay},oy={type:r.GenericReference,id:"create-new-instance-operation-ref",entityType:r.ActionDescriptor,entityId:Ze.CreateNewInstance},ly={id:"entity-to-instanciate-argument-declaration",type:r.ValueDescriptor,version:1,name:"Entity to create a new copy of",description:"The entity of which a new copy will to be created",dataType:sy,required:!0,parentRelationType:C.FixedArguments,index:0,parent:oy},cy={type:r.GenericReference,id:"create-new-instance-output-entity-declaration-parent-ref",entityId:Ze.CreateNewInstance,entityType:r.ActionDescriptor},dy={parentRelationType:C.FixedReturns,id:"create-new-instance-output-entity-declaration",type:r.ValueDescriptor,version:1,dataType:null,name:"Created entity",description:"The entity that was created",parent:cy,required:!0,index:0},uy={type:r.GenericReference,id:"create-new-instance-error-parent-ref",entityId:Ze.CreateNewInstance,entityType:r.ActionDescriptor},py={parentRelationType:C.FixedReturns,id:"create-new-instance-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:uy},Cr={id:Ze.CreateNewInstance,type:r.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:Ze.CreateNewInstance,fixedArguments:[ly],fixedReturns:[dy],error:py,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null};var yy=(n=>(n.EntityToMatchType="validate-data-operation-entity-to-match-type-argument-declaration",n.DataToValidate="validate-data-operation-data-to-validate-argument-declaration",n))(yy||{}),hy=(n=>(n.Error="validate-data-error-return-delaration",n.OutputEntity="validate-data-output-entity-declaration",n))(hy||{});const fy={type:r.GenericReference,id:"validate-data-operation-data-to-validate-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"validate-data-operation-data-to-validate-argument-declaration"},my={id:"validate-data-operation-data-to-validate-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:fy},Ty={type:r.GenericReference,id:"validate-data-operation-data-to-validate-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Ze.Validate},Ey={id:"validate-data-operation-data-to-validate-argument-declaration",type:r.ValueDescriptor,version:1,name:"Data to validate",description:"The value to validate against the given entity type",dataType:my,required:!0,parentRelationType:C.FixedArguments,index:0,parent:Ty},Ry={type:r.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-declaration-ref",entityType:r.ValueDescriptor,entityId:"validate-data-operation-entity-to-match-type-argument-declaration"},by={id:"validate-data-operation-entity-to-match-type-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!0,isNullable:!1,defaultValue:null,constant:!1,parent:Ry},gy={type:r.GenericReference,id:"validate-data-operation-entity-to-match-type-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Ze.Validate},vy={id:"validate-data-operation-entity-to-match-type-argument-declaration",type:r.ValueDescriptor,version:1,name:"Entity to match",description:"The entity to match the data against",dataType:by,required:!0,index:0,parentRelationType:C.FixedArguments,parent:gy},Iy={type:r.GenericReference,id:"validate-data-operation-output-entity-declaration-parent-ref",entityId:Ze.Validate,entityType:r.ActionDescriptor},Py={id:"validate-data-output-entity-declaration",type:r.ValueDescriptor,version:1,dataType:null,name:"Output value",description:"A value with the type of the entity that was validated",parent:Iy,required:!0,index:0,parentRelationType:C.FixedReturns},Dy={type:r.GenericReference,id:"wait-operation-error-parent-ref",entityId:Ze.Validate,entityType:r.ActionDescriptor},Ay={id:"validate-data-error-return-delaration",type:r.ValueDescriptor,version:1,name:"Error",description:"An error that occurred during the operation.",dataType:null,required:!0,index:1,parent:Dy,parentRelationType:C.ReturnedError},kn={id:Ze.Validate,type:r.ActionDescriptor,description:"Validates the given data to see if it matches the structure of a given type/entity",version:1,name:Ze.Validate,fixedArguments:[vy,Ey],fixedReturns:[Py],error:Ay,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},Sy={[Ze.CreateNewInstance]:Cr,[Ze.Validate]:kn};var $o=(n=>(n.ActionOngoingProcessOutputValue="action-ongoing-process-output-value-descriptor-id",n))($o||{});const Ve={[r.ValueDescriptor]:{"action-ongoing-process-output-value-descriptor-id":{id:"action-ongoing-process-output-value-descriptor-id",dataType:{id:"process-output-value-data-type-id"}}},[r.BuiltInBaseEntity]:{[_.KEY_VALUE_PARAM]:{id:_.KEY_VALUE_PARAM},[_.HTTP_ENDPOINT]:{id:_.HTTP_ENDPOINT,properties:{method:"http-endpoint-built-in-method-property-id",path:"http-endpoint-built-in-path-property-id",cors:"http-endpoint-built-in-cors-property-id"}},[_.PERSISTED_ENTITY]:{id:_.PERSISTED_ENTITY,properties:{database:"persisted-built-in-base-entity-database-property-id",identifier:"persisted-built-in-base-entity-identifier-property-id"}},[_.RELATIONAL_DATABASE]:{id:_.RELATIONAL_DATABASE,properties:{identifier:"relational-database-built-in-base-entity-identifier-property-id",username:"relational-database-built-in-base-entity-username-property-id",password:"relational-database-built-in-base-entity-password-property-id",minSize:"relational-database-built-in-base-entity-min-size-property-id",default:"relational-database-built-in-base-entity-default-property-id",autoscaling:"relational-database-built-in-base-entity-autoscaling-property-id"}},[_.CRON_JOB]:{id:_.CRON_JOB,properties:{expression:"cron-job-built-in-base-entity-expression-property-id"}}},[r.Operation]:{[ve.Join]:{id:ve.Join,inputs:{first:"join-string-first-string-input-id",second:"join-string-second-string-input-id"},outputs:{result:"join-string-result-string-return-delaration-id",error:"join-string-error-return-delaration-id"}},[Ye.HttpRequest]:{id:Ye.HttpRequest,inputs:{url:"http-request-url-input-id",query:"http-request-query-input-id",method:"http-request-method-input-id",headers:"http-request-headers-input-id",body:"http-request-body-string-input-id"},outputs:{code:"http-response-code-return-delaration-id",body:"http-response-body-return-delaration-id",headers:"http-response-headers-return-delaration-id",error:"http-request-error-return-delaration-id"}}},[r.Loop]:{[je.List]:{id:je.List,inputs:{list:"iterate-over-list-loop-list-input-id"},outputs:{results:"iterate-over-list-loop-output-id"}},[je.ManualFlow]:{id:je.ManualFlow,inputs:{},outputs:{results:"manual-flow-loop-output-id"}}},[r.Condition]:{[Oe.MoreThanOrEqual]:{id:Oe.MoreThanOrEqual,inputs:{leftHand:"condition-more-than-or-equal-left-hand-input-id",rightHand:"condition-more-than-or-equal-right-hand-input-id"}},[wt.NotEmpty]:{id:wt.NotEmpty,inputs:{leftHand:"condition-not-empty-input-id"}}},[r.GlobalEvent]:{[en.PROJECT_PUBLICATION_COMPLETED]:{id:en.PROJECT_PUBLICATION_COMPLETED}}},Je=Ve[r.Operation]["base-http-request"],Oy={type:r.GenericReference,id:"d87cf943-57e1-4d19-9f05-190fa8c8ebc4",entityType:r.DataType,entityId:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3"},Cy={id:"http-request-url-default-value-id",type:r.PrimitiveValue,version:1,value:"https://some-url.com",name:v.String,valueAsType:null,parent:Oy,autogeneration:null},By={type:r.GenericReference,id:"aed50d73-eab5-42ce-b00e-7f5c45a9026f",entityId:Je.inputs.url,entityType:r.ValueDescriptor},wy={id:"0deb4ef7-d739-4ddc-a4d6-50bd6fababe3",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:Cy,constant:!1,parent:By},_y={type:r.GenericReference,id:"c3145af6-3387-464a-8887-272e483c856d",entityId:Je.inputs.query,entityType:r.ValueDescriptor},My={id:"2a5ba737-6335-4cc4-a2c0-16dca4052fac",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:_y},Ny={type:r.GenericReference,id:"075556b7-e468-48f7-8485-7159eaf389b2",entityType:r.DataType,entityId:"6df7ec2b-5dbd-44af-896b-17b314e88560"},$y={id:"http-request-method-default-value-id",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,valueAsType:null,parent:Ny,autogeneration:null},Vy={type:r.GenericReference,id:"aed647c8-a1b5-4cfc-9a3d-97887a567a80",entityId:Je.inputs.method,entityType:r.ValueDescriptor},Ly={id:"6df7ec2b-5dbd-44af-896b-17b314e88560",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:$y,options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],constant:!1,parent:Vy},Gy={type:r.GenericReference,id:"77203dfa-d2f6-4804-9556-e1cce46228f3",entityId:Je.inputs.headers,entityType:r.ValueDescriptor},Fy={id:"2c8a2a07-69c6-40ad-b5c9-f0dc4d5955ce",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Gy},Uy={type:r.GenericReference,id:"03db68a0-7ab6-4c6a-85b6-f4b95ebb53ff",entityId:Je.inputs.body,entityType:r.ValueDescriptor},xy={id:"0397876c-ed54-4ee9-85a4-04fd16dad973",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Uy},jy={type:r.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:r.ValueDescriptor,entityId:Je.outputs.code},ky={id:"45e6d0bc-0c0e-4059-a7a1-6bee925d73d0",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jy},qy={type:r.GenericReference,id:"2baaa53a-9aef-4bd1-b06d-967c17b7b627",entityType:r.DataType,entityId:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe"},Jy={type:r.GenericReference,id:"69f34d6c-c686-4165-b6ff-70dae8e1778b",entityType:r.ValueDescriptor,entityId:Je.outputs.headers},Wy={id:"dac63bfa-640d-4f4e-ba0f-86c2401bcfbe",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-headers-default-value-id",type:r.PrimitiveValue,version:1,value:{},name:v.JSON,parent:qy,valueAsType:null,autogeneration:null},constant:!1,parent:Jy},Hy={type:r.GenericReference,id:"744334e0-5135-4214-85d0-809437cb620b",entityType:r.DataType,entityId:"05fc1a5d-151a-479a-9c4e-4063f3456177"},Yy={type:r.GenericReference,id:"0e0e20df-1a46-432c-ba01-fd96508a6a61",entityType:r.ValueDescriptor,entityId:Je.outputs.body},zy={id:"05fc1a5d-151a-479a-9c4e-4063f3456177",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"http-response-body-default-value-id",type:r.PrimitiveValue,version:1,value:{},name:v.JSON,parent:Hy,valueAsType:null,autogeneration:null},constant:!1,parent:Yy},Zy={type:r.GenericReference,id:"26911792-f707-4bf1-b6f7-03d04a84232c",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},va={id:Je.inputs.method,type:r.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:Ly,required:!1,index:0,parentRelationType:C.FixedArguments,parent:Zy},Xy={type:r.GenericReference,id:"eee0c501-0ae6-4448-b914-aada76d63163",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Ia={id:Je.inputs.url,type:r.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:wy,required:!1,index:1,parentRelationType:C.FixedArguments,parent:Xy},Qy={type:r.GenericReference,id:"670091a4-21b1-4223-ad4c-b6dada0aec49",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Vo={id:Je.inputs.query,type:r.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:My,required:!1,index:2,parentRelationType:C.FixedArguments,parent:Qy},Ky={type:r.GenericReference,id:"85aad3eb-22fe-45f9-b68c-1dc7061f41e0",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Pa={id:Je.inputs.headers,type:r.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:Fy,required:!1,index:3,parent:Ky,parentRelationType:C.FixedArguments},eh={type:r.GenericReference,id:"c3e2a4af-9b84-4574-8b30-5044ffc51776",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Da={id:Je.inputs.body,type:r.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:xy,required:!1,index:4,parentRelationType:C.FixedArguments,parent:eh},th={type:r.GenericReference,id:"92e04dc7-2145-4a31-908e-03810f7235e8",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Lo={id:Je.outputs.code,type:r.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:ky,required:!0,index:0,parentRelationType:C.FixedReturns,parent:th},nh={type:r.GenericReference,id:"86aca556-bbf1-4679-9909-31db61b288e2",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},Aa={parentRelationType:C.FixedReturns,id:Je.outputs.headers,type:r.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:Wy,required:!0,index:1,parent:nh},rh={type:r.GenericReference,id:"ccf3d1be-04e4-4d03-99fd-5bc1e1919f90",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},hi={parentRelationType:C.FixedReturns,id:Je.outputs.body,type:r.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:zy,required:!0,index:2,parent:rh},ih={type:r.GenericReference,id:"21487ffc-82b9-473d-bc19-6e7d7c480ed7",entityType:r.ActionDescriptor,entityId:Ye.HttpRequest},ah={type:r.GenericReference,id:"ad69861b-32f7-4461-b7f7-aa84a82578d9",entityType:r.ValueDescriptor,entityId:Je.outputs.error},sh={id:"5da68b15-57bc-40c1-b79f-a9075e0f22c1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,isList:!1,asType:!1,isNullable:!1,constant:!1,defaultValue:null,parent:ah},Go={parentRelationType:C.ReturnedError,id:Je.outputs.error,type:r.ValueDescriptor,description:"Http request error, if any. Contains a payload describing what went wrong.",version:1,name:"Error",dataType:sh,required:!0,index:0,parent:ih},fi={type:r.ActionDescriptor,id:Ye.HttpRequest,name:Ye.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,fixedArguments:[va,Ia,Vo,Pa,Da],fixedReturns:[Lo,Aa,hi],argumentsType:L.Fixed,returnsType:L.Fixed,error:Go,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},oh={[Ye.HttpRequest]:fi},aI={...Ru,...au,...Ap,...ny,...Sy,...oh},lh=Ve[r.Loop]["list-loop"],ch={id:"iterate-over-list-loop-return-declaration-parent-ref-id",type:r.GenericReference,entityId:je.List,entityType:r.ActionDescriptor},dh={id:lh.outputs.results,type:r.ValueDescriptor,version:1,name:"Results",description:"List of results from the loop. One item in the list for each iteration of the loop.",dataType:null,required:!0,index:0,parent:ch,parentRelationType:C.FixedReturns},uh={id:"iterate-over-list-loop-list-argument-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:"iterate-over-list-loop-list-argument-declaration-id",entityType:r.ArgumentDeclaration},ph={id:"iterate-over-list-loop-list-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:uh},yh={id:"iterate-over-list-loop-list-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:je.List,entityType:r.ActionDescriptor},hh={id:lh.inputs.list,type:r.ValueDescriptor,version:1,name:"List",description:"The list to iterate over",required:!0,dataType:ph,index:0,parent:yh,parentRelationType:C.FixedArguments},qn={id:je.List,type:r.ActionDescriptor,version:1,name:je.List,description:"Iterates over a list of entities",fixedArguments:[hh],fixedReturns:[dh],error:null,argumentsType:L.Fixed,returnsType:L.Fixed,dynamicArgumentTypes:null,dynamicReturnTypes:null,parent:null},sI=Ve[r.Loop]["list-loop"],fh={id:"manual-flow-loop-previous-iterations-results-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:"manual-flow-loop-previous-iterations-results-declaration-id",entityType:r.ReturnDeclaration},mh={id:"manual-flow-loop-previous-iterations-results-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:fh},Th={id:"manual-flow-loop-previous-iterations-results-declaration-parent-ref-id",type:r.GenericReference,entityId:je.ManualFlow,entityType:r.ActionDescriptor},Eh={id:sI.outputs.results,type:r.ValueDescriptor,version:1,name:"Results",description:"List of results from the loop. One item in the list for each iteration of the loop.",dataType:mh,required:!0,index:1,parentRelationType:C.FixedReturns,parent:Th},Fo={id:je.ManualFlow,type:r.ActionDescriptor,version:1,name:je.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.",fixedArguments:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,fixedReturns:[Eh],argumentsType:L.None,returnsType:L.Fixed,error:null,parent:null},Sa=Ve[r.BuiltInBaseEntity][_.KEY_VALUE_PARAM],oI={id:"key-value-param-built-in-base-entity-name-property-data-type-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property-data-type",entityType:r.DataType},Rh={id:"key-value-param-built-in-base-entity-name-property-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-name-property",entityType:r.Property},lI={id:"key-value-param-built-in-base-entity-name-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:null,parent:Rh},bh={id:"key-value-param-built-in-base-entity-name-property-parent-ref",type:r.GenericReference,entityId:Sa.id,entityType:r.BuiltInBaseEntity},gh={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-name-property",name:"Parameter name",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:lI,description:"The name of the path parameter",parent:bh},cI={id:"key-value-param-built-in-base-entity-value-property-data-type-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property-data-type",entityType:r.DataType},vh={id:"key-value-param-built-in-base-entity-value-property-ref",type:r.GenericReference,entityId:"key-value-param-built-in-base-entity-value-property",entityType:r.Property},dI={id:"key-value-param-built-in-base-entity-value-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:null,parent:vh},Ih={id:"key-value-param-built-in-base-entity-value-property-parent-ref",type:r.GenericReference,entityId:Sa.id,entityType:r.BuiltInBaseEntity},Ph={hidden:!1,required:!0,id:"key-value-param-built-in-base-entity-value-property",name:"Parameter Value",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:1,dataType:dI,description:"The value of the path parameter",parent:Ih},Oa={id:Sa.id,version:1,description:'An entity with a "name" and "value" property representing a breakdown of a key-value pair.',name:Sa.id,type:r.BuiltInBaseEntity,abstract:!1,static:!1,interactive:!0,properties:[gh,Ph],abstractMethods:[],methods:[],extends:[]},mi=Ve[r.BuiltInBaseEntity][_.HTTP_ENDPOINT].properties,Dh={id:"endpointBuiltInCorsPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInCorsPropertyDataType"},Ah={id:"endpointBuiltInCorsPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:mi.cors},Sh={id:"endpointBuiltInCorsPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"endpointBuiltInCorsPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:["*"],parent:Dh,autogeneration:null,valueAsType:null},parent:Ah},Oh={id:"endpointBuiltInBaseEntityRef",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Ch={hidden:!0,required:!0,id:mi.cors,name:"Allowed origins",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:Sh,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:Oh},Bh={id:"endpointBuiltInPathPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInPathPropertyDataType"},wh={id:"endpointBuiltInPathPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:mi.path},_h={id:"endpointBuiltInPathPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"endpointBuiltInPathPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.String,value:"/",parent:Bh,autogeneration:null,valueAsType:null},parent:wh},Mh={id:"endpointBuiltInBaseEntityRefTwo",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Uo={hidden:!1,required:!0,id:mi.path,name:"Path",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:1,dataType:_h,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:Mh},Nh={id:"endpointBuiltInMethodPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointBuiltInMethodPropertyDataType"},$h={id:"endpointBuiltInMethodPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"endpointBuiltInMethodProperty"},Vh={id:"endpointBuiltInMethodPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:gn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"endpointBuiltInMethodPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,parent:Nh,autogeneration:null,valueAsType:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:$h},Lh={id:"endpointBuiltInBaseEntityRefThree",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},xo={hidden:!1,required:!0,id:mi.method,name:"Method",version:1,type:r.Property,private:!1,index:2,implements:null,abstract:!0,static:!0,dataType:Vh,description:"The HTTP method that this endpoint will respond to, for example GET, POST, PUT, DELETE, etc.",parent:Lh},Gh={id:"endpointRequestHeadersVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointRequestHeadersVariableDataType"},Fh={id:"endpointRequestHeadersArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestHeadersArgumentDeclaration"},Uh={id:"endpointRequestHeadersVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointRequestHeadersVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:Gh,autogeneration:null,valueAsType:null},parent:Fh},xh={id:"endpointRequestBodyArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestBodyArgumentDeclaration"},jh={id:"endpointRequestBodyVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:xh},kh={id:"endpointRequestQueryParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointRequestQueryParamsVariableDataType"},qh={id:"endpointRequestQueryParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointRequestQueryParamsArgumentDeclaration"},Jh={id:"endpointRequestQueryParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:Oa,defaultValue:{id:"endpointRequestQueryParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:[],parent:kh,autogeneration:null,valueAsType:null},parent:qh},Wh={id:"endpointPathParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointPathParamsVariableDataType"},Hh={id:"endpointPathParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"endpointPathParamsArgumentDeclaration"},Yh={id:"endpointPathParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Oa,asType:!1,defaultValue:{id:"endpointPathParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:[],parent:Wh,autogeneration:null,valueAsType:null},parent:Hh},zh={id:"endpointReachedTriggerActionDescriptorRef",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Zh={id:"endpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:r.ValueDescriptor,name:"Request headers",dataType:Uh,required:!0,index:0,parentRelationType:C.FixedArguments,parent:zh},Xh={id:"endpointReachedTriggerActionDescriptorRefTwo",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},Qh={id:"endpointPathParamsArgumentDeclaration",type:r.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:Yh,required:!0,index:1,parentRelationType:C.FixedArguments,parent:Xh},Kh={id:"endpointReachedTriggerActionDescriptorRefThree",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},ef={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:r.ValueDescriptor,name:"Request query params",dataType:Jh,required:!0,index:2,parentRelationType:C.FixedArguments,parent:Kh},tf={id:"endpointReachedTriggerActionDescriptorRefFour",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReachedTriggerActionDescriptor"},nf={id:"endpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:r.ValueDescriptor,name:"Request body",dataType:jh,index:3,required:!0,parentRelationType:C.FixedArguments,parent:tf},rf={id:"endpointResponseCodeReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseCodeReturnDeclaration"},af={id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:rf},sf={id:"endpointReturnStatementRef",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},of={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:r.ValueDescriptor,name:"Response code",dataType:af,required:!0,index:0,parentRelationType:C.FixedReturns,parent:sf},lf={id:"endpointResponseHeadersDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"endpointResponseHeadersDataType"},cf={id:"endpointResponseHeadersReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseHeadersReturnDeclaration"},df={id:"endpointResponseHeadersDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"endpointResponseHeadersDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:lf,autogeneration:null,valueAsType:null},parent:cf},uf={id:"endpointReturnStatementRefTwo",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},pf={id:"endpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:r.ValueDescriptor,name:"Response headers",dataType:df,required:!1,index:1,parentRelationType:C.FixedReturns,parent:uf},yf={id:"endpointResponseBodyReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"endpointResponseBodyReturnDeclaration"},hf={id:"endpointResponseBodyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:yf},ff={id:"endpointReturnStatementRefThree",type:r.GenericReference,entityType:r.ActionDescriptor,entityId:"endpointReturnStatement"},mf={id:"endpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:r.ValueDescriptor,name:"Response body",dataType:hf,required:!1,index:2,parentRelationType:C.FixedReturns,parent:ff},Tf={id:"endpointBuiltInBaseEntityRefFour",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},jo={id:"endpointReachedTriggerActionDescriptor",type:r.ActionDescriptor,version:1,name:"Endpoint reached",description:"Fired when the endpoint is reached.",argumentsType:L.Fixed,dynamicArgumentTypes:null,fixedArguments:[Zh,Qh,ef,nf],returnsType:L.Fixed,fixedReturns:[of,pf,mf],error:null,dynamicReturnTypes:null,parent:Tf},Ca={id:_.HTTP_ENDPOINT,version:1,description:"An HTTP endpoint that can be reached by a client from the internet.",name:_.HTTP_ENDPOINT,type:r.BuiltInBaseEntity,interactive:!1,abstract:!0,static:!0,properties:[Ch,Uo,xo],abstractMethods:[jo],extends:[],methods:[]},_t=Ve[r.BuiltInBaseEntity].BUILT_IN_RELATIONAL_DATABASE_ENTITY,Ef={id:"relational-database-built-in-base-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-identifier-property-data-type-id",entityType:r.DataType},Rf={id:"relational-database-built-in-base-entity-identifier-property-ref-id",type:r.GenericReference,entityId:_t.properties.identifier,entityType:r.Property},uI={id:"relational-database-built-in-base-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-identifier-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:null,parent:Ef,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:Rf},Br={id:"relational-database-built-in-base-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Ba={hidden:!1,required:!0,id:_t.properties.identifier,name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:0,dataType:uI,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Br},pI={id:"relational-database-built-in-base-entity-username-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-idd",entityType:r.DataType},bf={id:"relational-database-built-in-base-entity-username-property-ref-id",type:r.GenericReference,entityId:_t.properties.username,entityType:r.Property},yI={id:"relational-database-built-in-base-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-username-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"postgres",parent:{id:"relational-database-built-in-base-entity-username-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-username-property-data-type-id",entityType:r.DataType},autogeneration:null,valueAsType:null},parent:bf},wa={hidden:!1,required:!0,id:_t.properties.username,name:"Username",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:1,dataType:yI,description:"The username that will be used to connect to the database.",parent:Br},hI={id:"relational-database-built-in-base-entity-password-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-password-property-data-type-id",entityType:r.DataType},gf={id:"relational-database-built-in-base-entity-password-property-ref-id",type:r.GenericReference,entityId:_t.properties.password,entityType:r.Property},fI={id:"relational-database-built-in-base-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:gf},_a={hidden:!1,required:!0,id:_t.properties.password,name:"Password",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:2,dataType:fI,description:"The password that will be used to connect to the database.",parent:Br},vf={id:"relational-database-built-in-base-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-min-size-property-data-type-id",entityType:r.DataType},If={id:"relational-database-built-in-base-entity-min-size-property-ref-id",type:r.GenericReference,entityId:_t.properties.minSize,entityType:r.Property},mI={id:"relational-database-built-in-base-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-min-size-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:vf,autogeneration:null,valueAsType:null},parent:If},Ma={hidden:!0,required:!0,id:_t.properties.minSize,name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:3,dataType:mI,description:"The minimum size of the database in GB.",parent:Br},Pf={id:"relational-database-built-in-base-entity-default-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-default-property-data-type-id",entityType:r.DataType},Df={id:"relational-database-built-in-base-entity-default-property-ref-id",type:r.GenericReference,entityId:_t.properties.default,entityType:r.Property},TI={id:"relational-database-built-in-base-entity-default-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:bn,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-default-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!1,parent:Pf,autogeneration:null,valueAsType:null},parent:Df},ko={hidden:!0,required:!0,id:_t.properties.default,name:"Default",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:TI,description:"If true, this database will be the default database for the server instance and all the new entities.",parent:Br},Af={id:"relational-database-built-in-base-entity-autoscaling-property-ref-id",type:r.GenericReference,entityId:_t.properties.autoscaling,entityType:r.Property},Sf={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-ref-id",type:r.GenericReference,entityId:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",entityType:r.DataType},EI={id:"relational-database-built-in-base-entity-autoscaling-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:bn,asType:!1,defaultValue:{id:"relational-database-built-in-base-entity-autoscaling-property-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!1,parent:Sf,autogeneration:null,valueAsType:null},parent:Af},Of={id:"relational-database-built-in-base-entity-autoscaling-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},qo={hidden:!0,required:!0,id:_t.properties.autoscaling,name:"Auto-scaling",version:1,type:r.Property,private:!1,abstract:!0,static:!0,implements:null,index:4,dataType:EI,description:"If true, this database will automatically scale up or down in memory size, based on the usage.",parent:Of},vn={id:_.RELATIONAL_DATABASE,version:1,description:"This entity provisions a relational database in the cloud.",name:_.RELATIONAL_DATABASE,type:r.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[Ba,wa,_a,Ma,ko,qo],abstractMethods:[],methods:[],extends:[]},Cf={type:r.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:r.BuiltInBaseEntity,id:Pt.DeletePersistedEntity},Jo={type:r.FunctionDeclaration,id:Pt.DeletePersistedEntity,name:Pt.DeletePersistedEntity,description:"Permanently deletes the current copy of an entity from the database",version:1,parent:Cf,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},Bf={type:r.GenericReference,entityId:"persisted-built-in-base-entity-ref-id",entityType:r.BuiltInBaseEntity,id:Pt.SoftDeletePersistedEntity},wf={type:r.FunctionDeclaration,id:Pt.SoftDeletePersistedEntity,name:Pt.SoftDeletePersistedEntity,description:"Designates the entity as deleted, but does not remove it from the database.",version:1,parent:Bf,inputs:[],calls:[],implements:null,collapsed:!1,returnStatements:[],index:0,private:!1,x:0,y:0},_f=Ve[r.BuiltInBaseEntity][_.PERSISTED_ENTITY].properties,RI={id:"persisted-built-in-base-entity-database-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-database-property-data-type-id",entityType:r.DataType},Mf={id:"persisted-built-in-base-entity-database-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-database-property-id",entityType:r.Property},bI={id:"persisted-built-in-base-entity-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:vn,asType:!1,defaultValue:null,parent:Mf},Nf={id:"persisted-built-in-base-entity-database-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Ti={hidden:!0,required:!0,id:_f.database,name:"Database",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:bI,description:"The database that the entity belongs to.",parent:Nf},$f={id:"persisted-built-in-base-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-data-type-id",entityType:r.DataType},Vf={id:"persisted-built-in-base-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-identifier-property-id",entityType:r.Property},gI={id:"persisted-built-in-base-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:Ta,asType:!1,defaultValue:{id:"persisted-built-in-base-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.UUID,value:null,parent:$f,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:Vf},Lf={id:"persisted-built-in-base-entity-identifier-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Gf={hidden:!1,required:!0,id:_f.identifier,name:"Identifier",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:gI,description:"Auto-generated unique identifier for the entity, can be used to identify the entity among other entities of the same type.",parent:Lf},vI={id:"persisted-built-in-base-entity-deleted-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-data-type-id",entityType:r.DataType},Ff={id:"persisted-built-in-base-entity-deleted-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-deleted-at-property-id",entityType:r.Property},Uf={id:"persisted-built-in-base-entity-deleted-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!0,constant:!1,entity:nn,asType:!1,defaultValue:null,parent:Ff},xf={id:"persisted-built-in-base-entity-deleted-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},jf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-deleted-at-property-id",name:"Deleted at",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:Uf,description:"The date and time when the entity was deleted.",parent:xf},II={id:"persisted-built-in-base-entity-created-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-data-type-id",entityType:r.DataType},kf={id:"persisted-built-in-base-entity-created-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-created-at-property-id",entityType:r.Property},qf={id:"persisted-built-in-base-entity-created-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:nn,asType:!1,defaultValue:null,parent:kf},Jf={id:"persisted-built-in-base-entity-created-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Wf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-created-at-property-id",name:"Created at",version:1,type:r.Property,private:!1,abstract:!1,implements:null,static:!1,index:0,dataType:qf,description:"The date and time when the entity was created.",parent:Jf},PI={id:"persisted-built-in-base-entity-updated-at-property-data-type-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-data-type-id",entityType:r.DataType},Hf={id:"persisted-built-in-base-entity-updated-at-property-ref-id",type:r.GenericReference,entityId:"persisted-built-in-base-entity-updated-at-property-id",entityType:r.Property},Yf={id:"persisted-built-in-base-entity-updated-at-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:nn,asType:!1,defaultValue:null,parent:Hf},zf={id:"persisted-built-in-base-entity-updated-at-property-parent-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},Zf={hidden:!1,required:!0,id:"persisted-built-in-base-entity-updated-at-property-id",name:"Updated at",version:1,type:r.Property,private:!1,implements:null,abstract:!1,static:!1,index:0,dataType:Yf,description:"The date and time when the entity was last updated.",parent:zf},_e={id:_.PERSISTED_ENTITY,version:1,description:"An entity that is permanently stored in the database and can be accessed at any point.",name:_.PERSISTED_ENTITY,type:r.BuiltInBaseEntity,abstract:!0,static:!1,interactive:!0,abstractMethods:[],properties:[Ti,Gf,jf,Wf,Zf],methods:[Jo,wf],extends:[]},Xf={id:"cron-job-triggered-function-declaration-blueprint-parent-ref-id",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Wo={id:"cron-job-triggered-function-declaration-blueprint-id",name:"Cron job triggered",version:1,type:r.ActionDescriptor,argumentsType:L.None,returnsType:L.None,description:"Executed when the cron job is triggered",fixedArguments:[],dynamicArgumentTypes:null,error:null,fixedReturns:[],dynamicReturnTypes:null,parent:Xf},Qf=Ve[r.BuiltInBaseEntity].BUILT_IN_CRON_JOB_ENTITY,DI={id:"cron-job-built-in-base-entity-expression-property-data-type-ref",type:r.GenericReference,entityId:"cron-job-built-in-base-entity-expression-property-data-type",entityType:r.DataType},Kf={id:"cron-job-built-in-base-entity-expression-property-ref",type:r.GenericReference,entityId:Qf.properties.expression,entityType:r.Property},AI={id:"cron-job-built-in-base-entity-expression-property-data-type",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:Kf},em={id:"cron-job-built-in-base-entity-ref",type:r.GenericReference,entityId:_.CRON_JOB,entityType:r.BuiltInBaseEntity},tm={hidden:!1,required:!0,id:Qf.properties.expression,name:"Cron expression",version:1,type:r.Property,private:!1,abstract:!0,implements:null,static:!0,index:0,dataType:AI,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:em},Ho={id:_.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:_.CRON_JOB,type:r.BuiltInBaseEntity,abstract:!0,static:!0,interactive:!1,properties:[tm],methods:[],abstractMethods:[Wo],extends:[]},nm={type:r.GenericReference,id:"execution-built-in-entity-abort-method-parent-ref-id",entityType:r.BuiltInBaseEntity,entityId:"execution-built-in-entity-id"},Yo={id:"execution-built-in-entity-abort-method-id",type:r.FunctionDeclaration,version:1,name:Pt.AbortExecution,description:"Aborts the execution of the entity",inputs:[],returnStatements:[],calls:[],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:nm},zo={id:_.EXECUTION,type:r.BuiltInBaseEntity,version:1,name:_.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:[Yo],abstractMethods:[]},SI=Ve[r.Condition]["not-empty"],rm={type:r.GenericReference,id:"not-empty-condition-ref",entityType:r.ActionDescriptor,entityId:wt.NotEmpty},im={id:SI.inputs.leftHand,type:r.ValueDescriptor,version:1,name:"Value",description:"The value to check if it is not empty",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:0,parent:rm},Jn={type:r.ActionDescriptor,id:wt.NotEmpty,version:1,name:wt.NotEmpty,description:"Checks if the value is not empty",parent:null,fixedArguments:[im],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.Fixed,returnsType:L.None,error:null},am={[wt.NotEmpty]:Jn},sm=Ve[r.Condition]["more-than-or-equal"],om={type:r.GenericReference,id:"more-than-or-equal-condition-left-hand-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Oe.MoreThanOrEqual},lm={id:sm.inputs.leftHand,type:r.ValueDescriptor,version:1,name:"First value",description:"The first value to compare",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:0,parent:om},cm={type:r.GenericReference,id:"more-than-or-equal-condition-right-hand-argument-parent-ref",entityType:r.ActionDescriptor,entityId:Oe.MoreThanOrEqual},dm={id:sm.inputs.rightHand,type:r.ValueDescriptor,version:1,name:"Second value",description:"The second value to compare",dataType:null,required:!0,parentRelationType:C.FixedArguments,index:1,parent:cm},wr={type:r.ActionDescriptor,id:Oe.MoreThanOrEqual,version:1,name:Oe.MoreThanOrEqual,description:"Checks if the value is not empty",parent:null,fixedArguments:[lm,dm],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.Fixed,returnsType:L.None,error:null},um={[Oe.MoreThanOrEqual]:wr},OI={...am,...um},Na={type:r.ActionDescriptor,id:en.PROJECT_PUBLICATION_COMPLETED,version:1,name:en.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,fixedArguments:[],fixedReturns:[],dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:L.None,returnsType:L.None,error:null},CI={[en.PROJECT_PUBLICATION_COMPLETED]:Na},Zo=Ve[r.ValueDescriptor][$o.ActionOngoingProcessOutputValue],pm={type:r.GenericReference,id:"182f767f-50e8-4394-ba5f-43e78c232733",entityType:r.ValueDescriptor,entityId:Zo.id},ym={id:Zo.dataType.id,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:zo,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pm},Xo={id:Zo.id,type:r.ValueDescriptor,description:"A value that represents the ongoing process of the parent action",version:1,name:"Process",dataType:ym,required:!0,index:0,parent:null,parentRelationType:C.OngoingProcessExecution};var z;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const s={};for(const o of a)s[o]=o;return s},n.getValidEnumValues=a=>{const s=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),o={};for(const d of s)o[d]=a[d];return n.objectValues(o)},n.objectValues=a=>n.objectKeys(a).map(function(s){return a[s]}),n.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},n.find=(a,s)=>{for(const o of a)if(s(o))return o},n.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)}n.joinValues=i,n.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(z||(z={}));var Qo;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(Qo||(Qo={}));const M=z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),In=n=>{switch(typeof n){case"undefined":return M.undefined;case"string":return M.string;case"number":return isNaN(n)?M.nan:M.number;case"boolean":return M.boolean;case"function":return M.function;case"bigint":return M.bigint;case"symbol":return M.symbol;case"object":return Array.isArray(n)?M.array:n===null?M.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?M.promise:typeof Map<"u"&&n instanceof Map?M.map:typeof Set<"u"&&n instanceof Set?M.set:typeof Date<"u"&&n instanceof Date?M.date:M.object;default:return M.unknown}},P=z.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"]),BI=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class mt 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 d=i,p=0;for(;p<o.path.length;){const h=o.path[p];p===o.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(o))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return a(this),i}static assert(e){if(!(e instanceof mt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z.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()}}mt.create=n=>new mt(n);const _r=(n,e)=>{let t;switch(n.code){case P.invalid_type:n.received===M.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case P.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,z.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:t=`Unrecognized key(s) in object: ${z.joinValues(n.keys,", ")}`;break;case P.invalid_union:t="Invalid input";break;case P.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${z.joinValues(n.options)}`;break;case P.invalid_enum_value:t=`Invalid enum value. Expected ${z.joinValues(n.options)}, received '${n.received}'`;break;case P.invalid_arguments:t="Invalid function arguments";break;case P.invalid_return_type:t="Invalid function return type";break;case P.invalid_date:t="Invalid date";break;case P.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:z.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case P.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case P.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case P.custom:t="Invalid input";break;case P.invalid_intersection_types:t="Intersection results could not be merged";break;case P.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case P.not_finite:t="Number must be finite";break;default:t=e.defaultError,z.assertNever(n)}return{message:t}};let hm=_r;function wI(n){hm=n}function $a(){return hm}const Va=n=>{const{data:e,path:t,errorMaps:i,issueData:a}=n,s=[...t,...a.path||[]],o={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let d="";const p=i.filter(h=>!!h).slice().reverse();for(const h of p)d=h(o,{data:e,defaultError:d}).message;return{...a,path:s,message:d}},_I=[];function w(n,e){const t=$a(),i=Va({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===_r?void 0:_r].filter(a=>!!a)});n.common.issues.push(i)}class Qe{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 x;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 Qe.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 x;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 x=Object.freeze({status:"aborted"}),Mr=n=>({status:"dirty",value:n}),lt=n=>({status:"valid",value:n}),Ko=n=>n.status==="aborted",el=n=>n.status==="dirty",Ei=n=>n.status==="valid",Ri=n=>typeof Promise<"u"&&n instanceof Promise;function La(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)}function fm(n,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"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?a.call(n,t):a?a.value=t:e.set(n,t),t}typeof SuppressedError=="function"&&SuppressedError;var V;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(V||(V={}));var bi,gi;class kt{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 mm=(n,e)=>{if(Ei(e))return{success:!0,data:e.value};if(!n.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 mt(n.common.issues);return this._error=t,this._error}}};function J(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:i,description:a}=n;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,d)=>{var p,h;const{message:T}=n;return o.code==="invalid_enum_value"?{message:T??d.defaultError}:typeof d.data>"u"?{message:(p=T??i)!==null&&p!==void 0?p:d.defaultError}:o.code!=="invalid_type"?{message:d.defaultError}:{message:(h=T??t)!==null&&h!==void 0?h:d.defaultError}},description:a}}class H{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 In(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Qe,ctx:{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ri(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:In(e)},s=this._parseSync({data:e,path:a.path,parent:a});return mm(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:In(e)},a=this._parse({data:e,path:i.path,parent:i}),s=await(Ri(a)?a:Promise.resolve(a));return mm(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),d=()=>s.addIssue({code:P.custom,...i(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(p=>p?!0:(d(),!1)):o?!0:(d(),!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 Ut({schema:this,typeName:U.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Jt.create(this,this._def)}nullable(){return Sn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ft.create(this,this._def)}promise(){return Lr.create(this,this._def)}or(e){return Di.create([this,e],this._def)}and(e){return Ai.create(this,e,this._def)}transform(e){return new Ut({...J(this._def),schema:this,typeName:U.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new wi({...J(this._def),innerType:this,defaultValue:t,typeName:U.ZodDefault})}brand(){return new rl({typeName:U.ZodBranded,type:this,...J(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new _i({...J(this._def),innerType:this,catchValue:t,typeName:U.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Mi.create(this,e)}readonly(){return Ni.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const MI=/^c[^\s-]{8,}$/i,NI=/^[0-9a-z]+$/,$I=/^[0-9A-HJKMNP-TV-Z]{26}$/,VI=/^[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,LI=/^[a-z0-9_-]{21}$/i,GI=/^[-+]?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)?)??$/,FI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,UI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tl;const xI=/^(?:(?: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])$/,jI=/^(([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})))$/,kI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tm="((\\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])))",qI=new RegExp(`^${Tm}$`);function Em(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function JI(n){return new RegExp(`^${Em(n)}$`)}function Rm(n){let e=`${Tm}T${Em(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function WI(n,e){return!!((e==="v4"||!e)&&xI.test(n)||(e==="v6"||!e)&&jI.test(n))}class Gt extends H{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==M.string){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.string,received:s.parsedType}),x}const i=new Qe;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:P.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),w(a,{code:P.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,d=e.data.length<s.value;(o||d)&&(a=this._getOrReturnCtx(e,a),o?w(a,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):d&&w(a,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")FI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"email",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")tl||(tl=new RegExp(UI,"u")),tl.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"emoji",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")VI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"uuid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")LI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"nanoid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")MI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")NI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"cuid2",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")$I.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ulid",code:P.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),w(a,{validation:"url",code:P.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),w(a,{validation:"regex",code:P.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),w(a,{code:P.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),w(a,{code:P.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Rm(s).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?qI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?JI(s).test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{code:P.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?GI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"duration",code:P.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?WI(e.data,s.version)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"ip",code:P.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?kI.test(e.data)||(a=this._getOrReturnCtx(e,a),w(a,{validation:"base64",code:P.invalid_string,message:s.message}),i.dirty()):z.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(a=>e.test(a),{validation:t,code:P.invalid_string,...V.errToObj(i)})}_addCheck(e){return new Gt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...V.errToObj(e)})}url(e){return this._addCheck({kind:"url",...V.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...V.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...V.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...V.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...V.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...V.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...V.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...V.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...V.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,...V.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,...V.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...V.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...V.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...V.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...V.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...V.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...V.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...V.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...V.errToObj(t)})}nonempty(e){return this.min(1,V.errToObj(e))}trim(){return new Gt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gt({...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}}Gt.create=n=>{var e;return new Gt({checks:[],typeName:U.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...J(n)})};function HI(n,e){const t=(n.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=t>i?t:i,s=parseInt(n.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return s%o/Math.pow(10,a)}class Pn extends H{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)!==M.number){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.number,received:s.parsedType}),x}let i;const a=new Qe;for(const s of this._def.checks)s.kind==="int"?z.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),w(i,{code:P.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),w(i,{code:P.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),w(i,{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?HI(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),w(i,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),w(i,{code:P.not_finite,message:s.message}),a.dirty()):z.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,V.toString(t))}gt(e,t){return this.setLimit("min",e,!1,V.toString(t))}lte(e,t){return this.setLimit("max",e,!0,V.toString(t))}lt(e,t){return this.setLimit("max",e,!1,V.toString(t))}setLimit(e,t,i,a){return new Pn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:V.toString(a)}]})}_addCheck(e){return new Pn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:V.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:V.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:V.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:V.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:V.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:V.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:V.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:V.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:V.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"&&z.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)}}Pn.create=n=>new Pn({checks:[],typeName:U.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...J(n)});class Dn extends H{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)!==M.bigint){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.bigint,received:s.parsedType}),x}let i;const a=new Qe;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),w(i,{code:P.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),w(i,{code:P.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),w(i,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):z.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,V.toString(t))}gt(e,t){return this.setLimit("min",e,!1,V.toString(t))}lte(e,t){return this.setLimit("max",e,!0,V.toString(t))}lt(e,t){return this.setLimit("max",e,!1,V.toString(t))}setLimit(e,t,i,a){return new Dn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:V.toString(a)}]})}_addCheck(e){return new Dn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:V.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:V.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:V.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:V.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:V.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}}Dn.create=n=>{var e;return new Dn({checks:[],typeName:U.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...J(n)})};class vi extends H{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==M.boolean){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.boolean,received:i.parsedType}),x}return lt(e.data)}}vi.create=n=>new vi({typeName:U.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...J(n)});class Wn extends H{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==M.date){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_type,expected:M.date,received:s.parsedType}),x}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return w(s,{code:P.invalid_date}),x}const i=new Qe;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),w(a,{code:P.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),w(a,{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):z.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:V.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:V.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}}Wn.create=n=>new Wn({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:U.ZodDate,...J(n)});class Ga extends H{_parse(e){if(this._getType(e)!==M.symbol){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.symbol,received:i.parsedType}),x}return lt(e.data)}}Ga.create=n=>new Ga({typeName:U.ZodSymbol,...J(n)});class Ii extends H{_parse(e){if(this._getType(e)!==M.undefined){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.undefined,received:i.parsedType}),x}return lt(e.data)}}Ii.create=n=>new Ii({typeName:U.ZodUndefined,...J(n)});class Pi extends H{_parse(e){if(this._getType(e)!==M.null){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.null,received:i.parsedType}),x}return lt(e.data)}}Pi.create=n=>new Pi({typeName:U.ZodNull,...J(n)});class Nr extends H{constructor(){super(...arguments),this._any=!0}_parse(e){return lt(e.data)}}Nr.create=n=>new Nr({typeName:U.ZodAny,...J(n)});class Hn extends H{constructor(){super(...arguments),this._unknown=!0}_parse(e){return lt(e.data)}}Hn.create=n=>new Hn({typeName:U.ZodUnknown,...J(n)});class an extends H{_parse(e){const t=this._getOrReturnCtx(e);return w(t,{code:P.invalid_type,expected:M.never,received:t.parsedType}),x}}an.create=n=>new an({typeName:U.ZodNever,...J(n)});class Fa extends H{_parse(e){if(this._getType(e)!==M.undefined){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.void,received:i.parsedType}),x}return lt(e.data)}}Fa.create=n=>new Fa({typeName:U.ZodVoid,...J(n)});class Ft extends H{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),a=this._def;if(t.parsedType!==M.array)return w(t,{code:P.invalid_type,expected:M.array,received:t.parsedType}),x;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(o||d)&&(w(t,{code:o?P.too_big:P.too_small,minimum:d?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&&(w(t,{code:P.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&&(w(t,{code:P.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,d)=>a.type._parseAsync(new kt(t,o,t.path,d)))).then(o=>Qe.mergeArray(i,o));const s=[...t.data].map((o,d)=>a.type._parseSync(new kt(t,o,t.path,d)));return Qe.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new Ft({...this._def,minLength:{value:e,message:V.toString(t)}})}max(e,t){return new Ft({...this._def,maxLength:{value:e,message:V.toString(t)}})}length(e,t){return new Ft({...this._def,exactLength:{value:e,message:V.toString(t)}})}nonempty(e){return this.min(1,e)}}Ft.create=(n,e)=>new Ft({type:n,minLength:null,maxLength:null,exactLength:null,typeName:U.ZodArray,...J(e)});function $r(n){if(n instanceof Ne){const e={};for(const t in n.shape){const i=n.shape[t];e[t]=Jt.create($r(i))}return new Ne({...n._def,shape:()=>e})}else return n instanceof Ft?new Ft({...n._def,type:$r(n.element)}):n instanceof Jt?Jt.create($r(n.unwrap())):n instanceof Sn?Sn.create($r(n.unwrap())):n instanceof qt?qt.create(n.items.map(e=>$r(e))):n}class Ne extends H{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=z.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==M.object){const h=this._getOrReturnCtx(e);return w(h,{code:P.invalid_type,expected:M.object,received:h.parsedType}),x}const{status:i,ctx:a}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),d=[];if(!(this._def.catchall instanceof an&&this._def.unknownKeys==="strip"))for(const h in a.data)o.includes(h)||d.push(h);const p=[];for(const h of o){const T=s[h],f=a.data[h];p.push({key:{status:"valid",value:h},value:T._parse(new kt(a,f,a.path,h)),alwaysSet:h in a.data})}if(this._def.catchall instanceof an){const h=this._def.unknownKeys;if(h==="passthrough")for(const T of d)p.push({key:{status:"valid",value:T},value:{status:"valid",value:a.data[T]}});else if(h==="strict")d.length>0&&(w(a,{code:P.unrecognized_keys,keys:d}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const T of d){const f=a.data[T];p.push({key:{status:"valid",value:T},value:h._parse(new kt(a,f,a.path,T)),alwaysSet:T in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const h=[];for(const T of p){const f=await T.key,b=await T.value;h.push({key:f,value:b,alwaysSet:T.alwaysSet})}return h}).then(h=>Qe.mergeObjectSync(i,h)):Qe.mergeObjectSync(i,p)}get shape(){return this._def.shape()}strict(e){return V.errToObj,new Ne({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var a,s,o,d;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:(d=V.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new Ne({...this._def,unknownKeys:"strip"})}passthrough(){return new Ne({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ne({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ne({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:U.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Ne({...this._def,catchall:e})}pick(e){const t={};return z.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])}),new Ne({...this._def,shape:()=>t})}omit(e){const t={};return z.objectKeys(this.shape).forEach(i=>{e[i]||(t[i]=this.shape[i])}),new Ne({...this._def,shape:()=>t})}deepPartial(){return $r(this)}partial(e){const t={};return z.objectKeys(this.shape).forEach(i=>{const a=this.shape[i];e&&!e[i]?t[i]=a:t[i]=a.optional()}),new Ne({...this._def,shape:()=>t})}required(e){const t={};return z.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Jt;)s=s._def.innerType;t[i]=s}}),new Ne({...this._def,shape:()=>t})}keyof(){return bm(z.objectKeys(this.shape))}}Ne.create=(n,e)=>new Ne({shape:()=>n,unknownKeys:"strip",catchall:an.create(),typeName:U.ZodObject,...J(e)}),Ne.strictCreate=(n,e)=>new Ne({shape:()=>n,unknownKeys:"strict",catchall:an.create(),typeName:U.ZodObject,...J(e)}),Ne.lazycreate=(n,e)=>new Ne({shape:n,unknownKeys:"strip",catchall:an.create(),typeName:U.ZodObject,...J(e)});class Di extends H{_parse(e){const{ctx:t}=this._processInputParams(e),i=this._def.options;function a(s){for(const d of s)if(d.result.status==="valid")return d.result;for(const d of s)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const o=s.map(d=>new mt(d.ctx.common.issues));return w(t,{code:P.invalid_union,unionErrors:o}),x}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 h={...t,common:{...t.common,issues:[]},parent:null},T=p._parseSync({data:t.data,path:t.path,parent:h});if(T.status==="valid")return T;T.status==="dirty"&&!s&&(s={result:T,ctx:h}),h.common.issues.length&&o.push(h.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;const d=o.map(p=>new mt(p));return w(t,{code:P.invalid_union,unionErrors:d}),x}}get options(){return this._def.options}}Di.create=(n,e)=>new Di({options:n,typeName:U.ZodUnion,...J(e)});const sn=n=>n instanceof Oi?sn(n.schema):n instanceof Ut?sn(n.innerType()):n instanceof Ci?[n.value]:n instanceof An?n.options:n instanceof Bi?z.objectValues(n.enum):n instanceof wi?sn(n._def.innerType):n instanceof Ii?[void 0]:n instanceof Pi?[null]:n instanceof Jt?[void 0,...sn(n.unwrap())]:n instanceof Sn?[null,...sn(n.unwrap())]:n instanceof rl||n instanceof Ni?sn(n.unwrap()):n instanceof _i?sn(n._def.innerType):[];class Ua extends H{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.object)return w(t,{code:P.invalid_type,expected:M.object,received:t.parsedType}),x;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}):(w(t,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),x)}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=sn(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 d of o){if(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,s)}}return new Ua({typeName:U.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...J(i)})}}function nl(n,e){const t=In(n),i=In(e);if(n===e)return{valid:!0,data:n};if(t===M.object&&i===M.object){const a=z.objectKeys(e),s=z.objectKeys(n).filter(d=>a.indexOf(d)!==-1),o={...n,...e};for(const d of s){const p=nl(n[d],e[d]);if(!p.valid)return{valid:!1};o[d]=p.data}return{valid:!0,data:o}}else if(t===M.array&&i===M.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<n.length;s++){const o=n[s],d=e[s],p=nl(o,d);if(!p.valid)return{valid:!1};a.push(p.data)}return{valid:!0,data:a}}else return t===M.date&&i===M.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class Ai extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),a=(s,o)=>{if(Ko(s)||Ko(o))return x;const d=nl(s.value,o.value);return d.valid?((el(s)||el(o))&&t.dirty(),{status:t.value,value:d.data}):(w(i,{code:P.invalid_intersection_types}),x)};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}))}}Ai.create=(n,e,t)=>new Ai({left:n,right:e,typeName:U.ZodIntersection,...J(t)});class qt extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==M.array)return w(i,{code:P.invalid_type,expected:M.array,received:i.parsedType}),x;if(i.data.length<this._def.items.length)return w(i,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&i.data.length>this._def.items.length&&(w(i,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...i.data].map((o,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new kt(i,o,i.path,d)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>Qe.mergeArray(t,o)):Qe.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new qt({...this._def,rest:e})}}qt.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qt({items:n,typeName:U.ZodTuple,rest:null,...J(e)})};class Si extends H{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!==M.object)return w(i,{code:P.invalid_type,expected:M.object,received:i.parsedType}),x;const a=[],s=this._def.keyType,o=this._def.valueType;for(const d in i.data)a.push({key:s._parse(new kt(i,d,i.path,d)),value:o._parse(new kt(i,i.data[d],i.path,d)),alwaysSet:d in i.data});return i.common.async?Qe.mergeObjectAsync(t,a):Qe.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof H?new Si({keyType:e,valueType:t,typeName:U.ZodRecord,...J(i)}):new Si({keyType:Gt.create(),valueType:e,typeName:U.ZodRecord,...J(t)})}}class xa extends H{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!==M.map)return w(i,{code:P.invalid_type,expected:M.map,received:i.parsedType}),x;const a=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([d,p],h)=>({key:a._parse(new kt(i,d,i.path,[h,"key"])),value:s._parse(new kt(i,p,i.path,[h,"value"]))}));if(i.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of o){const h=await p.key,T=await p.value;if(h.status==="aborted"||T.status==="aborted")return x;(h.status==="dirty"||T.status==="dirty")&&t.dirty(),d.set(h.value,T.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const p of o){const h=p.key,T=p.value;if(h.status==="aborted"||T.status==="aborted")return x;(h.status==="dirty"||T.status==="dirty")&&t.dirty(),d.set(h.value,T.value)}return{status:t.value,value:d}}}}xa.create=(n,e,t)=>new xa({valueType:e,keyType:n,typeName:U.ZodMap,...J(t)});class Yn extends H{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==M.set)return w(i,{code:P.invalid_type,expected:M.set,received:i.parsedType}),x;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(w(i,{code:P.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&&(w(i,{code:P.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 h=new Set;for(const T of p){if(T.status==="aborted")return x;T.status==="dirty"&&t.dirty(),h.add(T.value)}return{status:t.value,value:h}}const d=[...i.data.values()].map((p,h)=>s._parse(new kt(i,p,i.path,h)));return i.common.async?Promise.all(d).then(p=>o(p)):o(d)}min(e,t){return new Yn({...this._def,minSize:{value:e,message:V.toString(t)}})}max(e,t){return new Yn({...this._def,maxSize:{value:e,message:V.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Yn.create=(n,e)=>new Yn({valueType:n,minSize:null,maxSize:null,typeName:U.ZodSet,...J(e)});class Vr extends H{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.function)return w(t,{code:P.invalid_type,expected:M.function,received:t.parsedType}),x;function i(d,p){return Va({data:d,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,$a(),_r].filter(h=>!!h),issueData:{code:P.invalid_arguments,argumentsError:p}})}function a(d,p){return Va({data:d,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,$a(),_r].filter(h=>!!h),issueData:{code:P.invalid_return_type,returnTypeError:p}})}const s={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Lr){const d=this;return lt(async function(...p){const h=new mt([]),T=await d._def.args.parseAsync(p,s).catch(I=>{throw h.addIssue(i(p,I)),h}),f=await Reflect.apply(o,this,T);return await d._def.returns._def.type.parseAsync(f,s).catch(I=>{throw h.addIssue(a(f,I)),h})})}else{const d=this;return lt(function(...p){const h=d._def.args.safeParse(p,s);if(!h.success)throw new mt([i(p,h.error)]);const T=Reflect.apply(o,this,h.data),f=d._def.returns.safeParse(T,s);if(!f.success)throw new mt([a(T,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Vr({...this._def,args:qt.create(e).rest(Hn.create())})}returns(e){return new Vr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new Vr({args:e||qt.create([]).rest(Hn.create()),returns:t||Hn.create(),typeName:U.ZodFunction,...J(i)})}}class Oi extends H{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})}}Oi.create=(n,e)=>new Oi({getter:n,typeName:U.ZodLazy,...J(e)});class Ci extends H{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:P.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ci.create=(n,e)=>new Ci({value:n,typeName:U.ZodLiteral,...J(e)});function bm(n,e){return new An({values:n,typeName:U.ZodEnum,...J(e)})}class An extends H{constructor(){super(...arguments),bi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),i=this._def.values;return w(t,{expected:z.joinValues(i),received:t.parsedType,code:P.invalid_type}),x}if(La(this,bi,"f")||fm(this,bi,new Set(this._def.values),"f"),!La(this,bi,"f").has(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return w(t,{received:t.data,code:P.invalid_enum_value,options:i}),x}return lt(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 An.create(e,{...this._def,...t})}exclude(e,t=this._def){return An.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}}bi=new WeakMap,An.create=bm;class Bi extends H{constructor(){super(...arguments),gi.set(this,void 0)}_parse(e){const t=z.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==M.string&&i.parsedType!==M.number){const a=z.objectValues(t);return w(i,{expected:z.joinValues(a),received:i.parsedType,code:P.invalid_type}),x}if(La(this,gi,"f")||fm(this,gi,new Set(z.getValidEnumValues(this._def.values)),"f"),!La(this,gi,"f").has(e.data)){const a=z.objectValues(t);return w(i,{received:i.data,code:P.invalid_enum_value,options:a}),x}return lt(e.data)}get enum(){return this._def.values}}gi=new WeakMap,Bi.create=(n,e)=>new Bi({values:n,typeName:U.ZodNativeEnum,...J(e)});class Lr extends H{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==M.promise&&t.common.async===!1)return w(t,{code:P.invalid_type,expected:M.promise,received:t.parsedType}),x;const i=t.parsedType===M.promise?t.data:Promise.resolve(t.data);return lt(i.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Lr.create=(n,e)=>new Lr({type:n,typeName:U.ZodPromise,...J(e)});class Ut extends H{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U.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=>{w(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 d=>{if(t.value==="aborted")return x;const p=await this._def.schema._parseAsync({data:d,path:i.path,parent:i});return p.status==="aborted"?x:p.status==="dirty"||t.value==="dirty"?Mr(p.value):p});{if(t.value==="aborted")return x;const d=this._def.schema._parseSync({data:o,path:i.path,parent:i});return d.status==="aborted"?x:d.status==="dirty"||t.value==="dirty"?Mr(d.value):d}}if(a.type==="refinement"){const o=d=>{const p=a.refinement(d,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 d};if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return d.status==="aborted"?x:(d.status==="dirty"&&t.dirty(),o(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>d.status==="aborted"?x:(d.status==="dirty"&&t.dirty(),o(d.value).then(()=>({status:t.value,value:d.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(!Ei(o))return o;const d=a.transform(o.value,s);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>Ei(o)?Promise.resolve(a.transform(o.value,s)).then(d=>({status:t.value,value:d})):o);z.assertNever(a)}}Ut.create=(n,e,t)=>new Ut({schema:n,typeName:U.ZodEffects,effect:e,...J(t)}),Ut.createWithPreprocess=(n,e,t)=>new Ut({schema:e,effect:{type:"preprocess",transform:n},typeName:U.ZodEffects,...J(t)});class Jt extends H{_parse(e){return this._getType(e)===M.undefined?lt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Jt.create=(n,e)=>new Jt({innerType:n,typeName:U.ZodOptional,...J(e)});class Sn extends H{_parse(e){return this._getType(e)===M.null?lt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Sn.create=(n,e)=>new Sn({innerType:n,typeName:U.ZodNullable,...J(e)});class wi extends H{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===M.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}wi.create=(n,e)=>new wi({innerType:n,typeName:U.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...J(e)});class _i extends H{_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 Ri(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}_i.create=(n,e)=>new _i({innerType:n,typeName:U.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...J(e)});class ja extends H{_parse(e){if(this._getType(e)!==M.nan){const i=this._getOrReturnCtx(e);return w(i,{code:P.invalid_type,expected:M.nan,received:i.parsedType}),x}return{status:"valid",value:e.data}}}ja.create=n=>new ja({typeName:U.ZodNaN,...J(n)});const YI=Symbol("zod_brand");class rl extends H{_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 Mi extends H{_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"?x:s.status==="dirty"?(t.dirty(),Mr(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"?x: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 Mi({in:e,out:t,typeName:U.ZodPipeline})}}class Ni extends H{_parse(e){const t=this._def.innerType._parse(e),i=a=>(Ei(a)&&(a.value=Object.freeze(a.value)),a);return Ri(t)?t.then(a=>i(a)):i(t)}unwrap(){return this._def.innerType}}Ni.create=(n,e)=>new Ni({innerType:n,typeName:U.ZodReadonly,...J(e)});function gm(n,e={},t){return n?Nr.create().superRefine((i,a)=>{var s,o;if(!n(i)){const d=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,p=(o=(s=d.fatal)!==null&&s!==void 0?s:t)!==null&&o!==void 0?o:!0,h=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...h,fatal:p})}}):Nr.create()}const zI={object:Ne.lazycreate};var U;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(U||(U={}));const ZI=(n,e={message:`Input not instance of ${n.name}`})=>gm(t=>t instanceof n,e),ka=Gt.create,il=Pn.create,XI=ja.create,QI=Dn.create,al=vi.create,vm=Wn.create,KI=Ga.create,eP=Ii.create,Im=Pi.create,tP=Nr.create,qa=Hn.create,nP=an.create,rP=Fa.create,iP=Ft.create,Pm=Ne.create,aP=Ne.strictCreate,sP=Di.create,oP=Ua.create,lP=Ai.create,cP=qt.create,Dm=Si.create,dP=xa.create,uP=Yn.create,pP=Vr.create,yP=Oi.create,hP=Ci.create,Am=An.create,fP=Bi.create,mP=Lr.create,Sm=Ut.create,TP=Jt.create,EP=Sn.create,RP=Ut.createWithPreprocess,bP=Mi.create;var c=Object.freeze({__proto__:null,defaultErrorMap:_r,setErrorMap:wI,getErrorMap:$a,makeIssue:Va,EMPTY_PATH:_I,addIssueToContext:w,ParseStatus:Qe,INVALID:x,DIRTY:Mr,OK:lt,isAborted:Ko,isDirty:el,isValid:Ei,isAsync:Ri,get util(){return z},get objectUtil(){return Qo},ZodParsedType:M,getParsedType:In,ZodType:H,datetimeRegex:Rm,ZodString:Gt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:vi,ZodDate:Wn,ZodSymbol:Ga,ZodUndefined:Ii,ZodNull:Pi,ZodAny:Nr,ZodUnknown:Hn,ZodNever:an,ZodVoid:Fa,ZodArray:Ft,ZodObject:Ne,ZodUnion:Di,ZodDiscriminatedUnion:Ua,ZodIntersection:Ai,ZodTuple:qt,ZodRecord:Si,ZodMap:xa,ZodSet:Yn,ZodFunction:Vr,ZodLazy:Oi,ZodLiteral:Ci,ZodEnum:An,ZodNativeEnum:Bi,ZodPromise:Lr,ZodEffects:Ut,ZodTransformer:Ut,ZodOptional:Jt,ZodNullable:Sn,ZodDefault:wi,ZodCatch:_i,ZodNaN:ja,BRAND:YI,ZodBranded:rl,ZodPipeline:Mi,ZodReadonly:Ni,custom:gm,Schema:H,ZodSchema:H,late:zI,get ZodFirstPartyTypeKind(){return U},coerce:{string:n=>Gt.create({...n,coerce:!0}),number:n=>Pn.create({...n,coerce:!0}),boolean:n=>vi.create({...n,coerce:!0}),bigint:n=>Dn.create({...n,coerce:!0}),date:n=>Wn.create({...n,coerce:!0})},any:tP,array:iP,bigint:QI,boolean:al,date:vm,discriminatedUnion:oP,effect:Sm,enum:Am,function:pP,instanceof:ZI,intersection:lP,lazy:yP,literal:hP,map:dP,nan:XI,nativeEnum:fP,never:nP,null:Im,nullable:EP,number:il,object:Pm,oboolean:()=>al().optional(),onumber:()=>il().optional(),optional:TP,ostring:()=>ka().optional(),pipeline:bP,preprocess:RP,promise:mP,record:Dm,set:uP,strictObject:aP,string:ka,symbol:KI,transformer:Sm,tuple:cP,undefined:eP,union:sP,unknown:qa,void:rP,NEVER:x,ZodIssueCode:P,quotelessJson:BI,ZodError:mt});function Om(n){var a,s,o;if(!(n!=null&&n.dataType))return qa();const e=n.dataType.isNullable||!1,t=n.dataType.isList||!1;let i=qa();if(((a=n.dataType.entity)==null?void 0:a.type)===r.PrimitiveEntity)switch(n.dataType.entity.name){case v.String:i=ka();break;case v.JSON:i=Dm(qa());break;case v.Number:i=il();break;case v.Boolean:i=al();break;case v.Date:i=vm();break;case v.Enum:{const d=n.dataType.options||[];if(d.length===0)throw new Error(`Enum property ${n.name} has no options`);i=Am(d);break}case v.Null:i=Im();break;case v.UUID:i=ka().uuid();break}else if(((s=n.dataType.entity)==null?void 0:s.type)===r.CustomEntity)i=Cm(n.dataType.entity);else throw new Error(`Unsupported data type validation: ${(o=n.dataType.entity)==null?void 0:o.type}`);return e&&(i=i.nullable()),t&&(i=i.array()),i}function Cm(n){const e=Pm({});for(const t of n.properties){const i=Om(t);e.shape[t.name]=i}return e}function Bm(n){const e=n.rangeStart;return new Date(e.getTime()+Math.random()*(Date.now()-e.getTime()))}function wm(n){const e=n.rangeEnd;return new Date(Math.random()*e.getTime())}function _m(n){const e=n.rangeStart,t=n.rangeEnd;return new Date(e.getTime()+Math.random()*(t.getTime()-e.getTime()))}function Mm(n){return n.rangeStart&&n.rangeEnd?_m(n):n.rangeStart?Bm(n):n.rangeEnd?wm(n):new Date}function gP(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Nm={},Ja={},Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.default=IP;let Ha;const vP=new Uint8Array(16);function IP(){if(!Ha&&(Ha=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ha))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ha(vP)}var On={},zn={},Ya={};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.default=void 0;var PP=/^(?:[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;Ya.default=PP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.default=void 0;var DP=AP(Ya);function AP(n){return n&&n.__esModule?n:{default:n}}function SP(n){return typeof n=="string"&&DP.default.test(n)}var OP=SP;zn.default=OP,Object.defineProperty(On,"__esModule",{value:!0}),On.default=void 0,On.unsafeStringify=$m;var CP=BP(zn);function BP(n){return n&&n.__esModule?n:{default:n}}const ze=[];for(let n=0;n<256;++n)ze.push((n+256).toString(16).slice(1));function $m(n,e=0){return ze[n[e+0]]+ze[n[e+1]]+ze[n[e+2]]+ze[n[e+3]]+"-"+ze[n[e+4]]+ze[n[e+5]]+"-"+ze[n[e+6]]+ze[n[e+7]]+"-"+ze[n[e+8]]+ze[n[e+9]]+"-"+ze[n[e+10]]+ze[n[e+11]]+ze[n[e+12]]+ze[n[e+13]]+ze[n[e+14]]+ze[n[e+15]]}function wP(n,e=0){const t=$m(n,e);if(!(0,CP.default)(t))throw TypeError("Stringified UUID is invalid");return t}var _P=wP;On.default=_P,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.default=void 0;var MP=$P(Wa),NP=On;function $P(n){return n&&n.__esModule?n:{default:n}}let Vm,sl,ol=0,ll=0;function VP(n,e,t){let i=e&&t||0;const a=e||new Array(16);n=n||{};let s=n.node||Vm,o=n.clockseq!==void 0?n.clockseq:sl;if(s==null||o==null){const b=n.random||(n.rng||MP.default)();s==null&&(s=Vm=[b[0]|1,b[1],b[2],b[3],b[4],b[5]]),o==null&&(o=sl=(b[6]<<8|b[7])&16383)}let d=n.msecs!==void 0?n.msecs:Date.now(),p=n.nsecs!==void 0?n.nsecs:ll+1;const h=d-ol+(p-ll)/1e4;if(h<0&&n.clockseq===void 0&&(o=o+1&16383),(h<0||d>ol)&&n.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ol=d,ll=p,sl=o,d+=122192928e5;const T=((d&268435455)*1e4+p)%4294967296;a[i++]=T>>>24&255,a[i++]=T>>>16&255,a[i++]=T>>>8&255,a[i++]=T&255;const f=d/4294967296*1e4&268435455;a[i++]=f>>>8&255,a[i++]=f&255,a[i++]=f>>>24&15|16,a[i++]=f>>>16&255,a[i++]=o>>>8|128,a[i++]=o&255;for(let b=0;b<6;++b)a[i+b]=s[b];return e||(0,NP.unsafeStringify)(a)}var LP=VP;Ja.default=LP;var za={},Cn={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.default=void 0;var GP=FP(zn);function FP(n){return n&&n.__esModule?n:{default:n}}function UP(n){if(!(0,GP.default)(n))throw TypeError("Invalid UUID");let e;const t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.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 xP=UP;$i.default=xP,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.URL=Cn.DNS=void 0,Cn.default=WP;var jP=On,kP=qP($i);function qP(n){return n&&n.__esModule?n:{default:n}}function JP(n){n=unescape(encodeURIComponent(n));const e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}const Lm="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Cn.DNS=Lm;const Gm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Cn.URL=Gm;function WP(n,e,t){function i(a,s,o,d){var p;if(typeof a=="string"&&(a=JP(a)),typeof s=="string"&&(s=(0,kP.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 h=new Uint8Array(16+a.length);if(h.set(s),h.set(a,s.length),h=t(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,o){d=d||0;for(let T=0;T<16;++T)o[d+T]=h[T];return o}return(0,jP.unsafeStringify)(h)}try{i.name=n}catch{}return i.DNS=Lm,i.URL=Gm,i}var Za={};Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=void 0;function HP(n){if(typeof n=="string"){const e=unescape(encodeURIComponent(n));n=new Uint8Array(e.length);for(let t=0;t<e.length;++t)n[t]=e.charCodeAt(t)}return YP(zP(ZP(n),n.length*8))}function YP(n){const e=[],t=n.length*32,i="0123456789abcdef";for(let a=0;a<t;a+=8){const s=n[a>>5]>>>a%32&255,o=parseInt(i.charAt(s>>>4&15)+i.charAt(s&15),16);e.push(o)}return e}function Fm(n){return(n+64>>>9<<4)+14+1}function zP(n,e){n[e>>5]|=128<<e%32,n[Fm(e)-1]=e;let t=1732584193,i=-271733879,a=-1732584194,s=271733878;for(let o=0;o<n.length;o+=16){const d=t,p=i,h=a,T=s;t=Ke(t,i,a,s,n[o],7,-680876936),s=Ke(s,t,i,a,n[o+1],12,-389564586),a=Ke(a,s,t,i,n[o+2],17,606105819),i=Ke(i,a,s,t,n[o+3],22,-1044525330),t=Ke(t,i,a,s,n[o+4],7,-176418897),s=Ke(s,t,i,a,n[o+5],12,1200080426),a=Ke(a,s,t,i,n[o+6],17,-1473231341),i=Ke(i,a,s,t,n[o+7],22,-45705983),t=Ke(t,i,a,s,n[o+8],7,1770035416),s=Ke(s,t,i,a,n[o+9],12,-1958414417),a=Ke(a,s,t,i,n[o+10],17,-42063),i=Ke(i,a,s,t,n[o+11],22,-1990404162),t=Ke(t,i,a,s,n[o+12],7,1804603682),s=Ke(s,t,i,a,n[o+13],12,-40341101),a=Ke(a,s,t,i,n[o+14],17,-1502002290),i=Ke(i,a,s,t,n[o+15],22,1236535329),t=et(t,i,a,s,n[o+1],5,-165796510),s=et(s,t,i,a,n[o+6],9,-1069501632),a=et(a,s,t,i,n[o+11],14,643717713),i=et(i,a,s,t,n[o],20,-373897302),t=et(t,i,a,s,n[o+5],5,-701558691),s=et(s,t,i,a,n[o+10],9,38016083),a=et(a,s,t,i,n[o+15],14,-660478335),i=et(i,a,s,t,n[o+4],20,-405537848),t=et(t,i,a,s,n[o+9],5,568446438),s=et(s,t,i,a,n[o+14],9,-1019803690),a=et(a,s,t,i,n[o+3],14,-187363961),i=et(i,a,s,t,n[o+8],20,1163531501),t=et(t,i,a,s,n[o+13],5,-1444681467),s=et(s,t,i,a,n[o+2],9,-51403784),a=et(a,s,t,i,n[o+7],14,1735328473),i=et(i,a,s,t,n[o+12],20,-1926607734),t=tt(t,i,a,s,n[o+5],4,-378558),s=tt(s,t,i,a,n[o+8],11,-2022574463),a=tt(a,s,t,i,n[o+11],16,1839030562),i=tt(i,a,s,t,n[o+14],23,-35309556),t=tt(t,i,a,s,n[o+1],4,-1530992060),s=tt(s,t,i,a,n[o+4],11,1272893353),a=tt(a,s,t,i,n[o+7],16,-155497632),i=tt(i,a,s,t,n[o+10],23,-1094730640),t=tt(t,i,a,s,n[o+13],4,681279174),s=tt(s,t,i,a,n[o],11,-358537222),a=tt(a,s,t,i,n[o+3],16,-722521979),i=tt(i,a,s,t,n[o+6],23,76029189),t=tt(t,i,a,s,n[o+9],4,-640364487),s=tt(s,t,i,a,n[o+12],11,-421815835),a=tt(a,s,t,i,n[o+15],16,530742520),i=tt(i,a,s,t,n[o+2],23,-995338651),t=nt(t,i,a,s,n[o],6,-198630844),s=nt(s,t,i,a,n[o+7],10,1126891415),a=nt(a,s,t,i,n[o+14],15,-1416354905),i=nt(i,a,s,t,n[o+5],21,-57434055),t=nt(t,i,a,s,n[o+12],6,1700485571),s=nt(s,t,i,a,n[o+3],10,-1894986606),a=nt(a,s,t,i,n[o+10],15,-1051523),i=nt(i,a,s,t,n[o+1],21,-2054922799),t=nt(t,i,a,s,n[o+8],6,1873313359),s=nt(s,t,i,a,n[o+15],10,-30611744),a=nt(a,s,t,i,n[o+6],15,-1560198380),i=nt(i,a,s,t,n[o+13],21,1309151649),t=nt(t,i,a,s,n[o+4],6,-145523070),s=nt(s,t,i,a,n[o+11],10,-1120210379),a=nt(a,s,t,i,n[o+2],15,718787259),i=nt(i,a,s,t,n[o+9],21,-343485551),t=Bn(t,d),i=Bn(i,p),a=Bn(a,h),s=Bn(s,T)}return[t,i,a,s]}function ZP(n){if(n.length===0)return[];const e=n.length*8,t=new Uint32Array(Fm(e));for(let i=0;i<e;i+=8)t[i>>5]|=(n[i/8]&255)<<i%32;return t}function Bn(n,e){const t=(n&65535)+(e&65535);return(n>>16)+(e>>16)+(t>>16)<<16|t&65535}function XP(n,e){return n<<e|n>>>32-e}function Xa(n,e,t,i,a,s){return Bn(XP(Bn(Bn(e,n),Bn(i,s)),a),t)}function Ke(n,e,t,i,a,s,o){return Xa(e&t|~e&i,n,e,a,s,o)}function et(n,e,t,i,a,s,o){return Xa(e&i|t&~i,n,e,a,s,o)}function tt(n,e,t,i,a,s,o){return Xa(e^t^i,n,e,a,s,o)}function nt(n,e,t,i,a,s,o){return Xa(t^(e|~i),n,e,a,s,o)}var QP=HP;Za.default=QP,Object.defineProperty(za,"__esModule",{value:!0}),za.default=void 0;var KP=Um(Cn),eD=Um(Za);function Um(n){return n&&n.__esModule?n:{default:n}}var tD=(0,KP.default)("v3",48,eD.default);za.default=tD;var Qa={},Ka={};Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.default=void 0;var nD={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};Ka.default=nD,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.default=void 0;var xm=jm(Ka),rD=jm(Wa),iD=On;function jm(n){return n&&n.__esModule?n:{default:n}}function aD(n,e,t){if(xm.default.randomUUID&&!e&&!n)return xm.default.randomUUID();n=n||{};const i=n.random||(n.rng||rD.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,iD.unsafeStringify)(i)}var sD=aD;Qa.default=sD;var es={},ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;function oD(n,e,t,i){switch(n){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 cl(n,e){return n<<e|n>>>32-e}function lD(n){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof n=="string"){const o=unescape(encodeURIComponent(n));n=[];for(let d=0;d<o.length;++d)n.push(o.charCodeAt(d))}else Array.isArray(n)||(n=Array.prototype.slice.call(n));n.push(128);const i=n.length/4+2,a=Math.ceil(i/16),s=new Array(a);for(let o=0;o<a;++o){const d=new Uint32Array(16);for(let p=0;p<16;++p)d[p]=n[o*64+p*4]<<24|n[o*64+p*4+1]<<16|n[o*64+p*4+2]<<8|n[o*64+p*4+3];s[o]=d}s[a-1][14]=(n.length-1)*8/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=(n.length-1)*8&4294967295;for(let o=0;o<a;++o){const d=new Uint32Array(80);for(let I=0;I<16;++I)d[I]=s[o][I];for(let I=16;I<80;++I)d[I]=cl(d[I-3]^d[I-8]^d[I-14]^d[I-16],1);let p=t[0],h=t[1],T=t[2],f=t[3],b=t[4];for(let I=0;I<80;++I){const B=Math.floor(I/20),G=cl(p,5)+oD(B,h,T,f)+b+e[B]+d[I]>>>0;b=f,f=T,T=cl(h,30)>>>0,h=p,p=G}t[0]=t[0]+p>>>0,t[1]=t[1]+h>>>0,t[2]=t[2]+T>>>0,t[3]=t[3]+f>>>0,t[4]=t[4]+b>>>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 cD=lD;ts.default=cD,Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var dD=km(Cn),uD=km(ts);function km(n){return n&&n.__esModule?n:{default:n}}var pD=(0,dD.default)("v5",80,uD.default);es.default=pD;var ns={};Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var yD="00000000-0000-0000-0000-000000000000";ns.default=yD;var rs={};Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var hD=fD(zn);function fD(n){return n&&n.__esModule?n:{default:n}}function mD(n){if(!(0,hD.default)(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}var TD=mD;rs.default=TD,function(n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return o.default}});var e=T(Ja),t=T(za),i=T(Qa),a=T(es),s=T(ns),o=T(rs),d=T(zn),p=T(On),h=T($i);function T(f){return f&&f.__esModule?f:{default:f}}}(Nm);function dl(n,e){if(!n||!e||!n.length||!e.length)throw new Error("Bad alphabet");this.srcAlphabet=n,this.dstAlphabet=e}dl.prototype.convert=function(n){var e,t,i,a={},s=this.srcAlphabet.length,o=this.dstAlphabet.length,d=n.length,p=typeof n=="string"?"":[];if(!this.isValid(n))throw new Error('Number "'+n+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return n;for(e=0;e<d;e++)a[e]=this.srcAlphabet.indexOf(n[e]);do{for(t=0,i=0,e=0;e<d;e++)t=t*s+a[e],t>=o?(a[i++]=parseInt(t/o,10),t=t%o):i>0&&(a[i++]=0);d=i,p=this.dstAlphabet.slice(t,t+1).concat(p)}while(i!==0);return p},dl.prototype.isValid=function(n){for(var e=0;e<n.length;++e)if(this.srcAlphabet.indexOf(n[e])===-1)return!1;return!0};var ED=dl,RD=ED;function Vi(n,e){var t=new RD(n,e);return function(i){return t.convert(i)}}Vi.BIN="01",Vi.OCT="01234567",Vi.DEC="0123456789",Vi.HEX="0123456789abcdef";var bD=Vi;const{v4:ul,validate:gD}=Nm,is=bD,pl={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},vD={consistentLength:!0};let yl;const qm=(n,e,t)=>{const i=e(n.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?i:i.padStart(t.shortIdLength,t.paddingChar)},Jm=(n,e)=>{const i=e(n).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("-")},ID=n=>Math.ceil(Math.log(2**128)/Math.log(n));var PD=(()=>{const n=(e,t)=>{const i=e||pl.flickrBase58,a={...vD,...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=ID(i.length),o={shortIdLength:s,consistentLength:a.consistentLength,paddingChar:i[0]},d=is(is.HEX,i),p=is(i,is.HEX),h=()=>qm(ul(),d,o),f={alphabet:i,fromUUID:b=>qm(b,d,o),maxLength:s,generate:h,new:h,toUUID:b=>Jm(b,p),uuid:ul,validate:(b,I=!1)=>{if(!b||typeof b!="string")return!1;const B=a.consistentLength?b.length===s:b.length<=s,G=b.split("").every(q=>i.includes(q));return I===!1?B&&G:B&&G&&gD(Jm(b,p))}};return Object.freeze(f),f};return n.constants=pl,n.uuid=ul,n.generate=()=>(yl||(yl=n(pl.flickrBase58).generate),yl()),n})();const as=gP(PD);function Wm(){return as().uuid()}function Hm(n){return n.rangeStart+Math.random()}function Ym(n){const e=n.rangeEnd;return Math.random()*e}function zm(n){const e=n.rangeStart,t=n.rangeEnd;return Math.random()*(t-e)+e}function Zm(n){return n.rangeStart&&n.rangeEnd?zm(n):n.rangeStart?Hm(n):n.rangeEnd?Ym(n):Math.random()}function Xm(n){const e=n.rangeStart;return Math.random().toString(36).substring(e)}function Qm(n){const e=n.rangeEnd;return Math.random().toString(36).substring(0,e)}function Km(n){const e=n.rangeStart,t=n.rangeEnd;return Math.random().toString(36).substring(e,t)}function eT(n){return n.rangeStart&&n.rangeEnd?Km(n):n.rangeStart?Xm(n):n.rangeEnd?Qm(n):Math.random().toString(36)}function tT(n){return Math.random()>=.5}function DD(n){if(!n||!n.autogeneration)return null;switch(n.autogeneration.type){case Ue.CurrentDateAndTime:if(n.name===v.Date)return new Date;case Ue.Random:{if(n.name===v.Date)return Mm(n.autogeneration);if(n.name===v.Number)return Zm(n.autogeneration);if(n.name===v.String)return eT(n.autogeneration);if(n.name===v.Boolean)return tT(n.autogeneration)}case Ue.Unique:if(n.name===v.UUID)return Wm();default:throw new Error(`Generating a ${n.autogeneration.type} value for a ${n.name} is not supported`)}}const W="e7eb5382-3d99-44fd-972a-b8b1e819f6be",hl="global-user-variable-id",nT="last-executed-timestamp-variable-id",AD={id:"alternative-relational-database-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-data-type-id",entityType:r.DataType},SD={id:"alternative-relational-database-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-identifier-property-id",entityType:r.Property},OD={id:"alternative-relational-database-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"alternative-relational-database-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:null,parent:AD,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:SD},ss={id:"alternative-relational-database-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},CD={hidden:!1,required:!0,id:"alternative-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!1,implements:Ba,static:!0,index:0,dataType:OD,description:"The name of the main database inside of the server instance where the data will be stored.",parent:ss};r.GenericReference,r.DataType;const BD={id:"alternative-relational-database-entity-username-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-username-property-id",entityType:r.Property},wD={id:"alternative-relational-database-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:BD},_D={hidden:!1,required:!0,id:"alternative-relational-database-entity-username-property-id",name:"Username",version:1,type:r.Property,private:!1,abstract:!1,implements:wa,static:!0,index:1,dataType:wD,description:"The username that will be used to connect to the database.",parent:ss};r.GenericReference,r.DataType;const MD={id:"alternative-relational-database-entity-password-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-password-property-id",entityType:r.Property},ND={id:"alternative-relational-database-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:MD},$D={hidden:!1,required:!0,id:"alternative-relational-database-entity-password-property-id",name:"Password",version:1,type:r.Property,private:!1,abstract:!1,implements:_a,static:!0,index:2,dataType:ND,description:"The password that will be used to connect to the database.",parent:ss},VD={id:"alternative-relational-database-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-data-type-id",entityType:r.DataType},LD={id:"alternative-relational-database-entity-min-size-property-ref-id",type:r.GenericReference,entityId:"alternative-relational-database-entity-min-size-property-id",entityType:r.Property},GD={id:"alternative-relational-database-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"alternative-relational-database-entity-min-size-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:VD,autogeneration:null,valueAsType:null},parent:LD},FD={hidden:!1,required:!0,id:"alternative-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!1,implements:Ma,static:!0,index:3,dataType:GD,description:"The minimum size of the database in GB.",parent:ss},UD={id:"alternative-relational-database-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},rT={id:"alternative-relational-database-entity-id",type:r.CustomEntity,version:1,name:"Alternative relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[CD,_D,$D,FD],methods:[],abstractMethods:[],extends:[],implements:[vn],x:0,y:0,parent:UD},xD={id:"animal-prototype-database-property-ref-id",type:r.GenericReference,entityId:"animal-prototype-database-property-id",entityType:r.Property},jD={id:"animal-prototype-database-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"animal-prototype-database-property-data-type-default-value-id",entityType:r.DataType},kD={id:"animal-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"animal-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:rT,autogeneration:null,parent:jD},parent:xD},qD={id:"animal-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},JD={hidden:!1,required:!0,id:"animal-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ti,static:!0,index:0,dataType:kD,description:"The database that the entity belongs to.",parent:qD},WD={type:r.GenericReference,id:"291e4d4f-01d8-40a0-90dc-5f1ac6636e9b",entityType:r.Property,entityId:"5cb617b0-92be-4dbe-a007-49093368d94f"},HD={id:"c1930577-9e79-48a6-8905-be24611015c1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:WD},YD={type:r.GenericReference,id:"e2b9e456-f2b3-4dc7-85a2-fbb68ed0c9c7",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},zD={hidden:!1,required:!0,type:r.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:HD,abstract:!1,parent:YD},ZD={type:r.GenericReference,id:"abc565de-4c83-4936-bc48-4013bef213b8",entityType:r.Project,entityId:W},XD={type:r.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:[JD,zD],methods:[],extends:[],implements:[_e],x:0,y:0,parent:ZD},QD={id:"default-relational-database-entity-identifier-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-identifier-property-data-type-id",entityType:r.DataType},KD={id:"default-relational-database-entity-identifier-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-identifier-property-id",entityType:r.Property},eA={id:"default-relational-database-entity-identifier-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-identifier-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"main",parent:QD,autogeneration:{type:Ue.Unique,rangeStart:null,rangeEnd:null},valueAsType:null},parent:KD},Gr={id:"default-relational-database-entity-ref-id",type:r.GenericReference,entityId:_.PERSISTED_ENTITY,entityType:r.BuiltInBaseEntity},tA={hidden:!1,required:!0,id:"default-relational-database-entity-identifier-property-id",name:"Identifier name",version:1,type:r.Property,private:!1,abstract:!1,implements:Ba,static:!0,index:0,dataType:eA,description:"The name of the main database inside of the server instance where the data will be stored.",parent:Gr};r.GenericReference,r.DataType;const nA={id:"default-relational-database-entity-username-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-username-property-id",entityType:r.Property},rA={id:"default-relational-database-entity-username-property-default-value-parent-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-username-property-data-type-id",entityType:r.DataType},iA={id:"default-relational-database-entity-username-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-username-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"root",parent:rA,autogeneration:null,valueAsType:null},parent:nA},aA={hidden:!1,required:!0,id:"default-relational-database-entity-username-property-id",name:"Username",version:1,type:r.Property,private:!1,abstract:!1,implements:wa,static:!0,index:1,dataType:iA,description:"The username that will be used to connect to the database.",parent:Gr};r.GenericReference,r.DataType;const sA={id:"default-relational-database-entity-password-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-password-property-id",entityType:r.Property},oA={id:"default-relational-database-entity-password-property-default-value-parent-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-password-property-data-type-id",entityType:r.DataType},lA={id:"default-relational-database-entity-password-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"default-relational-database-entity-password-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"password",parent:oA,autogeneration:null,valueAsType:null},parent:sA},cA={hidden:!1,required:!0,id:"default-relational-database-entity-password-property-id",name:"Password",version:1,type:r.Property,private:!1,abstract:!1,implements:_a,static:!0,index:2,dataType:lA,description:"The password that will be used to connect to the database.",parent:Gr},dA={id:"default-relational-database-entity-min-size-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-min-size-property-data-type-id",entityType:r.DataType},uA={id:"default-relational-database-entity-min-size-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-min-size-property-id",entityType:r.Property},pA={id:"default-relational-database-entity-min-size-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-min-size-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:6,parent:dA,autogeneration:null,valueAsType:null},parent:uA},yA={hidden:!1,required:!0,id:"default-relational-database-entity-min-size-property-id",name:"Minimum GB size",version:1,type:r.Property,private:!1,abstract:!1,implements:Ma,static:!0,index:3,dataType:pA,description:"The minimum size of the database in GB.",parent:Gr},hA={id:"default-relational-database-entity-default-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-default-property-data-type-id",entityType:r.DataType},fA={id:"default-relational-database-entity-default-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-default-property-id",entityType:r.Property},mA={id:"default-relational-database-entity-default-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-default-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!0,parent:hA,autogeneration:null,valueAsType:null},parent:fA},TA={hidden:!0,required:!0,id:"default-relational-database-entity-default-property-id",name:"Default",version:1,type:r.Property,private:!1,abstract:!1,implements:ko,static:!0,index:4,dataType:mA,description:"Whether this database is automatically picked by other entities as the default database.",parent:Gr},EA={id:"default-relational-database-entity-autoscaling-property-data-type-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-data-type-id",entityType:r.DataType},RA={id:"default-relational-database-entity-autoscaling-property-ref-id",type:r.GenericReference,entityId:"default-relational-database-entity-autoscaling-property-id",entityType:r.Property},bA={id:"default-relational-database-entity-autoscaling-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:De,asType:!1,defaultValue:{id:"default-relational-database-entity-autoscaling-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.Boolean,value:!0,parent:EA,autogeneration:null,valueAsType:null},parent:RA},gA={hidden:!1,required:!0,id:"default-relational-database-entity-autoscaling-property-id",name:"Auto-scaling",version:1,type:r.Property,private:!1,abstract:!1,implements:qo,static:!0,index:5,dataType:bA,description:"If true, this database will automatically scale up or down in memory size, based on the usage.s",parent:Gr},vA={id:"default-relational-database-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},fl={id:"default-relational-database-entity-id",type:r.CustomEntity,version:1,name:"Relational Database",description:"A database that permanently stores the persisted entities attached to it.",abstract:!1,static:!0,properties:[TA,gA,tA,aA,cA,yA],methods:[],abstractMethods:[],extends:[],implements:[vn],x:0,y:0,parent:vA},IA={id:"user-prototype-database-property-data-type-ref-id",type:r.GenericReference,entityId:"user-prototype-database-property-data-type-id",entityType:r.DataType},PA={id:"user-prototype-database-property-ref-id",type:r.GenericReference,entityId:"user-prototype-database-property-id",entityType:r.Property},DA={id:"user-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"user-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:fl,autogeneration:null,parent:IA},parent:PA},AA={id:"user-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},SA={hidden:!1,required:!0,id:"user-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ti,static:!0,index:0,dataType:DA,description:"The database that the entity belongs to.",parent:AA},OA={type:r.GenericReference,id:"user-prototype-parent-ref-id",entityType:r.Project,entityId:W},ml={type:r.CustomEntity,id:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",version:1,name:"User",description:"A user of the application",implements:[_e],abstract:!1,static:!1,abstractMethods:[],extends:[],properties:[SA],methods:[],x:0,y:0,parent:OA},CA={type:r.GenericReference,id:"person-date-of-birth-property-data-type-parent-ref-id",entityType:r.Property,entityId:"person-date-of-birth-property-id"},BA={id:"person-date-of-birth-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:CA},wA={type:r.GenericReference,id:"person-date-of-birth-property-parent-ref-id",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},_A={hidden:!1,required:!0,type:r.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:BA,abstract:!1,parent:wA},MA={type:r.GenericReference,id:"a2867827-2f8e-4c25-b18b-d91857d7f24e",entityType:r.Property,entityId:"cacfec92-46c3-4fca-a1d9-fd1ba94d78c7"},NA={id:"1d49f41b-17b9-4f48-87aa-3ce43498e5a9",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:MA},$A={type:r.GenericReference,id:"01cbe760-40a9-4f49-8e3d-194d2f57cb1e",entityType:r.CustomEntity,entityId:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},VA={hidden:!1,required:!0,type:r.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:NA,abstract:!1,parent:$A},LA={type:r.GenericReference,id:"3542b22a-3a2f-41c6-876e-24c885572498",entityType:r.Project,entityId:W},ct={type:r.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:[VA,_A],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ml],x:0,y:0,parent:LA},GA={type:r.GenericReference,id:"b59c80b7-b2e9-41e9-abcd-7c5652835efc",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},FA={type:r.GenericReference,id:"1190b5a2-f25e-46db-884d-8a3dd1a44d94",entityType:r.ReturnStatement,entityId:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e"},UA={type:r.GenericReference,id:"36c63126-7814-496f-a6cc-48662c2aabae",entityType:r.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},xA={type:r.GenericReference,id:"c567e55d-ec12-4e4e-958e-f07522892b4b",entityType:r.ReturnDeclaration,entityId:"9e070523-7e07-4100-8637-960a187f5f14"},jA={id:"3973c5a1-f0d8-49a0-a9a9-a0009bf3f0d8",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xA},Tl={isError:!1,id:"9e070523-7e07-4100-8637-960a187f5f14",type:r.ReturnDeclaration,version:1,name:"Output Account Owner",description:null,dataType:jA,readsValue:UA,required:!0,index:0,parent:FA},kA={type:r.GenericReference,id:"567d923c-20da-4c1e-956d-962ea30c6d0b",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},qA={type:r.GenericReference,id:"da85e620-59f3-42ab-88c8-b38d33c2c833",entityType:r.FunctionDeclaration,entityId:"36f29f96-c001-4b9a-b49c-83eff406a060"},iT={type:r.ReturnStatement,id:"3ebc4342-c9e8-42e7-a61c-7937081e1d2e",version:1,outputs:[Tl],calledByError:[],calledByEntry:[kA],calledBySuccess:[],throws:null,x:0,y:0,parent:qA},JA={type:r.GenericReference,id:"1c806bb7-4c25-4bad-963b-93dfbb7c8304",entityType:r.ArgumentDeclaration,entityId:"500dee3a-3435-4453-9699-0d053f646523"},WA={id:"d90fcc18-642b-433c-8fcb-4094b9031cd5",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:JA},aT={id:"500dee3a-3435-4453-9699-0d053f646523",type:r.ArgumentDeclaration,version:1,name:"New Account Owner",description:null,dataType:WA,required:!0,writesValues:[Tl],index:0,parent:GA},HA={type:r.GenericReference,id:"83dceb60-f3c4-4085-824c-85f2003bfd27",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},sT={type:r.FunctionDeclaration,id:"36f29f96-c001-4b9a-b49c-83eff406a060",version:1,name:"Change owner of bank account",description:null,implements:null,inputs:[aT],calls:[iT],returnStatements:[iT],index:0,collapsed:!1,private:!1,x:0,y:0,parent:HA},YA={type:r.GenericReference,id:"adbaf302-ffa9-49b6-a3c6-83f9a75068e3",entityType:r.VariableDeclaration,entityId:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b"},zA={id:"79ee04aa-1ba4-4ae9-a406-ed45e5b03f7f",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:YA},ZA={type:r.GenericReference,id:"55e212d1-f0ec-4bb6-acbe-60f741367daf",entityType:r.OutputMap,entityId:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4"},XA={type:r.GenericReference,id:"944e1171-3d9b-4559-9386-1d4974b15962",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},QA={id:"8e36a476-766e-4cc2-a8a7-27a07dfb5a4b",type:r.VariableDeclaration,version:1,name:"Output Account Owner",description:null,dataType:zA,readsValue:ZA,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:XA},KA={type:r.GenericReference,id:"b89ebc83-52cf-4447-a5ae-62241f713079",entityType:r.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},eS={id:"dc9ddb8f-02a0-4a43-aea6-270ec7b7f8a4",type:r.OutputMap,version:1,declaration:Tl,writesValues:[QA],index:0,parent:KA},tS={type:r.GenericReference,id:"c1b9e125-1aad-48b7-9687-95c57a6bc10d",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},nS={type:r.GenericReference,id:"d2deaa02-e164-4425-905c-6dee47eb4eac",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},rS={type:r.GenericReference,id:"1109a655-ac62-4110-a933-42a72106f4f0",entityType:r.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},iS={id:"7d9a1307-512e-42ec-9797-2f7229796b97",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:rS},aS={type:r.GenericReference,id:"bb61ebf7-57b3-4d14-905d-82ec907205b5",entityType:r.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},sS={type:r.GenericReference,id:"6b8c7bf2-9fc8-4ea4-9ec0-f41679d513b1",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},oS={type:r.GenericReference,id:"6163d1a1-7a94-49b1-95bb-aecd8d6d335c",entityType:r.FunctionCall,entityId:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e"},lS={type:r.GenericReference,id:"1f900f62-4bd2-4246-94aa-b8f5aad384fd",entityType:r.VariableDeclaration,entityId:"8bea6986-8da2-487b-905d-2fb962db6728"},oT={id:"be8538be-e6f9-4b94-9314-a546003ebaa0",type:r.InputMap,version:1,declaration:aT,name:null,description:null,readsValue:lS,dynamicArguments:[],defaultValue:null,index:0,parent:oS},cS={type:r.VariableDeclaration,id:"8bea6986-8da2-487b-905d-2fb962db6728",version:1,name:"Changed Account Owner",description:null,dataType:iS,readsValue:aS,writesValues:[oT],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:sS},dS={type:r.FunctionCall,id:"78f6dba8-bed8-44cd-8b0f-6dcc787d1e1e",version:1,declaration:sT,inputs:[oT],outputs:[eS],process:null,successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[tS],calledBySuccess:[],parent:nS,error:null,x:0,y:0},uS={type:r.GenericReference,id:"2d47aba1-a918-46a7-8db7-78809928654a",entityType:r.ArgumentDeclaration,entityId:"38f6b236-98ac-47b0-ab9c-d2f9610137b9"},pS={id:"5583766c-e9a5-484c-8f43-f4b0a6a1876c",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:uS},yS={type:r.GenericReference,id:"3e2a81e4-55b2-49f5-94eb-39135e95c3d7",entityType:r.FunctionDeclaration,entityId:"15ee556d-681f-47de-a31f-16d4ba73cc4e"},hS={id:"38f6b236-98ac-47b0-ab9c-d2f9610137b9",type:r.ArgumentDeclaration,version:1,description:null,name:"New Company Owner",dataType:pS,required:!0,index:0,writesValues:[cS],parent:yS},fS={type:r.GenericReference,id:"30291b01-1b94-4d03-b434-dec122c2bc7d",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},mS={type:r.FunctionDeclaration,id:"15ee556d-681f-47de-a31f-16d4ba73cc4e",version:1,description:null,name:"Change Account Owner",inputs:[hS],collapsed:!0,returnStatements:[],calls:[dS],private:!1,index:0,implements:null,x:0,y:0,parent:fS},TS={type:r.GenericReference,id:"72c7ac0a-886e-4e10-b7ed-2f5a819a0233",entityType:r.Property,entityId:"b8f4656a-2b77-43ab-af51-7c32ddede044"},ES={id:"c09dd282-73f6-4077-a467-b66db20b9fc6",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:TS},RS={type:r.GenericReference,id:"8a950024-512c-4580-81db-a705410aeb99",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},lT={hidden:!1,required:!0,type:r.Property,id:"b8f4656a-2b77-43ab-af51-7c32ddede044",version:1,name:"Account number",description:null,private:!0,implements:null,static:!1,index:0,dataType:ES,abstract:!1,parent:RS},bS={type:r.GenericReference,id:"b6704b6c-c3bd-49d0-8ebc-82d03e726cbb",entityType:r.Property,entityId:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea"},gS={id:"c03e0b0a-88ab-401a-8833-4806738bdc37",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:bS},vS={type:r.GenericReference,id:"1ef999a7-e9ed-406a-866e-e58277fc985b",entityType:r.CustomEntity,entityId:"506946aa-30da-48e6-918f-ffd9eac58813"},cT={hidden:!1,required:!0,type:r.Property,id:"733d06a6-b8c5-44f3-a1f7-a8c9bd9e44ea",version:1,description:null,name:"Account Owner",index:1,dataType:gS,implements:null,static:!1,private:!0,abstract:!1,parent:vS},IS={type:r.GenericReference,id:"d41d7f41-98b8-4f67-be92-c349fdda5156",entityType:r.Project,entityId:W},Fr={type:r.CustomEntity,id:"506946aa-30da-48e6-918f-ffd9eac58813",version:1,name:"Bank Account",description:null,abstract:!1,static:!1,abstractMethods:[],properties:[lT,cT],methods:[sT,mS],extends:[],implements:[_e],x:0,y:0,parent:IS},Li="bitcoin-api-response-id",dT="time-property-id",uT="disclamer-property-id",pT="chart-name-property-id",yT="bpi-property-id",os="bpi-entity-id",hT="usd-property-id",fT="gbp-property-id",mT="eur-property-id",Ur="currency-entity-id",TT="currency-code-property-id",ET="currency-symbol-property-id",RT="currency-rate-property-id",bT="currency-description-property-id",gT="currency-rate-number-property-id",PS={type:r.GenericReference,id:"code-property-data-type-parent-ref-id",entityType:r.Property,entityId:TT},DS={id:"code-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["USD","GBP","EUR"],constant:!1,parent:PS},AS={type:r.GenericReference,id:"code-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},SS={hidden:!1,required:!0,type:r.Property,id:TT,version:1,name:"code",description:null,dataType:DS,index:0,implements:null,static:!1,private:!1,abstract:!1,parent:AS},OS={type:r.GenericReference,id:"symbol-property-data-type-parent-ref-id",entityType:r.Property,entityId:ET},CS={id:"symbol-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,options:["$","£","€"],constant:!1,parent:OS},BS={type:r.GenericReference,id:"symbol-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},wS={hidden:!1,required:!0,type:r.Property,id:ET,version:1,name:"symbol",description:null,index:0,dataType:CS,implements:null,static:!1,private:!1,abstract:!1,parent:BS},_S={type:r.GenericReference,id:"rate-property-data-type-parent-ref-id",entityType:r.Property,entityId:RT},MS={id:"rate-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:_S},NS={type:r.GenericReference,id:"rate-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},$S={hidden:!1,required:!0,type:r.Property,id:RT,version:1,name:"rate",description:null,index:0,dataType:MS,implements:null,static:!1,private:!1,abstract:!1,parent:NS},VS={type:r.GenericReference,id:"description-property-data-type-parent-ref-id",entityType:r.Property,entityId:bT},LS={id:"description-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:VS},GS={type:r.GenericReference,id:"description-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},FS={hidden:!1,required:!0,type:r.Property,id:bT,version:1,name:"description",description:null,dataType:LS,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:GS},US={type:r.GenericReference,id:"rate-number-property-data-type-parent-ref-id",entityType:r.Property,entityId:gT},xS={id:"rate-number-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:US},jS={type:r.GenericReference,id:"rate-number-property-parent-ref-id",entityType:r.CustomEntity,entityId:Ur},kS={hidden:!1,required:!0,type:r.Property,id:gT,version:1,name:"rate_float",description:null,dataType:xS,implements:null,static:!1,index:0,private:!1,abstract:!1,parent:jS},qS={type:r.GenericReference,id:"currency-prototype-parent-ref-id",entityType:r.Project,entityId:W},ls={type:r.CustomEntity,id:Ur,version:1,name:"Currency",description:"This entity describes a currency in the Bitcoin Price Index.",properties:[SS,wS,$S,FS,kS],static:!1,abstract:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:qS},JS={type:r.GenericReference,id:"usd-property-data-type-parent-ref-id",entityType:r.Property,entityId:hT},WS={id:"usd-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ls,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:JS},HS={type:r.GenericReference,id:"usd-property-parent-ref-id",entityType:r.CustomEntity,entityId:os},YS={hidden:!1,required:!0,id:hT,type:r.Property,version:1,name:"USD",description:null,index:0,dataType:WS,implements:null,static:!1,private:!1,abstract:!1,parent:HS},zS={type:r.GenericReference,id:"gbp-property-data-type-parent-ref-id",entityType:r.Property,entityId:fT},ZS={id:"gbp-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ls,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:zS},XS={type:r.GenericReference,id:"gbp-property-parent-ref-id",entityType:r.CustomEntity,entityId:os},QS={hidden:!1,required:!0,id:fT,type:r.Property,version:1,name:"GBP",description:null,index:0,dataType:ZS,implements:null,static:!1,private:!1,abstract:!1,parent:XS},KS={type:r.GenericReference,id:"eur-property-data-type-parent-ref-id",entityType:r.Property,entityId:mT},eO={id:"eur-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ls,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:KS},tO={type:r.GenericReference,id:"eur-property-parent-ref-id",entityType:r.CustomEntity,entityId:os},nO={hidden:!1,required:!0,id:mT,type:r.Property,version:1,name:"EUR",description:null,implements:null,static:!1,index:0,dataType:eO,private:!1,abstract:!1,parent:tO},rO={type:r.GenericReference,id:"bpi-prototype-parent-ref-id",entityType:r.Project,entityId:W},vT={type:r.CustomEntity,id:os,version:1,name:"BPI",description:"The Bitcoin Price Index",properties:[YS,QS,nO],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:rO},iO={type:r.GenericReference,id:"time-property-data-type-parent-ref-id",entityType:r.Property,entityId:dT},aO={id:"time-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:go,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:iO},sO={type:r.GenericReference,id:"time-property-parent-ref-id",entityType:r.CustomEntity,entityId:Li},oO={hidden:!1,required:!0,type:r.Property,id:dT,version:1,name:"time",description:null,index:0,dataType:aO,implements:null,static:!1,private:!1,abstract:!1,parent:sO},lO={type:r.GenericReference,id:"disclamer-property-data-type-parent-ref-id",entityType:r.Property,entityId:uT},cO={id:"disclamer-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:lO},dO={type:r.GenericReference,id:"disclamer-property-parent-ref-id",entityType:r.CustomEntity,entityId:Li},uO={hidden:!1,required:!0,type:r.Property,id:uT,version:1,name:"disclamer",description:null,index:0,dataType:cO,implements:null,static:!1,private:!1,abstract:!1,parent:dO},pO={type:r.GenericReference,id:"chart-name-property-data-type-parent-ref-id",entityType:r.Property,entityId:pT},yO={id:"chart-name-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pO},hO={type:r.GenericReference,id:"chart-name-property-parent-ref-id",entityType:r.CustomEntity,entityId:Li},fO={hidden:!1,required:!0,type:r.Property,id:pT,version:1,name:"chartName",description:null,index:0,dataType:yO,implements:null,static:!1,private:!1,abstract:!1,parent:hO},mO={type:r.GenericReference,id:"bpi-property-data-type-parent-ref-id",entityType:r.Property,entityId:yT},TO={id:"bpi-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:vT,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:mO},EO={type:r.GenericReference,id:"bpi-property-parent-ref-id",entityType:r.CustomEntity,entityId:Li},RO={hidden:!1,required:!0,type:r.Property,id:yT,version:1,name:"bpi",description:null,implements:null,index:0,dataType:TO,static:!1,private:!1,abstract:!1,parent:EO},bO={type:r.GenericReference,id:"bitcoin-api-response-parent-ref-id",entityType:r.Project,entityId:W},IT={type:r.CustomEntity,id:Li,version:1,name:"Bitcoin API Response type",description:"The type of the data structure response from the Bitcoin API call",properties:[oO,uO,fO,RO],abstract:!1,static:!1,abstractMethods:[],methods:[],extends:[],implements:[],x:0,y:0,parent:bO},gO={type:r.GenericReference,id:"eefa0147-f873-484b-b4f3-9e6493aab183",entityType:r.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},vO={id:"b9f35112-dcb2-4b7c-8fb9-f196b3fa37f9",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:gO},IO={type:r.GenericReference,id:"128770d6-5e3a-4aff-bca0-ad1f32ebefa8",entityType:r.ReturnStatement,entityId:"e4e05975-c277-471a-b869-f0aed316045c"},PO={type:r.GenericReference,id:"0be84bf9-6421-42b9-980f-6a03f30cb809",entityType:r.ReturnDeclaration,entityId:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},DO={id:"43daa02a-237b-4b7c-a6e9-2b8c167f6e22",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:PO},AO={type:r.GenericReference,id:"ad380383-4a47-43da-968e-75a2d603b230",entityType:r.ArgumentDeclaration,entityId:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},PT={isError:!1,id:"a1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.ReturnDeclaration,version:1,name:"New Company Owner",description:"The new owner of the company",dataType:DO,readsValue:AO,required:!0,index:0,parent:IO},SO={type:r.GenericReference,id:"4f24dc27-59a1-49bf-abcc-7d72b00926e4",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},OO={id:"f2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",type:r.ArgumentDeclaration,version:1,name:"New Company Owner",description:null,dataType:vO,writesValues:[PT],required:!0,index:0,parent:SO},CO={type:r.GenericReference,id:"5c9a02f0-d2cf-4efc-828e-467f33a74dd3",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},BO={type:r.GenericReference,id:"2ff8f3da-e0c5-4f0f-b688-2c051c588786",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},wO={type:r.GenericReference,id:"195ae28c-159b-42de-80b1-2ebb8be3619f",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},DT={type:r.ReturnStatement,id:"e4e05975-c277-471a-b869-f0aed316045c",version:1,outputs:[PT],calledByError:[],calledByEntry:[BO],calledBySuccess:[],throws:null,x:0,y:0,parent:wO},_O={type:r.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:[OO],calls:[DT],index:0,collapsed:!1,implements:null,returnStatements:[DT],private:!1,x:0,y:0,parent:CO},MO={type:r.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},NO={type:r.GenericReference,id:"29c4e3e0-1b66-4075-b559-45b27c5cf356",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},$O={type:r.GenericReference,id:"b1289358-b185-455d-8f58-7791b15cd52a",entityType:r.ReturnStatement,entityId:"9690cd1d-ea35-4e83-823d-0c7310265fee"},VO={type:r.GenericReference,id:"d847bb49-8789-4550-bb2d-e2d551993b28",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},LO={type:r.GenericReference,id:"06535500-c37c-4915-8398-1d4e184fa5e7",entityType:r.ReturnDeclaration,entityId:"e7a35277-a0c4-46d5-aca2-bddd0c26e931"},GO={id:"d358dd91-35f7-4095-b728-3fb3c71dbc05",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:LO},El={isError:!1,id:"e7a35277-a0c4-46d5-aca2-bddd0c26e931",type:r.ReturnDeclaration,version:1,name:"Is name registered",description:"Whether the company name is already registered",dataType:GO,readsValue:VO,required:!0,index:0,parent:$O},FO={type:r.GenericReference,id:"gov-company-registry-return-statement-called-by-success-ref-id",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},Rl={type:r.ReturnStatement,id:"9690cd1d-ea35-4e83-823d-0c7310265fee",version:1,outputs:[El],calledByError:[],calledByEntry:[],calledBySuccess:[MO,FO],throws:null,x:0,y:0,parent:NO},UO={type:r.GenericReference,id:"b3126414-4c9b-495f-901e-59f5073c8d67",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},xO={type:r.GenericReference,id:"35115c48-618b-411b-a290-d746d22fdd10",entityType:r.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},AT={id:"a0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:r.InputMap,version:1,declaration:Vo,name:null,description:null,dynamicArguments:[],readsValue:xO,defaultValue:null,parent:UO,index:2},jO={type:r.GenericReference,id:"14f46eae-04a5-47d1-9c7f-28fb09b84d1d",entityType:r.VariableDeclaration,entityId:"e5a8b6d0-0e6f-4e9a-9b1e-8a2b5c7f0d5a"},kO={id:"990bd5d1-07ea-4253-acc1-d03bedd22a38",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:jO},qO={type:r.GenericReference,id:"e4c3542a-8fb0-4b72-8d6e-3fdff812dd67",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},JO={type:r.GenericReference,id:"825f9f60-22a8-4cc6-9055-d7333f8e92f4",entityType:r.OutputMap,entityId:"8f30d787-9459-4d8d-98a2-b46fbc2006d5"},WO={type:r.GenericReference,id:"is-company-name-registered-var-called-by-ref",entityType:r.Operation,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},ST={type:r.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:kO,readsValue:JO,writesValues:[El],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[WO],successCalls:[Rl],errorCalls:[],internalCalls:[],x:0,y:0,parent:qO},HO={type:r.GenericReference,id:"1aba021e-48ef-44ac-93d0-eaecac5895da",entityType:r.InputMap,entityId:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a"},YO={type:r.GenericReference,id:"dffae7e0-0a5c-4c14-8ed2-8d680b4c4c86",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},zO={type:r.InputMap,id:"c3c8d6c1-3e0d-4e6c-9f9c-6b8c7d7f8e9a",version:1,declaration:Ia,name:null,description:null,readsValue:null,defaultValue:{id:"gov-http-request-url-argument-default-value-id",type:r.PrimitiveValue,version:1,value:"https://api.publicapis.org/entries",name:v.String,valueAsType:null,parent:HO,autogeneration:null},index:1,dynamicArguments:[],parent:YO},ZO={type:r.GenericReference,id:"64ae61f5-ace7-401b-926d-25f852daa60e",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},XO={id:"8f30d787-9459-4d8d-98a2-b46fbc2006d5",type:r.OutputMap,version:1,declaration:hi,index:2,writesValues:[ST],parent:ZO},QO={type:r.GenericReference,id:"62a1a086-caea-4270-9c9f-a1695503e745",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},KO={id:"48cf7654-8f3e-4fcd-abc6-740876c310a0",type:r.InputMap,version:1,declaration:va,name:null,description:null,dynamicArguments:[],readsValue:null,index:0,defaultValue:null,parent:QO},eC={type:r.GenericReference,id:"b0c9c79f-f525-428d-99e7-087d3237ad62",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},tC={id:"2c1dc406-4b71-4023-87b2-abede3a111d2",type:r.InputMap,version:1,name:null,description:null,declaration:Pa,dynamicArguments:[],index:3,readsValue:null,defaultValue:null,parent:eC},nC={type:r.GenericReference,id:"9887d6c9-d75b-4c97-b722-e2e60945ea20",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},rC={id:"3fef94b2-0278-43ae-b0c5-bc7083f0a111",type:r.InputMap,version:1,declaration:Da,name:null,description:null,dynamicArguments:[],readsValue:null,index:4,defaultValue:null,parent:nC},iC={type:r.GenericReference,id:"561275b6-5056-45d8-bf7d-8abaa4645593",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},aC={id:"3efe20a7-4d63-411e-89ef-63e277f48d66",type:r.OutputMap,version:1,declaration:Aa,index:1,writesValues:[],parent:iC},sC={type:r.GenericReference,id:"3170ccc2-13de-4bfc-802a-a643be41cd42",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},oC={id:"40d34323-d7e6-440a-8016-67c05a3b66dd",type:r.OutputMap,version:1,declaration:hi,index:0,writesValues:[],parent:sC},lC={type:r.GenericReference,id:"7432fa82-f574-4c54-a8fa-4cc4376da3d5",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},cC={type:r.GenericReference,id:"8f518502-9eea-462c-8753-8bc3bf3e29a9",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},dC={type:r.GenericReference,id:"123b8f18-79d9-4166-a5f6-78ec4b461680",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},uC={type:r.GenericReference,id:"e691026f-6db0-43ec-93cd-805ae7d713e3",entityType:r.FunctionCall,entityId:"abb5d456-ee85-4800-bdd9-d409415f60d7"},pC={type:r.GenericReference,id:"a375eedf-4811-41aa-a998-4897c69c46b9",entityType:r.ReturnDeclaration,entityId:"024a9b77-c1cd-4b67-b3ba-1935046b590d"},yC={id:"767cc5ed-20ec-4fd1-89b1-c8d19daa87d1",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Xe,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pC},hC={type:r.GenericReference,id:"e64b0c23-129d-4d74-8ab4-eec60e1e5b9b",entityType:r.ReturnStatement,entityId:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3"},OT={isError:!0,id:"024a9b77-c1cd-4b67-b3ba-1935046b590d",type:r.ReturnDeclaration,version:1,name:"Error",description:"The error that occurred during the HTTP request to the government company registry",dataType:yC,required:!0,readsValue:null,index:0,parent:hC},fC={type:r.ReturnStatement,id:"ea444a9e-6a5b-4138-b81f-0d5618c3c6f3",version:1,outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[uC],throws:OT,x:0,y:0,parent:dC},mC={type:r.GenericReference,id:"323814fb-9723-49ef-bbba-f882384f18e4",entityType:r.FunctionCall,entityId:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7"},TC={id:"2f63f7ba-0ff0-458a-92bc-65d1dd4df8c3",type:r.OutputMap,declaration:Go,version:1,writesValues:[OT],index:0,parent:mC},EC={type:r.Operation,id:"4eb96d0b-025b-4ed1-ae34-0cebbb07f1e7",version:1,declaration:fi,inputs:[KO,zO,AT,tC,rC],outputs:[oC,aC,XO],process:null,calledByError:[],calledByEntry:[lC],calledBySuccess:[],successCalls:[Rl,ST],errorCalls:[fC],error:TC,dynamicArguments:[],x:0,y:0,parent:cC},RC={type:r.GenericReference,id:"597b8aa2-f6f2-4f7d-bbb9-b703d02de96a",entityType:r.InputMap,entityId:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a"},bC={type:r.GenericReference,id:"546d99b3-28c4-4186-93a0-ac53c1565e07",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},gC={id:"b0e7b4e5-2f5f-4d4c-8f5c-1e1f1e1a1b1a",type:r.InputMap,version:1,declaration:Ra,name:null,description:null,readsValue:null,defaultValue:{id:"base-query-string-map-default-value-id",type:r.PrimitiveValue,version:1,value:"?name=",name:v.String,parent:RC,valueAsType:null,autogeneration:null},dynamicArguments:[],index:0,parent:bC},vC={type:r.GenericReference,id:"6a56fb22-82e1-47c9-bf85-41c4e5986c74",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},IC={type:r.GenericReference,id:"191c6a6d-9bcb-441e-bf98-de0da96f5f3a",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},PC={type:r.GenericReference,id:"d8fcbb76-dae2-40cf-847a-02364721b387",entityType:r.VariableDeclaration,entityId:"83e12ebb-c958-4dee-b750-8ab9930f0f4e"},DC={id:"6a70c42b-024a-47c6-8a9d-af52be9c9b9a",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:PC},AC={type:r.GenericReference,id:"2282e2c0-ed9e-4c7b-86fc-1a364fa0fdb8",entityType:r.OutputMap,entityId:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5"},SC={type:r.GenericReference,id:"assembled-query-string-called-by-ref",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},CT={type:r.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:DC,readsValue:AC,writesValues:[AT],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[SC],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:IC},OC={id:"f6c22cf8-63e4-4b2d-b649-b5ab884cf9a5",type:r.OutputMap,version:1,writesValues:[CT],declaration:pi,index:0,parent:vC},CC={type:r.GenericReference,id:"a1b48e7c-0301-4747-b4dd-b5af79956f7f",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},BC={type:r.GenericReference,id:"487c9235-be95-4c96-b9b5-2714b374a277",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},wC={type:r.GenericReference,id:"f6471f4f-b269-46fa-80ec-885e87a449c2",entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69",entityType:r.ArgumentDeclaration},_C={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:"8f2094c0-e27e-465e-9280-112da0de9019"},BT={id:"08f36e2b-bad2-425c-8129-93560bec8488",version:1,type:r.InputMap,declaration:ba,name:null,description:null,readsValue:wC,dynamicArguments:[],defaultValue:null,index:1,parent:_C},MC={type:r.Operation,id:"8f2094c0-e27e-465e-9280-112da0de9019",declaration:yi,version:1,inputs:[gC,BT],outputs:[OC],process:null,calledByError:[],calledByEntry:[CC],calledBySuccess:[],dynamicArguments:[],successCalls:[CT],errorCalls:[],error:null,x:0,y:0,parent:BC},NC={type:r.GenericReference,id:"c2e0e9b4-aa46-4974-bf8a-886b737b12fb",entityType:r.ArgumentDeclaration,entityId:"a4106e8e-ec4f-4633-a636-09ae73135f69"},$C={id:"a4279518-3bf3-44b7-a2ac-65142ca37f1c",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:NC},VC={type:r.GenericReference,id:"dc273f24-164b-4943-82f9-589b237141e2",entityType:r.FunctionDeclaration,entityId:"e0f6e8a7-6e4b-4d0e-8a1a-6b4c1b0b7e9d"},wT={id:"a4106e8e-ec4f-4633-a636-09ae73135f69",type:r.ArgumentDeclaration,version:1,name:"Company Name to check",description:"The name of the company to check in the government registry",dataType:$C,required:!1,writesValues:[BT],index:0,parent:VC},LC={type:r.GenericReference,id:"2178a10c-1cc0-4dad-97c3-0941be6c9738",entityType:r.Project,entityId:W},_T={type:r.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:[wT],calls:[MC,EC],returnStatements:[Rl],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:LC},GC={type:r.GenericReference,id:"4d66c53c-f0f7-496a-9955-1e6c8533c5e0",entityType:r.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},FC={type:r.GenericReference,id:"6fa0c8e0-d104-4b4d-a035-d4f6e0c49f09",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},UC={type:r.GenericReference,id:"146408d5-5336-4877-941a-777dd5871926",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},xC={type:r.GenericReference,id:"34ae8f8c-548d-4654-984a-6f36affdaf49",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},MT={id:"69b1215d-9ebf-4274-b9cb-d4a5888f5122",version:1,type:r.InputMap,declaration:wT,name:null,description:null,readsValue:UC,dynamicArguments:[],defaultValue:null,index:0,parent:xC},jC={type:r.GenericReference,id:"07540a94-dda1-40b3-8452-f209bdc87b88",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},kC={type:r.GenericReference,id:"eaddf12a-a995-429e-90a0-13bf06efeb28",entityType:r.VariableDeclaration,entityId:"faaf3bf6-917d-40d7-aee6-5164f6646c4b"},qC={id:"7fdaf943-3ffb-48e0-b766-b86cc24090cf",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:bn,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:kC},JC={type:r.GenericReference,id:"030fb5c5-af4d-4c85-8cf0-e99edd50d2bd",entityType:r.OutputMap,entityId:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},WC={type:r.GenericReference,id:"a8b618e9-c68c-48c1-8bd6-ef47c87d699e",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},HC={type:r.GenericReference,id:"is-company-name-valid-var-called-by-ref",entityType:r.FunctionCall,entityId:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a"},NT={type:r.VariableDeclaration,id:"faaf3bf6-917d-40d7-aee6-5164f6646c4b",version:1,name:"Is name valid",description:"Whether the company name is valid",dataType:qC,readsValue:JC,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[HC],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:WC},YC={id:"c1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.OutputMap,version:1,declaration:El,writesValues:[NT],index:0,parent:jC},zC={type:r.FunctionCall,id:"d2c2c3b0-5f3c-4d0d-9e4c-2d5a2c1f1e2a",version:1,declaration:_T,inputs:[MT],outputs:[YC],calledByError:[],calledByEntry:[],process:null,calledBySuccess:[GC],successCalls:[NT],errorCalls:[],error:null,x:0,y:0,parent:FC},ZC={type:r.GenericReference,id:"9d0b87b4-bfed-4e02-9e84-6831c21feae2",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},XC={type:r.GenericReference,id:"74345f4f-e80d-48be-adff-d12fcea25bec",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},QC={type:r.GenericReference,id:"b39279ea-969a-4efb-a9ec-353bfd13db65",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},KC={type:r.GenericReference,id:"549db613-f225-4c5b-9634-7d096717f0ff",entityType:r.Condition,entityId:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b"},$T={id:"358e242c-7448-442e-ab8b-fd7fa119ea71",version:1,type:r.InputMap,declaration:Jn.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:QC,defaultValue:null,index:0,parent:KC},eB={type:r.Condition,id:"a8f4b0f2-5e5e-4e8f-9d7b-1b5b9b6e9a4b",version:1,declaration:Jn,inputs:[$T],calledByError:[],calledByEntry:[ZC],calledBySuccess:[],successCalls:[zC],errorCalls:[],x:0,y:0,parent:XC},tB={type:r.GenericReference,id:"43ba1e25-f805-488f-8ae8-c58bb6215b2f",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},nB={type:r.GenericReference,id:"eb091bed-507f-4a1e-93b5-7cd2fccfe002",entityType:r.VariableDeclaration,entityId:"9c928995-0dd5-4f97-9962-56b343bc8a45"},rB={id:"d64152ea-831f-4426-9506-a39bfa170513",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:nB},iB={type:r.GenericReference,id:"7e79c29f-f7bd-441a-a77e-c627604dae94",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},aB={type:r.GenericReference,id:"8995ce5f-d5cf-4341-a8b1-5c046cc78b89",entityType:r.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},sB={type:r.GenericReference,id:"new-company-bank-account-var-decl-1-called-by-ref",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},VT={type:r.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:rB,readsValue:aB,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[sB],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:iB},oB={type:r.GenericReference,id:"9a4887bf-d50d-43e4-bdd5-a5262f65f04b",entityType:r.ArgumentDeclaration,entityId:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071"},lB={id:"ae148c06-3143-49e9-9614-c3aca3f6fa7b",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:oB},cB={id:"7ed0f7bb-2df0-44e2-b0b3-0709dcca8071",type:r.ArgumentDeclaration,version:1,name:"New bank account",description:"The new bank account of the company",dataType:lB,required:!0,index:1,writesValues:[VT],parent:tB},dB={type:r.GenericReference,id:"caec9cf8-3133-48d4-a390-114fa71b2933",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},uB={type:r.GenericReference,id:"cebcbad8-ca87-4c4b-be8a-312293d49892",entityType:r.FunctionDeclaration,entityId:"183fd975-a5d3-4dff-8d6a-c62f5a4d5a84"},pB={type:r.GenericReference,id:"7b8ccfe5-f9cd-4776-a19b-80c689bbe3df",entityType:r.ArgumentDeclaration,entityId:"c6cf620c-1eee-4919-8578-1a0b6c088551"},yB={id:"2a6b4703-ac8d-4d25-8abd-48a115577fec",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:pB},hB={id:"c6cf620c-1eee-4919-8578-1a0b6c088551",type:r.ArgumentDeclaration,version:1,name:"New company name",description:null,dataType:yB,required:!0,index:0,writesValues:[$T,MT],parent:uB},fB={type:r.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:[hB,cB],calls:[eB,VT],index:1,private:!1,implements:null,x:0,y:0,parent:dB},mB={type:r.GenericReference,id:"employee-manager-property-data-type-entity-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},TB={type:r.GenericReference,id:"employee-manager-property-data-type-parent-ref-id",entityType:r.Property,entityId:"employee-manager-property-id"},EB={id:"employee-manager-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:mB,isList:!1,isNullable:!0,asType:!1,defaultValue:null,constant:!1,parent:TB},RB={type:r.GenericReference,id:"employee-manager-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},bB={hidden:!1,required:!0,type:r.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:EB,abstract:!1,parent:RB},gB={type:r.GenericReference,id:"employee-start-date-property-data-type-parent-ref-id",entityType:r.Property,entityId:"employee-start-date-property-id"},vB={id:"employee-start-date-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:nn,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:gB},IB={type:r.GenericReference,id:"employee-start-date-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},PB={hidden:!1,required:!0,type:r.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:vB,abstract:!1,parent:IB},DB={type:r.GenericReference,id:"employee-department-property-ref-id",entityType:r.Property,entityId:"employee-department-property-id"},AB={id:"employee-department-property-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:gn,isList:!1,isNullable:!1,asType:!1,options:["Human Resources","Finance","IT","Sales","Marketing","Customer Service","Logistics","Product"],defaultValue:null,constant:!1,parent:DB},SB={type:r.GenericReference,id:"employee-department-property-parent-ref-id",entityType:r.CustomEntity,entityId:"employee-entity-id"},OB={hidden:!1,required:!0,type:r.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:AB,abstract:!1,parent:SB},CB={type:r.GenericReference,id:"employee-prototype-parent-ref-id",entityType:r.Project,entityId:W},Dt={type:r.CustomEntity,id:"employee-entity-id",version:1,name:"Employee",description:"A entity that represents an employee in the company",properties:[OB,PB,bB],abstract:!1,static:!1,abstractMethods:[],methods:[],implements:[],extends:[ct],x:0,y:0,parent:CB},BB={type:r.GenericReference,id:"dec8fbfe-9124-41fd-9f1c-5b2f07cfd6ba",entityType:r.Property,entityId:"4f52d044-f3dd-4bdf-927e-637c3b92e8bd"},wB={id:"bc0b8979-6c43-4d47-a712-6742b89e3c00",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:BB},_B={type:r.GenericReference,id:"4f8c0a05-466e-4672-b4c4-6bd408c0be9a",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},MB={hidden:!1,required:!0,type:r.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:wB,abstract:!1,parent:_B},NB={type:r.GenericReference,id:"95173fe0-a6e6-443c-94f3-f7c5cf171fcf",entityType:r.Property,entityId:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"},$B={id:"ddbb6f5c-0cf4-41fb-83b3-b6c47c0e338d",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Fr,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:NB},VB={type:r.GenericReference,id:"6a9a0b72-a05d-4169-b3f3-5afb01e8d0df",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},bl={hidden:!1,required:!0,type:r.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:$B,abstract:!1,parent:VB},LB={type:r.GenericReference,id:"62892cc6-d227-4088-90d3-ae7c15ed4af4",entityType:r.Property,entityId:"19a31727-1fba-40a5-be25-18e0f149d5cb"},GB={id:"1f7629df-dc29-4c89-8369-c6d043e97a9e",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:ct,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:LB},FB={type:r.GenericReference,id:"89384206-fd5a-4f0a-849c-f777473e5773",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},UB={hidden:!1,required:!0,type:r.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:GB,private:!0,abstract:!1,parent:FB},xB={type:r.GenericReference,id:"4d2ffb6c-5f38-436e-8339-fb9878ac2b5e",entityType:r.Property,entityId:"f8310850-a87e-405c-b182-4f1d5fa49240"},jB={id:"ad44250b-40c2-48f7-a480-381fa938f562",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:xB},kB={type:r.GenericReference,id:"aa5d4eee-6fac-4e72-bf21-9c8750024541",entityType:r.CustomEntity,entityId:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},qB={hidden:!1,required:!0,type:r.Property,id:"f8310850-a87e-405c-b182-4f1d5fa49240",version:1,name:"Employees",description:null,index:3,dataType:jB,implements:null,private:!0,static:!1,abstract:!1,parent:kB},JB={type:r.GenericReference,id:"e3c03b6b-2ea0-4d99-865d-5e6a348672d0",entityType:r.Project,entityId:W},Tt={type:r.CustomEntity,id:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d",version:1,name:"Company",description:null,properties:[MB,bl,UB,qB],static:!1,abstract:!1,abstractMethods:[],methods:[_O,fB],extends:[],implements:[_e],x:0,y:0,parent:JB},WB={type:r.GenericReference,id:"ffcad334-138d-4b67-8fb3-5f0e6f5fefbd",entityType:r.Project,entityId:W},gl={type:r.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:WB};r.GenericReference,r.DataType;const HB={id:"cron-job-entity-expression-property-ref-id",type:r.GenericReference,entityId:"cron-job-entity-expression-property-id",entityType:r.Property},YB={id:"cron-job-entity-expression-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:null,parent:HB},zB={id:"cron-job-entity-ref-id",type:r.GenericReference,entityId:"cron-job-entity-id",entityType:r.CustomEntity},ZB={hidden:!1,required:!0,id:"cron-job-entity-expression-property-id",type:r.Property,version:1,name:"Cron expression",description:"The cron expression that defines when the cron job should be triggered",dataType:YB,implements:null,static:!0,private:!1,abstract:!1,index:0,parent:zB},XB={id:"cron-job-entity-trigger-show-popup-func-call-called-by-ref-one-id",type:r.GenericReference,entityId:"show-popup-func-decl-id",entityType:r.FunctionDeclaration},QB={id:"cron-job-entity-trigger-show-popup-func-call-parent-ref-id",type:r.GenericReference,entityId:"cron-job-entity-trigger-func-decl-id",entityType:r.FunctionDeclaration},KB={id:"cron-job-entity-trigger-show-popup-func-call-id",version:1,type:r.FunctionCall,declaration:gl,inputs:[],outputs:[],process:null,successCalls:[],calledByError:[],calledByEntry:[XB],calledBySuccess:[],errorCalls:[],error:null,x:0,y:0,parent:QB},ew={id:"cron-job-entity-trigger-func-decl-parent-ref-id",type:r.GenericReference,entityId:"cron-job-entity-id",entityType:r.CustomEntity},tw={id:"cron-job-entity-trigger-func-decl-id",version:1,type:r.FunctionDeclaration,name:"Scheduled trigger",description:"The function that is called when the cron job is triggered",inputs:[],private:!1,implements:Wo,calls:[KB],collapsed:!1,returnStatements:[],index:0,x:0,y:0,parent:ew},nw={id:"cron-job-entity-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},rw={id:"cron-job-entity-id",version:1,type:r.CustomEntity,name:"Run at 12pm on Christmas day",description:"A cron job that runs at 12pm on Christmas day",properties:[ZB],static:!0,abstract:!1,abstractMethods:[],extends:[Ho],implements:[],methods:[tw],x:0,y:0,parent:nw},iw={type:r.GenericReference,id:"52dbd85c-48b1-462a-8205-2437d6fb1cb4",entityType:r.Project,entityId:W},aw={type:r.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:[Ca],x:0,y:0,parent:iw},LT="f558fbf8-67de-4545-9804-6ae621e0b2d4",sw={id:"getCompanyByIdEndpointPathParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointPathParamsVariableDataType"},ow={id:"getCompanyByIdEndpointPathParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointPathParamsArgumentDeclaration"},lw={id:"getCompanyByIdEndpointPathParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:F,asType:!1,defaultValue:{id:"getCompanyByIdEndpointPathParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:sw,autogeneration:null,valueAsType:null},parent:ow},cw={id:"getCompanyByIdEndpointReachedEntityEventRef",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},dw={id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointRequestHeadersVariableDataType"},uw={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration"},pw={id:"getCompanyByIdEndpointRequestHeadersVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointRequestHeadersVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:dw,autogeneration:null,valueAsType:null},parent:uw},yw={id:"getCompanyByIdEndpointRequestHeadersArgumentDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the request.",type:r.ArgumentDeclaration,writesValues:[],name:"Request headers",dataType:pw,required:!0,index:0,parent:cw},hw={id:"getCompanyByIdEndpointReachedEntityEventRefTwo",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},fw={id:"getCompanyByIdEndpointPathParamsArgumentDeclaration",type:r.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:lw,required:!0,index:1,parent:hw},mw={id:"getCompanyByIdEndpointReachedEntityEventRefThree",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},Tw={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointRequestQueryParamsVariableDataType"},Ew={id:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestQueryParamsArgumentDeclaration"},Rw={id:"getCompanyByIdEndpointRequestQueryParamsVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,asType:!1,entity:F,defaultValue:{id:"getCompanyByIdEndpointRequestQueryParamsVariableDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:Tw,autogeneration:null,valueAsType:null},parent:Ew},bw={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:r.ArgumentDeclaration,writesValues:[],name:"Request query params",dataType:Rw,required:!0,index:2,parent:mw},gw={id:"getCompanyByIdEndpointReachedEntityEventRefFour",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},vw={id:"getCompanyByIdEndpointRequestBodyArgumentDeclarationRef",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:"getCompanyByIdEndpointRequestBodyArgumentDeclaration"},Iw={id:"getCompanyByIdEndpointRequestBodyVariableDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:vw},Pw={id:"getCompanyByIdEndpointRequestBodyArgumentDeclaration",version:1,description:"The main data payload of the request.",type:r.ArgumentDeclaration,writesValues:[],name:"Request body",dataType:Iw,index:3,required:!0,parent:gw},Dw={id:"getCompanyByIdEndpointResponseCodeReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseCodeReturnDeclaration"},Aw={id:"9ba575b0-6f8e-436d-a3de-3b843622aa17",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:Dw},Sw={id:"getCompanyByIdEndpointReturnStatementRef",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},Ow={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:r.ReturnDeclaration,name:"Response code",dataType:Aw,readsValue:null,required:!0,index:0,parent:Sw},Cw={id:"getCompanyByIdEndpointResponseHeadersDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointResponseHeadersDataType"},Bw={id:"getCompanyByIdEndpointResponseHeadersReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseHeadersReturnDeclaration"},ww={id:"getCompanyByIdEndpointResponseHeadersDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!0,isNullable:!1,constant:!1,entity:Xe,asType:!1,defaultValue:{id:"getCompanyByIdEndpointResponseHeadersDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.JSON,value:{},parent:Cw,autogeneration:null,valueAsType:null},parent:Bw},_w={id:"getCompanyByIdEndpointReturnStatementRefTwo",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},Mw={isError:!1,id:"getCompanyByIdEndpointResponseHeadersReturnDeclaration",version:1,description:"A set of any properties, with names and value that transmit metadata about the response.",type:r.ReturnDeclaration,name:"Response headers",dataType:ww,readsValue:null,required:!0,index:1,parent:_w},Nw={id:"getCompanyByIdEndpointResponseBodyReturnDeclarationRef",type:r.GenericReference,entityType:r.ReturnDeclaration,entityId:"getCompanyByIdEndpointResponseBodyReturnDeclaration"},$w={id:"getCompanyByIdEndpointResponseBodyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,asType:!1,constant:!1,entity:Xe,defaultValue:null,parent:Nw},Vw={id:"getCompanyByIdEndpointReturnStatementRefThree",type:r.GenericReference,entityType:r.ReturnStatement,entityId:"getCompanyByIdEndpointReturnStatement"},Lw={isError:!1,id:"getCompanyByIdEndpointResponseBodyReturnDeclaration",version:1,description:"The main data payload of the response.",type:r.ReturnDeclaration,name:"Response body",dataType:$w,readsValue:null,required:!0,index:2,parent:Vw},Gw={id:"getCompanyByIdEndpointReturnStatementCallerRef",type:r.GenericReference,entityId:"getCompanyByIdEndpointReachedEntityEvent",entityType:r.FunctionDeclaration},Fw={id:"getCompanyByIdEndpointReachedEntityEventRefFive",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"getCompanyByIdEndpointReachedEntityEvent"},Uw={id:"getCompanyByIdEndpointReturnStatement",type:r.ReturnStatement,version:1,outputs:[Ow,Mw,Lw],calledByError:[],calledByEntry:[Gw],calledBySuccess:[],throws:null,x:0,y:0,parent:Fw},xw={id:"endpointBuiltInBaseEntityRefFour",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:LT},jw={id:"getCompanyByIdEndpointReachedEntityEvent",name:"Endpoint reached",version:1,type:r.FunctionDeclaration,inputs:[yw,fw,bw,Pw],returnStatements:[Uw],description:"Fired when the endpoint is reached.",calls:[],collapsed:!1,implements:jo,index:0,private:!1,x:0,y:0,parent:xw},kw={id:"getCompanyByIdEndpointPathPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointPathPropertyDataType"},qw={id:"getCompanyByIdEndpointPathPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"getCompanyByIdEndpointPathProperty"},Jw={id:"getCompanyByIdEndpointPathPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!0,entity:F,asType:!1,defaultValue:{id:"getCompanyByIdEndpointPathPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,name:v.String,value:"/company/{id}",parent:kw,valueAsType:null,autogeneration:null},parent:qw},Ww={id:"getCompanyByIdEndpointBaseEntityRefTwo",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Hw={hidden:!1,required:!0,id:"getCompanyByIdEndpointPathProperty",name:"Path",version:1,type:r.Property,private:!1,abstract:!1,static:!0,implements:Uo,dataType:Jw,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:Ww},Yw={id:"getCompanyByIdEndpointMethodPropertyDataTypeRef",type:r.GenericReference,entityType:r.DataType,entityId:"getCompanyByIdEndpointMethodPropertyDataType"},zw={id:"getCompanyByIdEndpointMethodPropertyRef",type:r.GenericReference,entityType:r.Property,entityId:"getCompanyByIdEndpointMethodProperty"},Zw={id:"getCompanyByIdEndpointMethodPropertyDataType",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:gn,isList:!0,isNullable:!1,constant:!0,asType:!1,defaultValue:{id:"getCompanyByIdEndpointMethodPropertyDataTypeDefaultValueId",type:r.PrimitiveValue,version:1,value:"GET",name:v.Enum,parent:Yw,valueAsType:null,autogeneration:null},options:["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD","TRACE","CONNECT","CUSTOM"],parent:zw},Xw={id:"getCompanyByIdEndpointBaseEntityRefThree",type:r.GenericReference,entityType:r.BuiltInBaseEntity,entityId:_.HTTP_ENDPOINT},Qw={hidden:!1,required:!0,id:"getCompanyByIdEndpointMethodProperty",name:"Method",version:1,type:r.Property,private:!1,abstract:!1,static:!0,implements:xo,index:0,dataType:Zw,description:null,parent:Xw},Kw={type:r.GenericReference,id:"6a905153-8aa8-4424-bd7b-6415731a2725",entityType:r.Project,entityId:W},e_={type:r.CustomEntity,id:LT,version:1,name:"Get given company data by id",description:null,properties:[Hw,Qw],methods:[jw],static:!0,abstract:!1,abstractMethods:[],extends:[],implements:[Ca],x:0,y:0,parent:Kw},t_={id:"product-prototype-database-property-ref-id",type:r.GenericReference,entityId:"product-prototype-database-property-id",entityType:r.Property},n_={id:"product-prototype-database-property-data-type-default-value-parent-ref-id",type:r.GenericReference,entityId:"product-prototype-database-property-data-type-default-value-id",entityType:r.DataType},r_={id:"product-prototype-database-property-data-type-id",version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,isList:!1,isNullable:!1,constant:!1,entity:vn,asType:!1,defaultValue:{id:"product-prototype-database-property-data-type-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.EntityTemplate,valueAsType:fl,autogeneration:null,parent:n_},parent:t_},i_={id:"product-prototype-database-property-parent-ref-id",type:r.GenericReference,entityId:"de67fc84-3719-46fd-9ab4-3fca3a3cc50d",entityType:r.CustomEntity},a_={hidden:!1,required:!0,id:"product-prototype-database-property-id",name:"Database",version:1,type:r.Property,private:!1,abstract:!1,implements:Ti,static:!0,index:0,dataType:r_,description:"The database that the entity belongs to.",parent:i_},s_={type:r.GenericReference,id:"13a4045e-dcb0-4159-8d33-10a646078b5a",entityType:r.Property,entityId:"d519c26a-15b8-40d8-ad09-13fa9342e9ba"},o_={id:"7449779e-1d4e-409c-81c6-4b611336ed18",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:s_},l_={type:r.GenericReference,id:"0969562f-d836-406f-8b48-dd9d417fbe72",entityType:r.CustomEntity,entityId:"a2d0ec83-72ce-4f54-b059-a39e018fa86c"},c_={hidden:!1,required:!0,type:r.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:o_,abstract:!1,parent:l_},d_={type:r.GenericReference,id:"833a5425-7bd0-41dd-9e97-e018acce9592",entityType:r.Project,entityId:W},u_={type:r.CustomEntity,id:"a2d0ec83-72ce-4f54-b059-a39e018fa86c",version:1,name:"Product",description:"A product that can be sold",implements:[_e],extends:[],abstract:!1,static:!1,abstractMethods:[],properties:[a_,c_],methods:[],x:0,y:0,parent:d_},Gi="project-loaded-event-id",Wt="get-bitcoin-price-http-call-operation-id",GT="get-bitcoin-price-http-call-response-body-id",cs="validate-bitcoin-price-response-operation-ids",p_={type:r.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:GT},y_={type:r.GenericReference,id:"validate-bitcoin-data-to-validate-input-map-parent-ref-id",entityType:r.Operation,entityId:cs},FT={id:"validate-bitcoin-data-to-validate-input-map-id",type:r.InputMap,version:1,declaration:kn.fixedArguments[1],name:null,description:null,readsValue:p_,defaultValue:null,dynamicArguments:[],index:0,parent:y_},h_={type:r.GenericReference,id:"validate-bitcoin-type-to-match-input-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:"validate-bitcoin-type-to-match-input-map-id"},f_={type:r.GenericReference,id:"validate-bitcoin-type-to-match-input-map-parent-ref-id",entityType:r.Operation,entityId:cs},m_={id:"validate-bitcoin-type-to-match-input-map-id",type:r.InputMap,version:1,declaration:kn.fixedArguments[0],name:null,description:null,readsValue:null,defaultValue:{id:"validate-bitcoin-type-to-match-input-map-default-value-id",type:r.PrimitiveValue,version:1,name:v.EntityTemplate,valueAsType:IT,value:null,parent:h_,autogeneration:null},dynamicArguments:[],index:0,parent:f_},T_={type:r.GenericReference,id:"validate-bitcoin-validated-entity-output-map-parent-ref-id",entityType:r.Operation,entityId:cs},E_={id:"validate-bitcoin-validated-entity-output-map-id",type:r.OutputMap,version:1,declaration:kn.fixedReturns[0],writesValues:[],index:0,parent:T_},R_={type:r.GenericReference,id:"validate-bitcoin-price-response-operation-parent-ref-id",entityType:r.GlobalEvent,entityId:Gi},b_={type:r.GenericReference,id:"validate-bitcoin-price-response-operation-called-by-ref-id",entityType:r.Operation,entityId:Wt},g_={type:r.Operation,id:cs,version:1,declaration:kn,inputs:[m_,FT],outputs:[E_],process:null,dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[b_],parent:R_},v_={type:r.GenericReference,id:"96edb661-3f36-406c-8921-f1679dd796a3",entityType:r.FunctionCall,entityId:Wt},I_={id:"c93e1393-9b5e-4de2-b8da-7eae647d715a",version:1,type:r.InputMap,declaration:va,name:null,description:null,readsValue:null,defaultValue:null,dynamicArguments:[],index:0,parent:v_},P_={type:r.GenericReference,id:"40312b28-71b8-4b01-a654-58b87191939d",entityType:r.FunctionCall,entityId:Wt},D_={type:r.GenericReference,id:"6ea96c7d-02a7-4971-82ad-2f32a0fec8b4",entityType:r.InputMap,entityId:"9f21cbac-5a83-4983-8923-9224ffd3ba9f"},A_={id:"9f21cbac-5a83-4983-8923-9224ffd3ba9f",version:1,type:r.InputMap,declaration:Ia,name:null,description:null,readsValue:null,defaultValue:{id:"get-bitcoin-price-http-request-url-argument-default-value-id",type:r.PrimitiveValue,version:1,value:"https://api.coindesk.com/v1/bpi/currentprice.json",name:v.String,parent:D_,valueAsType:null,autogeneration:null},index:1,dynamicArguments:[],parent:P_},S_={type:r.GenericReference,id:"2610bf4a-c8a2-4746-b6cc-eb15f7fa8e9c",entityType:r.FunctionCall,entityId:Wt},O_={id:"ffb3cd9d-c955-4104-bc7b-299120fe4ede",version:1,type:r.InputMap,declaration:Pa,name:null,description:null,readsValue:null,dynamicArguments:[],defaultValue:null,index:2,parent:S_},C_={type:r.GenericReference,id:"bfd29a6a-671a-448c-9f2f-f8c7e4ad8349",entityType:r.FunctionCall,entityId:Wt},B_={id:"412bf1f3-1a8e-4665-a95f-82117540e34e",version:1,type:r.InputMap,declaration:Da,name:null,description:null,readsValue:null,dynamicArguments:[],defaultValue:null,index:3,parent:C_},w_={type:r.GenericReference,id:"616a15f3-c224-4b11-b95c-63314edef409",entityType:r.FunctionCall,entityId:Wt},__={id:"4dd4651c-02e4-45f1-b50f-824f3bcb1648",version:1,type:r.OutputMap,declaration:Aa,writesValues:[],index:1,parent:w_},M_={type:r.GenericReference,id:"28793b68-4d7e-4826-aee1-f201a3499faf",entityType:r.FunctionCall,entityId:Wt},N_={id:"94fe9d35-4dd4-4729-a50c-5283ccd7e661",version:1,type:r.OutputMap,declaration:Lo,writesValues:[],index:0,parent:M_},$_={type:r.GenericReference,id:"f13e04b2-49b4-4c69-85b8-cbbafafa3524",entityType:r.FunctionCall,entityId:Wt},V_={id:GT,type:r.OutputMap,version:1,declaration:hi,writesValues:[FT],index:2,parent:$_},L_={type:r.GenericReference,id:"6148d6d0-caaa-45fc-b601-ff2493dfc60f",entityType:r.FunctionDeclaration,entityId:Wt},G_={type:r.GenericReference,id:"b115f084-807b-44b3-ae01-b69cc342f761",entityType:r.GlobalEvent,entityId:Gi},F_={type:r.Operation,id:Wt,version:1,declaration:fi,inputs:[I_,A_,O_,B_],outputs:[N_,__,V_],process:null,parent:G_,calledByError:[],calledByEntry:[L_],calledBySuccess:[],dynamicArguments:[],successCalls:[g_],errorCalls:[],error:null,x:0,y:0},U_={type:r.GenericReference,id:"24e76019-3f94-475b-91ce-297f76bbc224",entityType:r.GlobalEvent,entityId:Gi},x_={type:r.GenericReference,id:"0eac8e29-cdf2-42f8-8ea7-ad76d4d79abe",entityType:r.GlobalEvent,entityId:Gi},j_={process:null,type:r.FunctionCall,id:"2d2e7593-bfbf-457c-a607-5fce18eef457",version:1,declaration:gl,inputs:[],outputs:[],calledByError:[],calledByEntry:[U_],calledBySuccess:[],parent:x_,successCalls:[],errorCalls:[],error:null,x:0,y:0},k_={id:"793b5999-a9da-47fb-9665-0c17ebc6d5c9",type:r.GenericReference,entityType:r.Project,entityId:"2e7eb5382-3d99-44fd-972a-b8b1e819f6be"},q_={type:r.GlobalEvent,id:Gi,version:1,name:en.PROJECT_PUBLICATION_COMPLETED,returnStatements:[],collapsed:!1,implements:Na,parent:k_,inputs:[],calls:[j_,F_],x:0,y:0},Mt="abort-execution-func-declaration-id",Fi="abort-execution-func-exec-var-declaration-id",ds="abort-execution-func-small-wait-op-id",vl="abort-execution-func-long-wait-op-id",UT="abort-execution-func-long-wait-process-output-id",xT="abort-execution-func-exec-var-instance-write-id",jT="abort-execution-func-long-wait-return-stmt-id",kT="abort-execution-func-small-wait-return-stmt-id",J_="abort-execution-func-exec-var-instance-abort-call-id",Il="abort-execution-func-exec-var-instance-abort-internal-call-id",qT="abort-execution-func-exec-second-wait-op-id",W_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:"short-wait-return-statement-returned-hello-string-id"},H_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:r.DataType,entityId:"short-wait-return-statement-returned-hello-string-data-type-id"},Y_={id:"short-wait-return-statement-returned-hello-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"short-wait-return-statement-returned-hello-string-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"Hello 2",autogeneration:null,valueAsType:null,parent:H_},constant:!1,parent:W_},z_={type:r.GenericReference,id:"short-wait-return-statement-returned-hello-string-parent-ref-id",entityType:r.ReturnStatement,entityId:kT},Z_={isError:!1,id:"short-wait-return-statement-returned-hello-string-id",type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:Y_,readsValue:null,required:!0,index:0,parent:z_},X_={type:r.GenericReference,id:"short-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:ds},Q_={type:r.GenericReference,id:"short-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},JT={type:r.ReturnStatement,id:kT,version:1,outputs:[Z_],calledByError:[],calledByEntry:[],calledBySuccess:[X_],throws:null,x:0,y:0,parent:Q_},K_={type:r.GenericReference,id:"second-wait-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"second-wait-argument-map-id"},eM={type:r.GenericReference,id:"second-wait-argument-map-parent-ref-id",entityType:r.Operation,entityId:qT},tM={id:"second-wait-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"second-wait-argument-default-value-id",type:r.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:v.Number,parent:K_},index:0,parent:eM},nM={type:r.GenericReference,id:"small-wait-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},rM={type:r.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:r.InternalCall,entityId:Il},iM={id:qT,type:r.Operation,version:1,declaration:ot,inputs:[tM],dynamicArguments:[],outputs:[],process:null,successCalls:[JT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[rM],error:null,parent:nM},aM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-one-id",entityType:r.VariableInstance,entityId:xT},sM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-abort-internal-call-called-by-ref-two-id",entityType:r.Operation,entityId:ds},oM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},lM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Fi},cM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-internal-call-ref-one-id",entityType:r.InternalCall,entityId:Il},dM={id:J_,type:r.VariableInstance,version:1,declaration:lM,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[cM],parent:oM},WT={id:Il,type:r.InternalCall,version:1,inputs:[],outputs:[],declaration:Yo,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[aM,sM],successCalls:[iM],errorCalls:[],error:null,index:0,parent:dM},uM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},pM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-one-id",entityType:r.VariableDeclaration,entityId:Fi},yM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-called-by-ref-two-id",entityType:r.FunctionDeclaration,entityId:Mt},hM={type:r.GenericReference,id:"abort-exec-func-abort-call-var-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Fi},fM={type:r.GenericReference,id:"abort-exec-func-var-write-instance-reads-value-ref-id",entityType:r.OutputMap,entityId:UT},Pl={id:xT,type:r.VariableInstance,version:1,declaration:hM,inputs:[],outputs:[],calledByError:[],calledByEntry:[yM],calledBySuccess:[pM],successCalls:[WT],errorCalls:[],x:0,y:0,readsValue:fM,writesValues:[],internalCalls:[],parent:uM},mM={type:r.GenericReference,id:"abort-exec-func-var-decl-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:Fi};r.GenericReference,r.DataType;const TM={id:"abort-exec-func-var-decl-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:zo,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:mM,defaultValue:null},EM={type:r.GenericReference,id:"abort-exec-func-var-decl-main-project-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},RM={type:r.GenericReference,id:"abort-exec-func-var-decl-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},bM={id:Fi,type:r.VariableDeclaration,version:1,name:"Execution in progress",description:"A variable that holds an ongoing execution to abort it if needed",dataType:TM,inputs:[],outputs:[],calledByError:[],calledByEntry:[RM],calledBySuccess:[],successCalls:[Pl],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:EM},gM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:"long-wait-return-statement-returned-hello-string-id"},vM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-data-type-default-value-parent-ref-id",entityType:r.DataType,entityId:"long-wait-return-statement-returned-hello-string-data-type-id"},IM={id:"long-wait-return-statement-returned-hello-string-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"long-wait-return-statement-returned-hello-string-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.String,value:"Hello 1",autogeneration:null,valueAsType:null,parent:vM},constant:!1,parent:gM},PM={type:r.GenericReference,id:"long-wait-return-statement-returned-hello-string-parent-ref-id",entityType:r.ReturnStatement,entityId:jT},DM={isError:!1,id:"long-wait-return-statement-returned-hello-string-id",type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:IM,readsValue:null,required:!0,index:0,parent:PM},AM={type:r.GenericReference,id:"long-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:vl},SM={type:r.GenericReference,id:"long-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},HT={type:r.ReturnStatement,id:jT,version:1,outputs:[DM],calledByError:[],calledByEntry:[],calledBySuccess:[AM],throws:null,x:0,y:0,parent:SM},OM={type:r.GenericReference,id:"long-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"long-argument-map-id"},YT={type:r.GenericReference,id:"long-argument-map-parent-ref-id",entityType:r.Operation,entityId:vl},CM={id:"long-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"long-argument-default-value-id",type:r.PrimitiveValue,version:1,value:1500,valueAsType:null,autogeneration:null,name:v.Number,parent:OM},index:0,parent:YT},BM={type:r.GenericReference,id:"long-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},wM={type:r.GenericReference,id:"long-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},_M={id:UT,type:r.OutputMap,version:1,declaration:Xo,writesValues:[Pl],index:0,parent:YT},MM={id:vl,type:r.Operation,version:1,declaration:ot,inputs:[CM],dynamicArguments:[],outputs:[],process:_M,successCalls:[HT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[wM],calledBySuccess:[],error:null,parent:BM},NM={type:r.GenericReference,id:"small-wait-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"small-wait-argument-map-id"},$M={type:r.GenericReference,id:"small-wait-argument-map-parent-ref-id",entityType:r.Operation,entityId:ds},VM={id:"small-wait-argument-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"small-wait-argument-default-value-id",type:r.PrimitiveValue,version:1,value:500,valueAsType:null,autogeneration:null,name:v.Number,parent:NM},index:0,parent:$M},LM={type:r.GenericReference,id:"small-wait-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Mt},GM={type:r.GenericReference,id:"small-wait-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:Mt},FM={id:ds,type:r.Operation,version:1,declaration:ot,inputs:[VM],dynamicArguments:[],outputs:[],process:null,successCalls:[WT],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[GM],calledBySuccess:[],error:null,parent:LM},UM={type:r.GenericReference,id:"abort-execution-func-decl-parent-ref-id",entityType:r.Project,entityId:W},zT={id:"abort-execution-func-decl-id",type:r.FunctionDeclaration,version:1,name:"Test aborting execution",description:"Executes a wait and then aborts the execution of that wait",inputs:[],returnStatements:[HT,JT],calls:[FM,bM,Pl,MM],implements:null,private:!1,collapsed:!1,index:null,x:0,y:0,parent:UM},xM={type:r.GenericReference,id:"call-execution-abort-func-parent-ref-id",entityType:r.Project,entityId:W},jM={id:"call-execution-abort-func-id",type:r.FunctionCall,version:1,declaration:zT,inputs:[],process:null,outputs:[],successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:xM},Dl="manual-hello-world-loop-func-decl-id",ZT="manual-hello-world-loop-func-return-statement-id",on="manual-hello-world-loop-id",Ui="manual-hello-world-loop-body-id",XT="manual-hello-world-loop-break-statement-id",us="manual-hello-world-loop-current-iteration-number-output-map-id",Al="manual-hello-world-loop-previous-iterations-results-output-map-id",Sl="assembled-hello-world-text-output-id",QT="assembled-hello-world-list-output-id",xi="iteration-number-is-equal-or-greater-than-10-condition-id",ps="join-hello-world-and-number-operation-id",ys="append-string-to-list-operation-id",KT="hello-world-loop-output-map-id",kM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-parent-ref",entityType:r.ReturnStatement,entityId:ZT},qM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-data-type-parent-ref",entityType:r.ReturnDeclaration,entityId:"manual-hello-world-loop-function-declaration-output-declaration"},JM={id:"manual-hello-world-loop-function-declaration-output-declaration-data-type",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qM},WM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-output-declaration-reads-value-ref",entityType:r.OutputMap,entityId:KT},eE={isError:!1,id:"manual-hello-world-loop-function-declaration-output-declaration",version:1,type:r.ReturnDeclaration,name:"Results",description:null,dataType:JM,readsValue:WM,required:!0,index:0,parent:kM},HM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-return-statement-called-by-ref",entityType:r.Loop,entityId:on},YM={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref",entityType:r.FunctionDeclaration,entityId:Dl},tE={type:r.ReturnStatement,id:ZT,version:1,outputs:[eE],calledByError:[],calledByEntry:[],calledBySuccess:[HM],parent:YM,throws:null,x:0,y:0},zM={type:r.GenericReference,id:"hello-world-loop-break-statement-ref-id",entityType:r.BreakStatement,entityId:XT},ZM={type:r.GenericReference,id:"hello-world-loop-break-statement-output-data-type-ref-id",entityType:r.ReturnDeclaration,entityId:"hello-world-loop-break-statement-output-id"},XM={id:"hello-world-loop-break-statement-output-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!0,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ZM},QM={type:r.GenericReference,id:"hello-world-loop-break-statement-reads-value-ref-id",entityType:r.OutputMap,entityId:Sl},Ol={isError:!1,id:"hello-world-loop-break-statement-output-id",version:1,type:r.ReturnDeclaration,name:"Iteration result",description:null,dataType:XM,readsValue:QM,required:!0,index:0,parent:zM},KM={type:r.GenericReference,id:"hello-world-loop-break-statement-called-by-ref-id",entityType:r.Condition,entityId:xi},eN={type:r.GenericReference,id:"hello-world-loop-break-statement-parent-ref-id",entityType:r.Loop,entityId:on},nE={type:r.BreakStatement,id:XT,version:1,outputs:[Ol],calledByError:[],calledByEntry:[],calledBySuccess:[KM],parent:eN,throws:null,x:0,y:0},tN={type:r.GenericReference,id:"hello-world-loop-continue-statement-ref-id",entityType:r.ContinueStatement,entityId:"hello-world-loop-continue-statement"},nN={type:r.GenericReference,id:"hello-world-loop-continue-statement-output-data-type-ref-id",entityType:r.ReturnDeclaration,entityId:"hello-world-loop-continue-statement-output-id"},rN={id:"hello-world-loop-continue-statement-output-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:null,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:nN},iN={type:r.GenericReference,id:"hello-world-loop-continue-statement-reads-value-ref-id",entityType:r.OutputMap,entityId:Sl},rE={isError:!1,id:"hello-world-loop-continue-statement-output-id",version:1,type:r.ReturnDeclaration,name:"Iteration result",description:null,dataType:rN,readsValue:iN,required:!0,index:0,parent:tN},aN={type:r.GenericReference,id:"hello-world-loop-continue-statement-called-by-ref-id",entityType:r.Condition,entityId:xi},sN={type:r.GenericReference,id:"hello-world-loop-continue-statement-parent-ref-id",entityType:r.Loop,entityId:on},iE={type:r.ContinueStatement,id:"hello-world-loop-continue-statement",version:1,outputs:[rE],calledBySuccess:[],calledByError:[aN],calledByEntry:[],parent:sN,throws:null,x:0,y:0};r.GenericReference,r.InputMap;const oN={type:r.GenericReference,id:"append-string-to-list-base-string-map-parent-ref-id",entityType:r.Operation,entityId:ys},lN={type:r.GenericReference,id:"base-string-map-reads-value-ref-id",entityType:r.OutputMap,entityId:Al},aE={id:"append-string-to-list-base-string-map-id",type:r.InputMap,version:1,declaration:Co,name:null,description:null,readsValue:lN,defaultValue:null,dynamicArguments:[],index:0,parent:oN},cN={type:r.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:r.Operation,entityId:ys},dN={id:QT,type:r.OutputMap,version:1,writesValues:[Ol],declaration:pi,index:0,parent:cN},uN={type:r.GenericReference,id:"append-string-to-list-called-by-ref-id",entityType:r.Condition,entityId:xi},pN={type:r.GenericReference,id:"latest-string-to-add-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:QT},yN={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:ys},sE={id:"latest-string-to-add-input-map-id",version:1,type:r.InputMap,declaration:Bo,name:null,description:null,readsValue:pN,dynamicArguments:[],defaultValue:null,index:1,parent:yN},hN={type:r.GenericReference,id:"append-string-to-list-parent-ref-id",entityType:r.FunctionDeclaration,entityId:on},fN={type:r.Operation,id:ys,declaration:ga,version:1,inputs:[aE,sE],outputs:[dN],calledByError:[],process:null,calledByEntry:[],calledBySuccess:[uN],dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:hN},mN={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Ui},TN={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-parent-ref-id",entityType:r.Loop,entityId:on},EN={type:r.GenericReference,id:"current-iteration-number-to-check-map-reads-value-ref-id",entityType:r.OutputMap,entityId:us},oE={type:r.GenericReference,id:"iteration-number-is-equal-or-greater-than-10-condition-ref-two-id",entityType:r.Condition,entityId:xi},RN={id:"current-iteration-number-to-check-map-id",version:1,type:r.InputMap,declaration:wr.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:EN,index:1,defaultValue:null,parent:oE},bN={type:r.GenericReference,id:"max-num-iterations-value-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:"max-num-iterations-value-map-id"},gN={id:"max-num-iterations-value-map-id",version:1,type:r.InputMap,declaration:wr.fixedArguments[1],name:null,description:null,dynamicArguments:[],readsValue:null,index:0,defaultValue:{id:"max-num-iterations-value-map-default-value-id",type:r.PrimitiveValue,version:1,name:v.Number,value:10,autogeneration:null,valueAsType:null,parent:bN},parent:oE},vN={type:r.Condition,id:xi,version:1,declaration:wr,inputs:[gN,RN],calledByError:[],calledByEntry:[mN],calledBySuccess:[],successCalls:[nE,fN],errorCalls:[iE],x:0,y:0,parent:TN},IN={type:r.GenericReference,id:"base-string-map-ref-id",entityType:r.InputMap,entityId:"join-hello-world-and-number-base-string-map-id"},PN={type:r.GenericReference,id:"join-hello-world-and-number-base-string-map-parent-ref-id",entityType:r.Operation,entityId:ps},DN={id:"join-hello-world-and-number-base-string-map-id",type:r.InputMap,version:1,declaration:Ra,name:null,description:null,readsValue:null,defaultValue:{id:"join-hello-world-and-number-base-string-map-default-value-id",type:r.PrimitiveValue,version:1,value:"Hello world ",name:v.String,parent:IN,valueAsType:null,autogeneration:null},dynamicArguments:[],index:0,parent:PN},AN={type:r.GenericReference,id:"assembly-string-map-parent-ref-id",entityType:r.Operation,entityId:ps},SN={id:Sl,type:r.OutputMap,version:1,writesValues:[sE,rE],declaration:pi,index:0,parent:AN},ON={type:r.GenericReference,id:"join-hello-world-and-number-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Ui},CN={type:r.GenericReference,id:"current-iteration-number-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:us},BN={type:r.GenericReference,id:"62b4afb0-6c21-4b0f-abd3-cebef7b17c28",entityType:r.Operation,entityId:ps},lE={id:"current-iteration-number-input-map-id",version:1,type:r.InputMap,declaration:ba,name:null,description:null,readsValue:CN,dynamicArguments:[],defaultValue:null,index:1,parent:BN},wN={type:r.GenericReference,id:"join-hello-world-and-number-parent-ref-id",entityType:r.FunctionDeclaration,entityId:on},_N={type:r.Operation,id:ps,declaration:yi,version:1,inputs:[DN,lE],outputs:[SN],process:null,calledByError:[],calledByEntry:[ON],calledBySuccess:[],dynamicArguments:[],successCalls:[],errorCalls:[],error:null,x:0,y:0,parent:wN},MN={id:"manual-hello-world-loop-iterations-results-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:Al,entityType:r.ArgumentDeclaration},NN={id:"manual-hello-world-loop-iterations-results-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!0,isNullable:!1,constant:!1,entity:null,asType:!1,defaultValue:null,parent:MN},$N={id:"manual-hello-world-loop-previous-iterations-results-output-map-parent-ref-id",type:r.GenericReference,entityId:Ui,entityType:r.FunctionDeclaration},VN={id:Al,type:r.ArgumentDeclaration,version:1,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",required:!0,dataType:NN,writesValues:[aE],index:1,parent:$N},LN={id:"manual-hello-world-loop-current-iteration-number-output-map-parent-ref-id",type:r.GenericReference,entityId:Ui,entityType:r.FunctionDeclaration},GN={id:"manual-flow-loop-current-iteration-number-declaration-data-type-parent-ref-id",type:r.GenericReference,entityId:us,entityType:r.ArgumentDeclaration};r.DataType;const FN={id:us,type:r.ArgumentDeclaration,version:1,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",required:!0,dataType:null,writesValues:[lE],index:0,parent:LN},UN={id:"manual-flow-loop-body-parent-ref-id",type:r.GenericReference,entityId:on,entityType:r.Loop},xN={id:Ui,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called multiple times, once for each iteration of the loop.",inputs:[FN,VN],calls:[vN,_N],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:UN},jN={type:r.GenericReference,id:"hello-world-loop-break-statement-output-map-parent-ref-id",entityType:r.Loop,entityId:on},kN={type:r.OutputMap,id:KT,version:1,declaration:Ol,writesValues:[eE],index:0,parent:jN},qN={id:"manual-hello-world-loop-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},JN={id:"manual-hello-world-loop-called-by-ref-id",type:r.GenericReference,entityId:Dl,entityType:r.FunctionDeclaration},WN={id:on,type:r.Loop,version:1,declaration:Fo,inputs:[],outputs:[kN],body:xN,successCalls:[tE],errorCalls:[],process:null,error:null,calledByError:[],calledByEntry:[JN],calledBySuccess:[],breakStatements:[nE],continueStatements:[iE],x:0,y:0,parent:qN},HN={type:r.GenericReference,id:"manual-hello-world-loop-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},cE={type:r.FunctionDeclaration,id:Dl,version:1,name:"Manual hello world loop",description:null,inputs:[],calls:[WN],returnStatements:[tE],implements:null,collapsed:!1,private:!1,index:null,x:0,y:0,parent:HN},YN={type:r.GenericReference,id:"call-hello-world-loop-parent-ref-id",entityType:r.Project,entityId:W},zN={id:"call-hello-world-loop-id",type:r.FunctionCall,version:1,declaration:cE,inputs:[],outputs:[],process:null,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:YN},ln="company-dto-function-declaration-id",Cl="company-dto-func-declaration-argument-dcl-id",Ht="company-dto-function-company-variable-id",wn="company-dto-function-company-dto-variable-id",xr="iterate-over-employee-list-loop-id",dE="iterate-over-employee-list-loop-employee-dto-output-map-id",Bl="iterate-over-employee-list-loop-body-current-employee-argument-declaration-id",ji="iterate-over-employee-list-loop-body-map-employee-dto-function-call-id",uE="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id",ZN="iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-id",pE="iterate-over-employee-list-continue-statement-id",hs="iterate-over-employee-list-loop-body-id",yE="company-dto-func-declaration-return-statement-id",hE="company-dto-func-declaration-return-decl-id",fE="company-dto-func-declaration-company-variable-id-output-map-id",mE="company-dto-func-declaration-company-variable-employess-output-map-id",TE="company-dto-func-declaration-company-variable-name-output-map-id",XN="company-dto-func-declaration-company-dto-variable-input-map-id",QN="company-dto-func-declaration-company-dto-variable-employess-input-map-id",KN="company-dto-func-declaration-company-dto-variable-name-input-map-id",fs="company-dto-func-declaration-owner-variable-id",e0="company-dto-func-declaration-company-dto-variable-owner-input-map-id",EE="company-dto-func-declaration-company-variable-owner-output-map-id",RE="company-dto-func-declaration-owner-variable-id-output-map-id",ms="company-dto-func-declaration-bank-account-variable-id",t0="company-dto-func-declaration-company-dto-variable-bank-account-input-map-id",bE="company-dto-func-declaration-company-variable-bank-account-output-map-id",gE="company-dto-func-declaration-bank-account-variable-id-output-map-id",n0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:hE},r0={id:"company-dto-func-returned-company-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:n0},i0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:yE},a0={type:r.GenericReference,id:"company-dto-func-returned-company-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:wn},vE={isError:!1,id:hE,type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:r0,readsValue:a0,required:!0,index:0,parent:i0},s0={type:r.GenericReference,id:"company-dto-func-return-statement-called-by-ref-id",entityType:r.Operation,entityId:wn},o0={type:r.GenericReference,id:"company-dto-func-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},wl={type:r.ReturnStatement,id:yE,version:1,outputs:[vE],calledByError:[],calledByEntry:[],calledBySuccess:[s0],throws:null,x:0,y:0,parent:o0},l0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-owner-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:RE},c0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-owner-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},IE={id:e0,type:r.InputMap,version:1,declaration:null,name:"owner_id",description:null,defaultValue:null,dynamicArguments:[],index:5,readsValue:l0,parent:c0},d0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:gE},u0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},PE={id:t0,type:r.InputMap,version:1,declaration:null,name:"bank_account_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:d0,parent:u0},p0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-name-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:TE},y0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-name-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},DE={id:KN,type:r.InputMap,version:1,declaration:null,name:"name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:p0,parent:y0},h0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-employess-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:dE},f0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-employess-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},AE={id:QN,type:r.InputMap,version:1,declaration:null,name:"employees",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:h0,parent:f0},m0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:fE},T0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:wn},SE={id:XN,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the company",defaultValue:null,dynamicArguments:[],index:1,readsValue:m0,parent:T0},E0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},R0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-one-id",entityType:r.VariableDeclaration,entityId:ms},b0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-two-id",entityType:r.VariableDeclaration,entityId:fs},g0={type:r.GenericReference,id:"company-dto-func-company-dto-variable-called-by-ref-three-id",entityType:r.VariableDeclaration,entityId:xr},_l={id:wn,type:r.VariableDeclaration,version:1,name:"Company DTO",dataType:null,description:"A variable holding the data of a mapped company DTO",calledByError:[],calledByEntry:[],calledBySuccess:[R0,b0,g0],successCalls:[wl],errorCalls:[],readsValue:null,writesValues:[vE],inputs:[SE,DE,PE,IE,AE],outputs:[],internalCalls:[],parent:E0,x:0,y:0},Zn="employee-dto-func-declaration-id",Ml="employee-dto-func-declaration-argument-dcl-id",OE="employee-dto-func-declaration-return-statement-id",CE="employee-dto-func-declaration-return-decl-id",Xn="employee-dto-func-declaration-employee-variable-id",Qn="employee-dto-func-declaration-employee-dto-variable-id",Ts="employee-dto-func-declaration-manager-variable-id",BE="employee-dto-func-declaration-employee-variable-id-output-map-id",wE="employee-dto-func-declaration-employee-variable-birth-date-output-map-id",_E="employee-dto-func-declaration-employee-variable-department-output-map-id",ME="employee-dto-func-declaration-employee-variable-manager-output-map-id",NE="employee-dto-func-declaration-manager-variable-id-output-map-id",v0="employee-dto-func-declaration-employee-dto-variable-input-map-id",I0="employee-dto-func-declaration-employee-dto-variable-birth-date-input-map-id",P0="employee-dto-func-declaration-employee-dto-variable-department-input-map-id",D0="employee-dto-func-declaration-employee-dto-variable-manager-input-map-id",A0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:CE},S0={id:"employee-dto-func-returned-employee-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:A0},O0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:OE},C0={type:r.GenericReference,id:"employee-dto-func-returned-employee-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Qn},$E={isError:!1,id:CE,type:r.ReturnDeclaration,version:1,name:"Employee DTO",description:"Output the employee data in the format that it will be sent through an HTTP request.",dataType:S0,readsValue:C0,required:!0,index:0,parent:O0},B0={type:r.GenericReference,id:"employee-dto-func-return-statement-called-by-ref-id",entityType:r.Operation,entityId:Qn},w0={type:r.GenericReference,id:"employee-dto-func-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},Nl={type:r.ReturnStatement,id:OE,version:1,outputs:[$E],calledByError:[],calledByEntry:[],calledBySuccess:[B0],throws:null,x:0,y:0,parent:w0},_0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:NE},M0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},VE={id:D0,type:r.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:_0,parent:M0},N0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-department-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:_E},$0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},LE={id:P0,type:r.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:N0,parent:$0},V0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:wE},L0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},GE={id:I0,type:r.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:V0,parent:L0},G0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:BE},F0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Qn},FE={id:v0,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,dynamicArguments:[],index:1,readsValue:G0,parent:F0},U0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},x0={type:r.GenericReference,id:"employee-dto-func-employee-dto-variable-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Ts},j0={id:Qn,type:r.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[x0],successCalls:[Nl],errorCalls:[],readsValue:null,writesValues:[$E],inputs:[FE,GE,LE,VE],outputs:[],internalCalls:[],parent:U0,x:0,y:0},k0={type:r.GenericReference,id:"employee-dto-func-manager-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ts},q0={id:NE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[VE],parent:k0},J0={type:r.GenericReference,id:"employee-dto-func-manager-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ts},W0={id:"employee-dto-func-manager-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:J0,defaultValue:null},H0={type:r.GenericReference,id:"employee-dto-func-manager-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:ME},Y0={type:r.GenericReference,id:"employee-dto-func-manager-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn};r.GenericReference,r.VariableDeclaration;const UE={id:Ts,type:r.VariableDeclaration,version:1,name:"Manager",dataType:W0,description:"A variable holding an inherited manager",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[j0],errorCalls:[],readsValue:H0,writesValues:[],inputs:[],outputs:[q0],internalCalls:[],parent:Y0,x:0,y:0},z0={type:r.GenericReference,id:"employee-dto-func-employee-variable-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},Z0={id:ME,type:r.OutputMap,version:1,declaration:Dt.properties[2],index:3,writesValues:[UE],parent:z0},X0={type:r.GenericReference,id:"employee-dto-func-employee-variable-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},Q0={id:_E,type:r.OutputMap,version:1,declaration:Dt.properties[0],index:2,writesValues:[LE],parent:X0},K0={type:r.GenericReference,id:"employee-dto-func-employee-variable-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},e1={id:wE,type:r.OutputMap,version:1,declaration:ct.properties[1],index:1,writesValues:[GE],parent:K0},t1={type:r.GenericReference,id:"employee-dto-func-employee-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},n1={id:BE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[FE],parent:t1},r1={type:r.GenericReference,id:"employee-dto-func-employee-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Xn},i1={id:"employee-dto-func-employee-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:r1,defaultValue:null},a1={type:r.GenericReference,id:"employee-dto-func-employee-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Zn},s1={type:r.GenericReference,id:"employee-dto-func-employee-variable-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:Ml},o1={type:r.GenericReference,id:"employee-dto-func-employee-variable-called-by-id",entityType:r.FunctionDeclaration,entityId:Zn},xE={id:Xn,type:r.VariableDeclaration,version:1,name:"Company employee",dataType:i1,description:"A variable holding a company employee",calledByError:[],calledByEntry:[o1],calledBySuccess:[],successCalls:[UE],errorCalls:[],readsValue:s1,writesValues:[],inputs:[],outputs:[n1,e1,Q0,Z0],internalCalls:[],parent:a1,x:0,y:0},l1={type:r.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-data-type-parent-ref-id",entityId:Ml,entityType:r.ArgumentDeclaration},c1={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"employee-dto-func-declaration-employee-input-declaration-data-type-id",version:1,entity:Dt,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:l1,defaultValue:null},d1={type:r.GenericReference,id:"employee-dto-func-declaration-employee-input-declaration-parent-ref-id",entityId:Zn,entityType:r.FunctionDeclaration},u1={type:r.ArgumentDeclaration,id:Ml,version:1,name:"Employee",description:"The employee to create a DTO for",required:!0,dataType:c1,index:0,writesValues:[xE],parent:d1},p1={type:r.GenericReference,id:"employee-dto-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},$l={type:r.FunctionDeclaration,id:Zn,version:1,name:"Employee DTO",description:"Takes a employee and returns a DTO of that employee",index:null,inputs:[u1],calls:[xE],implements:null,returnStatements:[Nl],collapsed:!1,private:!1,x:0,y:0,parent:p1},y1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:uE,entityType:r.ReturnDeclaration},h1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:Dt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:y1},f1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-reads-value-ref-id",type:r.GenericReference,entityId:ji,entityType:r.OutputMap},m1={id:"iterate-over-employee-list-continue-statement-employee-dto-output-decl-parent-ref-id",type:r.GenericReference,entityId:pE,entityType:r.ContinueStatement},jE={isError:!1,id:uE,type:r.ReturnDeclaration,version:1,name:"Employee DTO",description:"The DTO of the employee entity.",readsValue:f1,dataType:h1,required:!0,index:0,parent:m1},T1={id:"iterate-over-employee-list-continue-statement-called-by-ref-id",type:r.GenericReference,entityId:ji,entityType:r.FunctionCall},E1={id:"iterate-over-employee-list-continue-statement-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},kE={id:pE,type:r.ContinueStatement,version:1,calledByError:[],calledByEntry:[],calledBySuccess:[T1],outputs:[jE],throws:null,x:0,y:0,parent:E1},R1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-dto-output-map-parent-ref-id",type:r.GenericReference,entityId:ji,entityType:r.FunctionCall},b1={id:ZN,type:r.OutputMap,version:1,declaration:Nl.outputs[0],writesValues:[jE],index:0,parent:R1},g1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-reads-value-ref-id",type:r.GenericReference,entityId:Bl,entityType:r.ArgumentDeclaration},v1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-parent-ref-id",type:r.GenericReference,entityId:ji,entityType:r.FunctionCall},qE={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-employee-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:$l.inputs[0],readsValue:g1,index:0,defaultValue:null,dynamicArguments:[],parent:v1},I1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-called-by-ref-id",type:r.GenericReference,entityId:hs,entityType:r.FunctionDeclaration},P1={id:"iterate-over-employee-list-loop-body-map-employee-dto-function-call-parent-ref-id",type:r.GenericReference,entityId:hs,entityType:r.FunctionDeclaration},D1={id:ji,type:r.FunctionCall,version:1,declaration:$l,inputs:[qE],process:null,outputs:[b1],calledByError:[],calledByEntry:[I1],calledBySuccess:[],successCalls:[kE],errorCalls:[],error:null,x:0,y:0,parent:P1},A1={type:r.GenericReference,id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-parent-ref-id",entityId:Bl,entityType:r.ArgumentDeclaration},S1={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:Dt,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:A1},O1={id:"iterate-over-employee-list-loop-body-current-employee-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:hs,entityType:r.FunctionDeclaration},C1={id:Bl,type:r.ArgumentDeclaration,version:1,name:"Current employee",description:"The current employee entity being processed.",dataType:S1,required:!0,index:0,writesValues:[qE],parent:O1},B1={id:"iterate-over-employee-list-loop-body-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},w1={id:hs,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each entity in the list.",inputs:[C1],calls:[D1],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:B1},_1={id:"iterate-over-employee-list-loop-iteration-list-input-map-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},M1={id:"iterate-over-employee-list-loop-iteration-list-input-map-reads-value-ref-id",type:r.GenericReference,entityId:mE,entityType:r.OutputMap},JE={id:"iterate-over-employee-list-loop-iteration-list-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:qn.fixedArguments[0],defaultValue:null,dynamicArguments:[],readsValue:M1,index:0,parent:_1},N1={id:"iterate-over-employee-list-loop-parent-ref-id",type:r.GenericReference,entityId:ln,entityType:r.FunctionDeclaration},$1={id:"iterate-over-employee-list-loop-employee-dto-output-map-parent-ref-id",type:r.GenericReference,entityId:xr,entityType:r.Loop},V1={id:dE,type:r.OutputMap,version:1,declaration:qn.fixedReturns[0],writesValues:[AE],index:0,parent:$1},L1={type:r.GenericReference,id:"iterate-over-employee-list-loop-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Ht},G1={id:xr,type:r.Loop,version:1,declaration:qn,inputs:[JE],successCalls:[_l],errorCalls:[],outputs:[V1],body:w1,process:null,calledByError:[],calledByEntry:[],calledBySuccess:[L1],breakStatements:[],continueStatements:[kE],error:null,x:0,y:0,parent:N1},F1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:ms},U1={id:gE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[PE],parent:F1},x1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:ms},j1={id:"company-dto-func-bank-account-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:x1,defaultValue:null},k1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:bE},q1={type:r.GenericReference,id:"company-dto-func-bank-account-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln};r.GenericReference,r.VariableDeclaration;const WE={id:ms,type:r.VariableDeclaration,version:1,name:"Bank account",dataType:j1,description:"A variable holding an inherited bank account",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[_l],errorCalls:[],readsValue:k1,writesValues:[],inputs:[],outputs:[U1],internalCalls:[],parent:q1,x:0,y:0},J1={type:r.GenericReference,id:"company-dto-func-owner-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:fs},W1={id:RE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[IE],parent:J1},H1={type:r.GenericReference,id:"company-dto-func-owner-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:fs},Y1={id:"company-dto-func-owner-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:H1,defaultValue:null},z1={type:r.GenericReference,id:"company-dto-func-owner-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:EE},Z1={type:r.GenericReference,id:"company-dto-func-owner-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln};r.GenericReference,r.VariableDeclaration;const HE={id:fs,type:r.VariableDeclaration,version:1,name:"Owner",dataType:Y1,description:"A variable holding an inherited owner",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[_l],errorCalls:[],readsValue:z1,writesValues:[],inputs:[],outputs:[W1],internalCalls:[],parent:Z1,x:0,y:0},X1={type:r.GenericReference,id:"company-dto-func-company-variable-owner-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},Q1={id:EE,type:r.OutputMap,version:1,declaration:Tt.properties[2],index:4,writesValues:[HE],parent:X1},K1={type:r.GenericReference,id:"company-dto-func-company-variable-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},e$={id:bE,type:r.OutputMap,version:1,declaration:Tt.properties[2],index:3,writesValues:[WE],parent:K1},t$={type:r.GenericReference,id:"company-dto-func-company-variable-name-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},n$={id:TE,type:r.OutputMap,version:1,declaration:Tt.properties[0],index:2,writesValues:[DE],parent:t$},r$={type:r.GenericReference,id:"company-dto-func-company-variable-employess-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},i$={id:mE,type:r.OutputMap,version:1,declaration:Tt.properties[3],index:1,writesValues:[JE],parent:r$},a$={type:r.GenericReference,id:"company-dto-func-company-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},s$={id:fE,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[SE],parent:a$},o$={type:r.GenericReference,id:"company-dto-func-company-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Ht},l$={id:"company-dto-func-company-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:o$,defaultValue:null},c$={type:r.GenericReference,id:"company-dto-func-company-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:ln},d$={type:r.GenericReference,id:"company-dto-func-company-variable-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:Cl},u$={type:r.GenericReference,id:"company-dto-func-company-variable-called-by-id",entityType:r.FunctionDeclaration,entityId:ln},YE={id:Ht,type:r.VariableDeclaration,version:1,name:"Company",dataType:l$,description:"A variable holding a company",calledByError:[],calledByEntry:[u$],calledBySuccess:[],successCalls:[WE,HE,G1],errorCalls:[],readsValue:d$,writesValues:[],inputs:[],outputs:[s$,i$,n$,e$,Q1],internalCalls:[],parent:c$,x:0,y:0},p$={type:r.GenericReference,id:"company-dto-func-declaration-company-input-declaration-data-type-parent-ref-id",entityId:Cl,entityType:r.ArgumentDeclaration},y$={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-dto-func-declaration-company-input-declaration-data-type-id",version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:p$,defaultValue:null},h$={type:r.GenericReference,id:"company-dto-func-declaration-company-input-declaration-parent-ref-id",entityId:ln,entityType:r.FunctionDeclaration},f$={type:r.ArgumentDeclaration,id:Cl,version:1,name:"Company",description:"The company to create a DTO for",required:!0,dataType:y$,index:0,writesValues:[YE],parent:h$},m$={type:r.GenericReference,id:"company-dto-function-declaration-parent-ref-id",entityType:r.Project,entityId:W},Vl={type:r.FunctionDeclaration,id:ln,version:1,name:"Company DTO",description:"Takes a company and returns a DTO of that company",inputs:[f$],calls:[YE],implements:null,index:null,returnStatements:[wl],collapsed:!1,private:!1,x:0,y:0,parent:m$},ki="exec-in-parallel-operation-call-id",qi="exec-sequentially-operation-call-id",dt="concurrency-and-wait-function-declaration-id",zE="concurrency-and-wait-return-statement-id",ZE="concurrency-and-wait-return-declaration-id",Ll="exec-in-parallel-argument-map-id",XE="exec-sequentially-argument-map-id",Gl="wait-for-2-seconds-operation-id",QE="wait-for-2-seconds-argument-map-id",Fl="map-company-dto-function-call-id",KE="map-company-dto-function-call-company-dto-output-map-id",Ji="company-dto-variable-one-id",Ul="company-dto-variable-one-instance-id",T$="company-dto-variable-two-id",E$={type:r.GenericReference,id:"returned-company-dto-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:ZE},R$={id:"returned-company-dto-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:E$},b$={type:r.GenericReference,id:"returned-company-dto-parent-ref-id",entityType:r.ReturnStatement,entityId:zE},g$={type:r.GenericReference,id:"returned-company-dto-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Ji},eR={isError:!1,id:ZE,type:r.ReturnDeclaration,version:1,name:"Company DTO",description:"Output the company data in the format that it will be sent through an HTTP request.",dataType:R$,readsValue:g$,required:!0,index:0,parent:b$},v$={type:r.GenericReference,id:"concurrency-and-wait-return-statement-called-by-ref-id",entityType:r.Operation,entityId:Gl},I$={type:r.GenericReference,id:"concurrency-and-wait-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},tR={type:r.ReturnStatement,id:zE,version:1,outputs:[eR],calledByError:[],calledByEntry:[],calledBySuccess:[v$],throws:null,x:0,y:0,parent:I$},P$={type:r.GenericReference,id:"company-dto-variable-two-called-by-ref-id",entityType:r.VariableInstance,entityId:Ul},D$={type:r.GenericReference,id:"company-dto-variable-two-reads-value-ref-id",entityType:r.VariableInstance,entityId:Ul},A$={type:r.GenericReference,id:"company-dto-variable-two-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},nR={id:T$,type:r.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[P$],internalCalls:[],writesValues:[eR],readsValue:D$,x:0,y:0,parent:A$},S$={type:r.GenericReference,id:"company-dto-variable-one-instance-called-by-ref-id",entityType:r.VariableDeclaration,entityId:Ji},O$={type:r.GenericReference,id:"company-dto-variable-one-instance-reads-value-ref-id",entityType:r.VariableDeclaration,entityId:Ji},C$={type:r.GenericReference,id:"company-dto-variable-one-instance-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},B$={type:r.GenericReference,id:"company-dto-variable-one-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:Ji},rR={id:Ul,type:r.VariableInstance,version:1,declaration:B$,inputs:[],outputs:[],successCalls:[nR],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[S$],internalCalls:[],writesValues:[nR],readsValue:O$,x:0,y:0,parent:C$},w$={type:r.GenericReference,id:"company-dto-variable-one-called-by-ref-id",entityType:r.FunctionCall,entityId:Fl},_$={type:r.GenericReference,id:"company-dto-variable-one-reads-value-ref-id",entityType:r.OutputMap,entityId:KE},M$={type:r.GenericReference,id:"company-dto-variable-one-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},iR={id:Ji,type:r.VariableDeclaration,version:1,name:"Company DTO",description:null,dataType:null,inputs:[],outputs:[],successCalls:[rR],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[w$],internalCalls:[],writesValues:[rR],readsValue:_$,x:0,y:0,parent:M$},aR={type:r.GenericReference,id:"map-company-dto-function-call-company-input-map-parent-ref-id",entityType:r.FunctionCall,entityId:Fl},N$={id:"map-company-dto-function-call-company-input-map-id",type:r.InputMap,version:1,declaration:Vl.inputs[0],name:null,description:null,defaultValue:null,dynamicArguments:[],index:0,readsValue:null,parent:aR},$$={id:KE,type:r.OutputMap,version:1,declaration:wl.outputs[0],writesValues:[iR],index:0,parent:aR},V$={id:"map-company-dto-function-call-called-by-ref-id",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:dt},L$={id:"map-company-dto-function-call-parent-ref-id",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:dt},G$={id:Fl,type:r.FunctionCall,version:1,declaration:Vl,successCalls:[iR],process:null,errorCalls:[],inputs:[N$],outputs:[$$],calledByError:[],calledByEntry:[V$],calledBySuccess:[],parent:L$,x:0,y:0,error:null},F$={type:r.GenericReference,id:"last-timestamp-variable-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:nT},U$={type:r.GenericReference,id:"last-timestamp-variable-default-value-parent-ref-id",entityType:r.DataType,entityId:"last-timestamp-variable-datatype-id"},x$={id:"last-timestamp-variable-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:nn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:F$,defaultValue:{id:"last-timestamp-variable-default-value-id",type:r.PrimitiveValue,version:1,name:v.Date,value:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:U$,valueAsType:null}},j$={type:r.GenericReference,id:"last-timestamp-variable-main-project-ref-id",entityType:r.Project,entityId:W},xl={id:nT,type:r.VariableDeclaration,version:1,name:"Last registered current time",description:"A test variable that holds the last current date and time that was registered.",dataType:x$,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:j$},k$={type:r.GenericReference,id:"wait-for-2-seconds-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:QE},q$={type:r.GenericReference,id:"wait-for-2-seconds-argument-map-parent-ref-id",entityType:r.Operation,entityId:Gl},J$={id:QE,type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"wait-for-2-seconds-argument-default-value-id",type:r.PrimitiveValue,version:1,value:2e3,valueAsType:null,autogeneration:null,name:v.Number,parent:k$},index:0,parent:q$},W$={type:r.GenericReference,id:"wait-for-2-seconds-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},H$={type:r.GenericReference,id:"wait-for-2-seconds-called-by-ref-one-id",entityType:r.FunctionDeclaration,entityId:qi},Y$={type:r.GenericReference,id:"wait-for-2-seconds-called-by-ref-two-id",entityType:r.FunctionDeclaration,entityId:ki},sR={id:Gl,type:r.Operation,version:1,declaration:Lt,inputs:[J$],dynamicArguments:[],outputs:[],process:null,successCalls:[tR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[H$,Y$],calledBySuccess:[],error:null,parent:W$},z$={type:r.GenericReference,id:"wait-for-random-amount-argument-default-value-parent-ref-id",entityType:r.InputMap,entityId:"wait-for-random-amount-input-map-id"},Z$={type:r.GenericReference,id:"wait-for-random-amount-argument-map-parent-ref-id",entityType:r.Operation,entityId:"wait-for-random-amount-id"},X$={id:"wait-for-random-amount-input-map-id",type:r.InputMap,version:1,declaration:jn,name:null,description:null,dynamicArguments:[],readsValue:null,defaultValue:{id:"wait-for-random-amount-argument-default-value-id",type:r.PrimitiveValue,version:1,value:null,valueAsType:null,autogeneration:{type:Ue.Random,rangeStart:1e3,rangeEnd:4e3},name:v.Number,parent:z$},index:0,parent:Z$},Q$={type:r.GenericReference,id:"wait-for-random-amount-parent-ref-id",entityType:r.Project,entityId:W},jr={id:"wait-for-random-amount-id",type:r.Operation,version:1,declaration:Lt,inputs:[X$],dynamicArguments:[],process:null,outputs:[],successCalls:[],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[],calledBySuccess:[],error:null,parent:Q$},oR="list-of-functions-variable-id",K$={type:r.GenericReference,id:"list-of-functions-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:oR},eV={id:"list-of-functions-variable-action-descriptor-id",type:r.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.",argumentsType:L.Dynamic,dynamicArgumentTypes:null,fixedArguments:[],returnsType:L.Dynamic,error:null,dynamicReturnTypes:null,fixedReturns:[],parent:null},tV={type:r.GenericReference,id:"list-of-functions-variable-data-type-default-parent-ref-id",entityType:r.DataType,entityId:"list-of-functions-variable-data-type-id"},nV={id:"list-of-functions-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:eV,asType:!1,isList:!0,isNullable:!1,defaultValue:{id:"list-of-functions-variable-data-type-default-value-id",type:r.PrimitiveValue,version:1,name:v.ActionDescriptor,value:null,valueAsType:[jr,jr,jr,jr,jr],autogeneration:null,parent:tV},constant:!1,parent:K$},rV={type:r.GenericReference,id:"list-of-functions-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt};r.GenericReference,r.InputMap;const iV={type:r.GenericReference,id:"list-of-functions-variable-writes-value-one-ref-id",entityType:r.InputMap,entityId:XE},aV={type:r.GenericReference,id:"list-of-functions-variable-writes-value-two-ref-id",entityType:r.InputMap,entityId:Ll},lR={id:oR,type:r.VariableDeclaration,version:1,name:"List of functions to execute",description:"A list of functions to be executed in parallel",dataType:nV,parent:rV,readsValue:null,writesValues:[iV,aV],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],inputs:[],outputs:[],internalCalls:[],x:0,y:0},sV={type:r.GenericReference,id:"exec-in-parallel-return-map-parent-ref-id",entityType:r.Operation,entityId:ki},oV={type:r.GenericReference,id:"exec-in-parallel-result-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},lV={type:r.GenericReference,id:"exec-in-parallel-result-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:"exec-in-parallel-return-map-id"},cV={type:r.GenericReference,id:"exec-in-parallel-result-variable-called-by-ref-id",entityType:r.Operation,entityId:ki},cR={id:"exec-in-parallel-result-variable-id",type:r.VariableInstance,version:1,declaration:xl,readsValue:lV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[cV],successCalls:[],errorCalls:[],internalCalls:[],parent:oV,x:0,y:0},dV={id:"exec-in-parallel-return-map-id",type:r.OutputMap,version:1,declaration:_o,writesValues:[cR],index:0,parent:sV},uV={type:r.GenericReference,id:"exec-in-parallel-argument-map-parent-ref-id",entityType:r.Operation,entityId:ki},pV={id:Ll,type:r.InputMap,version:1,declaration:wo,name:null,description:null,dynamicArguments:[],readsValue:lR,defaultValue:null,index:0,parent:uV},yV={type:r.GenericReference,id:"exec-in-parallel-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},hV={type:r.GenericReference,id:"exec-in-parallel-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:dt},fV={process:null,id:ki,type:r.Operation,version:1,declaration:Lt,inputs:[pV],dynamicArguments:[],outputs:[dV],successCalls:[sR,cR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[hV],calledBySuccess:[],error:null,parent:yV},mV={type:r.GenericReference,id:"exec-sequentially-return-map-parent-ref-id",entityType:r.Operation,entityId:qi},TV={type:r.GenericReference,id:"exec-sequentially-result-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},EV={type:r.GenericReference,id:"exec-sequentially-result-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:"exec-sequentially-return-map-id"},RV={type:r.GenericReference,id:"exec-sequentially-result-variable-called-by-ref-id",entityType:r.Operation,entityId:qi},dR={id:"exec-sequentially-result-variable-id",type:r.VariableInstance,version:1,declaration:xl,readsValue:EV,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[RV],successCalls:[],errorCalls:[],internalCalls:[],parent:TV,x:0,y:0},bV={id:"exec-sequentially-return-map-id",type:r.OutputMap,version:1,declaration:No,writesValues:[dR],index:0,parent:mV},gV={type:r.GenericReference,id:"exec-sequentially-argument-map-parent-ref-id",entityType:r.Operation,entityId:qi},vV={id:XE,type:r.InputMap,version:1,declaration:Mo,name:null,description:null,dynamicArguments:[],readsValue:lR,defaultValue:null,index:0,parent:gV},IV={type:r.GenericReference,id:"exec-sequentially-parent-ref-id",entityType:r.FunctionDeclaration,entityId:dt},PV={type:r.GenericReference,id:"exec-sequentially-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:dt},DV={id:qi,type:r.Operation,version:1,declaration:rn,inputs:[vV],process:null,dynamicArguments:[],outputs:[bV],successCalls:[sR,dR],errorCalls:[],x:0,y:0,calledByError:[],calledByEntry:[PV],calledBySuccess:[],error:null,parent:IV},AV={type:r.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:r.Project,entityId:W},SV={type:r.FunctionDeclaration,id:dt,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:[DV,fV,G$],returnStatements:[tR],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:AV},OV={type:r.GenericReference,id:"3521f2c8-a5c0-419c-8808-4fc6a73d0b78",entityType:r.ReturnDeclaration,entityId:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b"},CV={id:"ce8b9a30-afe9-4d4f-879f-1677efca2c47",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Tt,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:OV},BV={type:r.GenericReference,id:"8ee66e38-b060-474e-a503-594063a8ec24",entityType:r.ReturnStatement,entityId:"40a23a98-d3b2-42b1-9652-b33779ad15aa"},wV={isError:!1,id:"e1ec31f0-25ca-42ac-a4c4-c9ec2255f55b",type:r.ReturnDeclaration,version:1,name:"Created company",description:"The new company that was created",dataType:CV,readsValue:null,required:!0,index:0,parent:BV},_V={type:r.GenericReference,id:"9cb3c1e4-7250-4be6-be2a-69c2dd366d6f",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},MV={type:r.GenericReference,id:"c065fcdd-e054-4f95-941c-7eaa65c35d04",entityType:r.FunctionDeclaration,entityId:"d683bfc1-a464-4810-8ec0-1dd8eaa0c3c4"},uR={type:r.ReturnStatement,id:"40a23a98-d3b2-42b1-9652-b33779ad15aa",version:1,outputs:[wV],calledByError:[],calledByEntry:[MV],calledBySuccess:[],throws:null,x:0,y:0,parent:_V},NV={type:r.GenericReference,id:"312ef836-9e40-4d57-b177-03b7145ed074",entityType:r.Project,entityId:W},$V={type:r.FunctionDeclaration,id:"5059c093-eda2-4efc-b7b4-aaaadd4d44de",version:1,name:"Create new company",description:null,inputs:[],calls:[uR],index:null,implements:null,returnStatements:[uR],collapsed:!1,private:!1,x:0,y:0,parent:NV},jl="get-current-date-and-time-func-decl-id",pR="get-current-date-and-time-return-statement-id",yR="get-current-date-and-time-return-declaration-id",hR="get-current-date-and-time-return-declaration-data-type-id",VV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-value-parent-ref-id",entityType:r.DataType,entityId:hR},LV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-data-type-parent-ref-id",entityType:r.ReturnDeclaration,entityId:yR},GV={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:hR,version:1,entity:nn,asType:!1,isList:!1,isNullable:!1,defaultValue:{id:"last-timestamp-variable-default-value-id",type:r.PrimitiveValue,version:1,value:null,name:v.Date,valueAsType:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:VV},constant:!1,parent:LV},FV={type:r.GenericReference,id:"get-current-date-and-time-return-declaration-parent-ref-id",entityType:r.ReturnStatement,entityId:pR};r.ReturnDeclaration;const UV={type:r.GenericReference,id:"get-current-date-and-time-return-statement-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:jl},xV={type:r.GenericReference,id:"get-current-date-and-time-return-statement-parent-ref-id",entityType:r.FunctionDeclaration,entityId:jl};r.ReturnStatement;const jV={type:r.GenericReference,id:"concurrency-and-wait-parent-ref-id",entityType:r.Project,entityId:W},kV={type:r.FunctionDeclaration,id:jl,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:jV},fR="do-math-return-statement-id",mR="do-math-return-declaration-id",qV={type:r.GenericReference,id:"do-math-func-var-to-return-one-ref-id",entityType:r.VariableDeclaration,entityId:"do-math-func-var-to-return-one-id"},JV={id:"do-math-func-var-to-return-one-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:qV},WV={type:r.GenericReference,id:"do-math-func-decl-ref-two-id",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},HV={type:r.GenericReference,id:"do-math-func-var-to-return-one-map-ref-id",entityType:r.ReturnDeclaration,entityId:mR},YV={type:r.VariableDeclaration,id:"do-math-func-var-to-return-one-id",version:1,description:null,name:"Fixed result",dataType:JV,readsValue:null,writesValues:[HV],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:WV},zV={type:r.GenericReference,id:"96ec244e-594b-45f7-802b-6dc3056920f6",entityType:r.ReturnStatement,entityId:fR},ZV={type:r.GenericReference,id:"d120c0cc-9d13-4e45-90e2-4e1ee825ca46",entityType:r.ReturnDeclaration,entityId:"873a3556-4911-4141-b2a0-49c677b56fb4"},XV={id:"da91aa23-9985-49ac-a8bf-9d623ba1ba8f",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:ZV},QV={isError:!1,id:mR,version:1,type:r.ReturnDeclaration,name:"Result",description:null,dataType:XV,readsValue:YV,required:!0,index:0,parent:zV},KV={type:r.GenericReference,id:"57fd93e4-93a1-484e-82eb-4dd15d2d0e24",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},eL={type:r.GenericReference,id:"0a86e8d5-ab21-476e-a482-b928cbf351e3",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},TR={type:r.ReturnStatement,id:fR,version:1,outputs:[QV],calledByError:[],calledByEntry:[],calledBySuccess:[KV],parent:eL,throws:null,x:0,y:0},tL={type:r.GenericReference,id:"a2db26be-57f2-48e5-9769-cdbf0d95dc7c",entityType:r.VariableDeclaration,entityId:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a"},nL={id:"c3e9d5f0-204f-45f9-85f7-e1b56b468388",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,asType:!1,isList:!1,isNullable:!1,defaultValue:null,constant:!1,parent:tL},rL={type:r.GenericReference,id:"692122c5-610a-4504-90dd-f5a5202d116c",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},iL={type:r.GenericReference,id:"do-math-func-return-one-called-by",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},aL={type:r.GenericReference,id:"6dceb501-be5b-4252-afb4-3c0d08abba33",entityType:r.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},ER={type:r.VariableDeclaration,id:"d0e9f1f3-7e9f-4e1f-8d8e-7b4b3e6c6a6a",version:1,name:"Result",dataType:nL,description:null,readsValue:aL,writesValues:[],inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[iL],successCalls:[],errorCalls:[],internalCalls:[],x:0,y:0,parent:rL},sL={type:r.GenericReference,id:"5440f523-af38-4981-8035-89d162fe8041",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},oL={type:r.GenericReference,id:"8c482c35-e674-4713-a1dd-63c3d13b611c",entityType:r.OutputMap,entityId:"64752080-ee0f-4cfe-9897-a0668f2b2aca"},lL={type:r.GenericReference,id:"c0a299cd-5869-4930-8cf0-90e3ceb8a903",entityType:r.VariableDeclaration,entityId:"46b2fe23-b417-4887-a35d-09b186679172"},cL={id:"51c0c1df-2ee3-41df-ae52-ac512d8cf795",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,asType:!1,isNullable:!1,defaultValue:null,constant:!1,parent:lL},dL={type:r.GenericReference,id:"do-math-func-return-two-called-by",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},RR={type:r.VariableDeclaration,id:"46b2fe23-b417-4887-a35d-09b186679172",version:1,name:"Total",description:null,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[dL],successCalls:[],errorCalls:[],dataType:cL,readsValue:oL,writesValues:[],internalCalls:[],parent:sL,x:0,y:0},bR={type:r.GenericReference,id:"6e4d776e-6af2-4321-b630-c78110fd677c",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},uL={type:r.GenericReference,id:"5b60955b-2486-40b6-bb24-ffd97ccd8902",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},pL={type:r.GenericReference,id:"1a49923f-bc6f-453f-a438-e74e5475c2a9",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},yL={type:r.GenericReference,id:"02bfde0a-b757-4072-9613-6e9c7c9a424a",entityType:r.ArgumentDeclaration,entityId:"d8895765-f705-457e-85fa-25d130926769"},gR={id:"928953b0-0e3f-4d8c-ae5a-84620b4b8c68",version:1,type:r.InputMap,declaration:vo,name:null,description:null,dynamicArguments:[],readsValue:yL,defaultValue:null,index:0,parent:pL},hL={id:"64752080-ee0f-4cfe-9897-a0668f2b2aca",type:r.OutputMap,version:1,declaration:Po,writesValues:[ER,RR],index:0,parent:uL},fL={type:r.GenericReference,id:"d235a7f6-07ff-4f35-98d2-8f42dd59cf9f",entityType:r.Operation,entityId:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e"},mL={id:"8827e8e9-9381-4ad7-8f61-5419c23c9136",type:r.GenericReference,entityType:r.VariableDeclaration,entityId:"72a338d8-0183-4ca2-8760-227517854595"},vR={id:"a5525249-0eb5-472b-97bc-5e4cc0d75aee",version:1,type:r.InputMap,declaration:Io,name:null,description:null,dynamicArguments:[],readsValue:mL,defaultValue:null,index:1,parent:fL},TL={type:r.Operation,id:"e8c8c0a3-2e3e-4f6a-8e3d-8e0a0f9d7d8e",declaration:Ea,version:1,inputs:[gR,vR],dynamicArguments:[],outputs:[hL],calledByError:[],calledByEntry:[bR],calledBySuccess:[],process:null,successCalls:[TR,ER,RR],errorCalls:[],parent:bR,error:null,x:0,y:0},EL={type:r.GenericReference,id:"a2c40226-2270-4963-a865-c777ba79c551",entityType:r.DataType,entityId:"a350a9e9-25ee-477f-a83d-9e98ed2451662"},RL={id:"f47731b3-f278-4ab5-aeb2-24519c1119fb",type:r.GenericReference,entityId:"72a338d8-0183-4ca2-8760-227517854595",entityType:r.ArgumentDeclaration},IR={id:"a350a9e9-25ee-477f-a83d-9e98ed2451662",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"do-math-func-argument-two-default-value-id",type:r.PrimitiveValue,version:1,value:1,name:v.Number,parent:EL,valueAsType:null,autogeneration:null},constant:!1,parent:RL},bL={type:r.GenericReference,id:"5f5d8dd0-7f3b-40cd-9f84-83d976887eaf",entityType:r.ArgumentDeclaration,entityId:"649bf0a4-6532-44aa-9818-a03d1c6564e9"},gL={type:r.GenericReference,id:"ca018d0f-a8b3-4c7e-a408-c8b372d04aff",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},vL={type:r.GenericReference,id:"do-math-func-var-called-by-ref",entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},PR={type:r.VariableDeclaration,id:"72a338d8-0183-4ca2-8760-227517854595",version:1,name:"Z",description:null,dataType:IR,inputs:[],outputs:[],calledByError:[],calledByEntry:[vL],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:bL,writesValues:[vR],internalCalls:[],x:0,y:0,parent:gL},IL={entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",type:r.GenericReference,id:"af0cf105-4075-425f-aecc-b25d3600fcc4"},PL={id:"649bf0a4-6532-44aa-9818-a03d1c6564e9",type:r.ArgumentDeclaration,version:1,name:"Z",description:"The number to add",dataType:IR,writesValues:[PR],required:!0,index:1,parent:IL},DL={type:r.GenericReference,id:"56953b5d-3e43-4dea-a62c-f3e868ba81bb",entityType:r.Project,entityId:W},AL={id:"868defc8-5c95-48ed-942d-257e8b9b9b00",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b"},SL={type:r.GenericReference,id:"35167664-a793-49f1-9eaf-fb57eac30897",entityType:r.DataType,entityId:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2"},OL={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:r.GenericReference,entityId:"d8895765-f705-457e-85fa-25d130926769",entityType:r.ArgumentDeclaration},CL={id:"55b12914-91b1-48b7-9a3e-9c5d0d2a2ec2",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:{id:"do-math-func-argument-one-default-value-id",type:r.PrimitiveValue,version:1,value:5,name:v.Number,parent:SL,valueAsType:null,autogeneration:null},constant:!1,parent:OL},BL={id:"d8895765-f705-457e-85fa-25d130926769",type:r.ArgumentDeclaration,version:1,name:"N",dataType:CL,description:"The number to add",writesValues:[gR],required:!0,index:0,parent:AL},wL={type:r.FunctionDeclaration,id:"b4c1d8d2-9c5e-4e0c-bd5e-3a6a0e4d2f0b",version:1,name:"Do math",description:"This function does math",inputs:[BL,PL],calls:[TL,PR],implements:null,index:null,collapsed:!1,returnStatements:[TR],private:!1,x:0,y:0,parent:DL},Et="replace-bank-account-in-company-func-declaration-id",kl="company-entity-to-modify-arg-declaration-id",_L="account-number-to-create-arg-decl-id",kr="company-variable-id",qr="search-person-by-id-id",DR="new-bank-account-owner-arg-decl-id",AR="search-person-by-id-output-declaration-id",ql="search-person-by-id-output-entity-map-id",Es="person-not-empty-condition-id",Rs="create-new-bank-account-instance-operation-id",SR="create-new-bank-account-instance-operation-output-entity-map-id",OR="company-bank-account-output-map-id",Jl="old-bank-account-var-declaration-id",CR="old-bank-account-var-instance-id",BR="company-variable-instance-id",Wl="delete-bank-account-internal-call-id",ML={type:r.GenericReference,id:"company-variable-instance-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},NL={type:r.GenericReference,id:"company-variable-instance-called-by-ref-id",entityType:r.InternalCall,entityId:Wl},$L={type:r.GenericReference,id:"company-variable-instance-declaration-ref-id",entityType:r.VariableDeclaration,entityId:kr},VL={type:r.GenericReference,id:"bank-account-input-map-parent-ref-id",entityType:r.VariableInstance,entityId:BR},LL={type:r.GenericReference,id:"bank-account-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:SR},wR={type:r.InputMap,id:"bank-account-input-map-id",version:1,readsValue:LL,declaration:bl,name:null,description:null,index:0,defaultValue:null,dynamicArguments:[],parent:VL},GL={type:r.VariableInstance,id:BR,version:1,declaration:$L,inputs:[wR],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[NL],successCalls:[],errorCalls:[],internalCalls:[],parent:ML,readsValue:null,writesValues:[],x:0,y:0},FL={type:r.GenericReference,id:"bank-account-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},UL={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"bank-account-variable-data-type-id",version:1,entity:Fr,asType:!1,isList:!1,isNullable:!1,constant:!1,defaultValue:null,parent:FL},xL={type:r.GenericReference,id:"bank-account-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:OR},jL={type:r.GenericReference,id:"bank-account-variable-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},kL={type:r.GenericReference,id:"bank-account-variable-called-by-ref-id",entityType:r.VariableDeclaration,entityId:kr},qL={type:r.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-id",entityType:r.Operation,entityId:Rs};r.GenericReference,r.VariableInstance;const JL={type:r.GenericReference,id:"delete-bank-account-internal-call-called-by-ref-two-id",entityType:r.VariableDeclaration,entityId:Jl},WL={type:r.GenericReference,id:"old-bank-account-variable-trigger-delete-decl-ref-id",entityType:r.VariableDeclaration,entityId:Jl},HL={type:r.GenericReference,id:"bank-account-variable-parent-ref-two-id",entityType:r.FunctionDeclaration,entityId:Et},YL={type:r.GenericReference,id:"old-bank-account-variable-trigger-delete-internal-call-ref-id",entityType:r.InternalCall,entityId:Wl},zL={type:r.VariableInstance,id:CR,version:1,declaration:WL,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],internalCalls:[YL],errorCalls:[],parent:HL,readsValue:null,writesValues:[],x:0,y:0},_R={process:null,type:r.InternalCall,id:Wl,version:1,declaration:Jo,index:0,successCalls:[GL],errorCalls:[],inputs:[],outputs:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[qL,JL],parent:zL},MR={type:r.VariableDeclaration,id:Jl,version:1,name:"Old bank account",description:"The existing bank account that needs to be replaced in the company entity",dataType:UL,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[kL],successCalls:[_R],internalCalls:[],errorCalls:[],parent:jL,readsValue:xL,writesValues:[],x:0,y:0},ZL={type:r.GenericReference,id:"company-variable-declaration-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},XL={type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,id:"company-variable-declaration-data-type-id",version:1,entity:Tt,asType:!1,isList:!1,isNullable:!1,constant:!1,defaultValue:null,parent:ZL},QL={type:r.GenericReference,id:"company-variable-declaration-reads-value-ref-id",entityType:r.ArgumentDeclaration,entityId:kl},KL={type:r.GenericReference,id:"company-variable-declaration-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},eG={type:r.GenericReference,id:"company-variable-declaration-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Et},tG={type:r.GenericReference,id:"company-bank-account-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:kr},nG={id:OR,version:1,type:r.OutputMap,declaration:bl,index:0,parent:tG,writesValues:[MR]},NR={type:r.VariableDeclaration,id:kr,version:1,name:"Company",description:"The company entity that was passed as an argument to the parent function",dataType:XL,inputs:[],outputs:[nG],calledByError:[],calledByEntry:[eG],calledBySuccess:[],successCalls:[MR],errorCalls:[],parent:KL,internalCalls:[],readsValue:QL,writesValues:[],x:0,y:0},rG={type:r.GenericReference,id:"create-new-bank-account-account-owner-dynamic-input-map-parent-ref-id",entityType:r.InputMap,entityId:"create-new-bank-account-instance-operation-entity-to-create-input-map-id"},iG={id:"create-new-bank-account-account-owner-dynamic-input-map-reads-value-ref-id",type:r.GenericReference,entityType:r.OutputMap,entityId:ql},$R={id:"create-new-bank-account-account-owner-dynamic-input-map-id",version:1,type:r.InputMap,declaration:cT,name:null,description:null,dynamicArguments:[],readsValue:iG,index:1,defaultValue:null,parent:rG},aG={id:"create-new-bank-account-account-number-dynamic-input-map-reads-value-ref-id",type:r.GenericReference,entityType:r.ArgumentDeclaration,entityId:_L},sG={type:r.GenericReference,id:"create-new-bank-account-account-number-dynamic-input-map-parent-ref-id",entityType:r.InputMap,entityId:"create-new-bank-account-instance-operation-entity-to-create-input-map-id"},VR={id:"create-new-bank-account-account-number-dynamic-input-map-id",version:1,type:r.InputMap,declaration:lT,name:null,description:null,dynamicArguments:[],readsValue:aG,defaultValue:null,index:0,parent:sG},oG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-entity-to-create-input-map-parent-ref-id",entityType:r.Operation,entityId:Rs},lG={id:"create-new-bank-account-instance-operation-entity-to-create-input-map-id",version:1,type:r.InputMap,declaration:Cr.fixedArguments[0],name:null,description:null,dynamicArguments:[VR,$R],index:0,readsValue:null,defaultValue:{type:r.PrimitiveValue,name:v.EntityTemplate,value:null,valueAsType:Fr,autogeneration:null},parent:oG},cG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-output-entity-map-parent-ref-id",entityType:r.Operation,entityId:Rs},dG={id:SR,version:1,type:r.OutputMap,declaration:Cr.fixedReturns[0],index:0,writesValues:[wR],parent:cG},uG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-called-by-ref-id",entityType:r.Condition,entityId:Es},pG={type:r.GenericReference,id:"create-new-bank-account-instance-operation-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},yG={process:null,id:Rs,type:r.Operation,version:1,declaration:Cr,inputs:[lG],dynamicArguments:[],error:null,outputs:[dG],successCalls:[_R],errorCalls:[],calledByError:[],calledByEntry:[],calledBySuccess:[uG],parent:pG,x:0,y:0},hG={id:"person-not-found-thrown-error-datatype-default-value-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-thrown-error-datatype-id",entityType:r.DataType},fG={id:"person-not-found-thrown-error-datatype-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-thrown-error-id",entityType:r.ReturnDeclaration};r.DataType,r.PrimitiveValue,v.String;const mG={id:"person-not-found-thrown-error-parent-ref-id",type:r.GenericReference,entityId:"person-not-found-error-return-statement-id",entityType:r.ReturnStatement},TG={isError:!0,id:"person-not-found-thrown-error-id",type:r.ReturnDeclaration,version:1,dataType:null,name:"Person not found error",description:"If the person entity was not found this error is outputted",parent:mG,required:!0,index:0,readsValue:null},EG={id:"person-not-found-error-return-statement-called-by-ref-id",type:r.GenericReference,entityId:Es,entityType:r.Condition},RG={id:"person-not-found-error-return-statement-parent-ref-id",type:r.GenericReference,entityId:Et,entityType:r.FunctionDeclaration},bG={id:"person-not-found-error-return-statement-id",type:r.ReturnStatement,version:1,throws:TG,outputs:[],calledBySuccess:[],calledByError:[EG],calledByEntry:[],x:0,y:0,parent:RG},gG={type:r.GenericReference,id:"person-not-empty-condition-called-by-ref-id",entityType:r.Search,entityId:qr},vG={type:r.GenericReference,id:"person-not-empty-condition-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},IG={type:r.GenericReference,id:"person-entity-to-check-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ql},PG={type:r.GenericReference,id:"person-not-empty-condition-ref-two-id",entityType:r.Condition,entityId:Es},LR={id:"person-entity-to-check-map-id",version:1,type:r.InputMap,declaration:Jn.fixedArguments[0],name:null,description:null,dynamicArguments:[],readsValue:IG,index:0,defaultValue:null,parent:PG},DG={type:r.Condition,id:Es,version:1,declaration:Jn,inputs:[LR],calledByError:[],calledByEntry:[],calledBySuccess:[gG],successCalls:[yG],errorCalls:[bG],x:0,y:0,parent:vG},AG={type:r.GenericReference,id:"search-person-by-id-output-entity-declaration-datatype-parent-ref-id",entityType:r.ReturnDeclaration,entityId:AR},SG={id:"search-person-by-id-output-entity-declaration-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,isList:!1,constant:!1,asType:!1,isNullable:!1,entity:ct,defaultValue:null,parent:AG},OG={type:r.GenericReference,id:"search-person-by-id-output-entity-declaration-parent-ref-id",entityType:r.Search,entityId:qr},GR={isError:!1,id:AR,type:r.ReturnDeclaration,version:1,dataType:SG,name:"Found person",description:"The person entity that was found",parent:OG,required:!0,index:0,readsValue:null},CG={type:r.GenericReference,id:"search-person-by-id-output-entity-map-parent-ref-id",entityType:r.Search,entityId:qr},BG={type:r.OutputMap,id:ql,version:1,declaration:GR,parent:CG,writesValues:[LR,$R],index:0},wG={id:"search-person-by-id-input-declaration-datatype-parent-ref-id",type:r.GenericReference,entityId:"search-person-by-id-input-declaration-id",entityType:r.ArgumentDeclaration};r.DataType;const _G={type:r.GenericReference,id:"search-person-by-id-input-declaration-parent-ref-id",entityType:r.Search,entityId:qr},FR={id:"search-person-by-id-input-declaration-id",type:r.ArgumentDeclaration,version:1,dataType:null,name:"Person ID",description:"The unique identifier (ID) property of the person entity",index:0,required:!0,parent:_G,writesValues:[]},MG={type:r.GenericReference,id:"search-person-by-id-input-map-parent-ref-id",entityType:r.Search,entityId:qr},NG={id:"search-person-by-id-input-map-reads-value-ref-id",type:r.GenericReference,entityId:DR,entityType:r.ArgumentDeclaration},UR={type:r.InputMap,id:"search-person-by-id-input-map",version:1,declaration:FR,name:null,description:null,readsValue:NG,defaultValue:null,parent:MG,dynamicArguments:[],index:0},$G={from:{name:"c9bc312a-10d3-48a7-9ab4-ea483a9e2416"},items:[{name:"*"}],where:[{name:"id",value:"{{dynamic_value_1}}"}]},VG={type:r.GenericReference,id:"search-person-by-id-parent-ref-id",entityType:r.FunctionDeclaration,entityId:Et},LG={type:r.GenericReference,id:"search-person-by-id-called-by-ref-id",entityType:r.FunctionDeclaration,entityId:Et},GG={type:r.Search,id:qr,version:1,name:"Search person by ID",description:"Searches for a person entity given the UUID",query:$G,inputsDeclarations:[FR],inputs:[UR],outputsDeclarations:[GR],outputs:[BG],calledByError:[],calledByEntry:[LG],calledBySuccess:[],error:null,successCalls:[DG],errorCalls:[],parent:VG,x:0,y:0};r.GenericReference,r.DataType;const FG={id:"account-number-to-create-arg-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:"account-number-to-create-arg-decl-id",entityType:r.ArgumentDeclaration},UG={id:"account-number-to-create-arg-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:F,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:FG},xG={entityType:r.FunctionDeclaration,entityId:Et,type:r.GenericReference,id:"account-number-to-create-arg-decl-parent-ref-id"},jG={id:"account-number-to-create-arg-decl-id",type:r.ArgumentDeclaration,version:1,name:"Account number",description:"The account number of the new bank account entity",dataType:UG,writesValues:[VR],required:!0,index:1,parent:xG};r.GenericReference,r.DataType;const kG={id:"new-bank-account-owner-arg-decl-data-type-parent-ref-id",type:r.GenericReference,entityId:"new-bank-account-owner-arg-decl-id",entityType:r.ArgumentDeclaration},qG={id:"new-bank-account-owner-arg-decl-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Ta,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:kG},JG={entityType:r.FunctionDeclaration,entityId:Et,type:r.GenericReference,id:"new-bank-account-owner-arg-decl-parent-ref-id"},WG={id:DR,type:r.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:qG,writesValues:[UR],required:!1,index:1,parent:JG},HG={type:r.GenericReference,id:"replace-bank-account-in-company-parent-ref",entityType:r.Project,entityId:W},YG={type:r.GenericReference,id:"company-entity-to-modify-parent-ref",entityType:r.FunctionDeclaration,entityId:Et};r.GenericReference,r.DataType;const zG={id:"d47ceef6-be6f-40f1-a7b3-c73c8d8a6c6a",type:r.GenericReference,entityId:kl,entityType:r.ArgumentDeclaration},ZG={id:"company-entity-to-modify-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:De,isList:!1,isNullable:!1,asType:!1,defaultValue:null,constant:!1,parent:zG},XG={id:kl,type:r.ArgumentDeclaration,version:1,name:"Company",dataType:ZG,description:"The company to replace the bank account for",writesValues:[NR],required:!0,index:0,parent:YG},QG={type:r.FunctionDeclaration,id:Et,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:[XG,jG,WG],index:null,implements:null,calls:[GG,NR],collapsed:!1,returnStatements:[],private:!1,x:0,y:0,parent:HG},KG={type:r.GenericReference,id:"e0a937bd-3a85-4037-a973-916985b9f94b",entityType:r.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},eF={type:r.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:KG,x:0,y:0},tF={type:r.GenericReference,id:"948e6869-ae5b-4914-bea0-b9f02ad6a014",entityType:r.Project,entityId:"23b23d8b-1929-4505-a350-745c8550e731"},nF={type:r.GenericReference,id:"f3d6f2c6-1b3e-4e9d-8c9d-5b5b9f0b8d9c",entityType:r.Project,entityId:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6"},rF={type:r.InstalledProject,version:1,id:"7268bc97-c0e6-4d88-b37e-d3241b5f77a6",name:"Third Party Installed Project",description:null,functions:[eF],events:[],implements:nF,parent:tF,x:0,y:0},Hl="iterate-over-list-loop-id",xR="iterate-over-list-loop-body-id",jR="iterate-over-list-loop-body-current-iteration-argument-declaration-id",iF={type:r.GenericReference,id:"iterate-over-list-loop-body-current-iteration-argument-declaration-data-type-parent-ref-id",entityId:jR,entityType:r.ArgumentDeclaration},aF={id:"iterate-over-list-loop-body-current-iteration-argument-declaration-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,defaultValue:null,entity:null,isList:!1,isNullable:!1,asType:!1,constant:!1,parent:iF},sF={id:"iterate-over-list-loop-body-current-iteration-argument-declaration-parent-ref-id",type:r.GenericReference,entityId:xR,entityType:r.FunctionDeclaration},oF={id:jR,type:r.ArgumentDeclaration,version:1,name:"Current value",description:"The current value being processed.",dataType:aF,required:!0,index:0,writesValues:[],parent:sF},lF={id:"iterate-over-list-loop-body-parent-ref-id",type:r.GenericReference,entityId:Hl,entityType:r.Loop},cF={id:xR,type:r.FunctionDeclaration,version:1,name:"Iteration logic trigger",description:"This function is called once for each entity in the list.",inputs:[oF],calls:[],implements:null,collapsed:!1,returnStatements:[],private:!1,index:0,x:0,y:0,parent:lF},dF={id:"iterate-over-list-loop-iteration-list-input-map-parent-ref-id",type:r.GenericReference,entityId:Hl,entityType:r.Loop},uF={id:"iterate-over-list-loop-iteration-list-input-map-id",type:r.InputMap,version:1,name:null,description:null,declaration:qn.fixedArguments[0],defaultValue:null,dynamicArguments:[],readsValue:null,index:0,parent:dF},pF={id:"iterate-over-list-loop-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},yF={id:Hl,type:r.Loop,version:1,declaration:qn,inputs:[uF],successCalls:[],errorCalls:[],outputs:[],process:null,body:cF,calledByError:[],calledByEntry:[],calledBySuccess:[],breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:pF};var Yl=(n=>(n.EQ="eq",n.NEQ="neq",n.GT="gt",n.GTE="gte",n.LT="lt",n.LTE="lte",n.LIKE="like",n.ILIKE="ilike",n))(Yl||{}),kR=(n=>(n.COUNT="count",n.SUM="sum",n.AVG="avg",n.MIN="min",n.MAX="max",n))(kR||{});const hF={from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:{from:{name:"ed3a6098-12ee-4632-a6dd-c2e6c542f66d"},items:[{function:{name:kR.COUNT,items:["f8310850-a87e-405c-b182-4f1d5fa49240"]},alias:"employee_count"}],where:[{name:"80c86e1b-caca-4ba5-9b1f-38f72d10e4a3",operation:Yl.NEQ,value:null}]},where:[{name:"employee_count",operation:Yl.GT,value:1}]},fF={id:"find-companies-with-multiple-employees-and-bank-account-search-parent-ref-id",type:r.GenericReference,entityId:W,entityType:r.Project},mF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-parent-ref-id",type:r.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:r.Search},qR={isError:!1,id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-declaration-id",type:r.ReturnDeclaration,version:1,name:"companies",description:"List of companies with multiple employees and an existing bank account",dataType:null,readsValue:null,required:!0,index:0,parent:mF},TF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-parent-ref-id",type:r.GenericReference,entityId:"find-companies-with-multiple-employees-and-bank-account",entityType:r.Search},EF={id:"find-companies-with-multiple-employees-and-bank-account-search-companies-list-output-id",type:r.OutputMap,version:1,declaration:qR,writesValues:[],index:0,parent:TF},RF={id:"find-companies-with-multiple-employees-and-bank-account",type:r.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:[qR],inputs:[],outputs:[EF],query:hF,successCalls:[],errorCalls:[],error:null,calledByError:[],calledByEntry:[],calledBySuccess:[],x:0,y:0,parent:fF},Jr="random-company-employee-test-variable-id",zl="manager-global-variable-id",JR="global-user-instance-id",Kn="employee-mapped-dto-variable-id",Zl="employee-mapped-dto-variable-instance-id",WR="random-employee-id-output-map-id",HR="random-employee-birth-date-output-map-id",YR="random-employee-department-output-map-id",zR="random-employee-manager-output-map-id",ZR="manager-global-id-output-map-id",XR="global-user-instance-id-output-map-id",bF="employee-mapped-dto-requester-id-input-map-id",QR="employee-mapped-dto-now-timestamp-input-map-id",gF="employee-mapped-dto-id-input-map-id",vF="employee-mapped-dto-birth-date-input-map-id",IF="employee-mapped-dto-department-input-map-id",PF="employee-mapped-dto-manager-input-map-id",DF={type:r.GenericReference,id:"employee-mapped-dto-manager-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:ZR},AF={type:r.GenericReference,id:"employee-mapped-dto-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},KR={id:PF,type:r.InputMap,version:1,declaration:null,name:"manager_id",description:null,defaultValue:null,dynamicArguments:[],index:4,readsValue:DF,parent:AF},SF={type:r.GenericReference,id:"employee-mapped-dto-department-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:YR},OF={type:r.GenericReference,id:"employee-mapped-dto-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},eb={id:IF,type:r.InputMap,version:1,declaration:null,name:"department_name",description:null,defaultValue:null,dynamicArguments:[],index:3,readsValue:SF,parent:OF},CF={type:r.GenericReference,id:"employee-mapped-dto-birth-date-input-map-reads-value-ref-id",entityType:r.OutputMap,entityId:HR},BF={type:r.GenericReference,id:"employee-mapped-dto-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},tb={id:vF,type:r.InputMap,version:1,declaration:null,name:"birth_date",description:null,defaultValue:null,dynamicArguments:[],index:2,readsValue:CF,parent:BF},wF={type:r.GenericReference,id:"employee-mapped-dto-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:WR},_F={type:r.GenericReference,id:"employee-mapped-dto-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},nb={id:gF,type:r.InputMap,version:1,declaration:null,name:"id",description:"The ID of the employee",defaultValue:null,dynamicArguments:[],index:1,readsValue:wF,parent:_F},MF={type:r.GenericReference,id:"employee-mapped-dto-requester-id-output-map-reads-value-ref-id",entityType:r.OutputMap,entityId:XR},NF={type:r.GenericReference,id:"employee-mapped-dto-requester-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Kn},rb={id:bF,type:r.InputMap,version:1,declaration:null,name:"requester_id",description:"The ID of the current user making the request",defaultValue:null,dynamicArguments:[],index:0,readsValue:MF,parent:NF},$F={type:r.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:zl},VF={id:ZR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[KR],parent:$F},LF={type:r.GenericReference,id:"manager-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:zl},GF={id:"manager-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:LF,defaultValue:null},FF={type:r.GenericReference,id:"manager-variable-reads-value-ref-id",entityType:r.OutputMap,entityId:zR},UF={type:r.GenericReference,id:"manager-variable-parent-ref-id",entityType:r.Project,entityId:W},ib={id:zl,type:r.VariableDeclaration,version:1,name:"Manager",dataType:GF,description:"A variable holding an inherited manager for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:FF,writesValues:[],inputs:[],outputs:[VF],internalCalls:[],parent:UF,x:0,y:0},xF={type:r.GenericReference,id:"random-company-employee-manager-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},jF={id:zR,type:r.OutputMap,version:1,declaration:Dt.properties[2],index:3,writesValues:[ib],parent:xF},kF={type:r.GenericReference,id:"random-company-employee-department-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},qF={id:YR,type:r.OutputMap,version:1,declaration:Dt.properties[0],index:2,writesValues:[eb],parent:kF},JF={type:r.GenericReference,id:"random-company-employee-birth-date-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},WF={id:HR,type:r.OutputMap,version:1,declaration:ct.properties[1],index:1,writesValues:[tb],parent:JF},HF={type:r.GenericReference,id:"random-company-employee-id-output-map-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},YF={id:WR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[nb],parent:HF},zF={type:r.GenericReference,id:"random-company-employee-test-variable-data-type-parent-ref-id",entityType:r.VariableDeclaration,entityId:Jr},ZF={id:"random-company-employee-test-variable-data-type-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,version:1,entity:Dt,asType:!1,isList:!1,isNullable:!0,constant:!1,parent:zF,defaultValue:null},XF={type:r.GenericReference,id:"random-company-employee-test-variable-parent-ref-id",entityType:r.Project,entityId:W},QF={id:Jr,type:r.VariableDeclaration,version:1,name:"Company employee",dataType:ZF,description:"A variable holding a random company employee for testing purposes",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[YF,WF,qF,jF],internalCalls:[],parent:XF,x:0,y:0},KF={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-parent-ref-id",entityType:r.InputMap,entityId:QR},e4={type:r.PrimitiveValue,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-default-value-id",name:v.Date,version:1,valueAsType:null,value:null,autogeneration:{type:Ue.CurrentDateAndTime,rangeStart:null,rangeEnd:null},parent:KF},t4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-now-timestamp-input-map-parent-ref-id",entityType:r.VariableInstance,entityId:Zl},n4={id:QR,type:r.InputMap,version:1,declaration:null,name:"now",description:"The current timestamp when the operation is executed",defaultValue:e4,dynamicArguments:[],index:5,readsValue:null,parent:t4},r4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-decl-ref-id",entityType:r.VariableDeclaration,entityId:Kn},i4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-called-by-success-ref-id",entityType:r.VariableDeclaration,entityId:Zl},a4={type:r.GenericReference,id:"employee-mapped-dto-variable-instance-parent-ref-id",entityType:r.Project,entityId:W},s4={id:Zl,type:r.VariableInstance,version:1,declaration:r4,calledByError:[],calledByEntry:[],calledBySuccess:[i4],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[n4],outputs:[],internalCalls:[],parent:a4,x:0,y:0},o4={type:r.GenericReference,id:"employee-mapped-dto-variable-parent-ref-id",entityType:r.Project,entityId:W},l4={id:Kn,type:r.VariableDeclaration,version:1,name:"Employee DTO",dataType:null,description:"A variable holding the data of a mapped employee DTO",calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[s4],errorCalls:[],readsValue:null,writesValues:[],inputs:[rb,nb,tb,eb,KR],outputs:[],internalCalls:[],parent:o4,x:0,y:0},c4={type:r.GenericReference,id:"0e63e617-f9d3-42e8-bde0-1bb0b1df7034",entityType:r.VariableDeclaration,entityId:hl},d4={id:"e75645ce-d3df-4f07-a897-ae9ef4d917fd",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:ml,version:1,asType:!1,isList:!1,isNullable:!1,constant:!1,parent:c4,defaultValue:null},u4={type:r.GenericReference,id:"e92a8ff5-3fef-4e0c-8d8f-92c930b2890b",entityType:r.Project,entityId:W},ab={id:hl,type:r.VariableDeclaration,version:1,name:"Current user",description:"The user that is currently logged in",dataType:d4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:u4},p4={type:r.GenericReference,id:"manager-variable-id-output-map-parent-ref-id",entityType:r.VariableInstance,entityId:JR},y4={id:XR,type:r.OutputMap,version:1,declaration:_e.properties[1],index:0,writesValues:[rb],parent:p4},h4={type:r.GenericReference,id:"global-user-instance-parent-ref-id",entityType:r.Project,entityId:W},f4={id:JR,type:r.VariableInstance,version:1,declaration:ab,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[y4],internalCalls:[],parent:h4,x:0,y:0},m4={type:r.GenericReference,id:"is-test-environment-variable-dcl-datatype-parent-ref-id",entityType:r.VariableDeclaration,entityId:hl},T4={type:r.GenericReference,id:"is-test-environment-variable-dcl-datatype-default-value-parent-ref-id",entityType:r.DataType,entityId:"is-test-environment-variable-dcl-datatype-id"},E4={id:"is-test-environment-variable-dcl-datatype-id",type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,entity:bn,version:1,asType:!1,isList:!1,isNullable:!1,constant:!0,parent:m4,defaultValue:{id:"is-test-environment-variable-dcl-datatype-default-value-id",name:v.Boolean,version:1,value:null,type:r.PrimitiveValue,autogeneration:{type:Ue.Random,rangeStart:null,rangeEnd:null},valueAsType:null,parent:T4}},R4={type:r.GenericReference,id:"is-test-environment-variable-dcl-main-project-ref-id",entityType:r.Project,entityId:W},sb={id:"is-test-environment-variable-dcl-id",type:r.VariableDeclaration,version:1,name:"Is test envrioment",description:"Indicates whether the current environment is a test environment or not.",dataType:E4,inputs:[],outputs:[],calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],x:0,y:0,readsValue:null,writesValues:[],internalCalls:[],parent:R4},b4={type:r.GenericReference,id:"is-test-environment-variable-instance-parent-ref-id",entityType:r.Project,entityId:W},g4={id:"is-test-environment-variable-instance-id",type:r.VariableInstance,version:1,declaration:sb,calledByError:[],calledByEntry:[],calledBySuccess:[],successCalls:[],errorCalls:[],readsValue:null,writesValues:[],inputs:[],outputs:[],internalCalls:[],parent:b4,x:0,y:0},ob={type:r.Project,id:W,version:1,name:"Mocked project to compile",description:"This project is used to test all sorts of features and edge cases. It is not meant to be used in production. Or to have any functionality that makes sense",projects:[rF],entities:[fl,ml,ct,u_,Dt,ls,vT,IT,Fr,aw,Tt,e_,rT,XD,rw],functions:[SV,zT,$l,$V,kV,cE,Vl,gl,QG,_T,wL],events:[q_],variableDeclarations:[sb,ab,xl,QF,ib,l4],variableInstances:[g4,f4],conditions:[],operations:[jr],functionCalls:[jM,zN],loops:[yF],searches:[RF]};var m=(n=>(n.Error="error",n.Warning="warning",n))(m||{}),g=(n=>(n.InvalidObjectStructure="invalid-object-structure",n.NameNotUniqueInScope="name-not-unique-in-scope",n.EmptyName="empty-name",n.MissingCaller="missing-caller",n.PropertyOverwrite="property-overwrite",n.MethodOverwrite="method-overwrite",n.NoOverlapWithImplementedSignature="no-overlap-with-implemented-signature",n.ReaderWriterIncompatibleDataType="reader-writer-incompatible-data-type",n.UnreachableEntity="unreachable-entity",n.InternalCallParentMissingDataType="internal-call-parent-missing-data-type",n.InternalCallParentDeclarationEntityInvalidType="internal-call-parent-declaration-entity-invalid-type",n.InternalCallDeclarationNotFoundInParentDatatypeEntity="internal-call-declaration-not-found-in-parent-datatype-entity",n.InternalCallDeclarationIsNotFunctionDeclaration="internal-call-declaration-is-not-function-declaration",n.InternalCallDeclarationNotInParentDatatypeEntity="internal-call-declaration-not-in-parent-datatype-entity",n))(g||{}),y=(n=>(n.RootReference="root-reference",n.ReferencedEntityNotFound="referenced-entity-not-found",n.EntityIdNotUnique="entity-id-not-unique",n.BuiltInEntityGenerated="built-in-entity-generated",n.BuiltInEntityUpdated="built-in-entity-updated",n.BuiltInEntityDeleted="built-in-entity-deleted",n.UnknownEntityType="unknown-entity-type",n.MissingTypeProperty="missing-type-property",n.MissingIdProperty="missing-id-property",n.BuiltInEntityParent="built-in-entity-parent",n.InvalidBuiltInEntityReference="invalid-built-in-entity-reference",n.RecommendedImplementAbstractEntityAction="recommended-implement-abstract-entity-action",n.RecommendedImplementOperationAction="recommended-implement-operation-action",n.RecommendedImplementFunctionCallAction="recommended-implement-function-call-action",n.RecommendedImplementVariableDeclarationAction="recommended-implement-variable-declaration-action",n.RecommendedImplementVariableInstanceAction="recommended-implement-variable-instance-action",n.RecommendedImplementConditionAction="recommended-implement-condition-action",n.InvalidReferenceObjectStructure="invalid-reference-object-structure",n.ContainsSingleButShouldBeReferenceList="contains-single-but-should-be-reference-list",n.ContainsListButShouldReferenceSingle="contains-list-but-should-reference-single",n.InvalidParentReference="invalid-parent-reference",n.InvalidImplementsReference="invalid-implements-reference",n.InvalidExtendsReference="invalid-extends-reference",n.InvalidGenerationActionPayload="invalid-generation-action-payload",n.InvalidReference="invalid-reference",n.InvalidInternalCallParentRelation="invalid-internal-call-parent-relation",n.InvalidUpdateEntityOperation="invalid-update-entity-operation",n.NewEntityWouldOverriteExisting="new-entity-would-overrite-existing",n.InvalidDownstreamPropertyOverride="invalid-downstream-property-override",n.UnrecognizedProperty="unrecognized-property",n.SelfReference="self-reference",n.DuplicateReference="duplicate-reference",n.CallerWithIncompatibleScope="caller-with-incompatible-scope",n.InvalidFunctionDeclarationForFunctionCall="invalid-function-declaration-for-function-call",n.InvalidInputMapDeclaration="invalid-input-map-declaration",n.InvalidActionDescriptorForOperation="invalid-action-descriptor-for-operation",n.InvalidActionDescriptorForCondition="invalid-action-descriptor-for-condition",n.InvalidActionDescriptorForLoop="invalid-action-descriptor-for-loop",n.InvalidInmutablePropertyOverride="invalid-inmutable-property-override",n.OutputOverwrite="output-overwrite",n.InputOverwrite="input-overwrite",n.IncompatibleScope="incompatible-scope",n.InvalidParentUpdate="invalid-parent-update",n.NonInteractiveEntityReferenced="non-interactive-entity-referenced",n.InvalidParentRelationType="invalid-parent-relation-type",n))(y||{}),O=(n=>(n.ScopeWithoutLogic="scope-without-logic",n.ExtendingAbstractEntity="extending-abstract-entity",n.ImplementingNonAbstractEntity="implementing-non-abstract-entity",n.AbstractEntityWithNonAbstractMethods="abstract-entity-with-non-abstract-methods",n.AbstractEntityWithNonAbstractProperties="abstract-entity-with-non-abstract-properties",n.StaticEntityWithNonStaticProperties="static-entity-with-non-static-properties",n.NonStaticPropertyInStaticEntity="non-static-property-in-static-entity",n.AbstractPropertyInNonAbstractEntity="abstract-property-in-non-abstract-entity",n.AbstractMethodInNonAbstractEntity="abstract-method-in-non-abstract-entity",n.IncorrectEntityImplementation="incorrect-entity-implementation",n.IncorrectMethodImplementation="incorrect-method-implementation",n.IncorrectPropertyImplementation="incorrect-property-implementation",n.PropertyImplementsNonAbstact="property-implements-non-abstract",n.NonStaticPropertyImplementsStatic="non-static-property-implements-static",n.StaticPropertyImplementsNonStatic="static-property-implements-non-static",n.PropertyImplementsIncompatibleType="property-implements-incompatible-type",n.MissingPropertyImplementation="missing-property-implementation",n.MissingMethodImplementation="missing-method-implementation",n.NoProperties="no-properties",n.ReadingFromIncompatibleType="reading-from-incompatible-type",n.WritingToIncompatibleType="writing-to-incompatible-type",n.InvalidPropertiesCombination="invalid-properties-combination",n.DisconnectedCallableEntity="disconnected-callable-entity",n.VariableReadsValueAndInternalCall="variable-reads-value-and-internal-call",n.VariableWritesValuesAndInternalCall="variable-writes-values-and-internal-call",n.VariableHasInputsAndInternalCall="variable-has-inputs-and-internal-calls",n.VariableHasOutputsAndInternalCall="variable-has-outputs-and-internal-call",n.VariableIsCalledAndHasInternalCall="variable-is-called-and-has-internal-call",n.VariableCallsOthersAndHasInternalCall="variable-calls-others-and-has-internal-call",n))(O||{});class E{constructor(e){l(this,"id");l(this,"message");l(this,"issue");l(this,"severity");l(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 g?new er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:e}):null}}class er{constructor(e){l(this,"id");l(this,"message");l(this,"issue");l(this,"severity");l(this,"code");l(this,"entity");this.id=e.id,this.message=e.message,this.issue=e.issue,this.severity=e.severity,this.code=e.code,this.entity=e.entity}clone(){return new er({id:this.id,message:this.message,issue:this.issue,severity:this.severity,code:this.code,entity:this.entity})}}function v4(n){const e=new Set;return n.filter(t=>e.has(t.id)?!1:(e.add(t.id),!0))}function j(n){const e=n.entity.errors.find(i=>i.id===n.id);return e?{new:!1,error:e}:{new:!0,error:new er(n)}}function I4(n,e){const t=new Map;return n.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function X(n,e){const t=[];return e.forEach(i=>{const a=n.find(s=>s.id===i.id);a?t.push(a):t.push(i)}),t}const Wi=c.union([c.string(),c.number(),c.boolean(),c.date()]),lb=c.enum([Ue.CurrentDateAndTime,Ue.Random,Ue.Unique]),bs=c.object({type:lb,rangeStart:Wi.nullable(),rangeEnd:Wi.nullable()}),Hi=bs.extend({type:c.literal(Ue.Random),rangeStart:Wi,rangeEnd:Wi}),Xl=bs.extend({type:c.literal(Ue.Unique),rangeStart:c.null(),rangeEnd:c.null()}),cb=bs.extend({type:c.literal(Ue.CurrentDateAndTime),rangeStart:c.null(),rangeEnd:c.null()}),gs=Hi.extend({rangeStart:c.number().nullable(),rangeEnd:c.number().nullable()}),db=gs.extend({rangeStart:c.number(),rangeEnd:c.null()}),ub=gs.extend({rangeStart:c.null(),rangeEnd:c.number()}),pb=gs.extend({rangeStart:c.number(),rangeEnd:c.number()}),vs=Hi.extend({rangeStart:c.number().nullable(),rangeEnd:c.number().nullable()}),yb=vs.extend({rangeStart:c.number(),rangeEnd:c.null()}),hb=vs.extend({rangeStart:c.null(),rangeEnd:c.number()}),fb=vs.extend({rangeStart:c.number(),rangeEnd:c.number()}),Is=Hi.extend({rangeStart:c.date().nullable(),rangeEnd:c.date().nullable()}),mb=Is.extend({rangeStart:c.date(),rangeEnd:c.null()}),Tb=Is.extend({rangeStart:c.null(),rangeEnd:c.date()}),Eb=Is.extend({rangeStart:c.date(),rangeEnd:c.date()}),Ql=Hi.extend({rangeStart:c.null(),rangeEnd:c.null()}),Kl=c.union([yb,hb,fb]),ec=c.union([db,ub,pb]),tc=c.union([mb,Tb,Eb,cb]),nc=c.union([Kl,ec,tc,Xl,Ql]);function rc(){return c.union([c.object({type:c.literal(r.ValueDescriptor)}),c.record(c.string(),c.any())])}function Rb(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ValueDescriptor)})}function ic(){return c.object({id:c.string(),type:c.literal(r.ValueDescriptor),name:c.string(),required:c.boolean()})}function P4(){return ic().merge(c.object({version:c.number(),index:c.number()}))}function D4(){return ic().merge(c.object({}))}function A4(){return c.object({dataType:un(),parent:cn()})}function S4(){return P4().merge(A4())}function Ps(){return c.union([c.object({type:c.literal(r.PrimitiveEntity)}),c.record(c.string(),c.any())])}function Ds(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.PrimitiveEntity)})}function As(){return c.object({id:c.string(),type:c.literal(r.PrimitiveEntity),name:c.string(),description:c.string().nullable(),static:c.boolean(),abstract:c.boolean()})}function O4(){return As().merge(c.object({version:c.number()}))}function C4(){return As().merge(c.object({}))}function B4(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([Ps(),Wr()]))})}function w4(){return O4().merge(B4())}function tr(){return c.union([c.object({type:c.literal(r.Property)}),c.record(c.string(),c.any())])}function bb(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Property)})}function ac(){return c.object({id:c.string(),type:c.literal(r.Property),name:c.string(),description:c.string().nullable(),private:c.boolean(),static:c.boolean(),required:c.boolean(),abstract:c.boolean()})}function _4(){return ac().merge(c.object({version:c.number(),index:c.number()}))}function M4(){return ac().merge(c.object({}))}function N4(){return c.object({dataType:un(),implements:tr().nullable(),parent:c.union([ar(),Ds(),Ss()])})}function $4(){return _4().merge(N4())}function V4(){return c.enum([_.CRON_JOB,_.EXECUTION,_.HTTP_ENDPOINT,_.PERSISTED_ENTITY,_.RELATIONAL_DATABASE])}function Wr(){return c.union([c.object({type:c.literal(r.BuiltInBaseEntity)}),c.record(c.string(),c.any())])}function Ss(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.BuiltInBaseEntity)})}function sc(){return c.object({id:c.string(),version:c.number(),type:c.literal(r.BuiltInBaseEntity),name:V4(),description:c.string().nullable(),abstract:c.boolean(),static:c.boolean()})}function L4(){return sc()}function G4(){return sc().merge(c.object({}))}function F4(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([Wr(),Ps()]))})}function U4(){return L4().merge(F4())}function gb(){return c.enum([L.Dynamic,L.Fixed,L.None])}function Yt(){return c.union([c.object({type:c.literal(r.ActionDescriptor)}),c.record(c.string(),c.any())])}function cn(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ActionDescriptor)})}function Os(){return c.object({id:c.string(),type:c.literal(r.ActionDescriptor),name:c.string(),description:c.string().nullable(),argumentsType:gb(),returnsType:gb()})}function x4(){return Os().merge(c.object({version:c.number()}))}function j4(){return Os().merge(c.object({}))}function k4(){return c.object({fixedArguments:c.array(rc()),fixedReturns:c.array(rc()),dynamicArgumentTypes:un().nullable(),dynamicReturnTypes:un().nullable(),parent:c.union([Rt(),ar(),Ss(),Ds()]).nullable()})}function vb(){return x4().merge(k4())}function Hr(){return c.union([c.object({type:c.literal(r.Loop)}),c.record(c.string(),c.any())])}function zt(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Loop)})}function Ib(){return c.object({id:c.string(),type:c.literal(r.Loop)})}function q4(){return Ib().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function J4(){return Ib().merge(c.object({declaration:c.union([c.string(),St()])}))}function W4(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),declaration:Yt(),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),error:ut(),body:St(),parent:c.union([yn(),Rt()]),breakStatements:c.array(Qr()),continueStatements:c.array(Yr())})}function H4(){return q4().merge(W4())}function Yr(){return c.union([c.object({type:c.literal(r.ContinueStatement)}),c.record(c.string(),c.any())])}function zr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ContinueStatement)})}function oc(){return c.object({id:c.string(),type:c.literal(r.ContinueStatement)})}function Y4(){return oc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function z4(){return oc().merge(c.object({}))}function Z4(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:zt()})}function X4(){return Y4().merge(Z4())}function nr(){return c.union([c.object({type:c.literal(r.ReturnStatement)}),c.record(c.string(),c.any())])}function Zr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ReturnStatement)})}function lc(){return c.object({id:c.string(),type:c.literal(r.ReturnStatement)})}function Q4(){return lc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function K4(){return lc().merge(c.object({}))}function eU(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:yn()})}function tU(){return Q4().merge(eU())}function Yi(){return c.union([c.object({type:c.literal(r.Search)}),c.record(c.string(),c.any())])}function Xr(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Search)})}function cc(){return c.object({id:c.string(),type:c.literal(r.Search),name:c.string(),query:c.any(),description:c.string().nullable()})}function nU(){return cc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function rU(){return cc().merge(c.object({}))}function iU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),inputsDeclarations:c.array(ir()),inputs:c.array(At()),outputsDeclarations:c.array(Zt()),outputs:c.array(ut()),parent:c.union([yn(),Rt()]),error:ut().nullable()})}function aU(){return nU().merge(iU())}function Zt(){return c.union([c.object({type:c.literal(r.ReturnDeclaration)}),c.record(c.string(),c.any())])}function Pb(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ReturnDeclaration)})}function dc(){return c.object({id:c.string(),type:c.literal(r.ReturnDeclaration),name:c.string(),description:c.string().nullable(),isError:c.boolean()})}function sU(){return dc().merge(c.object({version:c.number(),index:c.number()}))}function oU(){return dc().merge(c.object({}))}function lU(){return c.object({dataType:un().nullable(),readsValue:Qi().nullable(),parent:c.union([Zr(),cn(),cn(),Xr(),dn(),zr()])})}function cU(){return sU().merge(lU())}function Qr(){return c.union([c.object({type:c.literal(r.BreakStatement)}),c.record(c.string(),c.any())])}function dn(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.BreakStatement)})}function uc(){return c.object({id:c.string(),type:c.literal(r.BreakStatement)})}function dU(){return uc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function uU(){return uc().merge(c.object({}))}function pU(){return c.object({calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),outputs:c.array(Zt()),throws:c.optional(Zt()),parent:zt()})}function yU(){return dU().merge(pU())}function ut(){return c.union([c.object({type:c.literal(r.OutputMap)}),c.record(c.string(),c.any())])}function pc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.OutputMap)})}function yc(){return c.object({id:c.string(),type:c.literal(r.OutputMap)})}function hU(){return yc().merge(c.object({version:c.number(),index:c.number()}))}function fU(){return yc().merge(c.object({}))}function mU(){return c.object({writesValues:c.array(pn()),declaration:c.union([Zt(),tr()]),parent:c.union([ye(),zt(),dn()])})}function TU(){return hU().merge(mU())}function Kr(){return c.union([c.object({type:c.literal(r.FunctionCall)}),c.record(c.string(),c.any())])}function zi(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.FunctionCall)})}function hc(){return c.object({id:c.string(),type:c.literal(r.FunctionCall)})}function EU(){return hc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function RU(){return hc().merge(c.object({}))}function bU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:St(),inputs:c.array(At()),outputs:c.array(ut()),error:c.optional(ut()),parent:c.union([yn(),Rt()])})}function gU(){return EU().merge(bU())}function vU(){return c.enum([Oe.Equal,Oe.NotEqual,Oe.MoreThan,Oe.MoreThanOrEqual,Oe.LessThan,Oe.LessThanOrEqual,Oe.And,Oe.Or,wt.Empty,wt.NotEmpty])}function Zi(){return c.union([c.object({type:c.literal(r.Condition)}),c.record(c.string(),c.any())])}function Cs(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Condition)})}function fc(){return c.object({id:c.string(),type:c.literal(r.Condition)})}function IU(){return fc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function PU(){return fc().merge(c.object({}))}function DU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),leftValue:At(),rightValue:At().nullable(),operator:vU(),parent:c.union([yn(),Rt()])})}function AU(){return IU().merge(DU())}function Xi(){return c.union([c.object({type:c.literal(r.InternalCall)}),c.record(c.string(),c.any())])}function mc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InternalCall)})}function Tc(){return c.object({id:c.string(),type:c.literal(r.InternalCall),index:c.number()})}function SU(){return Tc().merge(c.object({version:c.number(),index:c.number()}))}function OU(){return Tc().merge(c.object({declaration:c.union([c.string(),St()])}))}function CU(){return c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:St(),inputs:c.array(At()),outputs:c.array(ut()),parent:_n(),error:c.optional(ut())})}function BU(){return SU().merge(CU())}function At(){return c.union([c.object({type:c.literal(r.InputMap)}),c.record(c.string(),c.any())])}function Bs(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InputMap)})}function Ec(){return c.object({id:c.string(),type:c.literal(r.InputMap),name:c.string().nullable().optional(),description:c.string().nullable().optional()})}function wU(){return Ec().merge(c.object({version:c.number(),index:c.number()}))}function _U(){return Ec().merge(c.object({}))}function MU(){return c.object({defaultValue:Rc().nullable(),declaration:c.union([ir(),tr()]).nullable(),readsValue:Qi().nullable(),parent:c.union([ye(),Bs(),zt(),dn()]),dynamicArguments:c.array(At())})}function NU(){return wU().merge(MU())}function ei(){return c.union([c.object({type:c.literal(r.Operation)}),c.record(c.string(),c.any())])}function ti(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.Operation)})}function ws(){return c.object({id:c.string(),type:c.literal(r.Operation)})}function $U(){return ws().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function VU(){return ws().merge(c.object({}))}function LU(){return ws().merge(c.object({successCalls:c.array(ke()),errorCalls:c.array(ke()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),writesValues:c.array(pn()),declaration:Yt(),inputs:c.array(At()),outputs:c.array(ut()),error:c.array(ut()),dynamicArguments:c.array(At()),parent:c.union([yn(),Rt()])}))}function GU(){return $U().merge(LU())}function _s(){return c.union([c.string(),c.number(),c.boolean(),c.null(),c.date()])}function Db(){return c.record(c.string(),_s())}function FU(){return c.array(c.union([_s(),Db()]))}function Ab(){return c.union([_s(),Db(),FU()])}function Sb(){return c.union([_s(),Ab()])}function Ob(){return c.enum([v.String,v.Number,v.Boolean,v.Null,v.Date,v.JSON,v.Enum,v.File,v.UUID,v.EntityTemplate,v.ActionDescriptor])}function UU(){return c.union([ar(),ti(),Ki()])}function xU(){return c.object({id:c.string(),name:Ob(),type:c.literal(r.PrimitiveValue),value:Sb(),autogeneration:nc.nullable()})}function jU(){return xU().merge(c.object({}))}function xt(){return c.object({id:c.string(),version:c.number(),name:Ob(),type:c.literal(r.PrimitiveValue),value:Sb(),valueAsType:UU().nullable(),autogeneration:nc.nullable(),parent:c.union([bc(),Bs()])})}function kU(){return xt().extend({name:c.literal(v.String),value:c.string(),autogeneration:Kl.nullable()})}function qU(){return xt().extend({name:c.literal(v.Number),value:c.number(),autogeneration:ec.nullable()})}function JU(){return xt().extend({name:c.literal(v.Boolean),value:c.boolean(),autogeneration:Ql.nullable()})}function WU(){return xt().extend({name:c.literal(v.Null),value:c.null(),autogeneration:c.null()})}function HU(){return xt().extend({name:c.literal(v.Date),value:c.date(),autogeneration:tc.nullable()})}function YU(){return xt().extend({name:c.literal(v.JSON),value:Ab(),autogeneration:c.null()})}function zU(){return xt().extend({name:c.literal(v.Enum),value:c.string(),autogeneration:c.null()})}function ZU(){return xt().extend({name:c.literal(v.File),value:c.string(),autogeneration:c.null()})}function XU(){return xt().extend({name:c.literal(v.UUID),value:c.string(),autogeneration:Xl.nullable()})}function QU(){return xt().extend({name:c.literal(v.EntityTemplate),value:ar(),autogeneration:c.null()})}function KU(){return xt().extend({name:c.literal(v.ActionDescriptor),value:Ki(),autogeneration:c.null()})}function Rc(){return c.union([kU(),qU(),JU(),WU(),HU(),YU(),zU(),ZU(),XU(),QU(),KU()])}function un(){return c.union([c.object({type:c.literal(r.DataType)}),c.record(c.string(),c.any())])}function bc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.DataType)})}function gc(){return c.object({id:c.string(),type:c.literal(r.DataType),isNullable:c.boolean(),isList:c.boolean(),constant:c.boolean(),asType:c.boolean(),options:c.array(c.string()).optional()})}function ex(){return gc().merge(c.object({version:c.number()}))}function tx(){return gc().merge(c.object({}))}function nx(){return c.object({defaultValue:Rc().nullable(),entity:c.union([ni(),Wr(),Ps(),Yt()]).nullable(),parent:c.union([bb(),wb(),cn(),Rb()])})}function rx(){return ex().merge(nx())}function vc(){return c.union([c.object({type:c.literal(r.VariableDeclaration)}),c.record(c.string(),c.any())])}function ix(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.VariableDeclaration)})}function Ic(){return c.object({id:c.string(),type:c.literal(r.VariableDeclaration),name:c.string(),description:c.string().nullable()})}function ax(){return Ic().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function sx(){return Ic().merge(c.object({}))}function ox(){return c.object({dataType:un().nullable(),readsValue:Qi().nullable(),writesValues:c.array(pn()),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),internalCalls:c.array(Xi()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),parent:c.union([yn(),Rt()])})}function lx(){return ax().merge(ox())}function Cb(){return c.union([c.object({type:c.literal(r.VariableInstance)}),c.record(c.string(),c.any())])}function cx(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.VariableInstance)})}function Pc(){return c.object({id:c.string(),type:c.literal(r.VariableInstance)})}function dx(){return Pc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function ux(){return Pc().merge(c.object({}))}function px(){return c.object({declaration:vc(),dataType:un().nullable(),readsValue:Qi().nullable(),writesValues:c.array(pn()),inputs:c.array(At()),outputs:c.array(ut()),successCalls:c.array(ke()),errorCalls:c.array(ke()),internalCalls:c.array(Xi()),calledBySuccess:c.array(ye()),calledByError:c.array(ye()),calledByEntry:c.array(xe()),parent:c.union([yn(),Rt()])})}function yx(){return dx().merge(px())}function Dc(){return c.union([c.object({type:c.literal(r.InstalledProject)}),c.record(c.string(),c.any())])}function Ms(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.InstalledProject)})}function hx(){return c.object({id:c.string(),type:c.literal(r.InstalledProject)})}function fx(){return c.object({version:c.number(),x:c.number(),y:c.number()})}function mx(){return c.object({})}function Tx(){return c.object({implements:Rt(),description:c.string().nullable(),functions:c.array(St()),events:c.array(Ac()),parent:Rt()})}function Ex(){return fx().merge(Tx())}function Ac(){return c.union([c.object({type:c.literal(r.GlobalEvent)}),c.record(c.string(),c.any())])}function Rx(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.GlobalEvent)})}function Ns(){return c.object({id:c.string(),type:c.literal(r.GlobalEvent),name:c.string(),collapsed:c.boolean()})}function bx(){return Ns().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function gx(){return Ns().merge(c.object({}))}function vx(){return Ns().merge(c.object({returnStatements:c.array(nr()),implements:c.array(vb()),inputs:c.array(ir()),calls:c.array(ke()),parent:c.union([Rt(),Ms()])}))}function Ix(){return bx().merge(vx())}function rr(){return c.union([vc(),Cb()])}function _n(){return c.union([ix(),cx()])}function pn(){return c.union([rr(),At(),Zt()])}function Bb(){return c.union([_n(),Bs(),Pb()])}function Qi(){return c.union([rr(),ir(),ut(),ei(),Xi(),Kr()])}function Px(){return c.union([_n(),Sc(),pc(),ti(),mc(),zi()])}function Dx(){return c.union([ir(),ut(),pn()])}function wb(){return c.union([Sc(),pc(),Bb()])}function $s(){return Ac()}function Vs(){return Rx()}function Ls(){return c.union([ei(),Kr(),Zi(),Yi(),rr(),Xi(),Hr()])}function ye(){return c.union([ti(),zi(),Cs(),Xr(),_n(),mc(),zt()])}function Gs(){return c.union([ei(),Kr(),Zi(),Yi(),rr(),Hr()])}function Fs(){return c.union([ti(),zi(),Cs(),Xr(),_n(),zt()])}function _b(){return c.union([Ls(),nr(),Qr(),Yr()])}function ke(){return c.union([ye(),Zr(),dn(),zr()])}function Mb(){return c.union([Gs(),nr(),Qr(),Yr()])}function Nb(){return c.union([Fs(),Zr(),dn(),zr()])}function Mn(){return c.union([St(),$s()])}function xe(){return c.union([Ki(),Vs()])}function Ax(){return c.union([Ls(),Mn()])}function Sx(){return c.union([ye(),xe()])}function Ox(){return c.union([Gs(),Mn()])}function Cx(){return c.union([Fs(),xe()])}function Bx(){return c.union([_b(),Mn()])}function wx(){return c.union([ke(),xe()])}function _x(){return c.union([Mb(),Mn()])}function Mx(){return c.union([Nb(),xe()])}function Nx(){return c.union([Mn(),Hr()])}function yn(){return c.union([xe(),zt()])}function $x(){return c.union([Ls(),Mn()])}function Vx(){return c.union([ye(),xe()])}function Lx(){return c.union([Gs(),Mn()])}function Gx(){return c.union([Fs(),xe()])}function Fx(){return c.union([nr(),Qr(),Yr()])}function Ux(){return c.union([Zr(),dn(),zr()])}function xx(){return c.union([Wr(),Kx(),Dc(),ni(),St(),$s(),rr(),At(),ut(),Zi(),ei(),Kr(),Zt(),ir(),Ps(),un(),tr(),Yt(),nr(),Yr(),Qr(),Hr(),Yi(),Yt(),Yt(),rc(),Xi()])}function jx(){return c.union([Ss(),Rt(),Ms(),ar(),Ki(),Vs(),_n(),Bs(),pc(),Cs(),ti(),zi(),Pb(),Sc(),Ds(),bc(),bb(),cn(),Zr(),zr(),dn(),zt(),Xr(),cn(),cn(),Rb(),mc()])}function kx(){return c.union([Dc(),ni(),St(),$s(),rr(),Zi(),ei(),Kr(),nr(),Yr(),Qr(),Hr(),Yi()])}function qx(){return c.union([Ms(),ar(),Ki(),Vs(),_n(),Cs(),ti(),zi(),Zr(),zr(),dn(),zt(),Xr()])}function ir(){return c.union([c.object({type:c.literal(r.ArgumentDeclaration)}),c.record(c.string(),c.any())])}function Sc(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.ArgumentDeclaration)})}function Oc(){return c.object({id:c.string(),type:c.literal(r.ArgumentDeclaration)})}function Jx(){return Oc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function Wx(){return Oc().merge(c.object({}))}function Hx(){return c.object({dataType:un().nullable(),writesValues:c.array(pn()),parent:c.union([xe(),cn(),cn(),Xr(),dn()])})}function Yx(){return Jx().merge(Hx())}function St(){return c.union([c.object({type:c.literal(r.FunctionDeclaration)}),c.record(c.string(),c.any())])}function Ki(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.FunctionDeclaration)})}function Cc(){return c.object({id:c.string(),type:c.literal(r.FunctionDeclaration),name:c.string(),description:c.string().nullable()})}function zx(){return Cc().merge(c.object({version:c.number(),x:c.number(),y:c.number(),index:c.number().nullable()}))}function Zx(){return Cc()}function Xx(){return c.object({inputs:c.array(ir()),implements:Yt().nullable(),returnStatements:c.array(nr()),parent:c.union([Rt(),Ms(),ar(),zt(),Ss(),Ds()])})}function Qx(){return zx().merge(Xx())}function Kx(){return c.union([c.object({type:c.literal(r.Project)}),c.record(c.string(),c.any())])}function Rt(){return c.object({entityType:c.literal(r.Project),entityId:c.string(),id:c.string(),type:c.literal(r.GenericReference)})}function Bc(){return c.object({id:c.string(),type:c.literal(r.Project),name:c.string(),description:c.string().nullable()})}function e8(){return Bc().merge(c.object({version:c.number()}))}function t8(){return Bc()}function n8(){return c.object({entities:c.array(ni()),functions:c.array(St()),events:c.array(Ac()),projects:c.array(Dc()),variableDeclarations:c.array(vc()),variableInstances:c.array(Cb()),conditions:c.array(Zi()),operations:c.array(ei()),functionCalls:c.array(Kr()),loops:c.array(Hr()),searches:c.array(Yi())})}function r8(){return e8().merge(n8())}function ni(){return c.union([c.object({type:c.literal(r.CustomEntity)}),c.record(c.string(),c.any())])}function ar(){return c.object({id:c.string(),type:c.literal(r.GenericReference),entityId:c.string(),entityType:c.literal(r.CustomEntity)})}function wc(){return c.object({id:c.string(),type:c.literal(r.CustomEntity),name:c.string(),description:c.string().nullable(),static:c.boolean(),abstract:c.boolean()})}function i8(){return wc().merge(c.object({version:c.number(),x:c.number(),y:c.number()}))}function a8(){return wc().merge(c.object({}))}function s8(){return c.union([Rt(),bc()])}function o8(){return c.object({properties:c.array(tr()),methods:c.array(St()),abstractMethods:c.array(Yt()),extends:c.array(c.union([ni(),Wr()])),implements:c.array(c.union([ni(),Wr()])),parent:s8()})}function l8(){return i8().merge(o8())}function c8(n){const e=l8(),t=n.toJSON();e.safeParse(t).success;const a=n.implements.flatMap(T=>p8(n,T)),s=n.extends.flatMap(T=>y8(n,T)),o=f8(n),d=h8(n);n.methods.flatMap(T=>T.validate());const p=[...a,...s,...o,...d];return X(n.errors,p)}function d8(n,e){const t=e.properties.filter(s=>s.abstract),i=[];let a=[...n.properties];return t.forEach(s=>{const o=a.find(d=>{var p;return((p=d.implements)==null?void 0:p.id)===s.id});o?a=a.filter(d=>d.id!==o.id):i.push(s)}),i}function u8(n,e){const t=e.abstractMethods,i=[];let a=[...n.methods];return t.forEach(s=>{const o=a.find(d=>{var p;return((p=d.implements)==null?void 0:p.id)===s.id});o?a=a.filter(d=>d.id!==o.id):i.push(s)}),i}function p8(n,e){const t=[];if(!e.abstract){const T=j({id:n.id+"--"+O.ImplementingNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is implementing a non-abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:O.ImplementingNonAbstractEntity,entity:n});return t.push(T.error),t}const i=e.properties.filter(T=>T.abstract),a=[];let s=[...n.properties];i.forEach(T=>{const f=s.find(b=>{var I;return((I=b.implements)==null?void 0:I.id)===T.id});f?s=s.filter(b=>b.id!==f.id):a.push(T)}),a.length&&a.forEach(T=>{const f=j({id:n.id+"--"+O.MissingPropertyImplementation+"--"+T.id,message:`Property "${T.name}" with id "${T.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${n.name}" with id "${n.id}" implements it`,issue:null,severity:m.Error,code:O.MissingPropertyImplementation,entity:n});t.push(f.error)});const o=[];let d=[...n.methods];e.abstractMethods.forEach(T=>{const f=d.find(b=>{var I;return((I=b.implements)==null?void 0:I.id)===T.id});f?d=d.filter(b=>b.id!==f.id):o.push(T)}),o.length&&o.forEach(T=>{const f=j({id:n.id+"--"+O.MissingMethodImplementation+"--"+T.id,message:`Method "${T.name}" with id "${T.id}" of entity "${e.name}" with id "${e.id}" is not implemented when entity "${n.name}" with id "${n.id}" implements it`,issue:null,severity:m.Error,code:O.MissingMethodImplementation,entity:n});t.push(f.error)});const p=[];e.properties.forEach(T=>{const f=s.find(b=>b.name===T.name);f&&p.push([f,T])}),p.length&&p.forEach(([T])=>{const f=j({id:n.id+"--"+g.PropertyOverwrite+"--"+T.id,message:`Property "${T.name}" with id "${T.id}" of entity "${n.name}" with id "${n.id}" overwrites the property with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.PropertyOverwrite,entity:n});t.push(f.error)});const h=[];return e.methods.forEach(T=>{const f=d.find(b=>b.name===T.name);f&&h.push([f,T])}),h.length&&h.forEach(([T])=>{const f=j({id:n.id+"--"+g.MethodOverwrite+"--"+T.id,message:`Method "${T.name}" with id "${T.id}" of entity "${n.name}" with id "${n.id}" overwrites the method with the same name from the base entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.MethodOverwrite,entity:n});t.push(f.error)}),t}function y8(n,e){const t=[],i=[];if(e.abstract){const s=j({id:n.id+"--"+O.ExtendingAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is extending an abstract entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:O.ExtendingAbstractEntity,entity:n});return t.push(s.error),t}n.properties.forEach(s=>{var d;const o=e.properties.find(p=>p.name===s.name);((d=s.implements)==null?void 0:d.id)!==(o==null?void 0:o.id)&&o&&i.push(s)}),i.length&&i.forEach(s=>{const o=j({id:n.id+"--"+g.PropertyOverwrite,message:`Property "${s.name}" with id "${s.id}" of entity "${n.name}" with id "${n.id}" overwrites the property with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.PropertyOverwrite,entity:n});t.push(o.error)});const a=[];return n.methods.forEach(s=>{var d;const o=e.methods.find(p=>p.name===s.name);((d=s.implements)==null?void 0:d.id)!==(o==null?void 0:o.id)&&o&&a.push(s)}),a.length&&a.forEach(s=>{const o=j({id:n.id+"--"+g.MethodOverwrite,message:`Method "${s.name}" with id "${s.id}" of entity "${n.name}" with id "${n.id}" overwrites the method with the same name from the extended entity "${e.name}" with id "${e.id}"`,issue:null,severity:m.Error,code:g.MethodOverwrite,entity:n});t.push(o.error)}),t}function h8(n){const e=[];if(!n.properties.length){const t=j({id:n.id+"--"+O.NoProperties,message:"No properties implemented",issue:null,severity:m.Warning,code:O.NoProperties,entity:n});e.push(t.error)}return n.properties.forEach(t=>{t.validate()}),e}function f8(n){const e=[];if(n.abstract){if(n.methods.length){const t=j({id:n.id+"--"+O.AbstractEntityWithNonAbstractMethods,message:`Entity "${n.name}" with id "${n.id}" is marked as abstract but has non-abstract methods`,issue:null,severity:m.Error,code:O.AbstractEntityWithNonAbstractMethods,entity:n});e.push(t.error)}if(n.properties.some(t=>!t.abstract)){const t=j({id:n.id+"--"+O.AbstractEntityWithNonAbstractProperties,message:`Entity "${n.name}" with id "${n.id}" is marked as abstract but has non-abstract properties`,issue:null,severity:m.Error,code:O.AbstractEntityWithNonAbstractProperties,entity:n});e.push(t.error),n.properties.forEach(i=>{if(!i.abstract){const a=j({id:n.id+"--"+O.StaticEntityWithNonStaticProperties+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is not marked as abstract but the entity is marked as abstract`,issue:null,severity:m.Error,code:O.StaticEntityWithNonStaticProperties,entity:n});e.push(a.error)}})}}else{if(n.abstractMethods.length){const t=j({id:n.id+"--"+O.AbstractPropertyInNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is not marked as abstract but has abstract methods`,issue:null,severity:m.Error,code:O.AbstractPropertyInNonAbstractEntity,entity:n});e.push(t.error)}if(n.properties.some(t=>t.abstract)){const t=j({id:n.id+"--"+O.AbstractMethodInNonAbstractEntity,message:`Entity "${n.name}" with id "${n.id}" is not marked as abstract but has abstract properties`,issue:null,severity:m.Error,code:O.AbstractMethodInNonAbstractEntity,entity:n});e.push(t.error),n.properties.forEach(i=>{if(i.abstract){const a=j({id:n.id+"--"+O.AbstractMethodInNonAbstractEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is marked as abstract but the entity is not marked as abstract`,issue:null,severity:m.Error,code:O.AbstractMethodInNonAbstractEntity,entity:n});e.push(a.error)}})}}if(n.static&&n.properties.some(t=>!t.static)){const t=j({id:n.id+"--"+O.StaticEntityWithNonStaticProperties,message:`Entity "${n.name}" with id "${n.id}" is marked as static but has non-static properties`,issue:null,severity:m.Error,code:O.StaticEntityWithNonStaticProperties,entity:n});e.push(t.error),n.properties.forEach(i=>{if(!i.static){const a=j({id:n.id+"--"+O.NonStaticPropertyInStaticEntity+"--"+i.id,message:`Property "${i.name}" with id "${i.id}" of entity "${n.name}" with id "${n.id}" is not marked as static but the entity is marked as static`,issue:null,severity:m.Error,code:O.NonStaticPropertyInStaticEntity,entity:n});e.push(a.error)}})}return e}function m8(n){return n instanceof Error&&n.name==="ZodError"&&"issues"in n&&Array.isArray(n.issues)}var T8=class extends Error{constructor(e,t){super(e,t);l(this,"name");l(this,"details");this.name="ZodValidationError",this.details=E8(t)}toString(){return this.message}};function E8(n){if(n){const e=n.cause;if(m8(e))return e.issues}return[]}var R8="; ",$b="Validation error",b8=": ",g8=", or ";function v8(n,e,t){return e!==null?n.length>0?[e,n].join(t):e:n.length>0?n:$b}var I8=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function P8(n){return n.length===1?n[0].toString():n.reduce((e,t)=>{if(typeof t=="number")return e+"["+t.toString()+"]";if(t.includes('"'))return e+'["'+D8(t)+'"]';if(!I8.test(t))return e+'["'+t+'"]';const i=e.length===0?"":".";return e+i+t},"")}function D8(n){return n.replace(/"/g,'\\"')}function A8(n){return n.length!==0}function Us(n){const{issue:e,issueSeparator:t,unionSeparator:i,includePath:a}=n;if(e.code==="invalid_union")return e.unionErrors.reduce((s,o)=>{const d=o.issues.map(p=>Us({issue:p,issueSeparator:t,unionSeparator:i,includePath:a})).join(t);return s.includes(d)||s.push(d),s},[]).join(i);if(e.code==="invalid_arguments")return[e.message,...e.argumentsError.issues.map(s=>Us({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(e.code==="invalid_return_type")return[e.message,...e.returnTypeError.issues.map(s=>Us({issue:s,issueSeparator:t,unionSeparator:i,includePath:a}))].join(t);if(a&&A8(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 "${P8(e.path)}"`}return e.message}function S8(n,e={}){const{issueSeparator:t=R8,unionSeparator:i=g8,prefixSeparator:a=b8,prefix:s=$b,includePath:o=!0}=e,d=Us({issue:n,issueSeparator:t,unionSeparator:i,includePath:o}),p=v8(d,s,a);return new T8(p,{cause:new mt([n])})}var Vb="1.13.7",Lb=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},xs=Array.prototype,_c=Object.prototype,Gb=typeof Symbol<"u"?Symbol.prototype:null,O8=xs.push,ea=xs.slice,ta=_c.toString,C8=_c.hasOwnProperty,Fb=typeof ArrayBuffer<"u",B8=typeof DataView<"u",w8=Array.isArray,Ub=Object.keys,xb=Object.create,jb=Fb&&ArrayBuffer.isView,_8=isNaN,M8=isFinite,kb=!{toString:null}.propertyIsEnumerable("toString"),qb=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N8=Math.pow(2,53)-1;function bt(n,e){return e=e==null?n.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 n.call(this,i);case 1:return n.call(this,arguments[0],i);case 2:return n.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,n.apply(this,s)}}function Nn(n){var e=typeof n;return e==="function"||e==="object"&&!!n}function $8(n){return n===null}function Jb(n){return n===void 0}function Wb(n){return n===!0||n===!1||ta.call(n)==="[object Boolean]"}function V8(n){return!!(n&&n.nodeType===1)}function rt(n){var e="[object "+n+"]";return function(t){return ta.call(t)===e}}const Mc=rt("String"),Hb=rt("Number"),L8=rt("Date"),G8=rt("RegExp"),F8=rt("Error"),Yb=rt("Symbol"),zb=rt("ArrayBuffer");var Zb=rt("Function"),U8=Lb.document&&Lb.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof U8!="function"&&(Zb=function(n){return typeof n=="function"||!1});const pt=Zb,Xb=rt("Object");var Qb=B8&&(!/\[native code\]/.test(String(DataView))||Xb(new DataView(new ArrayBuffer(8)))),Nc=typeof Map<"u"&&Xb(new Map),x8=rt("DataView");function j8(n){return n!=null&&pt(n.getInt8)&&zb(n.buffer)}const js=Qb?j8:x8,sr=w8||rt("Array");function $n(n,e){return n!=null&&C8.call(n,e)}var $c=rt("Arguments");(function(){$c(arguments)||($c=function(n){return $n(n,"callee")})})();const Vc=$c;function k8(n){return!Yb(n)&&M8(n)&&!isNaN(parseFloat(n))}function Kb(n){return Hb(n)&&_8(n)}function eg(n){return function(){return n}}function tg(n){return function(e){var t=n(e);return typeof t=="number"&&t>=0&&t<=N8}}function ng(n){return function(e){return e==null?void 0:e[n]}}const ks=ng("byteLength"),q8=tg(ks);var J8=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function W8(n){return jb?jb(n)&&!js(n):q8(n)&&J8.test(ta.call(n))}const rg=Fb?W8:eg(!1),gt=ng("length");function H8(n){for(var e={},t=n.length,i=0;i<t;++i)e[n[i]]=!0;return{contains:function(a){return e[a]===!0},push:function(a){return e[a]=!0,n.push(a)}}}function ig(n,e){e=H8(e);var t=qb.length,i=n.constructor,a=pt(i)&&i.prototype||_c,s="constructor";for($n(n,s)&&!e.contains(s)&&e.push(s);t--;)s=qb[t],s in n&&n[s]!==a[s]&&!e.contains(s)&&e.push(s)}function We(n){if(!Nn(n))return[];if(Ub)return Ub(n);var e=[];for(var t in n)$n(n,t)&&e.push(t);return kb&&ig(n,e),e}function na(n){if(n==null)return!0;var e=gt(n);return typeof e=="number"&&(sr(n)||Mc(n)||Vc(n))?e===0:gt(We(n))===0}function ag(n,e){var t=We(e),i=t.length;if(n==null)return!i;for(var a=Object(n),s=0;s<i;s++){var o=t[s];if(e[o]!==a[o]||!(o in a))return!1}return!0}function Q(n){if(n instanceof Q)return n;if(!(this instanceof Q))return new Q(n);this._wrapped=n}Q.VERSION=Vb,Q.prototype.value=function(){return this._wrapped},Q.prototype.valueOf=Q.prototype.toJSON=Q.prototype.value,Q.prototype.toString=function(){return String(this._wrapped)};function sg(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,ks(n))}var og="[object DataView]";function Lc(n,e,t,i){if(n===e)return n!==0||1/n===1/e;if(n==null||e==null)return!1;if(n!==n)return e!==e;var a=typeof n;return a!=="function"&&a!=="object"&&typeof e!="object"?!1:lg(n,e,t,i)}function lg(n,e,t,i){n instanceof Q&&(n=n._wrapped),e instanceof Q&&(e=e._wrapped);var a=ta.call(n);if(a!==ta.call(e))return!1;if(Qb&&a=="[object Object]"&&js(n)){if(!js(e))return!1;a=og}switch(a){case"[object RegExp]":case"[object String]":return""+n==""+e;case"[object Number]":return+n!=+n?+e!=+e:+n==0?1/+n===1/e:+n==+e;case"[object Date]":case"[object Boolean]":return+n==+e;case"[object Symbol]":return Gb.valueOf.call(n)===Gb.valueOf.call(e);case"[object ArrayBuffer]":case og:return lg(sg(n),sg(e),t,i)}var s=a==="[object Array]";if(!s&&rg(n)){var o=ks(n);if(o!==ks(e))return!1;if(n.buffer===e.buffer&&n.byteOffset===e.byteOffset)return!0;s=!0}if(!s){if(typeof n!="object"||typeof e!="object")return!1;var d=n.constructor,p=e.constructor;if(d!==p&&!(pt(d)&&d instanceof d&&pt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in e)return!1}t=t||[],i=i||[];for(var h=t.length;h--;)if(t[h]===n)return i[h]===e;if(t.push(n),i.push(e),s){if(h=n.length,h!==e.length)return!1;for(;h--;)if(!Lc(n[h],e[h],t,i))return!1}else{var T=We(n),f;if(h=T.length,We(e).length!==h)return!1;for(;h--;)if(f=T[h],!($n(e,f)&&Lc(n[f],e[f],t,i)))return!1}return t.pop(),i.pop(),!0}function Y8(n,e){return Lc(n,e)}function ra(n){if(!Nn(n))return[];var e=[];for(var t in n)e.push(t);return kb&&ig(n,e),e}function Gc(n){var e=gt(n);return function(t){if(t==null)return!1;var i=ra(t);if(gt(i))return!1;for(var a=0;a<e;a++)if(!pt(t[n[a]]))return!1;return n!==ug||!pt(t[Fc])}}var Fc="forEach",cg="has",Uc=["clear","delete"],dg=["get",cg,"set"],z8=Uc.concat(Fc,dg),ug=Uc.concat(dg),Z8=["add"].concat(Uc,Fc,cg);const X8=Nc?Gc(z8):rt("Map"),Q8=Nc?Gc(ug):rt("WeakMap"),K8=Nc?Gc(Z8):rt("Set"),e6=rt("WeakSet");function ri(n){for(var e=We(n),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=n[e[a]];return i}function t6(n){for(var e=We(n),t=e.length,i=Array(t),a=0;a<t;a++)i[a]=[e[a],n[e[a]]];return i}function pg(n){for(var e={},t=We(n),i=0,a=t.length;i<a;i++)e[n[t[i]]]=t[i];return e}function xc(n){var e=[];for(var t in n)pt(n[t])&&e.push(t);return e.sort()}function jc(n,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=n(s),d=o.length,p=0;p<d;p++){var h=o[p];(!e||t[h]===void 0)&&(t[h]=s[h])}return t}}const yg=jc(ra),qs=jc(We),hg=jc(ra,!0);function n6(){return function(){}}function fg(n){if(!Nn(n))return{};if(xb)return xb(n);var e=n6();e.prototype=n;var t=new e;return e.prototype=null,t}function r6(n,e){var t=fg(n);return e&&qs(t,e),t}function i6(n){return Nn(n)?sr(n)?n.slice():yg({},n):n}function a6(n,e){return e(n),n}function mg(n){return sr(n)?n:[n]}Q.toPath=mg;function ia(n){return Q.toPath(n)}function kc(n,e){for(var t=e.length,i=0;i<t;i++){if(n==null)return;n=n[e[i]]}return t?n:void 0}function Tg(n,e,t){var i=kc(n,ia(e));return Jb(i)?t:i}function s6(n,e){e=ia(e);for(var t=e.length,i=0;i<t;i++){var a=e[i];if(!$n(n,a))return!1;n=n[a]}return!!t}function qc(n){return n}function aa(n){return n=qs({},n),function(e){return ag(e,n)}}function Jc(n){return n=ia(n),function(e){return kc(e,n)}}function sa(n,e,t){if(e===void 0)return n;switch(t??3){case 1:return function(i){return n.call(e,i)};case 3:return function(i,a,s){return n.call(e,i,a,s)};case 4:return function(i,a,s,o){return n.call(e,i,a,s,o)}}return function(){return n.apply(e,arguments)}}function Eg(n,e,t){return n==null?qc:pt(n)?sa(n,e,t):Nn(n)&&!sr(n)?aa(n):Jc(n)}function Wc(n,e){return Eg(n,e,1/0)}Q.iteratee=Wc;function vt(n,e,t){return Q.iteratee!==Wc?Q.iteratee(n,e):Eg(n,e,t)}function o6(n,e,t){e=vt(e,t);for(var i=We(n),a=i.length,s={},o=0;o<a;o++){var d=i[o];s[d]=e(n[d],d,n)}return s}function Rg(){}function l6(n){return n==null?Rg:function(e){return Tg(n,e)}}function c6(n,e,t){var i=Array(Math.max(0,n));e=sa(e,t,1);for(var a=0;a<n;a++)i[a]=e(a);return i}function Hc(n,e){return e==null&&(e=n,n=0),n+Math.floor(Math.random()*(e-n+1))}const oa=Date.now||function(){return new Date().getTime()};function bg(n){var e=function(s){return n[s]},t="(?:"+We(n).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 gg={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},d6=bg(gg),u6=pg(gg),p6=bg(u6),y6=Q.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Yc=/(.)^/,h6={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},f6=/\\|'|\r|\n|\u2028|\u2029/g;function m6(n){return"\\"+h6[n]}var T6=/^\s*(\w|\$)+\s*$/;function E6(n,e,t){!e&&t&&(e=t),e=hg({},e,Q.templateSettings);var i=RegExp([(e.escape||Yc).source,(e.interpolate||Yc).source,(e.evaluate||Yc).source].join("|")+"|$","g"),a=0,s="__p+='";n.replace(i,function(h,T,f,b,I){return s+=n.slice(a,I).replace(f6,m6),a=I+h.length,T?s+=`'+
|
|
2
2
|
((__t=(`+T+`))==null?'':_.escape(__t))+
|
|
3
3
|
'`:f?s+=`'+
|
|
4
4
|
((__t=(`+f+`))==null?'':__t)+
|
|
5
5
|
'`:b&&(s+=`';
|
|
6
6
|
`+b+`
|
|
7
7
|
__p+='`),h}),s+=`';
|
|
8
|
-
`;var o=e.variable;if(o){if(!
|
|
8
|
+
`;var o=e.variable;if(o){if(!T6.test(o))throw new Error("variable is not a bare identifier: "+o)}else s=`with(obj||{}){
|
|
9
9
|
`+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 d;try{d=new Function(o,"_",s)}catch(h){throw h.source=s,h}var p=function(h){return d.call(this,h,Q)};return p.source="function("+o+`){
|
|
13
|
-
`+s+"}",p}function g6(n,e,t){e=aa(e);var i=e.length;if(!i)return pt(t)?t.call(n):t;for(var a=0;a<i;a++){var s=n==null?void 0:n[e[a]];s===void 0&&(s=t,a=i),n=pt(s)?s.call(n):s}return n}var v6=0;function I6(n){var e=++v6+"";return n?n+e:e}function P6(n){var e=Q(n);return e._chain=!0,e}function Pg(n,e,t,i,a){if(!(i instanceof e))return n.apply(t,a);var s=Tg(n.prototype),o=n.apply(s,a);return Nn(o)?o:s}var ii=bt(function(n,e){var t=ii.placeholder,i=function(){for(var a=0,s=e.length,o=Array(s),d=0;d<s;d++)o[d]=e[d]===t?arguments[a++]:e[d];for(;a<arguments.length;)o.push(arguments[a++]);return Pg(n,i,this,this,o)};return i});ii.placeholder=Q;const Dg=bt(function(n,e,t){if(!pt(n))throw new TypeError("Bind must be called on a function");var i=bt(function(a){return Pg(n,i,e,this,t.concat(a))});return i}),Ot=rg(gt);function or(n,e,t,i){if(i=i||[],!e&&e!==0)e=1/0;else if(e<=0)return i.concat(n);for(var a=i.length,s=0,o=gt(n);s<o;s++){var d=n[s];if(Ot(d)&&(sr(d)||Vc(d)))if(e>1)or(d,e-1,t,i),a=i.length;else for(var p=0,h=d.length;p<h;)i[a++]=d[p++];else t||(i[a++]=d)}return i}const D6=bt(function(n,e){e=or(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var i=e[t];n[i]=Dg(n[i],n)}return n});function A6(n,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return $n(a,s)||(a[s]=n.apply(this,arguments)),a[s]};return t.cache={},t}const Ag=bt(function(n,e,t){return setTimeout(function(){return n.apply(null,t)},e)}),S6=ii(Ag,Q,1);function O6(n,e,t){var i,a,s,o,d=0;t||(t={});var p=function(){d=t.leading===!1?0:la(),i=null,o=n.apply(a,s),i||(a=s=null)},h=function(){var T=la();!d&&t.leading===!1&&(d=T);var f=e-(T-d);return a=this,s=arguments,f<=0||f>e?(i&&(clearTimeout(i),i=null),d=T,o=n.apply(a,s),i||(a=s=null)):!i&&t.trailing!==!1&&(i=setTimeout(p,f)),o};return h.cancel=function(){clearTimeout(i),d=0,i=a=s=null},h}function C6(n,e,t){var i,a,s,o,d,p=function(){var T=la()-a;e>T?i=setTimeout(p,e-T):(i=null,t||(o=n.apply(d,s)),i||(s=d=null))},h=bt(function(T){return d=this,s=T,a=la(),i||(i=setTimeout(p,e),t&&(o=n.apply(d,s))),o});return h.cancel=function(){clearTimeout(i),i=s=d=null},h}function B6(n,e){return ii(e,n)}function zc(n){return function(){return!n.apply(this,arguments)}}function w6(){var n=arguments,e=n.length-1;return function(){for(var t=e,i=n[e].apply(this,arguments);t--;)i=n[t].call(this,i);return i}}function _6(n,e){return function(){if(--n<1)return e.apply(this,arguments)}}function Sg(n,e){var t;return function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=null),t}}const M6=ii(Sg,2);function Og(n,e,t){e=vt(e,t);for(var i=We(n),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(n[a],a,n))return a}function Cg(n){return function(e,t,i){t=vt(t,i);for(var a=gt(e),s=n>0?0:a-1;s>=0&&s<a;s+=n)if(t(e[s],s,e))return s;return-1}}const Zc=Cg(1),Bg=Cg(-1);function wg(n,e,t,i){t=vt(t,i,1);for(var a=t(e),s=0,o=gt(n);s<o;){var d=Math.floor((s+o)/2);t(n[d])<a?s=d+1:o=d}return s}function _g(n,e,t){return function(i,a,s){var o=0,d=gt(i);if(typeof s=="number")n>0?o=s>=0?s:Math.max(s+d,o):d=s>=0?Math.min(s+1,d):s+d+1;else if(t&&s&&d)return s=t(i,a),i[s]===a?s:-1;if(a!==a)return s=e(ta.call(i,o,d),tg),s>=0?s+o:-1;for(s=n>0?o:d-1;s>=0&&s<d;s+=n)if(i[s]===a)return s;return-1}}const Mg=_g(1,Zc,wg),N6=_g(-1,Bg);function Xc(n,e,t){var i=Ot(n)?Zc:Og,a=i(n,e,t);if(a!==void 0&&a!==-1)return n[a]}function $6(n,e){return Xc(n,sa(e))}function hn(n,e,t){e=oa(e,t);var i,a;if(Ot(n))for(i=0,a=n.length;i<a;i++)e(n[i],i,n);else{var s=We(n);for(i=0,a=s.length;i<a;i++)e(n[s[i]],s[i],n)}return n}function lr(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=Array(a),o=0;o<a;o++){var d=i?i[o]:o;s[o]=e(n[d],d,n)}return s}function Ng(n){var e=function(t,i,a,s){var o=!Ot(t)&&We(t),d=(o||t).length,p=n>0?0:d-1;for(s||(a=t[o?o[p]:p],p+=n);p>=0&&p<d;p+=n){var h=o?o[p]:p;a=i(a,t[h],h,t)}return a};return function(t,i,a,s){var o=arguments.length>=3;return e(t,oa(i,s,4),a,o)}}const Qc=Ng(1),$g=Ng(-1);function ai(n,e,t){var i=[];return e=vt(e,t),hn(n,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function V6(n,e,t){return ai(n,zc(vt(e)),t)}function Vg(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=0;s<a;s++){var o=i?i[s]:s;if(!e(n[o],o,n))return!1}return!0}function Lg(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=0;s<a;s++){var o=i?i[s]:s;if(e(n[o],o,n))return!0}return!1}function fn(n,e,t,i){return Ot(n)||(n=ri(n)),(typeof t!="number"||i)&&(t=0),Mg(n,e,t)>=0}const L6=bt(function(n,e,t){var i,a;return pt(e)?a=e:(e=aa(e),i=e.slice(0,-1),e=e[e.length-1]),lr(n,function(s){var o=a;if(!o){if(i&&i.length&&(s=kc(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function Kc(n,e){return lr(n,Jc(e))}function G6(n,e){return ai(n,sa(e))}function Gg(n,e,t){var i=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof n[0]!="object"&&n!=null){n=Ot(n)?n:ri(n);for(var d=0,p=n.length;d<p;d++)s=n[d],s!=null&&s>i&&(i=s)}else e=vt(e,t),hn(n,function(h,T,f){o=e(h,T,f),(o>a||o===-1/0&&i===-1/0)&&(i=h,a=o)});return i}function F6(n,e,t){var i=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof n[0]!="object"&&n!=null){n=Ot(n)?n:ri(n);for(var d=0,p=n.length;d<p;d++)s=n[d],s!=null&&s<i&&(i=s)}else e=vt(e,t),hn(n,function(h,T,f){o=e(h,T,f),(o<a||o===1/0&&i===1/0)&&(i=h,a=o)});return i}var U6=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Fg(n){return n?sr(n)?ta.call(n):Mc(n)?n.match(U6):Ot(n)?lr(n,qc):ri(n):[]}function Ug(n,e,t){if(e==null||t)return Ot(n)||(n=ri(n)),n[Hc(n.length-1)];var i=Fg(n),a=gt(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var d=Hc(o,s),p=i[o];i[o]=i[d],i[d]=p}return i.slice(0,e)}function x6(n){return Ug(n,1/0)}function j6(n,e,t){var i=0;return e=vt(e,t),Kc(lr(n,function(a,s,o){return{value:a,index:i++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,d=s.criteria;if(o!==d){if(o>d||o===void 0)return 1;if(o<d||d===void 0)return-1}return a.index-s.index}),"value")}function Ws(n,e){return function(t,i,a){var s=e?[[],[]]:{};return i=vt(i,a),hn(t,function(o,d){var p=i(o,d,t);n(s,o,p)}),s}}const k6=Ws(function(n,e,t){$n(n,t)?n[t].push(e):n[t]=[e]}),q6=Ws(function(n,e,t){n[t]=e}),J6=Ws(function(n,e,t){$n(n,t)?n[t]++:n[t]=1}),W6=Ws(function(n,e,t){n[t?0:1].push(e)},!0);function H6(n){return n==null?0:Ot(n)?n.length:We(n).length}function Y6(n,e,t){return e in t}const xg=bt(function(n,e){var t={},i=e[0];if(n==null)return t;pt(i)?(e.length>1&&(i=oa(i,e[1])),e=ia(n)):(i=Y6,e=or(e,!1,!1),n=Object(n));for(var a=0,s=e.length;a<s;a++){var o=e[a],d=n[o];i(d,o,n)&&(t[o]=d)}return t}),z6=bt(function(n,e){var t=e[0],i;return pt(t)?(t=zc(t),e.length>1&&(i=e[1])):(e=lr(or(e,!1,!1),String),t=function(a,s){return!fn(e,s)}),xg(n,t,i)});function jg(n,e,t){return ta.call(n,0,Math.max(0,n.length-(e==null||t?1:e)))}function ed(n,e,t){return n==null||n.length<1?e==null||t?void 0:[]:e==null||t?n[0]:jg(n,n.length-e)}function Hs(n,e,t){return ta.call(n,e==null||t?1:e)}function Z6(n,e,t){return n==null||n.length<1?e==null||t?void 0:[]:e==null||t?n[n.length-1]:Hs(n,Math.max(0,n.length-e))}function X6(n){return ai(n,Boolean)}function Q6(n,e){return or(n,e,!1)}const kg=bt(function(n,e){return e=or(e,!0,!0),ai(n,function(t){return!fn(e,t)})}),K6=bt(function(n,e){return kg(n,e)});function td(n,e,t,i){Yb(e)||(i=t,t=e,e=!1),t!=null&&(t=vt(t,i));for(var a=[],s=[],o=0,d=gt(n);o<d;o++){var p=n[o],h=t?t(p,o,n):p;e&&!t?((!o||s!==h)&&a.push(p),s=h):t?fn(s,h)||(s.push(h),a.push(p)):fn(a,p)||a.push(p)}return a}const e9=bt(function(n){return td(or(n,!0,!0))});function t9(n){for(var e=[],t=arguments.length,i=0,a=gt(n);i<a;i++){var s=n[i];if(!fn(e,s)){var o;for(o=1;o<t&&fn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function nd(n){for(var e=n&&Gg(n,gt).length||0,t=Array(e),i=0;i<e;i++)t[i]=Kc(n,i);return t}const n9=bt(nd);function r9(n,e){for(var t={},i=0,a=gt(n);i<a;i++)e?t[n[i]]=e[i]:t[n[i][0]]=n[i][1];return t}function i9(n,e,t){e==null&&(e=n||0,n=0),t||(t=e<n?-1:1);for(var i=Math.max(Math.ceil((e-n)/t),0),a=Array(i),s=0;s<i;s++,n+=t)a[s]=n;return a}function a9(n,e){if(e==null||e<1)return[];for(var t=[],i=0,a=n.length;i<a;)t.push(ta.call(n,i,i+=e));return t}function rd(n,e){return n._chain?Q(e).chain():e}function qg(n){return hn(xc(n),function(e){var t=Q[e]=n[e];Q.prototype[e]=function(){var i=[this._wrapped];return B8.apply(i,arguments),rd(this,t.apply(Q,i))}}),Q}hn(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var e=js[n];Q.prototype[n]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(n==="shift"||n==="splice")&&t.length===0&&delete t[0]),rd(this,t)}}),hn(["concat","join","slice"],function(n){var e=js[n];Q.prototype[n]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),rd(this,t)}});var Jg=qg(Object.freeze(Object.defineProperty({__proto__:null,VERSION:Gb,after:_6,all:Vg,allKeys:ia,any:Lg,assign:Js,before:Sg,bind:Dg,bindAll:D6,chain:P6,chunk:a9,clone:s6,collect:lr,compact:X6,compose:w6,constant:ng,contains:fn,countBy:J6,create:a6,debounce:C6,default:Q,defaults:mg,defer:S6,delay:Ag,detect:Xc,difference:kg,drop:Hs,each:hn,escape:p6,every:Vg,extend:fg,extendOwn:Js,filter:ai,find:Xc,findIndex:Zc,findKey:Og,findLastIndex:Bg,findWhere:$6,first:ed,flatten:Q6,foldl:Qc,foldr:$g,forEach:hn,functions:xc,get:Rg,groupBy:k6,has:l6,head:ed,identity:qc,include:fn,includes:fn,indexBy:q6,indexOf:Mg,initial:jg,inject:Qc,intersection:t9,invert:hg,invoke:L6,isArguments:Vc,isArray:sr,isArrayBuffer:Xb,isBoolean:Yb,isDataView:ks,isDate:F8,isElement:G8,isEmpty:ra,isEqual:Z8,isError:x8,isFinite:J8,isFunction:pt,isMap:K8,isMatch:og,isNaN:tg,isNull:L8,isNumber:zb,isObject:Nn,isRegExp:U8,isSet:t6,isString:Mc,isSymbol:Zb,isTypedArray:ag,isUndefined:Hb,isWeakMap:e6,isWeakSet:n6,iteratee:Wc,keys:We,last:Z6,lastIndexOf:N6,map:lr,mapObject:c6,matcher:sa,matches:sa,max:Gg,memoize:A6,methods:xc,min:F6,mixin:qg,negate:zc,noop:gg,now:la,object:r9,omit:z6,once:M6,pairs:r6,partial:ii,partition:W6,pick:xg,pluck:Kc,property:Jc,propertyOf:d6,random:Hc,range:i9,reduce:Qc,reduceRight:$g,reject:V6,rest:Hs,restArguments:bt,result:g6,sample:Ug,select:ai,shuffle:x6,size:H6,some:Lg,sortBy:j6,sortedIndex:wg,tail:Hs,take:ed,tap:o6,template:b6,templateSettings:f6,throttle:O6,times:u6,toArray:Fg,toPath:Eg,transpose:nd,unescape:h6,union:e9,uniq:td,unique:td,uniqueId:I6,unzip:nd,values:ri,where:G6,without:K6,wrap:B6,zip:n9},Symbol.toStringTag,{value:"Module"})));Jg._=Jg;function Ys(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Wg(n){return n.charAt(0).toLowerCase()+n.slice(1)}function Hg(n,e){if(n.type!==r.Property||e.type!==r.Property)throw new Error(`Expected property entities for comparison. But got ${n.type} and ${e.type}.`);return n===e||n.id===e.id?!0:n.name!==e.name||n.static!==e.static||n.abstract!==e.abstract?!1:zs(n.dataType,e.dataType).compatible}function Yg(n,e){if(n.type!==r.CustomEntity||e.type!==r.CustomEntity)throw new Error(`Expected custom entities for comparison. But got ${n.type} and ${e.type}.`);if(n===e||n.id===e.id)return!0;if(n.properties.length!==e.properties.length)return!1;let t=[...e.properties];const i=[];for(let a=0;a<n.properties.length;a++){const s=n.properties[a];t.find(d=>{const p=Hg(s,d);return p&&(t=t.filter(h=>h.id!==d.id)),p})||i.push(s)}return!(i.length>0)}var Nt=(n=>(n.BothUnconstrained="both-unconstrained",n.AConstraintBUnconstrained="a-constraint-b-unconstrained",n.BConstraintAUnconstrained="b-constraint-a-unconstrained",n.Same="same",n.AIsListBIsNot="a-is-list-b-is-not",n.BIsListAIsNot="b-is-list-a-is-not",n.AIsNullableBIsNot="a-is-nullable-b-is-not",n.BIsNullableAIsNot="b-is-nullable-a-is-not",n.AIsTemplateBIsNot="a-is-template-b-is-not",n.BIsTemplateAIsNot="b-is-template-a-is-not",n.BothUntyped="both-untyped",n.AIsUntypedBIsNot="a-is-untyped-b-is-not",n.BIsUntypedAIsNot="b-is-untyped-a-is-not",n.TypeEntityMismatch="type-entity-mismatch",n.SameCustomEntities="same-custom-entities",n.CompatibleCustomEntities="compatible-custom-entities",n.IncompatibleCustomEntities="incompatible-custom-entities",n.SamePrimitiveEntities="same-primitive-entities",n.IncompatiblePrimitiveEntities="incompatible-primitive-entities",n.SameBuiltInBaseEntities="same-built-in-base-entities",n.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",n.CheckUnknown="check-unknown",n))(Nt||{});function zs(n,e){var t,i,a,s,o,d,p,h,T,f,b;if(n&&n.type!==r.DataType||e&&e.type!==r.DataType)throw new Error(`Expected data-type entities for comparison. But got ${n==null?void 0:n.type} and ${e==null?void 0:e.type}.`);if(n===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(n===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(n===e)return{compatible:!0,type:"same"};if(n.id===e.id)return{compatible:!0,type:"same"};if(n.isList!==e.isList)return{compatible:!1,type:n.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(n.isNullable!==e.isNullable)return{compatible:!1,type:n.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-a-is-not"};if(n.asType!==e.asType)return{compatible:!1,type:n.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!n.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(n.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!n.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=n.entity)==null?void 0:t.type)!==((i=e.entity)==null?void 0:i.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=n.entity)==null?void 0:a.type)===r.CustomEntity){if(((s=n.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const I=Yg(n.entity,e.entity);return{compatible:I,type:I?"compatible-custom-entities":"incompatible-custom-entities"}}return((d=n.entity)==null?void 0:d.type)===r.PrimitiveEntity?((p=n.entity)==null?void 0:p.id)===((h=e.entity)==null?void 0:h.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((T=n.entity)==null?void 0:T.type)===r.BuiltInBaseEntity?((f=n.entity)==null?void 0:f.id)===((b=e.entity)==null?void 0:b.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function zg(n){const e=n.project.builtInBaseEntities.find(a=>a.id===_.EXECUTION),t={id:n.id+"--infered-data-type",version:1,type:r.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=R(t,n.project);return i.inferred=!0,i.sync(t),i.setParent(n),i.entity=e,i}function Zg(n){return n.dataType?n.dataType:null}function Xg(n){return n.declaration?n.declaration.dataType:n.readsValue?si(n.readsValue):null}function Qg(n){return n.declaration.dataType}function id(n){if(n.dataType&&!n.dataType.inferred)return n.dataType;if(n.dataType&&n.dataType.inferred){if(n.inputs.filter(p=>!p.declaration).length===0)return n.dataType;const o=n.dataType.entity,d=n.inputs.map(p=>{const h=si(p),T={id:p.id+"--infered-property",type:r.Property,version:1,name:A(p,n.project),description:p.description,static:!0,abstract:!1,private:!1,required:!1,index:p.index,implements:null,dataType:null,parent:null},f=R(T,n.project);return f.setParent(o),f.dataType=h,f});return o.properties=Ld(o.properties,d),n.dataType}if(n.readsValue)return[r.Operation,r.FunctionCall,r.InternalCall].includes(n.readsValue.type)?zg(n):si(n.readsValue);const e={id:n.id+"--infered-entity",type:r.CustomEntity,version:1,name:A(n,n.project),description:n.description,static:!0,abstract:!1,properties:[],methods:[],extends:[],implements:[],abstractMethods:[],x:0,y:0,parent:null},t=R(e,n.project);t.sync(e);const i=n.inputs.map(s=>{const o=si(s),d={id:s.id+"--infered-property",type:r.Property,version:1,name:A(s,n.project),description:s.description,static:!0,abstract:!1,private:!1,required:!1,index:s.index,implements:null,dataType:null,parent:null},p=R(d,n.project);return p.setParent(t),p.dataType=o,p});t.properties=Ld(t.properties,i);const a=R({id:n.id+"--infered-data-type",version:1,type:r.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},n.project);return a.inferred=!0,t.setParent(a),a.entity=t,a.setParent(n),a}function Kg(n){return n.declaration?n.declaration.dataType:null}function si(n){switch(n.type){case r.VariableDeclaration:return id(n);case r.ArgumentDeclaration:return Zg(n);case r.ReturnDeclaration:return null;case r.VariableInstance:return Qg(n);case r.InputMap:return Xg(n);case r.OutputMap:return Kg(n);default:throw new Error(`Cannot infer data type from entity of type ${n.type}.`)}}function Zs(n){var e;switch(n.type){case r.ArgumentDeclaration:return n.dataType;case r.InputMap:return((e=n.declaration)==null?void 0:e.dataType)||null;case r.VariableDeclaration:return n.dataType;case r.VariableInstance:return n.declaration.dataType;case r.OutputMap:return n.declaration.dataType;case r.ReturnDeclaration:return n.dataType;default:return null}}function D(n){if(n){let e=null;return typeof n=="string"?e=n:n.entityId?e=n.entityId:n.type!==r.GenericReference&&(e=n.id),e}return null}function ad(n){return n.declaration||n}function s9(n){return n.type===r.VariableDeclaration?n.parent===n.project?"global-declaration":"local-declaration":n.declaration.parent===n.project?"global-instance":"local-instance"}function sd(n,e){const t=[];if(n.type===r.Project)t.push(...n.variableDeclarations);else{const a=ht(Ie(n)).filter(s=>s.type===r.VariableDeclaration);t.push(...a),n.parent&&(st.includes(n.parent.type)||n.parent.type===r.Project)&&t.push(...sd(n.parent))}return t}function o9(n){return n.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function l9(n){return n.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function ev(n){var e;return(e=n.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 Xs(n){return ev(n).toLowerCase()}function cr(n,e=!0){if(!(n!=null&&n.dataType))return"Any data type";if(!n.dataType.entity)return n.dataType.isList?"List of an unknown data type":"Unknown data type";if(n.dataType.entity.type===r.PrimitiveEntity){let t=n.dataType.entity.name;switch(n.dataType.entity.name){case v.String:t="Text";break;case v.JSON:t=e?"Any data structure":"Unknown data structure";break;default:t=n.dataType.entity.name;break}return n.dataType.isList?`List of ${t}s`:`${t.slice(0,1).toUpperCase()}${t.slice(1)}`}else return n.dataType.isList?`List of ${n.dataType.entity.name} entities`:`${n.dataType.entity.name.slice(0,1).toUpperCase()+n.dataType.entity.name.slice(1)} entity`}function tv(n){return cr(n.declaration)}function c9(n){return n.type===r.VariableInstance?tv(n):cr(n)}function nv(n){if(!n)return"Any data type";if(!n.entity)return"Inherited";if(n.entity.type===r.PrimitiveEntity){const e=n.entity.name===v.String?"Text":n.entity.name;return n.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(n.entity.type===r.CustomEntity){const e=ld(n.entity);return n.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(n.entity.type===r.BuiltInBaseEntity){const e=od(n.entity);return n.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else return n.isList?`List of ${n.entity.name} entities`:`${n.entity.name.slice(0,1).toUpperCase()+n.entity.name.slice(1)} entity`}function rv(n){if(!n.dataType)return"Any data type";if(!n.dataType.entity)return"Inherited";if(n.dataType.entity.type===r.PrimitiveEntity){const e=n.dataType.entity.name===v.String?"Text":n.dataType.entity.name;return n.dataType.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(n.dataType.entity.type===r.CustomEntity){const e=ld(n.dataType.entity);return n.dataType.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(n.dataType.entity.type===r.BuiltInBaseEntity){const e=od(n.dataType.entity);return n.dataType.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else return n.dataType.isList?`List of ${n.dataType.entity.name} entities`:`${n.dataType.entity.name.slice(0,1).toUpperCase()+n.dataType.entity.name.slice(1)} entity`}function iv(n){switch(n.type){case r.Property:return rv(n);case r.VariableDeclaration:return cr(n);case r.ArgumentDeclaration:return cr(n,!1);case r.InputMap:{const e=n.declaration;return e?iv(e):"Unknown data type"}case r.ReturnDeclaration:return cr(n,!1);case r.OutputMap:{const e=n.declaration;return cr(e,!1)}}return"Unknown data type"}function Qs(n){switch(n.declaration.id){case Oe.Equal:return"is equal to";case Oe.NotEqual:return"is not equal to";case Oe.MoreThan:return"is greater than";case Oe.MoreThanOrEqual:return"is greater than or equal to";case Oe.LessThan:return"is less than";case Oe.LessThanOrEqual:return"is less than or equal to";case Oe.And:return"and";case Oe.Or:return"or";case wt.Empty:return"is empty";case wt.NotEmpty:return"is not empty"}}function av(n){return n.includes(_.HTTP_ENDPOINT)?"HTTP endpoint":n.includes(_.PERSISTED_ENTITY)?"Persisted entity":n.includes(_.CRON_JOB)?"Scheduled execution":n.includes(_.RELATIONAL_DATABASE)?"Relational database":"Entity"}function od(n){switch(n.name){case _.HTTP_ENDPOINT:return"HTTP endpoint";case _.PERSISTED_ENTITY:return"Persisted entity";case _.CRON_JOB:return"Scheduled execution";case _.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function ld(n){const e=jv(n);if(!e){const t=Uv(n);return t.includes(_.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(_.PERSISTED_ENTITY)?"Persisted entity":t.includes(_.CRON_JOB)?"Scheduled execution":t.includes(_.RELATIONAL_DATABASE)?"Relational database":A(n,n.project)+" entity"}return A(e,n.project)+" entity"}function sv(n){let e="Find ";return n.outputsDeclarations.forEach((t,i)=>{const a=Zs(t),s=Wg(a&&a.entity?A(a.entity,n.project):"unstructured data");i===0?e+=`${s} `:i===n.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function ov(n){switch(n.name){case v.String:return"Text";case v.Number:return"Number";case v.Boolean:return"Boolean";case v.JSON:return"Data structure";case v.UUID:return"Unique identifier";case v.Date:return"Date";case v.EntityTemplate:return"Entity as template";case v.Enum:return"Enumeration";case v.File:return"File";case v.Null:return"Empty";case v.ActionDescriptor:return"Action descriptor";default:return n.name}}function lv(n){switch(n.id){case je.List:return"Loop over list items";case je.ManualFlow:return"Manual flow control loop";case je.ObjectKeys:return"Loop over object keys";case je.ObjectValues:return"Loop over object values";case je.Counted:return"Loop given number of times";case je.String:return"Loop over text characters";case at.Addition:return"Sum numbers";case at.Substraction:return"Subtract numbers";case at.Multiplication:return"Multiply numbers";case at.Division:return"Divide numbers";case at.Remainder:return"Get remainder of numbers";case at.Exponentiation:return"Get exponent of numbers";case ve.AddIndex:return"Add at index position";case ve.DeleteFirst:return"Delete first character";case ve.DeleteLast:return"Delete last character";case ve.DeleteIndex:return"Delete at index position";case ve.Join:return"Join texts";case ve.ReplaceAllMatches:return"Replace all matches";case ve.ReplaceFirst:return"Replace first match";case ve.ReplaceLast:return"Replace last match";case ve.Split:return"Split text";case ve.ReplaceIndex:return"Replace at index position";case ve.ReplaceSingleMatch:return"Replace single match";case ve.GetFirst:return"Get first character";case ve.GetLast:return"Get last character";case ve.GetIndex:return"Get at index position";case ve.Append:return"Add at the end";case ve.Prepend:return"Add at the start";case Pe.Wait:return"Wait";case Pe.Parallel:return"Run in parallel";case Pe.Sequential:return"Run in sequence";case Ye.HttpRequest:return"HTTP request";case Ze.CreateNewInstance:return"Create new copy of entity";case k.AddIndex:return"Add item at index position";case k.DeleteFirst:return"Delete first item";case k.DeleteLast:return"Delete last item";case k.DeleteIndex:return"Delete item at index position";case k.Join:return"Join lists";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 list";case k.ReplaceIndex:return"Replace at index position";case k.ReplaceSingleMatch:return"Replace single match";case k.GetFirst:return"Get first item";case k.GetLast:return"Get last item";case k.GetIndex:return"Get item at index position";case k.Append:return"Add item at the end";case k.Prepend:return"Add item at the start";case en.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(n.name.slice(0,1).toUpperCase()+n.name.slice(1)).replaceAll("-"," ")}}function A(n,e){var t;if(r.FunctionDeclaration===n.type){const i=n.name;if(Object.values(Pt).includes(i))switch(i){case Pt.AbortExecution:return"Abort execution";case Pt.DeletePersistedEntity:return"Delete persisted entity";case Pt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Ys(n.type).replaceAll("-"," ")}return i}if(r.BuiltInBaseEntity===n.type)return av([n.name]);if(jd.includes(n.type)&&n.type!==r.ActionDescriptor)return n.name;switch(n.type){case r.Search:return sv(n);case r.Operation:case r.InternalCall:case r.Loop:const i=Bt(n.declaration,e);return A(i,e);case r.ActionDescriptor:return lv(n);case r.BreakStatement:const a=Bt(n.parent,e);return`Stop loop ${A(a,e)}`;case r.ContinueStatement:const s=Bt(n.parent,e);return`Execute next iteration of ${A(s,e)}`;case r.FunctionCall:return Bt(n.declaration,e).name;case r.Condition:{const d=n;if((t=n.inputs)!=null&&t.length){const p=A(d.inputs[0],d.project);if(d.inputs[1]){const h=d.inputs[1].declaration.name;return`If ${p} ${Qs(d)} ${h}`}return`If ${p} ${Qs(d)}`}else return`If ${Qs(d)}`}case r.ReturnStatement:{const d=Bt(n.parent,e);return`Output of ${A(d,e)}`}case r.InputMap:if(n.declaration){const d=Bt(n.declaration,e);return A(d,e)||""}else return n.name||"";case r.VariableInstance:{const d=Bt(n.declaration,e);return A(d,e)||""}case r.OutputMap:if(n.declaration){const d=Bt(n.declaration,e);return(d==null?void 0:d.name)||""}else return"";case r.PrimitiveEntity:case r.PrimitiveValue:return ov(n);default:return Ys(n.type).replaceAll("-"," ")}}function Ks(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=e.entities.filter(a=>a.name===n.name);return i.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.name}" that is not unique in the project. Entity with id "${i[0].id}" has the same name.
|
|
14
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null})),t}function
|
|
15
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null})),t}function
|
|
16
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}return t}function
|
|
17
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function
|
|
18
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function
|
|
19
|
-
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function
|
|
20
|
-
${Gn}`,t.push(new E({id:`${n.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.Error,message:p,issue:null}))}else if(n.implements){const p=e.get(n.implements);if(n.id===n.implements)return t.push(new E({id:`${n.id}--${n.implements}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${n.implements}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 h=a.properties.find(T=>{var f;return((f=T.implements)==null?void 0:f.id)===n.implements});h?t.push(new E({id:`${n.id}--${g.PropertyOverwrite}`,code:g.PropertyOverwrite,severity:m.Error,message:`The property with id "${n.id}" is trying to implement the property with id "${n.implements}", but the parent entity already has a property with id '${h.id}' that implements the same base property.`,issue:null})):[r.Property].includes(p.type)?p.abstract||t.push(new E({id:`${n.id}--${n.implements}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new E({id:`${n.id}--${n.implements}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an entity of type 'property'.`,issue:null}))}}}}}const i=Fe(n,{},e);return t.push(...i.errors),t}const he=class he{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"private");l(this,"abstract");l(this,"index");l(this,"static");l(this,"required");l(this,"type",r.Property);l(this,"hidden",!1);l(this,"dataType",null);l(this,"implements",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.implements){const p=D(e.implements);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:r.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},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=
|
|
13
|
+
`+s+"}",p}function R6(n,e,t){e=ia(e);var i=e.length;if(!i)return pt(t)?t.call(n):t;for(var a=0;a<i;a++){var s=n==null?void 0:n[e[a]];s===void 0&&(s=t,a=i),n=pt(s)?s.call(n):s}return n}var b6=0;function g6(n){var e=++b6+"";return n?n+e:e}function v6(n){var e=Q(n);return e._chain=!0,e}function vg(n,e,t,i,a){if(!(i instanceof e))return n.apply(t,a);var s=fg(n.prototype),o=n.apply(s,a);return Nn(o)?o:s}var ii=bt(function(n,e){var t=ii.placeholder,i=function(){for(var a=0,s=e.length,o=Array(s),d=0;d<s;d++)o[d]=e[d]===t?arguments[a++]:e[d];for(;a<arguments.length;)o.push(arguments[a++]);return vg(n,i,this,this,o)};return i});ii.placeholder=Q;const Ig=bt(function(n,e,t){if(!pt(n))throw new TypeError("Bind must be called on a function");var i=bt(function(a){return vg(n,i,e,this,t.concat(a))});return i}),Ot=tg(gt);function or(n,e,t,i){if(i=i||[],!e&&e!==0)e=1/0;else if(e<=0)return i.concat(n);for(var a=i.length,s=0,o=gt(n);s<o;s++){var d=n[s];if(Ot(d)&&(sr(d)||Vc(d)))if(e>1)or(d,e-1,t,i),a=i.length;else for(var p=0,h=d.length;p<h;)i[a++]=d[p++];else t||(i[a++]=d)}return i}const I6=bt(function(n,e){e=or(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var i=e[t];n[i]=Ig(n[i],n)}return n});function P6(n,e){var t=function(i){var a=t.cache,s=""+(e?e.apply(this,arguments):i);return $n(a,s)||(a[s]=n.apply(this,arguments)),a[s]};return t.cache={},t}const Pg=bt(function(n,e,t){return setTimeout(function(){return n.apply(null,t)},e)}),D6=ii(Pg,Q,1);function A6(n,e,t){var i,a,s,o,d=0;t||(t={});var p=function(){d=t.leading===!1?0:oa(),i=null,o=n.apply(a,s),i||(a=s=null)},h=function(){var T=oa();!d&&t.leading===!1&&(d=T);var f=e-(T-d);return a=this,s=arguments,f<=0||f>e?(i&&(clearTimeout(i),i=null),d=T,o=n.apply(a,s),i||(a=s=null)):!i&&t.trailing!==!1&&(i=setTimeout(p,f)),o};return h.cancel=function(){clearTimeout(i),d=0,i=a=s=null},h}function S6(n,e,t){var i,a,s,o,d,p=function(){var T=oa()-a;e>T?i=setTimeout(p,e-T):(i=null,t||(o=n.apply(d,s)),i||(s=d=null))},h=bt(function(T){return d=this,s=T,a=oa(),i||(i=setTimeout(p,e),t&&(o=n.apply(d,s))),o});return h.cancel=function(){clearTimeout(i),i=s=d=null},h}function O6(n,e){return ii(e,n)}function zc(n){return function(){return!n.apply(this,arguments)}}function C6(){var n=arguments,e=n.length-1;return function(){for(var t=e,i=n[e].apply(this,arguments);t--;)i=n[t].call(this,i);return i}}function B6(n,e){return function(){if(--n<1)return e.apply(this,arguments)}}function Dg(n,e){var t;return function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=null),t}}const w6=ii(Dg,2);function Ag(n,e,t){e=vt(e,t);for(var i=We(n),a,s=0,o=i.length;s<o;s++)if(a=i[s],e(n[a],a,n))return a}function Sg(n){return function(e,t,i){t=vt(t,i);for(var a=gt(e),s=n>0?0:a-1;s>=0&&s<a;s+=n)if(t(e[s],s,e))return s;return-1}}const Zc=Sg(1),Og=Sg(-1);function Cg(n,e,t,i){t=vt(t,i,1);for(var a=t(e),s=0,o=gt(n);s<o;){var d=Math.floor((s+o)/2);t(n[d])<a?s=d+1:o=d}return s}function Bg(n,e,t){return function(i,a,s){var o=0,d=gt(i);if(typeof s=="number")n>0?o=s>=0?s:Math.max(s+d,o):d=s>=0?Math.min(s+1,d):s+d+1;else if(t&&s&&d)return s=t(i,a),i[s]===a?s:-1;if(a!==a)return s=e(ea.call(i,o,d),Kb),s>=0?s+o:-1;for(s=n>0?o:d-1;s>=0&&s<d;s+=n)if(i[s]===a)return s;return-1}}const wg=Bg(1,Zc,Cg),_6=Bg(-1,Og);function Xc(n,e,t){var i=Ot(n)?Zc:Ag,a=i(n,e,t);if(a!==void 0&&a!==-1)return n[a]}function M6(n,e){return Xc(n,aa(e))}function hn(n,e,t){e=sa(e,t);var i,a;if(Ot(n))for(i=0,a=n.length;i<a;i++)e(n[i],i,n);else{var s=We(n);for(i=0,a=s.length;i<a;i++)e(n[s[i]],s[i],n)}return n}function lr(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=Array(a),o=0;o<a;o++){var d=i?i[o]:o;s[o]=e(n[d],d,n)}return s}function _g(n){var e=function(t,i,a,s){var o=!Ot(t)&&We(t),d=(o||t).length,p=n>0?0:d-1;for(s||(a=t[o?o[p]:p],p+=n);p>=0&&p<d;p+=n){var h=o?o[p]:p;a=i(a,t[h],h,t)}return a};return function(t,i,a,s){var o=arguments.length>=3;return e(t,sa(i,s,4),a,o)}}const Qc=_g(1),Mg=_g(-1);function ai(n,e,t){var i=[];return e=vt(e,t),hn(n,function(a,s,o){e(a,s,o)&&i.push(a)}),i}function N6(n,e,t){return ai(n,zc(vt(e)),t)}function Ng(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=0;s<a;s++){var o=i?i[s]:s;if(!e(n[o],o,n))return!1}return!0}function $g(n,e,t){e=vt(e,t);for(var i=!Ot(n)&&We(n),a=(i||n).length,s=0;s<a;s++){var o=i?i[s]:s;if(e(n[o],o,n))return!0}return!1}function fn(n,e,t,i){return Ot(n)||(n=ri(n)),(typeof t!="number"||i)&&(t=0),wg(n,e,t)>=0}const $6=bt(function(n,e,t){var i,a;return pt(e)?a=e:(e=ia(e),i=e.slice(0,-1),e=e[e.length-1]),lr(n,function(s){var o=a;if(!o){if(i&&i.length&&(s=kc(s,i)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function Kc(n,e){return lr(n,Jc(e))}function V6(n,e){return ai(n,aa(e))}function Vg(n,e,t){var i=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof n[0]!="object"&&n!=null){n=Ot(n)?n:ri(n);for(var d=0,p=n.length;d<p;d++)s=n[d],s!=null&&s>i&&(i=s)}else e=vt(e,t),hn(n,function(h,T,f){o=e(h,T,f),(o>a||o===-1/0&&i===-1/0)&&(i=h,a=o)});return i}function L6(n,e,t){var i=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof n[0]!="object"&&n!=null){n=Ot(n)?n:ri(n);for(var d=0,p=n.length;d<p;d++)s=n[d],s!=null&&s<i&&(i=s)}else e=vt(e,t),hn(n,function(h,T,f){o=e(h,T,f),(o<a||o===1/0&&i===1/0)&&(i=h,a=o)});return i}var G6=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Lg(n){return n?sr(n)?ea.call(n):Mc(n)?n.match(G6):Ot(n)?lr(n,qc):ri(n):[]}function Gg(n,e,t){if(e==null||t)return Ot(n)||(n=ri(n)),n[Hc(n.length-1)];var i=Lg(n),a=gt(i);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var d=Hc(o,s),p=i[o];i[o]=i[d],i[d]=p}return i.slice(0,e)}function F6(n){return Gg(n,1/0)}function U6(n,e,t){var i=0;return e=vt(e,t),Kc(lr(n,function(a,s,o){return{value:a,index:i++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,d=s.criteria;if(o!==d){if(o>d||o===void 0)return 1;if(o<d||d===void 0)return-1}return a.index-s.index}),"value")}function Js(n,e){return function(t,i,a){var s=e?[[],[]]:{};return i=vt(i,a),hn(t,function(o,d){var p=i(o,d,t);n(s,o,p)}),s}}const x6=Js(function(n,e,t){$n(n,t)?n[t].push(e):n[t]=[e]}),j6=Js(function(n,e,t){n[t]=e}),k6=Js(function(n,e,t){$n(n,t)?n[t]++:n[t]=1}),q6=Js(function(n,e,t){n[t?0:1].push(e)},!0);function J6(n){return n==null?0:Ot(n)?n.length:We(n).length}function W6(n,e,t){return e in t}const Fg=bt(function(n,e){var t={},i=e[0];if(n==null)return t;pt(i)?(e.length>1&&(i=sa(i,e[1])),e=ra(n)):(i=W6,e=or(e,!1,!1),n=Object(n));for(var a=0,s=e.length;a<s;a++){var o=e[a],d=n[o];i(d,o,n)&&(t[o]=d)}return t}),H6=bt(function(n,e){var t=e[0],i;return pt(t)?(t=zc(t),e.length>1&&(i=e[1])):(e=lr(or(e,!1,!1),String),t=function(a,s){return!fn(e,s)}),Fg(n,t,i)});function Ug(n,e,t){return ea.call(n,0,Math.max(0,n.length-(e==null||t?1:e)))}function ed(n,e,t){return n==null||n.length<1?e==null||t?void 0:[]:e==null||t?n[0]:Ug(n,n.length-e)}function Ws(n,e,t){return ea.call(n,e==null||t?1:e)}function Y6(n,e,t){return n==null||n.length<1?e==null||t?void 0:[]:e==null||t?n[n.length-1]:Ws(n,Math.max(0,n.length-e))}function z6(n){return ai(n,Boolean)}function Z6(n,e){return or(n,e,!1)}const xg=bt(function(n,e){return e=or(e,!0,!0),ai(n,function(t){return!fn(e,t)})}),X6=bt(function(n,e){return xg(n,e)});function td(n,e,t,i){Wb(e)||(i=t,t=e,e=!1),t!=null&&(t=vt(t,i));for(var a=[],s=[],o=0,d=gt(n);o<d;o++){var p=n[o],h=t?t(p,o,n):p;e&&!t?((!o||s!==h)&&a.push(p),s=h):t?fn(s,h)||(s.push(h),a.push(p)):fn(a,p)||a.push(p)}return a}const Q6=bt(function(n){return td(or(n,!0,!0))});function K6(n){for(var e=[],t=arguments.length,i=0,a=gt(n);i<a;i++){var s=n[i];if(!fn(e,s)){var o;for(o=1;o<t&&fn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function nd(n){for(var e=n&&Vg(n,gt).length||0,t=Array(e),i=0;i<e;i++)t[i]=Kc(n,i);return t}const e9=bt(nd);function t9(n,e){for(var t={},i=0,a=gt(n);i<a;i++)e?t[n[i]]=e[i]:t[n[i][0]]=n[i][1];return t}function n9(n,e,t){e==null&&(e=n||0,n=0),t||(t=e<n?-1:1);for(var i=Math.max(Math.ceil((e-n)/t),0),a=Array(i),s=0;s<i;s++,n+=t)a[s]=n;return a}function r9(n,e){if(e==null||e<1)return[];for(var t=[],i=0,a=n.length;i<a;)t.push(ea.call(n,i,i+=e));return t}function rd(n,e){return n._chain?Q(e).chain():e}function jg(n){return hn(xc(n),function(e){var t=Q[e]=n[e];Q.prototype[e]=function(){var i=[this._wrapped];return O8.apply(i,arguments),rd(this,t.apply(Q,i))}}),Q}hn(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var e=xs[n];Q.prototype[n]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(n==="shift"||n==="splice")&&t.length===0&&delete t[0]),rd(this,t)}}),hn(["concat","join","slice"],function(n){var e=xs[n];Q.prototype[n]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),rd(this,t)}});var kg=jg(Object.freeze(Object.defineProperty({__proto__:null,VERSION:Vb,after:B6,all:Ng,allKeys:ra,any:$g,assign:qs,before:Dg,bind:Ig,bindAll:I6,chain:v6,chunk:r9,clone:i6,collect:lr,compact:z6,compose:C6,constant:eg,contains:fn,countBy:k6,create:r6,debounce:S6,default:Q,defaults:hg,defer:D6,delay:Pg,detect:Xc,difference:xg,drop:Ws,each:hn,escape:d6,every:Ng,extend:yg,extendOwn:qs,filter:ai,find:Xc,findIndex:Zc,findKey:Ag,findLastIndex:Og,findWhere:M6,first:ed,flatten:Z6,foldl:Qc,foldr:Mg,forEach:hn,functions:xc,get:Tg,groupBy:x6,has:s6,head:ed,identity:qc,include:fn,includes:fn,indexBy:j6,indexOf:wg,initial:Ug,inject:Qc,intersection:K6,invert:pg,invoke:$6,isArguments:Vc,isArray:sr,isArrayBuffer:zb,isBoolean:Wb,isDataView:js,isDate:L8,isElement:V8,isEmpty:na,isEqual:Y8,isError:F8,isFinite:k8,isFunction:pt,isMap:X8,isMatch:ag,isNaN:Kb,isNull:$8,isNumber:Hb,isObject:Nn,isRegExp:G8,isSet:K8,isString:Mc,isSymbol:Yb,isTypedArray:rg,isUndefined:Jb,isWeakMap:Q8,isWeakSet:e6,iteratee:Wc,keys:We,last:Y6,lastIndexOf:_6,map:lr,mapObject:o6,matcher:aa,matches:aa,max:Vg,memoize:P6,methods:xc,min:L6,mixin:jg,negate:zc,noop:Rg,now:oa,object:t9,omit:H6,once:w6,pairs:t6,partial:ii,partition:q6,pick:Fg,pluck:Kc,property:Jc,propertyOf:l6,random:Hc,range:n9,reduce:Qc,reduceRight:Mg,reject:N6,rest:Ws,restArguments:bt,result:R6,sample:Gg,select:ai,shuffle:F6,size:J6,some:$g,sortBy:U6,sortedIndex:Cg,tail:Ws,take:ed,tap:a6,template:E6,templateSettings:y6,throttle:A6,times:c6,toArray:Lg,toPath:mg,transpose:nd,unescape:p6,union:Q6,uniq:td,unique:td,uniqueId:g6,unzip:nd,values:ri,where:V6,without:X6,wrap:O6,zip:e9},Symbol.toStringTag,{value:"Module"})));kg._=kg;function Hs(n){return n.charAt(0).toUpperCase()+n.slice(1)}function qg(n){return n.charAt(0).toLowerCase()+n.slice(1)}function Jg(n,e){if(n.type!==r.Property||e.type!==r.Property)throw new Error(`Expected property entities for comparison. But got ${n.type} and ${e.type}.`);return n===e||n.id===e.id?!0:n.name!==e.name||n.static!==e.static||n.abstract!==e.abstract?!1:Ys(n.dataType,e.dataType).compatible}function Wg(n,e){if(n.type!==r.CustomEntity||e.type!==r.CustomEntity)throw new Error(`Expected custom entities for comparison. But got ${n.type} and ${e.type}.`);if(n===e||n.id===e.id)return!0;if(n.properties.length!==e.properties.length)return!1;let t=[...e.properties];const i=[];for(let a=0;a<n.properties.length;a++){const s=n.properties[a];t.find(d=>{const p=Jg(s,d);return p&&(t=t.filter(h=>h.id!==d.id)),p})||i.push(s)}return!(i.length>0)}var Nt=(n=>(n.BothUnconstrained="both-unconstrained",n.AConstraintBUnconstrained="a-constraint-b-unconstrained",n.BConstraintAUnconstrained="b-constraint-a-unconstrained",n.Same="same",n.AIsListBIsNot="a-is-list-b-is-not",n.BIsListAIsNot="b-is-list-a-is-not",n.AIsNullableBIsNot="a-is-nullable-b-is-not",n.BIsNullableAIsNot="b-is-nullable-a-is-not",n.AIsTemplateBIsNot="a-is-template-b-is-not",n.BIsTemplateAIsNot="b-is-template-a-is-not",n.BothUntyped="both-untyped",n.AIsUntypedBIsNot="a-is-untyped-b-is-not",n.BIsUntypedAIsNot="b-is-untyped-a-is-not",n.TypeEntityMismatch="type-entity-mismatch",n.SameCustomEntities="same-custom-entities",n.CompatibleCustomEntities="compatible-custom-entities",n.IncompatibleCustomEntities="incompatible-custom-entities",n.SamePrimitiveEntities="same-primitive-entities",n.IncompatiblePrimitiveEntities="incompatible-primitive-entities",n.SameBuiltInBaseEntities="same-built-in-base-entities",n.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",n.CheckUnknown="check-unknown",n))(Nt||{});function Ys(n,e){var t,i,a,s,o,d,p,h,T,f,b;if(n&&n.type!==r.DataType||e&&e.type!==r.DataType)throw new Error(`Expected data-type entities for comparison. But got ${n==null?void 0:n.type} and ${e==null?void 0:e.type}.`);if(n===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(n===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(n===e)return{compatible:!0,type:"same"};if(n.id===e.id)return{compatible:!0,type:"same"};if(n.isList!==e.isList)return{compatible:!1,type:n.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(n.isNullable!==e.isNullable)return{compatible:!1,type:n.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-a-is-not"};if(n.asType!==e.asType)return{compatible:!1,type:n.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!n.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(n.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!n.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=n.entity)==null?void 0:t.type)!==((i=e.entity)==null?void 0:i.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=n.entity)==null?void 0:a.type)===r.CustomEntity){if(((s=n.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const I=Wg(n.entity,e.entity);return{compatible:I,type:I?"compatible-custom-entities":"incompatible-custom-entities"}}return((d=n.entity)==null?void 0:d.type)===r.PrimitiveEntity?((p=n.entity)==null?void 0:p.id)===((h=e.entity)==null?void 0:h.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((T=n.entity)==null?void 0:T.type)===r.BuiltInBaseEntity?((f=n.entity)==null?void 0:f.id)===((b=e.entity)==null?void 0:b.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function i9(n){const e=n.project.builtInBaseEntities.find(a=>a.id===_.EXECUTION),t={id:n.id+"--infered-data-type",version:1,type:r.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=R(t,n.project);return i.inferred=!0,i.sync(t),i.setParent(n),i.entity=e,i}function Hg(n){return n.dataType?n.dataType:null}function Yg(n){return n.declaration?n.declaration.dataType:n.readsValue?zs(n.readsValue):null}function zg(n){return zs(n.declaration)}function Zg(n){return n.dataType&&!n.dataType.inferred?n.dataType:(n.dataType&&n.dataType.inferred,n.inferDataTypeAndSyncInstancesInputsAndOutputs(),n.dataType)}function Xg(n){return n.declaration?n.declaration.dataType:null}function zs(n){switch(n.type){case r.VariableDeclaration:return Zg(n);case r.ArgumentDeclaration:return Hg(n);case r.ReturnDeclaration:return null;case r.VariableInstance:return zg(n);case r.InputMap:return Yg(n);case r.OutputMap:return Xg(n);default:throw new Error(`Cannot infer data type from entity of type ${n.type}.`)}}function Zs(n){switch(n.type){case r.ArgumentDeclaration:return n.getDataType();case r.InputMap:return n.getDataType();case r.VariableDeclaration:return n.getDataType();case r.VariableInstance:return n.getDataType();case r.OutputMap:return n.getDataType();case r.ReturnDeclaration:return n.getDataType();case r.Property:return n.getDataType();case r.ValueDescriptor:return n.getDataType();default:return null}}function D(n){if(n){let e=null;return typeof n=="string"?e=n:n.entityId?e=n.entityId:n.type!==r.GenericReference&&(e=n.id),e}return null}function id(n){return n.declaration||n}function a9(n){return n.type===r.VariableDeclaration?n.parent===n.project?"global-declaration":"local-declaration":n.declaration.parent===n.project?"global-instance":"local-instance"}function ad(n,e){const t=[];if(n.type===r.Project)t.push(...n.variableDeclarations);else{const a=ht(Ie(n)).filter(s=>s.type===r.VariableDeclaration);t.push(...a),n.parent&&(st.includes(n.parent.type)||n.parent.type===r.Project)&&t.push(...ad(n.parent))}return t}function s9(n){return n.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function o9(n){return n.split(/\s+/).map(i=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join("")}function Qg(n){var e;return(e=n.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 Xs(n){return Qg(n).toLowerCase()}function cr(n,e=!0){if(!(n!=null&&n.dataType))return"Any data type";if(!n.dataType.entity)return n.dataType.isList?"List of an unknown data type":"Unknown data type";if(n.dataType.entity.type===r.PrimitiveEntity){let t=n.dataType.entity.name;switch(n.dataType.entity.name){case v.String:t="Text";break;case v.JSON:t=e?"Any data structure":"Unknown data structure";break;default:t=n.dataType.entity.name;break}return n.dataType.isList?`List of ${t}s`:`${t.slice(0,1).toUpperCase()}${t.slice(1)}`}else return n.dataType.isList?`List of ${n.dataType.entity.name} entities`:`${n.dataType.entity.name.slice(0,1).toUpperCase()+n.dataType.entity.name.slice(1)} entity`}function Kg(n){return cr(n.declaration)}function l9(n){return n.type===r.VariableInstance?Kg(n):cr(n)}function ev(n){if(!n)return"Any data type";if(!n.entity)return"Inherited";if(n.entity.type===r.PrimitiveEntity){const e=n.entity.name===v.String?"Text":n.entity.name;return n.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(n.entity.type===r.CustomEntity){const e=od(n.entity);return n.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(n.entity.type===r.BuiltInBaseEntity){const e=sd(n.entity);return n.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else return n.isList?`List of ${n.entity.name} entities`:`${n.entity.name.slice(0,1).toUpperCase()+n.entity.name.slice(1)} entity`}function tv(n){if(!n.dataType)return"Any data type";if(!n.dataType.entity)return"Inherited";if(n.dataType.entity.type===r.PrimitiveEntity){const e=n.dataType.entity.name===v.String?"Text":n.dataType.entity.name;return n.dataType.isList?`List of ${e}s`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}else if(n.dataType.entity.type===r.CustomEntity){const e=od(n.dataType.entity);return n.dataType.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else if(n.dataType.entity.type===r.BuiltInBaseEntity){const e=sd(n.dataType.entity);return n.dataType.isList?`List of ${e} entities`:e.slice(0,1).toUpperCase()+e.slice(1)}else return n.dataType.isList?`List of ${n.dataType.entity.name} entities`:`${n.dataType.entity.name.slice(0,1).toUpperCase()+n.dataType.entity.name.slice(1)} entity`}function nv(n){switch(n.type){case r.Property:return tv(n);case r.VariableDeclaration:return cr(n);case r.ArgumentDeclaration:return cr(n,!1);case r.InputMap:{const e=n.declaration;return e?nv(e):"Unknown data type"}case r.ReturnDeclaration:return cr(n,!1);case r.OutputMap:{const e=n.declaration;return cr(e,!1)}}return"Unknown data type"}function Qs(n){switch(n.declaration.id){case Oe.Equal:return"is equal to";case Oe.NotEqual:return"is not equal to";case Oe.MoreThan:return"is greater than";case Oe.MoreThanOrEqual:return"is greater than or equal to";case Oe.LessThan:return"is less than";case Oe.LessThanOrEqual:return"is less than or equal to";case Oe.And:return"and";case Oe.Or:return"or";case wt.Empty:return"is empty";case wt.NotEmpty:return"is not empty"}}function rv(n){return n.includes(_.HTTP_ENDPOINT)?"HTTP endpoint":n.includes(_.PERSISTED_ENTITY)?"Persisted entity":n.includes(_.CRON_JOB)?"Scheduled execution":n.includes(_.RELATIONAL_DATABASE)?"Relational database":"Entity"}function sd(n){switch(n.name){case _.HTTP_ENDPOINT:return"HTTP endpoint";case _.PERSISTED_ENTITY:return"Persisted entity";case _.CRON_JOB:return"Scheduled execution";case _.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function od(n){const e=Uv(n);if(!e){const t=Gv(n);return t.includes(_.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(_.PERSISTED_ENTITY)?"Persisted entity":t.includes(_.CRON_JOB)?"Scheduled execution":t.includes(_.RELATIONAL_DATABASE)?"Relational database":A(n,n.project)+" entity"}return A(e,n.project)+" entity"}function iv(n){let e="Find ";return n.outputsDeclarations.forEach((t,i)=>{const a=Zs(t),s=qg(a&&a.entity?A(a.entity,n.project):"unstructured data");i===0?e+=`${s} `:i===n.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function av(n){switch(n.name){case v.String:return"Text";case v.Number:return"Number";case v.Boolean:return"Boolean";case v.JSON:return"Data structure";case v.UUID:return"Unique identifier";case v.Date:return"Date";case v.EntityTemplate:return"Entity as template";case v.Enum:return"Enumeration";case v.File:return"File";case v.Null:return"Empty";case v.ActionDescriptor:return"Action descriptor";default:return n.name}}function sv(n){switch(n.id){case je.List:return"Loop over list items";case je.ManualFlow:return"Manual flow control loop";case je.ObjectKeys:return"Loop over object keys";case je.ObjectValues:return"Loop over object values";case je.Counted:return"Loop given number of times";case je.String:return"Loop over text characters";case at.Addition:return"Sum numbers";case at.Substraction:return"Subtract numbers";case at.Multiplication:return"Multiply numbers";case at.Division:return"Divide numbers";case at.Remainder:return"Get remainder of numbers";case at.Exponentiation:return"Get exponent of numbers";case ve.AddIndex:return"Add at index position";case ve.DeleteFirst:return"Delete first character";case ve.DeleteLast:return"Delete last character";case ve.DeleteIndex:return"Delete at index position";case ve.Join:return"Join texts";case ve.ReplaceAllMatches:return"Replace all matches";case ve.ReplaceFirst:return"Replace first match";case ve.ReplaceLast:return"Replace last match";case ve.Split:return"Split text";case ve.ReplaceIndex:return"Replace at index position";case ve.ReplaceSingleMatch:return"Replace single match";case ve.GetFirst:return"Get first character";case ve.GetLast:return"Get last character";case ve.GetIndex:return"Get at index position";case ve.Append:return"Add at the end";case ve.Prepend:return"Add at the start";case Pe.Wait:return"Wait";case Pe.Parallel:return"Run in parallel";case Pe.Sequential:return"Run in sequence";case Ye.HttpRequest:return"HTTP request";case Ze.CreateNewInstance:return"Create new copy of entity";case k.AddIndex:return"Add item at index position";case k.DeleteFirst:return"Delete first item";case k.DeleteLast:return"Delete last item";case k.DeleteIndex:return"Delete item at index position";case k.Join:return"Join lists";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 list";case k.ReplaceIndex:return"Replace at index position";case k.ReplaceSingleMatch:return"Replace single match";case k.GetFirst:return"Get first item";case k.GetLast:return"Get last item";case k.GetIndex:return"Get item at index position";case k.Append:return"Add item at the end";case k.Prepend:return"Add item at the start";case en.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(n.name.slice(0,1).toUpperCase()+n.name.slice(1)).replaceAll("-"," ")}}function A(n,e){var t;if(r.FunctionDeclaration===n.type){const i=n.name;if(Object.values(Pt).includes(i))switch(i){case Pt.AbortExecution:return"Abort execution";case Pt.DeletePersistedEntity:return"Delete persisted entity";case Pt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Hs(n.type).replaceAll("-"," ")}return i}if(r.BuiltInBaseEntity===n.type)return rv([n.name]);if(Ud.includes(n.type)&&n.type!==r.ActionDescriptor)return n.name;switch(n.type){case r.Search:return iv(n);case r.Operation:case r.InternalCall:case r.Loop:const i=Bt(n.declaration,e);return A(i,e);case r.ActionDescriptor:return sv(n);case r.BreakStatement:const a=Bt(n.parent,e);return`Stop loop ${A(a,e)}`;case r.ContinueStatement:const s=Bt(n.parent,e);return`Execute next iteration of ${A(s,e)}`;case r.FunctionCall:return Bt(n.declaration,e).name;case r.Condition:{const d=n;if((t=n.inputs)!=null&&t.length){const p=A(d.inputs[0],d.project);if(d.inputs[1]){const h=d.inputs[1].declaration.name;return`If ${p} ${Qs(d)} ${h}`}return`If ${p} ${Qs(d)}`}else return`If ${Qs(d)}`}case r.ReturnStatement:{const d=Bt(n.parent,e);return`Output of ${A(d,e)}`}case r.InputMap:if(n.declaration){const d=Bt(n.declaration,e);return A(d,e)||""}else return n.name||"";case r.VariableInstance:{const d=Bt(n.declaration,e);return A(d,e)||""}case r.OutputMap:if(n.declaration){const d=Bt(n.declaration,e);return(d==null?void 0:d.name)||""}else return"";case r.PrimitiveEntity:case r.PrimitiveValue:return av(n);default:return Hs(n.type).replaceAll("-"," ")}}function Ks(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=e.entities.filter(a=>a.name===n.name);return i.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.name}" that is not unique in the project. Entity with id "${i[0].id}" has the same name.
|
|
14
|
+
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null})),t}function ld(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=n.parent?D(n.parent):null;let a=e;i&&(a=e.get(i));const s=[];a.type===r.CustomEntity?s.push(...a.methods.map(d=>d)):a.type===r.Project?s.push(...a.functions.map(d=>d)):a.type===r.Loop?a.body&&s.push(a.body):a.type===r.InstalledProject&&s.push(...a.functions.map(d=>d));const o=s.filter(d=>d.name===n.name);return o.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.name}" that is not unique in ${a.type===r.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${o[0].id}" has the same name.
|
|
15
|
+
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null})),t}function cd(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=n.parent&&Bt(n.parent,e)||e;if(!i)t.push(new E({id:`${n.id}--parent-reference--${y.ReferencedEntityNotFound}`,message:`The entity with id '${n.parent}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:m.Error,code:y.ReferencedEntityNotFound,issue:null}));else{const s=ad(i).filter(o=>o.name===n.name);s.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.name}" that is not unique in its scope or higher scopes. Entity with id "${s[0].id}" has the same name.
|
|
16
|
+
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}return t}function dd(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=D(n.parent);if(!i)t.push(new E({id:`${n.id}--parent-reference--${y.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${n.id}" and type "${n.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new E({id:`${n.id}--parent-reference--${y.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:m.Error,code:y.ReferencedEntityNotFound,issue:null}));else{const o=a.properties.filter(d=>d.name===n.name);o.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.name}" that is not unique among all properties in the parent entity. Entity with id "${o[0].id}" has the same name.
|
|
17
|
+
Please provide a unique 'name' string.`,severity:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function ud(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=D(n.parent);if(!i)t.push(new E({id:`${n.id}--parent-reference--${y.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${n.id}" and type "${n.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new E({id:`${n.id}--parent-reference--${y.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:m.Error,code:y.ReferencedEntityNotFound,issue:null}));else{const o=Od(a).filter(d=>d.name===n.name);o.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.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:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function pd(n,e){const t=[];n.name||t.push(new E({id:`${n.id}--${g.EmptyName}`,message:`Entity with id "${n.id}" and type "${n.type}" has an empty name. Please provide a 'name' string.`,severity:m.Error,code:g.EmptyName,issue:null}));const i=D(n.parent);if(!i)t.push(new E({id:`${n.id}--parent-reference--${y.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${n.id}" and type "${n.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(i);if(!a)t.push(new E({id:`${n.id}--parent-reference--${y.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:m.Error,code:y.ReferencedEntityNotFound,issue:null}));else{const o=Cd(a).filter(d=>d.name===n.name);o.length&&t.push(new E({id:`${n.id}--${g.NameNotUniqueInScope}`,message:`Entity with id "${n.id}" and type "${n.type}" has a name "${n.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:m.Error,code:g.NameNotUniqueInScope,issue:null}))}}return t}function c9(n,e){switch(n.type){case r.CustomEntity:return Ks(n,e);case r.FunctionDeclaration:return ld(n,e);case r.VariableDeclaration:return cd(n,e);case r.Property:return dd(n,e);case r.ArgumentDeclaration:return ud(n,e);case r.ReturnDeclaration:return pd(n,e);default:return[]}}function Xt(n,e,t){const a=`${Xs(n)}-${e}-id`;return t.instances[a]?$.UUID.uuid():a}function yd(n,e){let t="",i=null;if(n.parent){const s=e.get(n.parent);s&&(i=s)}let a="";return i&&(a=`${Xs(A(i,e))}-`),t=`${a}${Xs(A(n,e))}-id`,e.instances[t]?$.UUID.uuid():t}function d9(n){var o;const e=$4(),t=n.toJSON();e.safeParse(t).success;const a=u9(n);(o=n.dataType)==null||o.validate();const s=[...a];if(n.id==="80c86e1b-caca-4ba5-9b1f-38f72d10e4a3"){const d=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(d.error)}return s}function u9(n){const e=[];if(!n.implements)return e;const t=n.implements;if(!t.abstract){const a=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(t,n.project)}" with id "${t.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});e.push(a.error)}if(n.static&&!t.static){const a=j({id:`${n.id}--${O.NonStaticPropertyImplementsStatic}`,message:`Static property "${A(n,n.project)}" with id "${n.id}" implements a non-static property "${A(t,n.project)}" with id "${t.id}".`,issue:null,severity:m.Error,code:O.NonStaticPropertyImplementsStatic,entity:n});e.push(a.error)}if(!n.static&&t.static){const a=j({id:`${n.id}--${O.StaticPropertyImplementsNonStatic}`,message:`Non-static property "${A(n,n.project)}" with id "${n.id}" implements a static property "${A(t,n.project)}" with id "${t.id}".`,issue:null,severity:m.Error,code:O.StaticPropertyImplementsNonStatic,entity:n});e.push(a.error)}if(!Ys(n.dataType,t.dataType)){const a=j({id:`${n.id}--${O.PropertyImplementsIncompatibleType}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a property "${A(t,n.project)}" with id "${t.id}" that has an incompatible data type.`,issue:null,severity:m.Error,code:O.PropertyImplementsIncompatibleType,entity:n});e.push(a.error)}return X(n.errors,e)}function p9(n,e){const t=[];if(n.parent){const a=e.get(n.parent);if(!a)t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}));else{const s=Pr(a);if(s){const o=a!==s?`The entity of type '${n.type}' with id '${n.id}' have 'parent' with id '${n.parent}' because the entity belongs to a built-in '${s.type}' entity with id '${s.id}' (${A(s,a.project)}) higher up in the tree.`:`The entity of type '${n.type}' with id '${n.id}' have 'parent' with id '${n.parent}' because it is a built-in entity of type ${s.type}.`;t.push(new E({id:`${n.id}--${y.InvalidBuiltInEntityReference}`,code:y.InvalidBuiltInEntityReference,severity:m.Error,message:o,issue:null}))}else if(![r.CustomEntity].includes(a.type))t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'custom-entity'.`,issue:null}));else{const d=Un(a).filter(p=>!p.interactive);if(d.length){let p=d.length>1?`The entity of type '${n.type}' with id '${n.id}' can't be added to the 'parent' entity with id '${a.id}' because it extends or implements multiple '${r.BuiltInBaseEntity}' entities that are non-interactive ("${N(d.map(h=>A(h,h.project)),'", "','" and "')}").`:`The entity of type '${n.type}' with id '${n.id}' can't be added to the 'parent' entity with id '${a.id}' because it extends or implements a '${r.BuiltInBaseEntity}' entity that is non-interactive ("${A(d[0],d[0].project)}").`;p+=`
|
|
20
|
+
${Gn}`,t.push(new E({id:`${n.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.Error,message:p,issue:null}))}else if(n.implements){const p=e.get(n.implements);if(n.id===n.implements)return t.push(new E({id:`${n.id}--${n.implements}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${n.implements}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 h=a.properties.find(T=>{var f;return((f=T.implements)==null?void 0:f.id)===n.implements});h?t.push(new E({id:`${n.id}--${g.PropertyOverwrite}`,code:g.PropertyOverwrite,severity:m.Error,message:`The property with id "${n.id}" is trying to implement the property with id "${n.implements}", but the parent entity already has a property with id '${h.id}' that implements the same base property.`,issue:null})):[r.Property].includes(p.type)?p.abstract||t.push(new E({id:`${n.id}--${n.implements}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new E({id:`${n.id}--${n.implements}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an entity of type 'property'.`,issue:null}))}}}}}const i=Fe(n,{},e);return t.push(...i.errors),t}const he=class he{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"private");l(this,"abstract");l(this,"index");l(this,"static");l(this,"required");l(this,"type",r.Property);l(this,"hidden",!1);l(this,"dataType",null);l(this,"implements",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.implements){const p=D(e.implements);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:r.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},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=p9(i,t),o=dd(i,t);return a.push(...s,...o,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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 E({id:`${this.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type '${this.type}' with id '${this.id}' is not a value reading or writing entity.
|
|
22
|
-
${ro}`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.parent.addProperty(this),this}setParent(e){return this.parent=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.dataType){const e=R(this.initialData.dataType,this.project);e.setParent(this),e.initChildren(),this.dataType=e}if(this.initialData.implements){const e=R(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||this.index,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===r.CustomEntity&&(this.parent.removeProperty(this),i.push(this.parent)),{affected:S(i),removed:S(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===r.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:r.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=
|
|
22
|
+
${ro}`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.parent.addProperty(this),this}setParent(e){return this.parent=e,this}initChildren(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.dataType){const e=R(this.initialData.dataType,this.project);e.setParent(this),e.initChildren(),this.dataType=e}if(this.initialData.implements){const e=R(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||this.index,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===r.CustomEntity&&(this.parent.removeProperty(this),i.push(this.parent)),{affected:S(i),removed:S(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===r.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:r.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=d9(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 T;const a=t||Xt(A(this,this.project),r.Property,this.project),s=a.split("-id"),o=s[s.length-1||0]||a,d={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:null,parent:e||this.parent},p=ma(d,this.project);i&&p.subscribe();const h=((T=this.dataType)==null?void 0:T.clone(p,o+"-data-type-id",i))||null;if(h&&p.setDataType(h),this.implements){const f=this.implements.clone(e||this.parent.type===r.CustomEntity?e:null,o+"-implements-id",i);p.implements=f}return p}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return this.dataType}};l(he,"MUTABLE_BASE_PROPERTIES",["name","description","private","abstract","static","required"]),l(he,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(he,"BASE_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,...he.INMUTABLE_BASE_PROPERTIES]),l(he,"MUTABLE_META_PROPERTIES",[...he.MUTABLE_BASE_PROPERTIES,"index"]),l(he,"INMUTABLE_META_PROPERTIES",[...he.INMUTABLE_BASE_PROPERTIES]),l(he,"META_PROPERTIES",[...he.MUTABLE_META_PROPERTIES,...he.INMUTABLE_META_PROPERTIES]),l(he,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(he,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),l(he,"UPSTREAM_PROPERTIES",[...he.MUTABLE_UPSTREAM_PROPERTIES,...he.INMUTABLE_UPSTREAM_PROPERTIES]),l(he,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),l(he,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(he,"DOWNSTREAM_PROPERTIES",[...he.MUTABLE_DOWNSTREAM_PROPERTIES,...he.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(he,"PROPERTIES",[...he.META_PROPERTIES,...he.UPSTREAM_PROPERTIES,...he.DOWNSTREAM_PROPERTIES]);let dr=he;function y9(n){const e=Qx(),t=n.toJSON();e.safeParse(t).success;const a=h9(n),s=f9(n),o=It(n);n.inputs.forEach(p=>p.validate()),o.forEach(p=>p.validate());const d=[...a,...s];if(n.id==="getCompanyByIdEndpointReachedEntityEvent"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});d.push(p.error)}return X(n.errors,d)}function h9(n){const e=[];if(!n.calls.length){const t=j({id:`${n.id}--${O.ScopeWithoutLogic}`,message:`Action "${A(n,n.project)}" with id "${n.id}" does not have any logic defined. So it doesn't do anything.`,issue:null,severity:m.Error,code:O.ScopeWithoutLogic,entity:n});e.push(t.error)}return X(n.errors,e)}function f9(n){const e=[];return n.implements,X(n.errors,e)}const K=class K{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"collapsed");l(this,"private");l(this,"index",null);l(this,"type",r.FunctionDeclaration);l(this,"implements",null);l(this,"inputs",[]);l(this,"returnStatements",[]);l(this,"calls",[]);l(this,"parent");l(this,"detachedChildren",[]);l(this,"errors",[]);l(this,"project");l(this,"initialized",!1);l(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 d=D(e.parent);i=t.get(d)}let a=null;if(e.implements){const d=D(e.implements);a=t.get(d)}const s={id:e.id,version:1,name:e.name,type:r.FunctionDeclaration,index:i.type===r.CustomEntity?i.methods.length:null,description:e.description,collapsed:!1,private:!1,returnStatements:[],calls:[],inputs:[],implements:a,x:0,y:0,parent:i},o=R(s,t);return o.setParent(i),o.initChildren(),o}static validateGenerationTarget(e,t){var T;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.Project,r.InstalledProject,r.CustomEntity,r.Loop],optional:!0},implements:{list:!1,types:[r.ActionDescriptor],optional:!0}},t);i=s.modifiedData;const o=ld(i,t),d=i.parent?t.get(i.parent):null;if(d&&d.type===r.CustomEntity){const f=d,I=Un(f).filter(B=>!B.interactive);if(I.length){let B=I.length>1?`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${f.id}' because it extends or implements multiple '${r.BuiltInBaseEntity}' entities that are non-interactive ("${N(I.map(G=>A(G,G.project)),'", "','" and "')}").`:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${f.id}' because it extends or implements a '${r.BuiltInBaseEntity}' entity that is non-interactive ("${A(I[0],I[0].project)}").`;B+=`
|
|
23
23
|
${Gn}`,a.push(new E({id:`${e.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.Error,message:B,issue:null}))}else{const B=f.methods.find(jt=>{var Le;return((Le=jt.implements)==null?void 0:Le.id)===i.implements});B&&a.push(new E({id:`${i.id}--${g.MethodOverwrite}`,code:g.MethodOverwrite,severity:m.Error,message:`The '${r.FunctionDeclaration}' with id "${i.id}" is trying to implement the '${r.ActionDescriptor}' with id "${i.implements}", but the parent custom-entity already has a ${r.FunctionDeclaration} with id '${B.id}' that implements the same base method.
|
|
24
24
|
A ${r.FunctionDeclaration} that has a parent of type '${r.CustomEntity}' is considered a method of that entity, and cannot implement the same '${r.ActionDescriptor}' more than once.
|
|
25
25
|
${r.ActionDescriptor} entities inside a ${r.CustomEntity} are considered abstract methods that can be implemented by ${r.FunctionDeclaration} entities inside the same parent.
|
|
@@ -29,51 +29,51 @@ 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 ${r.ActionDescriptor} signature, otherwise the implementation will have a validation error.`,issue:null}))}}else if(d&&d.type===r.Loop){const f=d.body;f&&((T=f.implements)==null?void 0:T.id)===i.implements&&a.push(new E({id:`${i.id}--${g.MethodOverwrite}`,code:g.MethodOverwrite,severity:m.Error,message:`The '${r.FunctionDeclaration}' with id "${i.id}" is being added as the 'body' of the ${r.Loop} with id "${d.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),h=p?Pr(p):null;return h&&a.push(new E({id:`${e.id}--${y.BuiltInEntityParent}`,code:y.BuiltInEntityParent,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', belongs to a built-in system entity "${A(h,t)}" with id '${h.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,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&(this.parent.type===r.Project?t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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 E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===r.CustomEntity?this.parent.addMethod(this):this.parent.type===r.Loop&&this.parent.setBody(this),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}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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=R(e,this.project);return t.addEntryCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.implements&&(this.implements=R(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||this.index,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:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),It(this).forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),{affected:S(i),removed:S(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)}),It(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:S(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=It(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=It(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:r.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===r.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=h9(this);return this.errors=[...e],{success:!0,error:null,data:this.toJSON()}}getErrors(){const e=It(this);return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...e.flatMap(i=>i.getErrors())]}getShallowErrors(){return this.errors}clone(e){return new K(this.toJSON(),this.project)}getVariableInstances(){return Z(this).filter(i=>i.type===r.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:r.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=R(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:r.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=R(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}};l(K,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),l(K,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(K,"BASE_PROPERTIES",[...K.MUTABLE_BASE_PROPERTIES,...K.INMUTABLE_BASE_PROPERTIES]),l(K,"MUTABLE_META_PROPERTIES",[...K.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),l(K,"INMUTABLE_META_PROPERTIES",[...K.INMUTABLE_BASE_PROPERTIES]),l(K,"META_PROPERTIES",[...K.MUTABLE_META_PROPERTIES,...K.INMUTABLE_META_PROPERTIES]),l(K,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(K,"INMUATABLE_UPSTREAM_PROPERTIES",["parent","implements"]),l(K,"UPSTREAM_PROPERTIES",[...K.MUTABLE_UPSTREAM_PROPERTIES,...K.INMUATABLE_UPSTREAM_PROPERTIES]),l(K,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),l(K,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),l(K,"DOWNSTREAM_PROPERTIES",[...K.MUTABLE_DOWNSTREAM_PROPERTIES,...K.INMUATABLE_DOWNSTREAM_PROPERTIES]),l(K,"PROPERTIES",[...K.META_PROPERTIES,...K.UPSTREAM_PROPERTIES,...K.DOWNSTREAM_PROPERTIES]);let ur=K;function T9(n){const e=ax(),t=n.toJSON();e.safeParse(t).success;const a=[];if(n.entity&&n.andChildrenGroup||n.entity&&n.orChildrenGroup||n.andChildrenGroup&&n.orChildrenGroup){const s=j({id:n.id+"--"+O.InvalidPropertiesCombination,message:`Data type with id "${n.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:m.Error,code:O.InvalidPropertiesCombination,entity:n});a.push(s.error)}return X(n.errors,a)}function E9(n,e){const t=[],i=[r.CustomEntity,r.ActionDescriptor,r.Property,r.ArgumentDeclaration,r.ReturnDeclaration,r.VariableDeclaration,r.ValueDescriptor,r.DataType],a=`'${N(i,"', '","' or '")}'`;if(n.parent)if(n.id===n.parent)t.push(new E({id:`${n.id}--${n.parent}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.parent);s?i.includes(s.type)||t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type ${a}.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.entity){if(n.id===n.entity)return t.push(new E({id:`${n.id}--${n.entity}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.entity);s?[r.CustomEntity,r.PrimitiveEntity,r.ActionDescriptor,r.BuiltInBaseEntity].includes(s.type)||t.push(new E({id:`${n.id}--${n.entity}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${n.entity}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 fe=class fe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"isNullable");l(this,"isList");l(this,"constant");l(this,"asType");l(this,"type",r.DataType);l(this,"options");l(this,"parentRelationType");l(this,"defaultValue",null);l(this,"entity",null);l(this,"andChildrenGroup");l(this,"orChildrenGroup");l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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}static fromGenerationTarget(e,t){const i=D(e.parent),a=t.get(i);let s=null;e.entity&&(s=t.get(e.entity));const o={id:e.id,version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:e.parentRelationType,isList:e.isList,isNullable:e.isNullable,constant:e.constant,defaultValue:null,entity:s,asType:e.asType,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){var p;let i=JSON.parse(JSON.stringify(e));const a=[],s=E9(i,t);if(a.push(...s,...Ae(i)),i.entity){const h=t.get(i.entity);if(h.type===r.CustomEntity){const f=Un(h).filter(b=>!b.interactive);if(f.length){const b=f.length>1?`entities with ids '${N(f.map(I=>I.id),"', '","' and '")}'`:`entity with id '${f[0].id}'`;a.push(new E({id:`${e.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.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 ${b}.
|
|
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(){return this.parent===this.project?this.project.addFunctionDeclaration(this):this.parent.type===r.CustomEntity?this.parent.addMethod(this):this.parent.type===r.Loop&&this.parent.setBody(this),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}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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=R(e,this.project);return t.addEntryCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.implements&&(this.implements=R(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||this.index,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:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),It(this).forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),{affected:S(i),removed:S(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)}),It(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:S(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=It(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=It(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:r.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===r.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=y9(this);return this.errors=[...e],{success:!0,error:null,data:this.toJSON()}}getErrors(){const e=It(this);return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...e.flatMap(i=>i.getErrors())]}getShallowErrors(){return this.errors}clone(e){return new K(this.toJSON(),this.project)}getVariableInstances(){return Z(this).filter(i=>i.type===r.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:r.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=R(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:r.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=R(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}};l(K,"MUTABLE_BASE_PROPERTIES",["name","description","private"]),l(K,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(K,"BASE_PROPERTIES",[...K.MUTABLE_BASE_PROPERTIES,...K.INMUTABLE_BASE_PROPERTIES]),l(K,"MUTABLE_META_PROPERTIES",[...K.MUTABLE_BASE_PROPERTIES,"x","y","index","collapsed"]),l(K,"INMUTABLE_META_PROPERTIES",[...K.INMUTABLE_BASE_PROPERTIES]),l(K,"META_PROPERTIES",[...K.MUTABLE_META_PROPERTIES,...K.INMUTABLE_META_PROPERTIES]),l(K,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(K,"INMUATABLE_UPSTREAM_PROPERTIES",["parent","implements"]),l(K,"UPSTREAM_PROPERTIES",[...K.MUTABLE_UPSTREAM_PROPERTIES,...K.INMUATABLE_UPSTREAM_PROPERTIES]),l(K,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),l(K,"INMUATABLE_DOWNSTREAM_PROPERTIES",[]),l(K,"DOWNSTREAM_PROPERTIES",[...K.MUTABLE_DOWNSTREAM_PROPERTIES,...K.INMUATABLE_DOWNSTREAM_PROPERTIES]),l(K,"PROPERTIES",[...K.META_PROPERTIES,...K.UPSTREAM_PROPERTIES,...K.DOWNSTREAM_PROPERTIES]);let ur=K;function m9(n){const e=rx(),t=n.toJSON();e.safeParse(t).success;const a=[];if(n.entity&&n.andChildrenGroup||n.entity&&n.orChildrenGroup||n.andChildrenGroup&&n.orChildrenGroup){const s=j({id:n.id+"--"+O.InvalidPropertiesCombination,message:`Data type with id "${n.id}" has invalid properties combination. Only one of the following properties can be present at the time: 'entity', 'andChildrenGroup' or 'orChildrenGroup'`,issue:null,severity:m.Error,code:O.InvalidPropertiesCombination,entity:n});a.push(s.error)}return X(n.errors,a)}function T9(n,e){const t=[],i=[r.CustomEntity,r.ActionDescriptor,r.Property,r.ArgumentDeclaration,r.ReturnDeclaration,r.VariableDeclaration,r.ValueDescriptor,r.DataType],a=`'${N(i,"', '","' or '")}'`;if(n.parent)if(n.id===n.parent)t.push(new E({id:`${n.id}--${n.parent}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.parent);s?i.includes(s.type)||t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type ${a}.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.entity){if(n.id===n.entity)return t.push(new E({id:`${n.id}--${n.entity}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.entity);s?[r.CustomEntity,r.PrimitiveEntity,r.ActionDescriptor,r.BuiltInBaseEntity].includes(s.type)||t.push(new E({id:`${n.id}--${n.entity}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${n.entity}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 fe=class fe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"isNullable");l(this,"isList");l(this,"constant");l(this,"asType");l(this,"type",r.DataType);l(this,"options");l(this,"parentRelationType");l(this,"defaultValue",null);l(this,"entity",null);l(this,"andChildrenGroup");l(this,"orChildrenGroup");l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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}static fromGenerationTarget(e,t){const i=D(e.parent),a=t.get(i);let s=null;e.entity&&(s=t.get(e.entity));const o={id:e.id,version:1,type:r.DataType,andChildrenGroup:null,orChildrenGroup:null,parentRelationType:e.parentRelationType,isList:e.isList,isNullable:e.isNullable,constant:e.constant,defaultValue:null,entity:s,asType:e.asType,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){var p;let i=JSON.parse(JSON.stringify(e));const a=[],s=T9(i,t);if(a.push(...s,...Ae(i)),i.entity){const h=t.get(i.entity);if(h.type===r.CustomEntity){const f=Un(h).filter(b=>!b.interactive);if(f.length){const b=f.length>1?`entities with ids '${N(f.map(I=>I.id),"', '","' and '")}'`:`entity with id '${f[0].id}'`;a.push(new E({id:`${e.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.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 ${b}.
|
|
33
33
|
${Gn}`,issue:null}))}}}const o=i.parent&&t.get(i.parent)||t.getBuiltIn(i.parent),d=o?Pr(o):null;if(d)a.push(new E({id:`${e.id}--${y.BuiltInEntityParent}`,code:y.BuiltInEntityParent,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', belongs to a built-in system entity "${A(d,t)}" with id '${d.id}', and therefore it cannot be created as it would affect a built in entity, which are inmutable.`,issue:null}));else if(o){const h=o.type,T=[r.Property,r.VariableDeclaration,r.ArgumentDeclaration,r.ReturnDeclaration,r.ValueDescriptor];if(T.includes(h)&&(i.parentRelationType&&a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', cannot have a 'parentRelationType' property set of type '${h}'.
|
|
34
34
|
The entitities of type '${N(T,"', '","' and '")}' can only have one 'data-type' child under the 'dataType' property so no 'parentRelationType' is needed.`,issue:null})),o.dataType)){const f=(p=o.dataType)==null?void 0:p.id;a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.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 '${h}', because it already has a 'data-type' child with id '${f}'.
|
|
35
35
|
The entitities of type '${N(T,"', '","' 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
|
${Qt({describe_entity:f})}
|
|
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}))}h===r.ActionDescriptor&&(!i.parentRelationType||!(i.parentRelationType===qe.DynamicArgumentTypes||i.parentRelationType===qe.DynamicReturnTypes))&&a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', must have a 'parentRelationType' property set to either 'dynamic-argument-types' or 'dynamic-return-types' when being added as a child to an entity of type 'action-descriptor'.`,issue:null})),h===r.DataType&&(!i.parentRelationType||!(i.parentRelationType===qe.AndDataTypeGroup||i.parentRelationType===qe.OrDataTypeGroup))&&a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.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(){return this.parent.type===r.DataType?this.parentRelationType===qe.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===qe.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.type===r.ActionDescriptor?this.parentRelationType===qe.DynamicArgumentTypes?this.parent.setDynamicArgumentTypes(this):this.parentRelationType===qe.DynamicReturnTypes&&this.parent.setDynamicReturnTypes(this):this.parent.setDataType(this),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=R(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.entity)if(this.initialData.entity.type===r.GenericReference){const e=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=e}else this.entity=R(this.initialData.entity,this.project);return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(e=>R(e,this.project))),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(e=>R(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}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===r.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===r.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===r.DataType){if(this.parentRelationType===qe.AndDataTypeGroup){if(Array.isArray(s.andChildrenGroup)){const o=s.andChildrenGroup.findIndex(d=>d.id===this.id);o!==-1&&s.andChildrenGroup.splice(o,1)}}else if(this.parentRelationType===qe.OrDataTypeGroup&&Array.isArray(s.orChildrenGroup)){const o=s.orChildrenGroup.findIndex(d=>d.id===this.id);o!==-1&&s.orChildrenGroup.splice(o,1)}}else if(s.type===r.ActionDescriptor){const o=this.parent;this.parentRelationType===qe.DynamicArgumentTypes?o.removeDynamicArgumentTypes():this.parentRelationType===qe.DynamicReturnTypes&&o.removeDynamicReturnTypes()}else this.parent.removeDataType();i.push(s)}return{affected:S(i),removed:S(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===r.CustomEntity&&this.entity.parent===this){const{affected:i}=this.entity.restore({seenEntities:e});t.push(...i)}if(this.parent.type===r.DataType){const i=this.parent;Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this)}if(this.parent.type===r.DataType){const i=this.parent;this.parentRelationType===qe.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===qe.OrDataTypeGroup&&Array.isArray(i.orChildrenGroup)&&i.orChildrenGroup.push(this)}else if(this.parent.type===r.ActionDescriptor){const i=this.parent;this.parentRelationType===qe.DynamicArgumentTypes?i.setDynamicArgumentTypes(this):this.parentRelationType===qe.DynamicReturnTypes&&i.setDynamicReturnTypes(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,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:r.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,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(d=>d.toFlatJSON(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(d=>d.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,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==r.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=T9(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 b,I,B;const a=this.toJSON(),s=t||Xt(nv(this),r.DataType,this.project),o=s.split("-id"),d=o[o.length-1||0]||s;a.id=s;const p=Ta(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const h=(b=this.defaultValue)==null?void 0:b.clone(p,d+"-default-value-id",i);p.defaultValue=h||null;const T=(I=this.andChildrenGroup)==null?void 0:I.map((G,q)=>G.clone(this,d+"-and-group-data-type-"+q+"-id",i)),f=(B=this.orChildrenGroup)==null?void 0:B.map((G,q)=>G.clone(this,d+"-or-group-data-type-"+q+"-id",i));return p.andChildrenGroup=T||null,p.orChildrenGroup=f||null,p}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}};l(fe,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType"]),l(fe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(fe,"BASE_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,...fe.INMUTABLE_BASE_PROPERTIES]),l(fe,"MUTABLE_META_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,"inferred"]),l(fe,"INMUTABLE_META_PROPERTIES",[...fe.INMUTABLE_BASE_PROPERTIES]),l(fe,"META_PROPERTIES",[...fe.MUTABLE_META_PROPERTIES,...fe.INMUTABLE_META_PROPERTIES]),l(fe,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),l(fe,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(fe,"UPSTREAM_PROPERTIES",[...fe.MUTABLE_UPSTREAM_PROPERTIES,...fe.INMUTABLE_UPSTREAM_PROPERTIES]),l(fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),l(fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(fe,"DOWNSTREAM_PROPERTIES",[...fe.MUTABLE_DOWNSTREAM_PROPERTIES,...fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(fe,"PROPERTIES",[...fe.META_PROPERTIES,...fe.UPSTREAM_PROPERTIES,...fe.DOWNSTREAM_PROPERTIES]);let oi=fe;function R9(n){var d;const e=UU(),t=n.toJSON();e.safeParse(t).success;const a=b9(n),s=En(n),o=[...a,...s];if(n.id==="exec-sequentially-operation-call-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});o.push(p.error)}return n.outputs.forEach(p=>p.validate()),(d=n.error)==null||d.validate(),X(n.errors,o)}function b9(n){const e=[];return n.inputs.forEach(t=>{t.validate()}),n.dynamicArguments.forEach(t=>{t.validate()}),X(n.errors,e)}const ee=class ee{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.Operation);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"process",null);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"error",null);l(this,"dynamicArguments",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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 f=D(e.parent);i=t.get(f)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const b=D(f);return t.get(b)}),d=e.calledBySuccess.map(f=>{const b=D(f);return t.get(b)}),p=e.calledByError.map(f=>{const b=D(f);return t.get(b)}),h={id:e.id,version:1,type:r.Operation,declaration:s,calledByEntry:o,calledBySuccess:d,calledByError:p,errorCalls:[],successCalls:[],dynamicArguments:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},T=R(h,t);return T.setParent(i),T.initChildren(),T}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Ae(i));const o=D(i.declaration);if(o){const d=bv(o,t);a.push(...d)}else{const d=`
|
|
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}))}h===r.ActionDescriptor&&(!i.parentRelationType||!(i.parentRelationType===qe.DynamicArgumentTypes||i.parentRelationType===qe.DynamicReturnTypes))&&a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', must have a 'parentRelationType' property set to either 'dynamic-argument-types' or 'dynamic-return-types' when being added as a child to an entity of type 'action-descriptor'.`,issue:null})),h===r.DataType&&(!i.parentRelationType||!(i.parentRelationType===qe.AndDataTypeGroup||i.parentRelationType===qe.OrDataTypeGroup))&&a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.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(){return this.parent.type===r.DataType?this.parentRelationType===qe.AndDataTypeGroup?this.parent.addToAndGroup(this):this.parentRelationType===qe.OrDataTypeGroup&&this.parent.addToOrGroup(this):this.parent.type===r.ActionDescriptor?this.parentRelationType===qe.DynamicArgumentTypes?this.parent.setDynamicArgumentTypes(this):this.parentRelationType===qe.DynamicReturnTypes&&this.parent.setDynamicReturnTypes(this):this.parent.setDataType(this),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=R(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.entity)if(this.initialData.entity.type===r.GenericReference){const e=this.project.findSubscribedInstanceFromReference(this.initialData.entity);this.entity=e}else this.entity=R(this.initialData.entity,this.project);return this.initialData.andChildrenGroup&&(this.andChildrenGroup=this.initialData.andChildrenGroup.map(e=>R(e,this.project))),this.initialData.orChildrenGroup&&(this.orChildrenGroup=this.initialData.orChildrenGroup.map(e=>R(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}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===r.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===r.DataType&&this.parent.removeChildGroup(this);const s=this.parent;if(s.type===r.DataType){if(this.parentRelationType===qe.AndDataTypeGroup){if(Array.isArray(s.andChildrenGroup)){const o=s.andChildrenGroup.findIndex(d=>d.id===this.id);o!==-1&&s.andChildrenGroup.splice(o,1)}}else if(this.parentRelationType===qe.OrDataTypeGroup&&Array.isArray(s.orChildrenGroup)){const o=s.orChildrenGroup.findIndex(d=>d.id===this.id);o!==-1&&s.orChildrenGroup.splice(o,1)}}else if(s.type===r.ActionDescriptor){const o=this.parent;this.parentRelationType===qe.DynamicArgumentTypes?o.removeDynamicArgumentTypes():this.parentRelationType===qe.DynamicReturnTypes&&o.removeDynamicReturnTypes()}else this.parent.removeDataType();i.push(s)}return{affected:S(i),removed:S(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===r.CustomEntity&&this.entity.parent===this){const{affected:i}=this.entity.restore({seenEntities:e});t.push(...i)}if(this.parent.type===r.DataType){const i=this.parent;Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this)}if(this.parent.type===r.DataType){const i=this.parent;this.parentRelationType===qe.AndDataTypeGroup?Array.isArray(i.andChildrenGroup)&&i.andChildrenGroup.push(this):this.parentRelationType===qe.OrDataTypeGroup&&Array.isArray(i.orChildrenGroup)&&i.orChildrenGroup.push(this)}else if(this.parent.type===r.ActionDescriptor){const i=this.parent;this.parentRelationType===qe.DynamicArgumentTypes?i.setDynamicArgumentTypes(this):this.parentRelationType===qe.DynamicReturnTypes&&i.setDynamicReturnTypes(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,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:r.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,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(d=>d.toFlatJSON(e)))||[],...((s=this.orChildrenGroup)==null?void 0:s.flatMap(d=>d.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,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==r.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=m9(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 b,I,B;const a=this.toJSON(),s=t||Xt(ev(this),r.DataType,this.project),o=s.split("-id"),d=o[o.length-1||0]||s;a.id=s;const p=ma(a,this.project);e&&p.setParent(e),i&&p.subscribe(),p.initChildren();const h=(b=this.defaultValue)==null?void 0:b.clone(p,d+"-default-value-id",i);p.defaultValue=h||null;const T=(I=this.andChildrenGroup)==null?void 0:I.map((G,q)=>G.clone(this,d+"-and-group-data-type-"+q+"-id",i)),f=(B=this.orChildrenGroup)==null?void 0:B.map((G,q)=>G.clone(this,d+"-or-group-data-type-"+q+"-id",i));return p.andChildrenGroup=T||null,p.orChildrenGroup=f||null,p}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}inferFromInputs(e){var t;if(!this.inferred)return this;if(!this.entity&&e.length){const i={id:this.id+"--infered-entity",type:r.CustomEntity,version:1,name:A(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=R(i,this.project);a.sync(i),a.setParent(this),a.initChildren(),this.setEntity(a)}return this.entity&&this.entity.inferFromInputs(e),this}};l(fe,"MUTABLE_BASE_PROPERTIES",["isNullable","isList","constant","asType","options","parentRelationType"]),l(fe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(fe,"BASE_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,...fe.INMUTABLE_BASE_PROPERTIES]),l(fe,"MUTABLE_META_PROPERTIES",[...fe.MUTABLE_BASE_PROPERTIES,"inferred"]),l(fe,"INMUTABLE_META_PROPERTIES",[...fe.INMUTABLE_BASE_PROPERTIES]),l(fe,"META_PROPERTIES",[...fe.MUTABLE_META_PROPERTIES,...fe.INMUTABLE_META_PROPERTIES]),l(fe,"MUTABLE_UPSTREAM_PROPERTIES",["entity","andChildrenGroup","orChildrenGroup","parent"]),l(fe,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(fe,"UPSTREAM_PROPERTIES",[...fe.MUTABLE_UPSTREAM_PROPERTIES,...fe.INMUTABLE_UPSTREAM_PROPERTIES]),l(fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue"]),l(fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(fe,"DOWNSTREAM_PROPERTIES",[...fe.MUTABLE_DOWNSTREAM_PROPERTIES,...fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(fe,"PROPERTIES",[...fe.META_PROPERTIES,...fe.UPSTREAM_PROPERTIES,...fe.DOWNSTREAM_PROPERTIES]);let si=fe;function E9(n){var d;const e=GU(),t=n.toJSON();e.safeParse(t).success;const a=R9(n),s=En(n),o=[...a,...s];if(n.id==="exec-sequentially-operation-call-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});o.push(p.error)}return n.outputs.forEach(p=>p.validate()),(d=n.error)==null||d.validate(),X(n.errors,o)}function R9(n){const e=[];return n.inputs.forEach(t=>{t.validate()}),n.dynamicArguments.forEach(t=>{t.validate()}),X(n.errors,e)}const ee=class ee{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.Operation);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"process",null);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"error",null);l(this,"dynamicArguments",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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 f=D(e.parent);i=t.get(f)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const b=D(f);return t.get(b)}),d=e.calledBySuccess.map(f=>{const b=D(f);return t.get(b)}),p=e.calledByError.map(f=>{const b=D(f);return t.get(b)}),h={id:e.id,version:1,type:r.Operation,declaration:s,calledByEntry:o,calledBySuccess:d,calledByError:p,errorCalls:[],successCalls:[],dynamicArguments:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},T=R(h,t);return T.setParent(i),T.initChildren(),T}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Ae(i));const o=D(i.declaration);if(o){const d=Ev(o,t);a.push(...d)}else{const d=`
|
|
38
38
|
All built-in 'action-descriptor' entity ids are:
|
|
39
39
|
- ${t.operationDeclarations.map(p=>`${p.id} (${A(p,t)})`).join(`
|
|
40
40
|
- `)}.
|
|
41
41
|
`;a.push(new E({id:`${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${r.Operation}" with id "${i.id}", has an invalid reference at the 'declaration' property. The 'declaration' property must be a valid reference to an 'action-descriptor' entity.
|
|
42
42
|
References can either be an ID string or an object with exacly four properties: 'id', 'entityId', 'entityType', 'type'.${d}`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
43
43
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
44
|
-
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 e;return this.parent===this.project&&this.project.addOperation(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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(){return this.initialized?this:(this.initialized=!0,this.declaration=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?t.setParent(this.parent.parent):t.type!==r.InternalCall&&t.setParent(this.parent),t.initChildren(),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.dynamicArguments=this.initialData.dynamicArguments.map(e=>{const t=R(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.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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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.dynamicArguments.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.dynamicArguments.flatMap(i=>i.toFlatIds(e)),...this.outputs.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,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(),dynamicArguments:this.dynamicArguments.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.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()),dynamicArguments:this.dynamicArguments.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.dynamicArguments.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(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){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.dynamicArguments.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()),this.dynamicArguments.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=R9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.dynamicArguments.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 ee(this.toJSON(),this.project)}};l(ee,"MUTABLE_BASE_PROPERTIES",[]),l(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),l(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ee,"INMUTABLE_META_PROPERTIES",[...ee.INMUTABLE_BASE_PROPERTIES]),l(ee,"META_PROPERTIES",[...ee.MUTABLE_META_PROPERTIES,...ee.INMUTABLE_META_PROPERTIES]),l(ee,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),l(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error","dynamicArguments"]),l(ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ee,"DOWNSTREAM_PROPERTIES",[...ee.MUTABLE_DOWNSTREAM_PROPERTIES,...ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ee,"PROPERTIES",[...ee.META_PROPERTIES,...ee.UPSTREAM_PROPERTIES,...ee.DOWNSTREAM_PROPERTIES]);let pr=ee;function g9(n){const e=Dx(),t=n.toJSON();e.safeParse(t).success;const a=It(n);n.inputs.forEach(o=>o.validate()),a.forEach(o=>o.validate());const s=[];return X(n.errors,s)}const te=class te{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"collapsed");l(this,"type",r.GlobalEvent);l(this,"inputs",[]);l(this,"calls",[]);l(this,"returnStatements",[]);l(this,"parent");l(this,"implements");l(this,"detachedChildren",[]);l(this,"errors",[]);l(this,"project");l(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.x=e.x,this.y=e.y,this.collapsed=e.collapsed}static fromGenerationTarget(e,t){let i=t;if(e.parent){const d=D(e.parent);i=t.get(d)}let a;e.implements&&(a=t.getBuiltIn(e.implements));const s={id:e.id,version:1,name:e.name,type:r.GlobalEvent,collapsed:!1,returnStatements:[],calls:[],inputs:[],implements:a,x:0,y:0,parent:i},o=R(s,t);return o.setParent(i),o.initChildren(),o}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{},t);if(i=s.modifiedData,a.push(...s.errors,...Ae(i)),!e.implements)a.push(new E({id:`${e.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' is missing the 'implements' property. This property is required for a '${e.type}' entity and must point to one of the built-in action descriptors reserved for 'global-event' entities.
|
|
44
|
+
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 e;return this.parent===this.project&&this.project.addOperation(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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(){return this.initialized?this:(this.initialized=!0,this.declaration=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?t.setParent(this.parent.parent):t.type!==r.InternalCall&&t.setParent(this.parent),t.initChildren(),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.dynamicArguments=this.initialData.dynamicArguments.map(e=>{const t=R(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.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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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.dynamicArguments.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.dynamicArguments.flatMap(i=>i.toFlatIds(e)),...this.outputs.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,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(),dynamicArguments:this.dynamicArguments.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.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()),dynamicArguments:this.dynamicArguments.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.dynamicArguments.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(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){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.dynamicArguments.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()),this.dynamicArguments.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=E9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.dynamicArguments.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 ee(this.toJSON(),this.project)}};l(ee,"MUTABLE_BASE_PROPERTIES",[]),l(ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ee,"BASE_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,...ee.INMUTABLE_BASE_PROPERTIES]),l(ee,"MUTABLE_META_PROPERTIES",[...ee.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ee,"INMUTABLE_META_PROPERTIES",[...ee.INMUTABLE_BASE_PROPERTIES]),l(ee,"META_PROPERTIES",[...ee.MUTABLE_META_PROPERTIES,...ee.INMUTABLE_META_PROPERTIES]),l(ee,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ee,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(ee,"UPSTREAM_PROPERTIES",[...ee.MUTABLE_UPSTREAM_PROPERTIES,...ee.INMUTABLE_UPSTREAM_PROPERTIES]),l(ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error","dynamicArguments"]),l(ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ee,"DOWNSTREAM_PROPERTIES",[...ee.MUTABLE_DOWNSTREAM_PROPERTIES,...ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ee,"PROPERTIES",[...ee.META_PROPERTIES,...ee.UPSTREAM_PROPERTIES,...ee.DOWNSTREAM_PROPERTIES]);let pr=ee;function b9(n){const e=Ix(),t=n.toJSON();e.safeParse(t).success;const a=It(n);n.inputs.forEach(o=>o.validate()),a.forEach(o=>o.validate());const s=[];return X(n.errors,s)}const te=class te{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"collapsed");l(this,"type",r.GlobalEvent);l(this,"inputs",[]);l(this,"calls",[]);l(this,"returnStatements",[]);l(this,"parent");l(this,"implements");l(this,"detachedChildren",[]);l(this,"errors",[]);l(this,"project");l(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.x=e.x,this.y=e.y,this.collapsed=e.collapsed}static fromGenerationTarget(e,t){let i=t;if(e.parent){const d=D(e.parent);i=t.get(d)}let a;e.implements&&(a=t.getBuiltIn(e.implements));const s={id:e.id,version:1,name:e.name,type:r.GlobalEvent,collapsed:!1,returnStatements:[],calls:[],inputs:[],implements:a,x:0,y:0,parent:i},o=R(s,t);return o.setParent(i),o.initChildren(),o}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{},t);if(i=s.modifiedData,a.push(...s.errors,...Ae(i)),!e.implements)a.push(new E({id:`${e.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' is missing the 'implements' property. This property is required for a '${e.type}' entity and must point to one of the built-in action descriptors reserved for 'global-event' entities.
|
|
45
45
|
${ao(t)}`,issue:null}));else if(!t.get(e.implements))a.push(new E({id:`${e.id}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that isn't found in the project. The 'implements' property must point to one of the built-in action descriptors reserved for 'global-event' entities.
|
|
46
46
|
${ao(t)}`,issue:null}));else if(!t.globalEventActionDescriptors.find(p=>p.id===e.implements))a.push(new E({id:`${e.id}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that isn't pointing to an action descriptor reserved for 'global-event' entities.
|
|
47
47
|
${ao(t)}`,issue:null}));else{const p=t.events.find(h=>h.implements.id===e.implements);p&&a.push(new E({id:`${e.id}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'implements' property that points to an action descriptor that is already implemented by another global event with id '${p.id}' in the project. Each global event must implement a unique action descriptor.
|
|
48
|
-
You can attach new logic to the existing 'global-event' but creating a new callable entity that gets called by it.`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.project.addGlobalEvent(this),this}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}addCall(e){return this.calls.includes(e)||this.calls.push(e),this}removeCall(e){const t=this.calls.indexOf(e);return t!==-1&&this.calls.splice(t,1),this}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.findIndex(i=>i.id===e.id);return t>-1&&this.inputs.splice(t,1),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=R(e,this.project);return t.addEntryCaller(this),t.type!==r.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.implements=R(this.initialData.implements,this.project),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),It(this).forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),{affected:S(i),removed:S(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)}),It(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:S(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=It(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=It(this);return[this.id,...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.calls.flatMap(a=>a.toFlatIds(e)),...this.returnStatements.flatMap(a=>a.toFlatIds(e)),...this.implements?this.implements.toFlatIds(e):[],...t.flatMap(a=>a.toFlatIds(e))]}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,x:this.x,y:this.y,collapsed:this.collapsed,implements:this.implements.toJSON(),returnStatements:this.returnStatements.map(e=>e.toJSON()),inputs:this.inputs.map(e=>e.toJSON()),calls:this.calls.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,collapsed:this.collapsed,x:this.x,y:this.y,implements:this.implements.toReference(),inputs:this.inputs.map(e=>e.toReference()),calls:this.calls.map(e=>e.toReference()),returnStatements:this.returnStatements.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.calls.flatMap(i=>i.toFlatJSON(e)),...this.returnStatements.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.calls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.returnStatements.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.calls.forEach(e=>e.clearErrors()),this.returnStatements.forEach(e=>e.clearErrors()),this}validate(){const e=
|
|
48
|
+
You can attach new logic to the existing 'global-event' but creating a new callable entity that gets called by it.`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.project.addGlobalEvent(this),this}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}addCall(e){return this.calls.includes(e)||this.calls.push(e),this}removeCall(e){const t=this.calls.indexOf(e);return t!==-1&&this.calls.splice(t,1),this}addInputDeclaration(e){return this.inputs.includes(e)||this.inputs.push(e),this}removeInputDeclaration(e){const t=this.inputs.findIndex(i=>i.id===e.id);return t>-1&&this.inputs.splice(t,1),this}initChildren(){return this.initialized?this:(this.initialized=!0,this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.calls=this.initialData.calls.map(e=>{const t=R(e,this.project);return t.addEntryCaller(this),t.type!==r.InternalCall&&(t.setParent(this),t.initChildren()),t}),this.returnStatements=this.initialData.returnStatements.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.implements=R(this.initialData.implements,this.project),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.x=e.x||this.x,this.y=e.y||this.y,this.collapsed=e.collapsed!==void 0?e.collapsed:this.collapsed,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),It(this).forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),{affected:S(i),removed:S(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)}),It(this).forEach(a=>{const{affected:s}=a.restore({seenEntities:e});t.push(...s)}),{affected:S(t),self:this})}toFlat(e=new Set){if(e.has(this.id))return[];e.add(this.id);const t=It(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=It(this);return[this.id,...this.inputs.flatMap(a=>a.toFlatIds(e)),...this.calls.flatMap(a=>a.toFlatIds(e)),...this.returnStatements.flatMap(a=>a.toFlatIds(e)),...this.implements?this.implements.toFlatIds(e):[],...t.flatMap(a=>a.toFlatIds(e))]}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,x:this.x,y:this.y,collapsed:this.collapsed,implements:this.implements.toJSON(),returnStatements:this.returnStatements.map(e=>e.toJSON()),inputs:this.inputs.map(e=>e.toJSON()),calls:this.calls.map(e=>e.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,collapsed:this.collapsed,x:this.x,y:this.y,implements:this.implements.toReference(),inputs:this.inputs.map(e=>e.toReference()),calls:this.calls.map(e=>e.toReference()),returnStatements:this.returnStatements.map(e=>e.toReference()),parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.inputs.flatMap(i=>i.toFlatJSON(e)),...this.calls.flatMap(i=>i.toFlatJSON(e)),...this.returnStatements.flatMap(i=>i.toFlatJSON(e))])}toGenerationTarget(){return{id:this.id,name:this.name,type:this.type,implements:this.implements.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.inputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.calls.flatMap(i=>i.toFlatGenerationTarget(e)),...this.returnStatements.flatMap(i=>i.toFlatGenerationTarget(e))])}clearErrors(){return this.errors=[],this.inputs.forEach(e=>e.clearErrors()),this.calls.forEach(e=>e.clearErrors()),this.returnStatements.forEach(e=>e.clearErrors()),this}validate(){const e=b9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){const e=It(this);return[...this.errors,...this.inputs.flatMap(i=>i.getErrors()),...e.flatMap(i=>i.getErrors())]}getShallowErrors(){return this.errors}clone(){return new te(this.toJSON(),this.project)}getVariableInstances(){return Z(this).filter(i=>i.type===r.VariableInstance)}addReturnStatement(e){return this.returnStatements.includes(e)||this.returnStatements.push(e),this}removeReturnStatement(e){const t=this.returnStatements.indexOf(e);return t!==-1&&this.returnStatements.splice(t,1),this}};l(te,"MUTABLE_BASE_PROPERTIES",["description"]),l(te,"INMUTABLE_BASE_PROPERTIES",["id","version","name","type"]),l(te,"BASE_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,...te.INMUTABLE_BASE_PROPERTIES]),l(te,"MUTABLE_META_PROPERTIES",[...te.MUTABLE_BASE_PROPERTIES,"x","y","collapsed"]),l(te,"INMUTABLE_META_PROPERTIES",[...te.INMUTABLE_BASE_PROPERTIES]),l(te,"META_PROPERTIES",[...te.MUTABLE_META_PROPERTIES,...te.INMUTABLE_META_PROPERTIES]),l(te,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(te,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","implements"]),l(te,"UPSTREAM_PROPERTIES",[...te.MUTABLE_UPSTREAM_PROPERTIES,...te.INMUTABLE_UPSTREAM_PROPERTIES]),l(te,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","calls","returnStatements"]),l(te,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(te,"DOWNSTREAM_PROPERTIES",[...te.MUTABLE_DOWNSTREAM_PROPERTIES,...te.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(te,"PROPERTIES",[...te.META_PROPERTIES,...te.UPSTREAM_PROPERTIES,...te.DOWNSTREAM_PROPERTIES]);let oi=te;function g9(n){var o,d;const e=H4(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(p=>p.validate()),n.outputs.forEach(p=>p.validate()),(o=n.error)==null||o.validate(),(d=n.body)==null||d.validate();const s=[...En(n)];if(n.id==="iterate-over-list-loop-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(p.error)}return X(n.errors,s)}const ne=class ne{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.Loop);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"process",null);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"error",null);l(this,"breakStatements",[]);l(this,"continueStatements",[]);l(this,"body");l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"parent");l(this,"detachedChildren",[]);l(this,"errors",[]);l(this,"project");l(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 f=D(e.parent);i=t.get(f)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const b=D(f);return t.get(b)}),d=e.calledBySuccess.map(f=>{const b=D(f);return t.get(b)}),p=e.calledByError.map(f=>{const b=D(f);return t.get(b)}),h={id:e.id,version:1,type:r.Loop,declaration:s,calledByEntry:o,calledBySuccess:d,calledByError:p,process:null,errorCalls:[],successCalls:[],inputs:[],outputs:[],body:null,breakStatements:[],continueStatements:[],error:null,x:0,y:0,parent:i},T=R(h,t);return T.setParent(i),T.initChildren(),T}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0},declaration:{list:!1,types:[r.ActionDescriptor]}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new E({id:`${e.id}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${r.Condition}' entities.
|
|
49
49
|
${so(t)}`,issue:null})):a.push(new E({id:`${e.id}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.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 '${r.Condition}' entities.
|
|
50
50
|
${so(t)}`,issue:null})):a.push(new E({id:`${e.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.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 '${r.Condition}' entities.
|
|
51
51
|
${so(t)}`,issue:null})),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated. The 'parent' on a callable entity, is its scope. It scope is auto-calculated implicitly by the its caller.
|
|
52
52
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
53
|
-
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.parent===this.project&&this.project.addLoop(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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}setBody(e){return this.body=e,this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.declaration=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.body&&(this.body=R(this.initialData.body,this.project),this.body.setParent(this),this.body.initChildren()),this.initialData.error&&(this.error=R(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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.body.remove({ignoreUpstream:!0,seenEntities:t}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.body.restore({seenEntities:e}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:S(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.error?this.error.toFlat(e):[],...this.body?this.body.toFlat(e):[],...this.continueStatements.flatMap(i=>i.toFlat(e)),...this.breakStatements.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[],...this.body?this.body.toFlatIds(e):[],...this.continueStatements.flatMap(i=>i.toFlatIds(e)),...this.breakStatements.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:((e=this.process)==null?void 0:e.toJSON())||null,declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),error:((t=this.error)==null?void 0:t.toJSON())||null,body:this.body.toJSON(),parent:this.parent.toReference(),breakStatements:this.breakStatements.map(i=>i.toJSON()),continueStatements:this.continueStatements.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:((e=this.declaration)==null?void 0:e.toReference())||null,body:((t=this.body)==null?void 0:t.toReference())||null,inputs:this.inputs.map(s=>s.toReference()),outputs:this.outputs.map(s=>s.toReference()),successCalls:this.successCalls.map(s=>s.toReference()),errorCalls:this.errorCalls.map(s=>s.toReference()),process:((i=this.process)==null?void 0:i.toReference())||null,calledBySuccess:this.calledBySuccess.map(s=>s.toReference()),calledByError:this.calledByError.map(s=>s.toReference()),calledByEntry:this.calledByEntry.map(s=>s.toReference()),continueStatements:this.continueStatements.map(s=>s.toReference()),breakStatements:this.breakStatements.map(s=>s.toReference()),error:((a=this.error)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.body)==null?void 0:i.toFlatJSON(e))||[],...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.continueStatements.flatMap(a=>a.toFlatJSON(e)),...this.breakStatements.flatMap(a=>a.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[],...this.process?this.process.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.body)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.continueStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.breakStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[],...this.process?this.process.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),this.continueStatements.forEach(i=>i.clearErrors()),this.breakStatements.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=v9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.body?this.body.getErrors():[],...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new ne(this.toJSON(),this.project)}getVariableInstances(){return this.body?Z(this.body).filter(i=>i.type===r.VariableInstance):[]}addReturnStatement(e){return this.body.addReturnStatement(e),this}removeReturnStatement(e){return this.body.removeReturnStatement(e),this}addBreakStatement(e){return this.breakStatements.includes(e)||this.breakStatements.push(e),this}removeBreakStatement(e){const t=this.breakStatements.indexOf(e);return t!==-1&&this.breakStatements.splice(t,1),this}addContinueStatement(e){return this.continueStatements.includes(e)||this.continueStatements.push(e),this}removeContinueStatement(e){const t=this.continueStatements.indexOf(e);return t!==-1&&this.continueStatements.splice(t,1),this}};l(ne,"MUTABLE_BASE_PROPERTIES",[]),l(ne,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ne,"BASE_PROPERTIES",[...ne.MUTABLE_BASE_PROPERTIES,...ne.INMUTABLE_BASE_PROPERTIES]),l(ne,"MUTABLE_META_PROPERTIES",[...ne.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ne,"INMUTABLE_META_PROPERTIES",[...ne.INMUTABLE_BASE_PROPERTIES]),l(ne,"META_PROPERTIES",[...ne.MUTABLE_META_PROPERTIES,...ne.INMUTABLE_META_PROPERTIES]),l(ne,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(ne,"UPSTREAM_PROPERTIES",[...ne.MUTABLE_UPSTREAM_PROPERTIES,...ne.INMUTABLE_UPSTREAM_PROPERTIES]),l(ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["body","inputs","outputs","successCalls","errorCalls","error","breakStatements","continueStatements"]),l(ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ne,"DOWNSTREAM_PROPERTIES",[...ne.MUTABLE_DOWNSTREAM_PROPERTIES,...ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ne,"PROPERTIES",[...ne.META_PROPERTIES,...ne.UPSTREAM_PROPERTIES,...ne.DOWNSTREAM_PROPERTIES]);let yr=ne;function I9(n){const e=OU(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(o=>o.validate());const s=[...En(n)];return X(n.errors,s)}const me=class me{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.Condition);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"declaration");l(this,"inputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(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 T=D(e.parent);i=t.get(T)}const a=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),s=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),o=e.calledByError.map(T=>{const f=D(T);return t.get(f)});let d;if(e.declaration){const T=D(e.declaration);d=t.get(T)}const p={id:e.id,version:1,type:r.Condition,declaration:d,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputs:[],x:0,y:0,parent:i},h=R(p,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new E({id:`${e.id}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${r.Condition}' entities.
|
|
53
|
+
You shouldn't have to manually update a 'parent' property. The equivalent result is to change its callers, the value writters of its inputs, or the value readers of its outputs.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.parent===this.project&&this.project.addLoop(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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}setBody(e){return this.body=e,this}addSuccessCaller(e){return this.calledBySuccess.find(t=>t.id===e.id)||this.calledBySuccess.push(e),this}addErrorCaller(e){return this.calledByError.find(t=>t.id===e.id)||this.calledByError.push(e),this}addEntryCaller(e){return this.calledByEntry.find(t=>t.id===e.id)||this.calledByEntry.push(e),this}addErrorCall(e){return this.errorCalls.push(e),this}addSuccessCall(e){return this.successCalls.push(e),this}removeCall(e){const t=this.successCalls.findIndex(a=>a.id===e.id);t>-1&&this.successCalls.splice(t,1);const i=this.errorCalls.findIndex(a=>a.id===e.id);return i>-1&&this.errorCalls.splice(i,1),this}removeCaller(e){return this.calledBySuccess=this.calledBySuccess.filter(t=>t.id!==e.id),this.calledByError=this.calledByError.filter(t=>t.id!==e.id),this.calledByEntry=this.calledByEntry.filter(t=>t.id!==e.id),this}replaceDetachedChild(e,t){const i=this.detachedChildren.indexOf(e);return i!==-1&&(this.detachedChildren[i]=t),this}subscribeDetachedChild(e){return this.detachedChildren.includes(e)||this.detachedChildren.push(e),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.declaration=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.body&&(this.body=R(this.initialData.body,this.project),this.body.setParent(this),this.body.initChildren()),this.initialData.error&&(this.error=R(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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.body.remove({ignoreUpstream:!0,seenEntities:t}),this.error){const{affected:s,removed:o}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.successCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),this.errorCalls.forEach(s=>{i.push(s),s.removeCaller(this)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),this.inputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.body.restore({seenEntities:e}),this.successCalls.forEach(i=>{t.push(i),i.addSuccessCaller(this)}),this.errorCalls.forEach(i=>{t.push(i),i.addErrorCaller(this)}),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:S(t),self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.inputs.flatMap(i=>i.toFlat(e)),...this.outputs.flatMap(i=>i.toFlat(e)),...this.process?this.process.toFlat(e):[],...this.successCalls.flatMap(i=>i.toFlat(e)),...this.errorCalls.flatMap(i=>i.toFlat(e)),...this.error?this.error.toFlat(e):[],...this.body?this.body.toFlat(e):[],...this.continueStatements.flatMap(i=>i.toFlat(e)),...this.breakStatements.flatMap(i=>i.toFlat(e))])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.inputs.flatMap(i=>i.toFlatIds(e)),...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.process?this.process.toFlatIds(e):[],...this.successCalls.flatMap(i=>i.toFlatIds(e)),...this.errorCalls.flatMap(i=>i.toFlatIds(e)),...this.error?this.error.toFlatIds(e):[],...this.body?this.body.toFlatIds(e):[],...this.continueStatements.flatMap(i=>i.toFlatIds(e)),...this.breakStatements.flatMap(i=>i.toFlatIds(e))])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),process:((e=this.process)==null?void 0:e.toJSON())||null,declaration:this.declaration.toJSON(),inputs:this.inputs.map(i=>i.toJSON()),outputs:this.outputs.map(i=>i.toJSON()),successCalls:this.successCalls.map(i=>i.toJSON()),errorCalls:this.errorCalls.map(i=>i.toJSON()),error:((t=this.error)==null?void 0:t.toJSON())||null,body:this.body.toJSON(),parent:this.parent.toReference(),breakStatements:this.breakStatements.map(i=>i.toJSON()),continueStatements:this.continueStatements.map(i=>i.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,declaration:((e=this.declaration)==null?void 0:e.toReference())||null,body:((t=this.body)==null?void 0:t.toReference())||null,inputs:this.inputs.map(s=>s.toReference()),outputs:this.outputs.map(s=>s.toReference()),successCalls:this.successCalls.map(s=>s.toReference()),errorCalls:this.errorCalls.map(s=>s.toReference()),process:((i=this.process)==null?void 0:i.toReference())||null,calledBySuccess:this.calledBySuccess.map(s=>s.toReference()),calledByError:this.calledByError.map(s=>s.toReference()),calledByEntry:this.calledByEntry.map(s=>s.toReference()),continueStatements:this.continueStatements.map(s=>s.toReference()),breakStatements:this.breakStatements.map(s=>s.toReference()),error:((a=this.error)==null?void 0:a.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...((i=this.body)==null?void 0:i.toFlatJSON(e))||[],...this.successCalls.flatMap(a=>a.toFlatJSON(e)),...this.errorCalls.flatMap(a=>a.toFlatJSON(e)),...this.inputs.flatMap(a=>a.toFlatJSON(e)),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.continueStatements.flatMap(a=>a.toFlatJSON(e)),...this.breakStatements.flatMap(a=>a.toFlatJSON(e)),...this.error?this.error.toFlatJSON(e):[],...this.process?this.process.toFlatJSON(e):[]])}toGenerationTarget(){const e=this.parent.type===r.Project?void 0:this.parent.id;return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(t=>t.id),calledBySuccess:this.calledBySuccess.map(t=>t.id),calledByError:this.calledByError.map(t=>t.id),declaration:this.declaration.id,parent:e}}toFlatGenerationTarget(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...((i=this.body)==null?void 0:i.toFlatGenerationTarget(e))||[],...this.successCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.errorCalls.flatMap(a=>a.toFlatGenerationTarget(e)),...this.inputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.outputs.flatMap(a=>a.toFlatGenerationTarget(e)),...this.continueStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.breakStatements.flatMap(a=>a.toFlatGenerationTarget(e)),...this.error?this.error.toFlatGenerationTarget(e):[],...this.process?this.process.toFlatGenerationTarget(e):[]])}clearErrors(){var e,t;return this.errors=[],this.inputs.forEach(i=>i.clearErrors()),this.outputs.forEach(i=>i.clearErrors()),this.successCalls.forEach(i=>i.clearErrors()),this.errorCalls.forEach(i=>i.clearErrors()),this.continueStatements.forEach(i=>i.clearErrors()),this.breakStatements.forEach(i=>i.clearErrors()),(e=this.process)==null||e.clearErrors(),(t=this.error)==null||t.clearErrors(),this}validate(){const e=g9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.inputs.flatMap(t=>t.getErrors()),...this.outputs.flatMap(t=>t.getErrors()),...this.body?this.body.getErrors():[],...this.error?this.error.getErrors():[],...this.process?this.process.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new ne(this.toJSON(),this.project)}getVariableInstances(){return this.body?Z(this.body).filter(i=>i.type===r.VariableInstance):[]}addReturnStatement(e){return this.body.addReturnStatement(e),this}removeReturnStatement(e){return this.body.removeReturnStatement(e),this}addBreakStatement(e){return this.breakStatements.includes(e)||this.breakStatements.push(e),this}removeBreakStatement(e){const t=this.breakStatements.indexOf(e);return t!==-1&&this.breakStatements.splice(t,1),this}addContinueStatement(e){return this.continueStatements.includes(e)||this.continueStatements.push(e),this}removeContinueStatement(e){const t=this.continueStatements.indexOf(e);return t!==-1&&this.continueStatements.splice(t,1),this}};l(ne,"MUTABLE_BASE_PROPERTIES",[]),l(ne,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ne,"BASE_PROPERTIES",[...ne.MUTABLE_BASE_PROPERTIES,...ne.INMUTABLE_BASE_PROPERTIES]),l(ne,"MUTABLE_META_PROPERTIES",[...ne.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ne,"INMUTABLE_META_PROPERTIES",[...ne.INMUTABLE_BASE_PROPERTIES]),l(ne,"META_PROPERTIES",[...ne.MUTABLE_META_PROPERTIES,...ne.INMUTABLE_META_PROPERTIES]),l(ne,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ne,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(ne,"UPSTREAM_PROPERTIES",[...ne.MUTABLE_UPSTREAM_PROPERTIES,...ne.INMUTABLE_UPSTREAM_PROPERTIES]),l(ne,"MUTABLE_DOWNSTREAM_PROPERTIES",["body","inputs","outputs","successCalls","errorCalls","error","breakStatements","continueStatements"]),l(ne,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ne,"DOWNSTREAM_PROPERTIES",[...ne.MUTABLE_DOWNSTREAM_PROPERTIES,...ne.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ne,"PROPERTIES",[...ne.META_PROPERTIES,...ne.UPSTREAM_PROPERTIES,...ne.DOWNSTREAM_PROPERTIES]);let yr=ne;function v9(n){const e=AU(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(o=>o.validate());const s=[...En(n)];return X(n.errors,s)}const me=class me{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.Condition);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"declaration");l(this,"inputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(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 T=D(e.parent);i=t.get(T)}const a=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),s=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),o=e.calledByError.map(T=>{const f=D(T);return t.get(f)});let d;if(e.declaration){const T=D(e.declaration);d=t.get(T)}const p={id:e.id,version:1,type:r.Condition,declaration:d,calledByEntry:a,calledBySuccess:s,calledByError:o,errorCalls:[],successCalls:[],inputs:[],x:0,y:0,parent:i},h=R(p,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),e.declaration?t.get(e.declaration)?t.conditionDeclarations.find(p=>p.id===e.declaration)||a.push(new E({id:`${e.id}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type '${e.type}' with id '${e.id}' has an 'declaration' property that isn't pointing to an action descriptor reserved for '${r.Condition}' entities.
|
|
54
54
|
${oo(t)}`,issue:null})):a.push(new E({id:`${e.id}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.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 '${r.Condition}' entities.
|
|
55
55
|
${oo(t)}`,issue:null})):a.push(new E({id:`${e.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.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 '${r.Condition}' entities.
|
|
56
56
|
${oo(t)}`,issue:null})),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project&&this.project.addCondition(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(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.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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:r.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===r.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=I9(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 me(this.toJSON(),this.project)}};l(me,"MUTABLE_BASE_PROPERTIES",["operator"]),l(me,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(me,"BASE_PROPERTIES",[...me.MUTABLE_BASE_PROPERTIES,...me.INMUTABLE_BASE_PROPERTIES]),l(me,"MUTABLE_META_PROPERTIES",["x","y"]),l(me,"INMUTABLE_META_PROPERTIES",[...me.INMUTABLE_BASE_PROPERTIES]),l(me,"META_PROPERTIES",[...me.MUTABLE_META_PROPERTIES,...me.INMUTABLE_META_PROPERTIES]),l(me,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),l(me,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(me,"UPSTREAM_PROPERTIES",[...me.MUTABLE_UPSTREAM_PROPERTIES,...me.INMUTABLE_UPSTREAM_PROPERTIES]),l(me,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),l(me,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(me,"DOWNSTREAM_PROPERTIES",[...me.MUTABLE_DOWNSTREAM_PROPERTIES,...me.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(me,"PROPERTIES",[...me.META_PROPERTIES,...me.UPSTREAM_PROPERTIES,...me.DOWNSTREAM_PROPERTIES]);let hr=me;class cv{constructor(){l(this,"initialData")}}class P9{}class D9 extends cv{}class A9{}class S9{}class O9{}class fd{}class C9 extends fd{}class B9 extends fd{}class w9{}class ca{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==r.GenericReference)e.readsValue=R(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===r.GenericReference){const t=Bt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Ge.includes(e.readsValue.type)){let t=e.parent;st.includes(t.type)||(t=t.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class da{static initWritesValues(e,t){const i=e.initialData.writesValues.reduce((s,o)=>{if(o.type===r.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const d=R(o,e.project);return d.setValueWriter(e),Ge.includes(d.type)&&(d.setParent(t),d.initChildren()),[...s,d]},[]),a=[...e.writesValues];return e.writesValues=S([...a,...i]),e.writesValues}}class _9{}function M9(n){var d;const e=dx(),t=n.toJSON();e.safeParse(t).success,(d=n.dataType)==null||d.validate(),n.inputs.forEach(p=>p.validate()),n.outputs.forEach(p=>p.validate()),n.internalCalls.forEach(p=>p.validate());const s=[...En(n)];if(n.id==="random-company-employee-test-variable-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(p.error)}if(n.id==="company-dto-variable-one-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(p.error)}const o=Dd(n);return s.push(...o),X(n.errors,s)}const re=class re{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"dataType",null);l(this,"x");l(this,"y");l(this,"type",r.VariableDeclaration);l(this,"writesValues",[]);l(this,"readsValue",null);l(this,"inputs",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"internalCalls",[]);l(this,"parent");l(this,"variableInstances",[]);l(this,"errors",[]);l(this,"project");l(this,"initialized",!1);l(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 T=D(e.parent);i=t.get(T)}const a=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),s=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),o=e.calledByError.map(T=>{const f=D(T);return t.get(f)});let d=null;if(e.readsValue){const T=D(e.readsValue);d=t.get(T)}const p={id:e.id,version:1,type:r.VariableDeclaration,name:e.name,description:e.description,calledByEntry:a,calledBySuccess:s,calledByError:o,dataType:null,errorCalls:[],successCalls:[],internalCalls:[],readsValue:d,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},h=R(p,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);i=s.modifiedData;const o=dd(i,t);return a.push(...s.errors,...o,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=pa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project&&this.project.addCondition(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(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.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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:r.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===r.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=v9(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 me(this.toJSON(),this.project)}};l(me,"MUTABLE_BASE_PROPERTIES",["operator"]),l(me,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(me,"BASE_PROPERTIES",[...me.MUTABLE_BASE_PROPERTIES,...me.INMUTABLE_BASE_PROPERTIES]),l(me,"MUTABLE_META_PROPERTIES",["x","y"]),l(me,"INMUTABLE_META_PROPERTIES",[...me.INMUTABLE_BASE_PROPERTIES]),l(me,"META_PROPERTIES",[...me.MUTABLE_META_PROPERTIES,...me.INMUTABLE_META_PROPERTIES]),l(me,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),l(me,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(me,"UPSTREAM_PROPERTIES",[...me.MUTABLE_UPSTREAM_PROPERTIES,...me.INMUTABLE_UPSTREAM_PROPERTIES]),l(me,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs"]),l(me,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(me,"DOWNSTREAM_PROPERTIES",[...me.MUTABLE_DOWNSTREAM_PROPERTIES,...me.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(me,"PROPERTIES",[...me.META_PROPERTIES,...me.UPSTREAM_PROPERTIES,...me.DOWNSTREAM_PROPERTIES]);let hr=me;class ov{constructor(){l(this,"initialData")}}class I9{}class P9 extends ov{}class D9{}class A9{}class S9{}class hd{}class O9 extends hd{}class C9 extends hd{}class B9{}class la{static initReadsValue(e){if(e.initialData.readsValue&&e.initialData.readsValue.type!==r.GenericReference)e.readsValue=R(e.initialData.readsValue,e.project);else if(e.initialData.readsValue&&e.initialData.readsValue.type===r.GenericReference){const t=Bt(e.initialData.readsValue,e.project);t&&(e.readsValue=t)}if(e.readsValue){if(Ge.includes(e.readsValue.type)){let t=e.parent;st.includes(t.type)||(t=t.parent),e.readsValue.setParent(t),e.readsValue.initChildren(),t.detachedChildren.includes(e)?t.replaceDetachedChild(e,e.readsValue):t.subscribeDetachedChild(e.readsValue)}e.readsValue.addValueReader(e)}return e.readsValue}}class ca{static initWritesValues(e,t){const i=e.initialData.writesValues.reduce((s,o)=>{if(o.type===r.GenericReference||e.writesValues.some(p=>p.id===o.id))return s;const d=R(o,e.project);return d.setValueWriter(e),Ge.includes(d.type)&&(d.setParent(t),d.initChildren()),[...s,d]},[]),a=[...e.writesValues];return e.writesValues=S([...a,...i]),e.writesValues}}class w9{}function _9(n){var d;const e=lx(),t=n.toJSON();e.safeParse(t).success,(d=n.dataType)==null||d.validate(),n.inputs.forEach(p=>p.validate()),n.outputs.forEach(p=>p.validate()),n.internalCalls.forEach(p=>p.validate());const s=[...En(n)];if(n.id==="random-company-employee-test-variable-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(p.error)}if(n.id==="company-dto-variable-one-id"){const p=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(p.error)}const o=Pd(n);return s.push(...o),X(n.errors,s)}const re=class re{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"dataType",null);l(this,"x");l(this,"y");l(this,"type",r.VariableDeclaration);l(this,"writesValues",[]);l(this,"readsValue",null);l(this,"inputs",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"internalCalls",[]);l(this,"parent");l(this,"variableInstances",[]);l(this,"errors",[]);l(this,"project");l(this,"initialized",!1);l(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 T=D(e.parent);i=t.get(T)}const a=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),s=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),o=e.calledByError.map(T=>{const f=D(T);return t.get(f)});let d=null;if(e.readsValue){const T=D(e.readsValue);d=t.get(T)}const p={id:e.id,version:1,type:r.VariableDeclaration,name:e.name,description:e.description,calledByEntry:a,calledBySuccess:s,calledByError:o,dataType:null,errorCalls:[],successCalls:[],internalCalls:[],readsValue:d,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},h=R(p,t);return h.setParent(i),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);i=s.modifiedData;const o=cd(i,t);return a.push(...s.errors,...o,...Ae(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 E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project&&this.project.addVariableDeclaration(this),this.readsValue&&this.readsValue.addValueReader(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.dynamicArguments.length||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.dynamicArguments.length&&!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=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),da.initWritesValues(this,this.parent),ca.initReadsValue(this),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.internalCalls=this.initialData.internalCalls.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs.push(...this.generateUnusedInputs()),this.outputs.push(...this.generateUnusedOutputs()),!this.dataType&&this.inputs.length&&(this.dataType=si(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}subscribeInstance(e){return this.variableInstances.includes(e)?this:(this.variableInstances.push(e),this)}syncInputsAndOutputs(){return this}removeInstance(e){return this.variableInstances=this.variableInstances.filter(t=>t.id!==e.id),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),fa(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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===r.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=M9(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 re(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:r.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=R(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties,...this.dataType.entity.extendedProperties].filter(i=>!this.inputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.InputMap,parent:this.toReference(),name:null,description:null,dynamicArguments:[],declaration:i,defaultValue:null,index:i.index,readsValue:null},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,s})}else return[];else return[];return[]}generateUnusedOutputs(){if(this.dataType)if(this.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties,...this.dataType.entity.extendedProperties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,s})}else return[];else return[];return[]}generateUnusedInternalCalls(){if(this.dataType)if(this.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var d,p,h,T,f;return(((d=s.declaration)==null?void 0:d.id)||((h=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:h.entityId)||((f=(T=s.initialData)==null?void 0:T.declaration)==null?void 0:f.id))===i.id})).map(i=>{const a=i.createInternalCall(this);return a.suggestion=!0,a})}else return[];else return[];return[]}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return 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)}};l(re,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(re,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(re,"BASE_PROPERTIES",[...re.MUTABLE_BASE_PROPERTIES,...re.INMUTABLE_BASE_PROPERTIES]),l(re,"MUTABLE_META_PROPERTIES",[...re.MUTABLE_BASE_PROPERTIES,"x","y"]),l(re,"INMUTABLE_META_PROPERTIES",[...re.INMUTABLE_BASE_PROPERTIES]),l(re,"META_PROPERTIES",[...re.MUTABLE_META_PROPERTIES,...re.INMUTABLE_META_PROPERTIES]),l(re,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),l(re,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),l(re,"UPSTREAM_PROPERTIES",[...re.MUTABLE_UPSTREAM_PROPERTIES,...re.INMUTABLE_UPSTREAM_PROPERTIES]),l(re,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),l(re,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(re,"DOWNSTREAM_PROPERTIES",[...re.MUTABLE_DOWNSTREAM_PROPERTIES,...re.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(re,"PROPERTIES",[...re.META_PROPERTIES,...re.UPSTREAM_PROPERTIES,...re.DOWNSTREAM_PROPERTIES]);let fr=re;function N9(n){const e=fx(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(d=>d.validate()),n.outputs.forEach(d=>d.validate()),n.internalCalls.forEach(d=>d.validate());const s=[...En(n)];if(n.id==="exec-sequentially-result-variable-id"){const d=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(d.error)}const o=Dd(n);return s.push(...o),X(n.errors,s)}const ie=class ie{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.VariableInstance);l(this,"writesValues",[]);l(this,"readsValue",null);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"internalCalls",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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 b=D(e.parent);i=t.get(b)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(b=>{const I=D(b);return t.get(I)}),d=e.calledBySuccess.map(b=>{const I=D(b);return t.get(I)}),p=e.calledByError.map(b=>{const I=D(b);return t.get(I)});let h=null;if(e.readsValue){const b=D(e.readsValue);h=t.get(b)}const T={id:e.id,version:1,type:r.VariableInstance,declaration:s.toReference(),calledByEntry:o,calledBySuccess:d,calledByError:p,errorCalls:[],successCalls:[],internalCalls:[],readsValue:h,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},f=R(T,t);return f.setParent(i),f.initChildren(),f}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0},declaration:{list:!1,types:[r.VariableDeclaration]}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=pa(i,this);return i=a.modifiedData,t.push(...a.errors),e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project&&this.project.addVariableDeclaration(this),this.readsValue&&this.readsValue.addValueReader(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.dynamicArguments.length||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.dynamicArguments.length&&!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=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),ca.initWritesValues(this,this.parent),la.initReadsValue(this),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.initialData.inputs.forEach(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),this.addInput(t),t}),this.initialData.outputs.forEach(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),this.addOutput(t),t}),this.initialData.internalCalls.forEach(e=>{const t=R(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}inferDataTypeAndSyncInstancesInputsAndOutputs(){var i;const e=S([...this.inputs,...this.variableInstances.flatMap(a=>a.inputs)]),t=[];if(e.forEach(a=>{if(!a.declaration){t.push(a);return}const s=a.declaration;t.find(d=>d.declaration===s)||t.push(a)}),!t.length)return this;if(!this.dataType){const a=R({id:this.id+"--infered-data-type",version:1,type:r.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:this.toReference()},this.project);a.inferred=!0,a.setParent(this),a.initChildren(),this.setDataType(a)}return(i=this.dataType)==null||i.inferFromInputs(t),this.dataType?(this.generateUnusedInputs(),this.generateUnusedOutputs(),this.variableInstances.forEach(a=>{a.generateUnusedInputs(),a.generateUnusedOutputs()}),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),ha(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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===r.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=_9(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 re(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:r.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=R(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties,...this.dataType.entity.extendedProperties].filter(i=>!this.inputs.find(a=>!a.declaration||a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.InputMap,parent:this.toReference(),name:null,description:null,dynamicArguments:[],declaration:i,defaultValue:null,index:i.index,readsValue:null},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,this.addInput(s),s})}else return[];else return[];return[]}generateUnusedOutputs(){if(this.dataType)if(this.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.properties,...this.dataType.entity.extendedProperties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=R(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.dataType.entity.type))return[...this.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var d,p,h,T,f;return(((d=s.declaration)==null?void 0:d.id)||((h=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:h.entityId)||((f=(T=s.initialData)==null?void 0:T.declaration)==null?void 0:f.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||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)}};l(re,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(re,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(re,"BASE_PROPERTIES",[...re.MUTABLE_BASE_PROPERTIES,...re.INMUTABLE_BASE_PROPERTIES]),l(re,"MUTABLE_META_PROPERTIES",[...re.MUTABLE_BASE_PROPERTIES,"x","y"]),l(re,"INMUTABLE_META_PROPERTIES",[...re.INMUTABLE_BASE_PROPERTIES]),l(re,"META_PROPERTIES",[...re.MUTABLE_META_PROPERTIES,...re.INMUTABLE_META_PROPERTIES]),l(re,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),l(re,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),l(re,"UPSTREAM_PROPERTIES",[...re.MUTABLE_UPSTREAM_PROPERTIES,...re.INMUTABLE_UPSTREAM_PROPERTIES]),l(re,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),l(re,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(re,"DOWNSTREAM_PROPERTIES",[...re.MUTABLE_DOWNSTREAM_PROPERTIES,...re.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(re,"PROPERTIES",[...re.META_PROPERTIES,...re.UPSTREAM_PROPERTIES,...re.DOWNSTREAM_PROPERTIES]);let fr=re;function M9(n){const e=yx(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(d=>d.validate()),n.outputs.forEach(d=>d.validate()),n.internalCalls.forEach(d=>d.validate());const s=[...En(n)];if(n.id==="exec-sequentially-result-variable-id"){const d=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(d.error)}const o=Pd(n);return s.push(...o),X(n.errors,s)}const ie=class ie{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.VariableInstance);l(this,"writesValues",[]);l(this,"readsValue",null);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"internalCalls",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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 b=D(e.parent);i=t.get(b)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(b=>{const I=D(b);return t.get(I)}),d=e.calledBySuccess.map(b=>{const I=D(b);return t.get(I)}),p=e.calledByError.map(b=>{const I=D(b);return t.get(I)});let h=null;if(e.readsValue){const b=D(e.readsValue);h=t.get(b)}const T={id:e.id,version:1,type:r.VariableInstance,declaration:s.toReference(),calledByEntry:o,calledBySuccess:d,calledByError:p,errorCalls:[],successCalls:[],internalCalls:[],readsValue:h,inputs:[],outputs:[],writesValues:[],x:0,y:0,parent:i},f=R(T,t);return f.setParent(i),f.initChildren(),f}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0},declaration:{list:!1,types:[r.VariableDeclaration]}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(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 E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return this.parent===this.project&&this.project.addVariableInstance(this),this.readsValue&&this.readsValue.addValueReader(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.dynamicArguments.length||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.dynamicArguments.length&&!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(){if(this.initialized)return this;if(this.initialized=!0,this.initialData.declaration.type===r.GenericReference){const e=this.project.findSubscribedInstanceFromReference(this.initialData.declaration);if(!e)return this;this.declaration=e}else this.declaration=R(this.initialData.declaration,this.project),this.declaration.setParent(this.parent),this.declaration.initChildren();return da.initWritesValues(this,this.parent),ca.initReadsValue(this),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.internalCalls=this.initialData.internalCalls.reduce((e,t)=>{if(t.type===r.GenericReference){const i=this.project.findSubscribedInstanceFromReference(t);if(!i)return e;const a=i;return a.setParent(this),[...e,a]}else{const i=R(t,this.project);return i.setParent(this),i.initChildren(),[...e,i]}},[]),this.inputs.push(...this.generateUnusedInputs()),this.outputs.push(...this.generateUnusedOutputs()),this.internalCalls.push(...this.generateUnusedInternalCalls()),this.declaration.subscribeInstance(this),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),fa(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),this.declaration.removeInstance(this),{affected:S(i),removed:S(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:S(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:r.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===r.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=N9(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 ie(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.properties,...this.declaration.dataType.entity.extendedProperties].filter(i=>!this.inputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.InputMap,parent:this.toReference(),name:null,description:null,dynamicArguments:[],declaration:i,defaultValue:null,index:i.index,readsValue:null},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,s})}else return[];else return[];return[]}generateUnusedOutputs(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.properties,...this.declaration.dataType.entity.extendedProperties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,s})}else return[];else return[];return[]}generateUnusedInternalCalls(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var d,p,h,T,f;return(((d=s.declaration)==null?void 0:d.id)||((h=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:h.entityId)||((f=(T=s.initialData)==null?void 0:T.declaration)==null?void 0:f.id))===i.id})).map(i=>{const a=i.createInternalCall(this);return a.suggestion=!0,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)}};l(ie,"MUTABLE_BASE_PROPERTIES",[]),l(ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ie,"BASE_PROPERTIES",[...ie.MUTABLE_BASE_PROPERTIES,...ie.INMUTABLE_BASE_PROPERTIES]),l(ie,"MUTABLE_META_PROPERTIES",[...ie.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ie,"INMUTABLE_META_PROPERTIES",[...ie.INMUTABLE_BASE_PROPERTIES]),l(ie,"META_PROPERTIES",[...ie.MUTABLE_META_PROPERTIES,...ie.INMUTABLE_META_PROPERTIES]),l(ie,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),l(ie,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),l(ie,"UPSTREAM_PROPERTIES",[...ie.MUTABLE_UPSTREAM_PROPERTIES,...ie.INMUTABLE_UPSTREAM_PROPERTIES]),l(ie,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),l(ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ie,"DOWNSTREAM_PROPERTIES",[...ie.MUTABLE_DOWNSTREAM_PROPERTIES,...ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ie,"PROPERTIES",[...ie.META_PROPERTIES,...ie.UPSTREAM_PROPERTIES,...ie.DOWNSTREAM_PROPERTIES]);let mr=ie;function $9(n){var s;const e=uU(),t=n.toJSON();e.safeParse(t).success,(s=n.dataType)==null||s.validate();const a=[];if(n.id==="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id"){const o=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(o.error)}return X(n.errors,a)}const ae=class ae{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"index");l(this,"required");l(this,"isError");l(this,"type",r.ReturnDeclaration);l(this,"dataType",null);l(this,"readsValue",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.readsValue){const p=D(e.readsValue);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:r.ReturnDeclaration,index:a.outputs.length,isError:!1,description:e.description,required:e.required,readsValue:s,dataType:null,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){var d,p;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.ReturnStatement,r.Search,r.BreakStatement,r.ContinueStatement]}},t),o=yd(i,t);if(i=s.modifiedData,i.parent){const h=t.get(D(i.parent));if(h&&[r.BreakStatement,r.ContinueStatement].includes(h.type)){const T=h,f=T.parent,b=[...f.breakStatements.filter(B=>B.id!==h.id),...f.continueStatements.filter(B=>B.id!==h.id)];if(T.outputs.length)a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' cannot be added to the parent entity of type '${T.type}' with id '${T.id}'. This '${T.type}' already has return declarations.
|
|
64
|
-
${
|
|
65
|
-
${
|
|
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(){return this.parent===this.project&&this.project.addVariableInstance(this),this.readsValue&&this.readsValue.addValueReader(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this}get calledBy(){return[...this.calledByEntry,...this.calledBySuccess,...this.calledByError]}get usedInputs(){return this.inputs.filter(e=>e.readsValue||e.dynamicArguments.length||e.defaultValue)}get unusedInputs(){return this.inputs.filter(e=>!e.readsValue&&!e.dynamicArguments.length&&!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===r.GenericReference){const t=this.project.findSubscribedInstanceFromReference(this.initialData.declaration);if(!t)return this;this.declaration=t}else this.declaration=R(this.initialData.declaration,this.project),this.declaration.setParent(this.parent),this.declaration.initChildren();return ca.initWritesValues(this,this.parent),la.initReadsValue(this),this.initialData.inputs.forEach(t=>{const i=R(t,this.project);return i.setParent(this),i.initChildren(),this.addInput(i),i}),this.initialData.outputs.forEach(t=>{const i=R(t,this.project);return i.setParent(this),i.initChildren(),this.addOutput(i),i}),this.successCalls=this.initialData.successCalls.map(t=>{const i=R(t,this.project);return i.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(i.type)?(i.setParent(this.parent.parent),i.initChildren()):i.type!==r.InternalCall&&(i.setParent(this.parent),i.initChildren()),i}),this.errorCalls=this.initialData.errorCalls.map(t=>{const i=R(t,this.project);return i.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(i.type)?(i.setParent(this.parent.parent),i.initChildren()):i.type!==r.InternalCall&&(i.setParent(this.parent),i.initChildren()),i}),this.internalCalls=this.initialData.internalCalls.reduce((t,i)=>{if(i.type===r.GenericReference){const a=this.project.findSubscribedInstanceFromReference(i);if(!a)return t;const s=a;return s.setParent(this),[...t,s]}else{const a=R(i,this.project);return a.setParent(this),a.initChildren(),[...t,a]}},[]),this.generateUnusedInputs(),this.generateUnusedOutputs(),this.generateUnusedInternalCalls(),this.declaration.subscribeInstance(this),(!this.declaration.getDataType()||(e=this.declaration.getDataType())!=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),ha(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),this.declaration.removeInstance(this),{affected:S(i),removed:S(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:S(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:r.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===r.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=M9(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 ie(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.properties,...this.declaration.dataType.entity.extendedProperties].filter(i=>!(this.inputs.find(o=>o.name===i.name)||this.inputs.find(o=>o.declaration===i))).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.InputMap,parent:this.toReference(),name:null,description:null,dynamicArguments:[],declaration:i,defaultValue:null,index:i.index,readsValue:null},s=R(a,this.project);return s.setParent(this),s.initChildren(),s.suggestion=!0,this.addInput(s),s})}else return[];else return[];return[]}generateUnusedOutputs(){if(this.declaration.dataType)if(this.declaration.dataType.entity){if([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.properties,...this.declaration.dataType.entity.extendedProperties].filter(i=>!this.outputs.find(a=>a.declaration===i)).map(i=>{const a={id:$.UUID.uuid(),version:1,type:r.OutputMap,parent:this.toReference(),declaration:i,index:i.index,writesValues:[]},s=R(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([r.CustomEntity,r.PrimitiveEntity,r.BuiltInBaseEntity].includes(this.declaration.dataType.entity.type))return[...this.declaration.dataType.entity.getAllInteractiveMethods()].filter(i=>!this.internalCalls.find(s=>{var d,p,h,T,f;return(((d=s.declaration)==null?void 0:d.id)||((h=(p=s.initialData)==null?void 0:p.declaration)==null?void 0:h.entityId)||((f=(T=s.initialData)==null?void 0:T.declaration)==null?void 0:f.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)}};l(ie,"MUTABLE_BASE_PROPERTIES",[]),l(ie,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ie,"BASE_PROPERTIES",[...ie.MUTABLE_BASE_PROPERTIES,...ie.INMUTABLE_BASE_PROPERTIES]),l(ie,"MUTABLE_META_PROPERTIES",[...ie.MUTABLE_BASE_PROPERTIES,"x","y"]),l(ie,"INMUTABLE_META_PROPERTIES",[...ie.INMUTABLE_BASE_PROPERTIES]),l(ie,"META_PROPERTIES",[...ie.MUTABLE_META_PROPERTIES,...ie.INMUTABLE_META_PROPERTIES]),l(ie,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","readsValue"]),l(ie,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),l(ie,"UPSTREAM_PROPERTIES",[...ie.MUTABLE_UPSTREAM_PROPERTIES,...ie.INMUTABLE_UPSTREAM_PROPERTIES]),l(ie,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","inputs","outputs","successCalls","errorCalls","internalCalls"]),l(ie,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ie,"DOWNSTREAM_PROPERTIES",[...ie.MUTABLE_DOWNSTREAM_PROPERTIES,...ie.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ie,"PROPERTIES",[...ie.META_PROPERTIES,...ie.UPSTREAM_PROPERTIES,...ie.DOWNSTREAM_PROPERTIES]);let mr=ie;function N9(n){var s;const e=cU(),t=n.toJSON();e.safeParse(t).success,(s=n.dataType)==null||s.validate();const a=[];if(n.id==="iterate-over-employee-list-continue-statement-employee-dto-output-decl-id"){const o=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(o.error)}return X(n.errors,a)}const ae=class ae{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"index");l(this,"required");l(this,"isError");l(this,"type",r.ReturnDeclaration);l(this,"dataType",null);l(this,"readsValue",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.readsValue){const p=D(e.readsValue);s=t.get(p)}const o={id:e.id,version:1,name:e.name,type:r.ReturnDeclaration,index:a.outputs.length,isError:!1,description:e.description,required:e.required,readsValue:s,dataType:null,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){var d,p;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.ReturnStatement,r.Search,r.BreakStatement,r.ContinueStatement]}},t),o=pd(i,t);if(i=s.modifiedData,i.parent){const h=t.get(D(i.parent));if(h&&[r.BreakStatement,r.ContinueStatement].includes(h.type)){const T=h,f=T.parent,b=[...f.breakStatements.filter(B=>B.id!==h.id),...f.continueStatements.filter(B=>B.id!==h.id)];if(T.outputs.length)a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' cannot be added to the parent entity of type '${T.type}' with id '${T.id}'. This '${T.type}' already has return declarations.
|
|
64
|
+
${Ed}`,issue:null}));else{const B=(p=(d=b[0])==null?void 0:d.outputs[0])==null?void 0:p.name;B!==i.name&&a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' cannot be added to the parent entity of type '${T.type}' with id '${T.id}'. This new 'return-declaration' doesn't have the same name "${B}" as the return declarations on the other statements in the same scope.
|
|
65
|
+
${Ed}`,issue:null}))}}else if(h&&h.type===r.ReturnStatement){const T=h.parent;if(T&&Me.includes(T.type)){const f=T.implements;if(f)if(f.returnsType===L.Fixed){const b=f.fixedReturns.find(Le=>Le.name===i.name),I=f.fixedReturns.filter(Le=>!h.outputs.find(Qv=>Qv.type===r.ReturnDeclaration&&Qv.name===Le.name)),B=h.outputs.filter(Le=>Le.type===r.ReturnDeclaration),G=B.find(Le=>Le.name===i.name),q=B.length?`The parent entity already implements the following return declarations: ${N(B.map(Le=>`'${Le.id}' (${Le.name})`),", "," and ")}.`:"The parent entity does not yet have any implemented return declarations.",jt=I.length?`The parent entity is still missing the following returns in the implementation: ${N(I.map(Le=>`'${Le.id}' (${Le.name})`),", "," and ")}.`:"The parent entity has all the returns it needs implemented.";b?G&&a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${h.type}' with id '${h.id}' that implements a ${r.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.
|
|
67
67
|
${q}
|
|
68
68
|
${jt}`,issue:null})):a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${h.type}' with id '${h.id}' that implements a ${r.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
|
${q}
|
|
71
71
|
${jt}`,issue:null}))}else f.returnsType===L.Dynamic||f.returnsType===L.None&&a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ReturnDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${h.type}' with id '${h.id}' that implements a ${r.ActionDescriptor} with no outputs.
|
|
72
|
-
Adding a new return would make the implementation invalid.`,issue:null}))}}}return a.push(...s.errors,...o,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=
|
|
73
|
-
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 e;return this.parent.addOutputDeclaration(this),(e=this.readsValue)==null||e.addValueReader(this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),
|
|
72
|
+
Adding a new return would make the implementation invalid.`,issue:null}))}}}return a.push(...s.errors,...o,...Ae(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 E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
73
|
+
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 e;return this.parent.addOutputDeclaration(this),(e=this.readsValue)==null||e.addValueReader(this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),la.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||this.index,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),ha(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:S(i),removed:S(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;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,readsValue:((t=this.readsValue)==null?void 0:t.toReference())||null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.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,isError:this.isError,readsValue:((e=this.readsValue)==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(),...((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=N9(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){return new ae(this.toJSON(),this.project)}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}getDataType(){return this.dataType}};l(ae,"MUTABLE_BASE_PROPERTIES",["name","description","required","isError"]),l(ae,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(ae,"BASE_PROPERTIES",[...ae.MUTABLE_BASE_PROPERTIES,...ae.INMUTABLE_BASE_PROPERTIES]),l(ae,"MUTABLE_META_PROPERTIES",[...ae.MUTABLE_BASE_PROPERTIES,"index"]),l(ae,"INMUTABLE_META_PROPERTIES",[...ae.INMUTABLE_BASE_PROPERTIES]),l(ae,"META_PROPERTIES",[...ae.MUTABLE_META_PROPERTIES,...ae.INMUTABLE_META_PROPERTIES]),l(ae,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),l(ae,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","dataType"]),l(ae,"UPSTREAM_PROPERTIES",[...ae.MUTABLE_UPSTREAM_PROPERTIES,...ae.INMUTABLE_UPSTREAM_PROPERTIES]),l(ae,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ae,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ae,"DOWNSTREAM_PROPERTIES",[...ae.MUTABLE_DOWNSTREAM_PROPERTIES,...ae.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ae,"PROPERTIES",[...ae.META_PROPERTIES,...ae.UPSTREAM_PROPERTIES,...ae.DOWNSTREAM_PROPERTIES]);let Ct=ae;function $9(n){var o;const e=aU(),t=n.toJSON();e.safeParse(t).success,n.inputsDeclarations.forEach(d=>d.validate()),n.inputs.forEach(d=>d.validate()),n.outputsDeclarations.forEach(d=>d.validate()),n.outputs.forEach(d=>d.validate()),(o=n.error)==null||o.validate();const s=[...En(n)];if(n.id==="search-person-by-id-id"){const d=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});s.push(d.error)}return X(n.errors,s)}const Se=class Se{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"query");l(this,"type",r.Search);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"inputsDeclarations",[]);l(this,"inputs",[]);l(this,"outputsDeclarations",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"error",null);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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 h=D(e.parent);i=t.get(h)}const a=e.calledByEntry.map(h=>{const T=D(h);return t.get(T)}),s=e.calledBySuccess.map(h=>{const T=D(h);return t.get(T)}),o=e.calledByError.map(h=>{const T=D(h);return t.get(T)}),d={id:e.id,version:1,type:r.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=R(d,t);return p.setParent(i),p.initChildren(),p}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
74
74
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
75
|
-
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(){return this.parent===this.project&&this.project.addSearch(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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=R(e,this.project);return[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputsDeclarations=this.initialData.inputsDeclarations.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputsDeclarations=this.initialData.outputsDeclarations.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.inputsDeclarations.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputsDeclarations.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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===r.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=V9(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 Se(this.toJSON(),this.project)}};l(Se,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),l(Se,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(Se,"BASE_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,...Se.INMUTABLE_BASE_PROPERTIES]),l(Se,"MUTABLE_META_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,"x","y"]),l(Se,"INMUTABLE_META_PROPERTIES",[...Se.INMUTABLE_BASE_PROPERTIES]),l(Se,"META_PROPERTIES",[...Se.MUTABLE_META_PROPERTIES,...Se.INMUTABLE_META_PROPERTIES]),l(Se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(Se,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(Se,"UPSTREAM_PROPERTIES",[...Se.MUTABLE_UPSTREAM_PROPERTIES,...Se.INMUTABLE_UPSTREAM_PROPERTIES]),l(Se,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),l(Se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Se,"DOWNSTREAM_PROPERTIES",[...Se.MUTABLE_DOWNSTREAM_PROPERTIES,...Se.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Se,"PROPERTIES",[...Ct.META_PROPERTIES,...Ct.UPSTREAM_PROPERTIES,...Ct.DOWNSTREAM_PROPERTIES]);let Tr=Se;function L9(n){const e=bx(),t=n.toJSON();e.safeParse(t).success,n.functions.forEach(s=>s.validate()),n.events.forEach(s=>s.validate());const a=[];return X(n.errors,a)}const Te=class Te{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"type",r.InstalledProject);l(this,"implements");l(this,"functions",[]);l(this,"events",[]);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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:r.InstalledProject,description:e.description,functions:[],events:[],implements:{entityId:e.implements,entityType:r.Project,type:r.GenericReference,id:$.UUID.uuid()},x:0,y:0,parent:i},s=R(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(...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return 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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(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:d}=s.remove({ignoreUpstream:!1,seenEntities:t});i.push(...o),a.push(...d)}),this.events.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!1,seenEntities:t});i.push(...o),a.push(...d)}),{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:r.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=L9(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 Te(this.toJSON(),this.project)}};l(Te,"MUTABLE_BASE_PROPERTIES",[]),l(Te,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),l(Te,"BASE_PROPERTIES",[...Te.MUTABLE_BASE_PROPERTIES,...Te.INMUTABLE_BASE_PROPERTIES]),l(Te,"MUTABLE_META_PROPERTIES",["x","y"]),l(Te,"INMUTABLE_META_PROPERTIES",[...Te.INMUTABLE_BASE_PROPERTIES]),l(Te,"META_PROPERTIES",[...Te.MUTABLE_META_PROPERTIES,...Te.INMUTABLE_META_PROPERTIES]),l(Te,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(Te,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),l(Te,"UPSTREAM_PROPERTIES",[...Te.MUTABLE_UPSTREAM_PROPERTIES,...Te.INMUTABLE_UPSTREAM_PROPERTIES]),l(Te,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),l(Te,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Te,"DOWNSTREAM_PROPERTIES",[...Te.MUTABLE_DOWNSTREAM_PROPERTIES,...Te.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Te,"PROPERTIES",[...Te.META_PROPERTIES,...Te.UPSTREAM_PROPERTIES,...Te.DOWNSTREAM_PROPERTIES]);let Er=Te;function G9(n){var d;const e=_U(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(p=>p.validate()),n.outputs.forEach(p=>p.validate()),(d=n.error)==null||d.validate();const a=En(n),s=F9(n),o=[...a,...s];return X(n.errors,o)}function F9(n){const e=[],t=Zs(n.parent),i=t==null?void 0:t.entity;if(!i)e.push(j({id:`${n.id}--${g.InternalCallParentMissingDataType}`,code:g.InternalCallParentMissingDataType,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${n.declaration}".`,issue:null,entity:n}).error);else if(![r.CustomEntity,r.BuiltInBaseEntity,r.PrimitiveEntity].includes(i.type))e.push(j({id:`${n.id}--${g.InternalCallParentDeclarationEntityInvalidType}`,code:g.InternalCallParentDeclarationEntityInvalidType,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type 'entity' is not a custom entity, built-in base entity or primitive entity.
|
|
76
|
-
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:n}).error);else{const a=
|
|
75
|
+
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(){return this.parent===this.project&&this.project.addSearch(this),this.successCalls.forEach(e=>{e.addSuccessCaller(this)}),this.errorCalls.forEach(e=>{e.addErrorCaller(this)}),this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),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=R(e,this.project);return[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputsDeclarations=this.initialData.inputsDeclarations.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputsDeclarations=this.initialData.outputsDeclarations.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.inputsDeclarations.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputs.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.outputsDeclarations.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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===r.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=$9(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 Se(this.toJSON(),this.project)}};l(Se,"MUTABLE_BASE_PROPERTIES",["name","description","query"]),l(Se,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(Se,"BASE_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,...Se.INMUTABLE_BASE_PROPERTIES]),l(Se,"MUTABLE_META_PROPERTIES",[...Se.MUTABLE_BASE_PROPERTIES,"x","y"]),l(Se,"INMUTABLE_META_PROPERTIES",[...Se.INMUTABLE_BASE_PROPERTIES]),l(Se,"META_PROPERTIES",[...Se.MUTABLE_META_PROPERTIES,...Se.INMUTABLE_META_PROPERTIES]),l(Se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(Se,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(Se,"UPSTREAM_PROPERTIES",[...Se.MUTABLE_UPSTREAM_PROPERTIES,...Se.INMUTABLE_UPSTREAM_PROPERTIES]),l(Se,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","inputsDeclarations","inputs","outputsDeclarations","outputs","error"]),l(Se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Se,"DOWNSTREAM_PROPERTIES",[...Se.MUTABLE_DOWNSTREAM_PROPERTIES,...Se.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Se,"PROPERTIES",[...Ct.META_PROPERTIES,...Ct.UPSTREAM_PROPERTIES,...Ct.DOWNSTREAM_PROPERTIES]);let Tr=Se;function V9(n){const e=Ex(),t=n.toJSON();e.safeParse(t).success,n.functions.forEach(s=>s.validate()),n.events.forEach(s=>s.validate());const a=[];return X(n.errors,a)}const Te=class Te{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"type",r.InstalledProject);l(this,"implements");l(this,"functions",[]);l(this,"events",[]);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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:r.InstalledProject,description:e.description,functions:[],events:[],implements:{entityId:e.implements,entityType:r.Project,type:r.GenericReference,id:$.UUID.uuid()},x:0,y:0,parent:i},s=R(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(...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){return 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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(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:d}=s.remove({ignoreUpstream:!1,seenEntities:t});i.push(...o),a.push(...d)}),this.events.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!1,seenEntities:t});i.push(...o),a.push(...d)}),{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:r.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=V9(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 Te(this.toJSON(),this.project)}};l(Te,"MUTABLE_BASE_PROPERTIES",[]),l(Te,"INMUTABLE_BASE_PROPERTIES",["id","version","name","description","type"]),l(Te,"BASE_PROPERTIES",[...Te.MUTABLE_BASE_PROPERTIES,...Te.INMUTABLE_BASE_PROPERTIES]),l(Te,"MUTABLE_META_PROPERTIES",["x","y"]),l(Te,"INMUTABLE_META_PROPERTIES",[...Te.INMUTABLE_BASE_PROPERTIES]),l(Te,"META_PROPERTIES",[...Te.MUTABLE_META_PROPERTIES,...Te.INMUTABLE_META_PROPERTIES]),l(Te,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(Te,"INMUTABLE_UPSTREAM_PROPERTIES",["implements","parent"]),l(Te,"UPSTREAM_PROPERTIES",[...Te.MUTABLE_UPSTREAM_PROPERTIES,...Te.INMUTABLE_UPSTREAM_PROPERTIES]),l(Te,"MUTABLE_DOWNSTREAM_PROPERTIES",["functions","events"]),l(Te,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Te,"DOWNSTREAM_PROPERTIES",[...Te.MUTABLE_DOWNSTREAM_PROPERTIES,...Te.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Te,"PROPERTIES",[...Te.META_PROPERTIES,...Te.UPSTREAM_PROPERTIES,...Te.DOWNSTREAM_PROPERTIES]);let Er=Te;function L9(n){var d;const e=BU(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(p=>p.validate()),n.outputs.forEach(p=>p.validate()),(d=n.error)==null||d.validate();const a=En(n),s=G9(n),o=[...a,...s];return X(n.errors,o)}function G9(n){const e=[],t=Zs(n.parent),i=t==null?void 0:t.entity;if(!i)e.push(j({id:`${n.id}--${g.InternalCallParentMissingDataType}`,code:g.InternalCallParentMissingDataType,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) its id "${n.declaration}".`,issue:null,entity:n}).error);else if(![r.CustomEntity,r.BuiltInBaseEntity,r.PrimitiveEntity].includes(i.type))e.push(j({id:`${n.id}--${g.InternalCallParentDeclarationEntityInvalidType}`,code:g.InternalCallParentDeclarationEntityInvalidType,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type 'entity' is not a custom entity, built-in base entity or primitive entity.
|
|
76
|
+
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:n}).error);else{const a=Md(i),s=[];[r.CustomEntity,r.BuiltInBaseEntity,r.PrimitiveEntity].includes(i.type)&&s.push(...i.getAllInteractiveMethods());let o="";a?i.methods.length?o=`
|
|
77
77
|
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:
|
|
78
78
|
- ${i.methods.map(h=>h.id).join(`
|
|
79
79
|
- `)}
|
|
@@ -85,7 +85,7 @@ Built-in entity types can't have methods attached to them by the user. They are
|
|
|
85
85
|
This variable's data-type 'entity' is a custom entity which extends or implements a non-interactive 'built-in-base-entity'.s`:i.type===r.BuiltInBaseEntity&&(o=`
|
|
86
86
|
This variable's data-type 'entity' is a non-interactive 'built-in-base-entity'.s`);const d=s.find(p=>p.id===n.declaration.id);d?d.type!==r.FunctionDeclaration&&e.push(j({id:`${n.id}--${g.InternalCallDeclarationIsNotFunctionDeclaration}`,code:g.InternalCallDeclarationIsNotFunctionDeclaration,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", points to a 'declaration' that isn't a 'function-declaration' entity.
|
|
87
87
|
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:n}).error):e.push(j({id:`${n.id}--${g.InternalCallDeclarationNotFoundInParentDatatypeEntity}`,code:g.InternalCallDeclarationNotFoundInParentDatatypeEntity,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", belongs to a variable whose data type entity doesn't contain its declaration method (function-declaration) with id "${n.declaration}".${o}`,issue:null,entity:n}).error)}return e}const se=class se{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"index");l(this,"type",r.InternalCall);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"process",null);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"error",null);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"parent");l(this,"project");l(this,"errors",[]);l(this,"initialized",!1);l(this,"suggestion",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version}static fromGenerationTarget(e,t){const i=D(e.parent),a=t.get(i),s=D(e.declaration),o=t.get(s),d=e.calledByEntry.map(b=>{const I=D(b);return t.get(I)}),p=e.calledBySuccess.map(b=>{const I=D(b);return t.get(I)}),h=e.calledByError.map(b=>{const I=D(b);return t.get(I)}),T={id:e.id,version:1,type:r.InternalCall,index:a.internalCalls.length,declaration:o.toReference(),calledByEntry:d,calledBySuccess:p,calledByError:h,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,parent:a},f=R(T,t);return f.setParent(a),f.initChildren(),f}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:Ge}},t);i=s.modifiedData;const o=D(i.parent),d=t.get(o);if(d){const p=Zs(d),h=p==null?void 0:p.entity;if(!h)a.push(new E({id:`${i.id}--${g.InternalCallParentMissingDataType}`,code:g.InternalCallParentMissingDataType,severity:m.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(![r.CustomEntity,r.BuiltInBaseEntity,r.PrimitiveEntity].includes(h.type))a.push(new E({id:`${i.id}--${g.InternalCallParentDeclarationEntityInvalidType}`,code:g.InternalCallParentDeclarationEntityInvalidType,severity:m.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.
|
|
88
|
-
This variable's data-type has an 'entity' field that references an entity with id '${h.id}' and of type '${h.type}'.`,issue:null}));else{const T=
|
|
88
|
+
This variable's data-type has an 'entity' field that references an entity with id '${h.id}' and of type '${h.type}'.`,issue:null}));else{const T=Md(h);let f="";T?h.methods.length?f=`
|
|
89
89
|
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:
|
|
90
90
|
- ${h.methods.map(G=>G.id).join(`
|
|
91
91
|
- `)}
|
|
@@ -101,7 +101,7 @@ ${Gn}`);const b=i.declaration;if(!t.get(b))a.push(new E({id:`${i.id}--${y.Refere
|
|
|
101
101
|
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.${f}`,issue:null})):a.push(new E({id:`${i.id}--${g.InternalCallDeclarationNotFoundInParentDatatypeEntity}`,code:g.InternalCallDeclarationNotFoundInParentDatatypeEntity,severity:m.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}".${f}`,issue:null}))}}(d.inputs.length||d.outputs.length||d.internalCalls.length)&&a.push(new E({id:`${i.id}--${y.InvalidInternalCallParentRelation}`,code:y.InvalidInternalCallParentRelation,severity:m.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.
|
|
102
102
|
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.
|
|
103
103
|
The you can attach the new internal-call to it.`,issue:null}))}return a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
104
|
-
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 e;return this.parent.addInternalCall(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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!==r.GenericReference){const e=R(this.initialData.parent,this.project);this.setParent(e),this.parent.initChildren(),this.parent.addInternalCall(this);const t=this.calledBy.find(i=>!!i.parent&&st.includes(i.parent.type));if(t){const i=R(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=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=R(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||this.index,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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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:r.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=G9(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 se(this.toJSON(),this.project)}};l(se,"MUTABLE_BASE_PROPERTIES",[]),l(se,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(se,"BASE_PROPERTIES",[...se.MUTABLE_BASE_PROPERTIES,...se.INMUTABLE_BASE_PROPERTIES]),l(se,"MUTABLE_META_PROPERTIES",[...se.MUTABLE_BASE_PROPERTIES,"index"]),l(se,"INMUTABLE_META_PROPERTIES",[...se.INMUTABLE_BASE_PROPERTIES]),l(se,"META_PROPERTIES",[...se.MUTABLE_META_PROPERTIES,...se.INMUTABLE_META_PROPERTIES]),l(se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(se,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(se,"UPSTREAM_PROPERTIES",[...se.MUTABLE_UPSTREAM_PROPERTIES,...se.INMUTABLE_UPSTREAM_PROPERTIES]),l(se,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),l(se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(se,"DOWNSTREAM_PROPERTIES",[...se.MUTABLE_DOWNSTREAM_PROPERTIES,...se.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(se,"PROPERTIES",[...se.META_PROPERTIES,...se.UPSTREAM_PROPERTIES,...se.DOWNSTREAM_PROPERTIES]);let ci=se;function U9(n){const e=VU(),t=n.toJSON();e.safeParse(t).success;const a=[];if(n.id==="exec-sequentially-argument-map-id"){const s=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(s.error)}return X(n.errors,a)}const oe=class oe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"index");l(this,"name",null);l(this,"description",null);l(this,"declaration",null);l(this,"type",r.InputMap);l(this,"defaultValue",null);l(this,"readsValue",null);l(this,"dynamicArguments",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.declaration){const h=D(e.declaration);s=t.get(h)}let o=null;if(e.readsValue){const h=D(e.readsValue);o=t.get(h)}const d={id:e.id,version:1,name:e.name||null,type:r.InputMap,index:(a.inputs||a.dynamicArguments||[]).length,description:e.description||null,declaration:s,readsValue:o,dynamicArguments:[],defaultValue:null,parent:a},p=R(d,t);return p.setParent(a),p.initChildren(),p}static validateGenerationTarget(e,t){var h;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...we,r.InputMap]}},t);i=s.modifiedData;const o=t.get(i.parent),d=i.declaration&&(t.get(i.declaration)||t.getBuiltIn(i.declaration)),p=((o==null?void 0:o.inputs)||[]).find(T=>{var f;return i.declaration&&((f=T.declaration)==null?void 0:f.id)===i.declaration});if(i.declaration?d?[r.Property,r.ArgumentDeclaration,r.ValueDescriptor].includes(d.type)?o&&d.type===r.ArgumentDeclaration&&![r.FunctionCall,r.Search,r.InternalCall].includes(o.type)?a.push(new E({id:`${i.id}--${y.InvalidInputMapDeclaration}`,code:y.InvalidInputMapDeclaration,severity:m.Error,message:`Entity of type '${r.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${r.ArgumentDeclaration}' with id '${i.declaration}'.
|
|
104
|
+
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 e;return this.parent.addInternalCall(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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!==r.GenericReference){const e=R(this.initialData.parent,this.project);this.setParent(e),this.parent.initChildren(),this.parent.addInternalCall(this);const t=this.calledBy.find(i=>!!i.parent&&st.includes(i.parent.type));if(t){const i=R(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=R(this.initialData.declaration,this.project),this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.outputs=this.initialData.outputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this.initialData.process&&(this.process=R(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||this.index,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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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:r.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=L9(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 se(this.toJSON(),this.project)}};l(se,"MUTABLE_BASE_PROPERTIES",[]),l(se,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(se,"BASE_PROPERTIES",[...se.MUTABLE_BASE_PROPERTIES,...se.INMUTABLE_BASE_PROPERTIES]),l(se,"MUTABLE_META_PROPERTIES",[...se.MUTABLE_BASE_PROPERTIES,"index"]),l(se,"INMUTABLE_META_PROPERTIES",[...se.INMUTABLE_BASE_PROPERTIES]),l(se,"META_PROPERTIES",[...se.MUTABLE_META_PROPERTIES,...se.INMUTABLE_META_PROPERTIES]),l(se,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(se,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(se,"UPSTREAM_PROPERTIES",[...se.MUTABLE_UPSTREAM_PROPERTIES,...se.INMUTABLE_UPSTREAM_PROPERTIES]),l(se,"MUTABLE_DOWNSTREAM_PROPERTIES",["inputs","outputs","writesValues","successCalls","errorCalls","error"]),l(se,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(se,"DOWNSTREAM_PROPERTIES",[...se.MUTABLE_DOWNSTREAM_PROPERTIES,...se.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(se,"PROPERTIES",[...se.META_PROPERTIES,...se.UPSTREAM_PROPERTIES,...se.DOWNSTREAM_PROPERTIES]);let li=se;function F9(n){const e=NU(),t=n.toJSON();e.safeParse(t).success;const a=[];if(n.id==="exec-sequentially-argument-map-id"){const s=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(s.error)}return X(n.errors,a)}const oe=class oe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"index");l(this,"name",null);l(this,"description",null);l(this,"declaration",null);l(this,"type",r.InputMap);l(this,"defaultValue",null);l(this,"readsValue",null);l(this,"dynamicArguments",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s=null;if(e.declaration){const h=D(e.declaration);s=t.get(h)}let o=null;if(e.readsValue){const h=D(e.readsValue);o=t.get(h)}const d={id:e.id,version:1,name:e.name||null,type:r.InputMap,index:(a.inputs||a.dynamicArguments||[]).length,description:e.description||null,declaration:s,readsValue:o,dynamicArguments:[],defaultValue:null,parent:a},p=R(d,t);return p.setParent(a),p.initChildren(),p}static validateGenerationTarget(e,t){var h;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...we,r.InputMap]}},t);i=s.modifiedData;const o=t.get(i.parent),d=i.declaration&&(t.get(i.declaration)||t.getBuiltIn(i.declaration)),p=((o==null?void 0:o.inputs)||[]).find(T=>{var f;return i.declaration&&((f=T.declaration)==null?void 0:f.id)===i.declaration});if(i.declaration?d?[r.Property,r.ArgumentDeclaration,r.ValueDescriptor].includes(d.type)?o&&d.type===r.ArgumentDeclaration&&![r.FunctionCall,r.Search,r.InternalCall].includes(o.type)?a.push(new E({id:`${i.id}--${y.InvalidInputMapDeclaration}`,code:y.InvalidInputMapDeclaration,severity:m.Error,message:`Entity of type '${r.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${r.ArgumentDeclaration}' with id '${i.declaration}'.
|
|
105
105
|
The parent entity of type '${o.type}' with id '${o.id}' is not compatible with this type of declaration.
|
|
106
106
|
Only 'function-call', 'search' and 'internal-call' entities can have input-maps whose 'declaration' points to 'argument-declaration' entities.`,issue:null})):o&&d.type===r.Property&&!Ge.includes(o.type)?a.push(new E({id:`${i.id}--${y.InvalidInputMapDeclaration}`,code:y.InvalidInputMapDeclaration,severity:m.Error,message:`Entity of type '${r.InputMap}' with id '${i.id}' has a 'declaration' property pointing to an entity with type '${r.Property}' with id '${i.declaration}'.
|
|
107
107
|
The parent entity of type '${o.type}' with id '${o.id}' is not compatible with this type of declaration.
|
|
@@ -113,23 +113,23 @@ This is because a dynamically assembled object can have new properties added to
|
|
|
113
113
|
Only input-map entities for variables with an inferred data type are allowed to not have a declaration.
|
|
114
114
|
This is because a dynamically assembled object can have new properties added to it as input-maps. Otherwise all input maps need to point to a declaration`,issue:null})),d&&o){if(p)a.push(new E({id:`${i.id}--${y.InputOverwrite}`,code:y.InputOverwrite,severity:m.Error,message:`Entity of type '${r.InputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The parent already has an input-map with id '${p.id}' that points to the same base ${d.type} as declaration.
|
|
115
115
|
Any value reads can be done with that input-map instead.
|
|
116
|
-
You can't edit input-map entities as they need to match their argument declarations, so you can only modify the 'readsValue' property so it reads the value from an external entity, or the 'defaultValue' so it has a hard-coded one.`,issue:null}));else if(Ge.includes(o.type)){const b=
|
|
116
|
+
You can't edit input-map entities as they need to match their argument declarations, so you can only modify the 'readsValue' property so it reads the value from an external entity, or the 'defaultValue' so it has a hard-coded one.`,issue:null}));else if(Ge.includes(o.type)){const b=id(o).dataType,I=b==null?void 0:b.entity;I&&I.type===r.ActionDescriptor?a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.InputMap}' 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.
|
|
117
117
|
This means it can hold a function-call or operation as its value, to be executed programatically.
|
|
118
118
|
Input maps can only be added to variables which hold an entity with properties.`,issue:null})):I&&!(b!=null&&b.inferred)&&(I.properties.find(G=>G.id===d.id)||a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.InputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The 'declaration' with '${d.id}' of the 'input-map' does not exist in the entity of the 'data-type'.
|
|
119
|
-
The entity of the data-type has the following properties that can be reads as input maps, ids: '${N(I.properties.map(G=>G.id),"', '","' and '")}'`,issue:null})))}else if(we.filter(T=>Ge.includes(T)).includes(o.type)){const f=
|
|
119
|
+
The entity of the data-type has the following properties that can be reads as input maps, ids: '${N(I.properties.map(G=>G.id),"', '","' and '")}'`,issue:null})))}else if(we.filter(T=>Ge.includes(T)).includes(o.type)){const f=Od(o),b=f.find(B=>B.id===i.declaration),I=`The parent entity has the following argument declarations that can be referenced by input-maps, ids: '${N(f.map(B=>B.id),"', '","' and '")}'`;b||a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.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}'.
|
|
120
120
|
You can't add an input-map to an entity that doesn't have a matching 'argument-declaration'.
|
|
121
|
-
${I}`,issue:null}))}}return a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];let i=JSON.parse(JSON.stringify(e));const a=
|
|
122
|
-
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 e,t;
|
|
121
|
+
${I}`,issue:null}))}}return a.push(...s.errors,...Ae(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 E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
122
|
+
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 e,t;return this.parent.addInput(this),(e=this.readsValue)==null||e.addValueReader(this),Ge.includes(this.parent.type)&&((t=this.parent.getDataType())!=null&&t.inferred)&&(this.parent.type===r.VariableDeclaration?this.parent:this.parent.declaration).inferDataTypeAndSyncInstancesInputsAndOutputs(),this}setParent(e){return this.parent=e,this}setDeclaration(e){return this.declaration=e,this}removeInput(e){return this.dynamicArguments=this.dynamicArguments.filter(t=>t.id!==e.id),this}addInput(e){return this.dynamicArguments.includes(e)?this:this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.defaultValue&&(this.defaultValue=R(this.initialData.defaultValue,this.project),this.defaultValue.setParent(this),this.defaultValue.initChildren()),this.initialData.declaration&&(this.declaration=R(this.initialData.declaration,this.project)),la.initReadsValue(this),this.dynamicArguments=this.initialData.dynamicArguments.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),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||this.index,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),ha(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.dynamicArguments.forEach(s=>{i.push(s),s.remove({ignoreUpstream:!0,seenEntities:t})}),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.dynamicArguments.forEach(i=>{t.push(i),i.restore({seenEntities:e})}),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.dynamicArguments.flatMap(i=>i.toFlat(e)),...this.defaultValue?this.defaultValue.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.dynamicArguments.flatMap(i=>i.toFlatIds(e)),...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(),dynamicArguments:this.dynamicArguments.map(a=>a.toJSON())}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.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,dynamicArguments:this.dynamicArguments.map(a=>a.toReference()),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.dynamicArguments.flatMap(i=>i.toFlatJSON(e)),...this.defaultValue?this.defaultValue.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name||void 0,description:this.description||void 0,type:this.type,declaration:((e=this.declaration)==null?void 0:e.id)||null,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.dynamicArguments.flatMap(i=>i.toFlatGenerationTarget(e)),...this.defaultValue?this.defaultValue.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.dynamicArguments.forEach(t=>t.clearErrors()),(e=this.defaultValue)==null||e.clearErrors(),this}validate(){const e=F9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.dynamicArguments.flatMap(t=>t.getErrors())]}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){return new oe(this.toJSON(),this.project)}getDataType(){var e;return((e=this.declaration)==null?void 0:e.getDataType())||null}};l(oe,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(oe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(oe,"BASE_PROPERTIES",[...oe.MUTABLE_BASE_PROPERTIES,...oe.INMUTABLE_BASE_PROPERTIES]),l(oe,"MUTABLE_META_PROPERTIES",[...oe.MUTABLE_BASE_PROPERTIES,"index"]),l(oe,"INMUTABLE_META_PROPERTIES",[...oe.INMUTABLE_BASE_PROPERTIES]),l(oe,"META_PROPERTIES",[...oe.MUTABLE_META_PROPERTIES,...oe.INMUTABLE_META_PROPERTIES]),l(oe,"MUTABLE_UPSTREAM_PROPERTIES",["readsValue"]),l(oe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(oe,"UPSTREAM_PROPERTIES",[...oe.MUTABLE_UPSTREAM_PROPERTIES,...oe.INMUTABLE_UPSTREAM_PROPERTIES]),l(oe,"MUTABLE_DOWNSTREAM_PROPERTIES",["defaultValue","dynamicArguments"]),l(oe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(oe,"DOWNSTREAM_PROPERTIES",[...oe.MUTABLE_DOWNSTREAM_PROPERTIES,...oe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(oe,"PROPERTIES",[...oe.META_PROPERTIES,...oe.UPSTREAM_PROPERTIES,...oe.DOWNSTREAM_PROPERTIES]);let mn=oe;class U9 extends mn{constructor(t,i){super(t,i);l(this,"declaration",null);l(this,"parent");l(this,"errors",[])}toJSON(){return super.toJSON()}}class x9 extends mn{constructor(t,i){super(t,i);l(this,"name",null);l(this,"description",null);l(this,"declaration");l(this,"parent");l(this,"errors",[])}toJSON(){return super.toJSON()}}function j9(n){const e=TU(),t=n.toJSON();e.safeParse(t).success;const a=[];if(n.id==="exec-sequentially-return-map-id"){const s=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(s.error)}return X(n.errors,a)}const le=class le{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"index");l(this,"type",r.OutputMap);l(this,"parentRelationType");l(this,"declaration");l(this,"writesValues",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i);let s;if(e.declaration){const p=D(e.declaration);s=t.get(p)}const o={id:e.id,version:1,type:r.OutputMap,index:(a.outputs||[]).length,declaration:s,writesValues:[],parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){var d;let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:we.filter(p=>p!==r.Condition)},declaration:{list:!1,types:[r.ReturnDeclaration,r.Property]}},t);i=s.modifiedData;const o=t.get(i.parent);if(o&&we.filter(p=>p!==r.Condition).includes(o.type)){const p=o.outputs.find(h=>h.declaration.id===D(i.declaration));if(p)a.push(new E({id:`${i.id}--${y.OutputOverwrite}`,code:y.OutputOverwrite,severity:m.Error,message:`Entity of type '${r.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'.
|
|
123
123
|
Any value reads can be done with that output-map instead.
|
|
124
|
-
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 h=t.get(i.declaration);if(h&&Ge.includes(o.type)){const T=
|
|
124
|
+
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 h=t.get(i.declaration);if(h&&Ge.includes(o.type)){const T=id(o),f=T.dataType,b=(d=T.dataType)==null?void 0:d.entity;f?b?b.type===r.ActionDescriptor?a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.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.
|
|
125
125
|
This means it can hold a function-call or operation as its value, to be executed programatically.
|
|
126
126
|
Output maps can only be added to variables which hold an entity with properties.`,issue:null})):b.properties.find(B=>B.id===h.id)||a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.OutputMap}' with id '${i.id}' cannot be added to the parent entity of type '${o.type}' with id '${o.id}'. The 'declaration' with '${h.id}' of the 'output-map' does not exist in the entity of the 'data-type'.
|
|
127
127
|
The entity of the data-type has the following properties that can be reads as output maps, ids: '${N(b.properties.map(B=>B.id),"', '","' and '")}'`,issue:null})):a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.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' doesn't have an 'entity' set, so it cannot be determined if the output-map is reading a valid property of the data type entity.
|
|
128
|
-
${
|
|
129
|
-
${
|
|
128
|
+
${Rd}`,issue:null})):a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.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 not set, so it cannot be determined if the output-map is reading a valid property of the data type entity.
|
|
129
|
+
${Rd}`,issue:null}))}else if(h){const T=o.outputs.find(f=>f.declaration.id===i.declaration);T&&a.push(new E({id:`${i.id}--${y.OutputOverwrite}`,code:y.OutputOverwrite,severity:m.Error,message:`Entity of type '${r.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 '${T.id}' that points to the same declaration.
|
|
130
130
|
Any value reads can be done with that output-map instead.
|
|
131
131
|
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,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
132
|
-
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(){return this.parent.addOutput(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),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,
|
|
132
|
+
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(){return this.parent.addOutput(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),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,ca.initWritesValues(this,this.parent.parent),this.initialData.declaration&&(this.declaration=R(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||this.index,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}),{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)}),{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:r.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=j9(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 le(this.toJSON(),this.project)}getDataType(){return this.declaration.getDataType()||null}};l(le,"MUTABLE_BASE_PROPERTIES",[]),l(le,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(le,"BASE_PROPERTIES",[...le.MUTABLE_BASE_PROPERTIES,...le.INMUTABLE_BASE_PROPERTIES]),l(le,"MUTABLE_META_PROPERTIES",[...le.MUTABLE_BASE_PROPERTIES,"index"]),l(le,"INMUTABLE_META_PROPERTIES",[...le.INMUTABLE_BASE_PROPERTIES]),l(le,"META_PROPERTIES",[...le.MUTABLE_META_PROPERTIES,...le.INMUTABLE_META_PROPERTIES]),l(le,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(le,"INMUTABLE_UPSTREAM_PROPERTIES",["parent","declaration"]),l(le,"UPSTREAM_PROPERTIES",[...le.MUTABLE_UPSTREAM_PROPERTIES,...le.INMUTABLE_UPSTREAM_PROPERTIES]),l(le,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues"]),l(le,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(le,"DOWNSTREAM_PROPERTIES",[...le.MUTABLE_DOWNSTREAM_PROPERTIES,...le.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(le,"PROPERTIES",[...le.META_PROPERTIES,...le.UPSTREAM_PROPERTIES,...le.DOWNSTREAM_PROPERTIES]);let Tn=le;class k9 extends Tn{constructor(t,i){super(t,i);l(this,"declaration");l(this,"parent");l(this,"errors",[])}toJSON(){return super.toJSON()}}class q9 extends Tn{constructor(t,i){super(t,i);l(this,"declaration");l(this,"parent");l(this,"errors",[])}toJSON(){return super.toJSON()}}function J9(n){var s;const e=Yx(),t=n.toJSON();e.safeParse(t).success,(s=n.dataType)==null||s.validate();const a=[];if(n.id==="company-dto-func-declaration-argument-dcl-id"){const o=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(o.error)}if(n.id==="manual-hello-world-loop-current-iteration-number-output-map-id"){const o=j({id:`${n.id}--${O.PropertyImplementsNonAbstact}`,message:`Property "${A(n,n.project)}" with id "${n.id}" implements a non-abstract property "${A(n,n.project)}" with id "${n.id}".`,issue:null,severity:m.Error,code:O.PropertyImplementsNonAbstact,entity:n});a.push(o.error)}return X(n.errors,a)}const ce=class ce{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"index");l(this,"required");l(this,"type",r.ArgumentDeclaration);l(this,"dataType",null);l(this,"writesValues",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i),s={id:e.id,version:1,name:e.name,type:r.ArgumentDeclaration,index:a.inputs.length,description:e.description,required:e.required,dataType:null,writesValues:[],parent:a},o=R(s,t);return o.setParent(a),o.initChildren(),o}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.FunctionDeclaration,r.Search,r.Condition]}},t);i=s.modifiedData;const o=ud(i,t);if(i.parent){const d=t.get(D(i.parent));if(d&&Me.includes(d.type)){const p=d.implements;if(p)if(p.argumentsType===L.Fixed){const h=p.fixedArguments.find(G=>G.name===i.name),T=p.fixedArguments.filter(G=>!d.inputs.find(jt=>jt.type===r.ArgumentDeclaration&&jt.name===G.name)),f=d.inputs.filter(G=>G.type===r.ArgumentDeclaration),b=f.find(G=>G.name===i.name),I=f.length?`The parent entity already implements the following arguments: ${N(f.map(G=>`'${G.id}' (${G.name})`),", "," and ")}.`:"The parent entity does not yet have any implemented arguments.",B=T.length?`The parent entity is still missing the following arguments in the implementation: ${N(T.map(G=>`'${G.id}' (${G.name})`),", "," and ")}.`:"The parent entity has all the arguments it needs implemented.";h?b&&a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${d.type}' with id '${d.id}' that implements a ${r.ActionDescriptor} with fixed arguments.
|
|
133
133
|
Adding a new argument would make the implementation invalid. An argument with the same name already exists in the parent entity.
|
|
134
134
|
${I}
|
|
135
135
|
${B}`,issue:null})):a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${d.type}' with id '${d.id}' that implements a ${r.ActionDescriptor} with fixed arguments.
|
|
@@ -137,7 +137,7 @@ Adding a new argument would make the implementation invalid. There are no argume
|
|
|
137
137
|
${I}
|
|
138
138
|
${B}`,issue:null}))}else p.argumentsType===L.Dynamic||p.argumentsType===L.None&&a.push(new E({id:`${i.id}--${g.NoOverlapWithImplementedSignature}`,code:g.NoOverlapWithImplementedSignature,severity:m.Error,message:`Entity of type '${r.ArgumentDeclaration}' with id '${i.id}' should not exist in a parent entity of type '${d.type}' with id '${d.id}' that implements a ${r.ActionDescriptor} with no arguments.
|
|
139
139
|
Adding a new argument would make the implementation invalid.`,issue:null}))}}return a.push(...s.errors,...o,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
140
|
-
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(){return this.parent.addInputDeclaration(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),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=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),
|
|
140
|
+
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(){return this.parent.addInputDeclaration(this),this.writesValues.forEach(e=>{e.setValueWriter(this)}),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=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),ca.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||this.index,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:S(i),removed:S(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:S(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;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,writesValues:this.writesValues.map(t=>t.toJSON()),parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;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(t=>t.toReference()),dataType:((e=this.dataType)==null?void 0:e.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.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=J9(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){return new ce(this.toJSON(),this.project)}getDataType(){return this.dataType}setDataType(e){return this.dataType=e,this}removeDataType(){return this.dataType=null,this}};l(ce,"MUTABLE_BASE_PROPERTIES",["name","description","required"]),l(ce,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(ce,"BASE_PROPERTIES",[...ce.MUTABLE_BASE_PROPERTIES,...ce.INMUTABLE_BASE_PROPERTIES]),l(ce,"MUTABLE_META_PROPERTIES",[...ce.MUTABLE_BASE_PROPERTIES,"index"]),l(ce,"INMUTABLE_META_PROPERTIES",[...ce.INMUTABLE_BASE_PROPERTIES]),l(ce,"META_PROPERTIES",[...ce.MUTABLE_META_PROPERTIES,...ce.INMUTABLE_META_PROPERTIES]),l(ce,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(ce,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(ce,"UPSTREAM_PROPERTIES",[...ce.MUTABLE_UPSTREAM_PROPERTIES,...ce.INMUTABLE_UPSTREAM_PROPERTIES]),l(ce,"MUTABLE_DOWNSTREAM_PROPERTIES",["writesValues","dataType"]),l(ce,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ce,"DOWNSTREAM_PROPERTIES",[...ce.MUTABLE_DOWNSTREAM_PROPERTIES,...ce.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ce,"PROPERTIES",[...ce.META_PROPERTIES,...ce.UPSTREAM_PROPERTIES,...ce.DOWNSTREAM_PROPERTIES]);let Rr=ce;function W9(n){const e=Rc(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}function H9(n,e){const t=[];if(n.parent)if(n.parent){const i=e.get(n.parent);i?[r.InputMap,r.DataType].includes(i.type)?i.type===r.DataType&&i.defaultValue&&t.push(new E({id:`${n.id}--${n.parent}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a 'parent' of type 'data-type' which already has an existing default value entity with id "${i.defaultValue.id}".
|
|
141
141
|
Data types can only have one 'primitive-value' entity as 'defaultValue'.
|
|
142
142
|
You can update the existing 'primitive-value' with the 'update' action, for example, like so:
|
|
143
143
|
\`\`\`json
|
|
@@ -149,62 +149,62 @@ You can update the existing 'primitive-value' with the 'update' action, for exam
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}\`\`\`
|
|
152
|
-
Or 'delete' and then 'post' actions to replace it.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'input-map' or 'data-type'.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}" is missing a 'parent' reference. The 'parent' of a primitive value entity must be a reference to an entity of type 'input-map' or 'data-type'.`,issue:null}));else return t.push(new E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}" is missing a 'parent' reference. The 'parent' of a primitive value entity must be a reference to an entity of type 'input-map' or 'data-type'.`,issue:null})),t;if(n.valueAsType){const i=[],a=[],s=n.valueAsType;Array.isArray(s)?s.forEach(o=>{typeof o=="string"?a.push(o):i.push(o)}):typeof s=="string"?a.push(s):i.push(s),i.forEach(o=>{const d=to(o);t.push(...d),d.length===0&&a.push(o.entityId)}),a.forEach(o=>{const d=e.get(o);d?[r.CustomEntity,r.BuiltInBaseEntity].includes(d.type)||t.push(new E({id:`${n.id}--${o}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'valueAsType' reference that isn't pointing to an entity of type 'custom-entity', 'function-declaration' or 'operation'.`,issue:null})):t.push(new E({id:`${n.id}--${o}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${o}" 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 Ee=class Ee{constructor(e,t){l(this,"initialData");l(this,"type",r.PrimitiveValue);l(this,"id");l(this,"version");l(this,"name");l(this,"autogeneration",null);l(this,"value",null);l(this,"valueAsType",null);l(this,"errors",[]);l(this,"parent");l(this,"project");l(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.autogeneration=e.autogeneration,this.value=e.value}static fromGenerationTarget(e,t){const i=D(e.parent),a=t.get(i);let s=null;e.valueAsType&&(Array.isArray(e.valueAsType)?s=e.valueAsType.map(p=>t.get(p)||t.getBuiltIn(p)):s=t.get(e.valueAsType)||t.getBuiltIn(e.valueAsType));const o={id:e.id,version:1,type:r.PrimitiveValue,name:e.name,autogeneration:e.autogeneration,valueAsType:s,value:e.value||null,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=
|
|
153
|
-
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(){return this.parent.setDefaultValue(this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.valueAsType&&(Array.isArray(this.initialData.valueAsType)?this.valueAsType=this.initialData.valueAsType.map(e=>R(e,this.project)):this.valueAsType=R(this.initialData.valueAsType,this.project)),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.subscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.autogeneration=e.autogeneration||this.autogeneration,e.value!==void 0&&(this.value=e.value),this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),{affected:S(i),removed:S(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlat(e)):this.valueAsType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatIds(e)):this.valueAsType.toFlatIds(e):[]])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.toReference()):this.valueAsType.toReference():null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.toReference()):this.valueAsType.toReference():null,value:this.value,autogeneration:this.autogeneration,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatJSON(e)):this.valueAsType.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.id):this.valueAsType.id:null,value:this.value,autogeneration:this.autogeneration,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatGenerationTarget(e)):this.valueAsType.toFlatGenerationTarget(e):[]])}clearErrors(){return this.errors=[],this}validate(){const e=
|
|
152
|
+
Or 'delete' and then 'post' actions to replace it.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'input-map' or 'data-type'.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}" is missing a 'parent' reference. The 'parent' of a primitive value entity must be a reference to an entity of type 'input-map' or 'data-type'.`,issue:null}));else return t.push(new E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}" is missing a 'parent' reference. The 'parent' of a primitive value entity must be a reference to an entity of type 'input-map' or 'data-type'.`,issue:null})),t;if(n.valueAsType){const i=[],a=[],s=n.valueAsType;Array.isArray(s)?s.forEach(o=>{typeof o=="string"?a.push(o):i.push(o)}):typeof s=="string"?a.push(s):i.push(s),i.forEach(o=>{const d=to(o);t.push(...d),d.length===0&&a.push(o.entityId)}),a.forEach(o=>{const d=e.get(o);d?[r.CustomEntity,r.BuiltInBaseEntity].includes(d.type)||t.push(new E({id:`${n.id}--${o}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'valueAsType' reference that isn't pointing to an entity of type 'custom-entity', 'function-declaration' or 'operation'.`,issue:null})):t.push(new E({id:`${n.id}--${o}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${o}" 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 Ee=class Ee{constructor(e,t){l(this,"initialData");l(this,"type",r.PrimitiveValue);l(this,"id");l(this,"version");l(this,"name");l(this,"autogeneration",null);l(this,"value",null);l(this,"valueAsType",null);l(this,"errors",[]);l(this,"parent");l(this,"project");l(this,"initialized",!1);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,this.autogeneration=e.autogeneration,this.value=e.value}static fromGenerationTarget(e,t){const i=D(e.parent),a=t.get(i);let s=null;e.valueAsType&&(Array.isArray(e.valueAsType)?s=e.valueAsType.map(p=>t.get(p)||t.getBuiltIn(p)):s=t.get(e.valueAsType)||t.getBuiltIn(e.valueAsType));const o={id:e.id,version:1,type:r.PrimitiveValue,name:e.name,autogeneration:e.autogeneration,valueAsType:s,value:e.value||null,parent:a},d=R(o,t);return d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=H9(i,t);return a.push(...s,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
153
|
+
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(){return this.parent.setDefaultValue(this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.valueAsType&&(Array.isArray(this.initialData.valueAsType)?this.valueAsType=this.initialData.valueAsType.map(e=>R(e,this.project)):this.valueAsType=R(this.initialData.valueAsType,this.project)),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.subscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.autogeneration=e.autogeneration||this.autogeneration,e.value!==void 0&&(this.value=e.value),this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];return t.has(this.id)?{affected:[],removed:[]}:(t.add(this.id),a.push(this),this.unsubscribe(),{affected:S(i),removed:S(a)})}restore({seenEntities:e}={seenEntities:new Set}){const t=[];return e.has(this.id)?{affected:[],self:this}:(e.add(this.id),this.subscribe(),{affected:t,self:this})}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlat(e)):this.valueAsType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatIds(e)):this.valueAsType.toFlatIds(e):[]])}toJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.toReference()):this.valueAsType.toReference():null,parent:this.parent.toReference()}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){return{id:this.id,version:this.version,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.toReference()):this.valueAsType.toReference():null,value:this.value,autogeneration:this.autogeneration,parent:this.parent.toReference()}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatJSON(e)):this.valueAsType.toFlatJSON(e):[]])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,valueAsType:this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.map(e=>e.id):this.valueAsType.id:null,value:this.value,autogeneration:this.autogeneration,parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.valueAsType?Array.isArray(this.valueAsType)?this.valueAsType.flatMap(i=>i.toFlatGenerationTarget(e)):this.valueAsType.toFlatGenerationTarget(e):[]])}clearErrors(){return this.errors=[],this}validate(){const e=W9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors]}getShallowErrors(){return this.errors}clone(e=null,t=null,i=!0){const a=this.toJSON(),s=t||Xt(this.name,r.PrimitiveValue,this.project);a.id=s;const o=ma(a,this.project);return e&&o.setParent(e),i&&o.subscribe(),o}};l(Ee,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),l(Ee,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(Ee,"BASE_PROPERTIES",[...Ee.MUTABLE_BASE_PROPERTIES,...Ee.INMUTABLE_BASE_PROPERTIES]),l(Ee,"MUTABLE_META_PROPERTIES",[...Ee.MUTABLE_BASE_PROPERTIES]),l(Ee,"INMUTABLE_META_PROPERTIES",[...Ee.INMUTABLE_BASE_PROPERTIES]),l(Ee,"META_PROPERTIES",[...Ee.MUTABLE_META_PROPERTIES,...Ee.INMUTABLE_META_PROPERTIES]),l(Ee,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(Ee,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(Ee,"UPSTREAM_PROPERTIES",[...Ee.MUTABLE_UPSTREAM_PROPERTIES,...Ee.INMUTABLE_UPSTREAM_PROPERTIES]),l(Ee,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsType"]),l(Ee,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Ee,"DOWNSTREAM_PROPERTIES",[...Ee.MUTABLE_DOWNSTREAM_PROPERTIES,...Ee.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Ee,"PROPERTIES",[...Ee.META_PROPERTIES,...Ee.UPSTREAM_PROPERTIES,...Ee.DOWNSTREAM_PROPERTIES]);let ci=Ee;function Y9(n){var s;const e=tU(),t=n.toJSON();e.safeParse(t).success,n.outputs.forEach(o=>o.validate()),(s=n.throws)==null||s.validate();const a=[];return X(n.errors,a)}function z9(n){var s;const e=X4(),t=n.toJSON();e.safeParse(t).success,n.outputs.forEach(o=>o.validate()),(s=n.throws)==null||s.validate();const a=[];return X(n.errors,a)}const Re=class Re{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.ContinueStatement);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"throws",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i),s=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),o=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),d=e.calledByError.map(T=>{const f=D(T);return t.get(f)}),p={id:e.id,version:1,type:r.ContinueStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:d,calledByEntry:s,throws:null,parent:a},h=R(p,t);return h.setParent(a),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.Loop]}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
154
154
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
155
155
|
You shouldn't have to manually update a 'parent' property.
|
|
156
|
-
Specifically for continue statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addContinueStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeContinueStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addContinueStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e)),...this.throws?this.throws.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),throws:((e=this.throws)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(t=>t.toReference()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.calledBy.flatMap(a=>a.toFlatJSON(e)),...((i=this.throws)==null?void 0:i.toFlatJSON(e))||[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.throws?this.throws.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.outputs.forEach(t=>t.clearErrors()),(e=this.throws)==null||e.clearErrors(),this}validate(){const e=
|
|
156
|
+
Specifically for continue statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addContinueStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.throws){const{affected:s,removed:o}=this.throws.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return this.parent.removeContinueStatement(this),e||this.calledBy.forEach(s=>{i.push(s),s.removeCall(this)}),{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.outputs.forEach(i=>{const{affected:a}=i.restore({seenEntities:e});t.push(...a)}),this.throws){const{affected:i}=this.throws.restore({seenEntities:e});t.push(...i)}return this.parent.addContinueStatement(this),this.calledBySuccess.forEach(i=>{t.push(i),i.addSuccessCall(this)}),this.calledByError.forEach(i=>{t.push(i),i.addErrorCall(this)}),this.calledByEntry.forEach(i=>{t.push(i),i.addCall(this)}),{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.outputs.flatMap(i=>i.toFlat(e)),...this.calledBy.flatMap(i=>i.toFlat(e)),...this.throws?this.throws.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.outputs.flatMap(i=>i.toFlatIds(e)),...this.calledBy.flatMap(i=>i.toFlatIds(e)),...this.throws?this.throws.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,calledBySuccess:this.calledBySuccess.map(i=>i.toReference()),calledByError:this.calledByError.map(i=>i.toReference()),calledByEntry:this.calledByEntry.map(i=>i.toReference()),outputs:this.outputs.map(i=>i.toJSON()),throws:((e=this.throws)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e;return{id:this.id,version:this.version,type:this.type,x:this.x,y:this.y,outputs:this.outputs.map(t=>t.toReference()),calledBySuccess:this.calledBySuccess.map(t=>t.toReference()),calledByError:this.calledByError.map(t=>t.toReference()),calledByEntry:this.calledByEntry.map(t=>t.toReference()),throws:((e=this.throws)==null?void 0:e.toReference())||null,parent:this.parent.toReference()}}toFlatJSON(e=new Set){var i;return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.outputs.flatMap(a=>a.toFlatJSON(e)),...this.calledBy.flatMap(a=>a.toFlatJSON(e)),...((i=this.throws)==null?void 0:i.toFlatJSON(e))||[]])}toGenerationTarget(){return{id:this.id,type:this.type,calledByEntry:this.calledByEntry.map(e=>e.id),calledByError:this.calledByError.map(e=>e.id),calledBySuccess:this.calledBySuccess.map(e=>e.id),parent:this.parent.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.outputs.flatMap(i=>i.toFlatGenerationTarget(e)),...this.throws?this.throws.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],this.outputs.forEach(t=>t.clearErrors()),(e=this.throws)==null||e.clearErrors(),this}validate(){const e=z9(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 Re(this.toJSON(),this.project)}};l(Re,"MUTABLE_BASE_PROPERTIES",[]),l(Re,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(Re,"BASE_PROPERTIES",[...Re.MUTABLE_BASE_PROPERTIES,...Re.INMUTABLE_BASE_PROPERTIES]),l(Re,"MUTABLE_META_PROPERTIES",["x","y"]),l(Re,"INMUTABLE_META_PROPERTIES",[...Re.INMUTABLE_BASE_PROPERTIES]),l(Re,"META_PROPERTIES",[...Re.MUTABLE_META_PROPERTIES,...Re.INMUTABLE_META_PROPERTIES]),l(Re,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),l(Re,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(Re,"UPSTREAM_PROPERTIES",[...Re.MUTABLE_UPSTREAM_PROPERTIES,...Re.INMUTABLE_UPSTREAM_PROPERTIES]),l(Re,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),l(Re,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Re,"DOWNSTREAM_PROPERTIES",[...Re.MUTABLE_DOWNSTREAM_PROPERTIES,...Re.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Re,"PROPERTIES",[...Re.META_PROPERTIES,...Re.UPSTREAM_PROPERTIES,...Re.DOWNSTREAM_PROPERTIES]);let yt=Re;const it=class it{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.ReturnStatement);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"throws",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i),s=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),o=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),d=e.calledByError.map(T=>{const f=D(T);return t.get(f)}),p={id:e.id,version:1,type:r.ReturnStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:d,calledByEntry:s,throws:null,parent:a},h=R(p,t);return h.setParent(a),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:st}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
157
157
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
158
158
|
You shouldn't have to manually update a 'parent' property.
|
|
159
|
-
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(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addReturnStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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=
|
|
159
|
+
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(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addReturnStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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=Y9(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 it(this.toJSON(),this.project)}};l(it,"MUTABLE_BASE_PROPERTIES",[]),l(it,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(it,"BASE_PROPERTIES",[...yt.MUTABLE_BASE_PROPERTIES,...yt.INMUTABLE_BASE_PROPERTIES]),l(it,"MUTABLE_META_PROPERTIES",["x","y"]),l(it,"INMUTABLE_META_PROPERTIES",[...yt.INMUTABLE_BASE_PROPERTIES]),l(it,"META_PROPERTIES",[...yt.MUTABLE_META_PROPERTIES,...yt.INMUTABLE_META_PROPERTIES]),l(it,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),l(it,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(it,"UPSTREAM_PROPERTIES",[...yt.MUTABLE_UPSTREAM_PROPERTIES,...yt.INMUTABLE_UPSTREAM_PROPERTIES]),l(it,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),l(it,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(it,"DOWNSTREAM_PROPERTIES",[...yt.MUTABLE_DOWNSTREAM_PROPERTIES,...yt.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(it,"PROPERTIES",[...Ct.META_PROPERTIES,...Ct.UPSTREAM_PROPERTIES,...Ct.DOWNSTREAM_PROPERTIES]);let br=it;function Z9(n){var s;const e=yU(),t=n.toJSON();e.safeParse(t).success,n.outputs.forEach(o=>o.validate()),(s=n.throws)==null||s.validate();const a=[];return X(n.errors,a)}const be=class be{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.BreakStatement);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"throws",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(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=D(e.parent),a=t.get(i),s=e.calledByEntry.map(T=>{const f=D(T);return t.get(f)}),o=e.calledBySuccess.map(T=>{const f=D(T);return t.get(f)}),d=e.calledByError.map(T=>{const f=D(T);return t.get(f)}),p={id:e.id,version:1,type:r.BreakStatement,x:0,y:0,outputs:[],calledBySuccess:o,calledByError:d,calledByEntry:s,throws:null,parent:a},h=R(p,t);return h.setParent(a),h.initChildren(),h}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.Loop]}},t);return i=s.modifiedData,a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
160
160
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
161
161
|
You shouldn't have to manually update a 'parent' property.
|
|
162
|
-
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addBreakStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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=
|
|
162
|
+
Specifically for break statements the parent needs to always be the 'loop' entity that contains it.`,issue:null})),{errors:t,modifiedData:e}}addSelfToProject(){return this.calledByEntry.forEach(e=>{e.addCall(this)}),this.calledBySuccess.forEach(e=>{e.addSuccessCall(this)}),this.calledByError.forEach(e=>{e.addErrorCall(this)}),this.parent.addBreakStatement(this),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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.throws&&(this.throws=R(this.initialData.throws,this.project),this.throws.setParent(this),this.throws.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}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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),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:S(i),removed:S(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:S(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:r.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=Z9(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 be(this.toJSON(),this.project)}};l(be,"MUTABLE_BASE_PROPERTIES",[]),l(be,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(be,"BASE_PROPERTIES",[...be.MUTABLE_BASE_PROPERTIES,...be.INMUTABLE_BASE_PROPERTIES]),l(be,"MUTABLE_META_PROPERTIES",["x","y"]),l(be,"INMUTABLE_META_PROPERTIES",[...be.INMUTABLE_BASE_PROPERTIES]),l(be,"META_PROPERTIES",[...be.MUTABLE_META_PROPERTIES,...be.INMUTABLE_META_PROPERTIES]),l(be,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry","parent"]),l(be,"INMUTABLE_UPSTREAM_PROPERTIES",[]),l(be,"UPSTREAM_PROPERTIES",[...be.MUTABLE_UPSTREAM_PROPERTIES,...be.INMUTABLE_UPSTREAM_PROPERTIES]),l(be,"MUTABLE_DOWNSTREAM_PROPERTIES",["outputs","throws"]),l(be,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(be,"DOWNSTREAM_PROPERTIES",[...be.MUTABLE_DOWNSTREAM_PROPERTIES,...be.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(be,"PROPERTIES",[...be.META_PROPERTIES,...be.UPSTREAM_PROPERTIES,...be.DOWNSTREAM_PROPERTIES]);let di=be;function X9(n){var s,o;const e=vb(),t=n.toJSON();e.safeParse(t).success,n.fixedArguments.flatMap(d=>d.validate()),n.fixedReturns.flatMap(d=>d.validate()),(s=n.dynamicArgumentTypes)==null||s.validate(),(o=n.dynamicReturnTypes)==null||o.validate();const a=[];return X(n.errors,a)}const de=class de{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"argumentsType");l(this,"returnsType");l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"implementation",null);l(this,"parent",null);l(this,"errors",[]);l(this,"project");l(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.argumentsType=e.argumentsType,this.returnsType=e.returnsType}static fromGenerationTarget(e,t){let i=null;if(e.parent){const o=D(e.parent);i=t.get(o)}const a={id:e.id,version:1,name:e.name,type:r.ActionDescriptor,description:e.description,dynamicArgumentTypes:null,dynamicReturnTypes:null,argumentsType:e.argumentsType,returnsType:e.returnsType,fixedArguments:[],fixedReturns:[],error:null,parent:i},s=R(a,t);return i&&s.setParent(i),s.initChildren(),s}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.CustomEntity,r.DataType]}},t);i=s.modifiedData;const o=i.parent?t.get(i.parent):null;if(o&&o.type===r.CustomEntity){const d=o,h=Un(d).filter(T=>!T.interactive);if(h.length){let T=h.length>1?`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${d.id}' because it extends or implements multiple '${r.BuiltInBaseEntity}' entities that are non-interactive ("${N(h.map(f=>A(f,f.project)),'", "','" and "')}").`:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${d.id}' because it extends or implements a '${r.BuiltInBaseEntity}' entity that is non-interactive ("${A(h[0],h[0].project)}").`;T+=`
|
|
163
163
|
${Gn}`,a.push(new E({id:`${e.id}--${y.NonInteractiveEntityReferenced}`,code:y.NonInteractiveEntityReferenced,severity:m.Error,message:T,issue:null}))}}else if(o&&o.type===r.DataType){const d=o;d.entity&&a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.Error,message:`The entity of type '${e.type}' with id '${e.id}' can't be added to the 'parent' entity with id '${d.id}' because it already has an 'entity' child. Data type entities can only have one 'entity' as children.
|
|
164
164
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
165
165
|
${Qt({describe_entity:d.entity.id})}
|
|
166
166
|
Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return a.push(...s.errors,...Ae(i)),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
167
|
-
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(){return this.parent?(this.parent.type===r.CustomEntity?this.parent.addAbstractMethod(this):this.parent.type===r.DataType&&this.parent.setEntity(this),this):this}setParent(e){return this.parent=e,this}setDynamicReturnTypes(e){return this.dynamicReturnTypes=e,this}setDynamicArgumentTypes(e){return this.dynamicArgumentTypes=e,this}removeDynamicArgumentTypes(){return this.dynamicArgumentTypes=null,this}removeDynamicReturnTypes(){return this.dynamicReturnTypes=null,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.fixedArguments=this.initialData.fixedArguments.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.fixedReturns=this.initialData.fixedReturns.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.dynamicArgumentTypes&&(this.dynamicArgumentTypes=R(this.initialData.dynamicArgumentTypes,this.project),this.dynamicArgumentTypes.setParent(this),this.dynamicArgumentTypes.initChildren()),this.initialData.dynamicReturnTypes&&(this.dynamicReturnTypes=R(this.initialData.dynamicReturnTypes,this.project),this.dynamicReturnTypes.setParent(this),this.dynamicReturnTypes.initChildren()),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.argumentsType=e.argumentsType||this.argumentsType,this.returnsType=e.returnsType||this.returnsType,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.fixedArguments.forEach(s=>{const o=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o.affected),a.push(...o.removed)}),this.fixedReturns.forEach(s=>{const o=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o.affected),a.push(...o.removed)}),this.dynamicArgumentTypes){const s=this.dynamicArgumentTypes.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}if(this.dynamicReturnTypes){const s=this.dynamicReturnTypes.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}if(this.error){const s=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}return{affected:S(i),removed:S(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.fixedArguments.forEach(i=>{const a=i.restore({seenEntities:e});t.push(...a.affected)}),this.fixedReturns.forEach(i=>{const a=i.restore({seenEntities:e});t.push(...a.affected)}),this.dynamicArgumentTypes){const i=this.dynamicArgumentTypes.restore({seenEntities:e});t.push(...i.affected)}if(this.dynamicReturnTypes){const i=this.dynamicReturnTypes.restore({seenEntities:e});t.push(...i.affected)}if(this.error){const i=this.error.restore({seenEntities:e});t.push(...i.affected)}return{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.fixedArguments.flatMap(i=>i.toFlat(e)),...this.fixedReturns.flatMap(i=>i.toFlat(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlat(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.fixedArguments.flatMap(i=>i.toFlatIds(e)),...this.fixedReturns.flatMap(i=>i.toFlatIds(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatIds(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatIds(e):[]])}toJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,argumentsType:this.argumentsType,returnsType:this.returnsType,error:((e=this.error)==null?void 0:e.toJSON())||null,fixedArguments:this.fixedArguments.map(s=>s.toJSON()),fixedReturns:this.fixedReturns.map(s=>s.toJSON()),dynamicArgumentTypes:((t=this.dynamicArgumentTypes)==null?void 0:t.toJSON())||null,dynamicReturnTypes:((i=this.dynamicReturnTypes)==null?void 0:i.toJSON())||null,parent:((a=this.parent)==null?void 0:a.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,argumentsType:this.argumentsType,returnsType:this.returnsType,error:((e=this.error)==null?void 0:e.toReference())||null,fixedArguments:this.fixedArguments.map(s=>s.toReference()),fixedReturns:this.fixedReturns.map(s=>s.toReference()),dynamicArgumentTypes:((t=this.dynamicArgumentTypes)==null?void 0:t.toReference())||null,dynamicReturnTypes:((i=this.dynamicReturnTypes)==null?void 0:i.toReference())||null,parent:((a=this.parent)==null?void 0:a.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.fixedArguments.flatMap(i=>i.toFlatJSON(e)),...this.fixedReturns.flatMap(i=>i.toFlatJSON(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatJSON(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,argumentsType:this.argumentsType,returnsType:this.returnsType,parent:((e=this.parent)==null?void 0:e.id)||void 0}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.fixedArguments.flatMap(i=>i.toFlatGenerationTarget(e)),...this.fixedReturns.flatMap(i=>i.toFlatGenerationTarget(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatGenerationTarget(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatGenerationTarget(e):[]])}implementAsFunctionDeclaration(e){var s;const t=this.fixedArguments.map((o,d)=>{var h;const p={id:e+"--"+o.id+"--parent-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e};return{id:e+"--"+o.id,version:o.version,type:r.ArgumentDeclaration,name:o.name,required:o.required,writesValues:[],description:o.description,index:d,dataType:((h=o.dataType)==null?void 0:h.toJSON())||null,parent:p}}),i=[],a=[];if(this.fixedReturns.length){const o=this.fixedReturns.map((T,f)=>{var I;const b={id:e+"--return-statement--"+T.id+"--parent-ref",type:r.GenericReference,entityId:e,entityType:r.ReturnStatement};return{id:e+"--"+T.id,version:T.version,type:r.ReturnDeclaration,name:T.name,description:T.description,readsValue:null,required:T.required,isError:!1,index:f,dataType:((I=T.dataType)==null?void 0:I.toJSON())||null,parent:b}}),d={id:e+"--return-statement-parent-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e},p={id:e+"--return-statement-called-by-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e},h={id:e+"--return-statement",version:this.version,type:r.ReturnStatement,outputs:o,throws:null,calledBySuccess:[],calledByError:[],calledByEntry:[p],parent:d,x:0,y:0};i.push(h),a.push(h)}return{id:e,version:this.version,type:r.FunctionDeclaration,name:this.name,description:this.description,inputs:t,returnStatements:i,calls:a,collapsed:!1,private:!1,implements:this.toJSON(),index:0,parent:((s=this.parent)==null?void 0:s.toReference())||null,x:0,y:0}}implementAsLoop(e){const t=e||this.project,i=this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),a={id:i,version:this.version,type:r.Loop,declaration:this.toJSON(),inputs:[],outputs:[],error:null,process:null,successCalls:[],errorCalls:[],calledByEntry:[],calledByError:[],calledBySuccess:[],breakStatements:[],continueStatements:[],body:null,x:0,y:0,parent:t.toReference()};this.fixedArguments.forEach((d,p)=>{const T={id:d.toReference().id+"--input-map-id",version:this.version,type:r.InputMap,name:null,description:null,declaration:d,defaultValue:null,readsValue:null,index:p,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};a.inputs.push(T)}),this.fixedReturns.forEach((d,p)=>{const T={id:d.toReference().id+"--output-map-id",version:this.version,type:r.OutputMap,declaration:d,writesValues:[],index:p,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};a.outputs.push(T)});const s={id:i+"--body-function-declaration-id",version:this.version,type:r.FunctionDeclaration,name:"body",description:null,inputs:[],returnStatements:[],calls:[],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};s.inputs=[{id:$.UUID.uuid(),version:this.version,type:r.ArgumentDeclaration,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",dataType:null,required:!0,writesValues:[],index:0,parent:{id:s.id,type:r.GenericReference,entityId:s.id,entityType:r.FunctionDeclaration}},{id:$.UUID.uuid(),version:this.version,type:r.ArgumentDeclaration,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",dataType:null,required:!0,writesValues:[],index:1,parent:{id:s.id,type:r.GenericReference,entityId:s.id,entityType:r.FunctionDeclaration}}],a.body=s;const o=R(a,this.project);return o.setParent(t),o.initChildren(),o}implementAsOperation(e,t){const i=e||this.project,a=t||this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),s={id:a,version:this.version,type:r.Operation,declaration:this.toJSON(),inputs:[],outputs:[],error:null,successCalls:[],errorCalls:[],process:null,dynamicArguments:[],calledByEntry:[],calledByError:[],calledBySuccess:[],x:0,y:0,parent:i.toReference()};if(this.fixedArguments.forEach((d,p)=>{const h={id:a+Xt(d.name,r.InputMap,this.project),version:this.version,type:r.InputMap,name:null,description:null,declaration:d,defaultValue:null,readsValue:null,index:p,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.inputs.push(h)}),this.fixedReturns.forEach((d,p)=>{const h={id:a+Xt(d.name,r.OutputMap,this.project),version:this.version,type:r.OutputMap,declaration:d,writesValues:[],index:p,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.outputs.push(h)}),this.error){const p={id:this.error.toReference().id+"--error-map",version:this.version,type:r.OutputMap,declaration:this.error,writesValues:[],index:-1,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.error=p}const o=R(s,this.project);return o.setParent(i),o.initChildren(),o}implementAsCondition(e){const t=e||this.project,i=this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),a={id:i,version:this.version,type:r.Condition,declaration:this.toJSON(),operator:null,inputs:[],successCalls:[],errorCalls:[],calledByEntry:[],calledByError:[],calledBySuccess:[],x:0,y:0,parent:t.toReference()};this.fixedArguments.forEach((o,d)=>{const p={id:i+Xt(o.name,r.InputMap,this.project),version:this.version,type:r.InputMap,name:null,description:null,declaration:o,defaultValue:null,readsValue:null,index:d,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Condition}};a.inputs.push(p)});const s=R(a,this.project);return s.setParent(t),s.initChildren(),s}clearErrors(){var e,t,i;return this.errors=[],this.fixedArguments.forEach(a=>a.clearErrors()),this.fixedReturns.forEach(a=>a.clearErrors()),(e=this.dynamicArgumentTypes)==null||e.clearErrors(),(t=this.dynamicReturnTypes)==null||t.clearErrors(),(i=this.error)==null||i.clearErrors(),this}validate(){const e=Q9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.fixedArguments.flatMap(t=>t.getErrors()),...this.fixedReturns.flatMap(t=>t.getErrors()),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.getErrors():[],...this.dynamicReturnTypes?this.dynamicReturnTypes.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new de(this.toJSON(),this.project)}setDynamicArgumentsDataType(e){return this.dynamicArgumentTypes=e,this}setDynamicReturnsDataType(e){return this.dynamicReturnTypes=e,this}addFixedArgument(e){return this.fixedArguments.find(t=>t.id===e.id)||this.fixedArguments.push(e),this}removeFixedArgument(e){return this.fixedArguments=this.fixedArguments.filter(t=>t.id!==e.id),this}addFixedReturn(e){return this.fixedReturns.find(t=>t.id===e.id)||this.fixedReturns.push(e),this}removeFixedReturn(e){return this.fixedReturns=this.fixedReturns.filter(t=>t.id!==e.id),this}};l(de,"MUTABLE_BASE_PROPERTIES",["name","description","argumentsType","returnsType"]),l(de,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(de,"BASE_PROPERTIES",[...de.MUTABLE_BASE_PROPERTIES,...de.INMUTABLE_BASE_PROPERTIES]),l(de,"MUTABLE_META_PROPERTIES",[...de.MUTABLE_BASE_PROPERTIES]),l(de,"INMUTABLE_META_PROPERTIES",[...de.INMUTABLE_BASE_PROPERTIES]),l(de,"META_PROPERTIES",[...de.MUTABLE_META_PROPERTIES,...de.INMUTABLE_META_PROPERTIES]),l(de,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(de,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(de,"UPSTREAM_PROPERTIES",[...de.MUTABLE_UPSTREAM_PROPERTIES,...de.INMUTABLE_UPSTREAM_PROPERTIES]),l(de,"MUTABLE_DOWNSTREAM_PROPERTIES",["dynamicArgumentTypes","dynamicReturnTypes","fixedArguments","fixedReturns"]),l(de,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(de,"DOWNSTREAM_PROPERTIES",[...de.MUTABLE_DOWNSTREAM_PROPERTIES,...de.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(de,"PROPERTIES",[...de.META_PROPERTIES,...de.UPSTREAM_PROPERTIES,...de.DOWNSTREAM_PROPERTIES]);let $e=de;function K9(n){var s;const e=C4(),t=n.toJSON();e.safeParse(t).success,(s=n.dataType)==null||s.validate();const a=[];return X(n.errors,a)}const ue=class ue{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"index");l(this,"required");l(this,"parentRelationType");l(this,"type",r.ValueDescriptor);l(this,"dataType",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(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.index=e.index,this.required=e.required,this.parentRelationType=e.parentRelationType}static fromGenerationTarget(e,t){const i=e.parent?D(e.parent):null,a=i?t.get(i):null,s=e.parentRelationType===C.FixedArguments?a==null?void 0:a.fixedArguments.length:a==null?void 0:a.fixedReturns.length,o={id:e.id,version:1,name:e.name,type:r.ValueDescriptor,index:s||0,description:e.description,required:e.required,parentRelationType:e.parentRelationType,dataType:null,parent:a},d=R(o,t);return a&&d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.ActionDescriptor]}},t);i=s.modifiedData,a.push(...s.errors,...Ae(i));const o=i.parent&&t.get(i.parent),d=o&&Pr(o);return d&&d.type===r.ActionDescriptor&&a.push(new E({id:`${e.id}--${y.BuiltInEntityParent}`,code:y.BuiltInEntityParent,severity:m.Error,message:`Entity of type "${e.type}" with id "${e.id}", has a parent that is a built-in entity "${d.name}" of type '${d.type}' with id '${d.id}'.
|
|
167
|
+
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(){return this.parent?(this.parent.type===r.CustomEntity?this.parent.addAbstractMethod(this):this.parent.type===r.DataType&&this.parent.setEntity(this),this):this}setParent(e){return this.parent=e,this}setDynamicReturnTypes(e){return this.dynamicReturnTypes=e,this}setDynamicArgumentTypes(e){return this.dynamicArgumentTypes=e,this}removeDynamicArgumentTypes(){return this.dynamicArgumentTypes=null,this}removeDynamicReturnTypes(){return this.dynamicReturnTypes=null,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.fixedArguments=this.initialData.fixedArguments.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.fixedReturns=this.initialData.fixedReturns.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initialData.dynamicArgumentTypes&&(this.dynamicArgumentTypes=R(this.initialData.dynamicArgumentTypes,this.project),this.dynamicArgumentTypes.setParent(this),this.dynamicArgumentTypes.initChildren()),this.initialData.dynamicReturnTypes&&(this.dynamicReturnTypes=R(this.initialData.dynamicReturnTypes,this.project),this.dynamicReturnTypes.setParent(this),this.dynamicReturnTypes.initChildren()),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.argumentsType=e.argumentsType||this.argumentsType,this.returnsType=e.returnsType||this.returnsType,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.fixedArguments.forEach(s=>{const o=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o.affected),a.push(...o.removed)}),this.fixedReturns.forEach(s=>{const o=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o.affected),a.push(...o.removed)}),this.dynamicArgumentTypes){const s=this.dynamicArgumentTypes.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}if(this.dynamicReturnTypes){const s=this.dynamicReturnTypes.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}if(this.error){const s=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s.affected),a.push(...s.removed)}return{affected:S(i),removed:S(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.fixedArguments.forEach(i=>{const a=i.restore({seenEntities:e});t.push(...a.affected)}),this.fixedReturns.forEach(i=>{const a=i.restore({seenEntities:e});t.push(...a.affected)}),this.dynamicArgumentTypes){const i=this.dynamicArgumentTypes.restore({seenEntities:e});t.push(...i.affected)}if(this.dynamicReturnTypes){const i=this.dynamicReturnTypes.restore({seenEntities:e});t.push(...i.affected)}if(this.error){const i=this.error.restore({seenEntities:e});t.push(...i.affected)}return{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[...this.fixedArguments.flatMap(i=>i.toFlat(e)),...this.fixedReturns.flatMap(i=>i.toFlat(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlat(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.fixedArguments.flatMap(i=>i.toFlatIds(e)),...this.fixedReturns.flatMap(i=>i.toFlatIds(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatIds(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatIds(e):[]])}toJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,argumentsType:this.argumentsType,returnsType:this.returnsType,error:((e=this.error)==null?void 0:e.toJSON())||null,fixedArguments:this.fixedArguments.map(s=>s.toJSON()),fixedReturns:this.fixedReturns.map(s=>s.toJSON()),dynamicArgumentTypes:((t=this.dynamicArgumentTypes)==null?void 0:t.toJSON())||null,dynamicReturnTypes:((i=this.dynamicReturnTypes)==null?void 0:i.toJSON())||null,parent:((a=this.parent)==null?void 0:a.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t,i,a;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,argumentsType:this.argumentsType,returnsType:this.returnsType,error:((e=this.error)==null?void 0:e.toReference())||null,fixedArguments:this.fixedArguments.map(s=>s.toReference()),fixedReturns:this.fixedReturns.map(s=>s.toReference()),dynamicArgumentTypes:((t=this.dynamicArgumentTypes)==null?void 0:t.toReference())||null,dynamicReturnTypes:((i=this.dynamicReturnTypes)==null?void 0:i.toReference())||null,parent:((a=this.parent)==null?void 0:a.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.fixedArguments.flatMap(i=>i.toFlatJSON(e)),...this.fixedReturns.flatMap(i=>i.toFlatJSON(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatJSON(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,argumentsType:this.argumentsType,returnsType:this.returnsType,parent:((e=this.parent)==null?void 0:e.id)||void 0}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.fixedArguments.flatMap(i=>i.toFlatGenerationTarget(e)),...this.fixedReturns.flatMap(i=>i.toFlatGenerationTarget(e)),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.toFlatGenerationTarget(e):[],...this.dynamicReturnTypes?this.dynamicReturnTypes.toFlatGenerationTarget(e):[]])}implementAsFunctionDeclaration(e){var s;const t=this.fixedArguments.map((o,d)=>{var h;const p={id:e+"--"+o.id+"--parent-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e};return{id:e+"--"+o.id,version:o.version,type:r.ArgumentDeclaration,name:o.name,required:o.required,writesValues:[],description:o.description,index:d,dataType:((h=o.dataType)==null?void 0:h.toJSON())||null,parent:p}}),i=[],a=[];if(this.fixedReturns.length){const o=this.fixedReturns.map((T,f)=>{var I;const b={id:e+"--return-statement--"+T.id+"--parent-ref",type:r.GenericReference,entityId:e,entityType:r.ReturnStatement};return{id:e+"--"+T.id,version:T.version,type:r.ReturnDeclaration,name:T.name,description:T.description,readsValue:null,required:T.required,isError:!1,index:f,dataType:((I=T.dataType)==null?void 0:I.toJSON())||null,parent:b}}),d={id:e+"--return-statement-parent-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e},p={id:e+"--return-statement-called-by-ref",type:r.GenericReference,entityType:r.FunctionDeclaration,entityId:e},h={id:e+"--return-statement",version:this.version,type:r.ReturnStatement,outputs:o,throws:null,calledBySuccess:[],calledByError:[],calledByEntry:[p],parent:d,x:0,y:0};i.push(h),a.push(h)}return{id:e,version:this.version,type:r.FunctionDeclaration,name:this.name,description:this.description,inputs:t,returnStatements:i,calls:a,collapsed:!1,private:!1,implements:this.toJSON(),index:0,parent:((s=this.parent)==null?void 0:s.toReference())||null,x:0,y:0}}implementAsLoop(e){const t=e||this.project,i=this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),a={id:i,version:this.version,type:r.Loop,declaration:this.toJSON(),inputs:[],outputs:[],error:null,process:null,successCalls:[],errorCalls:[],calledByEntry:[],calledByError:[],calledBySuccess:[],breakStatements:[],continueStatements:[],body:null,x:0,y:0,parent:t.toReference()};this.fixedArguments.forEach((d,p)=>{const T={id:d.toReference().id+"--input-map-id",version:this.version,type:r.InputMap,name:null,description:null,declaration:d,defaultValue:null,readsValue:null,index:p,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};a.inputs.push(T)}),this.fixedReturns.forEach((d,p)=>{const T={id:d.toReference().id+"--output-map-id",version:this.version,type:r.OutputMap,declaration:d,writesValues:[],index:p,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};a.outputs.push(T)});const s={id:i+"--body-function-declaration-id",version:this.version,type:r.FunctionDeclaration,name:"body",description:null,inputs:[],returnStatements:[],calls:[],implements:null,index:null,collapsed:!1,private:!1,x:0,y:0,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Loop}};s.inputs=[{id:$.UUID.uuid(),version:this.version,type:r.ArgumentDeclaration,name:"Current iteration number",description:"The number of the current iteration of the loop. Starts at 1.",dataType:null,required:!0,writesValues:[],index:0,parent:{id:s.id,type:r.GenericReference,entityId:s.id,entityType:r.FunctionDeclaration}},{id:$.UUID.uuid(),version:this.version,type:r.ArgumentDeclaration,name:"Previous iterations results",description:"The results of the previous iterations of the loop.",dataType:null,required:!0,writesValues:[],index:1,parent:{id:s.id,type:r.GenericReference,entityId:s.id,entityType:r.FunctionDeclaration}}],a.body=s;const o=R(a,this.project);return o.setParent(t),o.initChildren(),o}implementAsOperation(e,t){const i=e||this.project,a=t||this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),s={id:a,version:this.version,type:r.Operation,declaration:this.toJSON(),inputs:[],outputs:[],error:null,successCalls:[],errorCalls:[],process:null,dynamicArguments:[],calledByEntry:[],calledByError:[],calledBySuccess:[],x:0,y:0,parent:i.toReference()};if(this.fixedArguments.forEach((d,p)=>{const h={id:a+Xt(d.name,r.InputMap,this.project),version:this.version,type:r.InputMap,name:null,description:null,declaration:d,defaultValue:null,readsValue:null,index:p,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.inputs.push(h)}),this.fixedReturns.forEach((d,p)=>{const h={id:a+Xt(d.name,r.OutputMap,this.project),version:this.version,type:r.OutputMap,declaration:d,writesValues:[],index:p,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.outputs.push(h)}),this.error){const p={id:this.error.toReference().id+"--error-map",version:this.version,type:r.OutputMap,declaration:this.error,writesValues:[],index:-1,parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:a,entityType:r.Operation}};s.error=p}const o=R(s,this.project);return o.setParent(i),o.initChildren(),o}implementAsCondition(e){const t=e||this.project,i=this.id+"--instance-"+$.UUID.fromUUID($.UUID.uuid()),a={id:i,version:this.version,type:r.Condition,declaration:this.toJSON(),operator:null,inputs:[],successCalls:[],errorCalls:[],calledByEntry:[],calledByError:[],calledBySuccess:[],x:0,y:0,parent:t.toReference()};this.fixedArguments.forEach((o,d)=>{const p={id:i+Xt(o.name,r.InputMap,this.project),version:this.version,type:r.InputMap,name:null,description:null,declaration:o,defaultValue:null,readsValue:null,index:d,dynamicArguments:[],parent:{id:$.UUID.uuid(),type:r.GenericReference,entityId:i,entityType:r.Condition}};a.inputs.push(p)});const s=R(a,this.project);return s.setParent(t),s.initChildren(),s}clearErrors(){var e,t,i;return this.errors=[],this.fixedArguments.forEach(a=>a.clearErrors()),this.fixedReturns.forEach(a=>a.clearErrors()),(e=this.dynamicArgumentTypes)==null||e.clearErrors(),(t=this.dynamicReturnTypes)==null||t.clearErrors(),(i=this.error)==null||i.clearErrors(),this}validate(){const e=X9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.fixedArguments.flatMap(t=>t.getErrors()),...this.fixedReturns.flatMap(t=>t.getErrors()),...this.dynamicArgumentTypes?this.dynamicArgumentTypes.getErrors():[],...this.dynamicReturnTypes?this.dynamicReturnTypes.getErrors():[]]}getShallowErrors(){return this.errors}clone(e){return new de(this.toJSON(),this.project)}setDynamicArgumentsDataType(e){return this.dynamicArgumentTypes=e,this}setDynamicReturnsDataType(e){return this.dynamicReturnTypes=e,this}addFixedArgument(e){return this.fixedArguments.find(t=>t.id===e.id)||this.fixedArguments.push(e),this}removeFixedArgument(e){return this.fixedArguments=this.fixedArguments.filter(t=>t.id!==e.id),this}addFixedReturn(e){return this.fixedReturns.find(t=>t.id===e.id)||this.fixedReturns.push(e),this}removeFixedReturn(e){return this.fixedReturns=this.fixedReturns.filter(t=>t.id!==e.id),this}};l(de,"MUTABLE_BASE_PROPERTIES",["name","description","argumentsType","returnsType"]),l(de,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(de,"BASE_PROPERTIES",[...de.MUTABLE_BASE_PROPERTIES,...de.INMUTABLE_BASE_PROPERTIES]),l(de,"MUTABLE_META_PROPERTIES",[...de.MUTABLE_BASE_PROPERTIES]),l(de,"INMUTABLE_META_PROPERTIES",[...de.INMUTABLE_BASE_PROPERTIES]),l(de,"META_PROPERTIES",[...de.MUTABLE_META_PROPERTIES,...de.INMUTABLE_META_PROPERTIES]),l(de,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(de,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(de,"UPSTREAM_PROPERTIES",[...de.MUTABLE_UPSTREAM_PROPERTIES,...de.INMUTABLE_UPSTREAM_PROPERTIES]),l(de,"MUTABLE_DOWNSTREAM_PROPERTIES",["dynamicArgumentTypes","dynamicReturnTypes","fixedArguments","fixedReturns"]),l(de,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(de,"DOWNSTREAM_PROPERTIES",[...de.MUTABLE_DOWNSTREAM_PROPERTIES,...de.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(de,"PROPERTIES",[...de.META_PROPERTIES,...de.UPSTREAM_PROPERTIES,...de.DOWNSTREAM_PROPERTIES]);let $e=de;function Q9(n){var s;const e=S4(),t=n.toJSON();e.safeParse(t).success,(s=n.dataType)==null||s.validate();const a=[];return X(n.errors,a)}const ue=class ue{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"index");l(this,"required");l(this,"parentRelationType");l(this,"type",r.ValueDescriptor);l(this,"dataType",null);l(this,"project");l(this,"errors",[]);l(this,"parent");l(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.index=e.index,this.required=e.required,this.parentRelationType=e.parentRelationType}static fromGenerationTarget(e,t){const i=e.parent?D(e.parent):null,a=i?t.get(i):null,s=e.parentRelationType===C.FixedArguments?a==null?void 0:a.fixedArguments.length:a==null?void 0:a.fixedReturns.length,o={id:e.id,version:1,name:e.name,type:r.ValueDescriptor,index:s||0,description:e.description,required:e.required,parentRelationType:e.parentRelationType,dataType:null,parent:a},d=R(o,t);return a&&d.setParent(a),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[r.ActionDescriptor]}},t);i=s.modifiedData,a.push(...s.errors,...Ae(i));const o=i.parent&&t.get(i.parent),d=o&&Pr(o);return d&&d.type===r.ActionDescriptor&&a.push(new E({id:`${e.id}--${y.BuiltInEntityParent}`,code:y.BuiltInEntityParent,severity:m.Error,message:`Entity of type "${e.type}" with id "${e.id}", has a parent that is a built-in entity "${d.name}" of type '${d.type}' with id '${d.id}'.
|
|
168
168
|
You can't modify system entities that are built-in.`,issue:null})),o&&o.type===r.ActionDescriptor&&(!i.parentRelationType||!(i.parentRelationType===C.FixedArguments||i.parentRelationType===C.FixedReturns||i.parentRelationType===C.ReturnedError)?a.push(new E({id:`${e.id}--${y.InvalidParentRelationType}`,code:y.InvalidParentRelationType,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', must have a 'parentRelationType' property set to either '${C.FixedArguments}', '${C.FixedReturns}', or '${C.ReturnedError}' when being added as a child to an entity of type 'action-descriptor'.`,issue:null})):i.parentRelationType===C.ReturnedError&&o.error&&a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.Error,message:`The entity with id '${e.id}' and type '${e.type}', is being added as an error value-descriptor to an entity of type 'action-descriptor' with id '${o.id}', which already has an error value descriptor with id '${o.error.id}'.
|
|
169
169
|
An action descriptor can only have one error value descriptor child.
|
|
170
170
|
Either remove the existing error value descriptor or update it with the 'update' action.
|
|
171
171
|
You can use the 'describe_entity' action to get more information about the existing error value descriptor like so:
|
|
172
|
-
${Qt({describe_entity:o.error.id})}`,issue:null}))),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){var e,t;return this.parentRelationType===C.FixedArguments?(e=this.parent)==null||e.addFixedArgument(this):this.parentRelationType===C.FixedReturns?(t=this.parent)==null||t.addFixedReturn(this):this.parentRelationType===C.ReturnedError&&this.parent&&(this.parent.error=this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.index=e.index||this.index,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.dataType?this.dataType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.dataType?this.dataType.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.dataType?this.dataType.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,required:this.required,parentRelationType:this.parentRelationType,parent:(e=this.parent)==null?void 0:e.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.dataType?this.dataType.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=
|
|
172
|
+
${Qt({describe_entity:o.error.id})}`,issue:null}))),{errors:a,modifiedData:i}}validateGeneratedUpdate(e){return{errors:[],modifiedData:e}}addSelfToProject(){var e,t;return this.parentRelationType===C.FixedArguments?(e=this.parent)==null||e.addFixedArgument(this):this.parentRelationType===C.FixedReturns?(t=this.parent)==null||t.addFixedReturn(this):this.parentRelationType===C.ReturnedError&&this.parent&&(this.parent.error=this),this}setParent(e){return this.parent=e,this}initChildren(){return this.initialized?this:(this.initialized=!0,this.initialData.dataType&&(this.dataType=R(this.initialData.dataType,this.project),this.dataType.setParent(this),this.dataType.initChildren()),this)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}sync(e){return this.version=e.version||this.version,this.name=e.name||this.name,this.description=e.description||this.description,this.index=e.index||this.index,this}async load(){return this}async create(){return this}async update(e){return this}async delete(){return this}remove({ignoreUpstream:e,seenEntities:t}={ignoreUpstream:!1,seenEntities:new Set}){const i=[],a=[];if(t.has(this.id))return{affected:[],removed:[]};if(t.add(this.id),a.push(this),this.unsubscribe(),this.dataType){const{affected:s,removed:o}=this.dataType.remove({ignoreUpstream:!0,seenEntities:t});i.push(...s),a.push(...o)}return{affected:S(i),removed:S(a)}}restore({seenEntities:e}={seenEntities:new Set}){const t=[];if(e.has(this.id))return{affected:[],self:this};if(e.add(this.id),this.subscribe(),this.dataType){const{affected:i}=this.dataType.restore({seenEntities:e});t.push(...i)}return{affected:S(t),self:this}}toFlat(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this,...this.dataType?this.dataType.toFlat(e):[]])}toFlatIds(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.id,...this.dataType?this.dataType.toFlatIds(e):[]])}toJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toJSON())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toReference(){return{id:this.id+"--"+$.UUID.uuid()+"--ref",type:r.GenericReference,entityId:this.id,entityType:this.type}}toShallowJSON(){var e,t;return{id:this.id,version:this.version,type:this.type,name:this.name,description:this.description,index:this.index,required:this.required,parentRelationType:this.parentRelationType,dataType:((e=this.dataType)==null?void 0:e.toReference())||null,parent:((t=this.parent)==null?void 0:t.toReference())||null}}toFlatJSON(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toShallowJSON(),...this.dataType?this.dataType.toFlatJSON(e):[]])}toGenerationTarget(){var e;return{id:this.id,name:this.name,description:this.description,type:this.type,required:this.required,parentRelationType:this.parentRelationType,parent:(e=this.parent)==null?void 0:e.id}}toFlatGenerationTarget(e=new Set){return e.has(this.id)?[]:(e.add(this.id),[this.toGenerationTarget(),...this.dataType?this.dataType.toFlatGenerationTarget(e):[]])}clearErrors(){var e;return this.errors=[],(e=this.dataType)==null||e.clearErrors(),this}validate(){const e=Q9(this);return this.errors=e,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.dataType?this.dataType.getErrors():[]]}getShallowErrors(){return this.errors}clone(){return new ue(this.toJSON(),this.project)}getDataType(){return this.dataType||null}setDataType(e){return this.dataType=e,this}getDefaultValue(){var e;return((e=this.dataType)==null?void 0:e.defaultValue)||null}};l(ue,"MUTABLE_BASE_PROPERTIES",["name","description","required"]),l(ue,"INMUTABLE_BASE_PROPERTIES",["id","version","type","parentRelationType"]),l(ue,"BASE_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,...ue.INMUTABLE_BASE_PROPERTIES]),l(ue,"MUTABLE_META_PROPERTIES",[...ue.MUTABLE_BASE_PROPERTIES,"index"]),l(ue,"INMUTABLE_META_PROPERTIES",[...ue.INMUTABLE_BASE_PROPERTIES]),l(ue,"META_PROPERTIES",[...ue.MUTABLE_META_PROPERTIES,...ue.INMUTABLE_META_PROPERTIES]),l(ue,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(ue,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(ue,"UPSTREAM_PROPERTIES",[...ue.MUTABLE_UPSTREAM_PROPERTIES,...ue.INMUTABLE_UPSTREAM_PROPERTIES]),l(ue,"MUTABLE_DOWNSTREAM_PROPERTIES",["dataType"]),l(ue,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ue,"DOWNSTREAM_PROPERTIES",[...ue.MUTABLE_DOWNSTREAM_PROPERTIES,...ue.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ue,"PROPERTIES",[...ue.META_PROPERTIES,...ue.UPSTREAM_PROPERTIES,...ue.DOWNSTREAM_PROPERTIES]);let gr=ue;function K9(n,e){if(!n.type&&!n.id)return{errors:[new E({id:`last-generated-entity-payload--${y.MissingTypeProperty}`,message:"Last generated entity payload is missing a 'type' property.",severity:m.Error,code:y.MissingTypeProperty,issue:null}),new E({id:`last-generated-entity-payload--${y.MissingIdProperty}`,message:"Last generated entity payload is missing an 'id' property.",severity:m.Error,code:y.MissingIdProperty,issue:null})],modifiedData:null};if(n.type){if(!n.id)return{errors:[new E({id:`last-generated-entity-payload--${y.MissingIdProperty}`,message:`Last generated entity, with type "${n.type}" is missing an 'id' property.`,severity:m.Error,code:y.MissingIdProperty,issue:null})],modifiedData:null}}else return{errors:[new E({id:`${n.id}--${y.MissingTypeProperty}`,message:`Entity with id "${n.id}" is missing a 'type' property.`,severity:m.Error,code:y.MissingTypeProperty,issue:null})],modifiedData:null};if(n.type===r.GenericReference)return{errors:[new E({id:`${n.id}--${y.RootReference}`,message:`Generic reference entity with id "${n.id}". A generic reference cannot be generated as a standalone entity. Only in the body of another entity.`,severity:m.Error,code:y.RootReference,issue:null})],modifiedData:null};const t=n,i=e.instances[t.id],a=e.builtInInstances[t.id];if(i&&!a&&t.type!==r.GenericReference){let s=`A previously generated entity with id "${t.id}" already exists in the project state.
|
|
173
173
|
Are you trying to update that entity?
|
|
174
174
|
If so, you should use the 'update' action for core mutable metadata properties, or 'delete' and then 'post' again to replace it.
|
|
175
|
-
If you are trying to create a new entity, please use a different id, for example: "${
|
|
175
|
+
If you are trying to create a new entity, please use a different id, for example: "${yd(t,e)}".`;return{errors:[new E({id:`duplicate--${t.id}--${y.EntityIdNotUnique}`,message:s,severity:m.Error,code:y.EntityIdNotUnique,issue:null})],modifiedData:n}}else if(i&&t.type!==r.GenericReference)return{errors:[new E({id:`${t.id}--${y.EntityIdNotUnique}`,message:`A built in entity with id "${t.id}" already exists. You cannot modify built in entities. If you are trying to create a new entity, please use a different id, for example: "${yd(t,e)}".`,severity:m.Error,code:y.EntityIdNotUnique,issue:null})],modifiedData:n};switch(t.type){case r.Project:return $.validateGenerationTarget(t,e);case r.CustomEntity:return Dr.validateGenerationTarget(t,e);case r.Property:return dr.validateGenerationTarget(t,e);case r.FunctionDeclaration:return ur.validateGenerationTarget(t,e);case r.DataType:return si.validateGenerationTarget(t,e);case r.Operation:return pr.validateGenerationTarget(t,e);case r.FunctionCall:return vr.validateGenerationTarget(t,e);case r.VariableDeclaration:return fr.validateGenerationTarget(t,e);case r.VariableInstance:return mr.validateGenerationTarget(t,e);case r.GlobalEvent:return oi.validateGenerationTarget(t,e);case r.InputMap:return mn.validateGenerationTarget(t,e);case r.OutputMap:return Tn.validateGenerationTarget(t,e);case r.ArgumentDeclaration:return Rr.validateGenerationTarget(t,e);case r.ReturnDeclaration:return Ct.validateGenerationTarget(t,e);case r.Loop:return yr.validateGenerationTarget(t,e);case r.Condition:return hr.validateGenerationTarget(t,e);case r.Search:return Tr.validateGenerationTarget(t,e);case r.InstalledProject:return Er.validateGenerationTarget(t,e);case r.InternalCall:return li.validateGenerationTarget(t,e);case r.PrimitiveValue:return ci.validateGenerationTarget(t,e);case r.ReturnStatement:return br.validateGenerationTarget(t,e);case r.BreakStatement:return di.validateGenerationTarget(t,e);case r.ContinueStatement:return yt.validateGenerationTarget(t,e);case r.ActionDescriptor:return $e.validateGenerationTarget(t,e);case r.ValueDescriptor:return gr.validateGenerationTarget(t,e);case r.BuiltInBaseEntity:case r.PrimitiveEntity:{const s="Did you mean to generate a",d={[r.BuiltInBaseEntity]:`${s} '${r.CustomEntity}' instead?`,[r.PrimitiveEntity]:`${s} '${r.CustomEntity}' instead?`}[t.type]||"";return{errors:[new E({id:`${t.id}--${y.BuiltInEntityGenerated}`,message:`Entity with id "${t.id} is of "${t.type}" type and should not be generated. Built in entities can only be referenced by user created entities.
|
|
176
176
|
${d}`,severity:m.Error,code:y.BuiltInEntityGenerated,issue:null})],modifiedData:n}}default:{const s=t;return{errors:[new E({id:`${s.id}--${y.UnknownEntityType}`,message:`Incorrect entity implementation for entity with id "${s.id}". Entity type "${s.type}" is not supported.`,severity:m.Error,code:y.UnknownEntityType,issue:null})],modifiedData:null}}}}function eo(n){const e=ho(n.type),t=e.MUTABLE_BASE_PROPERTIES,i=e.MUTABLE_UPSTREAM_PROPERTIES;let a=`Only mutable core metadata properties can be updated, no nested entities or references. You can alternatively delete the entity and create a new one with the updated values.
|
|
177
177
|
For entities of type "${n.type}", `;if(t.length>0?a+=`you can update the following metadata properties: '${N(t,"', '","' and '")}'. `:a+="there are no mutable metadata properties.",i.length>0){const s=t.length>0?`
|
|
178
178
|
You can also update the following upstream references: `:`
|
|
179
179
|
But can update the following upstream entity references: `;a+=`${s}'${N(i,"', '","' and '")}'.`}else a+=t.length>0?`
|
|
180
180
|
And there are no upstream references that can be updated.`:`
|
|
181
|
-
There are no upstream references that can be updated.`;return a}function
|
|
181
|
+
There are no upstream references that can be updated.`;return a}function e3(n,e){const t=[];let i=!1;if(Or.includes(e.type)&&t.push(new E({id:`${e.id}--${y.BuiltInEntityGenerated}`,message:`Entity with id "${e.id} is of "${e.type}" type and should not be updated. Built in entities can only be referenced by user created entities.`,severity:m.Error,code:y.BuiltInEntityGenerated,issue:null})),n.id&&(t.push(new E({id:`last-action--${y.InvalidUpdateEntityOperation}`,code:y.InvalidUpdateEntityOperation,severity:m.Error,message:`The 'id' property cannot be updated in the 'update' action payload. The id of the entity is '${n.id}'. Only mutable core metadata properties can be updated, no nested entities or references. You can alternatively delete the entity and create a new one with the updated 'id'.`,issue:null})),i=!0),n.type&&(t.push(new E({id:`last-action--${y.InvalidUpdateEntityOperation}`,code:y.InvalidUpdateEntityOperation,severity:m.Error,message:`The 'type' property cannot be updated in the 'update' action payload. The type of the entity is '${e.type}'. Only mutable core metadata properties can be updated, no nested entities or references. You can alternatively delete the entity and create a new one with the updated 'type'.`,issue:null})),i=!0),t.length)return{errors:t,modifiedData:null,messageAddition:""};if(Me.includes(e.type)?n.calls&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calls" updated.
|
|
182
182
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})):we.includes(e.type)&&(n.successCalls&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "successCalls" updated.
|
|
183
183
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),n.errorCalls&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "errorCalls" updated.
|
|
184
184
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null}))),Rn.includes(e.type)&&(n.calledBy&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledBy" updated.
|
|
185
185
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),n.calledByEntry&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledByEntry" updated.
|
|
186
186
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),n.calledBySuccess&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledBySuccess" updated.
|
|
187
187
|
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),n.calledByError&&t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "calledByError" updated.
|
|
188
|
-
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null}))),t.length)return{errors:t,modifiedData:null,messageAddition:""};const a=ho(e.type);if(a){(a.INMUTABLE_META_PROPERTIES||[]).forEach(q=>{["type","id"].includes(q)||n[q]&&!
|
|
189
|
-
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),i=!0)}),(a.DOWNSTREAM_PROPERTIES||[]).forEach(q=>{n[q]&&!
|
|
188
|
+
${Ln}`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null}))),t.length)return{errors:t,modifiedData:null,messageAddition:""};const a=ho(e.type);if(a){(a.INMUTABLE_META_PROPERTIES||[]).forEach(q=>{["type","id"].includes(q)||n[q]&&!na(n[q])&&(t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${q}" updated. It is an inmutable property that is set only when the entity is created.
|
|
189
|
+
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),i=!0)}),(a.DOWNSTREAM_PROPERTIES||[]).forEach(q=>{n[q]&&!na(n[q])&&(t.push(new E({id:`${e.id}--${y.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${q}" set directly. It is a downstream property that points to a downstream nested entity.
|
|
190
190
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
191
|
-
To modify '${q}', target the entity that it points to and its equivalent property.`,severity:m.Error,code:y.InvalidDownstreamPropertyOverride,issue:null})),i=!0)}),(a.INMUTABLE_UPSTREAM_PROPERTIES||[]).forEach(q=>{n[q]&&!
|
|
192
|
-
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),i=!0)});const G=a.PROPERTIES||[];G.length>0&&Object.keys(n).forEach(q=>{G.includes(q)||t.push(new E({id:`${e.id}--${y.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${q}" that will be ignored.`,severity:m.Warning,code:y.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?eo(e):""};const s=
|
|
191
|
+
To modify '${q}', target the entity that it points to and its equivalent property.`,severity:m.Error,code:y.InvalidDownstreamPropertyOverride,issue:null})),i=!0)}),(a.INMUTABLE_UPSTREAM_PROPERTIES||[]).forEach(q=>{n[q]&&!na(n[q])&&(t.push(new E({id:`${e.id}--${y.InvalidInmutablePropertyOverride}`,message:`Entity of type "${e.type}" with id "${e.id}" cannot have the property "${q}" updated. It is an inmutable property that is set only when the entity is created.
|
|
192
|
+
If you need to update this property, you should delete the entity and create a new one with the updated value.`,severity:m.Error,code:y.InvalidInmutablePropertyOverride,issue:null})),i=!0)});const G=a.PROPERTIES||[];G.length>0&&Object.keys(n).forEach(q=>{G.includes(q)||t.push(new E({id:`${e.id}--${y.UnrecognizedProperty}`,message:`Entity of type "${e.type}" with id "${e.id}" has an unrecognized property "${q}" that will be ignored.`,severity:m.Warning,code:y.UnrecognizedProperty,issue:null}))})}if(t.length)return{errors:t,modifiedData:null,messageAddition:i?eo(e):""};const s=lv(e),o=s==null?void 0:s.partial(),d=o==null?void 0:o.safeParse(n),p={...n,id:e.id,type:e.type},h=fd(p,d);if(t.push(...h),t.length)return{errors:t,modifiedData:null,messageAddition:i?eo(e):""};const f=e.validateGeneratedUpdate(n);return{errors:[...t,...f.errors],modifiedData:f.modifiedData,messageAddition:i?eo(e):""}}function lv(n){switch(n.type){case r.PrimitiveValue:return As();case r.CustomEntity:return wc();case r.PrimitiveEntity:return As();case r.FunctionDeclaration:return Cc();case r.GlobalEvent:return Ns();case r.DataType:return gc();case r.Property:return ac();case r.FunctionCall:return hc();case r.Condition:return fc();case r.Operation:return ws();case r.VariableDeclaration:return Ic();case r.VariableInstance:return Pc();case r.OutputMap:return yc();case r.ReturnDeclaration:return dc();case r.ArgumentDeclaration:return Oc();case r.InputMap:return Ec();case r.Project:return Bc();case r.InstalledProject:return hx();case r.ActionDescriptor:return Os();case r.ReturnStatement:return lc();case r.Loop:return Os();case r.Search:return cc();case r.ValueDescriptor:return ic();case r.BuiltInBaseEntity:return sc();case r.InternalCall:return Tc();case r.ContinueStatement:return oc();case r.BreakStatement:return uc();default:return null}}function cv(n){switch(n.type){case r.PrimitiveValue:return jU();case r.CustomEntity:return a8();case r.PrimitiveEntity:return C4();case r.FunctionDeclaration:return Zx();case r.GlobalEvent:return gx();case r.DataType:return tx();case r.Property:return M4();case r.FunctionCall:return RU();case r.Condition:return PU();case r.Operation:return VU();case r.VariableDeclaration:return sx();case r.VariableInstance:return ux();case r.OutputMap:return fU();case r.ReturnDeclaration:return oU();case r.ArgumentDeclaration:return Wx();case r.InputMap:return _U();case r.Project:return t8();case r.InstalledProject:return mx();case r.ActionDescriptor:return j4();case r.ReturnStatement:return K4();case r.Loop:return J4();case r.Search:return rU();case r.ValueDescriptor:return D4();case r.BuiltInBaseEntity:return G4();case r.InternalCall:return OU();case r.ContinueStatement:return z4();case r.BreakStatement:return uU();default:return null}}function to(n){const e=[];Nn(n)||e.push(new E({id:`${n}--${y.InvalidReferenceObjectStructure}`,message:`Reference object with id "${n}" is not an object. References should be objects with exactly 4 properties: 'entityId', 'entityType', 'id', and 'type'.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null}));const t=n.id||"reference-to--"+(n.entityId||"unknown"),i=`Reference object ${n.id?`with id "${n.id}"`:`to entity with id "${n.entityId}" and type "${n.entityType}"`}`;return n.entityId||e.push(new E({id:`${t}--${y.InvalidReferenceObjectStructure}`,message:`${i} is missing an 'entityId' property.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null})),n.entityType||e.push(new E({id:`${t}--${y.InvalidReferenceObjectStructure}`,message:`${i} is missing an 'entityType' property.`,severity:m.Error,code:y.InvalidReferenceObjectStructure,issue:null})),n.id||e.push(new E({id:`${t}--${y.MissingIdProperty}`,message:`${i} is missing an 'id' property.`,severity:m.Error,code:y.MissingIdProperty,issue:null})),n.type||e.push(new E({id:`${t}--${y.MissingTypeProperty}`,message:`${i} is missing a 'type' property.`,severity:m.Error,code:y.MissingTypeProperty,issue:null})),e}function fd(n,e){return e.success?[]:e.error.issues.map(t=>new E({id:`${n.id}--${g.InvalidObjectStructure}`,message:`Entity of type "${n.type}" and with id "${n.id}", has an invalid structure: ${S8(t).toString().replace("Validation error: ","")}`,severity:m.Error,code:g.InvalidObjectStructure,issue:t}))}function Ae(n,e){const t=[],i=cv(n);if(i){const s=i.safeParse(n);t.push(...fd(n,s))}const a=ho(n.type);if(a){(a.DOWNSTREAM_PROPERTIES||[]).forEach(d=>{n[d]&&!na(n[d])&&t.push(new E({id:`${n.id}--${y.InvalidDownstreamPropertyOverride}`,message:`Entity of type "${n.type}" with id "${n.id}" cannot have the property "${d}" set directly. It is a downstream property that points to a downstream nested entity.
|
|
193
193
|
All downstream references are managed by the downstream entity. Entities only manage their own upstream references.
|
|
194
|
-
To modify '${d}', target the entity that it points to and its equivalent property.`,severity:m.Error,code:y.InvalidDownstreamPropertyOverride,issue:null}))});const o=a.PROPERTIES||[];o.length>0&&Object.keys(n).forEach(d=>{o.includes(d)||t.push(new E({id:`${n.id}--${y.UnrecognizedProperty}`,message:`Entity of type "${n.type}" with id "${n.id}" has an unrecognized property "${d}" that will be ignored.`,severity:m.Warning,code:y.UnrecognizedProperty,issue:null}))})}return t}function
|
|
195
|
-
All pass-through callable entities are: ${N(we,", "," and ")}.`,
|
|
194
|
+
To modify '${d}', target the entity that it points to and its equivalent property.`,severity:m.Error,code:y.InvalidDownstreamPropertyOverride,issue:null}))});const o=a.PROPERTIES||[];o.length>0&&Object.keys(n).forEach(d=>{o.includes(d)||t.push(new E({id:`${n.id}--${y.UnrecognizedProperty}`,message:`Entity of type "${n.type}" with id "${n.id}" has an unrecognized property "${d}" that will be ignored.`,severity:m.Warning,code:y.UnrecognizedProperty,issue:null}))})}return t}function t3(n,e){const t=[];if(!n.parent)return t;const i=e.get(n.parent);return i?(Or.includes(i==null?void 0:i.type)?t.push(new E({id:`${n.id}--${y.BuiltInEntityParent}`,message:`Entity of type "${n.type}" with id "${n.id}" cannot have the parent with id "${i.id}", because it is a built in entity. Built in entities cannot be modified.`,severity:m.Error,code:y.BuiltInEntityParent,issue:null})):i.type===r.ActionDescriptor&&e.get(n.parent)&&t.push(new E({id:`${n.id}--${y.BuiltInEntityParent}`,message:`Entity of type "${n.type}" with id "${n.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:m.Error,code:y.BuiltInEntityParent,issue:null})),t):[]}function md(n,e,t){const i=[],a=n[e.key];if(!a)return i.push(new E({id:`${n.id}--${e.key}--${g.InvalidObjectStructure}`,message:`Entity of type "${n.type}" with id "${n.id}" is missing a reference to a "${e.key}" entity. The '${e.key}' property of a "${n.type}" entity can be ${N(e.types,", "," or ")}.`,severity:m.Error,code:g.InvalidObjectStructure,issue:null})),{entityState:null,errors:i};let s=null;if(typeof a=="string")s=a;else{const d=to(a);i.push(...d),d.length===0&&(s=a.entityId)}if(!s)return{entityState:null,errors:i};if(n.id===s)return i.push(new E({id:`${n.id}--${s}--${y.SelfReference}`,message:`Entity of type "${n.type}" with id "${n.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:m.Error,code:y.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 E({id:`${n.id}--${s}--${y.InvalidReference}`,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to "${s}" at '${e.key}' that isn't pointing to an entity of type '${N(e.types,"', '","' or '")}'.`,severity:m.Error,code:y.InvalidReference,issue:null})):i.push(new E({id:`${n.id}--${s}--${y.ReferencedEntityNotFound}`,message:`Entity of type "${n.type}" with id "${n.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:m.Error,code:y.ReferencedEntityNotFound,issue:null})),{entityState:o,errors:i}}function no(n,e,t){const i=[],a=n[e];return a?Array.isArray(a)?{entities:a.map(o=>{let d=null;if(typeof o=="string")d=o;else{const h=to(o);i.push(...h),h.length===0&&(d=o.entityId)}if(!d)return{entityState:null,errors:[new E({id:`${n.id}--${e}--${y.InvalidReference}`,message:`Entity of type "${n.type}" with id "${n.id}", has a missing reference at '${e}'. A reference needs to be a 'id' string of an existing entity in the project.`,severity:m.Error,code:y.InvalidReference,issue:null})]};const p=t.get(d)||t.getBuiltIn(d);return p?{entityState:p,errors:[]}:(i.push(new E({id:`${n.id}--${d}--${y.ReferencedEntityNotFound}`,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${d}" at '${e}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:m.Error,code:y.ReferencedEntityNotFound,issue:null})),{entityState:null,errors:i})}),errors:[]}:(i.push(new E({id:`${n.id}--${e}--${g.InvalidObjectStructure}`,message:`Entity of type "${n.type}" with id "${n.id}" has an invalid structure for the "${e}" property. It should be an array of references.`,severity:m.Error,code:g.InvalidObjectStructure,issue:null})),{entities:[],errors:i}):(i.push(new E({id:`${n.id}--${e}--${g.InvalidObjectStructure}`,message:`Entity of type "${n.type}" with id "${n.id}" is missing a list of references to "${e}" entities.`,severity:m.Error,code:g.InvalidObjectStructure,issue:null})),{entities:[],errors:i})}function Td(n,e,t){const i=[],a=md(n,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 E({id:`${n.id}--${s.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to "${e.key}" that isn't pointing to an entity of type '${N(e.types,"', '","' or '")}'.`,issue:null})),n.id===s.id&&i.push(new E({id:`${n.id}--${s.id}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 N(n,e,t){if(n.length===1)return n[0];if(n.length===2)return n.join(t);{const i=n.pop();return`${n.join(e)}${t}${i}`}}const Vn=`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.
|
|
195
|
+
All pass-through callable entities are: ${N(we,", "," and ")}.`,da=`Entry point entities are the entities which start the execution of a logic chain. They are ${N(Me,", "," 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. `,dv=`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: ${N(tn,", "," and ")}.`,n3=`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.
|
|
196
196
|
All callable entity types are: ${N(Rn,", "," and ")}.`,Ln=`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).
|
|
197
|
-
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.`,
|
|
198
|
-
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'.`,
|
|
199
|
-
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.`,
|
|
200
|
-
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.`,Gn=`Entities of type '${r.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.`,
|
|
197
|
+
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.`,Ed=`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.
|
|
198
|
+
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'.`,r3=`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.
|
|
199
|
+
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.`,Rd=`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.
|
|
200
|
+
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.`,Gn=`Entities of type '${r.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.`,bd=`Entities that read values from other entities, can be connected with entities that write values to them. Value reading entity types are: '${N(xn,"', '","' and '")}'.`,uv=`Entities that write values to other entities, can be connected with entities that read values from them. Value writing entity types are: '${N(Be,"', '","' and '")}'.`,gd=`A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.
|
|
201
201
|
A 'property' can have a default value through its nested 'data-type' entity.
|
|
202
202
|
The 'property' entity only represents the data field in the declaration, and it can't write or read values.
|
|
203
|
-
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.`,ro=`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: '${N(
|
|
203
|
+
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.`,ro=`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: '${N(Gd,"', '","' and '")}'.
|
|
204
204
|
Some entities with values can both write and read values, while others can only do one of the two.
|
|
205
|
-
${
|
|
206
|
-
${
|
|
207
|
-
${
|
|
205
|
+
${bd}
|
|
206
|
+
${uv}.
|
|
207
|
+
${gd}`,vd=`To establish a connection of a reader and writter value during the generation process you can use the 'connect_values' generation action, like so:
|
|
208
208
|
\`\`\`json
|
|
209
209
|
{
|
|
210
210
|
"connect_values": {
|
|
@@ -216,16 +216,16 @@ ${vd}`,Id=`To establish a connection of a reader and writter value during the ge
|
|
|
216
216
|
You can use the 'disconnect_values' generation action to remove the connection between two value holding entities in the same way.`,io=`If an explicit 'parent' isn't given for a callable entity, the scope will be auto-calculated to match the parent scope of the caller entity.
|
|
217
217
|
If the entity that should be the parent of a callable entity is unclear, you can always skip the 'parent' property and the system will automatically calculate the parent based on the caller entity.`;function Qt(n){return`\`\`\`json
|
|
218
218
|
${typeof n=="string"?n:JSON.stringify(n,null,2)}
|
|
219
|
-
\`\`\``}function
|
|
219
|
+
\`\`\``}function i3(n,e){let t={};switch(n){case"add_caller":return t.add_caller={callerEntityId:e.callerEntityId,calleeEntityId:e.calleeEntityId},e.fromError&&(t.add_caller.fromError=e.fromError),Qt(t);case"remove_caller":return t.remove_caller={callerEntityId:e.callerEntityId,calleeEntityId:e.calleeEntityId},Qt(t);case"connect_values":return t.connect_values={writerEntityId:e.writerEntityId,readerEntityId:e.readerEntityId},Qt(t);case"disconnect_values":return t.disconnect_values={writerEntityId:e.writerEntityId,readerEntityId:e.readerEntityId},Qt(t);case"update":{const i=`{
|
|
220
220
|
"update": {
|
|
221
221
|
"entityId": "${e.entityId}",
|
|
222
222
|
"data": {
|
|
223
223
|
...All the properties you want to update
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
}`;return Qt(i)}default:return""}}function
|
|
226
|
+
}`;return Qt(i)}default:return""}}function pv(n,e){const t=JSON.parse(JSON.stringify(n)),i=[];if(Me.includes(e.type))i.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Warning,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to an entry-point entity at 'calledBySuccess' with id "${e.id}".
|
|
227
227
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
228
|
-
${
|
|
228
|
+
${da}
|
|
229
229
|
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(Ce.includes(e.type)){const a=e.calledBy||[],s=a.length?`
|
|
230
230
|
|
|
231
231
|
This ${e.type} is called by ${N(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 E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a '${e.type}' entity at 'calledBySuccess' with id "${e.id}".
|
|
@@ -234,9 +234,9 @@ Termination entities are ${N(Ce,", "," and ")}.${s}`,issue:null}))}else if(!we.i
|
|
|
234
234
|
${Vn}`,issue:null}));else if(!tn.includes(e.type))return i.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a caller entity at 'calledBySuccess' with id "${e.id}" that isn't a caller entity.
|
|
235
235
|
All caller entity types are: ${N(tn,", "," and ")}.
|
|
236
236
|
For the 'calledBySuccess' property, you specifically need to reference a pass-through callable entity.
|
|
237
|
-
${Vn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function
|
|
237
|
+
${Vn}`,issue:null})),{errors:i,modifiedData:t};return{errors:i,modifiedData:t}}function yv(n,e){const t=[];if(Me.includes(e.type))t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to an entry-point entity at 'calledByError' with id "${e.id}".
|
|
238
238
|
Entry-point entities can only be referenced as 'calledByEntry'.
|
|
239
|
-
${
|
|
239
|
+
${da}`,issue:null}));else if(Ce.includes(e.type)){const i=e.calledBy||[],a=i.length?`
|
|
240
240
|
|
|
241
241
|
This ${e.type} is called by ${N(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 E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a '${e.type}' entity at 'calledByError' with id "${e.id}".
|
|
242
242
|
${e.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
@@ -244,30 +244,30 @@ Termination entities are ${N(Ce,", "," and ")}.${a}`,issue:null}))}else if(!we.i
|
|
|
244
244
|
${Vn}`,issue:null}));else if(!tn.includes(e.type))return t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a caller entity at 'calledByError' with id "${e.id}" that isn't a caller entity.
|
|
245
245
|
All caller entity types are: ${N(tn,", "," and ")}.
|
|
246
246
|
For the 'calledByError' property, you specifically need to reference a pass-through callable entity.
|
|
247
|
-
${Vn}`,issue:null})),t;return t}function
|
|
247
|
+
${Vn}`,issue:null})),t;return t}function hv(n,e){const t=[];if(Ce.includes(e.type)){const i=e.calledBy||[],a=i.length?`
|
|
248
248
|
|
|
249
249
|
This ${e.type} is called by ${N(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 E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a '${e.type}' entity at 'calledByEntry' with id "${e.id}".
|
|
250
250
|
${e.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
251
251
|
Termination entities are ${N(Ce,", "," and ")}.${a}`,issue:null}))}else if(we.includes(e.type))t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Warning,message:`Entity of type "${n.type}" with id "${n.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.
|
|
252
252
|
${Vn}.
|
|
253
|
-
${
|
|
253
|
+
${da}.
|
|
254
254
|
|
|
255
255
|
We have moved the reference to 'calledBySuccess' for you.`,issue:null}));else if(!tn.includes(e.type))return t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a caller entity at 'calledByEntry' with id "${e.id}" that isn't a caller entity.
|
|
256
256
|
All caller entity types are: ${N(tn,", "," and ")}.
|
|
257
257
|
For the 'calledByEntry' property, you specifically need to reference a pass-through callable entity.
|
|
258
|
-
${Vn}`,issue:null})),t;return t}function
|
|
258
|
+
${Vn}`,issue:null})),t;return t}function fv(n,e){const t=[];let i=JSON.parse(JSON.stringify(n));if(Rn.includes(i.type)){if(i.calledBySuccess){const s=no(i,"calledBySuccess",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const d=pv(i,o.entityState);i=d.modifiedData,t.push(...d.errors)}):t.push(...s.errors)}if(i.calledByError){const s=no(i,"calledByError",e);s.errors.length===0?s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const d=yv(i,o.entityState);t.push(...d)}):t.push(...s.errors)}if(i.calledByEntry){const s=no(i,"calledByEntry",e);s.errors.length===0?(s.entities.forEach(o=>{if(o.errors.length){t.push(...o.errors);return}const d=hv(i,o.entityState);t.push(...d)}),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 E({id:`${i.id}--${y.DuplicateReference}`,code:y.DuplicateReference,severity:m.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=ft(i,e);i.type===r.ReturnStatement&&o&&!Me.includes(o.type)?t.push(new E({id:`${i.id}--${y.IncompatibleScope}`,code:y.IncompatibleScope,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${N(Me,"', '","' or '")}' entity. A return statement's parent should always be resolved to a function declaration or global event.${io}`,issue:null})):i.type===r.ContinueStatement&&o&&o.type!==r.Loop?t.push(new E({id:`${i.id}--${y.IncompatibleScope}`,code:y.IncompatibleScope,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${r.Loop}' entity. A continue statement's parent should always be resolved to a loop entity.${io}`,issue:null})):i.type===r.BreakStatement&&o&&o.type!==r.Loop&&t.push(new E({id:`${i.id}--${y.IncompatibleScope}`,code:y.IncompatibleScope,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" has an explicitly set parent, but it isn't a '${r.Loop}' entity. A break statement's parent should always be resolved to a loop entity.${io}`,issue:null}));const d=[],p=[];let h=null;if(s.forEach(T=>{const f=e.get(T);if(!f){t.push(new E({id:`${i.id}--${T}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a caller entity with id "${T}" that doesn't exist in the project.`,issue:null}));return}const b=ft(f,e);if(o)ya(o,b,e)?(Ce.includes(i.type)&&((i.calledBySuccess||[]).find(B=>B===f.id)?(f.successCalls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
259
259
|
The new termination statement is redundant because both entities would be called from the same parent caller branch "successCalls", at the same time.`,issue:null})):(i.calledByError||[]).find(B=>B===f.id)?(f.errorCalls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.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 "errorCalls", at the same time.`,issue:null})):(i.calledByEntry||[]).find(B=>B===f.id)&&(f.calls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
261
|
-
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}))),d.push({caller:f,scope:b})):p.push({caller:f,scope:b,errors:[new E({id:`${i.id}--${f.id}--${y.CallerWithIncompatibleScope}`,code:y.CallerWithIncompatibleScope,severity:m.Warning,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that is in a different scope. The caller entity should be in the same scope or a higher valid scope. Or all callers should share the global project scope with the entity they call.`,issue:null})]});else if(!h)h=b;else{const{compatible:I}=
|
|
261
|
+
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}))),d.push({caller:f,scope:b})):p.push({caller:f,scope:b,errors:[new E({id:`${i.id}--${f.id}--${y.CallerWithIncompatibleScope}`,code:y.CallerWithIncompatibleScope,severity:m.Warning,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that is in a different scope. The caller entity should be in the same scope or a higher valid scope. Or all callers should share the global project scope with the entity they call.`,issue:null})]});else if(!h)h=b;else{const{compatible:I}=ya(h,b,e);I?(Ce.includes(i.type)&&((i.calledBySuccess||[]).find(B=>B===f.id)?(f.successCalls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.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 "successCalls", at the same time.`,issue:null})):(i.calledByError||[]).find(B=>B===f.id)?(f.errorCalls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
263
263
|
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(B=>B===f.id)&&(f.calls||[]).find(q=>Ce.includes(q.type))&&t.push(new E({id:`${i.id}--${f.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Error,message:`Entity of type "${i.type}" with id "${i.id}" is being called by an entity of type "${f.type}" with id "${f.id}" that already calls a termination statement.
|
|
264
|
-
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}))),d.push({caller:f,scope:b})):p.push({caller:f,scope:b,errors:[new E({id:`${i.id}--${f.id}--${y.CallerWithIncompatibleScope}`,code:y.CallerWithIncompatibleScope,severity:m.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 "${f.type}" with id "${f.id}" is in a different scope than caller of type "${h.type}" with id "${h.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(T=>{t.push(...T.errors)});else if(d.length&&!o&&Ro.includes(i.type)){const T=d.filter(f=>f.scope!==e);if(T.length){const f=
|
|
264
|
+
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}))),d.push({caller:f,scope:b})):p.push({caller:f,scope:b,errors:[new E({id:`${i.id}--${f.id}--${y.CallerWithIncompatibleScope}`,code:y.CallerWithIncompatibleScope,severity:m.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 "${f.type}" with id "${f.id}" is in a different scope than caller of type "${h.type}" with id "${h.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(T=>{t.push(...T.errors)});else if(d.length&&!o&&Ro.includes(i.type)){const T=d.filter(f=>f.scope!==e);if(T.length){const f=Wv(T.map(b=>b.scope));i.parent=f.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'.
|
|
265
265
|
To add a caller, use the 'add_caller' action with the properties: 'callerEntityId', a 'calleeEntityId', and optionally a boolean 'fromError' (if the caller calls when an error occured in its execution).`;i.type===r.ReturnStatement?s+=`
|
|
266
266
|
Return statements need to have a caller when created, since their purpose is to terminate a call chain.`:i.type===r.ContinueStatement?s+=`
|
|
267
267
|
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===r.BreakStatement&&(s+=`
|
|
268
268
|
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+=`
|
|
269
|
-
${
|
|
270
|
-
It is recommended to have a caller reference already at the moment of creation in the payload of the generation action.`),t.push(new E({id:`${i.id}--${g.MissingCaller}`,code:g.MissingCaller,severity:Ce.includes(i.type)?m.Error:m.Warning,message:s,issue:null}))}}return{errors:t,modifiedData:i}}function
|
|
269
|
+
${dv}`,Ce.includes(i.type)||(s+=`
|
|
270
|
+
It is recommended to have a caller reference already at the moment of creation in the payload of the generation action.`),t.push(new E({id:`${i.id}--${g.MissingCaller}`,code:g.MissingCaller,severity:Ce.includes(i.type)?m.Error:m.Warning,message:s,issue:null}))}}return{errors:t,modifiedData:i}}function Id(n,e){const t=[];if(e.type===r.PrimitiveValue){const o=e.parent;let d=!1;if(o.type===r.InputMap)t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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.
|
|
271
271
|
All value writting entity types are: ${N(Be,", "," and ")}.
|
|
272
272
|
|
|
273
273
|
This primitive-value entity belongs to an input map entity with id "${o.id}". Input map entities are value writting entities. Is that what you meant to reference?`,issue:null}));else if(o.type===r.DataType){const p=o,h=p.parent;Be.includes(h.type)?t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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,29 +279,29 @@ All value writting entity types are: ${N(Be,", "," and ")}.
|
|
|
279
279
|
|
|
280
280
|
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 E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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.
|
|
281
281
|
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}))}else Be.includes(e.type)||t.push(new E({id:`${n.id}--${e.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a value writting entity at 'readsValue' with id "${e.id}" that isn't a value writting entity.
|
|
282
|
-
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}));const i=ft(n,e.project),a=ft(e,e.project);if(i){const s=
|
|
282
|
+
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}));const i=ft(n,e.project),a=ft(e,e.project);if(i){const s=ya(i,e,e.project);if(!s.compatible){const{type:o}=s;let d="";const p=`But they are nested under different subscopes. The reader is in the scope of the '${i.type}' (${A(i,e.project)}) with id '${i.id}', and the writter is in the scope of the '${a.type}' (${A(a,e.project)}) with id '${a.id}'.`;o===mo.ParallelInCommonParent?(d=`The reader and the writter entities are both in the scope of the '${s.commonAncestorScope.type}' (${A(s.commonAncestorScope,e.project)}) with id '${s.commonAncestorScope.id}'.`,d+=`
|
|
283
283
|
${p}`):o===mo.ParallelInProject&&(d="The reader and the writter entities are both in separate scopes in the project that have no common ancestor.",d+=`
|
|
284
284
|
${p}`),d+=`
|
|
285
285
|
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 E({id:`${n.id}--${e.id}--${y.IncompatibleScope}`,code:y.IncompatibleScope,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a reference to a value writting entity at 'readsValue' with id "${e.id}" with an incompatible scope.
|
|
286
|
-
${d}`,issue:null}))}}return t}function Fe(n,e,t,i=!1){const a=[],s={...e};let o=JSON.parse(JSON.stringify(n));if(!i){if(xn.includes(o.type)){if(o.readsValue){const h=
|
|
286
|
+
${d}`,issue:null}))}}return t}function Fe(n,e,t,i=!1){const a=[],s={...e};let o=JSON.parse(JSON.stringify(n));if(!i){if(xn.includes(o.type)){if(o.readsValue){const h=md(o,{key:"readsValue",types:Be},t);if(h.errors.length===0){const T=Id(o,h.entityState);a.push(...T)}else a.push(...h.errors);delete s.readsValue}}else o.readsValue&&(Be.includes(o.type)?a.push(new E({id:`${o.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${o.type}" with id "${o.id}" has a 'readsValue' property that is only valid for entities of type: ${N(xn,", "," and ")}.
|
|
287
287
|
${ro}`,issue:null})):r.Property===o.type?a.push(new E({id:`${o.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${o.type}" with id "${o.id}" has a 'readsValue' property that is only valid for entities of type: ${N(xn,", "," and ")}.
|
|
288
|
-
${
|
|
289
|
-
${
|
|
290
|
-
${
|
|
288
|
+
${gd}`,issue:null})):a.push(new E({id:`${o.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${o.type}" with id "${o.id}" has a 'readsValue' property that is only valid for entities of type: ${N(xn,", "," and ")}.
|
|
289
|
+
${bd}`,issue:null})),delete s.readsValue);o.writesValues&&(Be.includes(o.type)?a.push(new E({id:`${o.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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.
|
|
290
|
+
${vd}`,issue:null})):a.push(new E({id:`${o.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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.
|
|
291
291
|
${ro}
|
|
292
|
-
${
|
|
292
|
+
${vd}`,issue:null})),delete s.writesValues);const p=fv(o,t);delete s.calledByError,delete s.calledBySuccess,delete s.calledByEntry,a.push(...p.errors),o=p.modifiedData}const d=Object.entries(s);for(const[p,h]of d){const T=h.types,f=h.optional,b=o[p];if(!b){f||a.push(new E({id:`${o.id}--${p}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.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 ${N(T,", "," or ")}`,issue:null}));continue}if(h.list)if(Array.isArray(b))for(const I of b){const B=Td(o,{key:p,types:T,optional:f},t);a.push(...B)}else{a.push(new E({id:`${o.id}--${p}--${y.ContainsSingleButShouldBeReferenceList}`,code:y.ContainsSingleButShouldBeReferenceList,severity:m.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(b)){a.push(new E({id:`${o.id}--${p}--${y.ContainsListButShouldReferenceSingle}`,code:y.ContainsListButShouldReferenceSingle,severity:m.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 I=Td(o,{key:p,types:T,optional:f},t);a.push(...I)}}return{errors:a,modifiedData:o}}function a3(n,e,t="calledBy"){const i=[];if(!n)return[];const a=e.get(n);if(!a)return i.push(new E({id:`${n}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity with id "${n}" 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([...we,...Me].includes(a.type))return[];if(Ce.includes(a.type)){const s=a.calledBy||[],o=s.length?`
|
|
293
293
|
|
|
294
294
|
This ${a.type} is called by ${N(s.map(d=>`${d.type} with id "${d.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 E({id:`last-action--${a.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}'.
|
|
295
295
|
${a.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
296
296
|
Termination entities are ${N(Ce,", "," and ")}.${o}`,issue:null}))}else i.push(new E({id:`last-action--${a.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}' which is not a valid caller entity type.
|
|
297
|
-
All caller entity types are: ${N(tn,", "," and ")}.`,issue:null}));return i}function
|
|
297
|
+
All caller entity types are: ${N(tn,", "," and ")}.`,issue:null}));return i}function s3(n,e,t="calledByError"){const i=[];if(!n)return[];const a=e.get(n);if(!a)return i.push(new E({id:`${n}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity with id "${n}" 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(we.includes(a.type))return[];if(Ce.includes(a.type)){const s=a.calledBy||[],o=s.length?`
|
|
298
298
|
|
|
299
299
|
This ${a.type} is called by ${N(s.map(d=>`${d.type} with id "${d.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 E({id:`last-action--${a.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}'.
|
|
300
300
|
${a.type} entities are the last entity to be executed in a logic chain, and they don't call any other entities.
|
|
301
301
|
Termination entities are ${N(Ce,", "," and ")}.${o}`,issue:null}))}else Me.includes(a.type)?i.push(new E({id:`last-action--${a.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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.
|
|
302
|
-
${
|
|
302
|
+
${da}`,issue:null})):i.push(new E({id:`last-action--${a.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity with id '${a.id}' referenced in '${t}' property is of type '${a.type}' which is not a valid caller entity type.
|
|
303
303
|
For any error branch caller, for the 'calledByError' property of an entity, you specifically need to reference a pass-through callable entity.
|
|
304
|
-
${Vn}`,issue:null}));return i}function
|
|
304
|
+
${Vn}`,issue:null}));return i}function o3(n,e){const t=[],i=e.get(n);if(!i)t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The 'readsValue' property references an entity with id '${n}' that was not found in the project. Perhaps it should be created? Perhaps the ID is incorrect?`,issue:null}));else if(i.type===r.PrimitiveValue){const s=i.parent;let o=!1;if(s.type===r.InputMap)t.push(new E({id:`last-action--${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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.
|
|
305
305
|
All value writting entity types are: ${N(Be,", "," and ")}.
|
|
306
306
|
|
|
307
307
|
This primitive-value entity belongs to an input map entity with id "${s.id}". Input map entities are value writting entities. Is that what you meant to reference?`,issue:null}));else if(s.type===r.DataType){const d=s,p=d.parent;Be.includes(p.type)?t.push(new E({id:`last-action--${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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,17 +313,17 @@ All value writting entity types are: ${N(Be,", "," and ")}.
|
|
|
313
313
|
|
|
314
314
|
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 E({id:`last-action--${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.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.
|
|
315
315
|
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}))}else Be.includes(i.type)||t.push(new E({id:`last-action--${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`The 'readsValue' property references an entity with id "${i.id}" that isn't a value writting entity.
|
|
316
|
-
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}));return t}function
|
|
316
|
+
All value writting entity types are: ${N(Be,", "," and ")}.`,issue:null}));return t}function mv(n){return n.functions.length?`All global 'function-declaration' entity ids are:
|
|
317
317
|
- ${n.functions.map(t=>`${t.id} (${A(t,n)})`).join(`
|
|
318
318
|
- `)}.`:"The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities."}function ao(n){return`All reserved action decriptor ids for '${r.GlobalEvent}' entities are:
|
|
319
319
|
- ${n.globalEventActionDescriptors.map(e=>`${e.id} (${A(e,n)})`).join(`
|
|
320
320
|
- `)}`}function so(n){return`All reserved action decriptor ids for '${r.Loop}' entities are:
|
|
321
321
|
- ${n.loopDeclarations.map(e=>`${e.id} (${A(e,n)})`).join(`
|
|
322
|
-
- `)}`}function
|
|
322
|
+
- `)}`}function l3(n){return`All reserved action decriptor ids for '${r.Operation}' entities are:
|
|
323
323
|
- ${n.operationDeclarations.map(e=>`${e.id} (${A(e,n)})`).join(`
|
|
324
324
|
- `)}`}function oo(n){return`All reserved action decriptor ids for '${r.Condition}' entities are:
|
|
325
325
|
- ${n.conditionDeclarations.map(e=>`${e.id} (${A(e,n)})`).join(`
|
|
326
|
-
- `)}`}function
|
|
326
|
+
- `)}`}function Tv(n,e){const t=[];if(!n)return[];const i=e.get(n),a=mv(e);if(!i)t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}));else if(i.type===r.ActionDescriptor)t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunctionCall}`,code:y.InvalidFunctionDeclarationForFunctionCall,severity:m.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${n}' which is of type '${i.type}' entity. If you meant to reference an 'action-descriptor', you can use the 'implement_operation' generation action instead.
|
|
327
327
|
Otherwise, if you were trying to implement a 'function-call' from a globally declarated 'function-declaration':
|
|
328
328
|
${a}`,issue:null}));else if(i.type!==r.FunctionDeclaration)t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunctionCall}`,code:y.InvalidFunctionDeclarationForFunctionCall,severity:m.Error,message:`The 'functionDeclarationId' reference is pointing to entity with id '${n}' which is of type '${i.type}' entity. Only 'function-declaration' entities can be implemented as function calls.
|
|
329
329
|
${a}`,issue:null}));else if(i.parent.type===r.CustomEntity){const o=Un(i.parent).filter(p=>!p.interactive);let d="";o.length&&(d=`
|
|
@@ -332,18 +332,18 @@ ${Gn}`),t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunction
|
|
|
332
332
|
If you want to call a method of a custom entity, use a '${r.InternalCall}' entity on any variable which is an instance of that custom entity.
|
|
333
333
|
${a}${d}`,issue:null}))}else i.parent.type===r.Loop?t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunctionCall}`,code:y.InvalidFunctionDeclarationForFunctionCall,severity:m.Error,message:`The function declaration entity with id '${n}' is the body of the 'loop' with id '${i.parent.id}'. Only globally declared, standalone functions can be implemented as function calls.
|
|
334
334
|
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.
|
|
335
|
-
${a}`,issue:null})):i.parent.type!==r.Project&&t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunctionCall}`,code:y.InvalidFunctionDeclarationForFunctionCall,severity:m.Error,message:`The function declaration entity with id '${n}' 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
|
|
335
|
+
${a}`,issue:null})):i.parent.type!==r.Project&&t.push(new E({id:`last-action--${y.InvalidFunctionDeclarationForFunctionCall}`,code:y.InvalidFunctionDeclarationForFunctionCall,severity:m.Error,message:`The function declaration entity with id '${n}' 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 Ev(n,e){const t=[];if(!n)return[];const i=e.getBuiltIn(n),a=`
|
|
336
336
|
All built-in 'action-descriptor' entities that define 'operation' entity, are (IDs):
|
|
337
337
|
- ${e.operationDeclarations.map(s=>`${s.id} (${A(s,e)}).`).join(`
|
|
338
338
|
- `)}
|
|
339
|
-
`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as operations instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.operationDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed operation descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as operations instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function
|
|
339
|
+
`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as operations instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.operationDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed operation descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as operations instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function c3(n,e){const t=[];if(!n)return[];const i=e.getBuiltIn(n),a=`
|
|
340
340
|
All built-in 'action-descriptor' entities that define 'condition' entity, are (IDs):
|
|
341
341
|
- ${e.conditionDeclarations.map(s=>`${s.id} (${A(s,e)}).`).join(`
|
|
342
342
|
- `)}
|
|
343
|
-
`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForCondition}`,code:y.InvalidActionDescriptorForCondition,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.conditionDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed condition descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForCondition}`,code:y.InvalidActionDescriptorForCondition,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function
|
|
343
|
+
`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForCondition}`,code:y.InvalidActionDescriptorForCondition,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.conditionDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed condition descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForCondition}`,code:y.InvalidActionDescriptorForCondition,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as conditions instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function d3(n,e){const t=[];if(!n)return[];const i=e.getBuiltIn(n),a=`
|
|
344
344
|
All built-in 'action-descriptor' entities that define 'loop' entity, are (IDs):
|
|
345
345
|
- ${e.loopDeclarations.map(s=>`${s.id} (${A(s,e)}).`).join(`
|
|
346
|
-
- `)}`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForLoop}`,code:y.InvalidActionDescriptorForLoop,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.loopDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForLoop}`,code:y.InvalidActionDescriptorForLoop,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function
|
|
346
|
+
- `)}`;return i?i.type===r.FunctionDeclaration?t.push(new E({id:`last-action--${y.InvalidActionDescriptorForLoop}`,code:y.InvalidActionDescriptorForLoop,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):i.type===r.ActionDescriptor?e.loopDeclarations.find(o=>o.id===n)||t.push(new E({id:`last-action--${y.InvalidActionDescriptorForOperation}`,code:y.InvalidActionDescriptorForOperation,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity but it isn't one of the allowed loop descriptors.${a}`,issue:null})):i.type!==r.ActionDescriptor&&t.push(new E({id:`last-action--${y.InvalidActionDescriptorForLoop}`,code:y.InvalidActionDescriptorForLoop,severity:m.Error,message:`The entity with id '${n}' is of type '${i.type}' entity. Only 'action-descriptor' entities can be implemented as loops instances.${a}`,issue:null})):t.push(new E({id:`last-action--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity with id '${n}' that isn't yet found in the project.${a}`,issue:null})),t}function Rv(n,e,t){var p,h,T,f;if(t.compatible)return"";const i=`entity of type "${n.type}" with id "${n.id}"`,a=`entity with id "${n.id}"`,s=`entity of type "${e.type}" with id "${e.id}"`,o=`entity with id "${e.id}"`,d=Hs(`${i} and ${s} have incompatible data types and cannot be connected as value-reader and value-writter.`);return t.type===Nt.AIsListBIsNot?`${d}
|
|
347
347
|
${a} is a list, but ${o} is not. A list can't be connected to a single value.`:t.type===Nt.BIsListAIsNot?`${d}
|
|
348
348
|
${a} is not a list, but ${o} is. A single value can't be connected to a list.`:t.type===Nt.AIsNullableBIsNot?`${d}
|
|
349
349
|
${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===Nt.BIsNullableAIsNot?`${d}
|
|
@@ -353,21 +353,21 @@ ${a} is not a template, but ${o} is. A data type that provides an entity as a "t
|
|
|
353
353
|
Their 'entity' property is of different types. They must be of the same type to be connected. For example, the 'entity' can be a '${r.CustomEntity}' or a '${r.PrimitiveEntity}'.`:t.type===Nt.IncompatibleCustomEntities?`${d}
|
|
354
354
|
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===Nt.IncompatiblePrimitiveEntities?`${d}
|
|
355
355
|
${a} is of primitive type '${((p=n.getDataType())==null?void 0:p.entity).name}' and ${o} is of primitive type '${((h=e.getDataType())==null?void 0:h.entity).name}'. They must be of the same primitive type to be connected.`:t.type===Nt.IncompatibleBuiltInBaseEntities?`${d}
|
|
356
|
-
Both point to a built-in-base-entity. But${a} is of built-in base type '${((T=n.getDataType())==null?void 0:T.entity).name}' and ${o} is of built-in base type '${((f=e.getDataType())==null?void 0:f.entity).name}'. They must be of the same built-in base type to be connected.`:d}function
|
|
356
|
+
Both point to a built-in-base-entity. But${a} is of built-in base type '${((T=n.getDataType())==null?void 0:T.entity).name}' and ${o} is of built-in base type '${((f=e.getDataType())==null?void 0:f.entity).name}'. They must be of the same built-in base type to be connected.`:d}function ua(n,e){const t=[];if(n.readsValue){const i=e.project.get(D(n.readsValue));if(e.project.getBuiltIn(D(n.readsValue)))t.push(new E({id:`${e.id}--${y.InvalidBuiltInEntityReference}`,code:y.InvalidBuiltInEntityReference,severity:m.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to a built-in entity with id '${n.readsValue}'. Only user-created entities can be referenced.`,issue:null}));else if(!i)t.push(new E({id:`${e.id}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${n.readsValue}' because the entity was not found in the project state.`,issue:null}));else{const s=Pr(i);if(s)t.push(new E({id:`${e.id}--${y.InvalidBuiltInEntityReference}`,code:y.InvalidBuiltInEntityReference,severity:m.Error,message:`The entity of type '${e.type}' with id '${e.id}' cannot update 'readsValue' to entity with id '${n.readsValue}' because the entity belongs to a built-in '${s.type}' entity with id '${s.id}' (${A(s,e.project)}) higher up in the tree.`,issue:null}));else{const o=Id({...e.toGenerationTarget(),...n},i);t.push(...o);const d=Ys(e.getDataType(),i.getDataType());d.compatible||t.push(new E({id:`${e.id}--${g.ReaderWriterIncompatibleDataType}`,code:g.ReaderWriterIncompatibleDataType,severity:m.Error,message:Rv(e,i,d),issue:null}))}}}return{errors:t,modifiedData:n}}function En(n){const e=[];if(n.parent===n.project)n.calledBy.length||e.push(new er({id:`${n.id}--${O.DisconnectedCallableEntity}`,code:O.DisconnectedCallableEntity,severity:m.Warning,message:`This '${n.type}' entity "${A(n,n.project)}" with id "${n.id}" is globally declared and isn't called by any other entity.
|
|
357
357
|
Globally declared callable entities will not be part of any logic execution when the project is published.
|
|
358
358
|
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 '${r.GlobalEvent}' or '${r.FunctionDeclaration}'.
|
|
359
359
|
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.
|
|
360
|
-
Or for a logic that the user is going to manually test themselves by clicking on the user-interface.`,issue:null,entity:n}));else{const t=
|
|
360
|
+
Or for a logic that the user is going to manually test themselves by clicking on the user-interface.`,issue:null,entity:n}));else{const t=fa(n);if(!t.reachable){let i=`This '${n.type}' entity "${A(n,n.project)}" with id "${n.id}" is not reachable from the project's closest entry point '${t.entryPoint.type}' "${A(t.entryPoint,n.project)}".`;i+=`
|
|
361
361
|
This is because there are termination statements in the call chain before reaching this '${n.type}'.
|
|
362
362
|
If a caller entity calls a termination statement, it will always prevent all other calls from executing.`;let a=`
|
|
363
|
-
This '${n.type}' is blocked `;t.blocks.forEach((s,o)=>{const d=s.blockedByCaller,p=s.blockedByCalling;o===0?a+="by ":o===t.blocks.length-1&&(a+="and by "),a+=`its ancestor "${A(d,n.project)}" with id "${d.id}" that calls a '${p.type}' entity with id "${p.id}"`,o<t.blocks.length-1?a+=", ":a+="."}),e.push(new er({id:`${n.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Warning,message:`${i}${a}`,issue:null,entity:n}))}}return X(n.errors,e)}function
|
|
363
|
+
This '${n.type}' is blocked `;t.blocks.forEach((s,o)=>{const d=s.blockedByCaller,p=s.blockedByCalling;o===0?a+="by ":o===t.blocks.length-1&&(a+="and by "),a+=`its ancestor "${A(d,n.project)}" with id "${d.id}" that calls a '${p.type}' entity with id "${p.id}"`,o<t.blocks.length-1?a+=", ":a+="."}),e.push(new er({id:`${n.id}--${g.UnreachableEntity}`,code:g.UnreachableEntity,severity:m.Warning,message:`${i}${a}`,issue:null,entity:n}))}}return X(n.errors,e)}function Pd(n){const e=[];if(!n.internalCalls.length)return e;if(n.readsValue){const t=j({id:`${n.id}--${O.VariableReadsValueAndInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" reads a value. A variable with internal calls can't read a value.`,issue:null,severity:m.Error,code:O.VariableReadsValueAndInternalCall,entity:n});e.push(t.error)}if(n.writesValues.length){const t=j({id:`${n.id}--${O.VariableWritesValuesAndInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" writes values. A variable with internal calls can't write a value.`,issue:null,severity:m.Error,code:O.VariableWritesValuesAndInternalCall,entity:n});e.push(t.error)}if(n.getUsedInputs().length){const t=j({id:`${n.id}--${O.VariableHasInputsAndInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" has inputs. A variable with internal calls can't have inputs.`,issue:null,severity:m.Error,code:O.VariableHasInputsAndInternalCall,entity:n});e.push(t.error)}if(n.getUsedOutputs().length){const t=j({id:`${n.id}--${O.VariableHasOutputsAndInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" has outputs. A variable with internal calls can't have outputs.`,issue:null,severity:m.Error,code:O.VariableHasOutputsAndInternalCall,entity:n});e.push(t.error)}if(n.calledBy.length){const t=j({id:`${n.id}--${O.VariableIsCalledAndHasInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" is called by other entities. A variable with internal calls can't be called by other entities.`,issue:null,severity:m.Error,code:O.VariableIsCalledAndHasInternalCall,entity:n});e.push(t.error)}if([...n.successCalls,...n.errorCalls].length){const t=j({id:`${n.id}--${O.VariableCallsOthersAndHasInternalCall}`,message:`Variable "${A(n,n.project)}" with id "${n.id}" calls other entities. A variable with internal calls can't call other entities.`,issue:null,severity:m.Error,code:O.VariableCallsOthersAndHasInternalCall,entity:n});e.push(t.error)}return e}function u3(n){var o;const e=gU(),t=n.toJSON();e.safeParse(t).success,n.inputs.forEach(d=>d.validate()),n.outputs.forEach(d=>d.validate()),(o=n.error)==null||o.validate();const s=[...En(n)];return X(n.errors,s)}const ge=class ge{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"x");l(this,"y");l(this,"type",r.FunctionCall);l(this,"successCalls",[]);l(this,"errorCalls",[]);l(this,"process",null);l(this,"declaration");l(this,"inputs",[]);l(this,"outputs",[]);l(this,"calledBySuccess",[]);l(this,"calledByError",[]);l(this,"calledByEntry",[]);l(this,"error",null);l(this,"parent");l(this,"errors",[]);l(this,"project");l(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 f=D(e.parent);i=t.get(f)}const a=D(e.declaration),s=t.get(a),o=e.calledByEntry.map(f=>{const b=D(f);return t.get(b)}),d=e.calledBySuccess.map(f=>{const b=D(f);return t.get(b)}),p=e.calledByError.map(f=>{const b=D(f);return t.get(b)}),h={id:e.id,version:1,type:r.FunctionCall,declaration:s.toReference(),calledByEntry:o,calledBySuccess:d,calledByError:p,errorCalls:[],successCalls:[],inputs:[],outputs:[],process:null,error:null,x:0,y:0,parent:i},T=R(h,t);return T.setParent(i),T.initChildren(),T}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=Fe(i,{parent:{list:!1,types:[...st,r.Project],optional:!0}},t);i=s.modifiedData,a.push(...s.errors,...Ae(i));const o=D(i.declaration);if(o){const d=Tv(o,t);a.push(...d)}else{const d=t.functions.length?`
|
|
364
364
|
All global 'function-declaration' entity ids are:
|
|
365
365
|
- ${t.functions.map(p=>`${p.id} (${A(p,t)})`).join(`
|
|
366
366
|
- `)}.`:`
|
|
367
367
|
The project currently has no global 'function-declaration' entities that can be called as 'function-call' entities.`;a.push(new E({id:`${i.id}--${y.InvalidReference}`,code:y.InvalidReference,severity:m.Error,message:`Entity of type "${r.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.
|
|
368
368
|
References can either be an ID string or an object with exacly four properties: 'id', 'entityId', 'entityType', 'type'.${d}`,issue:null}))}return{errors:a,modifiedData:i}}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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.
|
|
369
369
|
If an entity is called by another, they must be in the same scope, which means they have the same parent.
|
|
370
|
-
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 e;return this.parent===this.project&&this.project.addFunctionCall(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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===r.FunctionDeclaration){const e=R(this.initialData.declaration,this.project);this.declaration=e}else{const e=D(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initOutputs(),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this}initOutputs(){const e=[];this.outputs=this.initialData.outputs.map(s=>{const o=R(s,this.project);return e.push(o.index),o.setParent(this),o.initChildren(),o});const i=Bd(this).filter(s=>!this.outputs.find(o=>o.declaration.id===s.id));i.sort((s,o)=>s.index-o.index);const a=i.map((s,o)=>{const d=e.includes(s.index)?this.outputs.length-1+o:s.index,p={id:$.UUID.uuid(),type:r.OutputMap,version:1,declaration:s,index:d,parent:this,writesValues:[]},h=R(p,this.project);return h.setParent(this),h.initChildren(),h});return this.outputs.push(...a),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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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:r.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===r.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=p3(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 ge(this.toJSON(),this.project)}};l(ge,"MUTABLE_BASE_PROPERTIES",[]),l(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),l(ge,"MUTABLE_META_PROPERTIES",["x","y"]),l(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),l(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),l(ge,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ge,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),l(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),l(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),l(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let vr=ge;function vv(n){var e,t,i;switch(n.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=n.project.entities.filter(T=>!!T.implements.find(f=>f.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(a.find(T=>!!T.properties.find(f=>{var b;return f.implements&&f.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((b=f.getDefaultValue())==null?void 0:b.value)===!0}))){const f=a[0].properties.find(I=>I.implements&&I.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),b=(e=f==null?void 0:f.dataType)==null?void 0:e.defaultValue;if(b)b.value=!0;else if(f!=null&&f.dataType){const I=(t=f==null?void 0:f.dataType)==null?void 0:t.id.split("-id")[0],B=R({id:I+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:f==null?void 0:f.dataType.toReference()},n.project);return B.setParent(f==null?void 0:f.dataType),B.initChildren(),B.addSelfToProject(),{newEntities:[B]}}return{newEntities:[]}}const o=n.project.get(Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),d=lo(o,"Main database");if(d.errors.length>0)return{newEntities:[]};const p=d.implemented.properties.find(T=>T.implements&&T.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),h=(i=p==null?void 0:p.dataType)==null?void 0:i.defaultValue;if(h)h.value=!0;else if(p!=null&&p.dataType){const T=p==null?void 0:p.dataType.id.split("-id")[0],f=R({id:T+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:p==null?void 0:p.dataType.toReference()},n.project);f.setParent(p==null?void 0:p.dataType),f.initChildren(),f.addSelfToProject()}return{newEntities:[d.implemented]}}}return{newEntities:[]}}function Iv(n){return n.implements.filter(t=>t.type===r.BuiltInBaseEntity).map(t=>{var i;switch(t.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const s=n.project.entities.filter(p=>p.implements.find(h=>h.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(p=>!!p.properties.find(h=>{var T;return h.implements&&h.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((T=h.getDefaultValue())==null?void 0:T.value)===!0}));if(!s)return{newEntities:[]};const o=n.properties.find(p=>p.implements&&p.implements.id===Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database),d=(i=o==null?void 0:o.dataType)==null?void 0:i.defaultValue;if(o&&(o!=null&&o.dataType)&&!d){const p=o==null?void 0:o.dataType.id.split("-id")[0],h=R({id:p+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:null,valueAsType:s,parent:o==null?void 0:o.dataType.toReference()},n.project);return h.setParent(o==null?void 0:o.dataType),h.initChildren(),h.addSelfToProject(),{newEntities:[h]}}return{newEntities:[]}}}}),{newEntities:[]}}function lo(n,e,t){const i=t||Xt(e,r.CustomEntity,n.project),a=i.split("-id"),s=a[a.length-1||0]||i,o={id:i,version:1,name:e,type:r.CustomEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[n],x:0,y:0,parent:n.project},d=Ks(o,n.project);if(d.length>0)return{errors:d,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=vv(n),h=R(o,n.project);h.setParent(n.project),h.initChildren();const T=n.properties.map(I=>{const B=s+"-"+Xt(A(I,n.project),r.Property,n.project),G=I.clone(h,B);return G.abstract=!1,G.implements=I,G.setParent(h),h.addProperty(G),G}),f=n.abstractMethods.map(I=>{const B=s+Xt(I.name,r.FunctionDeclaration,n.project),G=I.implementAsFunctionDeclaration(B),q={id:B+"-parent-ref-id",type:r.GenericReference,entityId:i,entityType:r.CustomEntity},jt={...G,implements:I,parent:q},Le=R(jt,n.project);return h.addMethod(Le),Le.setParent(h),Le.initChildren(),Le.implements=I,Le});o.properties=T,o.methods=f;const b=Iv(h);return{implemented:h,errors:[],entitiesChanges:{new:[h,...p.newEntities,...b.newEntities],updated:[h],deleted:[]}}}function co(n,e){const t=Ir(n);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=co(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function Pv(n,e,t=new Set){const i=Fn(n),a=Fn(e),s=i.filter(p=>!a.includes(p)),o=i.filter(p=>a.includes(p)),d=s.reduce((p,h)=>t.has(h.id)?p:(t.add(h.id),S([...p,...Pv(h,e,t)])),[]);return S([...o,...d])}function ya(n,e){const t=co(n,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function y3(n,e){return!!co(n,e).last}function h3(n){if(Me.includes(n.type))return n;if([...Rn,r.VariableDeclaration].includes(n.type)){const e=n.parent;return Me.includes(e.type)?e:null}return null}function Ad(n,e){if(!n||!e)throw new Error("Both entities must be defined to find a common ancestor");if(n===e)return n;const t=n.parent;if(t){if(t===e)return e;if(t.type===r.Project)return null}else return null;const i=e.parent;if(i){if(i===n)return n;if(i.type===r.Project)return null}else return null;return Ad(t,i)}function He(n){if(bo.includes(n.type)){if(n.type===r.FunctionDeclaration){const e=n.parent;if(e.type===r.CustomEntity)return e}return n}else{const e=n.parent;return e?He(e):null}}function f3(n){return n.type===r.VariableDeclaration?[n]:we.includes(n.type)?[...n.inputs,...n.outputs||[]]:n.type===r.ReturnStatement?n.outputs:Sr.includes(n.type)||n.type===r.FunctionDeclaration?n.inputs:[]}function m3(n){const e=Fn(n),t=[],i=[];xd.includes(n.type)&&t.push(...Sd(n));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Rn.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>ya(o,s)?-1:0),i.sort((s,o)=>ya(o,s)?-1:0),[...t,...i,...a]}function Dv(n){return[...n].sort((e,t)=>ya(t,e)?-1:0)}function T3(n){const e=Dv(n),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];ya(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function ht(n){const e=n.map(t=>He(t));return S(e)}function Sd(n){return we.includes(n.type)?[...ht(n.successCalls),...ht(n.errorCalls)]:Me.includes(n.type)?ht(n.calls):[]}function E3(n,e){return Sd(n).includes(e)}function Od(n){return n.writesValues||[]}function R3(n,e){return Od(n).includes(e)}function Av(n){var e;return Ge.includes((e=n==null?void 0:n.readsValue)==null?void 0:e.type)?n.readsValue:null}function b3(n){return n.writesValues}function Sv(n=[]){return n.map(Av).filter(e=>!!e)}function uo(n=[]){return n.map(e=>e.writesValues).flat().filter(e=>Ge.includes(e.type))}function Ov(n=[]){return n.map(e=>e.readsValue).filter(e=>!!e&&Ge.includes(e.type))}function Cv(n){return Ge.includes(n.type)?n:null}function Bv(n){return n.writesValues.map(Cv).filter(e=>!!e)}function wv(n=[]){return n.reduce((e,t)=>t.type===r.OutputMap?[...e,...Bv(t)]:e,[])}function Ie(n){return we.includes(n.type)?[...Kt(ht(n.successCalls)),...Kt(ht(n.errorCalls))]:Me.includes(n.type)?Kt(ht(n.calls)):[]}function g3(n){return we.includes(n.type)?[...Kt(ht(n.successCalls)),...Kt(ht(n.errorCalls))]:Me.includes(n.type)?Kt(ht(n.calls)):[]}function _v(n,e=new Set){return n.writesValues.filter(i=>Ge.includes(i.type)&&!e.has(i.id)).reduce((i,a)=>e.has(a.id)?i:[...i,...Z(a,e)],[])}function Mv(n,e=new Set){var i;return(((i=n.readsValue)==null?void 0:i.writesValues)||[]).filter(a=>Ge.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...Z(s,e)],[])}function Z(n,e=new Set){if(e.has(n.id))return[];if(n.type===r.ReturnStatement)return Ov(n.outputs).reduce((i,a)=>[...i,...Z(a,e)],[]);if(n.type===r.FunctionCall||n.type===r.Operation||n.type===r.Condition)return[...Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]),...Sv(n.inputs),...wv(n.outputs)].reduce((s,o)=>[...s,...Z(o,e)],[]);if(Sr.includes(n.type)){const t=uo(n.inputs),a=Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o,e)],[])}if(n.type===r.FunctionDeclaration){const t=[...uo(n.inputs)],a=Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o)],[])}if(Ge.includes(n.type)){e.add(n.id);const i=Ie(n).reduce((a,s)=>{const o=He(s);return[...a,...Z(o||s,e)]},[]);return[n,...i,...Mv(n,e),..._v(n,e)]}return[]}function It(n,e=new Set){return e.has(n.id)?[]:(e.add(n.id),[...Fn(n).reduce((a,s)=>[...a,s,...It(s,e)],[])])}function Kt(n){return n.reduce((e,t)=>t.type===r.ReturnStatement||t.type===r.ContinueStatement||t.type===r.BreakStatement?[...e,t]:[...e,t,...Ie(t)],[])}function Nv(n){const e=n.entities||[],t=[...e,...n.functions||[],...n.events||[],...n.projects||[]],i=e.reduce((p,h)=>[...p,...h.properties],[]),a=e.reduce((p,h)=>[...p,...h.methods],[]),s=a.reduce((p,h)=>[...p,...uo(h.inputs),...Kt(ht(h.calls)),...h.returnStatements],[]),o=n.functions.reduce((p,h)=>[...p,...Kt(ht(h.calls)),...h.returnStatements],[]),d=n.events.reduce((p,h)=>[...p,...Kt(ht(h.calls)),...h.returnStatements],[]);return[...t,...i,...a,...s,...o,...d]}function $v(n,e){return e.filter(i=>{if(!i)return!1;switch(i.type){case r.FunctionCall:return i.inputs.find(a=>a.id===n.id)!==void 0||i.outputs.find(a=>a.id===n.id)!==void 0;case r.Condition:return i.successCalls.find(a=>a.id===n.id)!==void 0||i.errorCalls.find(a=>a.id===n.id)!==void 0||i.inputs.find(a=>a.id===n.id)!==void 0;case r.Operation:return i.outputs.find(a=>a.id===n.id)!==void 0;case r.VariableDeclaration:return we.includes(n.type)?Vv(n).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===i.id})!==void 0:!1;case r.CustomEntity:return i.properties.find(a=>a.id===n.id)!==void 0||i.methods.find(a=>a.id===n.id)!==void 0;case r.FunctionDeclaration:return i.inputs.find(a=>a.id===n.id)!==void 0||(i.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===n.id)!==void 0;default:return!1}})}function v3(n){const e=Nv(n.project);return $v(n,e)}function Ir(n){const e=[];if(Rn.includes(n.type)){n.calledBy.forEach(a=>{const s=He(a);s&&e.push(s)});const i=[...n.inputs||[],...n.outputs||[]].map(a=>wd(a)).filter(a=>a!==null);e.push(...S(i))}if(Ge.includes(n.type)){const t=wd(n);t&&e.push(t)}return S(e)}function Cd(n){return n.type===r.FunctionCall||n.type===r.InternalCall?n.declaration.inputs:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedArguments:n.type===r.FunctionDeclaration||Sr.includes(n.type)?n.inputs:n.type===r.Search?n.inputsDeclarations:[]}function I3(n,e){return e.type===r.Condition?e.inputs.find(t=>t.declaration.id===n.id):e.type===r.FunctionCall||e.type===r.Operation?e.inputs.find(t=>t.declaration.id===n.id):null}function Vv(n){return we.includes(n.type)?n.inputs:[]}function Bd(n){var e;return n.type===r.FunctionCall?((e=n.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedReturns:n.type===r.Search?n.outputsDeclarations:Ce.includes(n.type)?n.outputs:[]}function P3(n,e){return e.type===r.Condition?null:e.type===r.FunctionCall||e.type===r.Operation?e.outputs.find(t=>t.declaration.id===n.id):null}function D3(n){return n.type===r.Condition?[]:we.includes(n.type)?n.outputs:[]}function wd(n){const e=n.readsValue;return e?He(e):null}function Lv(n){const e=n.internalCalls||[];return S(ht(S(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function pi(n){const e=Od(n),t=[];return e.forEach(i=>{if(Ge.includes(i.type))t.push(i);else if(i.type===r.InputMap){const a=i.parent;if(a.type===r.InputMap){const s=a.parent;t.push(s)}else t.push(a)}else[r.ActionDescriptor].includes(i.parent.type)||t.push(i.parent)}),t}function S(n){const e=new Set;return n.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function Fn(n,e=!1){const t=[];if(n.type===r.Project&&t.push(...(n==null?void 0:n.entities)||[],...(n==null?void 0:n.functions)||[],...(n==null?void 0:n.variableDeclarations)||[],...(n==null?void 0:n.variableInstances)||[],...(n==null?void 0:n.searches)||[],...(n==null?void 0:n.loops)||[],...(n==null?void 0:n.operations)||[],...(n==null?void 0:n.conditions)||[],...(n==null?void 0:n.functionCalls)||[],...(n==null?void 0:n.events)||[],...(n==null?void 0:n.projects)||[]),st.includes(n.type)&&t.push(...(n==null?void 0:n.detachedChildren)||[]),n.type===r.CustomEntity){const i=[...n.suggestedMethods,...n.methods].flatMap(a=>a.collapsed&&e?[]:Fn(a));t.push(...i)}if(n.type===r.Condition){const i=n.successCalls.map(s=>He(s)),a=n.errorCalls.map(s=>He(s));t.push(...i,...a)}if(Sr.includes(n.type)){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>pi(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}if(we.includes(n.type)&&n.type!==r.Condition){const i=n==null?void 0:n.outputs.map(o=>pi(o)).flat(),a=n.successCalls.map(o=>He(o)),s=n.errorCalls.map(o=>He(o));t.push(...S(i),...a,...s)}if(Ge.includes(n.type)){const i=pi(n),a=Lv(n);t.push(...i,...a)}if(n.type===r.Loop){const i=n.outputs.map(o=>pi(o)).flat();if(n.body){const o=Fn(n.body,e);t.push(...o)}const a=n.errorCalls.map(o=>He(o)),s=n.successCalls.map(o=>He(o));t.push(...S(i),...s,...a)}if(n.type===r.FunctionDeclaration){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>pi(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}return S(t)}function Gv(n,e=!1){const t=Fn(n,e),i=[...t,...t.reduce((a,s)=>[...a,...Gv(s,e)],[])];return S(i)}function Fv(n){const e=Ir(n),t=[...e,...e.reduce((i,a)=>[...i,...Fv(a)],[])];return S(t)}function po(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...po(t),...yo(t)]:[...e,t.name],[])}function yo(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...yo(t),...po(t)]:[...e,t.name],[])}function _d(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,..._d(t),...Md(t)]:[...e,t],[])}function Md(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,...Md(t),..._d(t)]:[...e,t],[])}function Uv(n){return[...yo(n),...po(n)].filter((t,i,a)=>a.indexOf(t)===i)}function xv(n){return n.implements.length===0&&n.extends.length===0?null:n.implements.find(i=>i.type===r.BuiltInBaseEntity&&i.name===_.PERSISTED_ENTITY)?n:[...n.implements,...n.extends].reduce((i,a)=>{if(a.type===r.CustomEntity){const s=xv(a);if(s)return s}return i},null)}function A3(n){const e=n.extends.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function S3(n){const e=n.implements.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function jv(n){const e=n.extends.find(t=>t.type===r.CustomEntity);return e&&e.type===r.CustomEntity?e:null}function Un(n){const e=[...n.implements,...n.extends].reduce((t,i)=>i.type===r.BuiltInBaseEntity?[...t,i]:i.type===r.CustomEntity?[...t,...Un(i)]:t,[]);return S(e)}function Nd(n){return n.type===r.PrimitiveEntity?!0:n.type===r.BuiltInBaseEntity?n.interactive:!Un(n).find(i=>!i.interactive)}function O3(n){return n.parent===n.project&&n.project.variableDeclarations.includes(n)}function $d(n){return n.parent!==n.project?!1:r.VariableDeclaration===n.type?n.project.variableDeclarations.includes(n):r.VariableInstance===n.type?n.project.variableInstances.includes(n):r.FunctionCall===n.type?n.project.functionCalls.includes(n):r.Condition===n.type?n.project.conditions.includes(n):r.Operation===n.type?n.project.operations.includes(n):r.Loop===n.type?n.project.loops.includes(n):r.Search===n.type?n.project.searches.includes(n):!1}function kv(n){if([...Me,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||$d(n))return!1;const e=Ir(n);return e.length===0?!0:e.some(t=>kv(t))}function Vd(n){return[...Me,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||$d(n)?!1:Ir(n).length===0}function qv(n,e=0){if(Vd(n)){const t=Ir(n);return t.length===0?n:t.map(a=>qv(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function Jv(n){const e=[];if(Vd(n))e.push(n);else return[];return Ir(n).forEach(i=>{e.push(...Jv(i))}),e}function Wv(n){return n.type===r.FunctionDeclaration&&n.parent!==n.project&&!![r.CustomEntity,r.Loop,r.InstalledProject].includes(n.parent.type)}function Ld(n,e){const t=new Map;return n.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function ho(n){switch(n){case r.CustomEntity:return Dr;case r.FunctionDeclaration:return ur;case r.VariableDeclaration:return fr;case r.VariableInstance:return mr;case r.FunctionCall:return vr;case r.Operation:return pr;case r.Condition:return hr;case r.ReturnStatement:return br;case r.Loop:return yr;case r.Search:return Tr;case r.InputMap:return mn;case r.OutputMap:return Tn;case r.ArgumentDeclaration:return Rr;case r.ReturnDeclaration:return Ct;case r.Property:return dr;case r.InstalledProject:return Er;case r.Project:return $;case r.BuiltInBaseEntity:return $t;default:return null}}function ft(n,e){if(st.includes(n.type))return n;if(Or.includes(n.type))return null;const t=n.parent;if(!t)return null;if(t.type===r.GenericReference){const i=D(t);if(!i)return null;const a=e.get(i);return a?ft(a,e):null}else return t===e?e:ft(t,e)}function Gd(n,e){if(Or.includes(n.type)||e.getAllBuiltInIds().includes(n.id))return null;const i=Bt(n.parent,e);return i?i===e?st.includes(n.type)?n:null:i.type===r.CustomEntity?n:Gd(i,e):null}function fo(n,e,t){if(n===e||e===t||n===t)return!1;const i=ft(e.parent,t);return i===n?!0:fo(i,e,t)}var mo=(n=>(n.SameBothLocal="same-both-local",n.AInB="a-in-b",n.BInA="b-in-a",n.ParallelInCommonParent="parallel-in-common-parent",n.ParallelInProject="parallel-in-project",n.AIsGlobalBIsNot="a-is-global-b-is-not",n.BIsGlobalAIsNot="b-is-global-a-is-not",n.SameBothGlobal="same-both-global",n))(mo||{});function ha(n,e,t){const i=ft(n,t),a=ft(e,t);if(!i)throw new Error("Could not find scope owner for the entity: "+n.id);if(!a)throw new Error("Could not find scope owner for the entity: "+e.id);if(i===a&&i.type!==r.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:i};if(i===a&&i.type===r.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:i};if(i.type===r.Project&&a.type!==r.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:i};if(i.type!==r.Project&&a.type===r.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(fo(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(fo(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const d=Ad(i,a);return d===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:d}:d?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:ft(d,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function Hv(n,e,t){const i=ha(n,e,t);if(!i.compatible||i.type!=="same-both-local")return null;if(n===e)return n;let a=ft(n.parent,t);if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;for(;a;){if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;a=ft(a.parent,t)}let s=ft(e.parent,t);if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;for(;s;){if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;s=ft(s.parent,t)}return null}function Yv(n){return n.length===0?null:n.length===1?n[0]:n.reduce((t,i)=>{const a=Hv(t,i,i.project);return!a||a===i?t:i},n[0])}function Bt(n,e){let t;return typeof n=="string"?t=n:n.type===r.GenericReference?t=D(n):t=n.id,t===e.id?e:e.get(t)}function Pr(n){if(Or.includes(n.type))return n;if(n.type===r.Project)return null;if(n.project.getAllBuiltInIds().includes(n.id))return n;const t=n.parent;return!t||t.type===r.Project?null:Pr(t)}function fa(n,e){var t;if(n.readsValue){const i=Bt(n.readsValue,e.project);e.setValueWriter(i),i.addValueReader(e)}else n.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function ma(n){const e=[];function t(s,o){return e.some(d=>d.blockedByCaller===s&&d.blockedByCalling===o)}function i(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=Gd(n,n.project);return n.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))});let d;if(we.includes(s.type)&&(d=s),d){const p=ma(d);p.reachable||Ie(n).find(f=>f===s)||p.blocks.forEach(f=>{i(s,f.blockedByCalling)})}}),n.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))});let d;if(we.includes(s.type)&&(d=s),d){const p=ma(d);p.reachable||Ie(n).find(f=>f===s)||p.blocks.forEach(f=>{i(s,f.blockedByCalling)})}}),n.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))}),s===a)return;let d;if(s.type===r.FunctionDeclaration){const p=He(s);if(p.type===r.CustomEntity)return;p.type===r.Loop&&(d=p)}if(d){const p=ma(d);p.reachable||p.blocks.forEach(h=>{i(s,h.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function C3(n){return bo.includes(n.type)?n.type===r.FunctionDeclaration?!Wv(n):!0:!1}function B3(n){if(r.ActionDescriptor===n.type){if(n.project.operationDeclarations.find(s=>s.id===n.id))return r.Operation;if(n.project.globalEventActionDescriptors.find(s=>s.id===n.id))return r.GlobalEvent;if(n.project.loopDeclarations.find(s=>s.id===n.id))return r.Loop;if(n.project.conditionDeclarations.find(s=>s.id===n.id))return r.Condition}return n.type}function w3(n,e){const t=[];if(n.parent)if(n.id===n.parent)t.push(new E({id:`${n.id}--${n.parent}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.parent);i?[r.Project,r.DataType].includes(i.type)||t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return n.implements&&Array.isArray(n.implements)?n.implements.forEach(i=>{if(n.id===i){t.push(new E({id:`${n.id}--${i}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' property that isn't an array.`,issue:null})),n.extends&&Array.isArray(n.extends)&&n.extends.forEach(i=>{const a=e.get(i);a?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 pe=class pe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"static");l(this,"abstract");l(this,"type",r.CustomEntity);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"implements",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(this,"suggestedProperties",[]);l(this,"suggestedMethods",[]);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,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=D(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:r.CustomEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:i},d=R(o,t);return d.setParent(i),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=w3(i,t),o=Ks(i,t);a.push(...s,...o,...Ae(i));const d=i.parent?t.get(i.parent):null;if(d&&d.type===r.DataType){const p=d;p.entity&&a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.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.
|
|
370
|
+
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 e;return this.parent===this.project&&this.project.addFunctionCall(this),(e=this.process)==null||e.writesValues.forEach(t=>{t.setValueWriter(this.process)}),this.successCalls.forEach(t=>{t.addSuccessCaller(this)}),this.errorCalls.forEach(t=>{t.addErrorCaller(this)}),this.calledBySuccess.forEach(t=>{t.addSuccessCall(this)}),this.calledByError.forEach(t=>{t.addErrorCall(this)}),this.calledByEntry.forEach(t=>{t.addCall(this)}),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===r.FunctionDeclaration){const e=R(this.initialData.declaration,this.project);this.declaration=e}else{const e=D(this.initialData.declaration),t=this.project.get(e);this.declaration=t}return this.successCalls=this.initialData.successCalls.map(e=>{const t=R(e,this.project);return t.addSuccessCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.errorCalls=this.initialData.errorCalls.map(e=>{const t=R(e,this.project);return t.addErrorCaller(this),[r.BreakStatement,r.ContinueStatement].includes(t.type)?(t.setParent(this.parent.parent),t.initChildren()):t.type!==r.InternalCall&&(t.setParent(this.parent),t.initChildren()),t}),this.inputs=this.initialData.inputs.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.initOutputs(),this.initialData.process&&(this.process=R(this.initialData.process,this.project),this.process.setParent(this),this.process.initChildren()),this.initialData.error&&(this.error=R(this.initialData.error,this.project),this.error.setParent(this),this.error.initChildren()),this}initOutputs(){const e=[];this.outputs=this.initialData.outputs.map(s=>{const o=R(s,this.project);return e.push(o.index),o.setParent(this),o.initChildren(),o});const i=Cd(this).filter(s=>!this.outputs.find(o=>o.declaration.id===s.id));i.sort((s,o)=>s.index-o.index);const a=i.map((s,o)=>{const d=e.includes(s.index)?this.outputs.length-1+o:s.index,p={id:$.UUID.uuid(),type:r.OutputMap,version:1,declaration:s,index:d,parent:this,writesValues:[]},h=R(p,this.project);return h.setParent(this),h.initChildren(),h});return this.outputs.push(...a),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:d}=(s=this.process)==null?void 0:s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}if(this.inputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.outputs.forEach(o=>{const{affected:d,removed:p}=o.remove({ignoreUpstream:!0,seenEntities:t});i.push(...d),a.push(...p)}),this.error){const{affected:o,removed:d}=this.error.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}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:S(i),removed:S(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:S(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:r.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===r.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=u3(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 ge(this.toJSON(),this.project)}};l(ge,"MUTABLE_BASE_PROPERTIES",[]),l(ge,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(ge,"BASE_PROPERTIES",[...ge.MUTABLE_BASE_PROPERTIES,...ge.INMUTABLE_BASE_PROPERTIES]),l(ge,"MUTABLE_META_PROPERTIES",["x","y"]),l(ge,"INMUTABLE_META_PROPERTIES",[...ge.INMUTABLE_BASE_PROPERTIES]),l(ge,"META_PROPERTIES",[...ge.MUTABLE_META_PROPERTIES,...ge.INMUTABLE_META_PROPERTIES]),l(ge,"MUTABLE_UPSTREAM_PROPERTIES",["calledBySuccess","calledByError","calledByEntry"]),l(ge,"INMUTABLE_UPSTREAM_PROPERTIES",["declaration","parent"]),l(ge,"UPSTREAM_PROPERTIES",[...ge.MUTABLE_UPSTREAM_PROPERTIES,...ge.INMUTABLE_UPSTREAM_PROPERTIES]),l(ge,"MUTABLE_DOWNSTREAM_PROPERTIES",["successCalls","errorCalls","writesValues","inputs","outputs","error"]),l(ge,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(ge,"DOWNSTREAM_PROPERTIES",[...ge.MUTABLE_DOWNSTREAM_PROPERTIES,...ge.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(ge,"PROPERTIES",[...ge.META_PROPERTIES,...ge.UPSTREAM_PROPERTIES,...ge.DOWNSTREAM_PROPERTIES]);let vr=ge;function bv(n){var e,t,i;switch(n.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const a=n.project.entities.filter(T=>!!T.implements.find(f=>f.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));if(a.find(T=>!!T.properties.find(f=>{var b;return f.implements&&f.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((b=f.getDefaultValue())==null?void 0:b.value)===!0}))){const f=a[0].properties.find(I=>I.implements&&I.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),b=(e=f==null?void 0:f.dataType)==null?void 0:e.defaultValue;if(b)b.value=!0;else if(f!=null&&f.dataType){const I=(t=f==null?void 0:f.dataType)==null?void 0:t.id.split("-id")[0],B=R({id:I+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:f==null?void 0:f.dataType.toReference()},n.project);return B.setParent(f==null?void 0:f.dataType),B.initChildren(),B.addSelfToProject(),{newEntities:[B]}}return{newEntities:[]}}const o=n.project.get(Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),d=lo(o,"Main database");if(d.errors.length>0)return{newEntities:[]};const p=d.implemented.properties.find(T=>T.implements&&T.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default),h=(i=p==null?void 0:p.dataType)==null?void 0:i.defaultValue;if(h)h.value=!0;else if(p!=null&&p.dataType){const T=p==null?void 0:p.dataType.id.split("-id")[0],f=R({id:T+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:!0,valueAsType:null,parent:p==null?void 0:p.dataType.toReference()},n.project);f.setParent(p==null?void 0:p.dataType),f.initChildren(),f.addSelfToProject()}return{newEntities:[d.implemented]}}}return{newEntities:[]}}function gv(n){return n.implements.filter(t=>t.type===r.BuiltInBaseEntity).map(t=>{var i;switch(t.id){case Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const s=n.project.entities.filter(p=>p.implements.find(h=>h.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)).find(p=>!!p.properties.find(h=>{var T;return h.implements&&h.implements.id===Ve["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default&&((T=h.getDefaultValue())==null?void 0:T.value)===!0}));if(!s)return{newEntities:[]};const o=n.properties.find(p=>p.implements&&p.implements.id===Ve["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database),d=(i=o==null?void 0:o.dataType)==null?void 0:i.defaultValue;if(o&&(o!=null&&o.dataType)&&!d){const p=o==null?void 0:o.dataType.id.split("-id")[0],h=R({id:p+"-default-value-id",version:1,type:r.PrimitiveValue,name:v.EntityTemplate,autogeneration:null,value:null,valueAsType:s,parent:o==null?void 0:o.dataType.toReference()},n.project);return h.setParent(o==null?void 0:o.dataType),h.initChildren(),h.addSelfToProject(),{newEntities:[h]}}return{newEntities:[]}}}}),{newEntities:[]}}function lo(n,e,t){const i=t||Xt(e,r.CustomEntity,n.project),a=i.split("-id"),s=a[a.length-1||0]||i,o={id:i,version:1,name:e,type:r.CustomEntity,description:null,static:!1,abstract:!1,properties:[],methods:[],abstractMethods:[],extends:[],implements:[n],x:0,y:0,parent:n.project},d=Ks(o,n.project);if(d.length>0)return{errors:d,implemented:null,entitiesChanges:{new:[],updated:[],deleted:[]}};const p=bv(n),h=R(o,n.project);h.setParent(n.project),h.initChildren();const T=n.properties.map(I=>{const B=s+"-"+Xt(A(I,n.project),r.Property,n.project),G=I.clone(h,B);return G.abstract=!1,G.implements=I,G.setParent(h),h.addProperty(G),G}),f=n.abstractMethods.map(I=>{const B=s+Xt(I.name,r.FunctionDeclaration,n.project),G=I.implementAsFunctionDeclaration(B),q={id:B+"-parent-ref-id",type:r.GenericReference,entityId:i,entityType:r.CustomEntity},jt={...G,implements:I,parent:q},Le=R(jt,n.project);return h.addMethod(Le),Le.setParent(h),Le.initChildren(),Le.implements=I,Le});o.properties=T,o.methods=f;const b=gv(h);return{implemented:h,errors:[],entitiesChanges:{new:[h,...p.newEntities,...b.newEntities],updated:[h],deleted:[]}}}function co(n,e){const t=Ir(n);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=co(s,e);return o.last&&(i=o.last),[s,...o.list]}),last:i}}function vv(n,e,t=new Set){const i=Fn(n),a=Fn(e),s=i.filter(p=>!a.includes(p)),o=i.filter(p=>a.includes(p)),d=s.reduce((p,h)=>t.has(h.id)?p:(t.add(h.id),S([...p,...vv(h,e,t)])),[]);return S([...o,...d])}function pa(n,e){const t=co(n,e);return t.last===e&&t.list.length>0&&t.list[0]!==e}function p3(n,e){return!!co(n,e).last}function y3(n){if(Me.includes(n.type))return n;if([...Rn,r.VariableDeclaration].includes(n.type)){const e=n.parent;return Me.includes(e.type)?e:null}return null}function Dd(n,e){if(!n||!e)throw new Error("Both entities must be defined to find a common ancestor");if(n===e)return n;const t=n.parent;if(t){if(t===e)return e;if(t.type===r.Project)return null}else return null;const i=e.parent;if(i){if(i===n)return n;if(i.type===r.Project)return null}else return null;return Dd(t,i)}function He(n){if(bo.includes(n.type)){if(n.type===r.FunctionDeclaration){const e=n.parent;if(e.type===r.CustomEntity)return e}return n}else{const e=n.parent;return e?He(e):null}}function h3(n){return n.type===r.VariableDeclaration?[n]:we.includes(n.type)?[...n.inputs,...n.outputs||[]]:n.type===r.ReturnStatement?n.outputs:Sr.includes(n.type)||n.type===r.FunctionDeclaration?n.inputs:[]}function f3(n){const e=Fn(n),t=[],i=[];Fd.includes(n.type)&&t.push(...Ad(n));const a=e.filter(s=>{const o=t.includes(s);return o?!1:Rn.includes(s.type)&&!o?(i.push(s),!1):!0});return t.sort((s,o)=>pa(o,s)?-1:0),i.sort((s,o)=>pa(o,s)?-1:0),[...t,...i,...a]}function Iv(n){return[...n].sort((e,t)=>pa(t,e)?-1:0)}function m3(n){const e=Iv(n),t=[];return e.forEach(i=>{const a=t[t.length-1];if(a){const s=a[a.length-1];pa(i,s)?t.push([i]):a.push(i)}else t.push([i])}),t}function ht(n){const e=n.map(t=>He(t));return S(e)}function Ad(n){return we.includes(n.type)?[...ht(n.successCalls),...ht(n.errorCalls)]:Me.includes(n.type)?ht(n.calls):[]}function T3(n,e){return Ad(n).includes(e)}function Sd(n){return n.writesValues||[]}function E3(n,e){return Sd(n).includes(e)}function Pv(n){var e;return Ge.includes((e=n==null?void 0:n.readsValue)==null?void 0:e.type)?n.readsValue:null}function R3(n){return n.writesValues}function Dv(n=[]){return n.map(Pv).filter(e=>!!e)}function uo(n=[]){return n.map(e=>e.writesValues).flat().filter(e=>Ge.includes(e.type))}function Av(n=[]){return n.map(e=>e.readsValue).filter(e=>!!e&&Ge.includes(e.type))}function Sv(n){return Ge.includes(n.type)?n:null}function Ov(n){return n.writesValues.map(Sv).filter(e=>!!e)}function Cv(n=[]){return n.reduce((e,t)=>t.type===r.OutputMap?[...e,...Ov(t)]:e,[])}function Ie(n){return we.includes(n.type)?[...Kt(ht(n.successCalls)),...Kt(ht(n.errorCalls))]:Me.includes(n.type)?Kt(ht(n.calls)):[]}function b3(n){return we.includes(n.type)?[...Kt(ht(n.successCalls)),...Kt(ht(n.errorCalls))]:Me.includes(n.type)?Kt(ht(n.calls)):[]}function Bv(n,e=new Set){return n.writesValues.filter(i=>Ge.includes(i.type)&&!e.has(i.id)).reduce((i,a)=>e.has(a.id)?i:[...i,...Z(a,e)],[])}function wv(n,e=new Set){var i;return(((i=n.readsValue)==null?void 0:i.writesValues)||[]).filter(a=>Ge.includes(a.type)&&!e.has(a.id)).reduce((a,s)=>e.has(s.id)?a:[...a,...Z(s,e)],[])}function Z(n,e=new Set){if(e.has(n.id))return[];if(n.type===r.ReturnStatement)return Av(n.outputs).reduce((i,a)=>[...i,...Z(a,e)],[]);if(n.type===r.FunctionCall||n.type===r.Operation||n.type===r.Condition)return[...Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]),...Dv(n.inputs),...Cv(n.outputs)].reduce((s,o)=>[...s,...Z(o,e)],[]);if(Sr.includes(n.type)){const t=uo(n.inputs),a=Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o,e)],[])}if(n.type===r.FunctionDeclaration){const t=[...uo(n.inputs)],a=Ie(n).reduce((s,o)=>{const d=He(o);return[...s,...Z(d||o,e)]},[]);return t.push(...a),t.reduce((s,o)=>[...s,...Z(o)],[])}if(Ge.includes(n.type)){e.add(n.id);const i=Ie(n).reduce((a,s)=>{const o=He(s);return[...a,...Z(o||s,e)]},[]);return[n,...i,...wv(n,e),...Bv(n,e)]}return[]}function It(n,e=new Set){return e.has(n.id)?[]:(e.add(n.id),[...Fn(n).reduce((a,s)=>[...a,s,...It(s,e)],[])])}function Kt(n){return n.reduce((e,t)=>t.type===r.ReturnStatement||t.type===r.ContinueStatement||t.type===r.BreakStatement?[...e,t]:[...e,t,...Ie(t)],[])}function _v(n){const e=n.entities||[],t=[...e,...n.functions||[],...n.events||[],...n.projects||[]],i=e.reduce((p,h)=>[...p,...h.properties],[]),a=e.reduce((p,h)=>[...p,...h.methods],[]),s=a.reduce((p,h)=>[...p,...uo(h.inputs),...Kt(ht(h.calls)),...h.returnStatements],[]),o=n.functions.reduce((p,h)=>[...p,...Kt(ht(h.calls)),...h.returnStatements],[]),d=n.events.reduce((p,h)=>[...p,...Kt(ht(h.calls)),...h.returnStatements],[]);return[...t,...i,...a,...s,...o,...d]}function Mv(n,e){return e.filter(i=>{if(!i)return!1;switch(i.type){case r.FunctionCall:return i.inputs.find(a=>a.id===n.id)!==void 0||i.outputs.find(a=>a.id===n.id)!==void 0;case r.Condition:return i.successCalls.find(a=>a.id===n.id)!==void 0||i.errorCalls.find(a=>a.id===n.id)!==void 0||i.inputs.find(a=>a.id===n.id)!==void 0;case r.Operation:return i.outputs.find(a=>a.id===n.id)!==void 0;case r.VariableDeclaration:return we.includes(n.type)?Nv(n).find(s=>{var o;return((o=s.readsValue)==null?void 0:o.id)===i.id})!==void 0:!1;case r.CustomEntity:return i.properties.find(a=>a.id===n.id)!==void 0||i.methods.find(a=>a.id===n.id)!==void 0;case r.FunctionDeclaration:return i.inputs.find(a=>a.id===n.id)!==void 0||(i.returnStatements.map(a=>a.outputs).flat()||[]).find(a=>a.id===n.id)!==void 0;default:return!1}})}function g3(n){const e=_v(n.project);return Mv(n,e)}function Ir(n){const e=[];if(Rn.includes(n.type)){n.calledBy.forEach(a=>{const s=He(a);s&&e.push(s)});const i=[...n.inputs||[],...n.outputs||[]].map(a=>Bd(a)).filter(a=>a!==null);e.push(...S(i))}if(Ge.includes(n.type)){const t=Bd(n);t&&e.push(t)}return S(e)}function Od(n){return n.type===r.FunctionCall||n.type===r.InternalCall?n.declaration.inputs:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedArguments:n.type===r.FunctionDeclaration||Sr.includes(n.type)?n.inputs:n.type===r.Search?n.inputsDeclarations:[]}function v3(n,e){return e.type===r.Condition?e.inputs.find(t=>t.declaration.id===n.id):e.type===r.FunctionCall||e.type===r.Operation?e.inputs.find(t=>t.declaration.id===n.id):null}function Nv(n){return we.includes(n.type)?n.inputs:[]}function Cd(n){var e;return n.type===r.FunctionCall?((e=n.declaration.returnStatements[0])==null?void 0:e.outputs)||[]:[r.Operation,r.Condition,r.Loop].includes(n.type)?n.declaration.fixedReturns:n.type===r.Search?n.outputsDeclarations:Ce.includes(n.type)?n.outputs:[]}function I3(n,e){return e.type===r.Condition?null:e.type===r.FunctionCall||e.type===r.Operation?e.outputs.find(t=>t.declaration.id===n.id):null}function P3(n){return n.type===r.Condition?[]:we.includes(n.type)?n.outputs:[]}function Bd(n){const e=n.readsValue;return e?He(e):null}function $v(n){const e=n.internalCalls||[];return S(ht(S(e.flatMap(t=>[...t.successCalls,...t.errorCalls]))))}function ui(n){const e=Sd(n),t=[];return e.forEach(i=>{if(Ge.includes(i.type))t.push(i);else if(i.type===r.InputMap){const a=i.parent;if(a.type===r.InputMap){const s=a.parent;t.push(s)}else t.push(a)}else[r.ActionDescriptor].includes(i.parent.type)||t.push(i.parent)}),t}function S(n){const e=new Set;return n.filter(t=>!t||e.has(t.id)?!1:(e.add(t.id),!0))}function Fn(n,e=!1){const t=[];if(n.type===r.Project&&t.push(...(n==null?void 0:n.entities)||[],...(n==null?void 0:n.functions)||[],...(n==null?void 0:n.variableDeclarations)||[],...(n==null?void 0:n.variableInstances)||[],...(n==null?void 0:n.searches)||[],...(n==null?void 0:n.loops)||[],...(n==null?void 0:n.operations)||[],...(n==null?void 0:n.conditions)||[],...(n==null?void 0:n.functionCalls)||[],...(n==null?void 0:n.events)||[],...(n==null?void 0:n.projects)||[]),st.includes(n.type)&&t.push(...(n==null?void 0:n.detachedChildren)||[]),n.type===r.CustomEntity){const i=[...n.suggestedMethods,...n.methods].flatMap(a=>a.collapsed&&e?[]:Fn(a));t.push(...i)}if(n.type===r.Condition){const i=n.successCalls.map(s=>He(s)),a=n.errorCalls.map(s=>He(s));t.push(...i,...a)}if(Sr.includes(n.type)){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>ui(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}if(we.includes(n.type)&&n.type!==r.Condition){const i=n==null?void 0:n.outputs.map(o=>ui(o)).flat(),a=n.successCalls.map(o=>He(o)),s=n.errorCalls.map(o=>He(o));t.push(...S(i),...a,...s)}if(Ge.includes(n.type)){const i=ui(n),a=$v(n);t.push(...i,...a)}if(n.type===r.Loop){const i=n.outputs.map(o=>ui(o)).flat();if(n.body){const o=Fn(n.body,e);t.push(...o)}const a=n.errorCalls.map(o=>He(o)),s=n.successCalls.map(o=>He(o));t.push(...S(i),...s,...a)}if(n.type===r.FunctionDeclaration){if(n.collapsed&&e)return[];const i=n.inputs.map(s=>ui(s)).flat(),a=n.calls.map(s=>He(s));t.push(...S(i),...a)}return S(t)}function Vv(n,e=!1){const t=Fn(n,e),i=[...t,...t.reduce((a,s)=>[...a,...Vv(s,e)],[])];return S(i)}function Lv(n){const e=Ir(n),t=[...e,...e.reduce((i,a)=>[...i,...Lv(a)],[])];return S(t)}function po(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...po(t),...yo(t)]:[...e,t.name],[])}function yo(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,r.CustomEntity,...yo(t),...po(t)]:[...e,t.name],[])}function wd(n){return n.extends.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,...wd(t),..._d(t)]:[...e,t],[])}function _d(n){return n.implements.reduce((e,t)=>t.type===r.CustomEntity?[...e,t,..._d(t),...wd(t)]:[...e,t],[])}function Gv(n){return[...yo(n),...po(n)].filter((t,i,a)=>a.indexOf(t)===i)}function Fv(n){return n.implements.length===0&&n.extends.length===0?null:n.implements.find(i=>i.type===r.BuiltInBaseEntity&&i.name===_.PERSISTED_ENTITY)?n:[...n.implements,...n.extends].reduce((i,a)=>{if(a.type===r.CustomEntity){const s=Fv(a);if(s)return s}return i},null)}function D3(n){const e=n.extends.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function A3(n){const e=n.implements.find(t=>t.type===r.BuiltInBaseEntity);return e&&e.type===r.BuiltInBaseEntity?e:null}function Uv(n){const e=n.extends.find(t=>t.type===r.CustomEntity);return e&&e.type===r.CustomEntity?e:null}function Un(n){const e=[...n.implements,...n.extends].reduce((t,i)=>i.type===r.BuiltInBaseEntity?[...t,i]:i.type===r.CustomEntity?[...t,...Un(i)]:t,[]);return S(e)}function Md(n){return n.type===r.PrimitiveEntity?!0:n.type===r.BuiltInBaseEntity?n.interactive:!Un(n).find(i=>!i.interactive)}function S3(n){return n.parent===n.project&&n.project.variableDeclarations.includes(n)}function Nd(n){return n.parent!==n.project?!1:r.VariableDeclaration===n.type?n.project.variableDeclarations.includes(n):r.VariableInstance===n.type?n.project.variableInstances.includes(n):r.FunctionCall===n.type?n.project.functionCalls.includes(n):r.Condition===n.type?n.project.conditions.includes(n):r.Operation===n.type?n.project.operations.includes(n):r.Loop===n.type?n.project.loops.includes(n):r.Search===n.type?n.project.searches.includes(n):!1}function xv(n){if([...Me,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||Nd(n))return!1;const e=Ir(n);return e.length===0?!0:e.some(t=>xv(t))}function $d(n){return[...Me,r.CustomEntity,r.InstalledProject,r.Project].includes(n.type)||Nd(n)?!1:Ir(n).length===0}function jv(n,e=0){if($d(n)){const t=Ir(n);return t.length===0?n:t.map(a=>jv(a,e+1)).reduce((a,s)=>a?s&&s.x<a.x?s:a:s,null)}return null}function kv(n){const e=[];if($d(n))e.push(n);else return[];return Ir(n).forEach(i=>{e.push(...kv(i))}),e}function qv(n){return n.type===r.FunctionDeclaration&&n.parent!==n.project&&!![r.CustomEntity,r.Loop,r.InstalledProject].includes(n.parent.type)}function O3(n,e){const t=new Map;return n.forEach(i=>{t.set(i.id,i)}),e.forEach(i=>{t.set(i.id,i)}),Array.from(t.values())}function ho(n){switch(n){case r.CustomEntity:return Dr;case r.FunctionDeclaration:return ur;case r.VariableDeclaration:return fr;case r.VariableInstance:return mr;case r.FunctionCall:return vr;case r.Operation:return pr;case r.Condition:return hr;case r.ReturnStatement:return br;case r.Loop:return yr;case r.Search:return Tr;case r.InputMap:return mn;case r.OutputMap:return Tn;case r.ArgumentDeclaration:return Rr;case r.ReturnDeclaration:return Ct;case r.Property:return dr;case r.InstalledProject:return Er;case r.Project:return $;case r.BuiltInBaseEntity:return $t;default:return null}}function ft(n,e){if(st.includes(n.type))return n;if(Or.includes(n.type))return null;const t=n.parent;if(!t)return null;if(t.type===r.GenericReference){const i=D(t);if(!i)return null;const a=e.get(i);return a?ft(a,e):null}else return t===e?e:ft(t,e)}function Vd(n,e){if(Or.includes(n.type)||e.getAllBuiltInIds().includes(n.id))return null;const i=Bt(n.parent,e);return i?i===e?st.includes(n.type)?n:null:i.type===r.CustomEntity?n:Vd(i,e):null}function fo(n,e,t){if(n===e||e===t||n===t)return!1;const i=ft(e.parent,t);return i===n?!0:fo(i,e,t)}var mo=(n=>(n.SameBothLocal="same-both-local",n.AInB="a-in-b",n.BInA="b-in-a",n.ParallelInCommonParent="parallel-in-common-parent",n.ParallelInProject="parallel-in-project",n.AIsGlobalBIsNot="a-is-global-b-is-not",n.BIsGlobalAIsNot="b-is-global-a-is-not",n.SameBothGlobal="same-both-global",n))(mo||{});function ya(n,e,t){const i=ft(n,t),a=ft(e,t);if(!i)throw new Error("Could not find scope owner for the entity: "+n.id);if(!a)throw new Error("Could not find scope owner for the entity: "+e.id);if(i===a&&i.type!==r.Project)return{compatible:!0,type:"same-both-local",commonAncestorScope:i};if(i===a&&i.type===r.Project)return{compatible:!0,type:"same-both-global",commonAncestorScope:i};if(i.type===r.Project&&a.type!==r.Project)return{compatible:!1,type:"a-is-global-b-is-not",commonAncestorScope:i};if(i.type!==r.Project&&a.type===r.Project)return{compatible:!1,type:"b-is-global-a-is-not",commonAncestorScope:a};if(fo(i,a,t))return{compatible:!0,type:"b-in-a",commonAncestorScope:i};if(fo(a,i,t))return{compatible:!0,type:"a-in-b",commonAncestorScope:a};const d=Dd(i,a);return d===t?{compatible:!1,type:"parallel-in-project",commonAncestorScope:d}:d?{compatible:!1,type:"parallel-in-common-parent",commonAncestorScope:ft(d,t)}:{compatible:!1,type:"parallel-in-project",commonAncestorScope:t}}function Jv(n,e,t){const i=ya(n,e,t);if(!i.compatible||i.type!=="same-both-local")return null;if(n===e)return n;let a=ft(n.parent,t);if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;for(;a;){if(a){if(a===e)return e;if(a.type===r.Project)return n}else return n;a=ft(a.parent,t)}let s=ft(e.parent,t);if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;for(;s;){if(s){if(s===n)return n;if(s.type===r.Project)return e}else return e;s=ft(s.parent,t)}return null}function Wv(n){return n.length===0?null:n.length===1?n[0]:n.reduce((t,i)=>{const a=Jv(t,i,i.project);return!a||a===i?t:i},n[0])}function Bt(n,e){let t;return typeof n=="string"?t=n:n.type===r.GenericReference?t=D(n):t=n.id,t===e.id?e:e.get(t)}function Pr(n){if(Or.includes(n.type))return n;if(n.type===r.Project)return null;if(n.project.getAllBuiltInIds().includes(n.id))return n;const t=n.parent;return!t||t.type===r.Project?null:Pr(t)}function ha(n,e){var t;if(n.readsValue){const i=Bt(n.readsValue,e.project);e.setValueWriter(i),i.addValueReader(e)}else n.readsValue===null&&((t=e.readsValue)==null||t.removeValueReader(e),e.readsValue=null);return e}function fa(n){const e=[];function t(s,o){return e.some(d=>d.blockedByCaller===s&&d.blockedByCalling===o)}function i(s,o){t(s,o)||e.push({blockedByCaller:s,blockedByCalling:o})}const a=Vd(n,n.project);return n.calledBySuccess.forEach(s=>{[...s.successCalls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))});let d;if(we.includes(s.type)&&(d=s),d){const p=fa(d);p.reachable||Ie(n).find(f=>f===s)||p.blocks.forEach(f=>{i(s,f.blockedByCalling)})}}),n.calledByError.forEach(s=>{[...s.errorCalls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))});let d;if(we.includes(s.type)&&(d=s),d){const p=fa(d);p.reachable||Ie(n).find(f=>f===s)||p.blocks.forEach(f=>{i(s,f.blockedByCalling)})}}),n.calledByEntry.forEach(s=>{if([...s.calls||[]].forEach(p=>{Ce.includes(p.type)&&p!==n&&(Ie(n).find(f=>f===p)||i(s,p))}),s===a)return;let d;if(s.type===r.FunctionDeclaration){const p=He(s);if(p.type===r.CustomEntity)return;p.type===r.Loop&&(d=p)}if(d){const p=fa(d);p.reachable||p.blocks.forEach(h=>{i(s,h.blockedByCalling)})}}),{reachable:e.length===0,entryPoint:a,blocks:e}}function C3(n){return bo.includes(n.type)?n.type===r.FunctionDeclaration?!qv(n):!0:!1}function B3(n){if(r.ActionDescriptor===n.type){if(n.project.operationDeclarations.find(s=>s.id===n.id))return r.Operation;if(n.project.globalEventActionDescriptors.find(s=>s.id===n.id))return r.GlobalEvent;if(n.project.loopDeclarations.find(s=>s.id===n.id))return r.Loop;if(n.project.conditionDeclarations.find(s=>s.id===n.id))return r.Condition}return n.type}function w3(n,e){const t=[];if(n.parent)if(n.id===n.parent)t.push(new E({id:`${n.id}--${n.parent}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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(n.parent);i?[r.Project,r.DataType].includes(i.type)||t.push(new E({id:`${n.id}--${n.parent}--${y.InvalidParentReference}`,code:y.InvalidParentReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has a parent reference that isn't pointing to an entity of type 'project' or 'data-type'.`,issue:null})):t.push(new E({id:`${n.id}--${n.parent}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", is referencing an entity with id "${n.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,issue:null}))}return n.implements&&Array.isArray(n.implements)?n.implements.forEach(i=>{if(n.id===i){t.push(new E({id:`${n.id}--${i}--${y.SelfReference}`,code:y.SelfReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract||t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' reference that isn't pointing to an abstract entity.`,issue:null})):t.push(new E({id:`${n.id}--${i}--${y.InvalidImplementsReference}`,code:y.InvalidImplementsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${g.InvalidObjectStructure}`,code:g.InvalidObjectStructure,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.id}", has an 'implements' property that isn't an array.`,issue:null})),n.extends&&Array.isArray(n.extends)&&n.extends.forEach(i=>{const a=e.get(i);a?[r.CustomEntity,r.BuiltInBaseEntity].includes(a.type)?a.abstract&&t.push(new E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.InvalidExtendsReference}`,code:y.InvalidExtendsReference,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 E({id:`${n.id}--${i}--${y.ReferencedEntityNotFound}`,code:y.ReferencedEntityNotFound,severity:m.Error,message:`Entity of type "${n.type}" with id "${n.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 pe=class pe{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"x");l(this,"y");l(this,"static");l(this,"abstract");l(this,"type",r.CustomEntity);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"implements",[]);l(this,"project");l(this,"errors",[]);l(this,"parent");l(this,"initialized",!1);l(this,"suggestedProperties",[]);l(this,"suggestedMethods",[]);this.initialData=e,this.project=t,this.id=e.id,this.version=e.version,this.name=e.name,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=D(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:r.CustomEntity,description:e.description,static:e.static,abstract:e.abstract,properties:[],methods:[],abstractMethods:[],extends:s,implements:a,x:0,y:0,parent:i},d=R(o,t);return d.setParent(i),d.initChildren(),d}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[],s=w3(i,t),o=Ks(i,t);a.push(...s,...o,...Ae(i));const d=i.parent?t.get(i.parent):null;if(d&&d.type===r.DataType){const p=d;p.entity&&a.push(new E({id:`${e.id}--${y.NewEntityWouldOverriteExisting}`,code:y.NewEntityWouldOverriteExisting,severity:m.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.
|
|
371
371
|
You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
|
|
372
372
|
${Qt({describe_entity:p.entity.id})}
|
|
373
|
-
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 extendedProperties(){return S([...this.extends.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[]),...this.implements.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[])])}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){if(this.parent.type===r.DataType){const e=this.parent;e.entity=this}else this.project.addCustomEntity(this);return 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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>R(e,this.project)),this.implements=this.initialData.implements.map(e=>R(e,this.project)),this.addSuggestions(),this)}addSuggestions(){return this.implements.forEach(e=>{p8(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=R(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),y8(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),d=R(o,this.project);if(d.suggestion=!0,d.setParent(this),d.initChildren(),d.inputs.forEach(p=>{p.suggestion=!0}),d.returnStatements.length){const p=d.returnStatements[0];p.suggestion=!0,p.outputs.forEach(h=>{h.suggestion=!0})}this.addSuggestedMethod(d)})}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.methods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),{affected:S(i),removed:S(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:S(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:r.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===r.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===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.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=u8(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(){return new pe(this.toJSON(),this.project)}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return lo(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(i=>i.type===r.CustomEntity||i.type===r.BuiltInBaseEntity&&i.interactive);return S([...this.methods,...this.extends.flatMap(i=>i.getAllInteractiveMethods()),...e.flatMap(i=>i.getAllInteractiveMethods())])}};l(pe,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),l(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),l(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),l(pe,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),l(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),l(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),l(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Dr=pe;function _3(n){const e=j4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class $t{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",!1);l(this,"static");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"interactive",!1);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}get extendedProperties(){return S(this.extends.reduce((e,t)=>{const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);return[...e,...i]},[]))}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:r.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=_3(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 $t(this.toJSON(),this.project)}implement(e,t){return lo(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(i=>i.type===r.BuiltInBaseEntity&&i.interactive||i.type===r.PrimitiveEntity).forEach(i=>{i instanceof $t&&e.push(...i.getAllInteractiveMethods())})),S(e)}}function M3(n){const e=M4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Vt{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.PrimitiveEntity);l(this,"static");l(this,"abstract");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a})}get extendedProperties(){return S(this.extends.reduce((e,t)=>{const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);return[...e,...i]},[]))}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:r.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=M3(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 Vt(this.toJSON(),this.project)}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(i=>i.type===r.BuiltInBaseEntity&&i.interactive||i.type===r.PrimitiveEntity).forEach(i=>{i instanceof $t&&e.push(...i.getAllInteractiveMethods())}),S(e)}}function Ta(n,e){if(!n)throw new Error("Entity is null");const t=e.findSubscribedInstance(n);switch(n.type){case r.PrimitiveValue:return t||new di(n,e);case r.CustomEntity:return t||new Dr(n,e);case r.PrimitiveEntity:return t||new Vt(n,e);case r.FunctionDeclaration:return t||new ur(n,e);case r.GlobalEvent:return t||new li(n,e);case r.DataType:return t||new oi(n,e);case r.Property:return t||new dr(n,e);case r.FunctionCall:return t||new vr(n,e);case r.Condition:return t||new hr(n,e);case r.Operation:return t||new pr(n,e);case r.VariableDeclaration:return t||new fr(n,e);case r.VariableInstance:return t||new mr(n,e);case r.OutputMap:return t||new Tn(n,e);case r.ReturnDeclaration:return t||new Ct(n,e);case r.ArgumentDeclaration:return t||new Rr(n,e);case r.InputMap:return t||new mn(n,e);case r.Project:return t||new $(n);case r.InstalledProject:return t||new Er(n,e);case r.ActionDescriptor:return t||new $e(n,e);case r.ReturnStatement:return t||new br(n,e);case r.Loop:return t||new yr(n,e);case r.Search:return t||new Tr(n,e);case r.ValueDescriptor:return t||new gr(n,e);case r.BuiltInBaseEntity:return t||new $t(n,e);case r.InternalCall:return t||new ci(n,e);case r.ContinueStatement:return t||new yt(n,e);case r.BreakStatement:return t||new ui(n,e);default:throw new Error("Invalid entity type: "+n.type)}}function R(n,e){if(!n)throw new Error("Entity is null");const t=Ta(n,e);return t.subscribe(),t}function N3(n,e){if(!n)throw new Error("Entity is null");switch(n.type){case r.PrimitiveValue:return di.fromGenerationTarget(n,e);case r.CustomEntity:return Dr.fromGenerationTarget(n,e);case r.FunctionDeclaration:return ur.fromGenerationTarget(n,e);case r.GlobalEvent:return li.fromGenerationTarget(n,e);case r.DataType:return oi.fromGenerationTarget(n,e);case r.Property:return dr.fromGenerationTarget(n,e);case r.FunctionCall:return vr.fromGenerationTarget(n,e);case r.Condition:return hr.fromGenerationTarget(n,e);case r.Operation:return pr.fromGenerationTarget(n,e);case r.VariableDeclaration:return fr.fromGenerationTarget(n,e);case r.VariableInstance:return mr.fromGenerationTarget(n,e);case r.OutputMap:return Tn.fromGenerationTarget(n,e);case r.ReturnDeclaration:return Ct.fromGenerationTarget(n,e);case r.ArgumentDeclaration:return Rr.fromGenerationTarget(n,e);case r.InputMap:return mn.fromGenerationTarget(n,e);case r.InstalledProject:return Er.fromGenerationTarget(n,e);case r.ReturnStatement:return br.fromGenerationTarget(n,e);case r.Loop:return yr.fromGenerationTarget(n,e);case r.Search:return Tr.fromGenerationTarget(n,e);case r.ActionDescriptor:return $e.fromGenerationTarget(n,e);case r.ValueDescriptor:return gr.fromGenerationTarget(n,e);case r.InternalCall:return ci.fromGenerationTarget(n,e);case r.ContinueStatement:return yt.fromGenerationTarget(n,e);case r.BreakStatement:return ui.fromGenerationTarget(n,e);default:throw new Error("Invalid entity type: "+n.type)}}const Y=class Y{constructor(e){l(this,"initialData");l(this,"id");l(this,"version");l(this,"type",r.Project);l(this,"name",null);l(this,"description",null);l(this,"x");l(this,"y");l(this,"entities",[]);l(this,"projects",[]);l(this,"functions",[]);l(this,"events",[]);l(this,"variableDeclarations",[]);l(this,"variableInstances",[]);l(this,"conditions",[]);l(this,"operations",[]);l(this,"functionCalls",[]);l(this,"loops",[]);l(this,"searches",[]);l(this,"primitives",[]);l(this,"builtInBaseEntities",[]);l(this,"operationDeclarations",[]);l(this,"globalEventActionDescriptors",[]);l(this,"loopDeclarations",[]);l(this,"conditionDeclarations",[]);l(this,"valueDescriptors",[]);l(this,"dataTypes",[]);l(this,"project");l(this,"instances",{});l(this,"builtInInstances",{});l(this,"errors",[]);l(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{Y.UUID||(Y.UUID=ss==null?void 0:ss())}catch(t){console.error("Error initializing UUID module",t),Y.UUID={uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){Y.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Ae(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(){return 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=R(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=R(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+"--"+Y.UUID.uuid()+"--ref",type:r.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=a8(),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 Y(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=R(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=R(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=R(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=R(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=R(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=R(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=R(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=R(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=R(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=R(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=R(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!==r.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=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return S([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.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(d=>d.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===_.PERSISTED_ENTITY)||null}};l(Y,"UUID",{uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),l(Y,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(Y,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(Y,"BASE_PROPERTIES",[...Y.MUTABLE_BASE_PROPERTIES,...Y.INMUTABLE_BASE_PROPERTIES]),l(Y,"MUTABLE_META_PROPERTIES",[...Y.MUTABLE_BASE_PROPERTIES,"x","y"]),l(Y,"INMUTABLE_META_PROPERTIES",[...Y.INMUTABLE_BASE_PROPERTIES]),l(Y,"META_PROPERTIES",[...Y.MUTABLE_META_PROPERTIES,...Y.INMUTABLE_META_PROPERTIES]),l(Y,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(Y,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),l(Y,"UPSTREAM_PROPERTIES",[...Y.MUTABLE_UPSTREAM_PROPERTIES,...Y.INMUTABLE_UPSTREAM_PROPERTIES]),l(Y,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),l(Y,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Y,"DOWNSTREAM_PROPERTIES",[...Y.MUTABLE_DOWNSTREAM_PROPERTIES,...Y.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Y,"PROPERTIES",[...Y.META_PROPERTIES,...Y.UPSTREAM_PROPERTIES,...Y.DOWNSTREAM_PROPERTIES]);let $=Y;class zv extends $e{constructor(t){super(Lt,t);l(this,"id",Pe.Parallel);l(this,"name",Pe.Parallel);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",Lt);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=Lt.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=Lt.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Lt.error?R(Lt.error,this.project):null}}class Zv extends $e{constructor(t){super(ot,t);l(this,"id",ot.id);l(this,"name",ot.name);l(this,"description",ot.description);l(this,"version",ot.version);l(this,"autoexecutable",!1);l(this,"initialData",ot);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=ot.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=ot.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=ot.error?R(ot.error,this.project):null}}class Xv extends $e{constructor(t){super(rn,t);l(this,"id",Pe.Sequential);l(this,"name",Pe.Sequential);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",rn);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=rn.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=rn.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=rn.error?R(rn.error,this.project):null}}function $3(n){const e=[new Xv(n),new zv(n),new Zv(n),new $e(mi,n),new $e(Cr,n),new $e(kn,n),new $e(va,n),new $e(Do,n),new $e(Oo,n),new $e(So,n),new $e(Ra,n),new $e(hi,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.operationDeclarations=e,e}class Qv extends $t{constructor(t){super(_e,t);l(this,"initialData");l(this,"id",_.PERSISTED_ENTITY);l(this,"version",1);l(this,"name",_.PERSISTED_ENTITY);l(this,"description",_e.description);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",_e.abstract);l(this,"static",_e.static);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}}function V3(n){const e=[new Qv(n),new $t(Ba,n),new $t(vn,n),new $t(Ho,n),new $t(Ca,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.builtInBaseEntities=e,e}function L3(n){const e=[new Vt(F,n),new Vt(bn,n),new Vt(De,n),new Vt(Xe,n),new Vt(gn,n),new Vt(nn,n),new Vt(Ea,n),new Vt(go,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.primitives=e,e}function G3(n){const e=[new $e($a,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.globalEventActionDescriptors=e,e}function F3(n){const e=[new $e(qn,n),new $e(Fo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.loopDeclarations=e,e}function U3(n){const e=[new gr(Xo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.valueDescriptors=e,e}function x3(n){const e=[new $e(Jn,n),new $e(wr,n)];return e.forEach(t=>{t.initChildren()}),n.conditionDeclarations=e,e}const Ar={},To={};async function j3(n,e={}){const t={...cb};return t.id=n.id,e.empty?{data:{id:n.id,type:r.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function Kv(n){const e=new $(n);return L3(e),V3(e),$3(e),G3(e),F3(e),U3(e),x3(e),e.initChildren(),e}async function k3(n,e={}){if(n.id&&Ar[n.id])return Ar[n.id];if(n.id&&To[n.id])return await To[n.id],Ar[n.id];const t=j3(n,e);n.id&&(To[n.id]=t);const i=await t;if(i.data){const a=Kv(i.data);return Ar[n.id]=a,n.id&&delete To[n.id],a}return null}function q3(n){return Ar[n.id]&&delete Ar[n.id],null}const J3="test_primitive_entities_export";u.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=Id,u.ActionDescriptorState=$e,u.ActionDescriptorValuesType=L,u.ActionInputMapState=j9,u.ActionOutputMapState=J9,u.AppendToListOperationInputIds=hp,u.AppendToListOperationOutputIds=fp,u.ArgumentDeclarationState=Rr,u.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Rd,u.BUILT_IN_BASE_ENTITY_IDS=Ve,u.BUILT_IN_ENTITY_TYPES=Or,u.BaseCanvasDraggableState=A9,u.BaseEntityNames=_,u.BaseState=D9,u.BaseValueDescriptorIds=$o,u.BreakStatementState=ui,u.BuiltInBaseEntityState=$t,u.CACHED_PROJECTS_BY_ID=Ar,u.CALLABLE_ENTITIES_EXPLANATION=r3,u.CALLABLE_TYPES=Rn,u.CALLER_ENTITIES_EXPLANATION=pv,u.CALLER_TYPES=tn,u.CALLS_UPDATE_EXPLANATION=Ln,u.COMPARISON_CONDITIONS=ym,u.CONDITIONS=BI,u.CUSTOM_ENTITY_OPERATIONS=Cy,u.CallableEntityClass=O9,u.CallerEntityClass=fd,u.ChildEntityState=S9,u.ComparisonOperatorTypes=Oe,u.ConditionState=hr,u.ContinueStatementState=yt,u.CreateNewInputIds=ay,u.CreateNewOutputIds=sy,u.CustomEntityState=Dr,u.DRAGGABLE_CALLABLE_TYPES=Ro,u.DRAGGABLE_CALLER_TYPES=xd,u.DRAGGABLE_ELEMENT_TYPES=bo,u.DRAGGABLE_EXECUTABLE_TYPES=iI,u.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Eo,u.DataTypeCompatibilityTypes=Nt,u.DataTypeParentChildRelation=qe,u.DataTypeState=oi,u.ENTITIES_WITH_VALLUES_EXPLANATION=ro,u.ENTITY_TYPES=aI,u.ENTITY_WITH_LOGIC_SCOPE_TYPES=st,u.ENTITY_WITH_NAMES_TYPES=jd,u.ENTITY_WITH_VALUE_TYPES=Ud,u.ENTRY_POINT_ENTITIES_EXPLANATION=ua,u.ENTRY_POINT_TYPES=Me,u.EVENT_TYPES=Sr,u.EXECUTABLE_TYPES=rI,u.EXECUTION_OPERATIONS=iy,u.EntityError=er,u.EntityErrorSeverity=m,u.EntityGenerationError=E,u.EntityGenerationErrorCode=y,u.EntityInstanceErrorCode=O,u.EntityOperations=Ze,u.EntityType=r,u.EntityWithLogicScopeClass=_9,u.EntityWithValueClass=w9,u.EntryPointEntityClass=C9,u.ExecutionOperations=Pe,u.FunctionCallState=vr,u.FunctionDeclarationState=ur,u.GLOBAL_EVENT_DECLARATIONS=wI,u.GetLastInListOperationInputIds=np,u.GetLastInListOperationOutputIds=rp,u.GlobalEventNames=en,u.GlobalEventState=li,u.HTTPOperations=Ye,u.HTTP_OPERATIONS=ch,u.InputMapState=mn,u.InstalledProjectState=Er,u.InternalCallState=ci,u.JoinListOperationInputIds=vu,u.JoinListOperationOutputIds=Iu,u.JoinStringOperationInputIds=lu,u.JoinStringOperationOutputIds=cu,u.LIST_OPERATIONS=Op,u.ListOperations=k,u.LoopState=yr,u.LoopTypes=je,u.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Gn,u.NUMBER_OPERATIONS=ou,u.NumberAdditionOperationInputIds=Yd,u.NumberAdditionOperationOutputIds=zd,u.NumberOperations=at,u.OPERATION_DECLARATIONS=oI,u.OperationState=pr,u.OutputMapParentChildRelation=Fd,u.OutputMapState=Tn,u.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=io,u.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Vn,u.PASS_THROUGH_CALLABLE_TYPES=we,u.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=vd,u.ParallelExecutionOperation=zv,u.ParallelExecutionOperationInputIds=Cp,u.ParallelExecutionOperationOutputIds=Bp,u.PassThroughCallableEntityClass=B9,u.PersistedEntity=Qv,u.PersistedEntityMethods=Pt,u.PrimitiveEntityState=Vt,u.PrimitiveTypes=v,u.PrimitiveValueState=di,u.ProjectState=$,u.PropertyState=dr,u.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=i3,u.ReturnDeclarationState=Ct,u.ReturnStatementState=br,u.STANDALONE_CONDITIONS=om,u.STRING_OPERATIONS=gu,u.ScopeCompatibilityType=mo,u.SearchState=Tr,u.SequentialExecutionOperation=Xv,u.SequentialExecutionOperationInputIds=Hp,u.SequentialExecutionOperationOutputIds=Yp,u.SharedEntityErrorCode=g,u.SharedStateFunctionality=cv,u.SplitListOperationInputIds=Gu,u.SplitListOperationOutputIds=Fu,u.StandaloneOperatorTypes=wt,u.StringOperations=ve,u.TERMINATION_TYPES=Ce,u.USER_MANAGED_ENTITY_TYPES=sI,u.UserManagedEntityStateFunctionality=P9,u.VALUE_READING_ENTITIES_EXPLANATION=gd,u.VALUE_READING_TYPES=xn,u.VALUE_WRITING_ENTITIES_EXPLANATION=yv,u.VALUE_WRITING_TYPES=Be,u.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=bd,u.VARIABLE_TYPES=Ge,u.ValidationInputIds=fy,u.ValidationOutputIds=my,u.ValueAutogenerationType=Ue,u.ValueDescriptorParentChildRelation=C,u.ValueDescriptorState=gr,u.ValueReadingEntityClass=ca,u.ValueWritingEntityClass=da,u.VariableDeclarationState=fr,u.VariableInputMapState=x9,u.VariableInstanceState=mr,u.VariableOutputMapState=q9,u.WaitOperation=Zv,u.WaitOperationInputIds=Up,u.WaitOperationOutputIds=xp,u._VALUE_READING_TYPES=tI,u._VALUE_WRITING_TYPES=nI,u.appendToListOperation=va,u.appendToListOperationElementToAppendArgument=Bo,u.appendToListOperationElementToAppendArgumentParentRef=Ip,u.appendToListOperationElementToAppendArgumentRef=Ep,u.appendToListOperationError=Sp,u.appendToListOperationErrorParentRef=Ap,u.appendToListOperationListArgument=Co,u.appendToListOperationListArgumentParentRef=vp,u.appendToListOperationListArgumentRef=mp,u.appendToListOperationListDataType=Tp,u.appendToListOperationResultListDataType=gp,u.appendToListOperationResultListReturn=Dp,u.appendToListOperationResultListReturnParentRef=Pp,u.appendToListOperationResultListReturnRef=bp,u.appendToListOperationSecondListDataType=Rp,u.asGenerationActionExample=Qt,u.baseHttpRequestFunctionDeclaration=mi,u.baseHttpRequestFunctionDeclarationErrorValueDescriptor=Go,u.baseHttpRequestFunctionDeclarationErrorValueDescriptorDatatype=lh,u.baseHttpRequestFunctionDeclarationErrorValueDescriptorRef=oh,u.baseHttpRequestFunctionDeclarationRef=rh,u.baseHttpRequestFunctionDeclarationRefEight=ah,u.baseHttpRequestFunctionDeclarationRefFive=th,u.baseHttpRequestFunctionDeclarationRefFour=eh,u.baseHttpRequestFunctionDeclarationRefNine=sh,u.baseHttpRequestFunctionDeclarationRefSeven=ih,u.baseHttpRequestFunctionDeclarationRefSix=nh,u.baseHttpRequestFunctionDeclarationRefThree=Ky,u.baseHttpRequestFunctionDeclarationRefTwo=Qy,u.booleanPrototype=bn,u.capitalizeFirstLetter=Ys,u.checkAreCustomEntitiesCompatibleAsDataType=Yg,u.checkAreDataTypesCompatible=zs,u.checkArePropertiesCompatibleAsDataType=Hg,u.checkIsBranchDependentButNotDirectlyOnBranch=ya,u.checkIsBranchDependentOnBranch=y3,u.checkIsCallableEntityReachable=ma,u.checkIsCanvasEntity=C3,u.checkIsDetachedBranch=kv,u.checkIsDetachedBranchShallow=Vd,u.checkIsGlobalVariable=O3,u.checkIsGloballyDeclared=$d,u.checkIsMethod=Wv,u.checkIsNestedScope=fo,u.checkScopeCompatibility=ha,u.createEntityError=j,u.createNewInstanceOperation=Cr,u.createNewInstanceOperationEntityToInstanciateArgument=dy,u.createNewInstanceOperationEntityToInstanciateArgumentRef=oy,u.createNewInstanceOperationEntityToInstanciateDataType=ly,u.createNewInstanceOperationError=hy,u.createNewInstanceOperationErrorParentRef=yy,u.createNewInstanceOperationOutputEntityDeclaration=py,u.createNewInstanceOperationOutputEntityDeclarationParentRef=uy,u.createNewInstanceOperationRef=cy,u.createSemanticId=Xt,u.createStateFromGenerationTargetType=N3,u.createStateFromType=Ta,u.createStateFromTypeAndSubscribe=R,u.cronJobBuiltInBaseEntity=Ho,u.cronJobBuiltInBaseEntityExpressionProperty=rm,u.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=SI,u.cronJobBuiltInBaseEntityExpressionPropertyRef=tm,u.cronJobBuiltInBaseEntityRef=nm,u.cronJobTriggeredFunctionDeclarationBlueprint=Wo,u.cronJobTriggeredFunctionDeclarationBlueprintParentRef=Kf,u.customEntityToZodSchema=wm,u.dataTypeCompatibilityToErrorExplanation=gv,u.datePrototype=nn,u.dateValueAutogenerationSchema=tc,u.deletePersistedEntityMethod=Jo,u.deletePersistedEntityMethodParentRef=wf,u.deleteRootProject=q3,u.endpointBuiltInBaseEntity=Ba,u.endpointBuiltInBaseEntityRef=Bh,u.endpointBuiltInBaseEntityRefFour=Rf,u.endpointBuiltInBaseEntityRefThree=Fh,u.endpointBuiltInBaseEntityRefTwo=$h,u.endpointBuiltInCorsProperty=wh,u.endpointBuiltInCorsPropertyDataType=Ch,u.endpointBuiltInCorsPropertyDataTypeRef=Sh,u.endpointBuiltInCorsPropertyRef=Oh,u.endpointBuiltInMethodProperty=xo,u.endpointBuiltInMethodPropertyDataType=Gh,u.endpointBuiltInMethodPropertyDataTypeRef=Vh,u.endpointBuiltInMethodPropertyRef=Lh,u.endpointBuiltInPathProperty=Uo,u.endpointBuiltInPathPropertyDataType=Nh,u.endpointBuiltInPathPropertyDataTypeRef=_h,u.endpointBuiltInPathPropertyRef=Mh,u.endpointPathParamsArgumentDeclaration=ef,u.endpointPathParamsArgumentDeclarationRef=zh,u.endpointPathParamsVariableDataType=Zh,u.endpointPathParamsVariableDataTypeRef=Yh,u.endpointReachedTriggerActionDescriptor=jo,u.endpointReachedTriggerActionDescriptorRef=Xh,u.endpointReachedTriggerActionDescriptorRefFour=rf,u.endpointReachedTriggerActionDescriptorRefThree=tf,u.endpointReachedTriggerActionDescriptorRefTwo=Kh,u.endpointRequestBodyArgumentDeclaration=af,u.endpointRequestBodyArgumentDeclarationRef=kh,u.endpointRequestBodyVariableDataType=qh,u.endpointRequestHeadersArgumentDeclaration=Qh,u.endpointRequestHeadersArgumentDeclarationRef=xh,u.endpointRequestHeadersVariableDataType=jh,u.endpointRequestHeadersVariableDataTypeRef=Uh,u.endpointRequestQueryParamsArgumentDeclaration=nf,u.endpointRequestQueryParamsArgumentDeclarationRef=Wh,u.endpointRequestQueryParamsVariableDataType=Hh,u.endpointRequestQueryParamsVariableDataTypeRef=Jh,u.endpointResponseBodyDataType=mf,u.endpointResponseBodyReturnDeclaration=Ef,u.endpointResponseBodyReturnDeclarationRef=ff,u.endpointResponseCodeDataType=of,u.endpointResponseCodeReturnDeclaration=cf,u.endpointResponseCodeReturnDeclarationRef=sf,u.endpointResponseHeadersDataType=pf,u.endpointResponseHeadersDataTypeRef=df,u.endpointResponseHeadersReturnDeclaration=hf,u.endpointResponseHeadersReturnDeclarationRef=uf,u.endpointReturnStatementRef=lf,u.endpointReturnStatementRefThree=Tf,u.endpointReturnStatementRefTwo=yf,u.enumOptionsProperty=Hd,u.enumOptionsPropertyDataType=Jd,u.enumOptionsPropertyDataTypeRef=kd,u.enumOptionsPropertyRef=qd,u.enumPrototype=gn,u.enumPrototypeRef=Wd,u.executionBuiltInEntity=zo,u.executionBuiltInEntityAbortMethod=Yo,u.executionBuiltInEntityAbortMethodParentRef=im,u.filterOutDuplicateEntities=S,u.filterOutDuplicateErrors=P4,u.findReferenceToSelfInList=$v,u.findReferencesToSelfInProject=v3,u.flattenCalls=Kt,u.flattenCanvasAncestorsUntil=co,u.flattenCustomEntityExtensionAndImplementationTypes=Uv,u.flattenCustomEntityExtensionTypes=yo,u.flattenCustomEntityExtensions=_d,u.flattenCustomEntityImplementations=Md,u.flattenCustomEntityImplementionTypes=po,u.flattenDerivedCanvasEntities=It,u.flattenDetachedBranch=Jv,u.flattenElementCalls=Ie,u.flattenElementCallsOnTheSameScope=g3,u.flattenProjectElements=Nv,u.flattenRelatedCanvasElementsOnTheLeft=Fv,u.flattenRelatedCanvasElementsOnTheRight=Gv,u.flattenVariableReads=Mv,u.flattenVariableWrites=_v,u.flattenVariables=Z,u.fromZodParseToEntityGenerationErrors=md,u.generate=SD,u.generateActionExample=a3,u.generateExecutionDataType=zg,u.generateMutablePropertiesExplanation=eo,u.generateRandomBoolean=rT,u.generateRandomDate=$m,u.generateRandomDateAfter=_m,u.generateRandomDateBefore=Mm,u.generateRandomDateBetweenRange=Nm,u.generateRandomNumber=Qm,u.generateRandomNumberAfter=zm,u.generateRandomNumberBefore=Zm,u.generateRandomNumberBetweenRange=Xm,u.generateRandomText=nT,u.generateRandomTextAfter=Km,u.generateRandomTextBefore=eT,u.generateRandomTextBetweenRange=tT,u.generateUniqueUUID=Ym,u.getAllActionDescriptorsForConditions=oo,u.getAllActionDescriptorsForGlobalEvents=ao,u.getAllActionDescriptorsForLoops=so,u.getAllActionDescriptorsForOperations=c3,u.getAllGloballyDeclaredFunctionDeclarationsExplanation=Ev,u.getBaseBuiltInEntities=Un,u.getBaseSchemaBasedOnType=dv,u.getBuiltInEntityOwner=Pr,u.getCallableEntityReferenceSchema=ke,u.getCallableEntityTypeSchema=Nb,u.getCallerEntityReferenceSchema=Cx,u.getCallerEntityTypeSchema=Ox,u.getCalls=Sd,u.getCanvasEntitiesDerivedFromInternalCalls=Lv,u.getCanvasEntitiesDerivedFromWrites=pi,u.getCanvasEntityDerivedFromValueReadingEntity=wd,u.getCanvasEntityReferenceSchema=Wx,u.getCanvasEntityTypeSchema=Jx,u.getChildrenEntityWithValues=f3,u.getCommonAncestor=Ad,u.getCommonChildren=Pv,u.getDeclaration=ad,u.getDeepestScope=Yv,u.getDraggableCallableEntityReferenceSchema=Vb,u.getDraggableCallableEntityTypeSchema=$b,u.getDraggableCallerEntityReferenceSchema=wx,u.getDraggableCallerEntityTypeSchema=Bx,u.getDraggableExecutableEntityReferenceSchema=$x,u.getDraggableExecutableEntityTypeSchema=Nx,u.getDraggablePassThroughCallableEntityReferenceSchema=Us,u.getDraggablePassThroughCallableEntityTypeSchema=Fs,u.getDraggablePlayableEntityReferenceSchema=Ux,u.getDraggablePlayableEntityTypeSchema=Fx,u.getEntityArgumentDeclarations=Cd,u.getEntityInputMaps=Vv,u.getEntityOutputMaps=D3,u.getEntityReferenceSchema=qx,u.getEntityReturnDeclarations=Bd,u.getEntityTypeSchema=kx,u.getEntityWithLogicScopeReferenceSchema=yn,u.getEntityWithLogicScopeTypeSchema=Vx,u.getEntityWithValueReferenceSchema=Mb,u.getEntityWithValueTypeSchema=Sx,u.getEntryPointEntityReferenceSchema=xe,u.getEntryPointEntityTypeSchema=Mn,u.getEventEntityReferenceSchema=Ls,u.getEventEntityTypeSchema=Vs,u.getExecutableEntityReferenceSchema=Mx,u.getExecutableEntityTypeSchema=_x,u.getExtendedBuiltInEntity=A3,u.getExtendedCustomEntity=jv,u.getGenerationTargetSchemaBasedOnType=uv,u.getHeadIfPartOfDetachedBranch=qv,u.getHighestScope=Hv,u.getImplementedBuiltInEntity=S3,u.getIsInteractive=Nd,u.getLastInListOperation=Oo,u.getLastInListOperationError=yp,u.getLastInListOperationErrorParentRef=pp,u.getLastInListOperationInputListArgument=cp,u.getLastInListOperationInputListArgumentParentRef=lp,u.getLastInListOperationInputListArgumentRef=ip,u.getLastInListOperationInputListDataType=ap,u.getLastInListOperationOutputElementDataType=op,u.getLastInListOperationOutputElementReturn=up,u.getLastInListOperationOutputElementReturnParentRef=dp,u.getLastInListOperationOutputElementReturnRef=sp,u.getLinkedEntitiesFromArgumentDeclaration=b3,u.getLowestPersistedEntityImplementation=xv,u.getParentCanvasEntities=ht,u.getParentCanvasEntity=He,u.getParentEntryPoint=h3,u.getPassThroughCallableEntityReferenceSchema=ye,u.getPassThroughCallableEntityTypeSchema=Gs,u.getPlayableEntityReferenceSchema=Gx,u.getPlayableEntityTypeSchema=Lx,u.getProject=k3,u.getPrototypeByType=ho,u.getReferenceEntityId=D,u.getReferencedEntitiesStateOrErrors=no,u.getReferencedEntityStateOrErrors=Td,u.getRelatedCanvasElementsOnTheLeft=Ir,u.getRelatedCanvasElementsOnTheRight=Fn,u.getRootEntryPointScopeOwner=Gd,u.getScopeOwner=ft,u.getTerminationReferenceSchema=jx,u.getTerminationTypeSchema=xx,u.getUsedArgFromDeclaration=I3,u.getUsedReturnFromDeclaration=P3,u.getValueReadingEntityReferenceSchema=_b,u.getValueReadingEntityTypeSchema=pn,u.getValueWritingEntityReferenceSchema=Ax,u.getValueWritingEntityTypeSchema=Ki,u.getVariableFromInputMapping=Av,u.getVariableFromReturnVariablePointer=Cv,u.getVariableReferenceSchema=_n,u.getVariableTypeSchema=rr,u.getVariablesFromArgumentDeclarations=uo,u.getVariablesFromInputMaps=Sv,u.getVariablesFromOutputMapping=Bv,u.getVariablesFromOutputMaps=wv,u.getVariablesFromReturnDeclarations=Ov,u.getVariablesInSameOrHigherScope=sd,u.getWrites=Od,u.groupCallsBasedOnParallelizableExecution=T3,u.handleAfterEntityImplementationSideEffects=Iv,u.handleBeforeEntityImplementationSideEffects=vv,u.httpRequestBodyArgument=Aa,u.httpRequestBodyArgumentRef=jy,u.httpRequestBodyDataType=ky,u.httpRequestHeadersArgument=Da,u.httpRequestHeadersArgumentRef=Uy,u.httpRequestHeadersDataType=xy,u.httpRequestMethodArgument=Ia,u.httpRequestMethodArgumentRef=Gy,u.httpRequestMethodDataType=Fy,u.httpRequestMethodDataTypeRef=Vy,u.httpRequestQueryParamsArgument=Vo,u.httpRequestQueryParamsArgumentRef=Ny,u.httpRequestQueryParamsDataType=$y,u.httpRequestVariableURLArgument=Pa,u.httpRequestVariableURLArgumentRef=_y,u.httpRequestVariableURLDataType=My,u.httpRequestVariableURLDataTypeRef=By,u.httpResponseBodyReturnDataType=Xy,u.httpResponseBodyReturnDataTypeRef=zy,u.httpResponseBodyReturnReturn=fi,u.httpResponseBodyReturnReturnRef=Zy,u.httpResponseCodeDataType=Jy,u.httpResponseCodeReturn=Lo,u.httpResponseCodeReturnRef=qy,u.httpResponseHeadersDataType=Yy,u.httpResponseHeadersDataTypeRef=Wy,u.httpResponseHeadersReturn=Sa,u.httpResponseHeadersReturnRef=Hy,u.implement=lo,u.inferArgumentDeclarationDataType=Zg,u.inferDataType=si,u.inferInputMapDataType=Xg,u.inferOutputMapDataType=Kg,u.inferVariableDeclarationDataType=id,u.inferVariableInstanceDataType=Qg,u.initProject=Kv,u.iterateOverListActionDescriptor=qn,u.iterateOverListActionDescriptorListArgumentDeclaration=mh,u.iterateOverListActionDescriptorListArgumentDeclarationDataType=hh,u.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=yh,u.iterateOverListActionDescriptorListArgumentDeclarationParentRef=fh,u.iterateOverListActionDescriptorReturnDeclaration=ph,u.iterateOverListActionDescriptorReturnDeclarationParentRef=uh,u.joinListOperation=Do,u.joinListOperationError=Lu,u.joinListOperationErrorParentRef=Vu,u.joinListOperationFirstListArgument=wu,u.joinListOperationFirstListArgumentParentRef=Bu,u.joinListOperationFirstListArgumentRef=Pu,u.joinListOperationFirstListDataType=Du,u.joinListOperationResultListDataType=Cu,u.joinListOperationResultListReturn=$u,u.joinListOperationResultListReturnParentRef=Nu,u.joinListOperationResultListReturnRef=Ou,u.joinListOperationSecondListArgument=Mu,u.joinListOperationSecondListArgumentParentRef=_u,u.joinListOperationSecondListArgumentRef=Au,u.joinListOperationSecondListDataType=Su,u.joinListWithLastSeparator=N,u.joinStringOperation=hi,u.joinStringOperationError=bu,u.joinStringOperationErrorParentRef=Ru,u.joinStringOperationFirstStringArgument=ba,u.joinStringOperationFirstStringArgumentParentRef=mu,u.joinStringOperationFirstStringArgumentRef=du,u.joinStringOperationFirstStringDataType=uu,u.joinStringOperationResultStringDataType=fu,u.joinStringOperationResultStringReturn=yi,u.joinStringOperationResultStringReturnParentRef=Eu,u.joinStringOperationResultStringReturnRef=hu,u.joinStringOperationSecondStringArgument=ga,u.joinStringOperationSecondStringArgumentParentRef=Tu,u.joinStringOperationSecondStringArgumentRef=pu,u.joinStringOperationSecondStringDataType=yu,u.jsonPrototype=go,u.keyValueParamBuiltInBaseEntity=Ca,u.keyValueParamBuiltInBaseEntityNameProperty=Ih,u.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=cI,u.keyValueParamBuiltInBaseEntityNamePropertyParentRef=vh,u.keyValueParamBuiltInBaseEntityNamePropertyRef=gh,u.keyValueParamBuiltInBaseEntityValueProperty=Ah,u.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=uI,u.keyValueParamBuiltInBaseEntityValuePropertyParentRef=Dh,u.keyValueParamBuiltInBaseEntityValuePropertyRef=Ph,u.lowercaseFirstLetter=Wg,u.manualFlowActionDescriptor=Fo,u.manualFlowActionDescriptorDeclarationReturnDeclaration=bh,u.manualFlowActionDescriptorDeclarationReturnDeclarationDataType=Eh,u.manualFlowActionDescriptorDeclarationReturnDeclarationDataTypeParentRef=Th,u.manualFlowActionDescriptorDeclarationReturnDeclarationParentRef=Rh,u.mapActionDescriptorToTypeItRepresents=B3,u.mergeEntityErrorsList=D4,u.mergeListOfEntities=Ld,u.methodDefaultValue=Ly,u.mockClientProject=cb,u.moreThanOrEqualCondition=wr,u.moreThanOrEqualConditionLeftHandArgument=dm,u.moreThanOrEqualConditionLeftHandArgumentParentRef=cm,u.moreThanOrEqualConditionRightHandArgument=pm,u.moreThanOrEqualConditionRightHandArgumentParentRef=um,u.notEmptyCondition=Jn,u.notEmptyConditionArgument=sm,u.notEmptyConditionRef=am,u.numberAdditionOperation=Ra,u.numberAdditionOperationError=su,u.numberAdditionOperationErrorParentRef=au,u.numberAdditionOperationFirstNumberArgument=vo,u.numberAdditionOperationFirstNumberArgumentRef=Zd,u.numberAdditionOperationFirstNumberDataType=Xd,u.numberAdditionOperationRef=nu,u.numberAdditionOperationRefThree=iu,u.numberAdditionOperationRefTwo=ru,u.numberAdditionOperationResultNumberDataType=tu,u.numberAdditionOperationResultNumberReturn=Po,u.numberAdditionOperationResultNumberReturnRef=eu,u.numberAdditionOperationSecondNumberArgument=Io,u.numberAdditionOperationSecondNumberArgumentRef=Qd,u.numberAdditionOperationSecondNumberDataType=Kd,u.numberPrototype=De,u.numberValueAutogenerationSchema=ec,u.parallelExecutionOperation=Lt,u.parallelExecutionOperationError=Fp,u.parallelExecutionOperationErrorParentRef=Gp,u.parallelExecutionOperationListOfExecutionResultsDataType=$p,u.parallelExecutionOperationListOfExecutionResultsReturn=_o,u.parallelExecutionOperationListOfExecutionResultsReturnRef=Np,u.parallelExecutionOperationListOfFunctionsArgument=wo,u.parallelExecutionOperationListOfFunctionsArgumentDatatype=Mp,u.parallelExecutionOperationListOfFunctionsArgumentRef=_p,u.parallelExecutionOperationListOfFunctionsBlueprint=wp,u.parallelExecutionOperationRef=Vp,u.parallelExecutionOperationRefThree=Lp,u.persistedBuiltInBaseEntity=_e,u.persistedBuiltInBaseEntityCreatedAtProperty=Yf,u.persistedBuiltInBaseEntityCreatedAtPropertyDataType=Wf,u.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=DI,u.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=Hf,u.persistedBuiltInBaseEntityCreatedAtPropertyRef=Jf,u.persistedBuiltInBaseEntityDatabaseProperty=Ei,u.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=gI,u.persistedBuiltInBaseEntityDatabasePropertyParentRef=Vf,u.persistedBuiltInBaseEntityDatabasePropertyRef=$f,u.persistedBuiltInBaseEntityDeletedAtProperty=qf,u.persistedBuiltInBaseEntityDeletedAtPropertyDataType=jf,u.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=PI,u.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=kf,u.persistedBuiltInBaseEntityDeletedAtPropertyRef=xf,u.persistedBuiltInBaseEntityIdentifierProperty=Uf,u.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=Lf,u.persistedBuiltInBaseEntityIdentifierPropertyParentRef=Ff,u.persistedBuiltInBaseEntityIdentifierPropertyRef=Gf,u.persistedBuiltInBaseEntityUpdatedAtProperty=Qf,u.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=Zf,u.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=AI,u.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=Xf,u.persistedBuiltInBaseEntityUpdatedAtPropertyRef=zf,u.processOutputGlobalValueDescriptorDataType=fm,u.processOutputGlobalValueDescriptorReturn=Xo,u.processOutputGlobalValueDescriptorReturnRef=hm,u.projectPublicationCompletedGlobalEvent=$a,u.propertyToZodSchema=Bm,u.relationalDatabaseBuiltInBaseEntity=vn,u.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=qo,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=Cf,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=Bf,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=Of,u.relationalDatabaseBuiltInBaseEntityDefaultProperty=ko,u.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=Af,u.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=Sf,u.relationalDatabaseBuiltInBaseEntityIdentifierProperty=wa,u.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=bf,u.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=gf,u.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Na,u.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=Pf,u.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=Df,u.relationalDatabaseBuiltInBaseEntityPasswordProperty=Ma,u.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=mI,u.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=If,u.relationalDatabaseBuiltInBaseEntityRef=Br,u.relationalDatabaseBuiltInBaseEntityUsernameProperty=_a,u.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=hI,u.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=vf,u.resolveActionDescriptorName=lv,u.resolveBaseEntityName=av,u.resolveBuiltInBaseEntityDataTypeLabel=od,u.resolveConditionOperatorLabel=Qs,u.resolveCustomEntityDataTypeLabel=ld,u.resolveDataType=Zs,u.resolveDataTypeLabel=nv,u.resolveEntityDataTypeLabel=iv,u.resolveEntityName=A,u.resolveFirstCallsSecond=E3,u.resolveFirstWritesSecond=R3,u.resolvePrimitiveEntityName=ov,u.resolvePropertyDataTypeLabel=rv,u.resolveSearchName=sv,u.resolveVariableDataTypeLabel=c9,u.resolveVariableDeclarationDataTypeLabel=cr,u.resolveVariableInstanceDataTypeLabel=tv,u.resolveVariableScope=s9,u.sequentialExecutionOperation=rn,u.sequentialExecutionOperationError=ry,u.sequentialExecutionOperationErrorParentRef=ny,u.sequentialExecutionOperationListOfExecutionResultsDataType=Kp,u.sequentialExecutionOperationListOfExecutionResultsReturn=No,u.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=ty,u.sequentialExecutionOperationListOfExecutionResultsReturnRef=Qp,u.sequentialExecutionOperationListOfFunctionsArgument=Mo,u.sequentialExecutionOperationListOfFunctionsArgumentDatatype=Xp,u.sequentialExecutionOperationListOfFunctionsArgumentParentRef=ey,u.sequentialExecutionOperationListOfFunctionsArgumentRef=Zp,u.sequentialExecutionOperationListOfFunctionsBlueprint=zp,u.softDeletePersistedEntityMethod=Mf,u.softDeletePersistedEntityMethodParentRef=_f,u.sortCallsBasedOnExecutionDependencies=Dv,u.sortChildrenEntitiesBasedOnExecutionDependencies=m3,u.splitListOperation=So,u.splitListOperationError=tp,u.splitListOperationErrorParentRef=ep,u.splitListOperationFirstOutputListDataType=qu,u.splitListOperationFirstOutputListReturn=Zu,u.splitListOperationFirstOutputListReturnParentRef=zu,u.splitListOperationFirstOutputListReturnRef=Ao,u.splitListOperationInputListArgument=Wu,u.splitListOperationInputListArgumentParentRef=Ju,u.splitListOperationInputListArgumentRef=Uu,u.splitListOperationInputListDataType=xu,u.splitListOperationSecondOutputListDataType=Xu,u.splitListOperationSecondOutputListReturn=Ku,u.splitListOperationSecondOutputListReturnParentRef=Qu,u.splitListOperationSplitIndexArgument=Yu,u.splitListOperationSplitIndexArgumentParentRef=Hu,u.splitListOperationSplitIndexArgumentRef=ju,u.splitListOperationSplitIndexDataType=ku,u.stringPrototype=F,u.stringValueAutogenerationSchema=Kl,u.suggestNewIdForEntity=hd,u.test_primitive_entities_export=J3,u.toCamelCase=o9,u.toEntityState=Bt,u.toKebabCase=ev,u.toLowerCaseKebabCase=Xs,u.toPascalCase=l9,u.untypedObjectPrototype=Xe,u.updateErrorsList=X,u.updateValueReader=fa,u.urlDefaultValue=wy,u.uuidPrototype=Ea,u.validateArgumentDeclarationName=pd,u.validateCalledByErrorIdInAction=o3,u.validateCalledByIdInAction=s3,u.validateCallers=Tv,u.validateConditionEntityDeclaration=d3,u.validateCustomEntityName=Ks,u.validateDataOperation=kn,u.validateDataOperationDataToValidateArgument=by,u.validateDataOperationDataToValidateArgumentParentRef=Ry,u.validateDataOperationDataToValidateArgumentRef=Ty,u.validateDataOperationDataToValidateDataType=Ey,u.validateDataOperationEntityToMatchTypeArgument=Py,u.validateDataOperationEntityToMatchTypeArgumentParentRef=Iy,u.validateDataOperationEntityToMatchTypeArgumentRef=gy,u.validateDataOperationEntityToMatchTypeDataType=vy,u.validateDataOperationError=Oy,u.validateDataOperationErrorParentRef=Sy,u.validateDataOperationOutputEntityDeclaration=Ay,u.validateDataOperationOutputEntityDeclarationParentRef=Dy,u.validateEntryCaller=mv,u.validateErrorCaller=fv,u.validateFunctionCallDeclaration=Rv,u.validateFunctionDeclarationName=cd,u.validateGeneratedEntityParentIsNotBuiltInEntity=n3,u.validateGeneration=e3,u.validateGenerationTarget=Ae,u.validateGenerationUpdate=t3,u.validateLoopEntityDeclaration=u3,u.validateName=d9,u.validateOperationEntityDeclaration=bv,u.validatePropertyName=ud,u.validateReachability=En,u.validateReadsValueInActionPayload=l3,u.validateReferenceObject=to,u.validateReferenceToOne=Ed,u.validateReferences=Fe,u.validateReturnDeclarationName=yd,u.validateSuccessCaller=hv,u.validateValueReaderGenerationUpdate=pa,u.validateValueWritter=Pd,u.validateVariableDeclarationName=dd,u.validateVariableInternalCallUse=Dd,u.valueAutogenerationCurrentDateAndTimeSchema=ub,u.valueAutogenerationGenericSchema=gs,u.valueAutogenerationOptions=nc,u.valueAutogenerationOptionsSchema=db,u.valueAutogenerationRandomBooleanSchema=Ql,u.valueAutogenerationRandomDateBetweenSchema=bb,u.valueAutogenerationRandomDateFromSchema=Eb,u.valueAutogenerationRandomDateSchema=Ps,u.valueAutogenerationRandomDateUntilSchema=Rb,u.valueAutogenerationRandomNumberBetweenSchema=hb,u.valueAutogenerationRandomNumberFromSchema=pb,u.valueAutogenerationRandomNumberSchema=vs,u.valueAutogenerationRandomNumberUntilSchema=yb,u.valueAutogenerationRandomSchema=Yi,u.valueAutogenerationRandomTextBetweenSchema=Tb,u.valueAutogenerationRandomTextFromSchema=fb,u.valueAutogenerationRandomTextSchema=Is,u.valueAutogenerationRandomTextUntilSchema=mb,u.valueAutogenerationRangeValueTypesSchema=Hi,u.valueAutogenerationUniqueSchema=Xl,u.waitOperation=ot,u.waitOperationMillisecondsNumberArgument=jn,u.waitOperationMillisecondsNumberArgumentRef=jp,u.waitOperationMillisecondsNumberDataType=kp,u.waitOperationOperationError=Wp,u.waitOperationOperationErrorParentRef=Jp,u.waitOperationRef=qp,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
373
|
+
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 extendedProperties(){return S([...this.extends.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[]),...this.implements.reduce((e,t)=>[...[...t.properties,...t.extendedProperties].filter(a=>!a.abstract),...e],[])])}validateGeneratedUpdate(e){const t=[];return e.parent&&t.push(new E({id:`${this.id}--${y.InvalidParentUpdate}`,code:y.InvalidParentUpdate,severity:m.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(){if(this.parent.type===r.DataType){const e=this.parent;e.entity=this}else this.project.addCustomEntity(this);return 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=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.methods=this.initialData.methods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.abstractMethods=this.initialData.abstractMethods.map(e=>{const t=R(e,this.project);return t.setParent(this),t.initChildren(),t}),this.extends=this.initialData.extends.map(e=>R(e,this.project)),this.implements=this.initialData.implements.map(e=>R(e,this.project)),this.addSuggestions(),this)}addSuggestions(){return this.implements.forEach(e=>{d8(this,e).forEach(a=>{const s=a.toJSON();s.id=`_suggestion--parent--${this.id}--${a.id}`;const o=R(s,this.project);o.suggestion=!0,o.setParent(this),o.initChildren(),this.addSuggestedProperty(o)}),u8(this,e).forEach(a=>{const s=`_suggestion--parent--${this.id}--${a.id}`,o=a.implementAsFunctionDeclaration(s),d=R(o,this.project);if(d.suggestion=!0,d.setParent(this),d.initChildren(),d.inputs.forEach(p=>{p.suggestion=!0}),d.returnStatements.length){const p=d.returnStatements[0];p.suggestion=!0,p.outputs.forEach(h=>{h.suggestion=!0})}this.addSuggestedMethod(d)})}),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:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.methods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.abstractMethods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.suggestedProperties.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),this.suggestedMethods.forEach(s=>{const{affected:o,removed:d}=s.remove({ignoreUpstream:!0,seenEntities:t});i.push(...o),a.push(...d)}),{affected:S(i),removed:S(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:S(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:r.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===r.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===r.CustomEntity).flatMap(i=>i.toFlatGenerationTarget(e)),...this.implements.filter(i=>i.type===r.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=c8(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(){return new pe(this.toJSON(),this.project)}getFunctionDeclaration(e){return this.methods.find(t=>t.id===e)}implement(e,t){return lo(this,e,t)}getAllInteractiveMethods(){const e=this.implements.filter(i=>i.type===r.CustomEntity||i.type===r.BuiltInBaseEntity&&i.interactive);return S([...this.methods,...this.extends.flatMap(i=>i.getAllInteractiveMethods()),...e.flatMap(i=>i.getAllInteractiveMethods())])}inferFromInputs(e){if(this.parent.type!==r.DataType||!this.parent.inferred)return this;const t=e.filter(i=>!i.declaration);return t.length===0?this:(t.forEach(i=>{const a=zs(i),s={id:i.id+"--infered-property",type:r.Property,version:1,name:A(i,this.project),description:i.description,static:!0,abstract:!1,private:!1,required:!1,index:i.index,implements:null,dataType:null,parent:null},o=R(s,this.project);return o.setParent(this),o.dataType=a,this.addProperty(o),i.setDeclaration(o),o}),this)}};l(pe,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),l(pe,"INMUTABLE_BASE_PROPERTIES",["id","version","type"]),l(pe,"BASE_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"MUTABLE_META_PROPERTIES",[...pe.MUTABLE_BASE_PROPERTIES,"x","y"]),l(pe,"INMUTABLE_META_PROPERTIES",[...pe.INMUTABLE_BASE_PROPERTIES]),l(pe,"META_PROPERTIES",[...pe.MUTABLE_META_PROPERTIES,...pe.INMUTABLE_META_PROPERTIES]),l(pe,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),l(pe,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),l(pe,"UPSTREAM_PROPERTIES",[...pe.MUTABLE_UPSTREAM_PROPERTIES,...pe.INMUTABLE_UPSTREAM_PROPERTIES]),l(pe,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),l(pe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(pe,"DOWNSTREAM_PROPERTIES",[...pe.MUTABLE_DOWNSTREAM_PROPERTIES,...pe.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(pe,"PROPERTIES",[...pe.META_PROPERTIES,...pe.UPSTREAM_PROPERTIES,...pe.DOWNSTREAM_PROPERTIES]);let Dr=pe;function _3(n){const e=U4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class $t{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",!1);l(this,"static");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"interactive",!1);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}get extendedProperties(){return S(this.extends.reduce((e,t)=>{const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);return[...e,...i]},[]))}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:r.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=_3(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 $t(this.toJSON(),this.project)}implement(e,t){return lo(this,e,t)}getAllInteractiveMethods(){const e=[];return this.interactive&&(e.push(...this.methods),this.extends.filter(i=>i.type===r.BuiltInBaseEntity&&i.interactive||i.type===r.PrimitiveEntity).forEach(i=>{i instanceof $t&&e.push(...i.getAllInteractiveMethods())})),S(e)}}function M3(n){const e=w4(),t=n.toJSON();e.safeParse(t).success;const a=[];return X(n.errors,a)}class Vt{constructor(e,t){l(this,"initialData");l(this,"id");l(this,"version");l(this,"name");l(this,"description",null);l(this,"type",r.PrimitiveEntity);l(this,"static");l(this,"abstract");l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a})}get extendedProperties(){return S(this.extends.reduce((e,t)=>{const i=[...t.properties,...t.extendedProperties].filter(a=>!a.abstract);return[...e,...i]},[]))}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:r.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=M3(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 Vt(this.toJSON(),this.project)}getAllInteractiveMethods(){const e=[];return e.push(...this.methods),this.extends.filter(i=>i.type===r.BuiltInBaseEntity&&i.interactive||i.type===r.PrimitiveEntity).forEach(i=>{i instanceof $t&&e.push(...i.getAllInteractiveMethods())}),S(e)}}function ma(n,e){if(!n)throw new Error("Entity is null");const t=e.findSubscribedInstance(n);switch(n.type){case r.PrimitiveValue:return t||new ci(n,e);case r.CustomEntity:return t||new Dr(n,e);case r.PrimitiveEntity:return t||new Vt(n,e);case r.FunctionDeclaration:return t||new ur(n,e);case r.GlobalEvent:return t||new oi(n,e);case r.DataType:return t||new si(n,e);case r.Property:return t||new dr(n,e);case r.FunctionCall:return t||new vr(n,e);case r.Condition:return t||new hr(n,e);case r.Operation:return t||new pr(n,e);case r.VariableDeclaration:return t||new fr(n,e);case r.VariableInstance:return t||new mr(n,e);case r.OutputMap:return t||new Tn(n,e);case r.ReturnDeclaration:return t||new Ct(n,e);case r.ArgumentDeclaration:return t||new Rr(n,e);case r.InputMap:return t||new mn(n,e);case r.Project:return t||new $(n);case r.InstalledProject:return t||new Er(n,e);case r.ActionDescriptor:return t||new $e(n,e);case r.ReturnStatement:return t||new br(n,e);case r.Loop:return t||new yr(n,e);case r.Search:return t||new Tr(n,e);case r.ValueDescriptor:return t||new gr(n,e);case r.BuiltInBaseEntity:return t||new $t(n,e);case r.InternalCall:return t||new li(n,e);case r.ContinueStatement:return t||new yt(n,e);case r.BreakStatement:return t||new di(n,e);default:throw new Error("Invalid entity type: "+n.type)}}function R(n,e){if(!n)throw new Error("Entity is null");const t=ma(n,e);return t.subscribe(),t}function N3(n,e){if(!n)throw new Error("Entity is null");switch(n.type){case r.PrimitiveValue:return ci.fromGenerationTarget(n,e);case r.CustomEntity:return Dr.fromGenerationTarget(n,e);case r.FunctionDeclaration:return ur.fromGenerationTarget(n,e);case r.GlobalEvent:return oi.fromGenerationTarget(n,e);case r.DataType:return si.fromGenerationTarget(n,e);case r.Property:return dr.fromGenerationTarget(n,e);case r.FunctionCall:return vr.fromGenerationTarget(n,e);case r.Condition:return hr.fromGenerationTarget(n,e);case r.Operation:return pr.fromGenerationTarget(n,e);case r.VariableDeclaration:return fr.fromGenerationTarget(n,e);case r.VariableInstance:return mr.fromGenerationTarget(n,e);case r.OutputMap:return Tn.fromGenerationTarget(n,e);case r.ReturnDeclaration:return Ct.fromGenerationTarget(n,e);case r.ArgumentDeclaration:return Rr.fromGenerationTarget(n,e);case r.InputMap:return mn.fromGenerationTarget(n,e);case r.InstalledProject:return Er.fromGenerationTarget(n,e);case r.ReturnStatement:return br.fromGenerationTarget(n,e);case r.Loop:return yr.fromGenerationTarget(n,e);case r.Search:return Tr.fromGenerationTarget(n,e);case r.ActionDescriptor:return $e.fromGenerationTarget(n,e);case r.ValueDescriptor:return gr.fromGenerationTarget(n,e);case r.InternalCall:return li.fromGenerationTarget(n,e);case r.ContinueStatement:return yt.fromGenerationTarget(n,e);case r.BreakStatement:return di.fromGenerationTarget(n,e);default:throw new Error("Invalid entity type: "+n.type)}}const Y=class Y{constructor(e){l(this,"initialData");l(this,"id");l(this,"version");l(this,"type",r.Project);l(this,"name",null);l(this,"description",null);l(this,"x");l(this,"y");l(this,"entities",[]);l(this,"projects",[]);l(this,"functions",[]);l(this,"events",[]);l(this,"variableDeclarations",[]);l(this,"variableInstances",[]);l(this,"conditions",[]);l(this,"operations",[]);l(this,"functionCalls",[]);l(this,"loops",[]);l(this,"searches",[]);l(this,"primitives",[]);l(this,"builtInBaseEntities",[]);l(this,"operationDeclarations",[]);l(this,"globalEventActionDescriptors",[]);l(this,"loopDeclarations",[]);l(this,"conditionDeclarations",[]);l(this,"valueDescriptors",[]);l(this,"dataTypes",[]);l(this,"project");l(this,"instances",{});l(this,"builtInInstances",{});l(this,"errors",[]);l(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{Y.UUID||(Y.UUID=as==null?void 0:as())}catch(t){console.error("Error initializing UUID module",t),Y.UUID={uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:i=>i}}}static injectUUIDModule(e){Y.UUID=e}static validateGenerationTarget(e,t){let i=JSON.parse(JSON.stringify(e));const a=[];return a.push(...Ae(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(){return 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=R(e,this);return t.setParent(this),t.initChildren(),t}),this.projects=this.initialData.projects.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functions=this.initialData.functions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.events=this.initialData.events.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableDeclarations=this.initialData.variableDeclarations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.variableInstances=this.initialData.variableInstances.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.conditions=this.initialData.conditions.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.operations=this.initialData.operations.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.functionCalls=this.initialData.functionCalls.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.loops=this.initialData.loops.map(e=>{const t=R(e,this);return t.setParent(this),t.initChildren(),t}),this.searches=this.initialData.searches.map(e=>{const t=R(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+"--"+Y.UUID.uuid()+"--ref",type:r.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=r8(),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 Y(this.toJSON())}getCustomEntity(e){return this.entities.find(t=>t.id===e)||null}addCustomEntityFromTransfer(e){const t=R(e,this);return this.addCustomEntity(t),t}addCustomEntity(e){return this.entities.includes(e)||this.entities.push(e),e}addFunctionDeclarationFromTransfer(e){const t=R(e,this);return this.addFunctionDeclaration(t),t}addFunctionDeclaration(e){return this.functions.includes(e)||this.functions.push(e),e}addFunctionCallFromTransfer(e){const t=R(e,this);return this.addFunctionCall(t),t}addFunctionCall(e){return this.functionCalls.includes(e)||this.functionCalls.push(e),e}addVariableDeclarationFromTransfer(e){const t=R(e,this);return this.addVariableDeclaration(t),t}addVariableDeclaration(e){return this.variableDeclarations.includes(e)||this.variableDeclarations.push(e),e}addVariableInstanceFromTransfer(e){const t=R(e,this);return this.addVariableInstance(t),t}addVariableInstance(e){return this.variableInstances.includes(e)||this.variableInstances.push(e),e}addInstalledProjectFromTransfer(e){const t=R(e,this);return this.addInstalledProject(t),this}addInstalledProject(e){return this.projects.includes(e)||this.projects.push(e),this}addGlobalEventFromTransfer(e){const t=R(e,this);return this.addGlobalEvent(t),this}addGlobalEvent(e){return this.events.includes(e)||this.events.push(e),this}addConditionFromTransfer(e){const t=R(e,this);return this.addCondition(t),this}addCondition(e){return this.conditions.includes(e)||this.conditions.push(e),this}addOperationFromTransfer(e){const t=R(e,this);return this.addOperation(t),this}addOperation(e){return this.operations.includes(e)||this.operations.push(e),this}addLoopFromTransfer(e){const t=R(e,this);return this.addLoop(t),this}addLoop(e){return this.loops.includes(e)||this.loops.push(e),this}addSearchFromTransfer(e){const t=R(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!==r.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=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.operations.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.functionCalls.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.conditions.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.conditions.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.operations.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.loops.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[]),...this.searches.reduce((t,i)=>{const a=Ie(i);return[...t,...a.filter(s=>s.type===r.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.functionCalls.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.conditions.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.operations.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.loops.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[]),...this.searches.reduce((t,i)=>{const a=Z(i);return[...t,...a]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableInstance);return[...t,...s]},[])]}getVariableDeclarations(){return S([...this.variableDeclarations,...this.getEntryPoints().reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.functionCalls.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.conditions.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.operations.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.loops.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.VariableDeclaration);return[...t,...s]},[]),...this.searches.reduce((t,i)=>{const s=Z(i).filter(o=>o.type===r.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(d=>d.id===s);o&&i.setDeclaration(o)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(e=>e.name===_.PERSISTED_ENTITY)||null}};l(Y,"UUID",{uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:e=>e}),l(Y,"MUTABLE_BASE_PROPERTIES",["name","description"]),l(Y,"INMUTABLE_BASE_PROPERTIES",["id","type","version"]),l(Y,"BASE_PROPERTIES",[...Y.MUTABLE_BASE_PROPERTIES,...Y.INMUTABLE_BASE_PROPERTIES]),l(Y,"MUTABLE_META_PROPERTIES",[...Y.MUTABLE_BASE_PROPERTIES,"x","y"]),l(Y,"INMUTABLE_META_PROPERTIES",[...Y.INMUTABLE_BASE_PROPERTIES]),l(Y,"META_PROPERTIES",[...Y.MUTABLE_META_PROPERTIES,...Y.INMUTABLE_META_PROPERTIES]),l(Y,"MUTABLE_UPSTREAM_PROPERTIES",[]),l(Y,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),l(Y,"UPSTREAM_PROPERTIES",[...Y.MUTABLE_UPSTREAM_PROPERTIES,...Y.INMUTABLE_UPSTREAM_PROPERTIES]),l(Y,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),l(Y,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),l(Y,"DOWNSTREAM_PROPERTIES",[...Y.MUTABLE_DOWNSTREAM_PROPERTIES,...Y.INMUTABLE_DOWNSTREAM_PROPERTIES]),l(Y,"PROPERTIES",[...Y.META_PROPERTIES,...Y.UPSTREAM_PROPERTIES,...Y.DOWNSTREAM_PROPERTIES]);let $=Y;class Hv extends $e{constructor(t){super(Lt,t);l(this,"id",Pe.Parallel);l(this,"name",Pe.Parallel);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",Lt);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=Lt.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=Lt.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=Lt.error?R(Lt.error,this.project):null}}class Yv extends $e{constructor(t){super(ot,t);l(this,"id",ot.id);l(this,"name",ot.name);l(this,"description",ot.description);l(this,"version",ot.version);l(this,"autoexecutable",!1);l(this,"initialData",ot);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=ot.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=ot.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=ot.error?R(ot.error,this.project):null}}class zv extends $e{constructor(t){super(rn,t);l(this,"id",Pe.Sequential);l(this,"name",Pe.Sequential);l(this,"description","Execute a list of actions one after the other");l(this,"version",1);l(this,"autoexecutable",!0);l(this,"initialData",rn);l(this,"type",r.ActionDescriptor);l(this,"fixedArguments",[]);l(this,"fixedReturns",[]);l(this,"error",null);l(this,"dynamicArgumentTypes",null);l(this,"dynamicReturnTypes",null);l(this,"project");this.project=t,this.fixedArguments=rn.fixedArguments.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.fixedReturns=rn.fixedReturns.map(i=>{const a=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.error=rn.error?R(rn.error,this.project):null}}function $3(n){const e=[new zv(n),new Hv(n),new Yv(n),new $e(fi,n),new $e(Cr,n),new $e(kn,n),new $e(ga,n),new $e(Do,n),new $e(Oo,n),new $e(So,n),new $e(Ea,n),new $e(yi,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.operationDeclarations=e,e}class Zv extends $t{constructor(t){super(_e,t);l(this,"initialData");l(this,"id",_.PERSISTED_ENTITY);l(this,"version",1);l(this,"name",_.PERSISTED_ENTITY);l(this,"description",_e.description);l(this,"type",r.BuiltInBaseEntity);l(this,"abstract",_e.abstract);l(this,"static",_e.static);l(this,"properties",[]);l(this,"methods",[]);l(this,"abstractMethods",[]);l(this,"extends",[]);l(this,"errors",[]);l(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=R(i,this.project);return a.setParent(this),a.initChildren(),a}),this.methods=this.initialData.methods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(i=>{const a=R(i,this.project);return a.parent=this,a}),this.extends=this.initialData.extends.map(i=>R(i,this.project))}}function V3(n){const e=[new Zv(n),new $t(Ca,n),new $t(vn,n),new $t(Ho,n),new $t(Oa,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.builtInBaseEntities=e,e}function L3(n){const e=[new Vt(F,n),new Vt(bn,n),new Vt(De,n),new Vt(Xe,n),new Vt(gn,n),new Vt(nn,n),new Vt(Ta,n),new Vt(go,n)];return e.forEach(t=>{n.subscribeBuiltInInstance(t)}),n.primitives=e,e}function G3(n){const e=[new $e(Na,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.globalEventActionDescriptors=e,e}function F3(n){const e=[new $e(qn,n),new $e(Fo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.loopDeclarations=e,e}function U3(n){const e=[new gr(Xo,n)];return e.forEach(t=>{t.initChildren(),n.subscribeBuiltInInstance(t)}),n.valueDescriptors=e,e}function x3(n){const e=[new $e(Jn,n),new $e(wr,n)];return e.forEach(t=>{t.initChildren()}),n.conditionDeclarations=e,e}const Ar={},To={};async function j3(n,e={}){const t={...ob};return t.id=n.id,e.empty?{data:{id:n.id,type:r.Project,version:1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]}}:{data:t}}function Xv(n){const e=new $(n);return L3(e),V3(e),$3(e),G3(e),F3(e),U3(e),x3(e),e.initChildren(),e}async function k3(n,e={}){if(n.id&&Ar[n.id])return Ar[n.id];if(n.id&&To[n.id])return await To[n.id],Ar[n.id];const t=j3(n,e);n.id&&(To[n.id]=t);const i=await t;if(i.data){const a=Xv(i.data);return Ar[n.id]=a,n.id&&delete To[n.id],a}return null}function q3(n){return Ar[n.id]&&delete Ar[n.id],null}const J3="test_primitive_entities_export";u.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=vd,u.ActionDescriptorState=$e,u.ActionDescriptorValuesType=L,u.ActionInputMapState=x9,u.ActionOutputMapState=q9,u.AppendToListOperationInputIds=pp,u.AppendToListOperationOutputIds=yp,u.ArgumentDeclarationState=Rr,u.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=Ed,u.BUILT_IN_BASE_ENTITY_IDS=Ve,u.BUILT_IN_ENTITY_TYPES=Or,u.BaseCanvasDraggableState=D9,u.BaseEntityNames=_,u.BaseState=P9,u.BaseValueDescriptorIds=$o,u.BreakStatementState=di,u.BuiltInBaseEntityState=$t,u.CACHED_PROJECTS_BY_ID=Ar,u.CALLABLE_ENTITIES_EXPLANATION=n3,u.CALLABLE_TYPES=Rn,u.CALLER_ENTITIES_EXPLANATION=dv,u.CALLER_TYPES=tn,u.CALLS_UPDATE_EXPLANATION=Ln,u.COMPARISON_CONDITIONS=um,u.CONDITIONS=OI,u.CUSTOM_ENTITY_OPERATIONS=Sy,u.CallableEntityClass=S9,u.CallerEntityClass=hd,u.ChildEntityState=A9,u.ComparisonOperatorTypes=Oe,u.ConditionState=hr,u.ContinueStatementState=yt,u.CreateNewInputIds=ry,u.CreateNewOutputIds=iy,u.CustomEntityState=Dr,u.DRAGGABLE_CALLABLE_TYPES=Ro,u.DRAGGABLE_CALLER_TYPES=Fd,u.DRAGGABLE_ELEMENT_TYPES=bo,u.DRAGGABLE_EXECUTABLE_TYPES=nI,u.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=Eo,u.DataTypeCompatibilityTypes=Nt,u.DataTypeParentChildRelation=qe,u.DataTypeState=si,u.ENTITIES_WITH_VALLUES_EXPLANATION=ro,u.ENTITY_TYPES=rI,u.ENTITY_WITH_LOGIC_SCOPE_TYPES=st,u.ENTITY_WITH_NAMES_TYPES=Ud,u.ENTITY_WITH_VALUE_TYPES=Gd,u.ENTRY_POINT_ENTITIES_EXPLANATION=da,u.ENTRY_POINT_TYPES=Me,u.EVENT_TYPES=Sr,u.EXECUTABLE_TYPES=tI,u.EXECUTION_OPERATIONS=ny,u.EntityError=er,u.EntityErrorSeverity=m,u.EntityGenerationError=E,u.EntityGenerationErrorCode=y,u.EntityInstanceErrorCode=O,u.EntityOperations=Ze,u.EntityType=r,u.EntityWithLogicScopeClass=w9,u.EntityWithValueClass=B9,u.EntryPointEntityClass=O9,u.ExecutionOperations=Pe,u.FunctionCallState=vr,u.FunctionDeclarationState=ur,u.GLOBAL_EVENT_DECLARATIONS=CI,u.GetLastInListOperationInputIds=ep,u.GetLastInListOperationOutputIds=tp,u.GlobalEventNames=en,u.GlobalEventState=oi,u.HTTPOperations=Ye,u.HTTP_OPERATIONS=oh,u.InputMapState=mn,u.InstalledProjectState=Er,u.InternalCallState=li,u.JoinListOperationInputIds=bu,u.JoinListOperationOutputIds=gu,u.JoinStringOperationInputIds=su,u.JoinStringOperationOutputIds=ou,u.LIST_OPERATIONS=Ap,u.ListOperations=k,u.LoopState=yr,u.LoopTypes=je,u.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=Gn,u.NUMBER_OPERATIONS=au,u.NumberAdditionOperationInputIds=Wd,u.NumberAdditionOperationOutputIds=Hd,u.NumberOperations=at,u.OPERATION_DECLARATIONS=aI,u.OperationState=pr,u.OutputMapParentChildRelation=Ld,u.OutputMapState=Tn,u.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=io,u.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Vn,u.PASS_THROUGH_CALLABLE_TYPES=we,u.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=gd,u.ParallelExecutionOperation=Hv,u.ParallelExecutionOperationInputIds=Sp,u.ParallelExecutionOperationOutputIds=Op,u.PassThroughCallableEntityClass=C9,u.PersistedEntity=Zv,u.PersistedEntityMethods=Pt,u.PrimitiveEntityState=Vt,u.PrimitiveTypes=v,u.PrimitiveValueState=ci,u.ProjectState=$,u.PropertyState=dr,u.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=r3,u.ReturnDeclarationState=Ct,u.ReturnStatementState=br,u.STANDALONE_CONDITIONS=am,u.STRING_OPERATIONS=Ru,u.ScopeCompatibilityType=mo,u.SearchState=Tr,u.SequentialExecutionOperation=zv,u.SequentialExecutionOperationInputIds=Jp,u.SequentialExecutionOperationOutputIds=Wp,u.SharedEntityErrorCode=g,u.SharedStateFunctionality=ov,u.SplitListOperationInputIds=Vu,u.SplitListOperationOutputIds=Lu,u.StandaloneOperatorTypes=wt,u.StringOperations=ve,u.TERMINATION_TYPES=Ce,u.USER_MANAGED_ENTITY_TYPES=iI,u.UserManagedEntityStateFunctionality=I9,u.VALUE_READING_ENTITIES_EXPLANATION=bd,u.VALUE_READING_TYPES=xn,u.VALUE_WRITING_ENTITIES_EXPLANATION=uv,u.VALUE_WRITING_TYPES=Be,u.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=Rd,u.VARIABLE_TYPES=Ge,u.ValidationInputIds=yy,u.ValidationOutputIds=hy,u.ValueAutogenerationType=Ue,u.ValueDescriptorParentChildRelation=C,u.ValueDescriptorState=gr,u.ValueReadingEntityClass=la,u.ValueWritingEntityClass=ca,u.VariableDeclarationState=fr,u.VariableInputMapState=U9,u.VariableInstanceState=mr,u.VariableOutputMapState=k9,u.WaitOperation=Yv,u.WaitOperationInputIds=Gp,u.WaitOperationOutputIds=Fp,u._VALUE_READING_TYPES=Kv,u._VALUE_WRITING_TYPES=eI,u.appendToListOperation=ga,u.appendToListOperationElementToAppendArgument=Bo,u.appendToListOperationElementToAppendArgumentParentRef=gp,u.appendToListOperationElementToAppendArgumentRef=mp,u.appendToListOperationError=Dp,u.appendToListOperationErrorParentRef=Pp,u.appendToListOperationListArgument=Co,u.appendToListOperationListArgumentParentRef=bp,u.appendToListOperationListArgumentRef=hp,u.appendToListOperationListDataType=fp,u.appendToListOperationResultListDataType=Rp,u.appendToListOperationResultListReturn=Ip,u.appendToListOperationResultListReturnParentRef=vp,u.appendToListOperationResultListReturnRef=Ep,u.appendToListOperationSecondListDataType=Tp,u.asGenerationActionExample=Qt,u.baseHttpRequestFunctionDeclaration=fi,u.baseHttpRequestFunctionDeclarationErrorValueDescriptor=Go,u.baseHttpRequestFunctionDeclarationErrorValueDescriptorDatatype=sh,u.baseHttpRequestFunctionDeclarationErrorValueDescriptorRef=ah,u.baseHttpRequestFunctionDeclarationRef=th,u.baseHttpRequestFunctionDeclarationRefEight=rh,u.baseHttpRequestFunctionDeclarationRefFive=Ky,u.baseHttpRequestFunctionDeclarationRefFour=Qy,u.baseHttpRequestFunctionDeclarationRefNine=ih,u.baseHttpRequestFunctionDeclarationRefSeven=nh,u.baseHttpRequestFunctionDeclarationRefSix=eh,u.baseHttpRequestFunctionDeclarationRefThree=Xy,u.baseHttpRequestFunctionDeclarationRefTwo=Zy,u.booleanPrototype=bn,u.capitalizeFirstLetter=Hs,u.checkAreCustomEntitiesCompatibleAsDataType=Wg,u.checkAreDataTypesCompatible=Ys,u.checkArePropertiesCompatibleAsDataType=Jg,u.checkIsBranchDependentButNotDirectlyOnBranch=pa,u.checkIsBranchDependentOnBranch=p3,u.checkIsCallableEntityReachable=fa,u.checkIsCanvasEntity=C3,u.checkIsDetachedBranch=xv,u.checkIsDetachedBranchShallow=$d,u.checkIsGlobalVariable=S3,u.checkIsGloballyDeclared=Nd,u.checkIsMethod=qv,u.checkIsNestedScope=fo,u.checkScopeCompatibility=ya,u.createEntityError=j,u.createNewInstanceOperation=Cr,u.createNewInstanceOperationEntityToInstanciateArgument=ly,u.createNewInstanceOperationEntityToInstanciateArgumentRef=ay,u.createNewInstanceOperationEntityToInstanciateDataType=sy,u.createNewInstanceOperationError=py,u.createNewInstanceOperationErrorParentRef=uy,u.createNewInstanceOperationOutputEntityDeclaration=dy,u.createNewInstanceOperationOutputEntityDeclarationParentRef=cy,u.createNewInstanceOperationRef=oy,u.createSemanticId=Xt,u.createStateFromGenerationTargetType=N3,u.createStateFromType=ma,u.createStateFromTypeAndSubscribe=R,u.cronJobBuiltInBaseEntity=Ho,u.cronJobBuiltInBaseEntityExpressionProperty=tm,u.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=DI,u.cronJobBuiltInBaseEntityExpressionPropertyRef=Kf,u.cronJobBuiltInBaseEntityRef=em,u.cronJobTriggeredFunctionDeclarationBlueprint=Wo,u.cronJobTriggeredFunctionDeclarationBlueprintParentRef=Xf,u.customEntityToZodSchema=Cm,u.dataTypeCompatibilityToErrorExplanation=Rv,u.datePrototype=nn,u.dateValueAutogenerationSchema=tc,u.deletePersistedEntityMethod=Jo,u.deletePersistedEntityMethodParentRef=Cf,u.deleteRootProject=q3,u.endpointBuiltInBaseEntity=Ca,u.endpointBuiltInBaseEntityRef=Oh,u.endpointBuiltInBaseEntityRefFour=Tf,u.endpointBuiltInBaseEntityRefThree=Lh,u.endpointBuiltInBaseEntityRefTwo=Mh,u.endpointBuiltInCorsProperty=Ch,u.endpointBuiltInCorsPropertyDataType=Sh,u.endpointBuiltInCorsPropertyDataTypeRef=Dh,u.endpointBuiltInCorsPropertyRef=Ah,u.endpointBuiltInMethodProperty=xo,u.endpointBuiltInMethodPropertyDataType=Vh,u.endpointBuiltInMethodPropertyDataTypeRef=Nh,u.endpointBuiltInMethodPropertyRef=$h,u.endpointBuiltInPathProperty=Uo,u.endpointBuiltInPathPropertyDataType=_h,u.endpointBuiltInPathPropertyDataTypeRef=Bh,u.endpointBuiltInPathPropertyRef=wh,u.endpointPathParamsArgumentDeclaration=Qh,u.endpointPathParamsArgumentDeclarationRef=Hh,u.endpointPathParamsVariableDataType=Yh,u.endpointPathParamsVariableDataTypeRef=Wh,u.endpointReachedTriggerActionDescriptor=jo,u.endpointReachedTriggerActionDescriptorRef=zh,u.endpointReachedTriggerActionDescriptorRefFour=tf,u.endpointReachedTriggerActionDescriptorRefThree=Kh,u.endpointReachedTriggerActionDescriptorRefTwo=Xh,u.endpointRequestBodyArgumentDeclaration=nf,u.endpointRequestBodyArgumentDeclarationRef=xh,u.endpointRequestBodyVariableDataType=jh,u.endpointRequestHeadersArgumentDeclaration=Zh,u.endpointRequestHeadersArgumentDeclarationRef=Fh,u.endpointRequestHeadersVariableDataType=Uh,u.endpointRequestHeadersVariableDataTypeRef=Gh,u.endpointRequestQueryParamsArgumentDeclaration=ef,u.endpointRequestQueryParamsArgumentDeclarationRef=qh,u.endpointRequestQueryParamsVariableDataType=Jh,u.endpointRequestQueryParamsVariableDataTypeRef=kh,u.endpointResponseBodyDataType=hf,u.endpointResponseBodyReturnDeclaration=mf,u.endpointResponseBodyReturnDeclarationRef=yf,u.endpointResponseCodeDataType=af,u.endpointResponseCodeReturnDeclaration=of,u.endpointResponseCodeReturnDeclarationRef=rf,u.endpointResponseHeadersDataType=df,u.endpointResponseHeadersDataTypeRef=lf,u.endpointResponseHeadersReturnDeclaration=pf,u.endpointResponseHeadersReturnDeclarationRef=cf,u.endpointReturnStatementRef=sf,u.endpointReturnStatementRefThree=ff,u.endpointReturnStatementRefTwo=uf,u.enumOptionsProperty=Jd,u.enumOptionsPropertyDataType=kd,u.enumOptionsPropertyDataTypeRef=xd,u.enumOptionsPropertyRef=jd,u.enumPrototype=gn,u.enumPrototypeRef=qd,u.executionBuiltInEntity=zo,u.executionBuiltInEntityAbortMethod=Yo,u.executionBuiltInEntityAbortMethodParentRef=nm,u.filterOutDuplicateEntities=S,u.filterOutDuplicateErrors=v4,u.findReferenceToSelfInList=Mv,u.findReferencesToSelfInProject=g3,u.flattenCalls=Kt,u.flattenCanvasAncestorsUntil=co,u.flattenCustomEntityExtensionAndImplementationTypes=Gv,u.flattenCustomEntityExtensionTypes=yo,u.flattenCustomEntityExtensions=wd,u.flattenCustomEntityImplementations=_d,u.flattenCustomEntityImplementionTypes=po,u.flattenDerivedCanvasEntities=It,u.flattenDetachedBranch=kv,u.flattenElementCalls=Ie,u.flattenElementCallsOnTheSameScope=b3,u.flattenProjectElements=_v,u.flattenRelatedCanvasElementsOnTheLeft=Lv,u.flattenRelatedCanvasElementsOnTheRight=Vv,u.flattenVariableReads=wv,u.flattenVariableWrites=Bv,u.flattenVariables=Z,u.fromZodParseToEntityGenerationErrors=fd,u.generate=DD,u.generateActionExample=i3,u.generateExecutionDataType=i9,u.generateMutablePropertiesExplanation=eo,u.generateRandomBoolean=tT,u.generateRandomDate=Mm,u.generateRandomDateAfter=Bm,u.generateRandomDateBefore=wm,u.generateRandomDateBetweenRange=_m,u.generateRandomNumber=Zm,u.generateRandomNumberAfter=Hm,u.generateRandomNumberBefore=Ym,u.generateRandomNumberBetweenRange=zm,u.generateRandomText=eT,u.generateRandomTextAfter=Xm,u.generateRandomTextBefore=Qm,u.generateRandomTextBetweenRange=Km,u.generateUniqueUUID=Wm,u.getAllActionDescriptorsForConditions=oo,u.getAllActionDescriptorsForGlobalEvents=ao,u.getAllActionDescriptorsForLoops=so,u.getAllActionDescriptorsForOperations=l3,u.getAllGloballyDeclaredFunctionDeclarationsExplanation=mv,u.getBaseBuiltInEntities=Un,u.getBaseSchemaBasedOnType=lv,u.getBuiltInEntityOwner=Pr,u.getCallableEntityReferenceSchema=ke,u.getCallableEntityTypeSchema=_b,u.getCallerEntityReferenceSchema=Sx,u.getCallerEntityTypeSchema=Ax,u.getCalls=Ad,u.getCanvasEntitiesDerivedFromInternalCalls=$v,u.getCanvasEntitiesDerivedFromWrites=ui,u.getCanvasEntityDerivedFromValueReadingEntity=Bd,u.getCanvasEntityReferenceSchema=qx,u.getCanvasEntityTypeSchema=kx,u.getChildrenEntityWithValues=h3,u.getCommonAncestor=Dd,u.getCommonChildren=vv,u.getDeclaration=id,u.getDeepestScope=Wv,u.getDraggableCallableEntityReferenceSchema=Nb,u.getDraggableCallableEntityTypeSchema=Mb,u.getDraggableCallerEntityReferenceSchema=Cx,u.getDraggableCallerEntityTypeSchema=Ox,u.getDraggableExecutableEntityReferenceSchema=Mx,u.getDraggableExecutableEntityTypeSchema=_x,u.getDraggablePassThroughCallableEntityReferenceSchema=Fs,u.getDraggablePassThroughCallableEntityTypeSchema=Gs,u.getDraggablePlayableEntityReferenceSchema=Gx,u.getDraggablePlayableEntityTypeSchema=Lx,u.getEntityArgumentDeclarations=Od,u.getEntityInputMaps=Nv,u.getEntityOutputMaps=P3,u.getEntityReferenceSchema=jx,u.getEntityReturnDeclarations=Cd,u.getEntityTypeSchema=xx,u.getEntityWithLogicScopeReferenceSchema=yn,u.getEntityWithLogicScopeTypeSchema=Nx,u.getEntityWithValueReferenceSchema=wb,u.getEntityWithValueTypeSchema=Dx,u.getEntryPointEntityReferenceSchema=xe,u.getEntryPointEntityTypeSchema=Mn,u.getEventEntityReferenceSchema=Vs,u.getEventEntityTypeSchema=$s,u.getExecutableEntityReferenceSchema=wx,u.getExecutableEntityTypeSchema=Bx,u.getExtendedBuiltInEntity=D3,u.getExtendedCustomEntity=Uv,u.getGenerationTargetSchemaBasedOnType=cv,u.getHeadIfPartOfDetachedBranch=jv,u.getHighestScope=Jv,u.getImplementedBuiltInEntity=A3,u.getIsInteractive=Md,u.getLastInListOperation=Oo,u.getLastInListOperationError=up,u.getLastInListOperationErrorParentRef=dp,u.getLastInListOperationInputListArgument=op,u.getLastInListOperationInputListArgumentParentRef=sp,u.getLastInListOperationInputListArgumentRef=np,u.getLastInListOperationInputListDataType=rp,u.getLastInListOperationOutputElementDataType=ap,u.getLastInListOperationOutputElementReturn=cp,u.getLastInListOperationOutputElementReturnParentRef=lp,u.getLastInListOperationOutputElementReturnRef=ip,u.getLinkedEntitiesFromArgumentDeclaration=R3,u.getLowestPersistedEntityImplementation=Fv,u.getParentCanvasEntities=ht,u.getParentCanvasEntity=He,u.getParentEntryPoint=y3,u.getPassThroughCallableEntityReferenceSchema=ye,u.getPassThroughCallableEntityTypeSchema=Ls,u.getPlayableEntityReferenceSchema=Vx,u.getPlayableEntityTypeSchema=$x,u.getProject=k3,u.getPrototypeByType=ho,u.getReferenceEntityId=D,u.getReferencedEntitiesStateOrErrors=no,u.getReferencedEntityStateOrErrors=md,u.getRelatedCanvasElementsOnTheLeft=Ir,u.getRelatedCanvasElementsOnTheRight=Fn,u.getRootEntryPointScopeOwner=Vd,u.getScopeOwner=ft,u.getTerminationReferenceSchema=Ux,u.getTerminationTypeSchema=Fx,u.getUsedArgFromDeclaration=v3,u.getUsedReturnFromDeclaration=I3,u.getValueReadingEntityReferenceSchema=Bb,u.getValueReadingEntityTypeSchema=pn,u.getValueWritingEntityReferenceSchema=Px,u.getValueWritingEntityTypeSchema=Qi,u.getVariableFromInputMapping=Pv,u.getVariableFromReturnVariablePointer=Sv,u.getVariableReferenceSchema=_n,u.getVariableTypeSchema=rr,u.getVariablesFromArgumentDeclarations=uo,u.getVariablesFromInputMaps=Dv,u.getVariablesFromOutputMapping=Ov,u.getVariablesFromOutputMaps=Cv,u.getVariablesFromReturnDeclarations=Av,u.getVariablesInSameOrHigherScope=ad,u.getWrites=Sd,u.groupCallsBasedOnParallelizableExecution=m3,u.handleAfterEntityImplementationSideEffects=gv,u.handleBeforeEntityImplementationSideEffects=bv,u.httpRequestBodyArgument=Da,u.httpRequestBodyArgumentRef=Uy,u.httpRequestBodyDataType=xy,u.httpRequestHeadersArgument=Pa,u.httpRequestHeadersArgumentRef=Gy,u.httpRequestHeadersDataType=Fy,u.httpRequestMethodArgument=va,u.httpRequestMethodArgumentRef=Vy,u.httpRequestMethodDataType=Ly,u.httpRequestMethodDataTypeRef=Ny,u.httpRequestQueryParamsArgument=Vo,u.httpRequestQueryParamsArgumentRef=_y,u.httpRequestQueryParamsDataType=My,u.httpRequestVariableURLArgument=Ia,u.httpRequestVariableURLArgumentRef=By,u.httpRequestVariableURLDataType=wy,u.httpRequestVariableURLDataTypeRef=Oy,u.httpResponseBodyReturnDataType=zy,u.httpResponseBodyReturnDataTypeRef=Hy,u.httpResponseBodyReturnReturn=hi,u.httpResponseBodyReturnReturnRef=Yy,u.httpResponseCodeDataType=ky,u.httpResponseCodeReturn=Lo,u.httpResponseCodeReturnRef=jy,u.httpResponseHeadersDataType=Wy,u.httpResponseHeadersDataTypeRef=qy,u.httpResponseHeadersReturn=Aa,u.httpResponseHeadersReturnRef=Jy,u.implement=lo,u.inferArgumentDeclarationDataType=Hg,u.inferDataType=zs,u.inferInputMapDataType=Yg,u.inferOutputMapDataType=Xg,u.inferVariableDeclarationDataType=Zg,u.inferVariableInstanceDataType=zg,u.initProject=Xv,u.iterateOverListActionDescriptor=qn,u.iterateOverListActionDescriptorListArgumentDeclaration=hh,u.iterateOverListActionDescriptorListArgumentDeclarationDataType=ph,u.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=uh,u.iterateOverListActionDescriptorListArgumentDeclarationParentRef=yh,u.iterateOverListActionDescriptorReturnDeclaration=dh,u.iterateOverListActionDescriptorReturnDeclarationParentRef=ch,u.joinListOperation=Do,u.joinListOperationError=$u,u.joinListOperationErrorParentRef=Nu,u.joinListOperationFirstListArgument=Cu,u.joinListOperationFirstListArgumentParentRef=Ou,u.joinListOperationFirstListArgumentRef=vu,u.joinListOperationFirstListDataType=Iu,u.joinListOperationResultListDataType=Su,u.joinListOperationResultListReturn=Mu,u.joinListOperationResultListReturnParentRef=_u,u.joinListOperationResultListReturnRef=Au,u.joinListOperationSecondListArgument=wu,u.joinListOperationSecondListArgumentParentRef=Bu,u.joinListOperationSecondListArgumentRef=Pu,u.joinListOperationSecondListDataType=Du,u.joinListWithLastSeparator=N,u.joinStringOperation=yi,u.joinStringOperationError=Eu,u.joinStringOperationErrorParentRef=Tu,u.joinStringOperationFirstStringArgument=Ra,u.joinStringOperationFirstStringArgumentParentRef=hu,u.joinStringOperationFirstStringArgumentRef=lu,u.joinStringOperationFirstStringDataType=cu,u.joinStringOperationResultStringDataType=yu,u.joinStringOperationResultStringReturn=pi,u.joinStringOperationResultStringReturnParentRef=mu,u.joinStringOperationResultStringReturnRef=pu,u.joinStringOperationSecondStringArgument=ba,u.joinStringOperationSecondStringArgumentParentRef=fu,u.joinStringOperationSecondStringArgumentRef=du,u.joinStringOperationSecondStringDataType=uu,u.jsonPrototype=go,u.keyValueParamBuiltInBaseEntity=Oa,u.keyValueParamBuiltInBaseEntityNameProperty=gh,u.keyValueParamBuiltInBaseEntityNamePropertyDataTypeRef=oI,u.keyValueParamBuiltInBaseEntityNamePropertyParentRef=bh,u.keyValueParamBuiltInBaseEntityNamePropertyRef=Rh,u.keyValueParamBuiltInBaseEntityValueProperty=Ph,u.keyValueParamBuiltInBaseEntityValuePropertyDataTypeRef=cI,u.keyValueParamBuiltInBaseEntityValuePropertyParentRef=Ih,u.keyValueParamBuiltInBaseEntityValuePropertyRef=vh,u.lowercaseFirstLetter=qg,u.manualFlowActionDescriptor=Fo,u.manualFlowActionDescriptorDeclarationReturnDeclaration=Eh,u.manualFlowActionDescriptorDeclarationReturnDeclarationDataType=mh,u.manualFlowActionDescriptorDeclarationReturnDeclarationDataTypeParentRef=fh,u.manualFlowActionDescriptorDeclarationReturnDeclarationParentRef=Th,u.mapActionDescriptorToTypeItRepresents=B3,u.mergeEntityErrorsList=I4,u.mergeListOfEntities=O3,u.methodDefaultValue=$y,u.mockClientProject=ob,u.moreThanOrEqualCondition=wr,u.moreThanOrEqualConditionLeftHandArgument=lm,u.moreThanOrEqualConditionLeftHandArgumentParentRef=om,u.moreThanOrEqualConditionRightHandArgument=dm,u.moreThanOrEqualConditionRightHandArgumentParentRef=cm,u.notEmptyCondition=Jn,u.notEmptyConditionArgument=im,u.notEmptyConditionRef=rm,u.numberAdditionOperation=Ea,u.numberAdditionOperationError=iu,u.numberAdditionOperationErrorParentRef=ru,u.numberAdditionOperationFirstNumberArgument=vo,u.numberAdditionOperationFirstNumberArgumentRef=Yd,u.numberAdditionOperationFirstNumberDataType=zd,u.numberAdditionOperationRef=eu,u.numberAdditionOperationRefThree=nu,u.numberAdditionOperationRefTwo=tu,u.numberAdditionOperationResultNumberDataType=Kd,u.numberAdditionOperationResultNumberReturn=Po,u.numberAdditionOperationResultNumberReturnRef=Qd,u.numberAdditionOperationSecondNumberArgument=Io,u.numberAdditionOperationSecondNumberArgumentRef=Zd,u.numberAdditionOperationSecondNumberDataType=Xd,u.numberPrototype=De,u.numberValueAutogenerationSchema=ec,u.parallelExecutionOperation=Lt,u.parallelExecutionOperationError=Lp,u.parallelExecutionOperationErrorParentRef=Vp,u.parallelExecutionOperationListOfExecutionResultsDataType=Mp,u.parallelExecutionOperationListOfExecutionResultsReturn=_o,u.parallelExecutionOperationListOfExecutionResultsReturnRef=_p,u.parallelExecutionOperationListOfFunctionsArgument=wo,u.parallelExecutionOperationListOfFunctionsArgumentDatatype=wp,u.parallelExecutionOperationListOfFunctionsArgumentRef=Bp,u.parallelExecutionOperationListOfFunctionsBlueprint=Cp,u.parallelExecutionOperationRef=Np,u.parallelExecutionOperationRefThree=$p,u.persistedBuiltInBaseEntity=_e,u.persistedBuiltInBaseEntityCreatedAtProperty=Wf,u.persistedBuiltInBaseEntityCreatedAtPropertyDataType=qf,u.persistedBuiltInBaseEntityCreatedAtPropertyDataTypeRef=II,u.persistedBuiltInBaseEntityCreatedAtPropertyParentRef=Jf,u.persistedBuiltInBaseEntityCreatedAtPropertyRef=kf,u.persistedBuiltInBaseEntityDatabaseProperty=Ti,u.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=RI,u.persistedBuiltInBaseEntityDatabasePropertyParentRef=Nf,u.persistedBuiltInBaseEntityDatabasePropertyRef=Mf,u.persistedBuiltInBaseEntityDeletedAtProperty=jf,u.persistedBuiltInBaseEntityDeletedAtPropertyDataType=Uf,u.persistedBuiltInBaseEntityDeletedAtPropertyDataTypeRef=vI,u.persistedBuiltInBaseEntityDeletedAtPropertyParentRef=xf,u.persistedBuiltInBaseEntityDeletedAtPropertyRef=Ff,u.persistedBuiltInBaseEntityIdentifierProperty=Gf,u.persistedBuiltInBaseEntityIdentifierPropertyDataTypeRef=$f,u.persistedBuiltInBaseEntityIdentifierPropertyParentRef=Lf,u.persistedBuiltInBaseEntityIdentifierPropertyRef=Vf,u.persistedBuiltInBaseEntityUpdatedAtProperty=Zf,u.persistedBuiltInBaseEntityUpdatedAtPropertyDataType=Yf,u.persistedBuiltInBaseEntityUpdatedAtPropertyDataTypeRef=PI,u.persistedBuiltInBaseEntityUpdatedAtPropertyParentRef=zf,u.persistedBuiltInBaseEntityUpdatedAtPropertyRef=Hf,u.processOutputGlobalValueDescriptorDataType=ym,u.processOutputGlobalValueDescriptorReturn=Xo,u.processOutputGlobalValueDescriptorReturnRef=pm,u.projectPublicationCompletedGlobalEvent=Na,u.propertyToZodSchema=Om,u.relationalDatabaseBuiltInBaseEntity=vn,u.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=qo,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=Sf,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=Of,u.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=Af,u.relationalDatabaseBuiltInBaseEntityDefaultProperty=ko,u.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=Pf,u.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=Df,u.relationalDatabaseBuiltInBaseEntityIdentifierProperty=Ba,u.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=Ef,u.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=Rf,u.relationalDatabaseBuiltInBaseEntityMinSizeProperty=Ma,u.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=vf,u.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=If,u.relationalDatabaseBuiltInBaseEntityPasswordProperty=_a,u.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=hI,u.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=gf,u.relationalDatabaseBuiltInBaseEntityRef=Br,u.relationalDatabaseBuiltInBaseEntityUsernameProperty=wa,u.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=pI,u.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=bf,u.resolveActionDescriptorName=sv,u.resolveBaseEntityName=rv,u.resolveBuiltInBaseEntityDataTypeLabel=sd,u.resolveConditionOperatorLabel=Qs,u.resolveCustomEntityDataTypeLabel=od,u.resolveDataType=Zs,u.resolveDataTypeLabel=ev,u.resolveEntityDataTypeLabel=nv,u.resolveEntityName=A,u.resolveFirstCallsSecond=T3,u.resolveFirstWritesSecond=E3,u.resolvePrimitiveEntityName=av,u.resolvePropertyDataTypeLabel=tv,u.resolveSearchName=iv,u.resolveVariableDataTypeLabel=l9,u.resolveVariableDeclarationDataTypeLabel=cr,u.resolveVariableInstanceDataTypeLabel=Kg,u.resolveVariableScope=a9,u.sequentialExecutionOperation=rn,u.sequentialExecutionOperationError=ty,u.sequentialExecutionOperationErrorParentRef=ey,u.sequentialExecutionOperationListOfExecutionResultsDataType=Xp,u.sequentialExecutionOperationListOfExecutionResultsReturn=No,u.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=Kp,u.sequentialExecutionOperationListOfExecutionResultsReturnRef=Zp,u.sequentialExecutionOperationListOfFunctionsArgument=Mo,u.sequentialExecutionOperationListOfFunctionsArgumentDatatype=zp,u.sequentialExecutionOperationListOfFunctionsArgumentParentRef=Qp,u.sequentialExecutionOperationListOfFunctionsArgumentRef=Yp,u.sequentialExecutionOperationListOfFunctionsBlueprint=Hp,u.softDeletePersistedEntityMethod=wf,u.softDeletePersistedEntityMethodParentRef=Bf,u.sortCallsBasedOnExecutionDependencies=Iv,u.sortChildrenEntitiesBasedOnExecutionDependencies=f3,u.splitListOperation=So,u.splitListOperationError=Ku,u.splitListOperationErrorParentRef=Qu,u.splitListOperationFirstOutputListDataType=ju,u.splitListOperationFirstOutputListReturn=Yu,u.splitListOperationFirstOutputListReturnParentRef=Hu,u.splitListOperationFirstOutputListReturnRef=Ao,u.splitListOperationInputListArgument=qu,u.splitListOperationInputListArgumentParentRef=ku,u.splitListOperationInputListArgumentRef=Gu,u.splitListOperationInputListDataType=Fu,u.splitListOperationSecondOutputListDataType=zu,u.splitListOperationSecondOutputListReturn=Xu,u.splitListOperationSecondOutputListReturnParentRef=Zu,u.splitListOperationSplitIndexArgument=Wu,u.splitListOperationSplitIndexArgumentParentRef=Ju,u.splitListOperationSplitIndexArgumentRef=Uu,u.splitListOperationSplitIndexDataType=xu,u.stringPrototype=F,u.stringValueAutogenerationSchema=Kl,u.suggestNewIdForEntity=yd,u.test_primitive_entities_export=J3,u.toCamelCase=s9,u.toEntityState=Bt,u.toKebabCase=Qg,u.toLowerCaseKebabCase=Xs,u.toPascalCase=o9,u.untypedObjectPrototype=Xe,u.updateErrorsList=X,u.updateValueReader=ha,u.urlDefaultValue=Cy,u.uuidPrototype=Ta,u.validateArgumentDeclarationName=ud,u.validateCalledByErrorIdInAction=s3,u.validateCalledByIdInAction=a3,u.validateCallers=fv,u.validateConditionEntityDeclaration=c3,u.validateCustomEntityName=Ks,u.validateDataOperation=kn,u.validateDataOperationDataToValidateArgument=Ey,u.validateDataOperationDataToValidateArgumentParentRef=Ty,u.validateDataOperationDataToValidateArgumentRef=fy,u.validateDataOperationDataToValidateDataType=my,u.validateDataOperationEntityToMatchTypeArgument=vy,u.validateDataOperationEntityToMatchTypeArgumentParentRef=gy,u.validateDataOperationEntityToMatchTypeArgumentRef=Ry,u.validateDataOperationEntityToMatchTypeDataType=by,u.validateDataOperationError=Ay,u.validateDataOperationErrorParentRef=Dy,u.validateDataOperationOutputEntityDeclaration=Py,u.validateDataOperationOutputEntityDeclarationParentRef=Iy,u.validateEntryCaller=hv,u.validateErrorCaller=yv,u.validateFunctionCallDeclaration=Tv,u.validateFunctionDeclarationName=ld,u.validateGeneratedEntityParentIsNotBuiltInEntity=t3,u.validateGeneration=K9,u.validateGenerationTarget=Ae,u.validateGenerationUpdate=e3,u.validateLoopEntityDeclaration=d3,u.validateName=c9,u.validateOperationEntityDeclaration=Ev,u.validatePropertyName=dd,u.validateReachability=En,u.validateReadsValueInActionPayload=o3,u.validateReferenceObject=to,u.validateReferenceToOne=Td,u.validateReferences=Fe,u.validateReturnDeclarationName=pd,u.validateSuccessCaller=pv,u.validateValueReaderGenerationUpdate=ua,u.validateValueWritter=Id,u.validateVariableDeclarationName=cd,u.validateVariableInternalCallUse=Pd,u.valueAutogenerationCurrentDateAndTimeSchema=cb,u.valueAutogenerationGenericSchema=bs,u.valueAutogenerationOptions=nc,u.valueAutogenerationOptionsSchema=lb,u.valueAutogenerationRandomBooleanSchema=Ql,u.valueAutogenerationRandomDateBetweenSchema=Eb,u.valueAutogenerationRandomDateFromSchema=mb,u.valueAutogenerationRandomDateSchema=Is,u.valueAutogenerationRandomDateUntilSchema=Tb,u.valueAutogenerationRandomNumberBetweenSchema=pb,u.valueAutogenerationRandomNumberFromSchema=db,u.valueAutogenerationRandomNumberSchema=gs,u.valueAutogenerationRandomNumberUntilSchema=ub,u.valueAutogenerationRandomSchema=Hi,u.valueAutogenerationRandomTextBetweenSchema=fb,u.valueAutogenerationRandomTextFromSchema=yb,u.valueAutogenerationRandomTextSchema=vs,u.valueAutogenerationRandomTextUntilSchema=hb,u.valueAutogenerationRangeValueTypesSchema=Wi,u.valueAutogenerationUniqueSchema=Xl,u.waitOperation=ot,u.waitOperationMillisecondsNumberArgument=jn,u.waitOperationMillisecondsNumberArgumentRef=Up,u.waitOperationMillisecondsNumberDataType=xp,u.waitOperationOperationError=qp,u.waitOperationOperationErrorParentRef=kp,u.waitOperationRef=jp,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|