@elyx-code/project-logic-tree 0.0.6335 → 0.0.6336

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.d.ts CHANGED
@@ -8447,6 +8447,7 @@ export declare interface IEntityActionRequestPayload<P = EntityActionPayload> {
8447
8447
  actionId: string;
8448
8448
  timestamp: string;
8449
8449
  projectId: string;
8450
+ sessionId: string;
8450
8451
  payload: P;
8451
8452
  }
8452
8453
 
@@ -11793,7 +11794,7 @@ export declare class ProjectState extends CombinedVersionedEvents implements IPr
11793
11794
  requestActiveValue(valueOwner: EntityWithValueState): LiteralValueState | null;
11794
11795
  undo(): IProjectVersionTransitionConfig;
11795
11796
  redo(): IProjectVersionTransitionConfig;
11796
- applyExternalChangeSet(request: PersistChangeSetEntityActionRequestPayload): ProjectState;
11797
+ applyExternalChangeSet(request: PersistChangeSetEntityActionRequestPayload): ChangeSet;
11797
11798
  toFullProjectTransfer(): {
11798
11799
  order: EntityId[];
11799
11800
  size: number;
package/dist/index.js CHANGED
@@ -96838,7 +96838,7 @@ const je = class je extends oB {
96838
96838
  b,
96839
96839
  this
96840
96840
  );
96841
- if (I.hydrateAncestors(), I.addSelfToProject(l), !this.get(b.id))
96841
+ if (I.hydrateAncestors(), I.addSelfToProject(l), l.add(I, G.Added), !this.get(b.id))
96842
96842
  throw new Error(`Entity ${b.id} was not added to the project`);
96843
96843
  } catch (I) {
96844
96844
  console.error("Error: ", I), console.error("Errored entity: ", b);
@@ -96851,10 +96851,13 @@ const je = class je extends oB {
96851
96851
  const I = this.get(
96852
96852
  b.id
96853
96853
  );
96854
- I && I.updateWithShallowTransfer(
96854
+ I && (I.updateWithShallowTransfer(
96855
96855
  b,
96856
96856
  l
96857
- );
96857
+ ), l.add(
96858
+ I,
96859
+ G.Updated
96860
+ ));
96858
96861
  } catch (I) {
96859
96862
  console.error("Error: ", I), console.error("Errored entity: ", b);
96860
96863
  }
@@ -96869,7 +96872,7 @@ const je = class je extends oB {
96869
96872
  console.error("Error: ", I), console.error("Errored entity: ", b);
96870
96873
  }
96871
96874
  }
96872
- }), this;
96875
+ }), l;
96873
96876
  }
96874
96877
  toFullProjectTransfer() {
96875
96878
  const s = new Vo(this), a = {};
@@ -401,4 +401,4 @@ You shouldn't have to manually update a 'parent' property. The equivalent result
401
401
  You can inspect the existing 'entity' field with the 'describe_entity' action. Like so:
402
402
  ${vn({describe_entity:b.entity.id})}
403
403
  Alternatively you can update the parent data-type entity with 'update' action to remove the existing value of the field.`,issue:null}))}return{errors:p,modifiedData:l}}get interactive(){return this.implements.length?this.implements.every(n=>n.interactive):!0}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allMethods,[]),...this.implements.flatMap(n=>n.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allProperties,[]),...this.implements.flatMap(n=>n.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w([...this.extends.reduce((n,a)=>[...[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract),...n],[]),...this.implements.reduce((n,a)=>[...[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract),...n],[])])}get allBaseMethodsFromExtendedAndImplementedEntities(){return w([...this.extends.reduce((n,a)=>a.type!==f.DefinitionEntity?[]:[...[...a.ownDeclaredMethods,...a.allBaseMethodsFromExtendedAndImplementedEntities].filter(p=>p.type!==f.ActionDescriptor),...n],[]),...this.implements.reduce((n,a)=>a.type!==f.DefinitionEntity?a.abstractMethods:[...[...a.ownDeclaredMethods,...a.allBaseMethodsFromExtendedAndImplementedEntities].filter(p=>p.type!==f.ActionDescriptor),...n],[])])}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((n,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...n,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((n,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...n]},[]),...this.implements.reduce((n,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...n]},[])].filter(n=>!!n.abstract))}get extendedMethodsFromOriginalParents(){return w(this.extends.reduce((n,a)=>{if(a.type!==f.DefinitionEntity)return[];const l=[...a.ownDeclaredMethods,...a.extendedMethodsFromOriginalParents].filter(p=>p.type!==f.ActionDescriptor);return[...n,...l]},[]))}get implementedMethodsFromOriginalParents(){return w([...this.extends.reduce((n,a)=>{const l=a.type===f.DefinitionEntity?a.methods:[],p=[...a.abstractMethods].filter(t=>!l.find(m=>m.name===t.name));return[...l,...p,...n]},[]),...this.implements.reduce((n,a)=>[...a.abstractMethods,...n],[])].filter(n=>n.type===f.ActionDescriptor))}get extendedProperties(){return this.properties.filter(n=>n.isExtendedProperty)}get ownDeclaredProperties(){return this.properties.filter(n=>!n.isExtendedProperty)}get extendedMethods(){return this.methods.filter(n=>n.isExtendedMethod)}get ownDeclaredMethods(){return this.methods.filter(n=>!n.isExtendedMethod)}validateGeneratedUpdate(n){const a=[];return n.parent&&a.push(new Y({id:`${this.id}--${k.InvalidParentUpdate}`,code:k.InvalidParentUpdate,severity:S.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:a,modifiedData:n}}subscribeDependents(n){return n.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(n){return n.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(n);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),n==null||n.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(n,a,l){const p=[],t=[],m=[],v=[];return a==="implements"&&this.removeImplementation(n),a==="extends"&&this.removeExtension(n),{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(n,a,l){const p=[],t=[],m=[],v=[];return a==="implements"&&this.addImplementation(n),a==="extends"&&this.addExtension(n),{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){return this.implements.forEach(n=>{Pi.includes(n.type)||n.unsubscribeDependents([{entity:this,field:"implements"}])}),this}subscribeToDependencies(){return this.implements.forEach(n=>{Pi.includes(n.type)||n.subscribeDependents([{entity:this,field:"implements"}])}),this.extends.forEach(n=>{Pi.includes(n.type)||n.subscribeDependents([{entity:this,field:"extends"}])}),this}increaseVersion(n){if(n&&!N(n).isValid())throw new Error(`The shared timestamp '${n}' is not a valid ISO 8601 date string.`);return n&&N(n).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=P.UUID.uuid(),this.createdAt=N(n).toISOString()||N().toISOString(),this)}captureVersion(){var a;const n=((a=this.knownVersions)==null?void 0:a.get(this.version))||new _t(this,this.project);return n.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,n):new Map([[this.version,n]]),n.properties=[...this.properties],n.methods=[...this.methods],n.abstractMethods=[...this.abstractMethods],n.extends=[...this.extends],n.implements=[...this.implements],n.parent=this.parent,this}recursiveCaptureUpstreamVersions(n){const a=[],l=[],p=[],t=[];if(this.parent){this.parent.increaseVersion(n);const m=this.parent.recursiveCaptureUpstreamVersions(n);a.push(this.parent,...m.updated),l.push(...m.added),p.push(...m.removed)}return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(n){var v;const a=[],l=[],p=[],t=[];if(this.version===n)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(n);if(!m){const b=await this.APILoadVersion({},n);if(!b)throw new Error(`Version with id '${n}' for entity with id '${this.id}' not found.`);m=new _t(b,this.project)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.properties=m.properties,this.methods=m.methods,this.abstractMethods=m.abstractMethods,this.extends=m.extends,this.implements=m.implements,this.parent=m.parent,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){if(this.metaSync(n,a),this.version=n.version,this.createdAt=n.createdAt,this.author=n.author,this.deleted=n.deleted,this.previousVersion=n.previousVersion,this.unsubscribeFromDependencies(),n.parent){const l=W(n.parent),p=this.project.get(l),t=this.parent;if(t&&t.id!==(p==null?void 0:p.id)&&this.removeFromParent(a),p)this.setParent(p,a);else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${l}' that isn't found in the project`)}else throw a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);return n.extends.forEach(l=>{const p=W(l),t=this.project.get(p);t&&this.addExtension(t)}),n.implements.forEach(l=>{const p=W(l),t=this.project.get(p);t&&this.addImplementation(t)}),this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const n=[],a=[],l=[],p=[];if(this.initialData.parent){const t=W(this.initialData.parent),m=this.project.get(t);if(m)this.setParent(m,null),n.push(m);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${t}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);return this.initialData.extends.forEach(t=>{const m=W(t),v=this.project.get(m);v&&(this.addExtension(v),v.type!==f.BuiltInBaseEntity&&n.push(v))}),this.initialData.implements.forEach(t=>{const m=W(t),v=this.project.get(m);v&&(this.addImplementation(v),v.type!==f.BuiltInBaseEntity&&n.push(v))}),{updated:w(n),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"after-all-children-initialized"))){const a=[],l=[],p=[],t=[];this.initialized=!0;const{updated:m,added:v,removed:b,affected:_}=this.syncImplementationProperties(n);a.push(...m),l.push(...v),p.push(...b),t.push(..._);const{updated:I,added:V,removed:B,affected:K}=this.addExtendedProperties(n);a.push(...I),l.push(...V),p.push(...B),t.push(...K);const{updated:q,added:Z,removed:Q}=this.removeUnrecognizedProperties(n);a.push(...q),l.push(...Z),p.push(...Q);const{updated:ue,added:re,removed:_e,affected:X}=this.syncImplementationMethods(n);a.push(...ue),l.push(...re),p.push(..._e),t.push(...X);const{updated:Ee,added:se,removed:de,affected:ye}=this.addExtendedMethods(n);a.push(...Ee),l.push(...se),p.push(...de),t.push(...ye);const{updated:H,added:ce,removed:De}=this.removeUnrecognizedMethods(n);return a.push(...H),l.push(...ce),p.push(...De),this.addSuggestions(),this.captureVersion(),n==null||n.attemptAutoclose("after-all-children-initialized",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-self-to-project"))){const a=[this],l=[],p=[],t=[];if(this.parent.type===f.DataType){const m=this.parent;m.entity=this,a.push(m)}else this.project.addDefinitionEntity(this);return this.subscribe(),this.subscribeToDependencies(),n==null||n.attemptAutoclose("add-self-to-project",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}setParent(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"set-parent"))){var l;return((l=this.parent)==null?void 0:l.id)!==(n==null?void 0:n.id)&&(this.parent=n,a&&(a==null||a.add(this,G.Updated))),a==null||a.attemptAutoclose("set-parent",this.id),this}addExtension(n){return this.extends.includes(n)||this.extends.push(n),this}removeExtension(n){return this.extends=this.extends.filter(a=>a.id!==n.id),this}addImplementation(n){return this.implements.includes(n)||this.implements.push(n),this}removeImplementation(n){return this.implements=this.implements.filter(a=>a.id!==n.id),this}removeProperty(n){return this.properties=this.properties.filter(a=>a.id!==n.id),this}addMethod(n){return this.methods.includes(n)||(this.methods.push(n),this.suggestedMethods=this.suggestedMethods.filter(a=>a.name!==n.name)),this}removeMethod(n){return this.methods=this.methods.filter(a=>a.id!==n.id),this}addProperty(n){return this.properties.includes(n)||(this.properties.push(n),this.suggestedProperties=this.suggestedProperties.filter(a=>a.name!==n.name)),this}addSuggestedProperty(n){return this.suggestedProperties.includes(n)||this.suggestedProperties.push(n),this}addSuggestedMethod(n){return this.suggestedMethods.includes(n)||this.suggestedMethods.push(n),this}removeSuggestedProperty(n){return this.suggestedProperties=this.suggestedProperties.filter(a=>a.id!==n.id),this}removeSuggestedMethod(n){return this.suggestedMethods=this.suggestedMethods.filter(a=>a.id!==n.id),this}addAbstractMethod(n){return this.abstractMethods.includes(n)||this.abstractMethods.push(n),this}removeAbstractMethod(n){return this.abstractMethods=this.abstractMethods.filter(a=>a.id!==n.id),this}initChildren(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(n),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(n),l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(n),l}),this.extends=this.initialData.extends.map(a=>z(a,this.project)),this.implements=this.initialData.implements.map(a=>z(a,this.project)),this.subscribeToDependencies(),this.afterAllChildrenInitialized(n),n==null||n.attemptAutoclose("init-children",this.id),this)}removeUnrecognizedProperties(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-unrecognized-properties"))){const a=[],l=[],p=[],t=[];let m=[...this.properties];m=m.filter(b=>b.parent.id===this.id),m=m.filter(b=>!b.isExtendedProperty);const v=this.implementedPropertiesFromOriginalParents;return m=m.filter(b=>this.interactive&&!b.implements?!1:!v.find(_=>{var I;return _.id===((I=b.implements)==null?void 0:I.id)})),m.forEach(b=>{const _=b.remove({ignoreUpstream:!1},n);p.push(..._.removed),a.push(..._.updated)}),n==null||n.attemptAutoclose("remove-unrecognized-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}removeUnrecognizedMethods(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-unrecognized-methods"))){const a=[],l=[],p=[],t=[];let m=[...this.methods];m=m.filter(b=>b.parent.id===this.id),m=m.filter(b=>!b.isExtendedMethod);const v=this.implementedMethodsFromOriginalParents;return m=m.filter(b=>this.interactive&&!b.implements?!1:!v.find(_=>{var I;return _.id===((I=b.implements)==null?void 0:I.id)})),m.forEach(b=>{const _=b.remove({ignoreUpstream:!1},n);p.push(..._.removed),a.push(..._.updated)}),n==null||n.attemptAutoclose("remove-unrecognized-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}syncImplementationMethods(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-implementation-methods"))){const a=[],l=[],p=[],t=[],m=this.methods,v=this.implementedMethodsFromOriginalParents,b=[...this.allBaseMethodsFromExtendedAndImplementedEntities,...m];return v.filter(I=>!b.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})).forEach(I=>{if(this.methods.find(q=>{var Z;return((Z=q.implements)==null?void 0:Z.id)===I.id}))return;const B=this.methods.find(q=>{var _e,X;if(q.name===I.name&&!q.implements)return!0;const Z=As(this,Oe.CRON_JOB),Q=As(this,Oe.HTTP_ENDPOINT),ue=((_e=q.implements)==null?void 0:_e.id)===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id,re=((X=q.implements)==null?void 0:X.id)===fe["built-in-base-entity"].BUILT_IN_CRON_JOB_ENTITY.methods.handler.id;return!!(Z&&!re&&!Q&&ue||Q&&!ue&&!Z&&re)});if(B&&B.type===f.FunctionDeclaration){B.setImplements(I),B.metaSync({name:I.name},n),n==null||n.add(B,G.Updated),n==null||n.add(this,G.Updated);return}const K=I.implementAsFunctionDeclaration(n,this);l.push(K),n==null||n.add(K,G.Added),this.addMethod(K)}),n==null||n.attemptAutoclose("sync-implementation-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}syncImplementationProperties(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-implementation-properties"))){const a=[],l=[],p=[],t=[],m=this.properties,v=this.implementedPropertiesFromOriginalParents,b=[...this.allBasePropertiesFromExtendedAndImplementedEntities,...m];return v.filter(I=>!b.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})).forEach(I=>{if(this.properties.find(q=>{var Z;return((Z=q.implements)==null?void 0:Z.id)===I.id}))return;const B=this.properties.find(q=>q.name===I.name&&!!q.abstract&&!q.implements);if(B){B.setImplements(I,n),B.metaSync({abstract:!1},n),B.afterAllChildrenInitialized(n);return}const K=I.implement(this,n,P.UUID.uuid());l.push(K),n==null||n.add(K,G.Added)}),n==null||n.attemptAutoclose("sync-implementation-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addExtendedMethods(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-extended-methods"))){const a=[],l=[],p=[],t=[],m=this.methods,b=this.extendedMethodsFromOriginalParents.filter(I=>I.type===f.FunctionDeclaration),_=new Set(m.filter(I=>{var V;return!!((V=I.extends)!=null&&V.id)}).map(I=>I.extends.id));return b.forEach(I=>{if(_.has(I.id))return;_.add(I.id);const V=I.clone(n,this,P.UUID.uuid());V.setExtends(I,n),V.initChildren(n),l.push(V),n==null||n.add(V,G.Added),this.addMethod(V)}),n==null||n.attemptAutoclose("add-extended-methods",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addExtendedProperties(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"add-extended-properties"))){const a=[],l=[],p=[],t=[],m=this.properties,v=this.extendedPropertiesFromOriginalParents,b=v.filter(I=>v.find(B=>{var K;return((K=B.implements)==null?void 0:K.id)===I.id})?!1:!I.abstract),_=new Set(m.filter(I=>{var V;return!!((V=I.extends)!=null&&V.id)}).map(I=>I.extends.id));return b.forEach(I=>{if(_.has(I.id))return;_.add(I.id);const V=I.clone(n,this,P.UUID.uuid());V.setExtends(I,n),V.initChildren(n),l.push(V),n==null||n.add(V,G.Added),this.addProperty(V)}),n==null||n.attemptAutoclose("add-extended-properties",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSuggestions(){return this.implements.forEach(n=>{Aj(this,n).forEach(p=>{const t=p.toJSON();t.id=`_suggestion--parent--${this.id}--${p.id}`;const m=z(t,this.project);m.suggestion=!0,m.setParent(this,null),m.initChildren(null),this.addSuggestedProperty(m)}),Ij(this,n).forEach(p=>{const t=`_suggestion--parent--${this.id}--${p.id}`,m=p.implementAsFunctionDeclaration(null,this,t),v=z(m,this.project);if(v.suggestion=!0,v.setParent(this,null),v.initChildren(null),this.methods=this.methods.filter(b=>b.id!==t),v.inputs.forEach(b=>{b.suggestion=!0}),v.returnStatements.length){const b=v.returnStatements[0];b.suggestion=!0,b.outputs.forEach(_=>{_.suggestion=!0})}this.addSuggestedMethod(v)})}),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,n),p=this.toMeta();return this.name=n.name!==void 0?n.name:p.name,this.description=n.description!==void 0?n.description:p.description,this.x=n.x||p.x,this.y=n.y||p.y,this.static=n.static!==void 0?n.static:this.static,this.abstract=n.abstract!==void 0?n.abstract:this.abstract,super.metaSync(n),n.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):n.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(n=oe,...a){return await _t.repository.APILoad(this.id,...a),this}async APICreate(n=oe,...a){return await _t.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(n=oe,...a){return await _t.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(n=oe,...a){return await _t.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(n=oe,...a){return await _t.repository.APIClone(this.id,...a),this}async APILoadVersion(n=oe,a,...l){return await _t.repository.APILoadVersion(this.id,a,...l)}removeFromParent(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-from-parent"))){const a=[],l=[],p=[],t=[];if(this.parent.type===f.Project)this.parent.removeDefinitionEntity(this);else if(this.parent.type===f.DataType&&this.parent.entity&&this.parent.entity.id===this.id){const m=this.parent.setEntity(null,n);a.push(m)}return n==null||n.attemptAutoclose("remove-from-parent",this.id),{added:w(p),updated:w(a),removed:w(l),affected:w(t),self:this}}remove({ignoreUpstream:n}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){const l=[],p=[],t=[],m=[];if(a!=null&&a.hasRemoved(this.id))return a==null||a.attemptAutoclose("remove-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(p.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},a),Object.values(this.detachedDependents).forEach(v=>{const{updated:b,removed:_,added:I}=v.entity.onDetachedDependencyRemoved(this,v.field,a);l.push(...b),p.push(..._),t.push(...I)}),this.properties.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.methods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.abstractMethods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.suggestedProperties.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),this.suggestedMethods.forEach(v=>{const{updated:b,removed:_}=v.remove({ignoreUpstream:!0},a);l.push(...b),p.push(..._)}),!n){const v=this.removeFromParent(a);t.push(...v.added),l.push(...v.updated),p.push(...v.removed),m.push(...v.affected)}return a==null||a.attemptAutoclose("remove-entity",this.id),{added:w(t),updated:w(l),removed:w(p),affected:w(m),self:this}}restore({}={},n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){const a=[],l=[],p=[],t=[];return n!=null&&n.hasAdded(this.id)?(n==null||n.attemptAutoclose("restore-entity",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},n),Object.values(this.detachedDependents).forEach(m=>{const{updated:v,removed:b,added:_}=m.entity.onDetachedDependencyRestored(this,m.field,n);l.push(...v),p.push(...b),a.push(..._)}),this.properties.forEach(m=>{const{updated:v}=m.restore({},n);l.push(...v)}),this.methods.forEach(m=>{const{updated:v}=m.restore({},n);l.push(...v)}),this.abstractMethods.forEach(m=>{const{updated:v}=m.restore({},n);l.push(...v)}),this.suggestedProperties.forEach(m=>{const{updated:v}=m.restore({},n);l.push(...v)}),this.suggestedMethods.forEach(m=>{const{updated:v}=m.restore({},n);l.push(...v)}),n==null||n.attemptAutoclose("restore-entity",this.id),{added:w(a),updated:w(l),removed:w(p),affected:w(t),self:this})}toFlat(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this,...this.extends.flatMap(l=>l.toFlat(n)),...this.implements.flatMap(l=>l.toFlat(n)),...this.properties.flatMap(l=>l.toFlat(n)),...this.methods.flatMap(l=>l.toFlat(n)),...this.abstractMethods.flatMap(l=>l.toFlat(n)),...this.parent.toFlat(n)])}toFlatIds(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.id,...this.extends.flatMap(l=>l.toFlatIds(n)),...this.implements.flatMap(l=>l.toFlatIds(n)),...this.properties.flatMap(l=>l.toFlatIds(n)),...this.methods.flatMap(l=>l.toFlatIds(n)),...this.abstractMethods.flatMap(l=>l.toFlatIds(n)),...this.parent.toFlatIds(n)])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,x:this.x,y:this.y,type:this.type,name:this.name}}toJSON(n=new Set){return n.has(this.id)?this.toReference():(n.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,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(a=>a.toJSON(n)),methods:this.methods.map(a=>a.toJSON(n)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(n)),implements:this.implements.map(a=>a.toJSON(n)),extends:this.extends.map(a=>a.toJSON(n)),parent:this.parent.toReference()})}toJSONClone(n=Ce){var l,p,t,m,v;let a;return(l=n.seenEntityMaps)!=null&&l.has(this.id)?a=n.seenEntityMaps.get(this.id):(a=n.newId||hr(this,this.project,n.uuidStrategy),n.seenEntityMaps&&n.seenEntityMaps.set(this.id,a)),(p=n.seenEntities)!=null&&p.has(a)||(t=n.seenEntities)!=null&&t.has(this.id)?this.toReference({seenEntityMaps:n.seenEntityMaps}):((m=n.seenEntities)==null||m.add(a),(v=n.seenEntities)==null||v.add(this.id),{id:a,version:P.UUID.uuid(),createdAt:n.timestamp||N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,type:this.type,name:this.name,description:this.description,x:this.x,y:this.y,static:this.static,abstract:this.abstract,properties:this.properties.map(b=>b.toJSONClone({...n,newId:null})),methods:this.methods.map(b=>b.toJSONClone({...n,newId:null})),abstractMethods:this.abstractMethods.map(b=>b.toJSONClone({...n,newId:null})),implements:this.implements.map(b=>b.type===f.BuiltInBaseEntity?b.toJSON():b.toJSONClone({...n,newId:null})),extends:this.extends.map(b=>b.type===f.BuiltInBaseEntity?b.toJSON():b.toJSONClone({...n,newId:null})),parent:this.parent.toReference({seenEntityMaps:n.seenEntityMaps})})}toReference(n=Ce){var l;let a=this.id;return(l=n.seenEntityMaps)!=null&&l.has(this.id)&&(a=n.seenEntityMaps.get(this.id)),{id:a+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(n=Ce){var l;let a=this.id;return(l=n.seenEntityMaps)!=null&&l.has(this.id)&&(a=n.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,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(p=>p.toReference(n)),methods:this.methods.map(p=>p.toReference(n)),abstractMethods:this.abstractMethods.map(p=>p.toReference(n)),implements:this.implements.map(p=>p.toReference(n)),extends:this.extends.map(p=>p.toReference(n)),parent:this.parent.toReference(n)}}toFlatJSON(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(n)),...this.methods.flatMap(l=>l.toFlatJSON(n)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(n)),...this.implements.flatMap(l=>l.toFlatJSON(n)),...this.extends.flatMap(l=>l.toFlatJSON(n)),...this.parent.toFlatJSON(n)])}toGenerationTarget(){const n=this.parent.type===f.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(a=>a.id),implements:this.implements.map(a=>a.id),parent:n}}toFlatGenerationTarget(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(n)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(n)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(n)),...this.implements.filter(l=>l.type===f.DefinitionEntity).flatMap(l=>l.toFlatGenerationTarget(n)),...this.implements.filter(l=>l.type===f.DefinitionEntity).flatMap(l=>l.toFlatGenerationTarget(n)),...this.parent.toFlatGenerationTarget(n)])}clearErrors(){return this.errors=[],this.properties.forEach(n=>n.clearErrors()),this.methods.forEach(n=>n.clearErrors()),this.abstractMethods.forEach(n=>n.clearErrors()),this}validate(){return this.errors=bj(this),{success:!0,error:null,data:null}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}clone(n=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"clone-entity")),a=null,l=null,p=!0){var q,Z,Q;let t=yr(a,this);const m=this.toJSON(),v=l||P.UUID.uuid();m.properties=[],m.methods=[],m.abstractMethods=[];const b=v.split("-id"),_=b[b.length-1||0]||v;m.id=v,m.version=P.UUID.uuid(),m.createdAt=(n==null?void 0:n.timestamp)||N().toISOString(),m.author=(n==null?void 0:n.author)||"1",m.previousVersion=null,m.deleted=!1;const I=er(m,t);a&&I.setParent(a,null),p&&I.subscribe(),I.initChildren(n),n==null||n.add(I,G.Added);const V=(q=this.properties)==null?void 0:q.map(ue=>ue.clone(n,I,P.UUID.uuid(),p));I.properties=V;const B=(Z=this.methods)==null?void 0:Z.map((ue,re)=>ue.clone(n,I,_+"-method-"+re+"-id",p));I.methods=B;const K=(Q=this.abstractMethods)==null?void 0:Q.map((ue,re)=>ue.clone(n,I,_+"-abstract-method-"+re+"-id",p));return I.abstractMethods=K,n==null||n.attemptAutoclose("clone-entity",this.id),I}getFunctionDeclaration(n){return this.methods.find(a=>a.id===n)}implement(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"implement-definition-entity")),l){const p=hy(this,n,a,l);return a==null||a.attemptAutoclose("implement-definition-entity",this.id),p}getAllInteractiveMethods(){const n=this.implements.filter(l=>l.type===f.DefinitionEntity||l.type===f.BuiltInBaseEntity&&l.interactive);return w([...this.methods,...this.extends.flatMap(l=>l.getAllInteractiveMethods()),...n.flatMap(l=>l.getAllInteractiveMethods())])}inferFromInputs(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-definition-entity-from-inputs"))){const l=[],p=[],t=[],m=[];if(this.parent.type!==f.DataType||!this.parent.inferred)return a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this};const v=[];n.forEach(I=>{v.find(B=>pe(B,this.project)===pe(I,this.project))||v.push(I)});const b=this.properties.filter(I=>!I.dataType);v.forEach(I=>{var Q,ue;const V=b.find(re=>pe(re,this.project)===pe(I,this.project));if(!V)return;const K=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),q=xs(K,a),Z=q==null?void 0:q.clone(a,V,P.UUID.uuid(),!0);Z&&((Q=V.dataType)==null||Q.merge(Z,a),Z.id!==((ue=V.dataType)==null?void 0:ue.id)&&Z.remove({ignoreUpstream:!1},a),V.dataType&&(V.dataType.metaSync({inferred:!0,like:!0},a),V.setDataType(V.dataType,a),a==null||a.add(V,G.Affected))),I.setDeclaration(V),a==null||a.add(I,G.Updated)});const _=[];return v.forEach(I=>{if(!I.declaration){_.push(I);return}}),_.length===0?(a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(_.forEach(I=>{var re,_e,X,Ee;const V=this.properties.find(se=>pe(se,this.project)===pe(I,this.project));if(V){if(I.setDeclaration(V),!V.getDataType(a)){const de=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),ye=xs(de),H=ye==null?void 0:ye.clone(a,V,P.UUID.uuid(),!0);H&&((re=V.dataType)==null||re.merge(H,a),H.id!==((_e=V.dataType)==null?void 0:_e.id)&&H.remove({ignoreUpstream:!1},a),V.dataType&&(V.dataType.metaSync({inferred:!0,like:!0},a),V.setDataType(V.dataType,a),a==null||a.add(V,G.Affected)))}return}const B={id:P.UUID.uuid(),type:f.Property,version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:pe(I,this.project),description:I.description,defaultValue:null,static:!0,abstract:!1,private:!1,hidden:!1,required:!1,constant:!0,index:I.index,implements:null,extends:null,dataType:null,parent:this.toReference()},K=z(B,this.project);K.setParent(this,a),K.initChildren(a),a==null||a.add(K,G.Added);const Z=Mo(I.parent).getMasterInputWithValueWritterFromAllInstances(I),Q=xs(Z),ue=Q==null?void 0:Q.clone(a,K,P.UUID.uuid(),!0);return ue&&((X=K.dataType)==null||X.merge(ue,a),ue.id!==((Ee=K.dataType)==null?void 0:Ee.id)&&ue.remove({ignoreUpstream:!1},a),K.dataType&&(K.dataType.metaSync({inferred:!0,like:!0},a),K.setDataType(K.dataType,a),a==null||a.add(K,G.Affected))),this.addProperty(K),I.setDeclaration(K),a==null||a.add(I,G.Updated),K}),a==null||a.attemptAutoclose("infer-definition-entity-from-inputs",this.id),{added:w(l),updated:w(p),removed:w(t),affected:w(m),self:this})}getRawDefaultValue(){const n={};return this.properties.forEach(a=>{var p;const l=Ra(a.name);n[l]=((p=a.getDefaultValue())==null?void 0:p.value)||null}),n}getActiveRawDefaultValue(){const n={};return this.properties.forEach(a=>{const l=Ra(a.name),p=this.project.requestActiveValue(a);n[l]=(p==null?void 0:p.value)||null}),n}};g(_t,"repository",{APICreate:async(n,...a)=>n,APIUpdate:async(n,...a)=>n,APIDelete:async(n,...a)=>n,APIClone:async(n,...a)=>{},APILoad:async(n,...a)=>null,APILoadVersion:async(n,a,...l)=>null}),g(_t,"type",f.DefinitionEntity),g(_t,"USER_MANAGED_PARENT_TYPES",[f.Project,f.DataType]),g(_t,"PARENT_TYPES",[..._t.USER_MANAGED_PARENT_TYPES]),g(_t,"MUTABLE_BASE_PROPERTIES",["name","description","static","abstract"]),g(_t,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(_t,"BASE_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,..._t.INMUTABLE_BASE_PROPERTIES]),g(_t,"MUTABLE_META_PROPERTIES",[..._t.MUTABLE_BASE_PROPERTIES,"x","y"]),g(_t,"INMUTABLE_META_PROPERTIES",[..._t.INMUTABLE_BASE_PROPERTIES]),g(_t,"META_PROPERTIES",[..._t.MUTABLE_META_PROPERTIES,..._t.INMUTABLE_META_PROPERTIES]),g(_t,"MUTABLE_UPSTREAM_PROPERTIES",["extends","implements"]),g(_t,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),g(_t,"UPSTREAM_PROPERTIES",[..._t.MUTABLE_UPSTREAM_PROPERTIES,..._t.INMUTABLE_UPSTREAM_PROPERTIES]),g(_t,"MUTABLE_DOWNSTREAM_PROPERTIES",["properties","methods","abstractMethods"]),g(_t,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(_t,"DOWNSTREAM_PROPERTIES",[..._t.MUTABLE_DOWNSTREAM_PROPERTIES,..._t.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(_t,"PROPERTIES",[..._t.META_PROPERTIES,..._t.UPSTREAM_PROPERTIES,..._t.DOWNSTREAM_PROPERTIES]);let ia=_t;function Cye(u){const d=Boe(),n=u.toJSON();d.safeParse(n).success;const l=[];return qt(u.errors,l)}const fp=class fp extends nr{constructor(n,a){super(n);g(this,"initialData");g(this,"id");g(this,"version");g(this,"name");g(this,"description",null);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",!1);g(this,"static");g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"interactive",!1);g(this,"errors",[]);g(this,"project");this.initialData=this.initialData||n,this.project=this.project||a,this.id=this.id||n.id,this.version=this.version||n.version,this.name=this.name||n.name,this.static=this.static||n.static,this.interactive=this.interactive||n.interactive,this.abstract=n.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.extends=this.initialData.extends.map(l=>z(l,this.project))}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w(this.extends.reduce((n,a)=>{const l=[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract);return[...n,...l]},[]))}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((n,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...n,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((n,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...n]},[])])}get extendedProperties(){return this.properties.filter(n=>n.isExtendedProperty)}get ownDeclaredMethods(){return this.methods.filter(n=>!n.isExtendedMethod)}get ownDeclaredProperties(){return this.properties.filter(n=>!n.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(n=oe,...a){return await fp.repository.APILoad(this.id,...a),this}toFlat(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this,...this.properties.flatMap(l=>l.toFlat(n)),...this.methods.flatMap(l=>l.toFlat(n)),...this.abstractMethods.flatMap(l=>l.toFlat(n)),...this.extends.flatMap(l=>l.toFlat(n))])}toFlatIds(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.id,...this.properties.flatMap(l=>l.toFlatIds(n)),...this.methods.flatMap(l=>l.toFlatIds(n)),...this.abstractMethods.flatMap(l=>l.toFlatIds(n)),...this.extends.flatMap(l=>l.toFlatIds(n))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,interactive:this.interactive,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(n=new Set){return n.has(this.id)?this.toReference():(n.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(a=>a.toJSON(n)),methods:this.methods.map(a=>a.toJSON(n)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(n)),extends:this.extends.map(a=>a.toJSON(n))})}toReference(n=Ce){return{id:this.id+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(n=Ce){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,interactive:this.interactive,properties:this.properties.map(a=>a.toReference()),methods:this.methods.map(a=>a.toReference()),abstractMethods:this.abstractMethods.map(a=>a.toReference()),extends:this.extends.map(a=>a.toReference())}}toFlatJSON(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(n)),...this.methods.flatMap(l=>l.toFlatJSON(n)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(n))])}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(n=>n.id)}}toFlatGenerationTarget(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(n)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(n)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(n))])}clearErrors(){return this.errors=[],this.properties.forEach(n=>n.clearErrors()),this.methods.forEach(n=>n.clearErrors()),this.abstractMethods.forEach(n=>n.clearErrors()),this}validate(){const n=Cye(this);return this.errors=n,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}implement(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),null,!0,"implement-built-in-base-entity")),l){const p=hy(this,n,a,l);return a==null||a.attemptAutoclose("implement-built-in-base-entity",this.id),p}getAllInteractiveMethods(){const n=[];return this.interactive&&(n.push(...this.methods),this.extends.filter(l=>l.type===f.BuiltInBaseEntity&&l.interactive||l.type===f.PrimitiveEntity).forEach(l=>{l instanceof fp&&n.push(...l.getAllInteractiveMethods())})),w(n)}};g(fp,"repository",{APILoad:async(n,...a)=>null});let En=fp;function Pye(u){const d=goe(),n=u.toJSON();d.safeParse(n).success;const l=[];return qt(u.errors,l)}const $y=class $y extends nr{constructor(n,a){super(n);g(this,"initialData");g(this,"id");g(this,"name");g(this,"description",null);g(this,"type",f.PrimitiveEntity);g(this,"static");g(this,"abstract");g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=n,this.project=a,this.id=n.id,this.name=n.name,this.static=n.static,this.abstract=n.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p})}get allMethods(){return w([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return w([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allMethods,[])])}get allBasePropertiesFromOriginalParents(){return w([...this.extends.flatMap(n=>n.allProperties,[])])}get allBasePropertiesFromExtendedAndImplementedEntities(){return w(this.extends.reduce((n,a)=>{const l=[...a.ownDeclaredProperties,...a.allBasePropertiesFromExtendedAndImplementedEntities].filter(p=>!p.abstract);return[...n,...l]},[]))}get extendedPropertiesFromOriginalParents(){return w(this.extends.reduce((n,a)=>{const l=[...a.ownDeclaredProperties,...a.extendedPropertiesFromOriginalParents].filter(p=>!p.abstract);return[...n,...l]},[]))}get implementedPropertiesFromOriginalParents(){return w([...this.extends.reduce((n,a)=>{const l=a.implementedPropertiesFromOriginalParents,p=[...a.ownDeclaredProperties].filter(t=>!!t.abstract&&!l.find(m=>m.name===t.name));return[...l,...p,...n]},[])])}get extendedProperties(){return this.properties.filter(n=>n.isExtendedProperty)}get ownDeclaredMethods(){return this.methods.filter(n=>!n.isExtendedMethod)}get ownDeclaredProperties(){return this.properties.filter(n=>!n.isExtendedProperty)}subscribe(){return this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(n=oe,...a){return await $y.repository.APILoad(this.id,...a),this}toFlat(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this,...this.properties.flatMap(l=>l.toFlat(n)),...this.methods.flatMap(l=>l.toFlat(n)),...this.abstractMethods.flatMap(l=>l.toFlat(n))])}toFlatIds(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.id,...this.properties.flatMap(l=>l.toFlatIds(n)),...this.methods.flatMap(l=>l.toFlatIds(n)),...this.abstractMethods.flatMap(l=>l.toFlatIds(n))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,static:this.static,abstract:this.abstract,type:this.type,name:this.name}}toJSON(n=new Set){return n.has(this.id)?this.toReference():(n.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,properties:this.properties.map(a=>a.toJSON(n)),methods:this.methods.map(a=>a.toJSON(n)),abstractMethods:this.abstractMethods.map(a=>a.toJSON(n)),extends:this.extends.map(a=>a.toJSON(n))})}toReference(n=Ce){return{id:this.id+"--"+P.UUID.uuid()+"--ref",type:f.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(n=Ce){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,abstract:this.abstract,static:this.static,properties:this.properties.map(a=>a.toReference()),methods:this.methods.map(a=>a.toReference()),abstractMethods:this.abstractMethods.map(a=>a.toReference()),extends:this.extends.map(a=>a.toReference())}}toFlatJSON(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(l=>l.toFlatJSON(n)),...this.methods.flatMap(l=>l.toFlatJSON(n)),...this.abstractMethods.flatMap(l=>l.toFlatJSON(n))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,extends:this.extends.map(n=>n.id)}}toFlatGenerationTarget(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(l=>l.toFlatGenerationTarget(n)),...this.methods.flatMap(l=>l.toFlatGenerationTarget(n)),...this.abstractMethods.flatMap(l=>l.toFlatGenerationTarget(n))])}clearErrors(){return this.errors=[],this.properties.forEach(n=>n.clearErrors()),this.methods.forEach(n=>n.clearErrors()),this.abstractMethods.forEach(n=>n.clearErrors()),this}validate(){const n=Pye(this);return this.errors=n,{success:!0,error:null,data:this.toJSON()}}getErrors(){return[...this.errors,...this.properties.flatMap(a=>a.getErrors()),...this.methods.flatMap(a=>a.getErrors()),...this.abstractMethods.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}getAllInteractiveMethods(){const n=[];return n.push(...this.methods),this.extends.filter(l=>l.type===f.BuiltInBaseEntity&&l.interactive||l.type===f.PrimitiveEntity).forEach(l=>{l instanceof En&&n.push(...l.getAllInteractiveMethods())}),w(n)}};g($y,"repository",{APILoad:async(n,...a)=>null});let Ri=$y;function er(u,d){if(!u)throw new Error("Entity is null");const n=d.get(u.id);switch(u.type){case f.LiteralValue:return n||new Fs(u,d);case f.DefinitionEntity:return n||new ia(u,d);case f.PrimitiveEntity:return n||new Ri(u,d);case f.FunctionDeclaration:return n||new _a(u,d);case f.GlobalEvent:return n||new $a(u,d);case f.DataType:return n||new ji(u,d);case f.Property:return n||new Xn(u,d);case f.FunctionCall:return n||new Fa(u,d);case f.Condition:return n||new Ca(u,d);case f.Operation:return n||new Da(u,d);case f.VariableDeclaration:return n||new Va(u,d);case f.VariableInstance:return n||new Pa(u,d);case f.OutputMap:return n||new Ks(u,d);case f.ReturnDeclaration:return n||new wi(u,d);case f.ArgumentDeclaration:return n||new ea(u,d);case f.InputMap:return n||new Es(u,d);case f.Project:return n||new P(u);case f.InstalledProject:return n||new La(u,d);case f.ActionDescriptor:return n||new Lt(u,d);case f.ReturnStatement:return n||new ga(u,d);case f.Loop:return n||new Oa(u,d);case f.Search:return n||new Na(u,d);case f.ValueDescriptor:return n||new ks(u,d);case f.BuiltInBaseEntity:return n||new En(u,d);case f.InternalCall:return n||new Ma(u,d);case f.ContinueStatement:return n||new Qr(u,d);case f.BreakStatement:return n||new Ba(u,d);case f.GenericReference:return d.get(u.entityId);default:throw new Error("Invalid entity type: "+u.type)}}function z(u,d){if(!u)throw new Error("Entity is null");const n=er(u,d);return n.subscribe(),n}function Vye(u,d){if(!u)throw new Error("Entity is null");switch(u.type){case f.LiteralValue:return Fs.fromGenerationTarget(u,d);case f.DefinitionEntity:return ia.fromGenerationTarget(u,d);case f.FunctionDeclaration:return _a.fromGenerationTarget(u,d);case f.GlobalEvent:return $a.fromGenerationTarget(u,d);case f.DataType:return ji.fromGenerationTarget(u,d);case f.Property:return Xn.fromGenerationTarget(u,d);case f.FunctionCall:return Fa.fromGenerationTarget(u,d);case f.Condition:return Ca.fromGenerationTarget(u,d);case f.Operation:return Da.fromGenerationTarget(u,d);case f.VariableDeclaration:return Va.fromGenerationTarget(u,d);case f.VariableInstance:return Pa.fromGenerationTarget(u,d);case f.OutputMap:return Ks.fromGenerationTarget(u,d);case f.ReturnDeclaration:return wi.fromGenerationTarget(u,d);case f.ArgumentDeclaration:return ea.fromGenerationTarget(u,d);case f.InputMap:return Es.fromGenerationTarget(u,d);case f.InstalledProject:return La.fromGenerationTarget(u,d);case f.ReturnStatement:return ga.fromGenerationTarget(u,d);case f.Loop:return Oa.fromGenerationTarget(u,d);case f.Search:return Na.fromGenerationTarget(u,d);case f.ActionDescriptor:return Lt.fromGenerationTarget(u,d);case f.ValueDescriptor:return ks.fromGenerationTarget(u,d);case f.InternalCall:return Ma.fromGenerationTarget(u,d);case f.ContinueStatement:return Qr.fromGenerationTarget(u,d);case f.BreakStatement:return Ba.fromGenerationTarget(u,d);default:throw new Error("Invalid entity type: "+u.type)}}const Ce={seenEntityMaps:new Map,seenEntities:new Set,timestamp:N().toISOString()};class wj{constructor(){g(this,"initialData")}}const oe={cascade:!1},Rj={APILoad:async(u,...d)=>null},Nye={APICreate:async(u,...d)=>u,APIUpdate:async(u,...d)=>u,APIDelete:async(u,...d)=>u,APIClone:async(u,...d)=>{},APILoadVersion:async(u,d,...n)=>null,...Rj};class Lye{}class Mye extends wj{}class Bye{}class Uye{}class jye{}class Lb{}class xye extends Lb{}class Fye extends Lb{}class Gye{}class up{static initReadsValue(d){if(d.initialData.readsValue&&d.initialData.readsValue.type!==f.GenericReference)d.readsValue=z(d.initialData.readsValue,d.project);else if(d.initialData.readsValue&&d.initialData.readsValue.type===f.GenericReference){const n=ss(d.initialData.readsValue,d.project);n&&(d.readsValue=n)}if(d.readsValue){if(lr.includes(d.readsValue.type)){let n=d.parent;br.includes(n.type)||(n=n.parent);const a=d.type===f.InputMap&&d.parent.type===f.Loop;a&&(n=d.parent.parent),d.readsValue.setParent(n,null),d.readsValue.initChildren(null),n&&n.type!==f.Project&&!a&&n.detachedChildren.includes(d)?n.replaceDetachedChild(d,d.readsValue):n&&n.type!==f.Project&&!a&&n.subscribeDetachedChild(d.readsValue)}d.readsValue.addValueReader(d,null)}return d.readsValue}}class cp{static initWritesValues(d,n){const a=d.initialData.writesValues.reduce((p,t)=>{if(t.type===f.GenericReference||d.writesValues.some(v=>v.id===t.id))return p;const m=z(t,d.project);return m.setValueWriter(d,null),lr.includes(m.type)&&(m.setParent(n,null),m.initChildren(null)),[...p,m]},[]),l=[...d.writesValues];return d.writesValues=w([...l,...a]),d.writesValues}}class Kye{}class kye{constructor(d){g(this,"eventName");g(this,"callbacks",[]);this.eventName=d}on(d){if(typeof d!="function")throw new Error("Event callback must be a function");this.callbacks.includes(d)||this.callbacks.push(d)}off(d){if(typeof d!="function")throw new Error("Event callback must be a function");this.callbacks=this.callbacks.filter(n=>n!==d)}destroy(){this.callbacks=[]}}class Mb{constructor(){g(this,"subscribedEvents",{});g(this,"on",this._on);g(this,"emit",this._emit);g(this,"off",this._off);g(this,"destroy",this._destroy)}getEvent(d){return this.subscribedEvents[d]||(this.subscribedEvents[d]=new kye(d)),this.subscribedEvents[d]}_on(d,n){this.getEvent(d).on(n)}_emit(d,...n){const a=this.getEvent(d);a&&a.callbacks.forEach(l=>{l.apply(null,n)})}_off(d,n){const a=this.getEvent(d);a&&(n?a.off(n):(a.destroy(),delete this.subscribedEvents[d]))}_destroy(){Object.keys(this.subscribedEvents).forEach(d=>{this._off(d)}),this.subscribedEvents={}}}var ar=(u=>(u.PROJECT_INITIALIZED="project-initialized",u.CHANGE_SET_CLOSED="change-set-closed",u.EXPLICIT_DEFINITION_ENTITY_ADDED="explicit-definition-entity-added",u.EXPLICIT_DEFINITION_ENTITY_REMOVED="explicit-definition-entity-removed",u.EXPLICIT_DEFINITION_ENTITY_UPDATED="explicit-definition-entity-updated",u.PERSISTED_DEFINITION_ENTITY_ADDED="persisted-definition-entity-added",u.PERSISTED_DEFINITION_ENTITY_REMOVED="persisted-definition-entity-removed",u.PERSISTED_DEFINITION_ENTITY_UPDATED="persisted-definition-entity-updated",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_ADDED="relational-database-definition-entity-added",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_REMOVED="relational-database-definition-entity-removed",u.RELATIONAL_DATABASE_DEFINITION_ENTITY_UPDATED="relational-database-definition-entity-updated",u))(ar||{});function qye(u,d){d.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(a=>{a!=="constructor"&&Object.defineProperty(u.prototype,a,Object.getOwnPropertyDescriptor(n.prototype,a))})})}class _j extends nr{constructor(...d){super(...d),Object.assign(this,new Mb)}}qye(_j,[Mb]);const Fe=class Fe extends _j{constructor(n){super(n);g(this,"initialData");g(this,"id");g(this,"type",f.Project);g(this,"name",null);g(this,"description",null);g(this,"x");g(this,"y");g(this,"entities",[]);g(this,"projects",[]);g(this,"functions",[]);g(this,"events",[]);g(this,"variableDeclarations",[]);g(this,"variableInstances",[]);g(this,"conditions",[]);g(this,"operations",[]);g(this,"functionCalls",[]);g(this,"loops",[]);g(this,"searches",[]);g(this,"primitives",[]);g(this,"builtInBaseEntities",[]);g(this,"operationDeclarations",[]);g(this,"globalEventActionDescriptors",[]);g(this,"loopDeclarations",[]);g(this,"loopDeclarationsBodies",[]);g(this,"conditionDeclarations",[]);g(this,"valueDescriptors",[]);g(this,"dataTypes",[]);g(this,"project");g(this,"instances",{});g(this,"builtInInstances",{});g(this,"deletedInstances",{});g(this,"errors",[]);g(this,"references",[]);g(this,"history",[]);g(this,"undoableStackValueIndex",-1);g(this,"detachedDependents",{});g(this,"knownVersions",null);g(this,"activeVersion",!1);g(this,"initialized",!1);g(this,"startedInitialization",!1);g(this,"onCloseChangeSetCallback",null);g(this,"onAddChangeSetCallback",null);g(this,"onDiscardChangeSetCallback",null);g(this,"onRequestActiveValueCallback",null);this.initialData=n,this.id=n.id,this.name=n.name,this.description=n.description,this.x=0,this.y=0,this.instances[this.id]=this;try{(!Fe.UUID||Fe.UUID.isBackup)&&(Fe.UUID=eh==null?void 0:eh()),Fe.UUID||(Fe.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:a=>a})}catch(a){console.error("Error initializing UUID module",a),Fe.UUID={isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:l=>l}}}static injectUUIDModule(n){Fe.UUID=n}static new(n=null){return{id:Fe.UUID.uuid(),version:Fe.UUID.uuid(),createdAt:(n==null?void 0:n.timestamp)||N().toISOString(),author:(n==null?void 0:n.author)||Fe.sessionAuthor,previousVersion:null,deleted:!1,type:f.Project,name:"",description:"",entities:[],functions:[],events:[],projects:[],variableDeclarations:[],variableInstances:[],conditions:[],operations:[],functionCalls:[],loops:[],searches:[]}}static validateGenerationTarget(n,a){let l=JSON.parse(JSON.stringify(n));const p=[];return p.push(...ur(l)),{errors:p,modifiedData:l}}async closePendingChangeSets(){const n=this.history.find(a=>a.dirty&&!a.open);n&&await this.closeChangeSet(n)}onRequestActiveValue(n){this.onRequestActiveValueCallback=n}async onCloseChangeSet(n){this.onCloseChangeSetCallback=n,await this.closePendingChangeSets()}onAddChangeSet(n){this.onAddChangeSetCallback=n}onDiscardChangeSet(n){this.onDiscardChangeSetCallback=n}async closeChangeSet(n){const a=this.history.findIndex(t=>t.id===n.id),l=this.history.slice(0,a),p=l[l.length-1];if(!(p!=null&&p.dirty)&&this.onCloseChangeSetCallback){(await this.onCloseChangeSetCallback(n)).success&&(n.dirty=!1,this.emit("change-set-closed",n),this.closePendingChangeSets());return}}toLatestChangeSet(n,a,l,p=!1,t="here-this"){if(!this.history.length)return new F(this,n,a,l,p,t);const m=this.history[this.history.length-1];return m.open?m:this.addChangeSet(new F(this,n,a,l,p,t))}addChangeSet(n){var p,t;if(!this.history.length)return this.undoableStackValueIndex=eM(this.undoableStackValueIndex,this.history,n),(p=this.onAddChangeSetCallback)==null||p.call(this,n,this.undoableStackValueIndex),n;const a=this.history.find(m=>m.id===(n==null?void 0:n.id));if(a)return a;const l=this.history.find(m=>m.open);if(l)throw console.warn("Previous still open: ",l),console.warn("New change set: ",n),new Error(`There is already an open change-set with id '${l.id}'.`);return this.undoableStackValueIndex=eM(this.undoableStackValueIndex,this.history,n),(t=this.onAddChangeSetCallback)==null||t.call(this,n,this.undoableStackValueIndex),n}discardChangeSet(n){var l;const a=this.history.findIndex(p=>p.id===(n==null?void 0:n.id));return a!==-1&&(this.history.splice(a,1),this.undoableStackValueIndex=this.undoableStackValueIndex-1,(l=this.onDiscardChangeSetCallback)==null||l.call(this,n)),this}async inject(...n){return await Promise.all(n.map(a=>new Promise(async l=>{await a.init(this),l(null)}))),this}validateGeneratedUpdate(n){return{errors:[],modifiedData:n}}subscribeDependents(n){return n.forEach(a=>{this.detachedDependents[a.entity.id]||(this.detachedDependents[a.entity.id]=a)}),this}unsubscribeDependents(n){return n.forEach(a=>{this.detachedDependents[a.entity.id]&&delete this.detachedDependents[a.entity.id]}),this}syncDependents(n=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"sync-dependents"))){const a=[],l=[],p=[],t=[];return Object.values(this.detachedDependents).forEach(m=>{const v=m.entity.afterAllChildrenInitialized(n);a.push(...v.updated),l.push(...v.added),p.push(...v.removed),t.push(...v.affected)}),n==null||n.attemptAutoclose("sync-dependents",this.id),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}onDetachedDependencyRemoved(n,a,l){const p=[],t=[],m=[],v=[];return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}onDetachedDependencyRestored(n,a,l){const p=[],t=[],m=[],v=[];return{updated:w(p),added:w(t),removed:w(m),affected:w(v),self:this}}unsubscribeFromDependencies(){return this}subscribeToDependencies(){return this}increaseVersion(n){if(n&&!N(n).isValid())throw new Error(`The shared timestamp '${n}' is not a valid ISO 8601 date string.`);return n&&N(n).isSame(N(this.createdAt))?this:(this.previousVersion=this.version,this.version=Fe.UUID.uuid(),this.createdAt=N(n).toISOString()||N().toISOString(),this)}captureVersion(){var a;const n=((a=this.knownVersions)==null?void 0:a.get(this.version))||new Fe(this);return n.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,n):new Map([[this.version,n]]),n.entities=[...this.entities],n.projects=[...this.projects],n.functions=[...this.functions],n.events=[...this.events],n.variableDeclarations=[...this.variableDeclarations],n.variableInstances=[...this.variableInstances],n.conditions=[...this.conditions],n.operations=[...this.operations],n.functionCalls=[...this.functionCalls],n.loops=[...this.loops],n.searches=[...this.searches],this}recursiveCaptureUpstreamVersions(n){const a=[],l=[],p=[],t=[];return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}async restoreVersion(n){var v;const a=[],l=[],p=[],t=[];if(this.version===n)return{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this};if(!this.knownVersions){const b=new Map;for(const[_,I]of this.knownVersions||new Map){if(b.set(_,I),I.activeVersion=!1,I.knownVersions)for(const[V,B]of I.knownVersions)b.set(V,B);I.knownVersions=null}}let m=(v=this.knownVersions)==null?void 0:v.get(n);if(!m){const b=await this.APILoadVersion({},n);if(!b)throw new Error(`Version with id '${n}' for entity with id '${this.id}' not found.`);m=new Fe(b)}return this.metaSync(m.toShallowJSON(),null),this.previousVersion=m.previousVersion,this.version=m.version,this.createdAt=m.createdAt,this.author=m.author,this.deleted=m.deleted,this.entities=m.entities,this.projects=m.projects,this.functions=m.functions,this.events=m.events,this.variableDeclarations=m.variableDeclarations,this.variableInstances=m.variableInstances,this.conditions=m.conditions,this.operations=m.operations,this.functionCalls=m.functionCalls,this.loops=m.loops,this.searches=m.searches,{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}updateWithShallowTransfer(n,a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"update-with-shallow-transfer"))){return this.metaSync(n,a),this.version=n.version,this.createdAt=n.createdAt,this.author=n.author,this.deleted=n.deleted,this.previousVersion=n.previousVersion,this.captureVersion(),this.subscribeToDependencies(),a==null||a.attemptAutoclose("update-with-shallow-transfer",this.id),this}hydrateAncestors(){const n=[],a=[],l=[],p=[];return{updated:w(n),added:w(a),removed:w(l),affected:w(p),self:this}}afterAllChildrenInitialized(n=null){const a=[],l=[],p=[],t=[];return this.initialized||(this.initialized=!0,this.emit("project-initialized",this,n)),this.validate(),this.captureVersion(),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}addSelfToProject(n){const a=[],l=[],p=[],t=[];return this.subscribe(),this.subscribeToDependencies(),{updated:w(a),added:w(l),removed:w(p),affected:w(t),self:this}}get instancesList(){return Object.values(this.instances)}isOperationDeclaration(n){return this.operationDeclarations.includes(n)}isGlobalEventActionDescriptor(n){return this.globalEventActionDescriptors.includes(n)}isLoopDeclaration(n){return this.loopDeclarations.includes(n)}isConditionDeclaration(n){return this.conditionDeclarations.includes(n)}initChildren(n=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"init-children"))){return this.initialized||this.startedInitialization?this:(this.startedInitialization=!0,this.entities=this.initialData.entities.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.projects=this.initialData.projects.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.variableDeclarations=this.initialData.variableDeclarations.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.variableInstances=this.initialData.variableInstances.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.conditions=this.initialData.conditions.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.operations=this.initialData.operations.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.functions=this.initialData.functions.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.events=this.initialData.events.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.functionCalls=this.initialData.functionCalls.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.loops=this.initialData.loops.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.searches=this.initialData.searches.map(a=>{const l=z(a,this);return l.setParent(this,null),l.initChildren(n),l}),this.attachOrphanReferences(),this.subscribeToDependencies(),this.afterAllChildrenInitialized(n),n==null||n.attemptAutoclose("init-children",this.id),this)}subscribeInstance(n){return(!this.instances[n.id]||this.instances[n.id]!==n)&&(this.instances[n.id]=n),this}subscribeDeletedInstance(n){return(!this.deletedInstances[n.id]||this.deletedInstances[n.id]!==n)&&(this.deletedInstances[n.id]=n),this}subscribeBuiltInInstance(n){return(!this.builtInInstances[n.id]||this.builtInInstances[n.id]!==n)&&(this.builtInInstances[n.id]=n),this}subscribe(){return this}unsubscribe(){return this}unsubscribeInstance(n){return delete this.instances[n.id],this}unsubscribeDeletedInstance(n){return delete this.deletedInstances[n.id],this}findSubscribedBuiltInInstance(n){return this.builtInInstances[n.id]||null}get(n){return this.instances[n]||this.builtInInstances[n]||null}getDeleted(n){return this.deletedInstances[n]||null}getManaged(n){return this.getBuiltIn(n)?null:this.instances[n]||null}getBuiltIn(n){return this.builtInInstances[n]||null}findSubscribedInstanceFromReference(n){return this.instances[n.entityId]||null}findSubscribedBuiltInInstanceFromReference(n){return this.builtInInstances[n.entityId]||null}metaSync(n,a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"meta-sync"))){const l=cr(this,n),p=this.toMeta();return this.name=n.name!==void 0?n.name:p.name,this.description=n.description!==void 0?n.description:p.description,this.x=n.x||p.x,this.y=n.y||p.y,super.metaSync(n),n.deleted===!0&&!p.deleted?a==null||a.add(this,G.Removed):n.deleted===!1&&p.deleted?a==null||a.add(this,G.Added):l&&(a==null||a.add(this,G.Updated)),a==null||a.attemptAutoclose("meta-sync",this.id),this}async APILoad(n=oe,...a){return await Fe.repository.APILoad(this.id,...a),this}async APICreate(n=oe,...a){return await Fe.repository.APICreate(this.toShallowJSON(),...a),this}async APIUpdate(n=oe,...a){return await Fe.repository.APIUpdate(this.toShallowJSON(),...a),this}async APIDelete(n=oe,...a){return await Fe.repository.APIDelete(this.toShallowJSON(),...a),this}async APIClone(n=oe,...a){return await Fe.repository.APIClone(this.id,...a),this}async APILoadVersion(n=oe,a,...l){return await Fe.repository.APILoadVersion(this.id,a,...l)}remove({ignoreUpstream:n}={ignoreUpstream:!1},a=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"remove-entity"))){return{added:[],updated:[],removed:[],affected:[],self:this}}restore({}={},n=this.project.addChangeSet(new F(this.project,Fe.sessionAuthor,N().toISOString(),this,!0,"restore-entity"))){return{added:[],updated:[],removed:[],affected:[],self:this}}getAllBuiltInIds(){const n=new Set;return[...this.primitives.flatMap(a=>a.toFlatIds(n)),...this.builtInBaseEntities.flatMap(a=>a.toFlatIds(n)),...this.operationDeclarations.flatMap(a=>a.toFlatIds(n)),...this.globalEventActionDescriptors.flatMap(a=>a.toFlatIds(n)),...this.loopDeclarations.flatMap(a=>a.toFlatIds(n)),...this.conditionDeclarations.flatMap(a=>a.toFlatIds(n)),...this.valueDescriptors.flatMap(a=>a.toFlatIds(n)),...this.dataTypes.flatMap(a=>a.toFlatIds(n))]}getAllBuiltIn(){const n=new Set;return[...this.primitives.flatMap(a=>a.toFlat(n)),...this.builtInBaseEntities.flatMap(a=>a.toFlat(n)),...this.operationDeclarations.flatMap(a=>a.toFlat(n)),...this.globalEventActionDescriptors.flatMap(a=>a.toFlat(n)),...this.loopDeclarations.flatMap(a=>a.toFlat(n)),...this.conditionDeclarations.flatMap(a=>a.toFlat(n)),...this.valueDescriptors.flatMap(a=>a.toFlat(n)),...this.dataTypes.flatMap(a=>a.toFlat(n))]}toFlat(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this,...this.entities.flatMap(l=>l.toFlat(n)),...this.functions.flatMap(l=>l.toFlat(n)),...this.events.flatMap(l=>l.toFlat(n)),...this.projects.flatMap(l=>l.toFlat(n)),...this.variableDeclarations.flatMap(l=>l.toFlat(n)),...this.variableInstances.flatMap(l=>l.toFlat(n)),...this.conditions.flatMap(l=>l.toFlat(n)),...this.operations.flatMap(l=>l.toFlat(n)),...this.functionCalls.flatMap(l=>l.toFlat(n)),...this.loops.flatMap(l=>l.toFlat(n)),...this.searches.flatMap(l=>l.toFlat(n))])}toFlatIds(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.id,...this.entities.flatMap(l=>l.toFlatIds(n)),...this.functions.flatMap(l=>l.toFlatIds(n)),...this.events.flatMap(l=>l.toFlatIds(n)),...this.projects.flatMap(l=>l.toFlatIds(n)),...this.variableDeclarations.flatMap(l=>l.toFlatIds(n)),...this.variableInstances.flatMap(l=>l.toFlatIds(n)),...this.conditions.flatMap(l=>l.toFlatIds(n)),...this.operations.flatMap(l=>l.toFlatIds(n)),...this.functionCalls.flatMap(l=>l.toFlatIds(n)),...this.loops.flatMap(l=>l.toFlatIds(n)),...this.searches.flatMap(l=>l.toFlatIds(n))])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,description:this.description,type:this.type,name:this.name}}toJSON(n=new Set){return n.has(this.id)?this.toReference():(n.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(a=>a.toJSON(n)),variableDeclarations:this.variableDeclarations.map(a=>a.toJSON(n)),variableInstances:this.variableInstances.map(a=>a.toJSON(n)),conditions:this.conditions.map(a=>a.toJSON(n)),operations:this.operations.map(a=>a.toJSON(n)),loops:this.loops.map(a=>a.toJSON(n)),searches:this.searches.map(a=>a.toJSON(n)),functions:this.functions.map(a=>a.toJSON(n)),events:this.events.map(a=>a.toJSON(n)),projects:this.projects.map(a=>a.toJSON(n)),functionCalls:this.functionCalls.map(a=>a.toJSON(n))})}toJSONClone(n={uuidStrategy:"uuid"}){const a=new Map,l=new Set,p=this.getAllBuiltInIds();return Object.keys(this.instances).forEach(t=>{if(p.includes(t)){a.set(t,t);return}a.set(t,Fe.UUID.uuid())}),l.add(this.id),{id:a.get(this.id),version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),projects:this.projects.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),variableDeclarations:this.variableDeclarations.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),variableInstances:this.variableInstances.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),conditions:this.conditions.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),operations:this.operations.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),functions:this.functions.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),events:this.events.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),functionCalls:this.functionCalls.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),loops:this.loops.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null})),searches:this.searches.map(t=>t.toJSONClone({...n,seenEntityMaps:a,seenEntities:l,newId:null}))}}toReference(n=Ce){var l;let a=this.id;return(l=n.seenEntityMaps)!=null&&l.has(this.id)&&(a=n.seenEntityMaps.get(this.id)),{id:a+"--"+Fe.UUID.uuid()+"--ref",type:f.GenericReference,entityId:a,version:this.version,entityType:this.type}}toShallowJSON(n=Ce){var l;let a=this.id;return(l=n.seenEntityMaps)!=null&&l.has(this.id)&&(a=n.seenEntityMaps.get(this.id)),{id:a,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,name:this.name,description:this.description,entities:this.entities.map(p=>p.toReference(n)),functions:this.functions.map(p=>p.toReference(n)),events:this.events.map(p=>p.toReference(n)),projects:this.projects.map(p=>p.toReference(n)),variableDeclarations:this.variableDeclarations.map(p=>p.toReference(n)),variableInstances:this.variableInstances.map(p=>p.toReference(n)),conditions:this.conditions.map(p=>p.toReference(n)),operations:this.operations.map(p=>p.toReference(n)),functionCalls:this.functionCalls.map(p=>p.toReference(n)),loops:this.loops.map(p=>p.toReference(n)),searches:this.searches.map(p=>p.toReference(n))}}toFlatJSON(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[this.toShallowJSON(),...this.entities.flatMap(l=>l.toFlatJSON(n)),...this.functions.flatMap(l=>l.toFlatJSON(n)),...this.events.flatMap(l=>l.toFlatJSON(n)),...this.projects.flatMap(l=>l.toFlatJSON(n)),...this.variableDeclarations.flatMap(l=>l.toFlatJSON(n)),...this.variableInstances.flatMap(l=>l.toFlatJSON(n)),...this.conditions.flatMap(l=>l.toFlatJSON(n)),...this.operations.flatMap(l=>l.toFlatJSON(n)),...this.functionCalls.flatMap(l=>l.toFlatJSON(n)),...this.loops.flatMap(l=>l.toFlatJSON(n)),...this.searches.flatMap(l=>l.toFlatJSON(n))])}toGenerationTarget(){return{id:this.id,type:this.type,name:this.name,description:this.description}}toFlatGenerationTarget(n=new Set){return n.has(this.id)?[]:(n.add(this.id),[...this.entities.flatMap(l=>l.toFlatGenerationTarget(n)),...this.functions.flatMap(l=>l.toFlatGenerationTarget(n)),...this.events.flatMap(l=>l.toFlatGenerationTarget(n)),...this.projects.flatMap(l=>l.toFlatGenerationTarget(n)),...this.variableDeclarations.flatMap(l=>l.toFlatGenerationTarget(n)),...this.variableInstances.flatMap(l=>l.toFlatGenerationTarget(n)),...this.conditions.flatMap(l=>l.toFlatGenerationTarget(n)),...this.operations.flatMap(l=>l.toFlatGenerationTarget(n)),...this.functionCalls.flatMap(l=>l.toFlatGenerationTarget(n)),...this.loops.flatMap(l=>l.toFlatGenerationTarget(n)),...this.searches.flatMap(l=>l.toFlatGenerationTarget(n))])}clearErrors(){return this.errors=[],this.entities.forEach(n=>n.clearErrors()),this.projects.forEach(n=>n.clearErrors()),this.functions.forEach(n=>n.clearErrors()),this.events.forEach(n=>n.clearErrors()),this.variableDeclarations.forEach(n=>n.clearErrors()),this.variableInstances.forEach(n=>n.clearErrors()),this.conditions.forEach(n=>n.clearErrors()),this.operations.forEach(n=>n.clearErrors()),this.functionCalls.forEach(n=>n.clearErrors()),this.loops.forEach(n=>n.clearErrors()),this.searches.forEach(n=>n.clearErrors()),this}validate(){const n=Xde(),a=this.toJSON();return n.safeParse(a),this.validateChildren(),{success:!0,error:null,data:a}}validateChildren(){this.entities.forEach(n=>n.validate()),this.projects.forEach(n=>n.validate()),this.functions.forEach(n=>n.validate()),this.events.forEach(n=>n.validate()),this.variableDeclarations.forEach(n=>n.validate()),this.variableInstances.forEach(n=>n.validate()),this.conditions.forEach(n=>n.validate()),this.operations.forEach(n=>n.validate()),this.functionCalls.forEach(n=>n.validate()),this.loops.forEach(n=>n.validate()),this.searches.forEach(n=>n.validate())}getErrors(){return[...this.errors,...this.entities.flatMap(a=>a.getErrors()),...this.projects.flatMap(a=>a.getErrors()),...this.functions.flatMap(a=>a.getErrors()),...this.events.flatMap(a=>a.getErrors()),...this.variableDeclarations.flatMap(a=>a.getErrors()),...this.variableInstances.flatMap(a=>a.getErrors()),...this.conditions.flatMap(a=>a.getErrors()),...this.operations.flatMap(a=>a.getErrors()),...this.functionCalls.flatMap(a=>a.getErrors()),...this.loops.flatMap(a=>a.getErrors()),...this.searches.flatMap(a=>a.getErrors())]}getShallowErrors(){return this.errors}clone(){return this}getDefinitionEntity(n){return this.entities.find(a=>a.id===n)||null}addDefinitionEntity(n){return this.entities.includes(n)||this.entities.push(n),n}addFunctionDeclaration(n){return this.functions.includes(n)||this.functions.push(n),n}addFunctionCall(n){return this.functionCalls.includes(n)||this.functionCalls.push(n),n}addVariableDeclaration(n){return this.variableDeclarations.includes(n)||this.variableDeclarations.push(n),n}addVariableInstance(n){return this.variableInstances.includes(n)||this.variableInstances.push(n),n}addInstalledProject(n){return this.projects.includes(n)||this.projects.push(n),this}addGlobalEvent(n){return this.events.includes(n)||this.events.push(n),this}addCondition(n){return this.conditions.includes(n)||this.conditions.push(n),this}addOperation(n){return this.operations.includes(n)||this.operations.push(n),this}addLoop(n){return this.loops.includes(n)||this.loops.push(n),this}addSearch(n){return this.searches.includes(n)||this.searches.push(n),this}removeDefinitionEntity(n){const a=this.entities.findIndex(l=>l.id===n.id);if(a>-1){const l=this.entities[a];return this.entities.splice(a,1),l}return null}removeCondition(n){const a=this.conditions.findIndex(l=>l.id===n.id);if(a>-1){const l=this.conditions[a];return this.conditions.splice(a,1),l}return null}removeOperation(n){const a=this.operations.findIndex(l=>l.id===n.id);if(a>-1){const l=this.operations[a];return this.operations.splice(a,1),l}return null}removeLoop(n){const a=this.loops.findIndex(l=>l.id===n.id);if(a>-1){const l=this.loops[a];return this.loops.splice(a,1),l}return null}removeSearch(n){const a=this.searches.findIndex(l=>l.id===n.id);if(a>-1){const l=this.searches[a];return this.searches.splice(a,1),l}return null}removeFunctionCall(n){const a=this.functionCalls.findIndex(l=>l.id===n.id);if(a>-1){const l=this.functionCalls[a];return this.functionCalls.splice(a,1),l}return null}removeVariableInstance(n){const a=this.variableInstances.findIndex(l=>l.id===n.id);if(a>-1){const l=this.variableInstances[a];return this.variableInstances.splice(a,1),l}return null}removeVariableDeclaration(n){const a=this.variableDeclarations.findIndex(l=>l.id===n.id);if(a>-1){const l=this.variableDeclarations[a];return this.variableDeclarations.splice(a,1),l}return null}removeFunctionDeclaration(n){const a=this.functions.findIndex(l=>l.id===n.id);if(a>-1){const l=this.functions[a];return this.functions.splice(a,1),l}return null}removeInstalledProject(n){const a=this.projects.findIndex(l=>l.id===n.id);if(a>-1){const l=this.projects[a];return this.projects.splice(a,1),l}return null}removeGlobalEvent(n){const a=this.events.findIndex(l=>l.id===n.id);if(a>-1){const l=this.events[a];return this.events.splice(a,1),l}return null}removeTopLevelVariableDeclaration(n){if(n.type!==f.VariableDeclaration)return null;const a=this.variableDeclarations.findIndex(l=>l.id===n.id);if(a>-1){const l=this.variableDeclarations[a];return this.variableDeclarations.splice(a,1),l}return null}getEntryPoints(){return[...this.functions,...this.events,...this.entities.flatMap(a=>a.methods)]}getTerminationStatements(){return[...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.ReturnStatement||t.type===f.ContinueStatement||t.type===f.BreakStatement)]},[])]}getFunctionDeclaration(n){return this.functions.find(a=>a.id===n)||null}getConditions(){return[...this.conditions,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Condition)]},[])]}getOperations(){return[...this.operations,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Operation)]},[])]}getFunctionCalls(){return[...this.functionCalls,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.FunctionCall)]},[])]}getVariables(){return[...this.variableDeclarations,...this.getEntryPoints().reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.functionCalls.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.conditions.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.operations.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.loops.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[]),...this.searches.reduce((a,l)=>{const p=kt(l);return[...a,...p]},[])]}getVariableInstances(){return[...this.variableInstances,...this.getEntryPoints().reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.functionCalls.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.conditions.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.operations.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.loops.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[]),...this.searches.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableInstance);return[...a,...t]},[])]}getVariableDeclarations(){return w([...this.variableDeclarations,...this.getEntryPoints().reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.functionCalls.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.conditions.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.operations.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.loops.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[]),...this.searches.reduce((a,l)=>{const t=kt(l).filter(m=>m.type===f.VariableDeclaration);return[...a,...t]},[])])}getLoops(){return[...this.loops,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[]),...this.searches.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Loop)]},[])]}getSearches(){return[...this.searches,...this.getEntryPoints().reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.functionCalls.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.conditions.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.operations.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[]),...this.loops.reduce((a,l)=>{const p=at(l);return[...a,...p.filter(t=>t.type===f.Search)]},[])]}attachOrphanReferences(){const n=this.getVariableInstances(),a=this.getVariableDeclarations();return n.forEach(l=>{if(!l.declaration){const p=l.initialData,t=p.declaration.entityId||p.declaration.id,m=a.find(v=>v.id===t);m&&l.setDeclaration(m)}}),this}getBuiltInPersistedEntity(){return this.builtInBaseEntities.find(n=>n.name===Oe.PERSISTED_ENTITY)||null}requestActiveValue(n){var l;const a=(l=this.onRequestActiveValueCallback)==null?void 0:l.call(this,n);return a?a||null:n.getDefaultValue()}undo(){console.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex-1,console.log("To: ",this.undoableStackValueIndex);const n=this.history[this.undoableStackValueIndex+1],a=this.history[this.undoableStackValueIndex];return console.log("Current change set: ",n),console.log("Change set to restore: ",a),XL(n||"initial",a||"initial",this)}redo(){console.log("Undoing, from: ",this.undoableStackValueIndex),this.undoableStackValueIndex=this.undoableStackValueIndex+1,console.log("To: ",this.undoableStackValueIndex);const n=this.history[this.undoableStackValueIndex-1],a=this.history[this.undoableStackValueIndex];return console.log("Current change set: ",n),console.log("Change set to restore: ",a),XL(n||"initial",a||"initial",this)}applyExternalChangeSet(n){const a=n.payload,l=this.addChangeSet(new F(this,n.author,n.timestamp,this)),p=a.updated[this.id];if(!p)throw new Error("Project root not found in change set transfer. Cannot apply changes.");const t={...a.added,...a.updated,...a.removed},m=a.seenEntities.filter(b=>!a.affected.includes(b));m.forEach(b=>{var _;if(!t[b]){console.warn(`Entity '${b}' not found in change set transfer. Cannot apply changes.`);const I=(_=this.get(b))==null?void 0:_.toShallowJSON();throw I?console.warn("Entity in project: ",I):console.warn("Entity not in project"),new Error(`Entity '${b}' not found in change set transfer. Cannot apply changes.`)}});const v=new Ga(p);return v.flatRecord=t,v.order=m,v.orderEntities(),console.log("All entities: ",v.order.map((b,_)=>`${_+1}: ${t[b].type} - ${b}`).join(`,
404
- `)),console.log("Persisting new additions"),v.visit(async(b,_)=>{if(a.added[b.id]){console.log("Adding: ",b.id);try{const I=z(b,this);if(I.hydrateAncestors(),I.addSelfToProject(l),!this.get(b.id))throw new Error(`Entity ${b.id} was not added to the project`)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting updates"),v.visit(async(b,_)=>{if(a.updated[b.id]){console.log("Updating: ",b.id);try{const I=this.get(b.id);I&&I.updateWithShallowTransfer(b,l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting removals"),v.visit(async(b,_)=>{if(a.removed[b.id]){console.log("Removing: ",b.id);try{const I=this.get(b.id);I&&I.remove({ignoreUpstream:!1},l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),this}toFullProjectTransfer(){const n=new Ga(this),a={};return n.visit(l=>{const p=l.toShallowJSON();a[l.id]=p}),{order:n.order,size:n.order.length,record:a}}};g(Fe,"sessionAuthor","1"),g(Fe,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:n=>n}),g(Fe,"repository",{APICreate:async(n,...a)=>n,APIUpdate:async(n,...a)=>n,APIDelete:async(n,...a)=>n,APIClone:async(n,...a)=>{},APILoad:async(n,...a)=>null,APILoadVersion:async(n,a,...l)=>null}),g(Fe,"type",f.Project),g(Fe,"USER_MANAGED_PARENT_TYPES",[]),g(Fe,"PARENT_TYPES",[...Fe.USER_MANAGED_PARENT_TYPES]),g(Fe,"MUTABLE_BASE_PROPERTIES",["name","description"]),g(Fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(Fe,"BASE_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"MUTABLE_META_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,"x","y"]),g(Fe,"INMUTABLE_META_PROPERTIES",[...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"META_PROPERTIES",[...Fe.MUTABLE_META_PROPERTIES,...Fe.INMUTABLE_META_PROPERTIES]),g(Fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(Fe,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),g(Fe,"UPSTREAM_PROPERTIES",[...Fe.MUTABLE_UPSTREAM_PROPERTIES,...Fe.INMUTABLE_UPSTREAM_PROPERTIES]),g(Fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),g(Fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(Fe,"DOWNSTREAM_PROPERTIES",[...Fe.MUTABLE_DOWNSTREAM_PROPERTIES,...Fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(Fe,"PROPERTIES",[...Fe.META_PROPERTIES,...Fe.UPSTREAM_PROPERTIES,...Fe.DOWNSTREAM_PROPERTIES]);let P=Fe;var Dj=(u=>(u.PersistChangeSet="persist-change-set",u.CreateSingle="create-single",u.CreateBulk="create-bulk",u.CreateSingleNested="create-single-nested",u.CreateBulkNested="create-bulk-nested",u.Update="update",u.Clone="clone",u.Delete="delete",u.Load="load",u.LoadNested="load-nested",u.LoadVersion="load-version",u))(Dj||{});class gj extends Lt{constructor(n){super(Vs,n);g(this,"id",Jt.Parallel);g(this,"name",Jt.Parallel);g(this,"description","Programmatically execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Vs);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=Vs.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Vs.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Vs.error?z(Vs.error,this.project):null}}class $j extends Lt{constructor(n){super(mi,n);g(this,"id",mi.id);g(this,"name",mi.name);g(this,"description",mi.description);g(this,"version",mi.version);g(this,"autoexecutable",!1);g(this,"initialData",mi);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=mi.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=mi.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=mi.error?z(mi.error,this.project):null}}class Oj extends Lt{constructor(n){super(Fn,n);g(this,"id",Jt.Sequential);g(this,"name",Jt.Sequential);g(this,"description","Programmatically execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Fn);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=Fn.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Fn.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Fn.error?z(Fn.error,this.project):null}}class Sye extends Lt{constructor(d){super(tu,d)}}class Zye extends Lt{constructor(d){super(lo,d)}}class Jye extends Lt{constructor(n){super(uo,n);g(this,"autoexecutable",!0)}getEntityToMatchInputMap(n){return n.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(n){return n.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(n){return n.outputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].outputs.outputEntity.id})||null}getEntityToMatch(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"get-entity-to-match-validate-data"))){const l=this.project.requestActiveValue(n),p=l==null?void 0:l.valueAsTypeSingle;return a==null||a.attemptAutoclose("get-entity-to-match-validate-data",this.id),p}syncOperationInstance(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-operation-instance-validate-data"))){const l=[],p=[],t=[],m=[],v=this.getEntityToMatchInputMap(n);if(v){const{added:I,updated:V,removed:B,affected:K}=this.syncEntityToMatchInputMapDataType(v,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const b=this.getDataToValidateInputMap(n);if(b){const{added:I,updated:V,removed:B,affected:K}=this.syncDataToValidateInputMapDataType(b,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const _=this.getOutputDataOutputMap(n);if(_){const{added:I,updated:V,removed:B,affected:K}=this.syncOutputDataOutputMapDataType(_,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}return a==null||a.attemptAutoclose("sync-operation-instance-validate-data",this.id),{updated:w(l),added:w(p),removed:w(t),affected:w(m),self:n}}syncEntityToMatchInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-entity-to-match-input-map-data-type"))){var _,I,V,B,K,q,Z,Q,ue,re,_e,X,Ee,se,de;const l=[],p=[],t=[],m=[];if(((_=n.declaration)==null?void 0:_.id)!==fe.operation[Wt.Validate].inputs.entityToMatch.id)return a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.project.requestActiveValue(n),b=v==null?void 0:v.valueAsTypeSingle;if(!n.dataType){const ye={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:((I=n.declaration.dataType)==null?void 0:I.options)||null,implementationChooseOne:((V=n.declaration.dataType)==null?void 0:V.implementationChooseOne)||!1,staticEntities:((B=n.declaration.dataType)==null?void 0:B.staticEntities)??null,interactiveEntities:((K=n.declaration.dataType)==null?void 0:K.interactiveEntities)??null,actionEntities:((q=n.declaration.dataType)==null?void 0:q.actionEntities)??null,isList:((Z=n.declaration.dataType)==null?void 0:Z.isList)||!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:(b==null?void 0:b.toJSON())||null,like:!0,inferred:!0,parent:n.toReference()},H=z(ye,n.project);H.hydrateAncestors(),H.setParent(n,a),H.initChildren(a),H.setEntity(b,a),a==null||a.add(H,G.Added),l.push(H),n.setDataType(H,a)}return(se=n.dataType)==null||se.metaSync({inferred:!0,like:!1,asType:!0,options:((Q=n.declaration.dataType)==null?void 0:Q.options)||null,implementationChooseOne:((ue=n.declaration.dataType)==null?void 0:ue.implementationChooseOne)||!1,staticEntities:((re=n.declaration.dataType)==null?void 0:re.staticEntities)??null,interactiveEntities:((_e=n.declaration.dataType)==null?void 0:_e.interactiveEntities)??null,actionEntities:((X=n.declaration.dataType)==null?void 0:X.actionEntities)??null,isList:((Ee=n.declaration.dataType)==null?void 0:Ee.isList)||!1},a),(de=n.dataType)==null||de.setEntity(b,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}syncDataToValidateInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-data-to-validate-input-map-data-type"))){var I,V,B;const l=[],p=[],t=[],m=[];if(((I=n.declaration)==null?void 0:I.id)!==fe.operation[Wt.Validate].inputs.dataToValidate.id)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(n.parent);if(!v)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!n.dataType){const K={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,isList:!1,andChildrenGroup:null,orChildrenGroup:null,staticEntities:null,interactiveEntities:null,actionEntities:null,asType:!1,entity:null,like:!0,inferred:!0,parent:n.toReference()},q=z(K,n.project);q.setParent(n,a),q.initChildren(a),a==null||a.add(q,G.Added),l.push(q),n.setDataType(q,a)}(V=n.dataType)==null||V.metaSync({inferred:!0,like:!0,asType:!1},a);const _=this.getEntityToMatch(v,a);return(B=n.dataType)==null||B.setEntity(_,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}syncOutputDataOutputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-output-data-output-map-data-type"))){var V,B,K;const l=[],p=[],t=[],m=[];if(((V=n.declaration)==null?void 0:V.id)!==fe.operation[Wt.Validate].outputs.outputEntity.id)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(n.parent);if(!v)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const _=this.project.requestActiveValue(v),I=(_==null?void 0:_.valueAsTypeSingle)||null;if(!n.dataType){const q={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,staticEntities:null,interactiveEntities:null,actionEntities:null,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:(I==null?void 0:I.toJSON())||null,like:!0,inferred:!0,parent:n.toReference()},Z=z(q,n.project);Z.hydrateAncestors(),Z.setParent(n,a),Z.initChildren(a),Z.setEntity(I,a),a==null||a.add(Z,G.Added),l.push(Z),n.setDataType(Z,a)}return(B=n.dataType)==null||B.metaSync({inferred:!0,like:!0,asType:!1},a),(K=n.dataType)==null||K.setEntity(I,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}inferInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-input-map-data-type-validate-data"))){var p,t,m;if(((p=n.declaration)==null?void 0:p.id)===fe.operation[Wt.Validate].inputs.entityToMatch.id){const{added:v,updated:b,removed:_,affected:I}=this.syncEntityToMatchInputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:n.dataType}}if(((t=n.declaration)==null?void 0:t.id)===fe.operation[Wt.Validate].inputs.dataToValidate.id){const{added:v,updated:b,removed:_,affected:I}=this.syncDataToValidateInputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:n.dataType}}const l=(m=n.declaration)==null?void 0:m.getDataType(a);if(l&&l.isResolved)return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:l};if(n.readsValue){const v=xs(n.readsValue,a);return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:v}}return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:null}}inferOutputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-output-map-data-type-validate-data"))){var l;if(((l=n.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].outputs.outputEntity.id){const{added:p,updated:t,removed:m,affected:v}=this.syncOutputDataOutputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-output-map-data-type-validate-data",this.id),{updated:w(t),added:w(p),removed:w(m),affected:w(v),self:n.dataType}}return{updated:[],added:[],removed:[],affected:[],self:null}}}class Wye extends Lt{constructor(d){super($m,d)}}class Yye extends Lt{constructor(d){super(Cm,d)}}class zye extends Lt{constructor(d){super(Pm,d)}}class Hye extends Lt{constructor(d){super(df,d)}}class Xye extends Lt{constructor(d){super(af,d)}}class Qye extends Lt{constructor(d){super(eu,d)}}function e0e(u){const d=[new Oj(u),new gj(u),new $j(u),new Sye(u),new Zye(u),new Jye(u),new Hye(u),new Wye(u),new zye(u),new Yye(u),new Xye(u),new Qye(u),new Lt(gm,u),new Lt(Dm,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.operationDeclarations=d,d}class Cj extends En{constructor(n){super(Jr,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Jr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Jr.abstract);g(this,"static",Jr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Jr,this.project=n,this.id=Jr.id,this.version=Jr.version,this.name=Jr.name,this.static=Jr.static,this.abstract=Jr.abstract,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.extends=this.initialData.extends.map(a=>z(a,this.project))}}var Pj=(u=>(u.StatusCodeMustBeNumber="status-code-must-be-number",u.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",u))(Pj||{});function Vj(u,d){const n=[];if(typeof d!="number"){const a=new xt({id:u.id+"--status-code-must-be-number",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number.`,issue:null,severity:S.Error,code:"status-code-must-be-number",entity:u});return n.push(a),{errors:n,override:d}}if(d<100){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});n.push(a)}if(d>599){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});n.push(a)}return{errors:n,override:d}}class Nj extends En{constructor(n){super(Vi,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Vi.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Vi.abstract);g(this,"static",Vi.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Vi,this.project=n,this.id=Vi.id,this.version=Vi.version,this.name=Vi.name,this.static=Vi.static,this.abstract=Vi.abstract,this.properties=this.initialData.properties.map(t=>{const m=z(t,this.project);return m.setParent(this,null),m.initChildren(null),m}),this.methods=this.initialData.methods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.abstractMethods=this.initialData.abstractMethods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.extends=this.initialData.extends.map(t=>z(t,this.project));const a=this.properties.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(t,m)=>hU(t,m);const l=this.abstractMethods.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!l)throw new Error("Handler method not found in endpoint entity");const p=l.outputs.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.outputs.statusCode.id);if(!p)throw new Error("Status code output not found in handler method");p.codeNativeValueValidation=(t,m)=>Vj(t,m)}}const t0e="test_primitive_entities_export";class r0e extends En{constructor(n){super(Gr,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Gr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Gr.abstract);g(this,"static",Gr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Gr,this.project=n,this.id=Gr.id,this.version=Gr.version,this.name=Gr.name,this.static=Gr.static,this.abstract=Gr.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.extends=this.initialData.extends.map(l=>z(l,this.project));const a=this.properties.find(l=>l.id===fe["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(l,p)=>yU(l,p)}}function i0e(u){const d=[new Cj(u),new Nj(u),new r0e(u),new En(Df,u)];return d.forEach(n=>{u.subscribeBuiltInInstance(n)}),u.builtInBaseEntities=d,d}function s0e(u){const d=[new Ri(ke,u),new Ri(Bn,u),new Ri(nt,u),new Ri(bm,u),new Ri(Fr,u),new Ri(Un,u),new Ri(sn,u),new Ri(jn,u),new Ri(fl,u)];return d.forEach(n=>{u.subscribeBuiltInInstance(n)}),u.primitives=d,d}function n0e(u){const d=[new Lt($f,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.globalEventActionDescriptors=d,d}function a0e(u){const d=[new Lt(nu,u),new Lt(ca,u),new Lt(iu,u),new Lt(ml,u),new Lt(vl,u),new Lt(vf,u)];d.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarations=d;const n=[new Lt(Af,u),new Lt(su,u),new Lt(Tf,u),new Lt(qm,u),new Lt(Zm,u),new Lt(Ef,u)];return n.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarationsBodies=n,d}function o0e(u){const d=[new ks(Of,u),new ks(pv,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.valueDescriptors=d,d}function l0e(u){const d=[new Lt(yo,u),new Lt(Il,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.conditionDeclarations=d,d}const jo={},_y={},pp={empty:!1,enrich:!0,mock:!1,ignoreCache:!1,onFetch:async()=>null,manuallyInit:!1};function Lj(u,d={enrich:!0,shallowErrors:!1}){const n={enrich:!0,shallowErrors:!1,...d},{enrich:a,shallowErrors:l}=n,p=u.project,t=u.record,m=new Ga(p),v=new Set;t[p.id]=p,v.add(p.id);const b=N().toISOString();Object.values(t).forEach(V=>{!V||m.allBuiltInEntityIds.includes(V.id)||v.add(V.id)}),m.order=Array.from(v),m.flatRecord=t,m.orderEntities();const _=Dy(u.project);_.instances[p.id]=_;const I=a?_.addChangeSet(new F(_,P.sessionAuthor,b,_,!0,"project-init-from-fetch-result")):null;return m.visit(V=>{if(V.id===_.id)return;const B=z(V,_);try{B.hydrateAncestors(),B.addSelfToProject(null)}catch(K){if(l)console.error("Error hydrating ancestors: ",K);else throw K}}),a?(m.visit(V=>{if(V.id===_.id)return;const B=_.get(V.id);B&&B.afterAllChildrenInitialized(I)}),_.afterAllChildrenInitialized(I)):gy(_,b).forEach(B=>{B.remove({ignoreUpstream:!0},null)}),_.instancesList.forEach(V=>{V.previousVersion=null}),I==null||I.attemptAutoclose("project-init-from-fetch-result",_.id),_}async function d0e(u,d=pp){const n={...pp,...d};if(n.empty)return{data:{project:{id:u.id,type:f.Project,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]},record:{}}};if(n.mock){const l={...bE};return l.id=u.id,{data:{project:l,record:{}}}}return console.log("Fetching project from external API"),new Promise(async l=>{try{if(n.onFetch){const p=await n.onFetch(u.id);if(p){l({data:p});return}}else l({data:null})}catch(p){console.error("Error fetching project: ",p),l({data:null})}})}function Dy(u){const d=new P(u);return s0e(d),i0e(d),e0e(d),n0e(d),a0e(d),o0e(d),l0e(d),Array.from(new Set([...d.getAllBuiltInIds(),...bs()])).forEach(a=>{if(!d.builtInInstances[a]&&d.instances[a])d.builtInInstances[a]=d.instances[a],delete d.instances[a];else if(!d.builtInInstances[a])throw new Error(`Built in entity was not properly initialized: ${a}`)}),d.instances[d.id]=d,d}function gy(u,d){return u.instancesList.filter(a=>N(a.createdAt).isAfter(N(d)||!!a.previousVersion))}function u0e(u,{enrich:d}={enrich:!0}){const n=new Map,a=new Map,l=Array.from(new Set([...u.getAllBuiltInIds(),...bs()]));Object.keys(u.instances).forEach(_=>{if(l.includes(_)){n.set(_,_),a.set(_,_);return}const I=u.get(_);if(!wy(I,{...u.instances,...u.builtInInstances}).every(q=>!l.includes(q))){n.set(_,_),a.set(_,_);return}const K=P.UUID.uuid();n.set(_,K),a.set(K,_)});const p=N().toISOString(),t=u.toShallowJSON({seenEntityMaps:n});t.previousVersion=null,t.createdAt=p,t.version=P.UUID.uuid();const m=Dy(t);m.instances[m.id]=m;const v=d?m.addChangeSet(new F(m,P.sessionAuthor,p,m,!0,"project-clone")):null,b=new Ga(u);return b.visit(_=>{const I=_.toShallowJSON({seenEntityMaps:n});I.previousVersion=null,I.createdAt=p,I.version=P.UUID.uuid();const V=ip(I,PU(b.flatRecord,n));if(Object.keys(V.upstream).length){let K=!1;if(Object.keys(V.upstream).forEach(q=>{if(!K&&(!m.get(q)||m.getDeleted(q))){K=!0;return}}),K)return}const B=z(I,m);B.hydrateAncestors(),B.addSelfToProject(v),v==null||v.add(B,G.Added)}),d?(b.visit(_=>{if(_.id===m.id)return;const I=m.get(n.get(_.id));I&&I.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):gy(m,p).forEach(I=>{I.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(_=>{_.previousVersion=null}),v==null||v.attemptAutoclose("project-clone",m.id),m}function Mj(u,{enrich:d}={enrich:!0}){const n=Dy(u),a=N().toISOString(),l=d?n.addChangeSet(new F(n,P.sessionAuthor,a,n,!0,"project-init")):null;l&&(l.type=jT.Automatic);const p=new Ga(u);return p.visit(t=>{const m=z(t,n);m.hydrateAncestors(),m.addSelfToProject(l)}),d?(p.visit(t=>{if(t.id===n.id)return;const m=n.get(t.id);m&&m.afterAllChildrenInitialized(l)}),n.afterAllChildrenInitialized(l)):(gy(n,a).forEach(v=>{v.remove({ignoreUpstream:!0},null)}),new Ga(n).visit(v=>{v.initialized=!0,v.captureVersion()})),n.initialized=!0,l==null||l.attemptAutoclose("project-init",n.id),n}async function c0e(u,d=pp){const n={...pp,...d};if(u.id&&jo[u.id]&&!n.ignoreCache)return jo[u.id];if(u.id&&_y[u.id]&&!n.ignoreCache)return await _y[u.id],jo[u.id];const a=d0e(u,n);u.id&&(_y[u.id]=a);const l=await a;if(l.data){let p;return n.mock?p=Mj(bE,{enrich:!!n.enrich}):l.data instanceof P?p=l.data:p=Lj(l.data,{enrich:!!n.enrich}),jo[u.id]=p,u.id&&delete _y[u.id],p}return null}function p0e(u){return jo[u.id]&&delete jo[u.id],null}C.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=hb,C.ALL_BUILT_IN_BASE_ENTITIES=BC,C.ALL_BUILT_IN_CONDITION_ENTITIES=zC,C.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=XC,C.ALL_BUILT_IN_LOOP_BODY_ENTITIES=uO,C.ALL_BUILT_IN_LOOP_ENTITIES=dO,C.ALL_BUILT_IN_OPERATION_ENTITIES=Ag,C.ALL_BUILT_IN_PRIMITIVE_ENTITIES=d1,C.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=sP,C.ALL_BUILT_IN_VALUE_DESCRIPTORS=iP,C.ActionDescriptorState=Lt,C.ActionInputMapState=The,C.ActionOutputMapState=Ihe,C.AppendToListOperationInputIds=v_,C.AppendToListOperationOutputIds=E_,C.ArgumentDeclarationDependencyField=S3,C.ArgumentDeclarationState=ea,C.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ub,C.BUILT_IN_BASE_ENTITY_IDS=fe,C.BUILT_IN_ENTITY_TYPES=Pi,C.BaseCanvasDraggableState=Bye,C.BaseEntityNames=Oe,C.BaseState=Mye,C.BaseValueDescriptorIds=pl,C.BreakStatementDependencyField=J3,C.BreakStatementState=Ba,C.BuiltInBaseEntityState=En,C.CACHED_PROJECTS_BY_ID=jo,C.CALLABLE_ENTITIES_EXPLANATION=Ohe,C.CALLABLE_TYPES=tn,C.CALLER_ENTITIES_EXPLANATION=X3,C.CALLER_TYPES=rn,C.CALLS_UPDATE_EXPLANATION=ja,C.CHILDREN_TYPES=o7,C.COMPARISON_CONDITIONS=WC,C.CONDITIONS=YC,C.CUSTOM_ENTITY_OPERATIONS=xD,C.CallableEntityClass=jye,C.CallerEntityClass=Lb,C.ChangeSet=F,C.ChangeSetChangeCaptureType=jT,C.ChangeSetEntityChangeType=G,C.ChildEntityBaseClass=Uye,C.CommonStringValidationErrorCodes=fU,C.ComparisonOperatorTypes=fr,C.ConditionDependencyField=bM,C.ConditionState=Ca,C.ContinueStatementDependencyField=hM,C.ContinueStatementState=Qr,C.CreateNewInputIds=fD,C.CreateNewOutputIds=hD,C.DRAGGABLE_CALLABLE_TYPES=Tm,C.DRAGGABLE_CALLER_TYPES=t1,C.DRAGGABLE_ELEMENT_TYPES=nf,C.DRAGGABLE_EXECUTABLE_TYPES=n7,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=sf,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Em,C.DataTypeCompatibilityTypes=ms,C.DataTypeDependencyField=xT,C.DataTypeParentChildRelation=xr,C.DataTypeState=ji,C.DefinitionEntityDependencyField=Ry,C.DefinitionEntityState=ia,C.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Nye,C.ENTITIES_WITH_VALLUES_EXPLANATION=dy,C.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=oe,C.ENTITY_RECUSION_OPTIONS_DEFAULTS=Ce,C.ENTITY_TYPES=a7,C.ENTITY_WITH_DECLARATION_TYPES=i7,C.ENTITY_WITH_LOGIC_SCOPE_TYPES=br,C.ENTITY_WITH_NAMES_TYPES=r1,C.ENTITY_WITH_PARENT_TYPES=t7,C.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=Qw,C.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=r7,C.ENTITY_WITH_VALUE_TYPES=vm,C.ENTRY_POINT_ENTITIES_EXPLANATION=Qc,C.ENTRY_POINT_TYPES=Xt,C.EVENT_TYPES=cl,C.EXECUTABLE_TYPES=s7,C.EXECUTION_OPERATIONS=pD,C.EndpointEntity=Nj,C.EntityAction=Dj,C.EntityError=xt,C.EntityErrorSeverity=S,C.EntityGenerationError=Y,C.EntityGenerationErrorCode=k,C.EntityInstanceErrorCode=me,C.EntityOperations=Wt,C.EntityType=f,C.EntityWithLogicScopeClass=Kye,C.EntityWithValueClass=Gye,C.EntryPointEntityClass=xye,C.Events=Mb,C.ExecutionOperations=Jt,C.ExecutionTerminationType=vM,C.FunctionCallDependencyField=dU,C.FunctionCallState=Fa,C.FunctionDeclarationDependencyField=aM,C.FunctionDeclarationState=_a,C.GET_PROJECT_OPTIONS_DEFAULTS=pp,C.GLOBAL_EVENT_DECLARATIONS=HC,C.GetLastInListOperationInputIds=n_,C.GetLastInListOperationOutputIds=a_,C.GlobalEventNames=Mn,C.GlobalEventState=$a,C.HTTPOperations=Hr,C.HTTPStatucCodeValidationErrorCodes=Pj,C.HTTP_OPERATIONS=Tg,C.InputMapDependencyField=G3,C.InputMapState=Es,C.InstalledProjectState=La,C.InternalCallDependencyField=x3,C.InternalCallState=Ma,C.JoinListOperationInputIds=_R,C.JoinListOperationOutputIds=DR,C.LIST_OPERATIONS=P_,C.ListOperations=it,C.LiteralValueDependencyField=rM,C.LiteralValueState=Fs,C.LoopDependencyField=EM,C.LoopState=Oa,C.LoopTypes=Be,C.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=xa,C.NUMBER_OPERATIONS=x1,C.NumberOperations=Ht,C.OPERATION_DECLARATIONS=bg,C.OperationDependencyField=dM,C.OperationState=Da,C.OutputMapDependencyField=k3,C.OutputMapParentChildRelation=ul,C.OutputMapState=Ks,C.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=uy,C.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Ua,C.PASS_THROUGH_CALLABLE_TYPES=dr,C.PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=e1,C.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=fb,C.ParallelExecutionOperation=gj,C.PassThroughCallableEntityClass=Fye,C.PersistedEntity=Cj,C.PersistedEntityMethods=Wi,C.PrimitiveEntityState=Ri,C.PrimitiveTypes=ee,C.ProjectState=P,C.ProjectStateEvents=ar,C.PropertyDependencyField=sM,C.PropertyState=Xn,C.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=Rj,C.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=Che,C.ReturnDeclarationDependencyField=cM,C.ReturnDeclarationState=wi,C.ReturnStatementDependencyField=FT,C.ReturnStatementState=ga,C.SQLAST=che,C.STANDALONE_CONDITIONS=xC,C.STRING_OPERATIONS=RR,C.ScopeCompatibilityType=Ay,C.SearchDependencyField=M3,C.SearchState=Na,C.SequentialExecutionOperation=Oj,C.SequentialExecutionOperationInputIds=Q_,C.SequentialExecutionOperationOutputIds=eD,C.SharedEntityErrorCode=le,C.SharedStateFunctionality=wj,C.SplitListOperationInputIds=GR,C.SplitListOperationOutputIds=KR,C.StandaloneOperatorTypes=ps,C.StringOperations=ut,C.TERMINATION_TYPES=sr,C.Traverser=Ga,C.USER_MANAGED_ENTITY_TYPES=i1,C.UserManagedEntityStateTemplate=Lye,C.VALUE_READING_ENTITIES_EXPLANATION=pb,C.VALUE_READING_TYPES=ua,C.VALUE_WRITING_ENTITIES_EXPLANATION=Q3,C.VALUE_WRITING_TYPES=Tr,C.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=cb,C.VARIABLE_TYPES=lr,C.ValueAutogenerationType=Er,C.ValueDescriptorDependencyField=Y3,C.ValueDescriptorParentChildRelation=ie,C.ValueDescriptorState=ks,C.ValueReadingEntityClass=up,C.ValueWritingEntityClass=cp,C.VariableDeclarationDependencyField=wM,C.VariableDeclarationState=Va,C.VariableInputMapState=Ehe,C.VariableInstanceDependencyField=KT,C.VariableInstanceState=Pa,C.VariableOutputMapState=Ahe,C.WaitOperation=$j,C.WaitOperationInputIds=Z_,C.WaitOperationOutputIds=J_,C.actionDescriptorValidation=bpe,C.appendToListOperation=df,C.appendToListOperationElementToAppendArgument=Nm,C.appendToListOperationElementToAppendArgumentParentRef=D_,C.appendToListOperationElementToAppendArgumentRef=A_,C.appendToListOperationError=C_,C.appendToListOperationErrorParentRef=O_,C.appendToListOperationListArgument=Vm,C.appendToListOperationListArgumentParentRef=__,C.appendToListOperationListArgumentRef=T_,C.appendToListOperationListDataType=b_,C.appendToListOperationResultListDataType=R_,C.appendToListOperationResultListReturn=$_,C.appendToListOperationResultListReturnParentRef=g_,C.appendToListOperationResultListReturnRef=w_,C.appendToListOperationSecondListDataType=I_,C.applyNewScope=Me,C.argumentDeclarationValidation=whe,C.asGenerationActionExample=vn,C.booleanPrototype=Bn,C.breakStatementValidation=Rhe,C.calculateNewParentBasedOnCallers=Ab,C.capitalizeFirstLetter=kr,C.changeSetJSONRecordToUniqueIds=spe,C.checkAreDataTypesCompatible=vs,C.checkAreDefinitionEntitiesCompatibleAsDataType=BL,C.checkArePropertiesCompatibleAsDataType=ML,C.checkExtendsBaseEntity=Iy,C.checkHasBaseEntity=As,C.checkHasMetadataChanged=cr,C.checkImplementationsOverlap=ra,C.checkImplementsBaseEntity=dye,C.checkIsBranchDependentButNotDirectlyOnBranch=tp,C.checkIsBranchDependentOnBranch=khe,C.checkIsBuiltIn=Nb,C.checkIsCallableEntityReachable=dp,C.checkIsCanvasEntity=oye,C.checkIsDefEntityInlineDeclaredForSearchOutputType=nb,C.checkIsDetachedBranch=cj,C.checkIsDetachedBranchShallow=Pb,C.checkIsGlobalVariable=nye,C.checkIsGloballyDeclared=Cb,C.checkIsMethod=hj,C.checkIsNestedScope=by,C.checkScopeCompatibility=lp,C.cloneProject=u0e,C.conditionValidation=Ape,C.continueStatementValidation=mpe,C.convertToAbstract=xhe,C.convertToNonAbstract=Fhe,C.convertToNonStatic=Khe,C.convertToStatic=Ghe,C.countedLoopActionDescriptor=nu,C.countedLoopActionDescriptorDynamicReturnDeclaration=tO,C.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=eO,C.countedLoopActionDescriptorStringArgumentDeclaration=Q$,C.countedLoopActionDescriptorStringArgumentDeclarationDataType=H$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=Y$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=W$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=z$,C.countedLoopActionDescriptorStringArgumentDeclarationParentRef=X$,C.countedLoopBodyActionDescriptor=Af,C.countedLoopBodyActionDescriptorAnyDynamicArgument=aO,C.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=nO,C.countedLoopBodyActionDescriptorAnyDynamicReturn=lO,C.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=oO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Wm,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=iO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=rO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=sO,C.createDefinitionEntityFromJSONObject=yy,C.createEntityError=tt,C.createNestedDataTypeForEntity=pU,C.createNewInstanceOperation=lo,C.createNewInstanceOperationEntityToInstanciateArgument=ID,C.createNewInstanceOperationEntityToInstanciateArgumentRef=TD,C.createNewInstanceOperationEntityToInstanciateDataType=bD,C.createNewInstanceOperationError=DD,C.createNewInstanceOperationErrorParentRef=_D,C.createNewInstanceOperationNewEntityDataArgument=ED,C.createNewInstanceOperationNewEntityDataArgumentDataType=vD,C.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=mD,C.createNewInstanceOperationNewEntityDataArgumentParentRef=yD,C.createNewInstanceOperationOutputEntityDeclaration=RD,C.createNewInstanceOperationOutputEntityDeclarationParentRef=wD,C.createNewInstanceOperationRef=AD,C.createSemanticId=WL,C.createStateFromGenerationTargetType=Vye,C.createStateFromType=er,C.createStateFromTypeAndSubscribe=z,C.cronJobBuiltInBaseEntity=Df,C.cronJobBuiltInBaseEntityExpressionProperty=LC,C.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=y7,C.cronJobBuiltInBaseEntityExpressionPropertyRef=VC,C.cronJobBuiltInBaseEntityRef=NC,C.cronJobTriggeredFunctionDeclarationBlueprint=lv,C.cronJobTriggeredFunctionDeclarationBlueprintParentRef=CC,C.dataTypeCompatibilityToErrorExplanation=oU,C.dataTypeValidation=upe,C.datePrototype=sn,C.dateValueAutogenerationSchema=_E,C.definitionEntityToZodSchema=bP,C.definitionEntityValidation=$ye,C.deletePersistedEntityMethod=ov,C.deletePersistedEntityMethodParentRef=yC,C.deleteRootProject=p0e,C.endpointBuiltInBaseEntity=Vi,C.endpointBuiltInBaseEntityRef=hO,C.endpointBuiltInBaseEntityRefFour=zO,C.endpointBuiltInBaseEntityRefThree=wO,C.endpointBuiltInBaseEntityRefTwo=TO,C.endpointBuiltInCorsProperty=yO,C.endpointBuiltInCorsPropertyDataType=fO,C.endpointBuiltInCorsPropertyDataTypeRef=cO,C.endpointBuiltInCorsPropertyRef=pO,C.endpointBuiltInMethodProperty=zm,C.endpointBuiltInMethodPropertyDataType=IO,C.endpointBuiltInMethodPropertyDataTypeRef=bO,C.endpointBuiltInMethodPropertyRef=AO,C.endpointBuiltInPathProperty=Ym,C.endpointBuiltInPathPropertyDataType=EO,C.endpointBuiltInPathPropertyDataTypeRef=mO,C.endpointBuiltInPathPropertyRef=vO,C.endpointPathParamsArgumentDeclaration=Xm,C.endpointPathParamsArgumentDeclarationRef=NO,C.endpointPathParamsVariableDataType=LO,C.endpointPathParamsVariableDataTypeRef=VO,C.endpointReachedTriggerActionDescriptor=sv,C.endpointReachedTriggerActionDescriptorRef=MO,C.endpointReachedTriggerActionDescriptorRefFour=jO,C.endpointReachedTriggerActionDescriptorRefThree=UO,C.endpointReachedTriggerActionDescriptorRefTwo=BO,C.endpointRequestBodyArgumentDeclaration=ev,C.endpointRequestBodyArgumentDeclarationRef=gO,C.endpointRequestBodyVariableDataType=$O,C.endpointRequestHeadersArgumentDeclaration=Hm,C.endpointRequestHeadersArgumentDeclarationRef=_O,C.endpointRequestHeadersVariableDataType=DO,C.endpointRequestHeadersVariableDataTypeRef=RO,C.endpointRequestQueryParamsArgumentDeclaration=Qm,C.endpointRequestQueryParamsArgumentDeclarationRef=CO,C.endpointRequestQueryParamsVariableDataType=PO,C.endpointRequestQueryParamsVariableDataTypeRef=OO,C.endpointResponseBodyDataType=WO,C.endpointResponseBodyReturnDeclaration=iv,C.endpointResponseBodyReturnDeclarationRef=JO,C.endpointResponseCodeDataType=FO,C.endpointResponseCodeReturnDeclaration=tv,C.endpointResponseCodeReturnDeclarationDefaultValueParentRef=KO,C.endpointResponseCodeReturnDeclarationRef=xO,C.endpointResponseHeadersDataType=SO,C.endpointResponseHeadersDataTypeRef=kO,C.endpointResponseHeadersReturnDeclaration=rv,C.endpointResponseHeadersReturnDeclarationRef=qO,C.endpointReturnStatementRef=GO,C.endpointReturnStatementRefThree=YO,C.endpointReturnStatementRefTwo=ZO,C.enrichFromKnownEntities=rp,C.enumOptionsProperty=l1,C.enumOptionsPropertyDataType=a1,C.enumOptionsPropertyDataTypeRef=s1,C.enumOptionsPropertyRef=n1,C.enumPrototype=Un,C.enumPrototypeRef=o1,C.executionBuiltInBaseEntity=gf,C.executionBuiltInEntityAbortMethod=dv,C.executionBuiltInEntityAbortMethodParentRef=MC,C.filterOutDuplicateEntities=w,C.filterOutDuplicateErrors=Eoe,C.findEntityFromKeys=Eb,C.findReferenceToSelfInList=CU,C.findReferencesToSelfInProject=Xhe,C.flattenActionDescriptor=VU,C.flattenArgumentDeclaration=NU,C.flattenBreakStatement=LU,C.flattenBuiltInBaseEntity=MU,C.flattenCalls=Ts,C.flattenCanvasAncestorsUntil=ad,C.flattenCondition=BU,C.flattenContinueStatement=UU,C.flattenDataType=xU,C.flattenDefinitionEntity=jU,C.flattenDefinitionEntityExtensionAndImplementationTypes=Ty,C.flattenDefinitionEntityExtensionTypes=np,C.flattenDefinitionEntityExtensions=Db,C.flattenDefinitionEntityImplementations=gb,C.flattenDefinitionEntityImplementionTypes=sp,C.flattenDerivedCanvasEntities=Fi,C.flattenDetachedBranch=fj,C.flattenElementCalls=at,C.flattenElementCallsOnTheSameScope=Hhe,C.flattenEntity=ae,C.flattenFunctionCall=FU,C.flattenFunctionDeclaration=GU,C.flattenGlobalEvent=KU,C.flattenInputMap=kU,C.flattenInstalledProject=qU,C.flattenInternalCall=SU,C.flattenLiteralValue=ZU,C.flattenLoop=JU,C.flattenOperation=WU,C.flattenOutputMap=YU,C.flattenPrimitiveEntity=zU,C.flattenProject=HU,C.flattenProjectElements=OU,C.flattenProperty=XU,C.flattenRelatedCanvasElementsOnTheLeft=uj,C.flattenRelatedCanvasElementsOnTheRight=dj,C.flattenReturnDeclaration=QU,C.flattenReturnStatement=ej,C.flattenSearch=tj,C.flattenValueDescriptor=rj,C.flattenVariableDeclaration=ij,C.flattenVariableInstance=sj,C.flattenVariableReads=$U,C.flattenVariableWrites=gU,C.flattenVariables=kt,C.fromChangeSetToRecordChangeSet=yye,C.fromLiteralValueTypeToPrimitiveType=ib,C.fromZodParseToEntityGenerationErrors=ob,C.functionCallValidation=jhe,C.functionDeclarationValidation=dpe,C.generate=E9,C.generateActionExample=Phe,C.generateExecutionDataType=Yce,C.generateIdFromStrategy=hr,C.generateMutablePropertiesExplanation=ay,C.generateRandomBoolean=ZP,C.generateRandomDate=RP,C.generateRandomDateAfter=AP,C.generateRandomDateBefore=IP,C.generateRandomDateBetweenRange=wP,C.generateRandomNumber=GP,C.generateRandomNumberAfter=jP,C.generateRandomNumberBefore=xP,C.generateRandomNumberBetweenRange=FP,C.generateRandomText=SP,C.generateRandomTextAfter=KP,C.generateRandomTextBefore=kP,C.generateRandomTextBetweenRange=qP,C.generateUniqueUUID=UP,C.getAllActionDescriptorsForConditions=fy,C.getAllActionDescriptorsForGlobalEvents=cy,C.getAllActionDescriptorsForLoops=py,C.getAllActionDescriptorsForOperations=Mhe,C.getAllBuiltInEntityIds=bs,C.getAllGloballyDeclaredFunctionDeclarationsExplanation=sU,C.getBaseBuiltInEntities=hi,C.getBaseSchemaBasedOnType=z3,C.getBuiltInEntityOwner=ka,C.getCallableEntityReferenceSchema=Kr,C.getCallableEntityTypeSchema=wN,C.getCalledBy=is,C.getCallerEntityReferenceSchema=Ide,C.getCallerEntityTypeSchema=Ade,C.getCalls=wb,C.getCanvasEntitiesDerivedFromInternalCalls=lj,C.getCanvasEntitiesDerivedFromWrites=od,C.getCanvasEntityDerivedFromValueReadingEntity=Ey,C.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=oj,C.getCanvasEntityReferenceSchema=xde,C.getCanvasEntityTypeSchema=jde,C.getChildrenEntityWithValues=She,C.getColumnProperties=ld,C.getCommonAncestor=Ib,C.getCommonChildren=mU,C.getDatabaseEntities=cye,C.getDatabaseEntity=fye,C.getDeclaration=Mo,C.getDeclarationOutputedError=vye,C.getDeepestScope=mj,C.getDefaultRelationalDatabaseEntityOrFirst=Ej,C.getDraggableCallableEntityReferenceSchema=_N,C.getDraggableCallableEntityTypeSchema=RN,C.getDraggableCallerEntityReferenceSchema=Rde,C.getDraggableCallerEntityTypeSchema=wde,C.getDraggableExecutableEntityReferenceSchema=$de,C.getDraggableExecutableEntityTypeSchema=gde,C.getDraggablePassThroughCallableEntityReferenceSchema=Bh,C.getDraggablePassThroughCallableEntityTypeSchema=Mh,C.getDraggablePlayableEntityReferenceSchema=Nde,C.getDraggablePlayableEntityTypeSchema=Vde,C.getEntitiesCreatedSinceInitialization=gy,C.getEntityArgumentDeclarations=_b,C.getEntityInputMaps=nj,C.getEntityOutputMaps=rye,C.getEntityReferenceSchema=Ude,C.getEntityReturnDeclarations=aj,C.getEntityTypeSchema=Bde,C.getEntityWithLogicScopeReferenceSchema=Yn,C.getEntityWithLogicScopeTypeSchema=Ode,C.getEntityWithValueReferenceSchema=IN,C.getEntityWithValueTypeSchema=bde,C.getEntryPointEntityReferenceSchema=Br,C.getEntryPointEntityTypeSchema=Ia,C.getEventEntityReferenceSchema=Nh,C.getEventEntityTypeSchema=Vh,C.getExecutableEntityReferenceSchema=Dde,C.getExecutableEntityTypeSchema=_de,C.getExtendedBuiltInEntity=iye,C.getExtendedDefinitionEntity=Ob,C.getFirstNonLoopScopeOwner=Rr,C.getGenerationTargetSchemaBasedOnType=H3,C.getHeadIfPartOfDetachedBranch=pj,C.getHighestScope=yj,C.getImplementedBuiltInEntity=sye,C.getIsInteractive=ap,C.getLastInListOperation=Pm,C.getLastInListOperationError=m_,C.getLastInListOperationErrorParentRef=y_,C.getLastInListOperationInputListArgument=p_,C.getLastInListOperationInputListArgumentParentRef=c_,C.getLastInListOperationInputListArgumentRef=o_,C.getLastInListOperationInputListDataType=l_,C.getLastInListOperationOutputElementDataType=u_,C.getLastInListOperationOutputElementReturn=h_,C.getLastInListOperationOutputElementReturnParentRef=f_,C.getLastInListOperationOutputElementReturnRef=d_,C.getLinkedEntitiesFromArgumentDeclaration=zhe,C.getLowestPersistedEntityImplementation=$b,C.getParentCallableEntity=vU,C.getParentCallerEntity=TU,C.getParentCanvasEntities=ei,C.getParentCanvasEntity=Pr,C.getParentCanvasEntityFromTransfer=my,C.getParentEntryPoint=qhe,C.getParentPassthroughCallableEntity=EU,C.getPassThroughCallableEntityReferenceSchema=Qt,C.getPassThroughCallableEntityTypeSchema=Lh,C.getPeristedEntities=uye,C.getPlayableEntityReferenceSchema=Pde,C.getPlayableEntityTypeSchema=Cde,C.getProject=c0e,C.getPrototypeByType=op,C.getRecusriveParentsIds=wy,C.getReferenceEntityId=W,C.getReferencedEntitiesStateOrErrors=ly,C.getReferencedEntityStateOrErrors=lb,C.getReferencedIds=ip,C.getRelatedCanvasElementsOnTheLeft=Uo,C.getRelatedCanvasElementsOnTheLeftFromTransfer=Qhe,C.getRelatedCanvasElementsOnTheRight=Ka,C.getRootEntryPointScopeOwner=Vb,C.getScopeOwner=yi,C.getStateClassFromType=hye,C.getTerminationReferenceSchema=Mde,C.getTerminationTypeSchema=Lde,C.getTopLevelParentEntityId=Tj,C.getTouchedCanvasEntitiesFromChangeSet=mye,C.getUsedArgFromDeclaration=eye,C.getUsedReturnFromDeclaration=tye,C.getValueReadingEntityReferenceSchema=AN,C.getValueReadingEntityTypeSchema=Wn,C.getValueWritingEntityReferenceSchema=Tde,C.getValueWritingEntityTypeSchema=ku,C.getVariableFromInputMapping=AU,C.getVariableFromReturnVariablePointer=RU,C.getVariableReferenceSchema=Aa,C.getVariableTypeSchema=Oo,C.getVariablesFromArgumentDeclarations=vy,C.getVariablesFromInputMaps=IU,C.getVariablesFromOutputMapping=_U,C.getVariablesFromOutputMaps=DU,C.getVariablesFromReturnDeclarations=wU,C.getVariablesInSameOrHigherScope=CT,C.getWrites=Rb,C.globalEventValidation=vpe,C.groupCallsBasedOnParallelizableExecution=Jhe,C.handleAfterEntityImplementationSideEffects=cU,C.handleBeforeEntityImplementationSideEffects=uU,C.httpRequestBodyArgument=ff,C.httpRequestBodyArgumentRef=XD,C.httpRequestBodyDataType=QD,C.httpRequestHeadersArgument=pf,C.httpRequestHeadersArgumentRef=zD,C.httpRequestHeadersDataType=HD,C.httpRequestMethodArgument=uf,C.httpRequestMethodArgumentRef=WD,C.httpRequestMethodDataType=YD,C.httpRequestMethodDataTypeRef=ZD,C.httpRequestOperation=tu,C.httpRequestOperationErrorValueDescriptor=xm,C.httpRequestOperationErrorValueDescriptorDatatype=Eg,C.httpRequestOperationErrorValueDescriptorRef=vg,C.httpRequestOperationRef=fg,C.httpRequestOperationRefEight=yg,C.httpRequestOperationRefFive=cg,C.httpRequestOperationRefFour=ug,C.httpRequestOperationRefNine=mg,C.httpRequestOperationRefSeven=hg,C.httpRequestOperationRefSix=pg,C.httpRequestOperationRefThree=dg,C.httpRequestOperationRefTwo=lg,C.httpRequestQueryParamsArgument=jm,C.httpRequestQueryParamsArgumentRef=qD,C.httpRequestQueryParamsDataType=SD,C.httpRequestVariableURLArgument=cf,C.httpRequestVariableURLArgumentRef=KD,C.httpRequestVariableURLDataType=kD,C.httpRequestVariableURLDataTypeRef=FD,C.httpResponseBodyReturnDataType=og,C.httpResponseBodyReturnDataTypeRef=ng,C.httpResponseBodyReturnReturn=mf,C.httpResponseBodyReturnReturnRef=ag,C.httpResponseCodeDataType=tg,C.httpResponseCodeReturn=hf,C.httpResponseCodeReturnRef=eg,C.httpResponseHeadersDataType=sg,C.httpResponseHeadersDataTypeRef=rg,C.httpResponseHeadersReturn=yf,C.httpResponseHeadersReturnRef=ig,C.httpStatusCodeValueValidation=Vj,C.implement=hy,C.inferArgumentDeclarationDataType=UL,C.inferDataType=xs,C.inferInputMapDataType=gT,C.inferOutputMapDataType=OT,C.inferPropertyDataType=FL,C.inferReturnDeclarationDataType=$T,C.inferValueDescriptorDataType=GL,C.inferVariableDeclarationDataType=xL,C.inferVariableInstanceDataType=jL,C.initBaseProjectEntity=Dy,C.initProject=Mj,C.initProjectFromFetchResult=Lj,C.inputMapValidation=vhe,C.installedProjectValidation=yhe,C.internalCallValidation=mhe,C.isPromise=vb,C.isUUID=YL,C.iterateOverListActionDescriptorListArgumentDeclaration=Xg,C.iterateOverListActionDescriptorListArgumentDeclarationDataType=zg,C.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Yg,C.iterateOverListActionDescriptorListArgumentDeclarationParentRef=Hg,C.iterateOverListLoopActionDescriptor=ca,C.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=e$,C.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Qg,C.iterateOverListLoopBodyActionDescriptor=su,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=d$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=l$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=c$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=u$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=bf,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=r$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=t$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=i$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=o$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=n$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=s$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=a$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=m$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=h$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=f$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=y$,C.iterateOverObjectKeysLoopActionDescriptor=ml,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=E$,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=v$,C.iterateOverObjectKeysLoopBodyActionDescriptor=qm,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=g$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=D$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=O$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=$$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=km,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=b$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=T$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=A$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=_$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=w$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=I$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=R$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=L$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=V$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=P$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=N$,C.iterateOverObjectValuesLoopActionDescriptor=vl,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=B$,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=M$,C.iterateOverObjectValuesLoopBodyActionDescriptor=Zm,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=S$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=q$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=J$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=Z$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sm,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=j$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=U$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=x$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=k$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=G$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=F$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=K$,C.iterateOverStringActionDescriptorDynamicReturnDeclaration=Ug,C.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Bg,C.iterateOverStringActionDescriptorStringArgumentDeclaration=Mg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Ng,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Vg,C.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Lg,C.iterateOverStringLoopActionDescriptor=iu,C.iterateOverStringLoopBodyActionDescriptor=Tf,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=Sg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=qg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Jg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Zg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Gm,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=xg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=jg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Fg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Km,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Kg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Gg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=kg,C.joinListOperation=$m,C.joinListOperationError=FR,C.joinListOperationErrorParentRef=xR,C.joinListOperationFirstListArgument=LR,C.joinListOperationFirstListArgumentParentRef=NR,C.joinListOperationFirstListArgumentRef=gR,C.joinListOperationFirstListDataType=$R,C.joinListOperationResultListDataType=VR,C.joinListOperationResultListReturn=jR,C.joinListOperationResultListReturnParentRef=UR,C.joinListOperationResultListReturnRef=PR,C.joinListOperationSecondListArgument=BR,C.joinListOperationSecondListArgumentParentRef=MR,C.joinListOperationSecondListArgumentRef=OR,C.joinListOperationSecondListDataType=CR,C.joinListWithLastSeparator=Ke,C.joinStringsOperation=eu,C.joinStringsOperationDynamicStringArgument=aR,C.joinStringsOperationDynamicStringArgumentParentRef=nR,C.joinStringsOperationDynamicStringArgumentRef=iR,C.joinStringsOperationDynamicStringDataType=sR,C.joinStringsOperationError=rR,C.joinStringsOperationErrorParentRef=tR,C.joinStringsOperationFirstStringArgument=of,C.joinStringsOperationFirstStringArgumentParentRef=Z1,C.joinStringsOperationFirstStringArgumentRef=F1,C.joinStringsOperationFirstStringDataType=G1,C.joinStringsOperationResultStringDataType=S1,C.joinStringsOperationResultStringReturn=Qd,C.joinStringsOperationResultStringReturnParentRef=eR,C.joinStringsOperationResultStringReturnRef=q1,C.joinStringsOperationSecondStringArgument=lf,C.joinStringsOperationSecondStringArgumentParentRef=Q1,C.joinStringsOperationSecondStringArgumentRef=K1,C.joinStringsOperationSecondStringDataType=k1,C.joinStringsOperationSeparatorStringArgument=X1,C.joinStringsOperationSeparatorStringArgumentParentRef=H1,C.joinStringsOperationSeparatorStringArgumentRef=J1,C.joinStringsOperationSeparatorStringDataType=z1,C.joinStringsOperationSeparatorStringDataTypeDefaultValue=Y1,C.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=W1,C.keyValuePrototype=fl,C.literalValueValidation=npe,C.loopValidation=Tpe,C.lowercaseFirstLetter=Qu,C.manualFlowActionDescriptorDeclarationArgumentDeclaration=Fm,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=_g,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=Rg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=Dg,C.manualFlowLoopActionDescriptor=vf,C.manualFlowLoopActionDescriptorDynamicReturnDeclaration=wg,C.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Ig,C.manualFlowLoopBodyActionDescriptor=Ef,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=$g,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=gg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Cg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=Og,C.mapActionDescriptorToTypeItRepresents=lye,C.mapRecord=PU,C.mergeEntityErrorsList=Toe,C.mergeListOfEntities=aye,C.methodDefaultValue=JD,C.mockClientProject=bE,C.moreThanOrEqualCondition=Il,C.moreThanOrEqualConditionLeftHandArgument=kC,C.moreThanOrEqualConditionLeftHandArgumentDataType=GC,C.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=FC,C.moreThanOrEqualConditionLeftHandArgumentParentRef=KC,C.moreThanOrEqualConditionRightHandArgument=JC,C.moreThanOrEqualConditionRightHandArgumentDataType=SC,C.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=qC,C.moreThanOrEqualConditionRightHandArgumentParentRef=ZC,C.noSpacesOrDashesValueValidation=yU,C.noSpacesValueValidation=hU,C.notEmptyCondition=yo,C.notEmptyConditionArgument=jC,C.notEmptyConditionRef=UC,C.nullPrototype=bm,C.numberAdditionOperation=af,C.numberAdditionOperationDynamicSummandArgument=I1,C.numberAdditionOperationDynamicSummandArgumentType=A1,C.numberAdditionOperationDynamicSummandArgumentTypeParentRef=b1,C.numberAdditionOperationError=T1,C.numberAdditionOperationErrorParentRef=E1,C.numberAdditionOperationFirstNumberArgument=Am,C.numberAdditionOperationFirstNumberArgumentRef=u1,C.numberAdditionOperationFirstNumberDataType=c1,C.numberAdditionOperationRef=m1,C.numberAdditionOperationRefThree=wm,C.numberAdditionOperationRefTwo=v1,C.numberAdditionOperationResultNumberDataType=y1,C.numberAdditionOperationResultNumberReturn=Rm,C.numberAdditionOperationResultNumberReturnRef=h1,C.numberAdditionOperationSecondNumberArgument=Im,C.numberAdditionOperationSecondNumberArgumentRef=p1,C.numberAdditionOperationSecondNumberDataType=f1,C.numberPrototype=nt,C.numberSubtractionOperation=Dm,C.numberSubtractionOperationDynamicSubtrahendArgument=j1,C.numberSubtractionOperationDynamicSubtrahendArgumentType=U1,C.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=B1,C.numberSubtractionOperationError=M1,C.numberSubtractionOperationErrorParentRef=L1,C.numberSubtractionOperationFirstNumberArgument=O1,C.numberSubtractionOperationFirstNumberArgumentRef=w1,C.numberSubtractionOperationFirstNumberDataType=R1,C.numberSubtractionOperationRef=_m,C.numberSubtractionOperationRefThree=V1,C.numberSubtractionOperationRefTwo=C1,C.numberSubtractionOperationResultNumberDataType=$1,C.numberSubtractionOperationResultNumberReturn=N1,C.numberSubtractionOperationResultNumberReturnRef=g1,C.numberSubtractionOperationSecondNumberArgument=P1,C.numberSubtractionOperationSecondNumberArgumentRef=_1,C.numberSubtractionOperationSecondNumberDataType=D1,C.numberValueAutogenerationSchema=RE,C.operationValidation=fpe,C.outputMapValidation=bhe,C.parallelExecutionOperation=Vs,C.parallelExecutionOperationError=S_,C.parallelExecutionOperationErrorParentRef=q_,C.parallelExecutionOperationListOfExecutionResultsDataType=G_,C.parallelExecutionOperationListOfExecutionResultsReturn=Mm,C.parallelExecutionOperationListOfExecutionResultsReturnRef=F_,C.parallelExecutionOperationListOfFunctionsArgument=Lm,C.parallelExecutionOperationListOfFunctionsArgumentDatatype=x_,C.parallelExecutionOperationListOfFunctionsArgumentRef=j_,C.parallelExecutionOperationListOfFunctionsBlueprint=U_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=M_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=L_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=N_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutputParentRef=V_,C.parallelExecutionOperationListOfFunctionsBlueprintParentRef=B_,C.parallelExecutionOperationRef=K_,C.parallelExecutionOperationRefThree=k_,C.persistedBuiltInBaseEntity=Jr,C.persistedBuiltInBaseEntityDatabaseProperty=Tl,C.persistedBuiltInBaseEntityDatabasePropertyDataType=EC,C.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=p7,C.persistedBuiltInBaseEntityDatabasePropertyParentRef=TC,C.persistedBuiltInBaseEntityDatabasePropertyRef=vC,C.persistedBuiltInBaseEntityPrimaryKeyProperty=bl,C.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=gC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=AC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=bC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=$C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=DC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=wC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=IC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=_C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=RC,C.printEntity=bb,C.processOutputGlobalValueDescriptorDataType=eP,C.processOutputGlobalValueDescriptorReturn=Of,C.processOutputGlobalValueDescriptorReturnRef=QC,C.projectPublicationCompletedGlobalEvent=$f,C.propertyToZodSchema=TP,C.propertyValidation=tpe,C.relationalDatabaseBuiltInBaseEntity=Gr,C.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=av,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=fC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=pC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=hC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=cC,C.relationalDatabaseBuiltInBaseEntityDefaultProperty=nv,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=uC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=lC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=dC,C.relationalDatabaseBuiltInBaseEntityIdentifierProperty=If,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=QO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=HO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=XO,C.relationalDatabaseBuiltInBaseEntityMinSizeProperty=_f,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=oC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=nC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=aC,C.relationalDatabaseBuiltInBaseEntityPasswordProperty=Rf,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=iC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=c7,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDefaultValueParentRef=sC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=rC,C.relationalDatabaseBuiltInBaseEntityRef=El,C.relationalDatabaseBuiltInBaseEntityUsernameProperty=wf,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=tC,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=u7,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=eC,C.resolveActionDescriptorName=JL,C.resolveBaseEntityName=kL,C.resolveBuiltInBaseEntityDataTypeLabel=qL,C.resolveClonedEntityProject=yr,C.resolveConditionOperatorLabel=Zh,C.resolveDataType=qh,C.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Tb,C.resolveDataTypeLabel=Xl,C.resolveDefinitionEntityDataTypeLabel=Xce,C.resolveEntityDataTypeLabel=Hce,C.resolveEntityName=pe,C.resolveFirstCallsSecond=Whe,C.resolveFirstWritesSecond=Yhe,C.resolvePersistedDefinitionEntityDatabaseEntity=vj,C.resolvePrimaryKeyProperty=pye,C.resolvePrimitiveEntityForSearchLiteralValueType=sb,C.resolvePrimitiveEntityName=ZL,C.resolveSearchName=SL,C.resolveVariableScope=zce,C.returnDeclarationValidation=hpe,C.returnStatementValidation=ype,C.searchStatementErrorGlobalValueDescriptor=pv,C.searchStatementErrorGlobalValueDescriptorDataType=rP,C.searchStatementErrorGlobalValueDescriptorRef=tP,C.searchStatementState=phe,C.searchStatementUtils=hhe,C.searchValidation=Rpe,C.sequentialExecutionOperation=Fn,C.sequentialExecutionOperationError=cD,C.sequentialExecutionOperationErrorParentRef=uD,C.sequentialExecutionOperationListOfExecutionResultsDataType=oD,C.sequentialExecutionOperationListOfExecutionResultsReturn=Um,C.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=dD,C.sequentialExecutionOperationListOfExecutionResultsReturnRef=aD,C.sequentialExecutionOperationListOfFunctionsArgument=Bm,C.sequentialExecutionOperationListOfFunctionsArgumentDatatype=nD,C.sequentialExecutionOperationListOfFunctionsArgumentParentRef=lD,C.sequentialExecutionOperationListOfFunctionsArgumentRef=sD,C.sequentialExecutionOperationListOfFunctionsBlueprint=iD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=rD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=tD,C.softDeletePersistedEntityMethod=f7,C.softDeletePersistedEntityMethodParentRef=OC,C.sortCallsBasedOnExecutionDependencies=bU,C.sortChildrenEntitiesBasedOnExecutionDependencies=Zhe,C.splitListOperation=Cm,C.splitListOperationError=s_,C.splitListOperationErrorParentRef=i_,C.splitListOperationFirstOutputListDataType=JR,C.splitListOperationFirstOutputListReturn=QR,C.splitListOperationFirstOutputListReturnParentRef=XR,C.splitListOperationFirstOutputListReturnRef=Om,C.splitListOperationInputListArgument=YR,C.splitListOperationInputListArgumentParentRef=WR,C.splitListOperationInputListArgumentRef=kR,C.splitListOperationInputListDataType=qR,C.splitListOperationSecondOutputListDataType=e_,C.splitListOperationSecondOutputListReturn=r_,C.splitListOperationSecondOutputListReturnParentRef=t_,C.splitListOperationSplitIndexArgument=HR,C.splitListOperationSplitIndexArgumentParentRef=zR,C.splitListOperationSplitIndexArgumentRef=SR,C.splitListOperationSplitIndexDataType=ZR,C.splitStringOperation=gm,C.splitStringOperationError=wR,C.splitStringOperationErrorParentRef=IR,C.splitStringOperationFirstPartResultStringDataType=pR,C.splitStringOperationFirstPartResultStringReturn=AR,C.splitStringOperationFirstPartResultStringReturnParentRef=bR,C.splitStringOperationFirstPartResultStringReturnRef=cR,C.splitStringOperationIndexArgument=ER,C.splitStringOperationIndexArgumentParentRef=vR,C.splitStringOperationIndexArgumentRef=dR,C.splitStringOperationIndexDataType=uR,C.splitStringOperationSecondPartResultStringDataType=hR,C.splitStringOperationSecondPartResultStringReturn=l7,C.splitStringOperationSecondPartResultStringReturnParentRef=TR,C.splitStringOperationSecondPartResultStringReturnRef=fR,C.splitStringOperationStringArgument=mR,C.splitStringOperationStringArgumentParentRef=yR,C.splitStringOperationStringArgumentRef=oR,C.splitStringOperationStringDataType=lR,C.stringPrototype=ke,C.stringValueAutogenerationSchema=wE,C.suggestNewIdForEntity=UT,C.syncSearchEntityOutput=ab,C.test_primitive_entities_export=t0e,C.toCamelCase=Ra,C.toEntityState=ss,C.toKebabCase=KL,C.toLowerCaseKebabCase=Sh,C.toPascalCase=Hl,C.untypedDataPrototype=Fr,C.updateErrorsList=qt,C.urlDefaultValue=GD,C.uuidPrototype=jn,C.validateArgumentDeclarationName=MT,C.validateCalledByErrorIdInAction=Nhe,C.validateCalledByIdInAction=Vhe,C.validateCallers=iU,C.validateConditionEntityDeclaration=Bhe,C.validateDataOperation=uo,C.validateDataOperationDataToValidateArgument=CD,C.validateDataOperationDataToValidateArgumentParentRef=OD,C.validateDataOperationDataToValidateArgumentRef=gD,C.validateDataOperationDataToValidateDataType=$D,C.validateDataOperationEntityToMatchTypeArgument=LD,C.validateDataOperationEntityToMatchTypeArgumentParentRef=ND,C.validateDataOperationEntityToMatchTypeArgumentRef=PD,C.validateDataOperationEntityToMatchTypeDataType=VD,C.validateDataOperationError=jD,C.validateDataOperationErrorParentRef=UD,C.validateDataOperationOutputEntityDeclaration=BD,C.validateDataOperationOutputEntityDeclarationParentRef=MD,C.validateDefinitionEntityName=PT,C.validateEntryCaller=rU,C.validateErrorCaller=tU,C.validateFunctionCallDeclaration=nU,C.validateFunctionDeclarationName=VT,C.validateGeneratedEntityParentIsNotBuiltInEntity=$he,C.validateGeneration=Dhe,C.validateGenerationTarget=ur,C.validateGenerationUpdate=ghe,C.validateLoopEntityDeclaration=Uhe,C.validateName=Qce,C.validateOperationEntityDeclaration=aU,C.validatePropertyName=LT,C.validateReachability=ta,C.validateReadsValueInActionPayload=Lhe,C.validateReferenceObject=oy,C.validateReferenceToOne=db,C.validateReferences=Cr,C.validateReturnDeclarationName=BT,C.validateSuccessCaller=eU,C.validateValueReaderGenerationUpdate=ep,C.validateValueWritter=yb,C.validateVariableDeclarationName=NT,C.validateVariableInternalCallUse=mb,C.valueAutogenerationCurrentDateAndTimeSchema=eN,C.valueAutogenerationGenericSchema=vh,C.valueAutogenerationOptions=DE,C.valueAutogenerationOptionsSchema=Q4,C.valueAutogenerationRandomBooleanSchema=IE,C.valueAutogenerationRandomDateBetweenSchema=dN,C.valueAutogenerationRandomDateFromSchema=oN,C.valueAutogenerationRandomDateSchema=bh,C.valueAutogenerationRandomDateUntilSchema=lN,C.valueAutogenerationRandomNumberBetweenSchema=iN,C.valueAutogenerationRandomNumberFromSchema=tN,C.valueAutogenerationRandomNumberSchema=Eh,C.valueAutogenerationRandomNumberUntilSchema=rN,C.valueAutogenerationRandomSchema=Bu,C.valueAutogenerationRandomTextBetweenSchema=aN,C.valueAutogenerationRandomTextFromSchema=sN,C.valueAutogenerationRandomTextSchema=Th,C.valueAutogenerationRandomTextUntilSchema=nN,C.valueAutogenerationRangeValueTypesSchema=Mu,C.valueAutogenerationUniqueSchema=AE,C.valueDescriptorValidation=_he,C.variableDeclarationValidation=Ipe,C.variableInstanceValidation=wpe,C.waitOperation=mi,C.waitOperationMillisecondsNumberArgument=oo,C.waitOperationMillisecondsNumberArgumentRef=W_,C.waitOperationMillisecondsNumberDataType=Y_,C.waitOperationOperationError=X_,C.waitOperationOperationErrorParentRef=H_,C.waitOperationRef=z_,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
404
+ `)),console.log("Persisting new additions"),v.visit(async(b,_)=>{if(a.added[b.id]){console.log("Adding: ",b.id);try{const I=z(b,this);if(I.hydrateAncestors(),I.addSelfToProject(l),l.add(I,G.Added),!this.get(b.id))throw new Error(`Entity ${b.id} was not added to the project`)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting updates"),v.visit(async(b,_)=>{if(a.updated[b.id]){console.log("Updating: ",b.id);try{const I=this.get(b.id);I&&(I.updateWithShallowTransfer(b,l),l.add(I,G.Updated))}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),console.log("Persisting removals"),v.visit(async(b,_)=>{if(a.removed[b.id]){console.log("Removing: ",b.id);try{const I=this.get(b.id);I&&I.remove({ignoreUpstream:!1},l)}catch(I){console.error("Error: ",I),console.error("Errored entity: ",b)}}}),l}toFullProjectTransfer(){const n=new Ga(this),a={};return n.visit(l=>{const p=l.toShallowJSON();a[l.id]=p}),{order:n.order,size:n.order.length,record:a}}};g(Fe,"sessionAuthor","1"),g(Fe,"UUID",{isBackup:!0,uuid:()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),fromUUID:n=>n}),g(Fe,"repository",{APICreate:async(n,...a)=>n,APIUpdate:async(n,...a)=>n,APIDelete:async(n,...a)=>n,APIClone:async(n,...a)=>{},APILoad:async(n,...a)=>null,APILoadVersion:async(n,a,...l)=>null}),g(Fe,"type",f.Project),g(Fe,"USER_MANAGED_PARENT_TYPES",[]),g(Fe,"PARENT_TYPES",[...Fe.USER_MANAGED_PARENT_TYPES]),g(Fe,"MUTABLE_BASE_PROPERTIES",["name","description"]),g(Fe,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),g(Fe,"BASE_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"MUTABLE_META_PROPERTIES",[...Fe.MUTABLE_BASE_PROPERTIES,"x","y"]),g(Fe,"INMUTABLE_META_PROPERTIES",[...Fe.INMUTABLE_BASE_PROPERTIES]),g(Fe,"META_PROPERTIES",[...Fe.MUTABLE_META_PROPERTIES,...Fe.INMUTABLE_META_PROPERTIES]),g(Fe,"MUTABLE_UPSTREAM_PROPERTIES",[]),g(Fe,"INMUTABLE_UPSTREAM_PROPERTIES",["primitives","builtInBaseEntities","operationDeclarations","globalEventActionDescriptors","loopDeclarations","builtInInstances"]),g(Fe,"UPSTREAM_PROPERTIES",[...Fe.MUTABLE_UPSTREAM_PROPERTIES,...Fe.INMUTABLE_UPSTREAM_PROPERTIES]),g(Fe,"MUTABLE_DOWNSTREAM_PROPERTIES",["entities","projects","functions","events","variableDeclarations","variableInstances","conditions","operations","functionCalls","loops","searches"]),g(Fe,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),g(Fe,"DOWNSTREAM_PROPERTIES",[...Fe.MUTABLE_DOWNSTREAM_PROPERTIES,...Fe.INMUTABLE_DOWNSTREAM_PROPERTIES]),g(Fe,"PROPERTIES",[...Fe.META_PROPERTIES,...Fe.UPSTREAM_PROPERTIES,...Fe.DOWNSTREAM_PROPERTIES]);let P=Fe;var Dj=(u=>(u.PersistChangeSet="persist-change-set",u.CreateSingle="create-single",u.CreateBulk="create-bulk",u.CreateSingleNested="create-single-nested",u.CreateBulkNested="create-bulk-nested",u.Update="update",u.Clone="clone",u.Delete="delete",u.Load="load",u.LoadNested="load-nested",u.LoadVersion="load-version",u))(Dj||{});class gj extends Lt{constructor(n){super(Vs,n);g(this,"id",Jt.Parallel);g(this,"name",Jt.Parallel);g(this,"description","Programmatically execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Vs);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=Vs.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Vs.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Vs.error?z(Vs.error,this.project):null}}class $j extends Lt{constructor(n){super(mi,n);g(this,"id",mi.id);g(this,"name",mi.name);g(this,"description",mi.description);g(this,"version",mi.version);g(this,"autoexecutable",!1);g(this,"initialData",mi);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=mi.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=mi.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=mi.error?z(mi.error,this.project):null}}class Oj extends Lt{constructor(n){super(Fn,n);g(this,"id",Jt.Sequential);g(this,"name",Jt.Sequential);g(this,"description","Programmatically execute a list of actions one after the other");g(this,"version","1");g(this,"autoexecutable",!0);g(this,"initialData",Fn);g(this,"type",f.ActionDescriptor);g(this,"inputs",[]);g(this,"outputs",[]);g(this,"error",null);g(this,"project");this.project=n,this.inputs=Fn.inputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.outputs=Fn.outputs.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.error=Fn.error?z(Fn.error,this.project):null}}class Sye extends Lt{constructor(d){super(tu,d)}}class Zye extends Lt{constructor(d){super(lo,d)}}class Jye extends Lt{constructor(n){super(uo,n);g(this,"autoexecutable",!0)}getEntityToMatchInputMap(n){return n.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].inputs.entityToMatch.id})||null}getDataToValidateInputMap(n){return n.inputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].inputs.dataToValidate.id})||null}getOutputDataOutputMap(n){return n.outputs.find(a=>{var l;return((l=a.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].outputs.outputEntity.id})||null}getEntityToMatch(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"get-entity-to-match-validate-data"))){const l=this.project.requestActiveValue(n),p=l==null?void 0:l.valueAsTypeSingle;return a==null||a.attemptAutoclose("get-entity-to-match-validate-data",this.id),p}syncOperationInstance(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-operation-instance-validate-data"))){const l=[],p=[],t=[],m=[],v=this.getEntityToMatchInputMap(n);if(v){const{added:I,updated:V,removed:B,affected:K}=this.syncEntityToMatchInputMapDataType(v,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const b=this.getDataToValidateInputMap(n);if(b){const{added:I,updated:V,removed:B,affected:K}=this.syncDataToValidateInputMapDataType(b,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}const _=this.getOutputDataOutputMap(n);if(_){const{added:I,updated:V,removed:B,affected:K}=this.syncOutputDataOutputMapDataType(_,a);l.push(...V),p.push(...I),t.push(...B),m.push(...K)}return a==null||a.attemptAutoclose("sync-operation-instance-validate-data",this.id),{updated:w(l),added:w(p),removed:w(t),affected:w(m),self:n}}syncEntityToMatchInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-entity-to-match-input-map-data-type"))){var _,I,V,B,K,q,Z,Q,ue,re,_e,X,Ee,se,de;const l=[],p=[],t=[],m=[];if(((_=n.declaration)==null?void 0:_.id)!==fe.operation[Wt.Validate].inputs.entityToMatch.id)return a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.project.requestActiveValue(n),b=v==null?void 0:v.valueAsTypeSingle;if(!n.dataType){const ye={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:((I=n.declaration.dataType)==null?void 0:I.options)||null,implementationChooseOne:((V=n.declaration.dataType)==null?void 0:V.implementationChooseOne)||!1,staticEntities:((B=n.declaration.dataType)==null?void 0:B.staticEntities)??null,interactiveEntities:((K=n.declaration.dataType)==null?void 0:K.interactiveEntities)??null,actionEntities:((q=n.declaration.dataType)==null?void 0:q.actionEntities)??null,isList:((Z=n.declaration.dataType)==null?void 0:Z.isList)||!1,andChildrenGroup:null,orChildrenGroup:null,asType:!0,entity:(b==null?void 0:b.toJSON())||null,like:!0,inferred:!0,parent:n.toReference()},H=z(ye,n.project);H.hydrateAncestors(),H.setParent(n,a),H.initChildren(a),H.setEntity(b,a),a==null||a.add(H,G.Added),l.push(H),n.setDataType(H,a)}return(se=n.dataType)==null||se.metaSync({inferred:!0,like:!1,asType:!0,options:((Q=n.declaration.dataType)==null?void 0:Q.options)||null,implementationChooseOne:((ue=n.declaration.dataType)==null?void 0:ue.implementationChooseOne)||!1,staticEntities:((re=n.declaration.dataType)==null?void 0:re.staticEntities)??null,interactiveEntities:((_e=n.declaration.dataType)==null?void 0:_e.interactiveEntities)??null,actionEntities:((X=n.declaration.dataType)==null?void 0:X.actionEntities)??null,isList:((Ee=n.declaration.dataType)==null?void 0:Ee.isList)||!1},a),(de=n.dataType)==null||de.setEntity(b,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-entity-to-match-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}syncDataToValidateInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-data-to-validate-input-map-data-type"))){var I,V,B;const l=[],p=[],t=[],m=[];if(((I=n.declaration)==null?void 0:I.id)!==fe.operation[Wt.Validate].inputs.dataToValidate.id)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(n.parent);if(!v)return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!n.dataType){const K={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,isList:!1,andChildrenGroup:null,orChildrenGroup:null,staticEntities:null,interactiveEntities:null,actionEntities:null,asType:!1,entity:null,like:!0,inferred:!0,parent:n.toReference()},q=z(K,n.project);q.setParent(n,a),q.initChildren(a),a==null||a.add(q,G.Added),l.push(q),n.setDataType(q,a)}(V=n.dataType)==null||V.metaSync({inferred:!0,like:!0,asType:!1},a);const _=this.getEntityToMatch(v,a);return(B=n.dataType)==null||B.setEntity(_,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-data-to-validate-input-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}syncOutputDataOutputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"sync-output-data-output-map-data-type"))){var V,B,K;const l=[],p=[],t=[],m=[];if(((V=n.declaration)==null?void 0:V.id)!==fe.operation[Wt.Validate].outputs.outputEntity.id)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const v=this.getEntityToMatchInputMap(n.parent);if(!v)return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};if(!this.getEntityToMatch(v,a))return a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:[],added:[],removed:[],affected:[],self:null};const _=this.project.requestActiveValue(v),I=(_==null?void 0:_.valueAsTypeSingle)||null;if(!n.dataType){const q={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:(a==null?void 0:a.author)||P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,parentRelationType:null,options:null,implementationChooseOne:!1,staticEntities:null,interactiveEntities:null,actionEntities:null,isList:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:(I==null?void 0:I.toJSON())||null,like:!0,inferred:!0,parent:n.toReference()},Z=z(q,n.project);Z.hydrateAncestors(),Z.setParent(n,a),Z.initChildren(a),Z.setEntity(I,a),a==null||a.add(Z,G.Added),l.push(Z),n.setDataType(Z,a)}return(B=n.dataType)==null||B.metaSync({inferred:!0,like:!0,asType:!1},a),(K=n.dataType)==null||K.setEntity(I,a),n.dataType&&p.push(n.dataType),a==null||a.attemptAutoclose("sync-output-data-output-map-data-type",this.id),{updated:w(p),added:w(l),removed:w(t),affected:w(m),self:n.dataType}}inferInputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-input-map-data-type-validate-data"))){var p,t,m;if(((p=n.declaration)==null?void 0:p.id)===fe.operation[Wt.Validate].inputs.entityToMatch.id){const{added:v,updated:b,removed:_,affected:I}=this.syncEntityToMatchInputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:n.dataType}}if(((t=n.declaration)==null?void 0:t.id)===fe.operation[Wt.Validate].inputs.dataToValidate.id){const{added:v,updated:b,removed:_,affected:I}=this.syncDataToValidateInputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-input-map-data-type",this.id),{updated:w(b),added:w(v),removed:w(_),affected:w(I),self:n.dataType}}const l=(m=n.declaration)==null?void 0:m.getDataType(a);if(l&&l.isResolved)return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:l};if(n.readsValue){const v=xs(n.readsValue,a);return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:v}}return a==null||a.attemptAutoclose("infer-input-map-data-type-validate-data",this.id),{updated:[],added:[],removed:[],affected:[],self:null}}inferOutputMapDataType(n,a=this.project.addChangeSet(new F(this.project,P.sessionAuthor,N().toISOString(),this,!0,"infer-output-map-data-type-validate-data"))){var l;if(((l=n.declaration)==null?void 0:l.id)===fe.operation[Wt.Validate].outputs.outputEntity.id){const{added:p,updated:t,removed:m,affected:v}=this.syncOutputDataOutputMapDataType(n,a);return a==null||a.attemptAutoclose("infer-output-map-data-type-validate-data",this.id),{updated:w(t),added:w(p),removed:w(m),affected:w(v),self:n.dataType}}return{updated:[],added:[],removed:[],affected:[],self:null}}}class Wye extends Lt{constructor(d){super($m,d)}}class Yye extends Lt{constructor(d){super(Cm,d)}}class zye extends Lt{constructor(d){super(Pm,d)}}class Hye extends Lt{constructor(d){super(df,d)}}class Xye extends Lt{constructor(d){super(af,d)}}class Qye extends Lt{constructor(d){super(eu,d)}}function e0e(u){const d=[new Oj(u),new gj(u),new $j(u),new Sye(u),new Zye(u),new Jye(u),new Hye(u),new Wye(u),new zye(u),new Yye(u),new Xye(u),new Qye(u),new Lt(gm,u),new Lt(Dm,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.operationDeclarations=d,d}class Cj extends En{constructor(n){super(Jr,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Jr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Jr.abstract);g(this,"static",Jr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Jr,this.project=n,this.id=Jr.id,this.version=Jr.version,this.name=Jr.name,this.static=Jr.static,this.abstract=Jr.abstract,this.properties=this.initialData.properties.map(a=>{const l=z(a,this.project);return l.setParent(this,null),l.initChildren(null),l}),this.methods=this.initialData.methods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const l=z(a,this.project);return l.parent=this,l}),this.extends=this.initialData.extends.map(a=>z(a,this.project))}}var Pj=(u=>(u.StatusCodeMustBeNumber="status-code-must-be-number",u.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",u))(Pj||{});function Vj(u,d){const n=[];if(typeof d!="number"){const a=new xt({id:u.id+"--status-code-must-be-number",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number.`,issue:null,severity:S.Error,code:"status-code-must-be-number",entity:u});return n.push(a),{errors:n,override:d}}if(d<100){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});n.push(a)}if(d>599){const a=new xt({id:u.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${u.type} with id "${u.id}" has an invalid value "${d}". The value must be a number between 100 and 599.`,issue:null,severity:S.Error,code:"status-code-must-be-between-100-and-599",entity:u});n.push(a)}return{errors:n,override:d}}class Nj extends En{constructor(n){super(Vi,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Vi.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Vi.abstract);g(this,"static",Vi.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Vi,this.project=n,this.id=Vi.id,this.version=Vi.version,this.name=Vi.name,this.static=Vi.static,this.abstract=Vi.abstract,this.properties=this.initialData.properties.map(t=>{const m=z(t,this.project);return m.setParent(this,null),m.initChildren(null),m}),this.methods=this.initialData.methods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.abstractMethods=this.initialData.abstractMethods.map(t=>{const m=z(t,this.project);return m.parent=this,m}),this.extends=this.initialData.extends.map(t=>z(t,this.project));const a=this.properties.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(t,m)=>hU(t,m);const l=this.abstractMethods.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!l)throw new Error("Handler method not found in endpoint entity");const p=l.outputs.find(t=>t.id===fe["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.outputs.statusCode.id);if(!p)throw new Error("Status code output not found in handler method");p.codeNativeValueValidation=(t,m)=>Vj(t,m)}}const t0e="test_primitive_entities_export";class r0e extends En{constructor(n){super(Gr,n);g(this,"initialData");g(this,"id",Oe.PERSISTED_ENTITY);g(this,"version","1");g(this,"name",Oe.PERSISTED_ENTITY);g(this,"description",Gr.description);g(this,"type",f.BuiltInBaseEntity);g(this,"abstract",Gr.abstract);g(this,"static",Gr.static);g(this,"properties",[]);g(this,"methods",[]);g(this,"abstractMethods",[]);g(this,"extends",[]);g(this,"errors",[]);g(this,"project");this.initialData=Gr,this.project=n,this.id=Gr.id,this.version=Gr.version,this.name=Gr.name,this.static=Gr.static,this.abstract=Gr.abstract,this.properties=this.initialData.properties.map(l=>{const p=z(l,this.project);return p.setParent(this,null),p.initChildren(null),p}),this.methods=this.initialData.methods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.abstractMethods=this.initialData.abstractMethods.map(l=>{const p=z(l,this.project);return p.parent=this,p}),this.extends=this.initialData.extends.map(l=>z(l,this.project));const a=this.properties.find(l=>l.id===fe["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id);if(!a)throw new Error("Path property not found in endpoint entity");a._codeNativeValueValidation=(l,p)=>yU(l,p)}}function i0e(u){const d=[new Cj(u),new Nj(u),new r0e(u),new En(Df,u)];return d.forEach(n=>{u.subscribeBuiltInInstance(n)}),u.builtInBaseEntities=d,d}function s0e(u){const d=[new Ri(ke,u),new Ri(Bn,u),new Ri(nt,u),new Ri(bm,u),new Ri(Fr,u),new Ri(Un,u),new Ri(sn,u),new Ri(jn,u),new Ri(fl,u)];return d.forEach(n=>{u.subscribeBuiltInInstance(n)}),u.primitives=d,d}function n0e(u){const d=[new Lt($f,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.globalEventActionDescriptors=d,d}function a0e(u){const d=[new Lt(nu,u),new Lt(ca,u),new Lt(iu,u),new Lt(ml,u),new Lt(vl,u),new Lt(vf,u)];d.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarations=d;const n=[new Lt(Af,u),new Lt(su,u),new Lt(Tf,u),new Lt(qm,u),new Lt(Zm,u),new Lt(Ef,u)];return n.forEach(a=>{a.initChildren(null),u.subscribeBuiltInInstance(a)}),u.loopDeclarationsBodies=n,d}function o0e(u){const d=[new ks(Of,u),new ks(pv,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.valueDescriptors=d,d}function l0e(u){const d=[new Lt(yo,u),new Lt(Il,u)];return d.forEach(n=>{n.initChildren(null),u.subscribeBuiltInInstance(n)}),u.conditionDeclarations=d,d}const jo={},_y={},pp={empty:!1,enrich:!0,mock:!1,ignoreCache:!1,onFetch:async()=>null,manuallyInit:!1};function Lj(u,d={enrich:!0,shallowErrors:!1}){const n={enrich:!0,shallowErrors:!1,...d},{enrich:a,shallowErrors:l}=n,p=u.project,t=u.record,m=new Ga(p),v=new Set;t[p.id]=p,v.add(p.id);const b=N().toISOString();Object.values(t).forEach(V=>{!V||m.allBuiltInEntityIds.includes(V.id)||v.add(V.id)}),m.order=Array.from(v),m.flatRecord=t,m.orderEntities();const _=Dy(u.project);_.instances[p.id]=_;const I=a?_.addChangeSet(new F(_,P.sessionAuthor,b,_,!0,"project-init-from-fetch-result")):null;return m.visit(V=>{if(V.id===_.id)return;const B=z(V,_);try{B.hydrateAncestors(),B.addSelfToProject(null)}catch(K){if(l)console.error("Error hydrating ancestors: ",K);else throw K}}),a?(m.visit(V=>{if(V.id===_.id)return;const B=_.get(V.id);B&&B.afterAllChildrenInitialized(I)}),_.afterAllChildrenInitialized(I)):gy(_,b).forEach(B=>{B.remove({ignoreUpstream:!0},null)}),_.instancesList.forEach(V=>{V.previousVersion=null}),I==null||I.attemptAutoclose("project-init-from-fetch-result",_.id),_}async function d0e(u,d=pp){const n={...pp,...d};if(n.empty)return{data:{project:{id:u.id,type:f.Project,version:P.UUID.uuid(),createdAt:N().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,name:null,description:null,projects:[],entities:[],operations:[],functions:[],variableDeclarations:[],variableInstances:[],functionCalls:[],conditions:[],loops:[],searches:[],events:[]},record:{}}};if(n.mock){const l={...bE};return l.id=u.id,{data:{project:l,record:{}}}}return console.log("Fetching project from external API"),new Promise(async l=>{try{if(n.onFetch){const p=await n.onFetch(u.id);if(p){l({data:p});return}}else l({data:null})}catch(p){console.error("Error fetching project: ",p),l({data:null})}})}function Dy(u){const d=new P(u);return s0e(d),i0e(d),e0e(d),n0e(d),a0e(d),o0e(d),l0e(d),Array.from(new Set([...d.getAllBuiltInIds(),...bs()])).forEach(a=>{if(!d.builtInInstances[a]&&d.instances[a])d.builtInInstances[a]=d.instances[a],delete d.instances[a];else if(!d.builtInInstances[a])throw new Error(`Built in entity was not properly initialized: ${a}`)}),d.instances[d.id]=d,d}function gy(u,d){return u.instancesList.filter(a=>N(a.createdAt).isAfter(N(d)||!!a.previousVersion))}function u0e(u,{enrich:d}={enrich:!0}){const n=new Map,a=new Map,l=Array.from(new Set([...u.getAllBuiltInIds(),...bs()]));Object.keys(u.instances).forEach(_=>{if(l.includes(_)){n.set(_,_),a.set(_,_);return}const I=u.get(_);if(!wy(I,{...u.instances,...u.builtInInstances}).every(q=>!l.includes(q))){n.set(_,_),a.set(_,_);return}const K=P.UUID.uuid();n.set(_,K),a.set(K,_)});const p=N().toISOString(),t=u.toShallowJSON({seenEntityMaps:n});t.previousVersion=null,t.createdAt=p,t.version=P.UUID.uuid();const m=Dy(t);m.instances[m.id]=m;const v=d?m.addChangeSet(new F(m,P.sessionAuthor,p,m,!0,"project-clone")):null,b=new Ga(u);return b.visit(_=>{const I=_.toShallowJSON({seenEntityMaps:n});I.previousVersion=null,I.createdAt=p,I.version=P.UUID.uuid();const V=ip(I,PU(b.flatRecord,n));if(Object.keys(V.upstream).length){let K=!1;if(Object.keys(V.upstream).forEach(q=>{if(!K&&(!m.get(q)||m.getDeleted(q))){K=!0;return}}),K)return}const B=z(I,m);B.hydrateAncestors(),B.addSelfToProject(v),v==null||v.add(B,G.Added)}),d?(b.visit(_=>{if(_.id===m.id)return;const I=m.get(n.get(_.id));I&&I.afterAllChildrenInitialized(v)}),m.afterAllChildrenInitialized(v)):gy(m,p).forEach(I=>{I.remove({ignoreUpstream:!0},null)}),m.instancesList.forEach(_=>{_.previousVersion=null}),v==null||v.attemptAutoclose("project-clone",m.id),m}function Mj(u,{enrich:d}={enrich:!0}){const n=Dy(u),a=N().toISOString(),l=d?n.addChangeSet(new F(n,P.sessionAuthor,a,n,!0,"project-init")):null;l&&(l.type=jT.Automatic);const p=new Ga(u);return p.visit(t=>{const m=z(t,n);m.hydrateAncestors(),m.addSelfToProject(l)}),d?(p.visit(t=>{if(t.id===n.id)return;const m=n.get(t.id);m&&m.afterAllChildrenInitialized(l)}),n.afterAllChildrenInitialized(l)):(gy(n,a).forEach(v=>{v.remove({ignoreUpstream:!0},null)}),new Ga(n).visit(v=>{v.initialized=!0,v.captureVersion()})),n.initialized=!0,l==null||l.attemptAutoclose("project-init",n.id),n}async function c0e(u,d=pp){const n={...pp,...d};if(u.id&&jo[u.id]&&!n.ignoreCache)return jo[u.id];if(u.id&&_y[u.id]&&!n.ignoreCache)return await _y[u.id],jo[u.id];const a=d0e(u,n);u.id&&(_y[u.id]=a);const l=await a;if(l.data){let p;return n.mock?p=Mj(bE,{enrich:!!n.enrich}):l.data instanceof P?p=l.data:p=Lj(l.data,{enrich:!!n.enrich}),jo[u.id]=p,u.id&&delete _y[u.id],p}return null}function p0e(u){return jo[u.id]&&delete jo[u.id],null}C.AI_VALUE_CONNECTION_GENERATION_ACTION_EXPLANATION=hb,C.ALL_BUILT_IN_BASE_ENTITIES=BC,C.ALL_BUILT_IN_CONDITION_ENTITIES=zC,C.ALL_BUILT_IN_GLOBAL_EVENT_ENTITIES=XC,C.ALL_BUILT_IN_LOOP_BODY_ENTITIES=uO,C.ALL_BUILT_IN_LOOP_ENTITIES=dO,C.ALL_BUILT_IN_OPERATION_ENTITIES=Ag,C.ALL_BUILT_IN_PRIMITIVE_ENTITIES=d1,C.ALL_BUILT_IN_TOP_LEVEL_ENTITIES=sP,C.ALL_BUILT_IN_VALUE_DESCRIPTORS=iP,C.ActionDescriptorState=Lt,C.ActionInputMapState=The,C.ActionOutputMapState=Ihe,C.AppendToListOperationInputIds=v_,C.AppendToListOperationOutputIds=E_,C.ArgumentDeclarationDependencyField=S3,C.ArgumentDeclarationState=ea,C.BREAK_AND_CONTINUE_STATEMENTS_RETURN_DECLARATIONS_EXPLANATION=ub,C.BUILT_IN_BASE_ENTITY_IDS=fe,C.BUILT_IN_ENTITY_TYPES=Pi,C.BaseCanvasDraggableState=Bye,C.BaseEntityNames=Oe,C.BaseState=Mye,C.BaseValueDescriptorIds=pl,C.BreakStatementDependencyField=J3,C.BreakStatementState=Ba,C.BuiltInBaseEntityState=En,C.CACHED_PROJECTS_BY_ID=jo,C.CALLABLE_ENTITIES_EXPLANATION=Ohe,C.CALLABLE_TYPES=tn,C.CALLER_ENTITIES_EXPLANATION=X3,C.CALLER_TYPES=rn,C.CALLS_UPDATE_EXPLANATION=ja,C.CHILDREN_TYPES=o7,C.COMPARISON_CONDITIONS=WC,C.CONDITIONS=YC,C.CUSTOM_ENTITY_OPERATIONS=xD,C.CallableEntityClass=jye,C.CallerEntityClass=Lb,C.ChangeSet=F,C.ChangeSetChangeCaptureType=jT,C.ChangeSetEntityChangeType=G,C.ChildEntityBaseClass=Uye,C.CommonStringValidationErrorCodes=fU,C.ComparisonOperatorTypes=fr,C.ConditionDependencyField=bM,C.ConditionState=Ca,C.ContinueStatementDependencyField=hM,C.ContinueStatementState=Qr,C.CreateNewInputIds=fD,C.CreateNewOutputIds=hD,C.DRAGGABLE_CALLABLE_TYPES=Tm,C.DRAGGABLE_CALLER_TYPES=t1,C.DRAGGABLE_ELEMENT_TYPES=nf,C.DRAGGABLE_EXECUTABLE_TYPES=n7,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES=sf,C.DRAGGABLE_PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=Em,C.DataTypeCompatibilityTypes=ms,C.DataTypeDependencyField=xT,C.DataTypeParentChildRelation=xr,C.DataTypeState=ji,C.DefinitionEntityDependencyField=Ry,C.DefinitionEntityState=ia,C.EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS=Nye,C.ENTITIES_WITH_VALLUES_EXPLANATION=dy,C.ENTITY_PERSISTANCE_OPTIONS_DEFAULTS=oe,C.ENTITY_RECUSION_OPTIONS_DEFAULTS=Ce,C.ENTITY_TYPES=a7,C.ENTITY_WITH_DECLARATION_TYPES=i7,C.ENTITY_WITH_LOGIC_SCOPE_TYPES=br,C.ENTITY_WITH_NAMES_TYPES=r1,C.ENTITY_WITH_PARENT_TYPES=t7,C.ENTITY_WITH_USER_MANAGED_DECLARATION_TYPES=Qw,C.ENTITY_WITH_USER_MANAGED_SINGLE_IMPLEMENTS_TYPES=r7,C.ENTITY_WITH_VALUE_TYPES=vm,C.ENTRY_POINT_ENTITIES_EXPLANATION=Qc,C.ENTRY_POINT_TYPES=Xt,C.EVENT_TYPES=cl,C.EXECUTABLE_TYPES=s7,C.EXECUTION_OPERATIONS=pD,C.EndpointEntity=Nj,C.EntityAction=Dj,C.EntityError=xt,C.EntityErrorSeverity=S,C.EntityGenerationError=Y,C.EntityGenerationErrorCode=k,C.EntityInstanceErrorCode=me,C.EntityOperations=Wt,C.EntityType=f,C.EntityWithLogicScopeClass=Kye,C.EntityWithValueClass=Gye,C.EntryPointEntityClass=xye,C.Events=Mb,C.ExecutionOperations=Jt,C.ExecutionTerminationType=vM,C.FunctionCallDependencyField=dU,C.FunctionCallState=Fa,C.FunctionDeclarationDependencyField=aM,C.FunctionDeclarationState=_a,C.GET_PROJECT_OPTIONS_DEFAULTS=pp,C.GLOBAL_EVENT_DECLARATIONS=HC,C.GetLastInListOperationInputIds=n_,C.GetLastInListOperationOutputIds=a_,C.GlobalEventNames=Mn,C.GlobalEventState=$a,C.HTTPOperations=Hr,C.HTTPStatucCodeValidationErrorCodes=Pj,C.HTTP_OPERATIONS=Tg,C.InputMapDependencyField=G3,C.InputMapState=Es,C.InstalledProjectState=La,C.InternalCallDependencyField=x3,C.InternalCallState=Ma,C.JoinListOperationInputIds=_R,C.JoinListOperationOutputIds=DR,C.LIST_OPERATIONS=P_,C.ListOperations=it,C.LiteralValueDependencyField=rM,C.LiteralValueState=Fs,C.LoopDependencyField=EM,C.LoopState=Oa,C.LoopTypes=Be,C.NON_INTERACTIVE_BASE_ENTITIES_EXPLANATION=xa,C.NUMBER_OPERATIONS=x1,C.NumberOperations=Ht,C.OPERATION_DECLARATIONS=bg,C.OperationDependencyField=dM,C.OperationState=Da,C.OutputMapDependencyField=k3,C.OutputMapParentChildRelation=ul,C.OutputMapState=Ks,C.PARENT_AUTO_CALCULATION_FROM_CALLER_EXPLANATION=uy,C.PASS_THROUGH_CALLABLE_ENTITIES_EXPLANATION=Ua,C.PASS_THROUGH_CALLABLE_TYPES=dr,C.PASS_THROUGH_CALLABLE_TYPES_WITH_OUTPUTS=e1,C.PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION=fb,C.ParallelExecutionOperation=gj,C.PassThroughCallableEntityClass=Fye,C.PersistedEntity=Cj,C.PersistedEntityMethods=Wi,C.PrimitiveEntityState=Ri,C.PrimitiveTypes=ee,C.ProjectState=P,C.ProjectStateEvents=ar,C.PropertyDependencyField=sM,C.PropertyState=Xn,C.READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY=Rj,C.RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION=Che,C.ReturnDeclarationDependencyField=cM,C.ReturnDeclarationState=wi,C.ReturnStatementDependencyField=FT,C.ReturnStatementState=ga,C.SQLAST=che,C.STANDALONE_CONDITIONS=xC,C.STRING_OPERATIONS=RR,C.ScopeCompatibilityType=Ay,C.SearchDependencyField=M3,C.SearchState=Na,C.SequentialExecutionOperation=Oj,C.SequentialExecutionOperationInputIds=Q_,C.SequentialExecutionOperationOutputIds=eD,C.SharedEntityErrorCode=le,C.SharedStateFunctionality=wj,C.SplitListOperationInputIds=GR,C.SplitListOperationOutputIds=KR,C.StandaloneOperatorTypes=ps,C.StringOperations=ut,C.TERMINATION_TYPES=sr,C.Traverser=Ga,C.USER_MANAGED_ENTITY_TYPES=i1,C.UserManagedEntityStateTemplate=Lye,C.VALUE_READING_ENTITIES_EXPLANATION=pb,C.VALUE_READING_TYPES=ua,C.VALUE_WRITING_ENTITIES_EXPLANATION=Q3,C.VALUE_WRITING_TYPES=Tr,C.VARIABLE_DATA_TYPE_INFERRANCE_EXPLANATION=cb,C.VARIABLE_TYPES=lr,C.ValueAutogenerationType=Er,C.ValueDescriptorDependencyField=Y3,C.ValueDescriptorParentChildRelation=ie,C.ValueDescriptorState=ks,C.ValueReadingEntityClass=up,C.ValueWritingEntityClass=cp,C.VariableDeclarationDependencyField=wM,C.VariableDeclarationState=Va,C.VariableInputMapState=Ehe,C.VariableInstanceDependencyField=KT,C.VariableInstanceState=Pa,C.VariableOutputMapState=Ahe,C.WaitOperation=$j,C.WaitOperationInputIds=Z_,C.WaitOperationOutputIds=J_,C.actionDescriptorValidation=bpe,C.appendToListOperation=df,C.appendToListOperationElementToAppendArgument=Nm,C.appendToListOperationElementToAppendArgumentParentRef=D_,C.appendToListOperationElementToAppendArgumentRef=A_,C.appendToListOperationError=C_,C.appendToListOperationErrorParentRef=O_,C.appendToListOperationListArgument=Vm,C.appendToListOperationListArgumentParentRef=__,C.appendToListOperationListArgumentRef=T_,C.appendToListOperationListDataType=b_,C.appendToListOperationResultListDataType=R_,C.appendToListOperationResultListReturn=$_,C.appendToListOperationResultListReturnParentRef=g_,C.appendToListOperationResultListReturnRef=w_,C.appendToListOperationSecondListDataType=I_,C.applyNewScope=Me,C.argumentDeclarationValidation=whe,C.asGenerationActionExample=vn,C.booleanPrototype=Bn,C.breakStatementValidation=Rhe,C.calculateNewParentBasedOnCallers=Ab,C.capitalizeFirstLetter=kr,C.changeSetJSONRecordToUniqueIds=spe,C.checkAreDataTypesCompatible=vs,C.checkAreDefinitionEntitiesCompatibleAsDataType=BL,C.checkArePropertiesCompatibleAsDataType=ML,C.checkExtendsBaseEntity=Iy,C.checkHasBaseEntity=As,C.checkHasMetadataChanged=cr,C.checkImplementationsOverlap=ra,C.checkImplementsBaseEntity=dye,C.checkIsBranchDependentButNotDirectlyOnBranch=tp,C.checkIsBranchDependentOnBranch=khe,C.checkIsBuiltIn=Nb,C.checkIsCallableEntityReachable=dp,C.checkIsCanvasEntity=oye,C.checkIsDefEntityInlineDeclaredForSearchOutputType=nb,C.checkIsDetachedBranch=cj,C.checkIsDetachedBranchShallow=Pb,C.checkIsGlobalVariable=nye,C.checkIsGloballyDeclared=Cb,C.checkIsMethod=hj,C.checkIsNestedScope=by,C.checkScopeCompatibility=lp,C.cloneProject=u0e,C.conditionValidation=Ape,C.continueStatementValidation=mpe,C.convertToAbstract=xhe,C.convertToNonAbstract=Fhe,C.convertToNonStatic=Khe,C.convertToStatic=Ghe,C.countedLoopActionDescriptor=nu,C.countedLoopActionDescriptorDynamicReturnDeclaration=tO,C.countedLoopActionDescriptorDynamicReturnDeclarationParentRef=eO,C.countedLoopActionDescriptorStringArgumentDeclaration=Q$,C.countedLoopActionDescriptorStringArgumentDeclarationDataType=H$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValue=Y$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeDefaultValueParentRef=W$,C.countedLoopActionDescriptorStringArgumentDeclarationDataTypeParentRef=z$,C.countedLoopActionDescriptorStringArgumentDeclarationParentRef=X$,C.countedLoopBodyActionDescriptor=Af,C.countedLoopBodyActionDescriptorAnyDynamicArgument=aO,C.countedLoopBodyActionDescriptorAnyDynamicArgumentParentRef=nO,C.countedLoopBodyActionDescriptorAnyDynamicReturn=lO,C.countedLoopBodyActionDescriptorAnyDynamicReturnParentRef=oO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Wm,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=iO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=rO,C.countedLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=sO,C.createDefinitionEntityFromJSONObject=yy,C.createEntityError=tt,C.createNestedDataTypeForEntity=pU,C.createNewInstanceOperation=lo,C.createNewInstanceOperationEntityToInstanciateArgument=ID,C.createNewInstanceOperationEntityToInstanciateArgumentRef=TD,C.createNewInstanceOperationEntityToInstanciateDataType=bD,C.createNewInstanceOperationError=DD,C.createNewInstanceOperationErrorParentRef=_D,C.createNewInstanceOperationNewEntityDataArgument=ED,C.createNewInstanceOperationNewEntityDataArgumentDataType=vD,C.createNewInstanceOperationNewEntityDataArgumentDataTypeParentRef=mD,C.createNewInstanceOperationNewEntityDataArgumentParentRef=yD,C.createNewInstanceOperationOutputEntityDeclaration=RD,C.createNewInstanceOperationOutputEntityDeclarationParentRef=wD,C.createNewInstanceOperationRef=AD,C.createSemanticId=WL,C.createStateFromGenerationTargetType=Vye,C.createStateFromType=er,C.createStateFromTypeAndSubscribe=z,C.cronJobBuiltInBaseEntity=Df,C.cronJobBuiltInBaseEntityExpressionProperty=LC,C.cronJobBuiltInBaseEntityExpressionPropertyDataTypeRef=y7,C.cronJobBuiltInBaseEntityExpressionPropertyRef=VC,C.cronJobBuiltInBaseEntityRef=NC,C.cronJobTriggeredFunctionDeclarationBlueprint=lv,C.cronJobTriggeredFunctionDeclarationBlueprintParentRef=CC,C.dataTypeCompatibilityToErrorExplanation=oU,C.dataTypeValidation=upe,C.datePrototype=sn,C.dateValueAutogenerationSchema=_E,C.definitionEntityToZodSchema=bP,C.definitionEntityValidation=$ye,C.deletePersistedEntityMethod=ov,C.deletePersistedEntityMethodParentRef=yC,C.deleteRootProject=p0e,C.endpointBuiltInBaseEntity=Vi,C.endpointBuiltInBaseEntityRef=hO,C.endpointBuiltInBaseEntityRefFour=zO,C.endpointBuiltInBaseEntityRefThree=wO,C.endpointBuiltInBaseEntityRefTwo=TO,C.endpointBuiltInCorsProperty=yO,C.endpointBuiltInCorsPropertyDataType=fO,C.endpointBuiltInCorsPropertyDataTypeRef=cO,C.endpointBuiltInCorsPropertyRef=pO,C.endpointBuiltInMethodProperty=zm,C.endpointBuiltInMethodPropertyDataType=IO,C.endpointBuiltInMethodPropertyDataTypeRef=bO,C.endpointBuiltInMethodPropertyRef=AO,C.endpointBuiltInPathProperty=Ym,C.endpointBuiltInPathPropertyDataType=EO,C.endpointBuiltInPathPropertyDataTypeRef=mO,C.endpointBuiltInPathPropertyRef=vO,C.endpointPathParamsArgumentDeclaration=Xm,C.endpointPathParamsArgumentDeclarationRef=NO,C.endpointPathParamsVariableDataType=LO,C.endpointPathParamsVariableDataTypeRef=VO,C.endpointReachedTriggerActionDescriptor=sv,C.endpointReachedTriggerActionDescriptorRef=MO,C.endpointReachedTriggerActionDescriptorRefFour=jO,C.endpointReachedTriggerActionDescriptorRefThree=UO,C.endpointReachedTriggerActionDescriptorRefTwo=BO,C.endpointRequestBodyArgumentDeclaration=ev,C.endpointRequestBodyArgumentDeclarationRef=gO,C.endpointRequestBodyVariableDataType=$O,C.endpointRequestHeadersArgumentDeclaration=Hm,C.endpointRequestHeadersArgumentDeclarationRef=_O,C.endpointRequestHeadersVariableDataType=DO,C.endpointRequestHeadersVariableDataTypeRef=RO,C.endpointRequestQueryParamsArgumentDeclaration=Qm,C.endpointRequestQueryParamsArgumentDeclarationRef=CO,C.endpointRequestQueryParamsVariableDataType=PO,C.endpointRequestQueryParamsVariableDataTypeRef=OO,C.endpointResponseBodyDataType=WO,C.endpointResponseBodyReturnDeclaration=iv,C.endpointResponseBodyReturnDeclarationRef=JO,C.endpointResponseCodeDataType=FO,C.endpointResponseCodeReturnDeclaration=tv,C.endpointResponseCodeReturnDeclarationDefaultValueParentRef=KO,C.endpointResponseCodeReturnDeclarationRef=xO,C.endpointResponseHeadersDataType=SO,C.endpointResponseHeadersDataTypeRef=kO,C.endpointResponseHeadersReturnDeclaration=rv,C.endpointResponseHeadersReturnDeclarationRef=qO,C.endpointReturnStatementRef=GO,C.endpointReturnStatementRefThree=YO,C.endpointReturnStatementRefTwo=ZO,C.enrichFromKnownEntities=rp,C.enumOptionsProperty=l1,C.enumOptionsPropertyDataType=a1,C.enumOptionsPropertyDataTypeRef=s1,C.enumOptionsPropertyRef=n1,C.enumPrototype=Un,C.enumPrototypeRef=o1,C.executionBuiltInBaseEntity=gf,C.executionBuiltInEntityAbortMethod=dv,C.executionBuiltInEntityAbortMethodParentRef=MC,C.filterOutDuplicateEntities=w,C.filterOutDuplicateErrors=Eoe,C.findEntityFromKeys=Eb,C.findReferenceToSelfInList=CU,C.findReferencesToSelfInProject=Xhe,C.flattenActionDescriptor=VU,C.flattenArgumentDeclaration=NU,C.flattenBreakStatement=LU,C.flattenBuiltInBaseEntity=MU,C.flattenCalls=Ts,C.flattenCanvasAncestorsUntil=ad,C.flattenCondition=BU,C.flattenContinueStatement=UU,C.flattenDataType=xU,C.flattenDefinitionEntity=jU,C.flattenDefinitionEntityExtensionAndImplementationTypes=Ty,C.flattenDefinitionEntityExtensionTypes=np,C.flattenDefinitionEntityExtensions=Db,C.flattenDefinitionEntityImplementations=gb,C.flattenDefinitionEntityImplementionTypes=sp,C.flattenDerivedCanvasEntities=Fi,C.flattenDetachedBranch=fj,C.flattenElementCalls=at,C.flattenElementCallsOnTheSameScope=Hhe,C.flattenEntity=ae,C.flattenFunctionCall=FU,C.flattenFunctionDeclaration=GU,C.flattenGlobalEvent=KU,C.flattenInputMap=kU,C.flattenInstalledProject=qU,C.flattenInternalCall=SU,C.flattenLiteralValue=ZU,C.flattenLoop=JU,C.flattenOperation=WU,C.flattenOutputMap=YU,C.flattenPrimitiveEntity=zU,C.flattenProject=HU,C.flattenProjectElements=OU,C.flattenProperty=XU,C.flattenRelatedCanvasElementsOnTheLeft=uj,C.flattenRelatedCanvasElementsOnTheRight=dj,C.flattenReturnDeclaration=QU,C.flattenReturnStatement=ej,C.flattenSearch=tj,C.flattenValueDescriptor=rj,C.flattenVariableDeclaration=ij,C.flattenVariableInstance=sj,C.flattenVariableReads=$U,C.flattenVariableWrites=gU,C.flattenVariables=kt,C.fromChangeSetToRecordChangeSet=yye,C.fromLiteralValueTypeToPrimitiveType=ib,C.fromZodParseToEntityGenerationErrors=ob,C.functionCallValidation=jhe,C.functionDeclarationValidation=dpe,C.generate=E9,C.generateActionExample=Phe,C.generateExecutionDataType=Yce,C.generateIdFromStrategy=hr,C.generateMutablePropertiesExplanation=ay,C.generateRandomBoolean=ZP,C.generateRandomDate=RP,C.generateRandomDateAfter=AP,C.generateRandomDateBefore=IP,C.generateRandomDateBetweenRange=wP,C.generateRandomNumber=GP,C.generateRandomNumberAfter=jP,C.generateRandomNumberBefore=xP,C.generateRandomNumberBetweenRange=FP,C.generateRandomText=SP,C.generateRandomTextAfter=KP,C.generateRandomTextBefore=kP,C.generateRandomTextBetweenRange=qP,C.generateUniqueUUID=UP,C.getAllActionDescriptorsForConditions=fy,C.getAllActionDescriptorsForGlobalEvents=cy,C.getAllActionDescriptorsForLoops=py,C.getAllActionDescriptorsForOperations=Mhe,C.getAllBuiltInEntityIds=bs,C.getAllGloballyDeclaredFunctionDeclarationsExplanation=sU,C.getBaseBuiltInEntities=hi,C.getBaseSchemaBasedOnType=z3,C.getBuiltInEntityOwner=ka,C.getCallableEntityReferenceSchema=Kr,C.getCallableEntityTypeSchema=wN,C.getCalledBy=is,C.getCallerEntityReferenceSchema=Ide,C.getCallerEntityTypeSchema=Ade,C.getCalls=wb,C.getCanvasEntitiesDerivedFromInternalCalls=lj,C.getCanvasEntitiesDerivedFromWrites=od,C.getCanvasEntityDerivedFromValueReadingEntity=Ey,C.getCanvasEntityDerivedFromValueReadingEntityFromTransfer=oj,C.getCanvasEntityReferenceSchema=xde,C.getCanvasEntityTypeSchema=jde,C.getChildrenEntityWithValues=She,C.getColumnProperties=ld,C.getCommonAncestor=Ib,C.getCommonChildren=mU,C.getDatabaseEntities=cye,C.getDatabaseEntity=fye,C.getDeclaration=Mo,C.getDeclarationOutputedError=vye,C.getDeepestScope=mj,C.getDefaultRelationalDatabaseEntityOrFirst=Ej,C.getDraggableCallableEntityReferenceSchema=_N,C.getDraggableCallableEntityTypeSchema=RN,C.getDraggableCallerEntityReferenceSchema=Rde,C.getDraggableCallerEntityTypeSchema=wde,C.getDraggableExecutableEntityReferenceSchema=$de,C.getDraggableExecutableEntityTypeSchema=gde,C.getDraggablePassThroughCallableEntityReferenceSchema=Bh,C.getDraggablePassThroughCallableEntityTypeSchema=Mh,C.getDraggablePlayableEntityReferenceSchema=Nde,C.getDraggablePlayableEntityTypeSchema=Vde,C.getEntitiesCreatedSinceInitialization=gy,C.getEntityArgumentDeclarations=_b,C.getEntityInputMaps=nj,C.getEntityOutputMaps=rye,C.getEntityReferenceSchema=Ude,C.getEntityReturnDeclarations=aj,C.getEntityTypeSchema=Bde,C.getEntityWithLogicScopeReferenceSchema=Yn,C.getEntityWithLogicScopeTypeSchema=Ode,C.getEntityWithValueReferenceSchema=IN,C.getEntityWithValueTypeSchema=bde,C.getEntryPointEntityReferenceSchema=Br,C.getEntryPointEntityTypeSchema=Ia,C.getEventEntityReferenceSchema=Nh,C.getEventEntityTypeSchema=Vh,C.getExecutableEntityReferenceSchema=Dde,C.getExecutableEntityTypeSchema=_de,C.getExtendedBuiltInEntity=iye,C.getExtendedDefinitionEntity=Ob,C.getFirstNonLoopScopeOwner=Rr,C.getGenerationTargetSchemaBasedOnType=H3,C.getHeadIfPartOfDetachedBranch=pj,C.getHighestScope=yj,C.getImplementedBuiltInEntity=sye,C.getIsInteractive=ap,C.getLastInListOperation=Pm,C.getLastInListOperationError=m_,C.getLastInListOperationErrorParentRef=y_,C.getLastInListOperationInputListArgument=p_,C.getLastInListOperationInputListArgumentParentRef=c_,C.getLastInListOperationInputListArgumentRef=o_,C.getLastInListOperationInputListDataType=l_,C.getLastInListOperationOutputElementDataType=u_,C.getLastInListOperationOutputElementReturn=h_,C.getLastInListOperationOutputElementReturnParentRef=f_,C.getLastInListOperationOutputElementReturnRef=d_,C.getLinkedEntitiesFromArgumentDeclaration=zhe,C.getLowestPersistedEntityImplementation=$b,C.getParentCallableEntity=vU,C.getParentCallerEntity=TU,C.getParentCanvasEntities=ei,C.getParentCanvasEntity=Pr,C.getParentCanvasEntityFromTransfer=my,C.getParentEntryPoint=qhe,C.getParentPassthroughCallableEntity=EU,C.getPassThroughCallableEntityReferenceSchema=Qt,C.getPassThroughCallableEntityTypeSchema=Lh,C.getPeristedEntities=uye,C.getPlayableEntityReferenceSchema=Pde,C.getPlayableEntityTypeSchema=Cde,C.getProject=c0e,C.getPrototypeByType=op,C.getRecusriveParentsIds=wy,C.getReferenceEntityId=W,C.getReferencedEntitiesStateOrErrors=ly,C.getReferencedEntityStateOrErrors=lb,C.getReferencedIds=ip,C.getRelatedCanvasElementsOnTheLeft=Uo,C.getRelatedCanvasElementsOnTheLeftFromTransfer=Qhe,C.getRelatedCanvasElementsOnTheRight=Ka,C.getRootEntryPointScopeOwner=Vb,C.getScopeOwner=yi,C.getStateClassFromType=hye,C.getTerminationReferenceSchema=Mde,C.getTerminationTypeSchema=Lde,C.getTopLevelParentEntityId=Tj,C.getTouchedCanvasEntitiesFromChangeSet=mye,C.getUsedArgFromDeclaration=eye,C.getUsedReturnFromDeclaration=tye,C.getValueReadingEntityReferenceSchema=AN,C.getValueReadingEntityTypeSchema=Wn,C.getValueWritingEntityReferenceSchema=Tde,C.getValueWritingEntityTypeSchema=ku,C.getVariableFromInputMapping=AU,C.getVariableFromReturnVariablePointer=RU,C.getVariableReferenceSchema=Aa,C.getVariableTypeSchema=Oo,C.getVariablesFromArgumentDeclarations=vy,C.getVariablesFromInputMaps=IU,C.getVariablesFromOutputMapping=_U,C.getVariablesFromOutputMaps=DU,C.getVariablesFromReturnDeclarations=wU,C.getVariablesInSameOrHigherScope=CT,C.getWrites=Rb,C.globalEventValidation=vpe,C.groupCallsBasedOnParallelizableExecution=Jhe,C.handleAfterEntityImplementationSideEffects=cU,C.handleBeforeEntityImplementationSideEffects=uU,C.httpRequestBodyArgument=ff,C.httpRequestBodyArgumentRef=XD,C.httpRequestBodyDataType=QD,C.httpRequestHeadersArgument=pf,C.httpRequestHeadersArgumentRef=zD,C.httpRequestHeadersDataType=HD,C.httpRequestMethodArgument=uf,C.httpRequestMethodArgumentRef=WD,C.httpRequestMethodDataType=YD,C.httpRequestMethodDataTypeRef=ZD,C.httpRequestOperation=tu,C.httpRequestOperationErrorValueDescriptor=xm,C.httpRequestOperationErrorValueDescriptorDatatype=Eg,C.httpRequestOperationErrorValueDescriptorRef=vg,C.httpRequestOperationRef=fg,C.httpRequestOperationRefEight=yg,C.httpRequestOperationRefFive=cg,C.httpRequestOperationRefFour=ug,C.httpRequestOperationRefNine=mg,C.httpRequestOperationRefSeven=hg,C.httpRequestOperationRefSix=pg,C.httpRequestOperationRefThree=dg,C.httpRequestOperationRefTwo=lg,C.httpRequestQueryParamsArgument=jm,C.httpRequestQueryParamsArgumentRef=qD,C.httpRequestQueryParamsDataType=SD,C.httpRequestVariableURLArgument=cf,C.httpRequestVariableURLArgumentRef=KD,C.httpRequestVariableURLDataType=kD,C.httpRequestVariableURLDataTypeRef=FD,C.httpResponseBodyReturnDataType=og,C.httpResponseBodyReturnDataTypeRef=ng,C.httpResponseBodyReturnReturn=mf,C.httpResponseBodyReturnReturnRef=ag,C.httpResponseCodeDataType=tg,C.httpResponseCodeReturn=hf,C.httpResponseCodeReturnRef=eg,C.httpResponseHeadersDataType=sg,C.httpResponseHeadersDataTypeRef=rg,C.httpResponseHeadersReturn=yf,C.httpResponseHeadersReturnRef=ig,C.httpStatusCodeValueValidation=Vj,C.implement=hy,C.inferArgumentDeclarationDataType=UL,C.inferDataType=xs,C.inferInputMapDataType=gT,C.inferOutputMapDataType=OT,C.inferPropertyDataType=FL,C.inferReturnDeclarationDataType=$T,C.inferValueDescriptorDataType=GL,C.inferVariableDeclarationDataType=xL,C.inferVariableInstanceDataType=jL,C.initBaseProjectEntity=Dy,C.initProject=Mj,C.initProjectFromFetchResult=Lj,C.inputMapValidation=vhe,C.installedProjectValidation=yhe,C.internalCallValidation=mhe,C.isPromise=vb,C.isUUID=YL,C.iterateOverListActionDescriptorListArgumentDeclaration=Xg,C.iterateOverListActionDescriptorListArgumentDeclarationDataType=zg,C.iterateOverListActionDescriptorListArgumentDeclarationDataTypeParentRef=Yg,C.iterateOverListActionDescriptorListArgumentDeclarationParentRef=Hg,C.iterateOverListLoopActionDescriptor=ca,C.iterateOverListLoopActionDescriptorDynamicReturnDeclaration=e$,C.iterateOverListLoopActionDescriptorDynamicReturnDeclarationParentRef=Qg,C.iterateOverListLoopBodyActionDescriptor=su,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgument=d$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicArgumentParentRef=l$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturn=c$,C.iterateOverListLoopBodyActionDescriptorAnyDynamicReturnParentRef=u$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclaration=bf,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=r$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=t$,C.iterateOverListLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=i$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclaration=o$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=n$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=s$,C.iterateOverListLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=a$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclaration=m$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataType=h$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationDataTypeParentRef=f$,C.iterateOverObjectKeysActionDescriptorObjectArgumentDeclarationParentRef=y$,C.iterateOverObjectKeysLoopActionDescriptor=ml,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclaration=E$,C.iterateOverObjectKeysLoopActionDescriptorDynamicReturnDeclarationParentRef=v$,C.iterateOverObjectKeysLoopBodyActionDescriptor=qm,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgument=g$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicArgumentParentRef=D$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturn=O$,C.iterateOverObjectKeysLoopBodyActionDescriptorAnyDynamicReturnParentRef=$$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclaration=km,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=b$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=T$,C.iterateOverObjectKeysLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=A$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclaration=_$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=w$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=I$,C.iterateOverObjectKeysLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=R$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclaration=L$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataType=V$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationDataTypeParentRef=P$,C.iterateOverObjectValuesActionDescriptorObjectArgumentDeclarationParentRef=N$,C.iterateOverObjectValuesLoopActionDescriptor=vl,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclaration=B$,C.iterateOverObjectValuesLoopActionDescriptorDynamicReturnDeclarationParentRef=M$,C.iterateOverObjectValuesLoopBodyActionDescriptor=Zm,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgument=S$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicArgumentParentRef=q$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturn=J$,C.iterateOverObjectValuesLoopBodyActionDescriptorAnyDynamicReturnParentRef=Z$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Sm,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=j$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=U$,C.iterateOverObjectValuesLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=x$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclaration=k$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=G$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=F$,C.iterateOverObjectValuesLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=K$,C.iterateOverStringActionDescriptorDynamicReturnDeclaration=Ug,C.iterateOverStringActionDescriptorDynamicReturnDeclarationParentRef=Bg,C.iterateOverStringActionDescriptorStringArgumentDeclaration=Mg,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataType=Ng,C.iterateOverStringActionDescriptorStringArgumentDeclarationDataTypeParentRef=Vg,C.iterateOverStringActionDescriptorStringArgumentDeclarationParentRef=Lg,C.iterateOverStringLoopActionDescriptor=iu,C.iterateOverStringLoopBodyActionDescriptor=Tf,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgument=Sg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicArgumentParentRef=qg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturn=Jg,C.iterateOverStringLoopBodyActionDescriptorAnyDynamicReturnParentRef=Zg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclaration=Gm,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataType=xg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationDataTypeParentRef=jg,C.iterateOverStringLoopBodyActionDescriptorCurrentValueArgumentDeclarationParentRef=Fg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclaration=Km,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataType=Kg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationDataTypeParentRef=Gg,C.iterateOverStringLoopBodyActionDescriptorIterationNumberArgumentDeclarationParentRef=kg,C.joinListOperation=$m,C.joinListOperationError=FR,C.joinListOperationErrorParentRef=xR,C.joinListOperationFirstListArgument=LR,C.joinListOperationFirstListArgumentParentRef=NR,C.joinListOperationFirstListArgumentRef=gR,C.joinListOperationFirstListDataType=$R,C.joinListOperationResultListDataType=VR,C.joinListOperationResultListReturn=jR,C.joinListOperationResultListReturnParentRef=UR,C.joinListOperationResultListReturnRef=PR,C.joinListOperationSecondListArgument=BR,C.joinListOperationSecondListArgumentParentRef=MR,C.joinListOperationSecondListArgumentRef=OR,C.joinListOperationSecondListDataType=CR,C.joinListWithLastSeparator=Ke,C.joinStringsOperation=eu,C.joinStringsOperationDynamicStringArgument=aR,C.joinStringsOperationDynamicStringArgumentParentRef=nR,C.joinStringsOperationDynamicStringArgumentRef=iR,C.joinStringsOperationDynamicStringDataType=sR,C.joinStringsOperationError=rR,C.joinStringsOperationErrorParentRef=tR,C.joinStringsOperationFirstStringArgument=of,C.joinStringsOperationFirstStringArgumentParentRef=Z1,C.joinStringsOperationFirstStringArgumentRef=F1,C.joinStringsOperationFirstStringDataType=G1,C.joinStringsOperationResultStringDataType=S1,C.joinStringsOperationResultStringReturn=Qd,C.joinStringsOperationResultStringReturnParentRef=eR,C.joinStringsOperationResultStringReturnRef=q1,C.joinStringsOperationSecondStringArgument=lf,C.joinStringsOperationSecondStringArgumentParentRef=Q1,C.joinStringsOperationSecondStringArgumentRef=K1,C.joinStringsOperationSecondStringDataType=k1,C.joinStringsOperationSeparatorStringArgument=X1,C.joinStringsOperationSeparatorStringArgumentParentRef=H1,C.joinStringsOperationSeparatorStringArgumentRef=J1,C.joinStringsOperationSeparatorStringDataType=z1,C.joinStringsOperationSeparatorStringDataTypeDefaultValue=Y1,C.joinStringsOperationSeparatorStringDataTypeDefaultValueParentRef=W1,C.keyValuePrototype=fl,C.literalValueValidation=npe,C.loopValidation=Tpe,C.lowercaseFirstLetter=Qu,C.manualFlowActionDescriptorDeclarationArgumentDeclaration=Fm,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataType=_g,C.manualFlowActionDescriptorDeclarationArgumentDeclarationDataTypeParentRef=Rg,C.manualFlowActionDescriptorDeclarationArgumentDeclarationParentRef=Dg,C.manualFlowLoopActionDescriptor=vf,C.manualFlowLoopActionDescriptorDynamicReturnDeclaration=wg,C.manualFlowLoopActionDescriptorDynamicReturnDeclarationParentRef=Ig,C.manualFlowLoopBodyActionDescriptor=Ef,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgument=$g,C.manualFlowLoopBodyActionDescriptorAnyDynamicArgumentParentRef=gg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturn=Cg,C.manualFlowLoopBodyActionDescriptorAnyDynamicReturnParentRef=Og,C.mapActionDescriptorToTypeItRepresents=lye,C.mapRecord=PU,C.mergeEntityErrorsList=Toe,C.mergeListOfEntities=aye,C.methodDefaultValue=JD,C.mockClientProject=bE,C.moreThanOrEqualCondition=Il,C.moreThanOrEqualConditionLeftHandArgument=kC,C.moreThanOrEqualConditionLeftHandArgumentDataType=GC,C.moreThanOrEqualConditionLeftHandArgumentDataTypeParentRef=FC,C.moreThanOrEqualConditionLeftHandArgumentParentRef=KC,C.moreThanOrEqualConditionRightHandArgument=JC,C.moreThanOrEqualConditionRightHandArgumentDataType=SC,C.moreThanOrEqualConditionRightHandArgumentDataTypeParentRef=qC,C.moreThanOrEqualConditionRightHandArgumentParentRef=ZC,C.noSpacesOrDashesValueValidation=yU,C.noSpacesValueValidation=hU,C.notEmptyCondition=yo,C.notEmptyConditionArgument=jC,C.notEmptyConditionRef=UC,C.nullPrototype=bm,C.numberAdditionOperation=af,C.numberAdditionOperationDynamicSummandArgument=I1,C.numberAdditionOperationDynamicSummandArgumentType=A1,C.numberAdditionOperationDynamicSummandArgumentTypeParentRef=b1,C.numberAdditionOperationError=T1,C.numberAdditionOperationErrorParentRef=E1,C.numberAdditionOperationFirstNumberArgument=Am,C.numberAdditionOperationFirstNumberArgumentRef=u1,C.numberAdditionOperationFirstNumberDataType=c1,C.numberAdditionOperationRef=m1,C.numberAdditionOperationRefThree=wm,C.numberAdditionOperationRefTwo=v1,C.numberAdditionOperationResultNumberDataType=y1,C.numberAdditionOperationResultNumberReturn=Rm,C.numberAdditionOperationResultNumberReturnRef=h1,C.numberAdditionOperationSecondNumberArgument=Im,C.numberAdditionOperationSecondNumberArgumentRef=p1,C.numberAdditionOperationSecondNumberDataType=f1,C.numberPrototype=nt,C.numberSubtractionOperation=Dm,C.numberSubtractionOperationDynamicSubtrahendArgument=j1,C.numberSubtractionOperationDynamicSubtrahendArgumentType=U1,C.numberSubtractionOperationDynamicSubtrahendArgumentTypeParentRef=B1,C.numberSubtractionOperationError=M1,C.numberSubtractionOperationErrorParentRef=L1,C.numberSubtractionOperationFirstNumberArgument=O1,C.numberSubtractionOperationFirstNumberArgumentRef=w1,C.numberSubtractionOperationFirstNumberDataType=R1,C.numberSubtractionOperationRef=_m,C.numberSubtractionOperationRefThree=V1,C.numberSubtractionOperationRefTwo=C1,C.numberSubtractionOperationResultNumberDataType=$1,C.numberSubtractionOperationResultNumberReturn=N1,C.numberSubtractionOperationResultNumberReturnRef=g1,C.numberSubtractionOperationSecondNumberArgument=P1,C.numberSubtractionOperationSecondNumberArgumentRef=_1,C.numberSubtractionOperationSecondNumberDataType=D1,C.numberValueAutogenerationSchema=RE,C.operationValidation=fpe,C.outputMapValidation=bhe,C.parallelExecutionOperation=Vs,C.parallelExecutionOperationError=S_,C.parallelExecutionOperationErrorParentRef=q_,C.parallelExecutionOperationListOfExecutionResultsDataType=G_,C.parallelExecutionOperationListOfExecutionResultsReturn=Mm,C.parallelExecutionOperationListOfExecutionResultsReturnRef=F_,C.parallelExecutionOperationListOfFunctionsArgument=Lm,C.parallelExecutionOperationListOfFunctionsArgumentDatatype=x_,C.parallelExecutionOperationListOfFunctionsArgumentRef=j_,C.parallelExecutionOperationListOfFunctionsBlueprint=U_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInput=M_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicInputParentRef=L_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutput=N_,C.parallelExecutionOperationListOfFunctionsBlueprintDynamicOutputParentRef=V_,C.parallelExecutionOperationListOfFunctionsBlueprintParentRef=B_,C.parallelExecutionOperationRef=K_,C.parallelExecutionOperationRefThree=k_,C.persistedBuiltInBaseEntity=Jr,C.persistedBuiltInBaseEntityDatabaseProperty=Tl,C.persistedBuiltInBaseEntityDatabasePropertyDataType=EC,C.persistedBuiltInBaseEntityDatabasePropertyDataTypeRef=p7,C.persistedBuiltInBaseEntityDatabasePropertyParentRef=TC,C.persistedBuiltInBaseEntityDatabasePropertyRef=vC,C.persistedBuiltInBaseEntityPrimaryKeyProperty=bl,C.persistedBuiltInBaseEntityPrimaryKeyPropertyDataType=gC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOption=AC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyNumberDataTypeOptionParentRef=bC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyParentRef=$C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyRef=DC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOption=wC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyStringDataTypeOptionParentRef=IC,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOption=_C,C.persistedBuiltInBaseEntityPrimaryKeyPropertyUUIDDataTypeOptionParentRef=RC,C.printEntity=bb,C.processOutputGlobalValueDescriptorDataType=eP,C.processOutputGlobalValueDescriptorReturn=Of,C.processOutputGlobalValueDescriptorReturnRef=QC,C.projectPublicationCompletedGlobalEvent=$f,C.propertyToZodSchema=TP,C.propertyValidation=tpe,C.relationalDatabaseBuiltInBaseEntity=Gr,C.relationalDatabaseBuiltInBaseEntityAutoscalingProperty=av,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataType=fC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyDataTypeRef=pC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyParentRef=hC,C.relationalDatabaseBuiltInBaseEntityAutoscalingPropertyRef=cC,C.relationalDatabaseBuiltInBaseEntityDefaultProperty=nv,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataType=uC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyDataTypeRef=lC,C.relationalDatabaseBuiltInBaseEntityDefaultPropertyRef=dC,C.relationalDatabaseBuiltInBaseEntityIdentifierProperty=If,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataType=QO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyDataTypeRef=HO,C.relationalDatabaseBuiltInBaseEntityIdentifierPropertyRef=XO,C.relationalDatabaseBuiltInBaseEntityMinSizeProperty=_f,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataType=oC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyDataTypeRef=nC,C.relationalDatabaseBuiltInBaseEntityMinSizePropertyRef=aC,C.relationalDatabaseBuiltInBaseEntityPasswordProperty=Rf,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataType=iC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDataTypeRef=c7,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyDefaultValueParentRef=sC,C.relationalDatabaseBuiltInBaseEntityPasswordPropertyRef=rC,C.relationalDatabaseBuiltInBaseEntityRef=El,C.relationalDatabaseBuiltInBaseEntityUsernameProperty=wf,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataType=tC,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyDataTypeRef=u7,C.relationalDatabaseBuiltInBaseEntityUsernamePropertyRef=eC,C.resolveActionDescriptorName=JL,C.resolveBaseEntityName=kL,C.resolveBuiltInBaseEntityDataTypeLabel=qL,C.resolveClonedEntityProject=yr,C.resolveConditionOperatorLabel=Zh,C.resolveDataType=qh,C.resolveDataTypeEntityOrNestedChildrenFromLiteralValue=Tb,C.resolveDataTypeLabel=Xl,C.resolveDefinitionEntityDataTypeLabel=Xce,C.resolveEntityDataTypeLabel=Hce,C.resolveEntityName=pe,C.resolveFirstCallsSecond=Whe,C.resolveFirstWritesSecond=Yhe,C.resolvePersistedDefinitionEntityDatabaseEntity=vj,C.resolvePrimaryKeyProperty=pye,C.resolvePrimitiveEntityForSearchLiteralValueType=sb,C.resolvePrimitiveEntityName=ZL,C.resolveSearchName=SL,C.resolveVariableScope=zce,C.returnDeclarationValidation=hpe,C.returnStatementValidation=ype,C.searchStatementErrorGlobalValueDescriptor=pv,C.searchStatementErrorGlobalValueDescriptorDataType=rP,C.searchStatementErrorGlobalValueDescriptorRef=tP,C.searchStatementState=phe,C.searchStatementUtils=hhe,C.searchValidation=Rpe,C.sequentialExecutionOperation=Fn,C.sequentialExecutionOperationError=cD,C.sequentialExecutionOperationErrorParentRef=uD,C.sequentialExecutionOperationListOfExecutionResultsDataType=oD,C.sequentialExecutionOperationListOfExecutionResultsReturn=Um,C.sequentialExecutionOperationListOfExecutionResultsReturnParentRef=dD,C.sequentialExecutionOperationListOfExecutionResultsReturnRef=aD,C.sequentialExecutionOperationListOfFunctionsArgument=Bm,C.sequentialExecutionOperationListOfFunctionsArgumentDatatype=nD,C.sequentialExecutionOperationListOfFunctionsArgumentParentRef=lD,C.sequentialExecutionOperationListOfFunctionsArgumentRef=sD,C.sequentialExecutionOperationListOfFunctionsBlueprint=iD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicInput=rD,C.sequentialExecutionOperationListOfFunctionsBlueprintDynamicOutput=tD,C.softDeletePersistedEntityMethod=f7,C.softDeletePersistedEntityMethodParentRef=OC,C.sortCallsBasedOnExecutionDependencies=bU,C.sortChildrenEntitiesBasedOnExecutionDependencies=Zhe,C.splitListOperation=Cm,C.splitListOperationError=s_,C.splitListOperationErrorParentRef=i_,C.splitListOperationFirstOutputListDataType=JR,C.splitListOperationFirstOutputListReturn=QR,C.splitListOperationFirstOutputListReturnParentRef=XR,C.splitListOperationFirstOutputListReturnRef=Om,C.splitListOperationInputListArgument=YR,C.splitListOperationInputListArgumentParentRef=WR,C.splitListOperationInputListArgumentRef=kR,C.splitListOperationInputListDataType=qR,C.splitListOperationSecondOutputListDataType=e_,C.splitListOperationSecondOutputListReturn=r_,C.splitListOperationSecondOutputListReturnParentRef=t_,C.splitListOperationSplitIndexArgument=HR,C.splitListOperationSplitIndexArgumentParentRef=zR,C.splitListOperationSplitIndexArgumentRef=SR,C.splitListOperationSplitIndexDataType=ZR,C.splitStringOperation=gm,C.splitStringOperationError=wR,C.splitStringOperationErrorParentRef=IR,C.splitStringOperationFirstPartResultStringDataType=pR,C.splitStringOperationFirstPartResultStringReturn=AR,C.splitStringOperationFirstPartResultStringReturnParentRef=bR,C.splitStringOperationFirstPartResultStringReturnRef=cR,C.splitStringOperationIndexArgument=ER,C.splitStringOperationIndexArgumentParentRef=vR,C.splitStringOperationIndexArgumentRef=dR,C.splitStringOperationIndexDataType=uR,C.splitStringOperationSecondPartResultStringDataType=hR,C.splitStringOperationSecondPartResultStringReturn=l7,C.splitStringOperationSecondPartResultStringReturnParentRef=TR,C.splitStringOperationSecondPartResultStringReturnRef=fR,C.splitStringOperationStringArgument=mR,C.splitStringOperationStringArgumentParentRef=yR,C.splitStringOperationStringArgumentRef=oR,C.splitStringOperationStringDataType=lR,C.stringPrototype=ke,C.stringValueAutogenerationSchema=wE,C.suggestNewIdForEntity=UT,C.syncSearchEntityOutput=ab,C.test_primitive_entities_export=t0e,C.toCamelCase=Ra,C.toEntityState=ss,C.toKebabCase=KL,C.toLowerCaseKebabCase=Sh,C.toPascalCase=Hl,C.untypedDataPrototype=Fr,C.updateErrorsList=qt,C.urlDefaultValue=GD,C.uuidPrototype=jn,C.validateArgumentDeclarationName=MT,C.validateCalledByErrorIdInAction=Nhe,C.validateCalledByIdInAction=Vhe,C.validateCallers=iU,C.validateConditionEntityDeclaration=Bhe,C.validateDataOperation=uo,C.validateDataOperationDataToValidateArgument=CD,C.validateDataOperationDataToValidateArgumentParentRef=OD,C.validateDataOperationDataToValidateArgumentRef=gD,C.validateDataOperationDataToValidateDataType=$D,C.validateDataOperationEntityToMatchTypeArgument=LD,C.validateDataOperationEntityToMatchTypeArgumentParentRef=ND,C.validateDataOperationEntityToMatchTypeArgumentRef=PD,C.validateDataOperationEntityToMatchTypeDataType=VD,C.validateDataOperationError=jD,C.validateDataOperationErrorParentRef=UD,C.validateDataOperationOutputEntityDeclaration=BD,C.validateDataOperationOutputEntityDeclarationParentRef=MD,C.validateDefinitionEntityName=PT,C.validateEntryCaller=rU,C.validateErrorCaller=tU,C.validateFunctionCallDeclaration=nU,C.validateFunctionDeclarationName=VT,C.validateGeneratedEntityParentIsNotBuiltInEntity=$he,C.validateGeneration=Dhe,C.validateGenerationTarget=ur,C.validateGenerationUpdate=ghe,C.validateLoopEntityDeclaration=Uhe,C.validateName=Qce,C.validateOperationEntityDeclaration=aU,C.validatePropertyName=LT,C.validateReachability=ta,C.validateReadsValueInActionPayload=Lhe,C.validateReferenceObject=oy,C.validateReferenceToOne=db,C.validateReferences=Cr,C.validateReturnDeclarationName=BT,C.validateSuccessCaller=eU,C.validateValueReaderGenerationUpdate=ep,C.validateValueWritter=yb,C.validateVariableDeclarationName=NT,C.validateVariableInternalCallUse=mb,C.valueAutogenerationCurrentDateAndTimeSchema=eN,C.valueAutogenerationGenericSchema=vh,C.valueAutogenerationOptions=DE,C.valueAutogenerationOptionsSchema=Q4,C.valueAutogenerationRandomBooleanSchema=IE,C.valueAutogenerationRandomDateBetweenSchema=dN,C.valueAutogenerationRandomDateFromSchema=oN,C.valueAutogenerationRandomDateSchema=bh,C.valueAutogenerationRandomDateUntilSchema=lN,C.valueAutogenerationRandomNumberBetweenSchema=iN,C.valueAutogenerationRandomNumberFromSchema=tN,C.valueAutogenerationRandomNumberSchema=Eh,C.valueAutogenerationRandomNumberUntilSchema=rN,C.valueAutogenerationRandomSchema=Bu,C.valueAutogenerationRandomTextBetweenSchema=aN,C.valueAutogenerationRandomTextFromSchema=sN,C.valueAutogenerationRandomTextSchema=Th,C.valueAutogenerationRandomTextUntilSchema=nN,C.valueAutogenerationRangeValueTypesSchema=Mu,C.valueAutogenerationUniqueSchema=AE,C.valueDescriptorValidation=_he,C.variableDeclarationValidation=Ipe,C.variableInstanceValidation=wpe,C.waitOperation=mi,C.waitOperationMillisecondsNumberArgument=oo,C.waitOperationMillisecondsNumberArgumentRef=W_,C.waitOperationMillisecondsNumberDataType=Y_,C.waitOperationOperationError=X_,C.waitOperationOperationErrorParentRef=H_,C.waitOperationRef=z_,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.6335",
3
+ "version": "0.0.6336",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",