@elyx-code/project-logic-tree 0.0.6776 → 0.0.6777
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.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -84,7 +84,7 @@ You can update the existing 'literal-value' with the 'update' action, for exampl
|
|
|
84
84
|
}
|
|
85
85
|
}\`\`\`
|
|
86
86
|
Or 'delete' and then 'post' actions to replace it.`})):i.push(new De({id:`${o.id}--${o.parent}--${se.InvalidParentReference}`,code:se.InvalidParentReference,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", has a parent reference that isn't pointing to an entity of type 'input-map' or 'data-type'.`})):i.push(new De({id:`${o.id}--${o.parent}--${se.ReferencedEntityNotFound}`,code:se.ReferencedEntityNotFound,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", is referencing an entity with id "${o.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}else i.push(new De({id:`${o.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}" is missing a 'parent' reference. The 'parent' of a literal value entity must be a reference to an entity of type 'input-map' or 'data-type'.`}));else return i.push(new De({id:`${o.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}" is missing a 'parent' reference. The 'parent' of a literal value entity must be a reference to an entity of type 'input-map' or 'data-type'.`})),i;if(o.valueAsTypeSingle){const c=[],e=[],y=o.valueAsTypeSingle;Array.isArray(y)?y.forEach(m=>{typeof m=="string"?e.push(m):c.push(m)}):typeof y=="string"?e.push(y):c.push(y),c.forEach(m=>{const v=a1(m);i.push(...v),v.length===0&&e.push(m.entityId)}),e.forEach(m=>{const v=p.get(m);v?[d.DefinitionEntity,d.BuiltInBaseEntity].includes(v.type)||i.push(new De({id:`${o.id}--${m}--${se.InvalidImplementsReference}`,code:se.InvalidImplementsReference,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", has an 'valueAsTypeSingle' reference that isn't pointing to an entity of type 'definition-entity', 'function-declaration' or 'operation'.`})):i.push(new De({id:`${o.id}--${m}--${se.ReferencedEntityNotFound}`,code:se.ReferencedEntityNotFound,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", is referencing an entity with id "${m}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))})}return i}var PCe=(o=>(o.ValueAsTypeSingle="value-as-type-single",o.ValueAsTypeList="value-as-type-list",o))(PCe||{});const hi=class hi extends Kr{constructor(i,r){super(i);I(this,"initialData");I(this,"type",d.LiteralValue);I(this,"id");I(this,"name");I(this,"autogeneration",null);I(this,"value",null);I(this,"valueAsTypeSingle",null);I(this,"valueAsTypeList",null);I(this,"errors",[]);I(this,"parent");I(this,"standaloneParent");I(this,"project");I(this,"detachedDependents",{});I(this,"knownVersions",null);I(this,"activeVersion",!1);I(this,"initialized",!1);I(this,"startedInitialization",!1);I(this,"standalone",!1);if(this.initialData=i,this.project=r,this.id=i.id,this.name=i.name,this.autogeneration=i.autogeneration,this.value=i.value,!this.name)throw new Error("[LiteralValueState.constructor] Must have a name in the initial data passed to the constructor")}static new(i=null){return{id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(i==null?void 0:i.timestamp)||L().toISOString(),author:(i==null?void 0:i.author)||x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:"",autogeneration:null,value:null,valueAsTypeSingle:null,valueAsTypeList:null,parent:null}}static fromGenerationTarget(i,r){const a=ne(i.parent),c=r.get(a);let e=null,y=null;i.valueAsTypeList?Array.isArray(i.valueAsTypeList)&&(y=i.valueAsTypeList.map(E=>r.get(E)||r.getBuiltIn(E))):i.valueAsTypeSingle&&(e=r.get(i.valueAsTypeSingle)||r.getBuiltIn(i.valueAsTypeSingle));const m={id:i.id,version:x.UUID.uuid(),createdAt:L().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:i.name,autogeneration:i.autogeneration,valueAsTypeSingle:e,valueAsTypeList:y,value:i.value||null,parent:c},v=me(m,r);return v.setParent(c,null),v}static validateGenerationTarget(i,r){let a=JSON.parse(JSON.stringify(i));const c=[],e=tbi(a,r);return c.push(...e,...$r(a)),{errors:c,modifiedData:a}}get valueAsType(){return this.valueAsTypeSingle?this.valueAsTypeSingle:this.valueAsTypeList?this.valueAsTypeList:null}get isFinal(){return!!(this.parent.type===d.Property&&(this.parent.constant||this.parent.implements.some(i=>i.constant))||this.parent.type===d.Property&&this.parent.parent.type===d.DefinitionEntity&&!wf(this.parent.parent))}validateGeneratedUpdate(i){const r=[];return i.parent&&r.push(new De({id:`${this.id}--${se.InvalidParentUpdate}`,code:se.InvalidParentUpdate,severity:ce.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
|
|
87
|
-
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`})),{errors:r,modifiedData:i}}subscribeDependents(i){return i.forEach(r=>{this.detachedDependents[r.entity.id]||(this.detachedDependents[r.entity.id]=r)}),this}unsubscribeDependents(i){return i.forEach(r=>{this.detachedDependents[r.entity.id]&&delete this.detachedDependents[r.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"sync-dependents"))){const r=[],a=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);r.push(...m.updated),a.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,r,a){const c=[],e=[],y=[],m=[];return r==="value-as-type-single"&&(this.valueAsTypeSingle=null,a==null||a.add(this,H.Updated)),r==="value-as-type-list"&&(this.valueAsTypeList=(this.valueAsTypeList||[]).filter(v=>v.id!==i.id),a==null||a.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,r,a){const c=[],e=[],y=[],m=[];return r==="value-as-type-single"&&(this.valueAsTypeSingle=i,a==null||a.add(this,H.Updated)),r==="value-as-type-list"&&(this.valueAsTypeList=[...Array.isArray(this.valueAsTypeList||[])?this.valueAsTypeList:[],i],a==null||a.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this.valueAsTypeSingle&&this.valueAsTypeSingle.type!==d.BuiltInBaseEntity&&this.valueAsTypeSingle.unsubscribeDependents([{entity:this,field:"value-as-type-single"}]),this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&this.valueAsTypeList.forEach(i=>{i.type!==d.BuiltInBaseEntity&&i.unsubscribeDependents([{entity:this,field:"value-as-type-list"}])}),this}subscribeToDependencies(){return!this.valueAsTypeSingle&&!this.valueAsTypeList?this:(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.forEach(i=>{i.type!==d.BuiltInBaseEntity&&i.subscribeDependents([{entity:this,field:"value-as-type-list"}])}):this.valueAsTypeSingle&&this.valueAsTypeSingle.type!==d.BuiltInBaseEntity&&this.valueAsTypeSingle.subscribeDependents([{entity:this,field:"value-as-type-single"}]),this)}increaseVersion(i){if(i&&!L(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&L(i).isSame(L(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=L(i).toISOString()||L().toISOString(),this)}captureVersion(){var r;const i=((r=this.knownVersions)==null?void 0:r.get(this.version))||new hi(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.valueAsTypeSingle=this.valueAsTypeSingle,i.valueAsTypeList=this.valueAsTypeList?[...this.valueAsTypeList]:this.valueAsTypeList,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const r=[],a=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);r.push(this.parent,...y.updated),a.push(...y.added),c.push(...y.removed)}return{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const r=[],a=[],c=[],e=[];if(this.version===i)return{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,V]of b.knownVersions)v.set(w,V);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new hi(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.valueAsTypeSingle=y.valueAsTypeSingle,this.parent=y.parent,{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,r))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,r),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,i.parent&&i.standaloneParent)throw new Error(`Entity with id '${this.id}' cannot have both 'parent' and 'standaloneParent' properties set.`);if(i.parent){const a=ne(i.parent),c=this.project.get(a),e=this.parent;if(e&&e.id!==(c==null?void 0:c.id)&&this.removeFromParent(r),c)this.setParent(c,r),this.addSelfToProject(r);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${a}' that isn't found in the project`)}else if(i.standaloneParent){const a=ne(i.standaloneParent),c=this.project.get(a);if(c)this.setStandaloneParent(c,r);else throw new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${a}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.valueAsTypeList&&Array.isArray(i.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],i.valueAsTypeList.forEach(a=>{const c=ne(a),e=this.project.get(c);e&&this.addValueAsTypeToList(e,r)}),[...this.valueAsTypeList].forEach(a=>{(i.valueAsTypeList||[]).find(e=>ne(e)===a.id)||this.removeValueAsTypeFromList(a,r)}),this.setValueAsTypeSingle(null,r),this.metaSync({value:null},r);else if(i.valueAsTypeSingle){const a=ne(i.valueAsTypeSingle),c=this.project.get(a);c&&(this.setValueAsTypeSingle(c,r),this.setValueAsTypeList(null,r),this.metaSync({value:null},r))}else this.setValueAsTypeSingle(null,r),this.setValueAsTypeList(null,r);return this.captureVersion(),this.subscribeToDependencies(),r==null||r.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],r=[],a=[],c=[];if(this.initialData.parent&&this.initialData.standaloneParent)throw new Error(`Entity with id '${this.id}' cannot have both 'parent' and 'standaloneParent' properties set.`);if(this.initialData.parent){const e=ne(this.initialData.parent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting parent reference '${y.id}' for entity with id '${this.id}'`),this.setParent(y,null),i.push(y);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else if(this.initialData.standaloneParent){const e=ne(this.initialData.standaloneParent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating standalone parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting standalone parent reference '${y.id}' for entity with id '${this.id}'`),this.setStandaloneParent(y,null);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Standalone parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${e}' that isn't found in the project`)}else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Entity with id '${this.id}' must have a 'parent'`),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],this.initialData.valueAsTypeList.forEach(e=>{const y=ne(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=ne(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(r),removed:D(a),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return this.initialized=!0,this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"add-self-to-project"))){var y,m;const r=[this],a=[],c=[],e=[];return((y=this.parent)==null?void 0:y.type)===d.DataType?this.parent.setEntity(this,i):(m=this.parent)==null||m.setDefaultValue(this,i),e.push(this.parent),this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}setParent(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetParent))){var a;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,r)?(((a=this.parent)==null?void 0:a.id)!==(i==null?void 0:i.id)&&(this.parent=i,r&&(r==null||r.add(this,H.Updated))),r==null||r.attemptAutoclose(_.SetParent,this.id),this):this}setStandaloneParent(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetStandaloneParent))){var a;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetStandaloneParent,r)?(((a=this.standaloneParent)==null?void 0:a.id)!==(i==null?void 0:i.id)&&(this.standaloneParent=i,r&&(r==null||r.add(this,H.Updated))),r==null||r.attemptAutoclose(_.SetStandaloneParent,this.id),this):this}addValueAsTypeToList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.AddValueAsTypeToList))){return this.checkCanEdit(this,r)?((this.valueAsTypeList||[]).includes(i)||(this.valueAsTypeList=this.valueAsTypeList||[],this.valueAsTypeList.push(i),this.value!==null&&this.metaSync({value:null},r),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,r==null||r.add(this,H.Updated)),r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.AddValueAsTypeToList,this.id),this):(J.Logger.warn(`[addValueAsTypeToList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.AddValueAsTypeToList,this.id),this)}removeValueAsTypeFromList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveValueAsTypeFromList))){return this.checkCanEdit(this,r)?(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&(this.valueAsTypeList||[]).includes(i)&&(this.valueAsTypeList=this.valueAsTypeList.filter(a=>a.id!==i.id),this.valueAsTypeList.length===0?this.valueAsTypeList=null:(this.value!==null&&this.metaSync({value:null},r),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,r==null||r.add(this,H.Updated))),r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this):(J.Logger.warn(`[removeValueAsTypeFromList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this)}setValueAsTypeSingle(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsTypeSingle))){return this.checkCanEdit(this,r)?(this.valueAsTypeSingle!==i&&(this.valueAsTypeSingle=i,r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this):(J.Logger.warn(`[setValueAsTypeSingle] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this)}setValueAsTypeList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsTypeList))){var a,c;return this.checkCanEdit(this,r)?(!i&&this.valueAsTypeList?(this.valueAsTypeList=null,r==null||r.add(this,H.Updated)):i&&!this.valueAsTypeList?(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)):i&&this.valueAsTypeList&&((a=this.valueAsTypeList)==null?void 0:a.length)!==i.length?(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)):i&&this.valueAsTypeList&&((c=this.valueAsTypeList)!=null&&c.every((e,y)=>e!==i[y]))&&(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.SetValueAsTypeList,this.id),this):(J.Logger.warn(`[setValueAsTypeList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsTypeList,this.id),this)}setValueAsType(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsType))){return this.checkCanEdit(this,r)?i?(Array.isArray(i)?this.setValueAsTypeList(i,r):this.setValueAsTypeSingle(i,r),r==null||r.attemptAutoclose(_.SetValueAsType,this.id),this):(this.setValueAsTypeSingle(null,r),this.setValueAsTypeList(null,r),this):(J.Logger.warn(`[setValueAsType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsType,this.id),this)}initChildren(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.standalone){if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(r=>{if(r.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(r);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.entityType}' with id '${r.entityId}' that is not part of the project state.`);return c}const a=this.project.get(r.id);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.type}' with id '${r.id}' that is not part of the project state.`);return a});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const a=this.project.findSubscribedBuiltInInstanceFromReference(this.initialData.valueAsTypeSingle);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.entityType}' with id '${this.initialData.valueAsTypeSingle.entityId}' that is not part of the project state.`);return this.valueAsTypeSingle=a,this}const r=this.project.get(this.initialData.valueAsTypeSingle.id);if(!r)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.type}' with id '${this.initialData.valueAsTypeSingle.id}' that is not part of the project state.`);this.valueAsTypeSingle=r}return this}if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(r=>{if(r.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(r);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.entityType}' with id '${r.entityId}' that is not part of the project state.`);return c}const a=this.project.get(r.id);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.type}' with id '${r.id}' that is not part of the project state.`);return a});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const a=ne(this.initialData.valueAsTypeSingle),c=a?this.project.get(a):null;if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.entityType}' with id '${this.initialData.valueAsTypeSingle.entityId}' that is not part of the project state.`);return this.valueAsTypeSingle=c,this}const r=this.project.get(this.initialData.valueAsTypeSingle.id);if(!r)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.type}' with id '${this.initialData.valueAsTypeSingle.id}' that is not part of the project state.`);this.valueAsTypeSingle=r}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"meta-sync"))){const a=Mr(this,i,r),c=Lr(this,a),e=this.toMeta();return this.name=a.name!==void 0?a.name:e.name,this.autogeneration=a.autogeneration!==void 0?a.autogeneration:e.autogeneration,this.value=a.value!==void 0?a.value:e.value,super.baseMetaSync(a,this,r),a.deleted===!0&&!e.deleted?r==null||r.add(this,H.Removed):a.deleted===!1&&e.deleted?r==null||r.add(this,H.Added):c&&(r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=ke,...r){return await hi.repository.APILoad(this.id,...r),this}async APICreate(i=ke,...r){return await hi.repository.APICreate(this.toShallowJSON(),...r),this}async APIUpdate(i=ke,...r){return await hi.repository.APIUpdate(this.toShallowJSON(),...r),this}async APIDelete(i=ke,...r){return await hi.repository.APIDelete(this.toShallowJSON(),...r),this}async APIClone(i=ke,...r){return await hi.repository.APIClone(this.id,...r),this}async APILoadVersion(i=ke,r,...a){return await hi.repository.APILoadVersion(this.id,r,...a)}removeFromParent(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return this.parent&&(this.parent.type===d.DataType?this.parent.setEntity(null,i):Tg.includes(this.parent.type)&&this.parent.setDefaultValue(null,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(r),removed:D(a),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,r))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),r==null||r.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:Ri.ActionOwnerEntityNonDeletable,rootAction:((m=r==null?void 0:r.self)==null?void 0:m.id)===this.id&&(r==null?void 0:r.autoCloseActionName)===_.RemoveEntity}),r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const a=[],c=[],e=[],y=[];if(r!=null&&r.hasRemoved(this.id))return r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},r),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,r);a.push(...E),c.push(...b),e.push(...w)}),!i){const v=this.removeFromParent(r);e.push(...v.added),a.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(a),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return i!=null&&i.hasAdded(this.id)?(i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);a.push(...m),c.push(...v),r.push(...E)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(r),updated:D(a),removed:D(c),affected:D(e),self:this})}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlat(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlat(i)):[]])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatIds(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatIds(i)):[]])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,value:this.value,autogeneration:this.autogeneration,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){var r,a,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsTypeSingle:((r=this.valueAsTypeSingle)==null?void 0:r.toJSON(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(e=>e.toJSON(i)):null,parent:(a=this.parent)==null?void 0:a.toReference(),standaloneParent:(c=this.standaloneParent)==null?void 0:c.toReference()})}toJSONClone(i=tt){var a,c,e,y,m,v,E;let r;return(a=i.seenEntityMaps)!=null&&a.has(this.id)?r=i.seenEntityMaps.get(this.id):(r=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,r)),(c=i.seenEntities)!=null&&c.has(r)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(r),(m=i.seenEntities)==null||m.add(this.id),{id:r,version:x.UUID.uuid(),createdAt:i.timestamp||L().toISOString(),previousVersion:null,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsTypeSingle:this.valueAsTypeSingle?this.project.getBuiltIn(this.valueAsTypeSingle.id)?this.valueAsTypeSingle.toJSON():this.valueAsTypeSingle.toJSONClone({...i,newId:null}):null,valueAsTypeList:this.valueAsTypeSingle&&Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(b=>this.project.getBuiltIn(b.id)?b.toJSON(i.seenEntities):b.toJSONClone({...i,newId:null})):null,parent:(v=this.parent)==null?void 0:v.toReference({seenEntityMaps:i.seenEntityMaps}),standaloneParent:(E=this.standaloneParent)==null?void 0:E.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=tt){var a;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:r,version:this.version,entityType:this.type}}toShallowJSON(i=tt){var a,c,e,y;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,valueAsTypeSingle:((c=this.valueAsTypeSingle)==null?void 0:c.toReference(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(m=>m.toReference(i)):null,value:this.value,autogeneration:this.autogeneration,parent:(e=this.parent)==null?void 0:e.toReference(i),standaloneParent:(y=this.standaloneParent)==null?void 0:y.toReference(i)}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatJSON(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatJSON(i)):[]])}toGenerationTarget(i=tt){var a,c,e,y;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r,type:this.type,name:this.name,valueAsTypeSingle:((c=this.valueAsTypeSingle)==null?void 0:c.id)||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(m=>m.id):null,value:this.value,autogeneration:this.autogeneration,parent:(e=this.parent)==null?void 0:e.id,standaloneParent:(y=this.standaloneParent)==null?void 0:y.id}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatGenerationTarget(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatGenerationTarget(i)):[]])}clearErrors(){return this.errors=[],this}validate(){return this.errors=VCe(this),{success:!0}}async validateAsync(i={}){const r=J.YieldTracker.from(i);return this.errors=await _Ce(this,{tracker:r}),{success:!0}}getErrors(){return[...this.errors]}async getErrorsAsync(i={}){const r=J.YieldTracker.from(i),a=[...this.errors];return await r.tick(),a}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.CloneEntity)),r=null,a=null,c=!0){const e=Rr(r,this),y=this.toJSON(),m=a||x.UUID.uuid();y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||L().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0;const v=Si(y,e);return v.hydrateAncestors(),r&&v.setParent(r,i),c&&(v.subscribe(),v.addSelfToProject(i)),i==null||i.add(v,H.Added),v.initChildren(i),i==null||i.attemptAutoclose(_.CloneEntity,this.id),v}merge(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"merge-literal-value"))){const a=[],c=[],e=[],y=[];return this.valueAsTypeSingle!==(i==null?void 0:i.valueAsTypeSingle)&&(this.setValueAsType(i.valueAsTypeSingle,r),a.push(this)),this.valueAsTypeList!==i.valueAsTypeList&&(this.setValueAsTypeList(i.valueAsTypeList,r),a.push(this)),this.value!==i.value&&(this.metaSync({value:i.value},r),a.push(this)),this.autogeneration!==i.autogeneration&&(this.metaSync({autogeneration:i.autogeneration},r),a.push(this)),this.name!==i.name&&(this.metaSync({name:i.name},r),a.push(this)),r==null||r.attemptAutoclose("merge-literal-value",this.id),{updated:D(a),added:D(c),removed:D(e),affected:D(y),self:this}}};I(hi,"repository",{APICreate:async(i,...r)=>i,APIUpdate:async(i,...r)=>i,APIDelete:async(i,...r)=>i,APIClone:async(i,...r)=>{},APILoad:async(i,...r)=>null,APILoadVersion:async(i,r,...a)=>null}),I(hi,"type",d.LiteralValue),I(hi,"USER_MANAGED_PARENT_TYPES",[d.DataType,d.InputMap,d.Property,d.ArgumentDeclaration,d.ReturnStatement,d.BreakStatement,d.ContinueStatement,d.VariableDeclaration,d.VariableInstance,d.ValueDescriptor,d.OutputMap]),I(hi,"PARENT_TYPES",[...hi.USER_MANAGED_PARENT_TYPES]),I(hi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(hi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(hi,"BASE_PROPERTIES",[...hi.MUTABLE_BASE_PROPERTIES,...hi.INMUTABLE_BASE_PROPERTIES]),I(hi,"MUTABLE_META_PROPERTIES",[...hi.MUTABLE_BASE_PROPERTIES]),I(hi,"INMUTABLE_META_PROPERTIES",[...hi.INMUTABLE_BASE_PROPERTIES]),I(hi,"META_PROPERTIES",[...hi.MUTABLE_META_PROPERTIES,...hi.INMUTABLE_META_PROPERTIES]),I(hi,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(hi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(hi,"UPSTREAM_PROPERTIES",[...hi.MUTABLE_UPSTREAM_PROPERTIES,...hi.INMUTABLE_UPSTREAM_PROPERTIES]),I(hi,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(hi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(hi,"DOWNSTREAM_PROPERTIES",[...hi.MUTABLE_DOWNSTREAM_PROPERTIES,...hi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(hi,"PROPERTIES",[...hi.META_PROPERTIES,...hi.UPSTREAM_PROPERTIES,...hi.DOWNSTREAM_PROPERTIES]);let Qr=hi;function hf(o){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const i=new Uint8Array(o);return crypto.getRandomValues(i),i}const{randomBytes:p}=require("crypto");return p(o)}function NCe(o,p){const i=p-o+1,a=bR()*i;return Math.floor(a)+o}function xCe(){const o=hf(4);return(o[0]<<24|o[1]<<16|o[2]<<8|o[3])>>>0}function bR(){return xCe()/2**32}function VN(o){const p=hf(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const NC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function PN(o){let p="";const i=hf(o);for(let r=0;r<o;r++)p+=NC[i[r]%NC.length];return p}function $Ce(o){const p=hf(o);let i;if(typeof Buffer<"u")i=Buffer.from(p).toString("base64");else{const r=String.fromCharCode(...p);i=btoa(r)}return i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function NN(o){return PN(o)}function xN(o,p=NC){let i="";const r=hf(o);for(let a=0;a<o;a++)i+=p[r[a]%p.length];return i}function Mu(){const o=hf(16);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const p=Array.from(o).map(i=>i.toString(16).padStart(2,"0")).join("");return[p.slice(0,8),p.slice(8,12),p.slice(12,16),p.slice(16,20),p.slice(20,32)].join("-")}function LCe(){return xN(6)}function MCe(){return VN(32)}const ibi=63,rbi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function nbi(o){return o.length>=1&&o.length<=ibi&&rbi.test(o)&&!o.includes("--")}function*abi(){yield"";const o="abcdefghijklmnopqrstuvwxyz";for(let p=1;;p++){const i=new Array(p).fill(0);let r=!1;for(;!r;){yield i.map(a=>o[a]).join("");for(let a=p-1;a>=0&&(i[a]++,!(i[a]<o.length));a--)i[a]=0,a===0&&(r=!0)}}}function sbi(o,p){const i=new Set(o.map(a=>a.toLowerCase())),r=p>0?"secondary-db":"main";for(const a of abi()){const c=a?`${r}-${a}`:r;if(nbi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function BCe(o,p){switch(o.id){case Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const i=o.project.entities.filter(m=>!!m.implements.find(v=>v.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)),r=i.find(m=>{const v=m.properties.find(w=>w.implements.find(V=>V.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.getDefaultValue();return(E==null?void 0:E.value)===!0});if(!r&&i.length){const v=i[0].properties.find(b=>b.implements.find(w=>w.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.defaultValue;if(E)E.metaSync({value:!0},p);else if(v!=null&&v.dataType){const b={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=me(b,o.project);return w.setParent(v,p),w.initChildren(p),p==null||p.add(w,H.Added),w.addSelfToProject(p),{newEntities:[w]}}return{newEntities:[]}}else if(r)return{newEntities:[]};const a=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=AR(a,"Main database",p);if(c.errors.length>0)return{newEntities:[]};const e=c.properties.find(m=>m.implements.find(v=>v.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),y=e==null?void 0:e.defaultValue;if(y)y.metaSync({value:!0},p);else if(e!=null&&e.dataType){const m={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=me(m,o.project);v.setParent(e,p),v.initChildren(p),p==null||p.add(v,H.Added),v.addSelfToProject(p)}return{newEntities:[c]}}}return{newEntities:[]}}function GCe(o,p){const i=[],r=[],a=[],c=[];return o.implements.filter(y=>y.type===d.BuiltInBaseEntity).forEach(y=>{var m,v,E,b,w;switch(y.id){case Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const V=o.project.entities.filter(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=V.find(j=>!!j.properties.find(Y=>{var ie;return Y.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((ie=Y.getDefaultValue())==null?void 0:ie.value)===!0}));if(!$&&V.length)$=V[0];else if(!$&&!V.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const Y=$.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=Y==null?void 0:Y.defaultValue)==null||m.metaSync({value:!0},p),r.push($)}const M=o.properties.find(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(M&&!(M!=null&&M.defaultValue)){const j={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:M==null?void 0:M.toReference()},Y=me(j,o.project);Y.hydrateAncestors(),Y.setParent(M,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p),(M==null?void 0:M.defaultValue).setValueAsTypeSingle($||null,p),r.push(Y);return}else M!=null&&M.defaultValue&&!(M!=null&&M.defaultValue.valueAsTypeSingle)&&(M==null||M.defaultValue.setValueAsTypeSingle($||null,p));const k=o.properties.find(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!k)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!k.dataType){const j=ur.new(p);j.parent=k.toReference();const Y=me(j,o.project);Y.hydrateAncestors(),Y.setParent(k,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p)}const F=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=k.dataType)==null||v.setEntity(F,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const V=o.project.entities.filter(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&ie.id!==o.id),$=V.map(ie=>{var ae;const ee=ie.properties.find(fe=>fe.implements.find(ve=>ve.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(ae=ee==null?void 0:ee.getDefaultValue())==null?void 0:ae.value}).filter(ie=>!!ie),M=o.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!V.find(ie=>!!ie.properties.find(ee=>{var de;return ee.implements.find(ae=>ae.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((de=ee.getDefaultValue())==null?void 0:de.value)===!0}))){const ie=o.properties.find(ee=>ee.implements.find(de=>de.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!ie)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(ie!=null&&ie.defaultValue)){const ee=Qr.new(p);ee.parent=ie.toReference();const de=me(ee,o.project);de.hydrateAncestors(),de.setParent(ie,p),de.addSelfToProject(p),p==null||p.add(de,H.Added),de.initChildren(p)}(E=ie==null?void 0:ie.defaultValue)==null||E.metaSync({value:!0},p)}if(!M)throw new Error("Identifier property not found for relational database entity with id: "+o.id);if(!(M!=null&&M.defaultValue)){const ie=Qr.new(p);ie.parent=M.toReference();const ee=me(ie,o.project);ee.hydrateAncestors(),ee.setParent(M,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const F=sbi($,V.length);(b=M.defaultValue)==null||b.metaSync({value:F},p);const j=o.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!j)throw new Error(`[handleAfterEntityImplementationSideEffects] Password property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id} with id ${o.id}`);if(!j.defaultValue){const ie=Qr.new(p);ie.parent=j.toReference();const ee=me(ie,o.project);ee.hydrateAncestors(),ee.setParent(j,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),r.push(ee)}const Y=NN(24);(w=j.defaultValue)==null||w.metaSync({value:Y},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const V=o.properties.find(F=>F.implements.find(j=>j.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!V)throw new Error(`[handleAfterEntityImplementationSideEffects] Time property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let $=V.defaultValue||null;if(!$){const F=Qr.new(p);F.parent=V.toReference(),F.name=oe.Date,F.id=x.UUID.uuid(),$=me(F,o.project),$.hydrateAncestors(),$.setParent(V,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),V.metaSync({editable:!1,deletable:!1},p);const M=o.properties.find(F=>F.implements.find(j=>j.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id));if(!M)throw new Error(`[handleAfterEntityImplementationSideEffects] Definition property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let k=M.defaultValue||null;if(!k){const F=Qr.new(p);F.name=oe.EntityTemplate,F.parent=M.toReference(),F.id=x.UUID.uuid(),k=me(F,o.project),k.hydrateAncestors(),k.setParent(M,p),k.addSelfToProject(p),k.initChildren(p),p==null||p.add(k,H.Added)}}}}),{self:o,updated:D(i),added:D(r),removed:D(a),affected:D(c)}}function AR(o,p,i,r){const a=r||x.UUID.uuid(),c=Ts.new(i);c.id=a,c.name=p,c.static=o.static,c.implements=[o.toJSON()],c.parent=o.project.toReference(),c.static=o.static,BCe(o,i);const e=me(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),GCe(e,i),e.afterAllChildrenInitialized(i),e}function $N(o,p){return p.entities.find(a=>{const c=a.properties,e=c.map(b=>b.name),y=o.every(b=>e.includes(b)),m=e.filter(b=>!o.includes(b)),v=c.every(b=>!m.includes(b.name)||!b.required);return y&&v})||null}function kCe(o,p,i,r=Ze.OrDataTypeGroup){const a=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ur.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=r;const E=me(v,o.project);return c.push(E),E.setParent(p,i),E.initChildren(i),i==null||i.add(E,H.Added),E.setEntity(o,i),E.addSelfToProject(i),{updated:D(a),added:D(c),removed:D(e),affected:D(y),self:E}}function LN(o,p,i,r,a){var v,E,b,w,V,$,M,k;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let F=!1;const j=new Date(o);if(j instanceof Date&&!isNaN(j.valueOf())&&(F=!0),F){const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Date].id);p.setEntity(Y,r);break}else{const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id);p.setEntity(Y,r);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},r),o.length>0){const Y=o.slice(0,5).filter(ee=>ee!==void 0);if(Y.every(ee=>typeof ee==typeof Y[0])&&(typeof Y[0]!="object"||Y[0]===null))switch(typeof Y[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),r);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}else{const ee=[];let de=!1;Y.forEach(fe=>{var ve,ue,ye,Ve;if(Array.isArray(fe)&&(de=!0),typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const _e=fA(fe,p.project,{...i,id:x.UUID.uuid()},r,a);_e.hasCreated&&ee.push((ve=_e.changeSet)==null?void 0:ve.self),c.push(...(ue=_e.changeSet)==null?void 0:ue.updated),e.push(...(ye=_e.changeSet)==null?void 0:ye.added),y.push(...(Ve=_e.changeSet)==null?void 0:Ve.removed)}});const ae=D(ee);if(!ae.length&&!de){Y.forEach(fe=>{const ve=ur.new(r);ve.parentRelationType=Ze.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);switch(ue.setParent(p,r),ue.initChildren(r),r==null||r.add(ue,H.Added),ue.addSelfToProject(r),typeof fe){case"string":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),r);break;case"number":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}});break}else ae.length===1&&!de?p.setEntity(ae[0],r):Y.forEach(fe=>{if(typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const ve=$N(Object.keys(fe),p.project);if(ve){const ue=kCe(ve||ae[0],p,r,Ze.OrDataTypeGroup);c.push(...ue.updated),e.push(...ue.added),y.push(...ue.removed)}}else{const ve=ur.new(r);ve.parentRelationType=Ze.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);ue.setParent(p,r),ue.initChildren(r),r==null||r.add(ue,H.Added),ue.addSelfToProject(r);const ye=LN(fe,ue,{...i,id:x.UUID.uuid()},r,a);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const Y=fA(o[0],p.project,{...i},r,a);p.setEntity((v=Y.changeSet)==null?void 0:v.self,r),c.push(...(E=Y.changeSet)==null?void 0:E.updated),e.push(...(b=Y.changeSet)==null?void 0:b.added),y.push(...(w=Y.changeSet)==null?void 0:w.removed);break}else{const Y=fA(o,p.project,{...i},r,a);p.setEntity((V=Y.changeSet)==null?void 0:V.self,r),c.push(...($=Y.changeSet)==null?void 0:$.updated),e.push(...(M=Y.changeSet)==null?void 0:M.added),y.push(...(k=Y.changeSet)==null?void 0:k.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function fA(o,p,i,r,a){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=$N(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=a?i.name+" of "+a.name:i.name,V={id:i.id||x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(r==null?void 0:r.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:b,codeName:null,deletable:!0,editable:!0,type:d.DefinitionEntity,additionalProperties:!1,additionalPropertiesDataType:null,allPropertiesImplement:null,description:i.description||null,static:i.static||!1,abstract:i.abstract||!1,properties:[],methods:[],abstractMethods:[],extends:null,implements:[],x:0,y:0,parent:p.toReference()},$=me(V,p);return $.setParent(p,r),$.initChildren(r),r==null||r.add($,H.Added),$.addSelfToProject(r),e.push($),v.forEach((M,k)=>{const F=x.UUID.uuid(),j=Za.new(r);j.id=F,j.name=M,j.codeName=M,j.parent=$.toReference(),j.index=k,j.required=!0,j.interactive=!0;const Y=me(j,p);Y.setParent($,r),Y.initChildren(r),r==null||r.add(Y,H.Added),Y.addSelfToProject(r),e.push(Y);const ie=o[M],ee=x.UUID.uuid(),de=ur.new(r);de.id=ee,de.parent=Y.toReference(),de.like=!0,de.isList=!1;const ae=me(de,p);ae.setParent(Y,r),ae.initChildren(r),r==null||r.add(ae,H.Added),ae.addSelfToProject(r),e.push(ae);const fe=LN(ie,ae,{...i,name:M,id:x.UUID.uuid()},r,a||$);c.push(...fe.updated),e.push(...fe.added),y.push(...fe.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function bd(o,p,i,r){const a=[];return!o.length||!p.length?{errors:a,overlap:!1}:(o.length>p.length?o.forEach(c=>{const e=p.find(m=>m.name===c.name),y=p.find(m=>{var v,E;return Array.isArray(m.implements)?m.implements.some(b=>!!c.implements.find(w=>w.id===b.id)):((v=m.implements)==null?void 0:v.id)===((E=c.implements)==null?void 0:E.id)});if(e){const m=new ki({id:c.id+"--"+e.id+"--"+r,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${e.type} ${e.name} with id "${e.id}" that has the same name`,severity:ce.Error,code:r,entity:c,firstRelationship:e});a.push(m)}if(y){const m=new ki({id:c.id+"--"+y.id+"--"+i,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${y.type} ${y.name} with id "${y.id}" that implements the same base descriptor`,severity:ce.Error,code:i,entity:c,firstRelationship:y});a.push(m)}}):p.forEach(c=>{var m;const e=o.find(v=>v.name===c.name),y=o.find(v=>{var E,b;return v.implements&&Array.isArray(v.implements)?v.implements.some(w=>!!c.implements.find(V=>V.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new ki({id:e.id+"--"+c.id+"--"+r,message:`Entity of type ${e.type} named "${e.name}" with id "${e.id}" overrides a base entity ${c.name} with id "${c.id}" that has the same name`,severity:ce.Error,code:r,entity:e,firstRelationship:c});a.push(v)}if(y){const v=new ki({id:y.id+"--"+c.id+"--"+i,message:`Entity of type ${y.type} named "${y.name}" with id "${y.id}" overrides a base entity ${c.name} with id "${c.id}" that implements the same base ${Array.isArray(y==null?void 0:y.implements)?Dt(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:ce.Error,code:i,entity:y,firstRelationship:c});a.push(v)}}),{errors:a,overlap:!!a.length})}function lbi(o,p){return o.abstract||(o.properties.forEach(r=>{r.abstract||r.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(r=>{r.field===t$.EntityField&&r.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function obi(o,p){return o.abstract&&(o.properties.forEach(r=>{r.abstract&&r.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(r=>{(r.field===ig.Implements||r.field===ig.Extends)&&r.entity.onDetachedDependencyRemoved(o,r.field,p)}),o.metaSync({abstract:!1},p)),o}function dbi(o,p){return o.static||(o.properties.forEach(r=>{r.static||r.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function ubi(o,p){return o.static&&o.metaSync({static:!1},p),o}const lT=class lT extends DN{constructor(i,r){super(i);I(this,"initialData");I(this,"id");I(this,"version");I(this,"name");I(this,"description",null);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",!1);I(this,"static");I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"interactive",!1);I(this,"errors",[]);I(this,"project");if(this.initialData=this.initialData||i,this.project=this.project||r,this.id=this.id||i.id,this.version=this.version||i.version,this.name=this.name||i.name,this.static=this.static||i.static,this.interactive=this.interactive||i.interactive,this.abstract=i.abstract,this.additionalProperties=i.additionalProperties,this.properties=this.initialData.properties.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const a=me(this.initialData.allPropertiesImplement,this.project);a.setParent(this,null),a.initChildren(null),this.allPropertiesImplement=a}if(this.initialData.additionalPropertiesDataType){const a=me(this.initialData.additionalPropertiesDataType,this.project);a.setParent(this,null),a.initChildren(null),this.additionalPropertiesDataType=a}this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var a;const i=((a=this.extends)==null?void 0:a.allMethods)||[],r=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(r)}get allBasePropertiesFromOriginalParents(){var a;const i=((a=this.extends)==null?void 0:a.allProperties)||[],r=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(!!e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(r)}get allBasePropertiesFromExtendedAndImplementedEntities(){var a,c;const i=[...((a=this.extends)==null?void 0:a.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),r=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...r])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,r)=>r.type===d.PrimitiveEntity?i:[...[...r.ownDeclaredMethods,...r.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==d.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var a,c;const i=[...((a=this.extends)==null?void 0:a.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),r=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(r)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,r)=>{const a=r.implementedPropertiesFromOriginalParents,c=[...r.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...a,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[])].filter(i=>!!i.abstract))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods,...this.abstractMethods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeBuiltInInstance(this),this}unsubscribe(){return this.project.unsubscribeBuiltInInstance(this),this}async APILoad(i=ke,...r){return await lT.repository.APILoad(this.id,...r),this}toFlat(i=new Set){var a;return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...((a=this.extends)==null?void 0:a.toFlat(i))||[]])}toFlatIds(i=new Set){var a;return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...((a=this.extends)==null?void 0:a.toFlatIds(i))||[]])}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,additionalProperties:this.additionalProperties,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(i=new Set){var r,a,c;return i.has(this.id)?this.toReference():(i.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,additionalProperties:this.additionalProperties,interactive:this.interactive,additionalPropertiesDataType:((r=this.additionalPropertiesDataType)==null?void 0:r.toJSON(i))||null,allPropertiesImplement:((a=this.allPropertiesImplement)==null?void 0:a.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null})}toReference(i=tt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=tt){var r,a,c;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,additionalProperties:this.additionalProperties,additionalPropertiesDataType:((r=this.additionalPropertiesDataType)==null?void 0:r.toReference())||null,allPropertiesImplement:((a=this.allPropertiesImplement)==null?void 0:a.toReference())||null,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:((c=this.extends)==null?void 0:c.toReference())||null}}toFlatJSON(i=new Set){var a,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(e=>e.toFlatJSON(i)),...this.methods.flatMap(e=>e.toFlatJSON(i)),...this.abstractMethods.flatMap(e=>e.toFlatJSON(i)),...((a=this.additionalPropertiesDataType)==null?void 0:a.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(i=tt){var r;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,additionalProperties:this.additionalProperties,extends:(r=this.extends)==null?void 0:r.id}}toFlatGenerationTarget(i=new Set){var a,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(e=>e.toFlatGenerationTarget(i)),...this.methods.flatMap(e=>e.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(e=>e.toFlatGenerationTarget(i)),...((a=this.additionalPropertiesDataType)==null?void 0:a.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,r;return this.errors=[],this.properties.forEach(a=>a.clearErrors()),this.methods.forEach(a=>a.clearErrors()),this.abstractMethods.forEach(a=>a.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(r=this.allPropertiesImplement)==null||r.clearErrors(),this}validate(){return this.errors=QEi(this),{success:!0}}async validateAsync(i={}){const r=J.YieldTracker.from(i);return this.errors=await XEi(this,{tracker:r}),{success:!0}}getErrors(){var r,a;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((r=this.additionalPropertiesDataType)==null?void 0:r.getErrors())||[],...((a=this.allPropertiesImplement)==null?void 0:a.getErrors())||[]]}async getErrorsAsync(i={}){const r=J.YieldTracker.from(i),a=[...this.errors];await r.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:r});a.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:r});a.push(...c)}return a}getShallowErrors(){return this.errors}implement(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),null,!0,"implement-built-in-base-entity")),a){const c=AR(this,i,r,a);return r==null||r.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var r;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((r=this.extends)==null?void 0:r.type)===d.BuiltInBaseEntity&&i.push(...this.extends.getAllPropertiesImplements()||[]),i}getAllInteractiveMethods(){const i=[];if(this.interactive){if(i.push(...this.methods,...this.abstractMethods),!this.extends||this.extends.type===d.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===d.PrimitiveEntity)return i;this.extends instanceof lT&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(lT,"repository",{APILoad:async(i,...r)=>null});let Vd=lT;class UCe extends Vd{constructor(i){super(un,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",un.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",un.abstract);I(this,"static",un.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=un,this.project=i,this.id=un.id,this.version=un.version,this.name=un.name,this.static=un.static,this.abstract=un.abstract,this.properties=this.initialData.properties.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.methods=this.initialData.methods.map(r=>{const a=me(r,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(r=>{const a=me(r,this.project);return a.parent=this,a}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}}var la=(o=>(o.StringValueMustNotHaveSpaces="string-value-must-not-have-spaces",o.StringValueMustNotHaveDashes="string-value-must-not-have-dashes",o.MustBeUniqueAmongSameEntities="must-be-unique-among-same-entities",o))(la||{});function MN(o,p){const i=[],r=p;if(!r)return{errors:i,override:p};if(typeof r!="string")return{errors:[],override:p};if(r.includes(" ")){const a=new ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(a)}return{errors:i,override:r.replace(/\s/g,"-")}}function jCe(o,p){const i=[],r=p;if(!r)return{errors:i,override:p};if(typeof r!="string")return{errors:[],override:p};if(r.includes(" ")){const a=new ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(a)}if(r.includes("-")){const a=new ki({id:o.id+"--string-value-must-not-have-dashes",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(a)}return{errors:i,override:r.replace(/\s|-/g,"_")}}var Ko=(o=>(o.StatusCodeMustBeNumber="status-code-must-be-number",o.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",o))(Ko||{});function KCe(o,p){const i=[];if(typeof p!="number"){const r=new ki({id:o.id+"--status-code-must-be-number",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number.`,severity:ce.Error,code:"status-code-must-be-number",entity:o});return i.push(r),{errors:i,override:p}}if(p<100){const r=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(r)}if(p>599){const r=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(r)}return{errors:i,override:p}}class FCe extends Vd{constructor(i){var e,y;super(Ga,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",Ga.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",Ga.abstract);I(this,"static",Ga.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=Ga,this.project=i,this.id=Ga.id,this.version=Ga.version,this.name=Ga.name,this.static=Ga.static,this.abstract=Ga.abstract,this.properties=this.initialData.properties.map(m=>{const v=me(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project));const r=this.properties.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!r)throw new Error("Path property not found in endpoint entity");r._codeNativeValueValidation=(m,v)=>{const E=MN(m,v);if(m.project.entities.filter(w=>Wi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const V=w.properties.find(k=>k.implements.find(F=>F.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!V)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=V.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new ki({id:m.id+"--"+la.MustBeUniqueAmongSameEntities,message:`Entity of type ${m.type} with id "${m.id}" has an invalid value "${v}". The value must be unique among all endpoint paths.`,severity:ce.Error,code:la.MustBeUniqueAmongSameEntities,entity:m});E.errors.push(w)}return E};const a=this.abstractMethods.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!a)throw new Error("Handler method not found in endpoint entity");const c=(((y=(e=a.dataType)==null?void 0:e.entity)==null?void 0:y.properties)||[]).find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.dataType.entity.properties.statusCode.id);if(!c)throw new Error("Status code output not found in handler method");c._codeNativeValueValidation=(m,v)=>KCe(m,v)}}class SCe extends Mi{constructor(i){super(No,i);I(this,"id",Ki.Parallel);I(this,"name",Ki.Parallel);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=No.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(No.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=No.error?me(No.error,this.project):null}}class qCe extends Mi{constructor(i){super(us,i);I(this,"id",us.id);I(this,"name",us.name);I(this,"description",us.description);I(this,"version",us.version);I(this,"autoexecutable",!1);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=us.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(us.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=us.error?me(us.error,this.project):null}}class ZCe extends Mi{constructor(i){super(xu,i);I(this,"id",Ki.Sequential);I(this,"name",Ki.Sequential);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=xu.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(xu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=xu.error?me(xu.error,this.project):null}}var ja=(o=>(o.UUIDMustBeString="uuid-must-be-string",o.UUIDMustBeValidFormat="uuid-must-be-valid-format",o.UUIDMustNotContainSpaces="uuid-must-not-contain-spaces",o))(ja||{});function pbi(o,p){const i=[];if(typeof p!="string"){const a=new ki({id:o.id+"--uuid-must-be-string",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be text.`,severity:ce.Error,code:"uuid-must-be-string",entity:o});return i.push(a),{errors:i,override:p}}const r=MN(o,p);if(r.errors.length>0)return i.push(...r.errors),{errors:i,override:p};if(!RN(p)){const a=new ki({id:o.id+"--uuid-must-be-valid-format",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a valid UUID format. Eg: "123e4567-e89b-12d3-a456-426614174000".`,severity:ce.Error,code:"uuid-must-be-valid-format",entity:o});i.push(a)}return{errors:i,override:p}}var Ne=(o=>(o.Inherited="inherited",o.DefaultValue="default-value",o.Missing="missing",o.Empty="empty",o.AutoCalculated="auto-calculated",o.QueuedAutocalculation="queued-autocalculation",o.External="external",o.Testing="testing",o.ExecutionResult="execution-result",o))(Ne||{});const HCe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function zm(o,p){return{...HCe,id:o,project:p}}class Jm{constructor(p,i){I(this,"initialized",!1);I(this,"id");I(this,"project");I(this,"values",{});I(this,"onWriteCallback",()=>{});I(this,"onRemoveCallback",()=>{});this.id=p,this.project=i,this.init()}onWrite(p){this.onWriteCallback=p}onRemove(p){this.onRemoveCallback=p}init(){var r;if(!((r=this.project)!=null&&r.id)||this.initialized)return;const p={},i={};Object.keys(p).forEach(a=>{const c=p[a],e=new Qr(c,this.project);try{if(c.parent){const v=this.project.findSubscribedInstanceFromReference(c.parent);if(!v)return;e.setParent(v,null),e.hydrateAncestors(),e.initChildren(null)}else if(c.standaloneParent){const v=this.project.findSubscribedInstanceFromReference(c.standaloneParent);if(!v)return;e.standalone=!0,e.setStandaloneParent(v,null),e.hydrateAncestors(),e.initChildren(null)}i[a]=e;const y=e.parent||e.standaloneParent,m=zCe(e,y,this.project);m?i[a]=m:delete p[a]}catch(y){J.Logger.error("Error hydrating ancestors: ",y),delete p[a]}}),this.values={...this.values,...i},this.initialized=!0}toJSON(){const p={};return Object.keys(this.values).forEach(i=>{p[i]=this.values[i].toJSON()}),p}writeValue(p,i){if(!p)throw new Error("The value owner entity is required when writing a value to a value store");let a=this.values[p.id];if(!a)if(i instanceof Qr)a=i;else if(i)a=Si(i,this.project);else{const c={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:new Date().toISOString(),author:x.sessionAuthor,deleted:!1,previousVersion:null,value:null,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:p.toReference(),parent:null,valueAsTypeSingle:null,valueAsTypeList:null,autogeneration:null,name:Cc(p.getDataType(null))};a=Si(c,this.project)}a.standalone=!0,a.initialData.standaloneParent||J.Logger.warn("instance.initialData: ",a.initialData),a.setStandaloneParent(p,null),a.hydrateAncestors(),a.initChildren(null),i&&(a.metaSync({...i},null),a.setValueAsType(i.valueAsType,null)),this.values[p.id]=a,this.onWriteCallback(p,a)}readValue(p){return this.values[p]||null}removeValue(p){if(!this.values[p])return;delete this.values[p];const i=this.project.get(p);i&&this.onRemoveCallback(i)}clear(){this.values={}}}function hr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function WCe(o){if(Array.isArray(o))return o.map(m=>typeof m=="number"?m:e(m)?Number(m):String(m));const p=[];let i=0,r="",a=!1,c=null;for(;i<o.length;){const m=o[i];if(m==="."&&!a){r.length&&(p.push(y(r)),r=""),i++;continue}if(m==="["&&!a){r.length&&(p.push(y(r)),r=""),a=!0,i++;continue}if(a){if(!c&&(m==='"'||m==="'")){c=m,i++;continue}if(c){if(m==="\\"&&i+1<o.length){r+=o[i+1],i+=2;continue}if(m===c){c=null,i++;continue}r+=m,i++;continue}if(m==="]"){p.push(y(r)),r="",a=!1,i++;continue}if(/\s/.test(m)&&!c){i++;continue}r+=m,i++;continue}r+=m,i++}return r.length&&p.push(y(r)),p;function e(m){return/^[0-9]+$/.test(m)}function y(m){const v=m.trim();return e(v)?Number(v):v}}function BN(o,p,i){if(o==null)return i;const r=WCe(p);let a=o;for(let c=0;c<r.length;c++){const e=r[c];if(a==null)return i;if(Array.isArray(a)&&typeof e=="number"){if(!(e in a))return i;a=a[e]}else{if(!Object.prototype.hasOwnProperty.call(a,e))return i;a=a[e]}}return a}const cbi=new Set(["__proto__","prototype","constructor"]);function fbi(o){return typeof o=="string"&&cbi.has(o)}function GN(o,p,i,r){const a=WCe(p);if(a.length===0)return o;function c(e,y){const m=a[y],v=y===a.length-1;if(r==="strict-set"||r==="strict-delete"){if(fbi(m))throw new Error(`Unsafe key "${String(m)}"`);if(e==null||typeof e!="object"&&!Array.isArray(e))throw new Error(`Missing parent or invalid container at segment "${String(m)}".`);if(r==="strict-delete"&&v&&!(m in e))return e}let E;if(Array.isArray(e))E=[...e];else if(e&&typeof e=="object")E={...e};else if(r==="safe-set")E=typeof m=="number"?[]:{};else throw new Error(`Cannot traverse path at "${String(m)}"`);if(v)return r==="strict-delete"?delete E[m]:E[m]=i,E;const b=e?e[m]:void 0;if(r==="safe-set"&&b==null){const w=typeof a[y+1]=="number",V=c(w?[]:{},y+1);return E[m]=V,E}return E[m]=c(b,y+1),E}if(o==null&&r==="safe-set"){const e=typeof a[0]=="number";return c(e?[]:{},0)}return c(o,0)}const Ok=Symbol("missing"),ybi=o=>o!=null&&typeof o=="object";function gR(o,p){if(typeof o!="string")throw new TypeError(`${p} expects the key to be a string.`);return o}function Qh(o,p){if(typeof o!="string"&&!Array.isArray(o))throw new TypeError(`${p} expects the path to be string or array.`);return o}function mf(o,p){if(!hr(o))throw new TypeError(`${p} expects the first argument to be an object.`);return o??{}}function hbi(o,p){const i=gR(p,"ReadKey");return(o??{})[i]}function mbi(o,p,i){const r=gR(p,"WriteKey");if(o&&typeof o=="object"){const a=Array.isArray(o)?[...o]:{...o};return a[r]=i,a}return{[r]:i}}function Tbi(o,p){if(!o||typeof o!="object")return{};const i=String(p),{[i]:r,...a}=o;return a}function vbi(o,p,i){const r=mf(o,"ReadNestedKey"),a=Qh(p,"ReadNestedKey");return BN(r,a,i)}function Ebi(o,p,i){const r=mf(o,"WriteNestedKey"),a=Qh(p,"WriteNestedKey");return GN(r,a,i,"strict-set")}function bbi(o,p,i){const r=mf(o,"WriteSafeNestedKeyRecursively"),a=Qh(p,"WriteSafeNestedKeyRecursively");return GN(r,a,i,"safe-set")}function Abi(o,p){const i=mf(o,"DeleteNestedKey"),r=Qh(p,"DeleteNestedKey");return GN(i,r,null,"strict-delete")}function gbi(o,p){const i=gR(p,"HasKey"),r=o;return r!=null&&ybi(r)&&Object.prototype.hasOwnProperty.call(r,i)}function Ibi(o,p,i){const r=gR(p,"KeyValueEquals");return o==null||typeof o!="object"?!1:o[r]===i}function Rbi(o,p){const i=o,r=Qh(p,"HasNestedKey");return BN(i,r,Ok)!==Ok}function Dbi(o,p,i){const r=Qh(p,"NestedKeyValueEquals");return BN(o,r)===i}function wbi(...o){const p={};for(let i=0;i<o.length;i++){const r=o[i];if(r!=null){if(!hr(r))throw new TypeError("MergeObjects expects every argument to be an object (or null/undefined).");Object.assign(p,r)}}return p}function Obi(o){const p=mf(o,"ObjectKeys");return Object.keys(p)}function Cbi(o){const p=mf(o,"ObjectValues");return Object.values(p)}function _bi(o){const p=mf(o,"ObjectEntries");return Object.entries(p)}function Vbi(o){return{execution:null,project:o,localTestValues:zm("local-test-values",o),resolvedValues:zm("resolved-values",o),persistedExecutionResults:zm("persisted-execution-results",o),lastExecutionResults:zm("last-execution-results",o),getValueTypePreference:()=>null,setValueTypePreference:()=>{}}}function uu(o,p,i,r){var y;let a;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case oe.EntityTemplate:a=oe.EntityTemplate;break;case oe.String:a=oe.String;break;case oe.Number:a=oe.Number;break;case oe.Boolean:a=oe.Boolean;break;case oe.Null:a=oe.Null;break;case oe.Enum:a=oe.Enum;break;case oe.KeyValue:a=oe.KeyValue;break;case oe.Untyped:a=oe.Untyped;break;case oe.KeyValue:a=oe.KeyValue;break;case oe.Date:a=oe.Date;break;case oe.UUID:a=oe.UUID;break;case oe.File:a=oe.File;break;case oe.Void:a=oe.Void;break;case oe.ActionDescriptor:a=oe.ActionDescriptor;break;case oe.Bytes:a=oe.Bytes;break;default:throw new Error(`Primitive type ${le(o.entity,i)} is not supported`)}else a=oe.Untyped;const c=Qr.new(r);c.name=a,c.parent=p.toReference();const e=me(c,i);return e.hydrateAncestors(),r==null||r.add(e,H.Added),e.addSelfToProject(r),e.initChildren(r),e}function Bo(o,p,i=new Set){var r,a,c;if(i.has(o.id))return[];if(i.add(o.id),Gt.includes(o.type)){const e=zn(o);return D([e,...[e].flatMap(y=>Bo(y,p,i))])}else if(o.type===d.OutputMap){if(Gt.includes(o.parent.type)&&((r=o.declaration)==null?void 0:r.type)===d.Property&&o.declaration.static)return D([o,o.declaration,...[o,o.declaration].flatMap(e=>Bo(e,p,i))])}else if(o.type===d.InputMap&&Gt.includes(o.parent.type)&&((a=o.declaration)==null?void 0:a.type)===d.Property&&(c=o.declaration)!=null&&c.static)return D([o.declaration,...[o.declaration].flatMap(e=>Bo(e,p,i))]);return[o]}function zCe(o,p,i){return o}function e0(o,p,i=!1){const r=o.readsValue;let a=null;const c=Uc(r,p,i);if(c){const e={sources:[c],target:o};a={value:c.value,valueOwner:o,type:Ne.Inherited,inheritanceLink:e}}return a}function It(o,p,i){var y;if(!p)return null;let r;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case oe.EntityTemplate:r=oe.EntityTemplate;break;case oe.String:r=oe.String;break;case oe.Number:r=oe.Number;break;case oe.Boolean:r=oe.Boolean;break;case oe.Null:r=oe.Null;break;case oe.Enum:r=oe.Enum;break;case oe.KeyValue:r=oe.KeyValue;break;case oe.Untyped:r=oe.Untyped;break;case oe.KeyValue:r=oe.KeyValue;break;case oe.Date:r=oe.Date;break;case oe.UUID:r=oe.UUID;break;case oe.File:r=oe.File;break;case oe.Void:r=oe.Void;break;case oe.ActionDescriptor:r=oe.ActionDescriptor;break;case oe.Bytes:r=oe.Bytes;break;default:throw new Error(`Primitive type ${le(o.entity,i)} is not supported`)}else r=oe.Untyped;if(!i.get(p.id))return null;const c=Qr.new(null);c.name=r,c.standaloneParent=p.toReference();let e=new Qr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function JCe(o,p,i=!1){var c,e;if(p.execution&&p.execution.hasEntity(o)&&!i){const y=(c=p.lastExecutionResults)==null?void 0:c.readValue(o.id);if(y)return{value:y,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(e=p.localTestValues)==null?void 0:e.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:null}}function yA(o,p,i,r=!1){var e,y;const a={...o},c=p.type===d.VariableDeclaration?p.inputs:jt.includes(p.type)?p.outputs:[];if(!c||c.length===0)return a;for(const m of c){if(!sE(m))continue;const v=uT(m,i,r);if(v&&v.value){const E=le(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);a[b]=bn((v==null?void 0:v.value)||null)?a[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return a}function Ym(o,p,i,r=!1){var e,y;const a={...o},c=p.inputs;if(!c)return a;for(const m of c){if(!sE(m))continue;const v=Vv(m,i,r);if(v&&v.value){const E=le(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);a[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return a}function YCe(o,p,i=!1){var E,b,w,V,$,M,k,F;let r={};if(((b=(E=o.getDataType(null))==null?void 0:E.entity)==null?void 0:b.type)===d.DefinitionEntity&&(r={...r,...((w=o.getDataType(null))==null?void 0:w.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const j=(V=p.lastExecutionResults)==null?void 0:V.readValue(o.id);if(j){if(hr(j.value)){const ie={...r,...j.value},ee={...Ym(ie,o,p,i)};j.metaSync({value:ee},null)}return{value:j,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}}const a=!!(($=p.execution)!=null&&$.entities.length),c=(M=p.execution)==null?void 0:M.hasEntity(o),e=o.readsValue;let y=null;if(e){const j=(k=p.execution)==null?void 0:k.hasEntity(e);if((!a||a&&j&&c||a&&!j&&!c)&&(y=e0(o,p,i),y&&y.value&&hr(y.value.value))){const ie={...r,...y.value.value},ee={...Ym(ie,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const j=m;if(j&&j.value===null&&j.autogeneration){const Y=T1(j);if(j.metaSync({value:Y},null),hr(Y)){const ie={...Ym(Y,o,p,i)};j.metaSync({value:ie},null)}}(i||v===null||v!==Ne.Testing)&&(y={value:j,valueOwner:o,type:bn(j)?o.readsValue?Ne.Inherited:Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const j=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(j){if(hr(j.value)){const Y={...r,...j.value},ie={...Ym(Y,o,p,i)};j.metaSync({value:ie},null)}return{value:j,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}}return bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function kN(o,p,i=!1){var e,y,m,v,E,b,w,V,$;let r={};if(((y=(e=o.getDataType(null))==null?void 0:e.entity)==null?void 0:y.type)===d.DefinitionEntity&&(r={...r,...((m=o.getDataType(null))==null?void 0:m.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const M=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(M){if(hr(M.value)){const F={...r,...M.value},j=yA(F,o,p,i);M==null||M.metaSync({value:j},null)}return{value:M,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}}const a=(E=p.localTestValues)==null?void 0:E.readValue(o.id),c=p.getValueTypePreference(o.id);if(a&&!i&&(c===null||c!==Ne.DefaultValue)){if(hr(a.value)){const k={...r,...a.value},F=yA(k,o,p,i);a.metaSync({value:F},null)}return{value:a,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((V=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:V.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const M=It(o.dataType,o,p.project),k=yA(r,o,p,i);return M==null||M.metaSync({value:k},null),{value:M,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null}}return null}function _v(o,p,i=!1){var E,b,w,V,$;if((E=o.dataType)!=null&&E.isObject())return YCe(o,p,i);const r=oi(o),a=!!((b=p.execution)!=null&&b.entities.length),c=(w=p.execution)==null?void 0:w.hasEntity(r),e=o.readsValue;let y=null;if(e){const M=(V=p.execution)==null?void 0:V.hasEntity(e);(!a||a&&M&&c||a&&!M&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const M=m;if(M&&M.value===null&&M.autogeneration){const k=T1(M);M.metaSync({value:k},null)}(i||v===null||v!==Ne.Testing)&&(y={value:M,valueOwner:o,type:bn(M)?o.readsValue?Ne.Inherited:Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const M=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(M)return{value:M,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}return bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function UN(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return kN(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const v=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(v)return{value:v,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(m=p.localTestValues)==null?void 0:m.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:_v(o,p,i)}function jN(o,p,i=!1){var w,V,$,M;const r=!!((w=p.execution)!=null&&w.entities.length),a=(V=p.execution)==null?void 0:V.hasEntity(o);let c=null;const e=o.readsValue;if(e){const k=($=p.execution)==null?void 0:$.hasEntity(e);(!r||r&&k&&a||r&&!k&&!a)&&(c=e0(o,p,i))}const y=o.declaration;if(!c&&y){const k=_v(y,p);k&&k.value&&(c=k)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Ne.DefaultValue||c.type===Ne.External)&&!i||m===null||m!==Ne.DefaultValue){const k=(M=p.localTestValues)==null?void 0:M.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const v=So(o),E=o.getDataType(null);return v&&a&&(!(c!=null&&c.value)||!ba(E)&&Fo(c==null?void 0:c.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:a&&!v&&bn((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Ne.External,inheritanceLink:null}}function XCe(o,p,i=!1){return UN(o.declaration,p,i)}function QCe(o,p,i=!1){var w,V,$,M;if(!i&&p.execution&&p.execution.hasEntity(o)){const k=(w=p.lastExecutionResults)==null?void 0:w.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=oi(o),a=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((V=p.execution)!=null&&V.hasEntity(r))||!!a&&!!(($=p.execution)!=null&&$.hasEntity(a));let e=null;const y=o.defaultValue,m=p.getValueTypePreference(o.id);if(y){const k=y||null;if(k&&k.value===null&&k.autogeneration){const F=T1(k);k.metaSync({value:F},null)}(i||m===null||m!==Ne.Testing)&&(e={value:k,valueOwner:o,type:bn(k)?Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Ne.DefaultValue||e.type===Ne.External)&&!i||m===null||m!==Ne.DefaultValue){const k=(M=p.localTestValues)==null?void 0:M.readValue(o.id),F=p.getValueTypePreference(o.id);if(k&&!i&&(F===null||F!==Ne.DefaultValue))return{value:k,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const v=So(o),E=o.getDataType(null);let b=v&&c&&(!(e!=null&&e.value)||!ba(E)&&Fo(e==null?void 0:e.value));return r.type===d.Loop&&c&&(b=!1),b?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:c&&!v&&bn((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Ne.External,inheritanceLink:null}}function KN(o,p,i=!1){var V,$,M,k,F,j;if((V=o.getDataType(null))!=null&&V.isObject())return kN(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const Y=($=p.lastExecutionResults)==null?void 0:$.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=oi(o),a=!!((M=p.execution)!=null&&M.entities.length),c=(k=p.execution)==null?void 0:k.hasEntity(r),e=o.readsValue;let y=null;if(e){const Y=(F=p.execution)==null?void 0:F.hasEntity(e);(!a||a&&Y&&c||a&&!Y&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const Y=m;(i||v===null||v!==Ne.Testing)&&(y={value:Y,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const Y=(j=p.localTestValues)==null?void 0:j.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const E=So(o),b=o.getDataType(null);return E&&(!(y!=null&&y.value)||!ba(b)&&Fo(y==null?void 0:y.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:!E&&bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function e_e(o,p,i=!1){var y,m,v,E,b,w,V,$,M,k,F,j,Y;if(p.execution&&p.execution.hasEntity(o)&&!i){const ie=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(ie)return{value:ie,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=IT(o);if(xy.includes(r.type)){const ie=Uc(r,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||Hi(le(o,p.project));if(ie!=null&&ie.value&&hr(ie.value.value)){const de=ie.value.value[ee],ae=It(o.getDataType(null),o,p.project);return ae==null||ae.metaSync({value:de},null),{value:ae,valueOwner:o,type:!Gt.includes(r.type)&&ie.type===Ne.Empty?Ne.QueuedAutocalculation:ie.type,inheritanceLink:{sources:[ie],target:o}}}return{value:null,valueOwner:o,type:Gt.includes(r.type)?Ne.Empty:Ne.QueuedAutocalculation,inheritanceLink:null}}const a=(v=p.execution)==null?void 0:v.hasEntity(r),c=((E=p.execution)==null?void 0:E.state)===rx.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!a&&!c&&!i){const ie=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((ie==null?void 0:ie.value)!==null||(ie==null?void 0:ie.valueAsType)!==null)return{value:ie,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const e=o.parent;if(!e)throw new Error(`Couldn't find the parent that generates the output ${o.id}`);switch(e.type){case d.VariableInstance:{const ee=jN(e,p,i);if(ee&&ee.value){const ae=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[ae.name],ve=It(((V=o.declaration)==null?void 0:V.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=_v(e,p,i);if(ee&&ee.value){const ae=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[ae.name],ve=It(((M=o.declaration)==null?void 0:M.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It(((k=o.declaration)==null?void 0:k.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const ie=e.outputs.map(de=>{var ae,fe;if((ae=p.persistedExecutionResults)!=null&&ae.values[de.id]){const ve=(fe=p.persistedExecutionResults)==null?void 0:fe.values[de.id];if(ve.value!==null||ve.valueAsType!==null)return{value:ve,valueOwner:de,type:Ne.ExecutionResult,inheritanceLink:null}}}).filter(de=>!!de),ee=It(((F=o.declaration)==null?void 0:F.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.FunctionCall:{const ie=e.inputs.map(de=>UA(de,p,i)).filter(de=>!!de),ee=It(((j=o.declaration)==null?void 0:j.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.Loop:{const ie=e.inputs.map(de=>UA(de,p,i)).filter(de=>!!de),ee=It(((Y=o.declaration)==null?void 0:Y.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:null}}return null}function xC(o,p,i=!1){var b,w,V;if(![...jt,...Gt].includes(o.parent.type)||!sE(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Uc(o.declaration,p);const r=Vv(o,p,i);if(r&&r.type!==Ne.Empty&&r.type!==Ne.Missing)return r;const a=zn(o.parent),c=Po(a,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(le(o,p.project)),y=It(o.getDataType(null),o,p.project),m=So(o),v=(V=c==null?void 0:c.value)==null?void 0:V.value;if(v&&hr(v)){let $=v[e];v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null);const M=So(o),k=o.getDataType(null);return M&&(!y||!ba(k)&&Fo(y))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}}function $C(o,p,i=!1){var b,w,V,$,M,k,F,j;if(![...jt,...Gt].includes(o.parent.type)||!sE(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Uc(o.declaration,p,i);const r=jt.includes(o.parent.type)?o.parent:zn(o.parent),a=Uc(r,p,i);let c=o;r.type===d.VariableDeclaration&&(c=(o.parent===r?o:r.inputs.find(ie=>{var ee,de;return((ee=ie.declaration)==null?void 0:ee.id)===((de=o.declaration)==null?void 0:de.id)}))||o);const e=uT(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(le(o,p.project)),m=(r.type===d.VariableDeclaration,o.defaultValue||It(o.getDataType(null),o,p.project)),v=(V=a==null?void 0:a.value)==null?void 0:V.value;if(((a==null?void 0:a.type)===Ne.ExecutionResult||(a==null?void 0:a.type)===Ne.Testing)&&!i&&v&&hr(v)){let Y=v[y];return v[y]===void 0&&(Y=null),m==null||m.metaSync({value:Y},null),{value:m,valueOwner:o,type:a.type,inheritanceLink:{sources:a?[a]:[],target:o}}}if(e&&e.type!==Ne.Empty&&e.type!==Ne.Missing)return e;if(v&&hr(v)){let Y=v[y];v[y]===void 0&&(Y=null),m!=null&&m.standaloneParent&&(m==null||m.metaSync({value:Y},null));const ie=So(o),ee=o.getDataType(null),de=ie&&(!m||!ba(ee)&&Fo(m)),ae=!!(($=p.execution)!=null&&$.entities.length),fe=(M=p.execution)==null?void 0:M.hasEntity(r),ve=r.readsValue;if(ve){const ue=(k=p.execution)==null?void 0:k.hasEntity(ve);if(de&&(!ae||ae&&ue&&fe||ae&&!ue&&!fe))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}if(o.readsValue){const ue=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(de&&(!ae||ae&&ue&&fe||ae&&!ue&&!fe))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}return de?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:((j=m==null?void 0:m.parent)==null?void 0:j.id)===(o==null?void 0:o.id)?a.type:Ne.Inherited,inheritanceLink:{sources:a?[a]:[],target:o}}}return uT(o,p,i)}function Vv(o,p,i=!1){var V,$,M,k,F,j;const r=oi(o),a=!!((V=p.execution)!=null&&V.entities.length),c=($=p.execution)==null?void 0:$.hasEntity(r),e=o.readsValue;let y=null;if(e){const Y=(M=p.execution)==null?void 0:M.hasEntity(e);(!a||a&&Y&&c||a&&!Y&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Ne.Testing)&&(y={value:m,valueOwner:o,type:Fo(m)?Ne.Empty:Ne.DefaultValue,inheritanceLink:null}),!y||y.type===Ne.DefaultValue||(y==null?void 0:y.type)===Ne.Empty){const Y=(k=p.persistedExecutionResults)==null?void 0:k.readValue(o.id);if(Y&&!i)return{value:Y,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const ie=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(ie&&!i&&(v===null||v!==Ne.DefaultValue))return{value:ie,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const E=So(o),b=o.getDataType(null),w=E&&(!(y!=null&&y.value)||!ba(b)&&Fo(y==null?void 0:y.value));if(o.readsValue){const Y=(j=p.execution)==null?void 0:j.hasEntity(o.readsValue);if(w&&(!a||a&&Y&&c||a&&!Y&&!c))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}return w?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Ne.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue||!(y!=null&&y.value)?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function uT(o,p,i=!1){var e,y;if(p.execution&&p.execution.hasEntity(o)&&!i){const m=(e=p.lastExecutionResults)==null?void 0:e.readValue(o.id);if(m)return{value:m,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(y=p.localTestValues)==null?void 0:y.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:Vv(o,p,i)}function UA(o,p,i=!1){var r,a;return Gt.includes(o.parent.type)&&(r=zn(o.parent).dataType)!=null&&r.isObject()||jt.includes(o.parent.type)&&(a=o.parent.getDataType(null))!=null&&a.isObject()?xC(o,p,i):Vv(o,p,i)}function t_e(o,p,i=!1){var r,a;return Gt.includes(o.parent.type)&&(r=zn(o.parent).dataType)!=null&&r.isObject()||jt.includes(o.parent.type)&&(a=o.parent.getDataType(null))!=null&&a.isObject()?$C(o,p,i):uT(o,p,i)}function i_e(o,p,i=!1){var E,b;if(!o.static)return null;if(p.execution){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w&&!i)return{value:w,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(b=p.localTestValues)==null?void 0:b.readValue(o.id),a=p.getValueTypePreference(o.id);if(r&&!i&&(a===null||a!==Ne.DefaultValue))return{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const c=o.defaultValue;let e=null;c&&(i||a===null||a!==Ne.Testing)&&(e={value:c,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null});const y=So(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!ba(m)&&Fo(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:bn(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e}function r_e(o,p,i=!1){var E,b;if(p.execution&&p.execution.hasEntity(o)&&!i){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w)return{value:w,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(b=p.localTestValues)==null?void 0:b.readValue(o.id),a=p.getValueTypePreference(o.id);if(r&&!i&&(a===null||a!==Ne.DefaultValue))return{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const c=o.defaultValue;let e=null;c&&(i||a===null||a!==Ne.Testing)&&(e={value:c,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null});const y=So(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!ba(m)&&Fo(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:bn((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e}function Uc(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return QCe(o,p,i);case d.InputMap:return t_e(o,p,i);case d.VariableDeclaration:return UN(o,p,i);case d.VariableInstance:return XCe(o,p,i);case d.OutputMap:return e_e(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return KN(o,p,i);case d.Property:return i_e(o,p,i);case d.ValueDescriptor:return r_e(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return JCe(o,p,i);default:return null}}function Po(o,p,i=!1){switch(o.type){case d.InputMap:return UA(o,p,i);case d.VariableDeclaration:return _v(o,p,i);case d.VariableInstance:return jN(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return KN(o,p,i);default:return null}}function Pbi(o){var p;if(o&&o.type===Ne.DefaultValue&&o.value&&o.valueOwner&&(!Tg.includes(o.valueOwner.type)||((p=o.valueOwner.defaultValue)==null?void 0:p.id)===o.value.id)){const i=It(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Ne.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function Mc(o,p,i,r){let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,V,$,M,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=a?v.defaultValue:e==null?void 0:e.readValue(v.id);F?!a&&F&&F.id===((w=v.defaultValue)==null?void 0:w.id)&&(F=It(v.getDataType(null),v,p)):a?F=uu(v.getDataType(null),v,p,c):F=It(v.getDataType(null),v,p);const j=le(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(j);let ie={};((k=(M=v.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(ie={...ie,...v.dataType.entity.getActiveRawDefaultValue()}),hr(F==null?void 0:F.value)&&(ie={...ie,...F.value}),ie[Y]=i,F==null||F.metaSync({value:ie},c),a||e==null||e.writeValue(v,F);return}}),c}function pT(o,p,i,r){var V,$,M,k;let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=zn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=a?y.defaultValue:e==null?void 0:e.readValue(y.id);v?!a&&v&&v.id===((V=y.defaultValue)==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):a?v=uu(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=le(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(M=y.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),a||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const F=y.inputs.find(j=>{var Y,ie;return((Y=j.declaration)==null?void 0:Y.id)===((ie=o.declaration)==null?void 0:ie.id)||le(j,p)===E});if(F){let j=a?F.defaultValue:e==null?void 0:e.readValue(F.id);j&&j.metaSync({value:null},c),a||e==null||e.removeValue(F.id)}}return c}function n_e(o,p,i){var e,y,m,v,E;let r=!1,a=null,c=null;if(i instanceof Z?(r=!0,a=i,c=null):(a=null,c=i),Gt.includes(o.type)){const b=zn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var V,$,M,k,F,j;if(((V=w.declaration)==null?void 0:V.type)===d.Property&&w.declaration.static){let Y=r?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);Y?!r&&Y&&Y.id===((M=w.declaration.defaultValue)==null?void 0:M.id)&&(Y=It(w.declaration.getDataType(null),w.declaration,p)):r?Y=uu(w.declaration.getDataType(null),w.declaration,p,a):Y=It(w.declaration.getDataType(null),w.declaration,p),Y==null||Y.metaSync({value:null},a),r||c==null||c.removeValue((k=w.declaration)==null?void 0:k.id)}else if(((F=w.declaration)==null?void 0:F.type)===d.Property){let Y=r?((j=w.getDefaultValue)==null?void 0:j.call(w))||null:c==null?void 0:c.readValue(w.id);Y&&Y.metaSync({value:null},a),r||c==null||c.removeValue(w.id)}})}else o.type===d.InputMap?((y=o.declaration)==null?void 0:y.type)===d.Property&&o.declaration.static?Mc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((m=o.declaration)==null?void 0:m.type)===d.Property&&pT(o,p,null,i):o.type===d.OutputMap?((v=o.declaration)==null?void 0:v.type)===d.Property&&o.declaration.static?Mc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((E=o.declaration)==null?void 0:E.type)===d.Property&&pT(o,p,null,i):o.type===d.Property&&o.static&&Mc(o,p,null,i);return a}function a_e(o,p,i,r){var y,m,v,E,b,w,V;let a=!1,c=null,e=null;if(r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r),Gt.includes(p.type)){const $=zn(p);if((y=$.dataType)!=null&&y.isObject()){let M={};((v=(m=$.dataType)==null?void 0:m.entity)==null?void 0:v.type)===d.DefinitionEntity&&(M={...M,...$.dataType.entity.getActiveRawDefaultValue()});const k=hr(o)?o:M;$.inputs.forEach(F=>{var j,Y,ie,ee,de,ae;if(((j=F.declaration)==null?void 0:j.type)===d.Property&&F.declaration.static){let fe=a?((Y=p.getDefaultValue)==null?void 0:Y.call(p))||null:e==null?void 0:e.readValue(F.declaration.id);fe?!a&&fe&&fe.id===((ie=F.declaration.defaultValue)==null?void 0:ie.id)&&(fe=It(F.declaration.getDataType(null),F.declaration,i)):a?fe=uu(F.declaration.getDataType(null),F.declaration,i,c):fe=It(F.declaration.getDataType(null),F.declaration,i);const ve=le(F,i),ue=F.codeName||((ee=F.declaration)==null?void 0:ee.codeName)||Hi(ve),ye=k[ue];fe==null||fe.metaSync({value:ye},c),a||e==null||e.writeValue(F.declaration,fe)}else if(((de=F.declaration)==null?void 0:de.type)===d.Property){let fe=a?((ae=p.getDefaultValue)==null?void 0:ae.call(p))||null:e==null?void 0:e.readValue(F.id);fe&&fe.metaSync({value:null},c),a||e==null||e.removeValue(F.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?Mc(p.declaration,i,o,r):Gt.includes(p.parent.type)&&((b=p.declaration)==null?void 0:b.type)===d.Property&&pT(p,i,o,r):p.type===d.OutputMap?((w=p.declaration)==null?void 0:w.type)===d.Property&&p.declaration.static?Mc(p.declaration,i,null,r):Gt.includes(p.parent.type)&&((V=p.declaration)==null?void 0:V.type)===d.Property&&pT(p,i,null,r):p.type===d.Property&&p.static&&Mc(p,i,o,r);return c}function Nbi(o,p,i){const r=Bo(o,p);let a=!1,c=null,e=null;return i instanceof Z?(a=!0,c=i,e=null):(c=null,e=i),r.forEach(y=>{var v;let m=a?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);a?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),n_e(y,p,i)}),c}function xbi(o,p,i,r){const a=Bo(p,i);let c=!1,e=null,y=null;return r instanceof Z?(c=!0,e=r,y=null):(e=null,y=r),i.diggestedBuiltInBaseEntitiesIds.has(p.id)||a.forEach(m=>{var E,b,w,V;if(i.diggestedBuiltInBaseEntitiesIds.has(m.id))return;let v=null;if(c){const $=((E=m.getDefaultValue)==null?void 0:E.call(m))||null;$&&(i.diggestedBuiltInBaseEntitiesIds.has($.id)||((b=$.parent)==null?void 0:b.id)!==m.id?v=$.clone(e,m):v=$)}else v=y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((V=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:V.id)&&(v=It(m.getDataType(null),m,i)):c?(v=uu(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=It(m.getDataType(null),m,i),v==null||v.setValueAsType(null,e),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),a_e(o,m,i,r)}),e}function Bc(o,p,i,r){let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,V,$,M,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=a?v.defaultValue:e==null?void 0:e.readValue(v.id);F?!a&&F&&F.id===((w=v.defaultValue)==null?void 0:w.id)&&(F=It(v.getDataType(null),v,p)):a?F=uu(v.getDataType(null),v,p,c):F=It(v.getDataType(null),v,p);const j=le(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(j);let ie={};((k=(M=v.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(ie={...ie,...v.dataType.entity.getActiveRawDefaultValue()}),hr(F==null?void 0:F.value)&&(ie={...ie,...F.value}),Array.isArray(i)?ie[Y]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:ie[Y]=(i==null?void 0:i.toShallowJSON())||null,F==null||F.metaSync({value:ie},c),a||e==null||e.writeValue(v,F);return}}),c}function cT(o,p,i,r){var V,$,M,k;let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=zn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=a?y.defaultValue:e==null?void 0:e.readValue(y.id);v?!a&&v&&v.id===((V=y.defaultValue)==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):a?v=uu(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=le(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(M=y.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),Array.isArray(i)?w[b]=(i==null?void 0:i.map(F=>F.toShallowJSON()))||null:w[b]=(i==null?void 0:i.toShallowJSON())||null,v==null||v.metaSync({value:w},c),a||e==null||e.writeValue(y,v),i==null&&o.type===d.OutputMap){const F=y.inputs.find(j=>{var Y,ie;return((Y=j.declaration)==null?void 0:Y.id)===((ie=o.declaration)==null?void 0:ie.id)||le(j,p)===E});if(F){let j=a?F.defaultValue:e==null?void 0:e.readValue(F.id);j&&(Array.isArray(i)?j==null||j.setValueAsTypeList(i,c):j==null||j.setValueAsTypeSingle(i,c)),a||e==null||e.removeValue(F.id)}}return c}function s_e(o,p,i){var r,a,c,e;return o.type===d.InputMap?((r=o.declaration)==null?void 0:r.type)===d.Property&&o.declaration.static?Bc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((a=o.declaration)==null?void 0:a.type)===d.Property&&cT(o,p,null,i):o.type===d.OutputMap?((c=o.declaration)==null?void 0:c.type)===d.Property&&o.declaration.static?Bc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((e=o.declaration)==null?void 0:e.type)===d.Property&&cT(o,p,null,i):o.type===d.Property&&o.static&&Bc(o,p,null,i),i}function l_e(o,p,i,r){var a,c,e,y;return p.type===d.InputMap?((a=p.declaration)==null?void 0:a.type)===d.Property&&p.declaration.static?Bc(p.declaration,i,o,r):Gt.includes(p.parent.type)&&((c=p.declaration)==null?void 0:c.type)===d.Property&&cT(p,i,o,r):p.type===d.OutputMap?((e=p.declaration)==null?void 0:e.type)===d.Property&&p.declaration.static?Bc(p.declaration,i,null,r):Gt.includes(p.parent.type)&&((y=p.declaration)==null?void 0:y.type)===d.Property&&cT(p,i,null,r):p.type===d.Property&&p.static&&Bc(p,i,o,r),r}function $bi(o,p,i){const r=Bo(o,p);let a=!1,c=null,e=null;return i instanceof Z?(a=!0,c=i,e=null):(c=null,e=i),r.forEach(y=>{var v;let m=a?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);a?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),s_e(y,p,i)}),c}function Lbi(o,p,i,r){const a=Bo(p,i);let c=!1,e=null,y=null;return r instanceof Z?(c=!0,e=r,y=null):(e=null,y=r),a.forEach(m=>{var E,b,w;let v=c?(E=m.getDefaultValue)==null?void 0:E.call(m):y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((w=(b=m.getDefaultValue)==null?void 0:b.call(m))==null?void 0:w.id)&&(v=It(m.getDataType(null),m,m.project)):c?v=uu(m.getDataType(null),m,i,e):v=It(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),v==null||v.metaSync({value:null},e),c||y==null||y.writeValue(m,v),l_e(o,m,i,r)}),e}class IR{constructor(p,i){this.extensionsRegistry=p,this.contextType=i,this.off=this.extensionsRegistry.off.bind(this.extensionsRegistry),this.on=this.extensionsRegistry.on.bind(this.extensionsRegistry),this.emit=this.extensionsRegistry.emit.bind(this.extensionsRegistry),this.emitAsync=this.extensionsRegistry.emitAsync.bind(this.extensionsRegistry),this.emitAsyncAll=this.extensionsRegistry.emitAsyncAll.bind(this.extensionsRegistry),this.emitAsyncAllSettled=this.extensionsRegistry.emitAsyncAllSettled.bind(this.extensionsRegistry),this.emitAsyncSequentially=this.extensionsRegistry.emitAsyncSequentially.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAll=this.extensionsRegistry.emitAsyncSequentiallyAll.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAllSettled=this.extensionsRegistry.emitAsyncSequentiallyAllSettled.bind(this.extensionsRegistry)}on(p,i){this.extensionsRegistry.on(p,i)}emit(p,...i){this.extensionsRegistry.emit(p,...i)}off(p,i){this.extensionsRegistry.off(p,i)}emitAsync(p,...i){return this.extensionsRegistry.emitAsync(p,...i)}emitAsyncAll(p,...i){return this.extensionsRegistry.emitAsyncAll(p,...i)}emitAsyncAllSettled(p,...i){return this.extensionsRegistry.emitAsyncAllSettled(p,...i)}emitAsyncSequentially(p,...i){return this.extensionsRegistry.emitAsyncSequentially(p,...i)}emitAsyncSequentiallyAll(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAll(p,...i)}emitAsyncSequentiallyAllSettled(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled(p,...i)}}var Ee=(o=>(o[o.High=1]="High",o[o.Normal=5]="Normal",o[o.Low=10]="Low",o))(Ee||{}),X=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(X||{}),be=(o=>(o.All="*",o.OnAll="on:*",o.EmitAll="emit:*",o.ReadAll="read:*",o.WriteAll="write:*",o.UpdateAll="update:*",o.DoAll="do:*",o.OnLogicAll="on:logic:*",o.EmitLogicAll="emit:logic:*",o.ReadLogicAll="read:logic:*",o.WriteLogicAll="write:logic:*",o.UpdateLogicAll="update:logic:*",o.DoLogicAll="do:logic:*",o.OnGUIAll="on:gui:*",o.EmitGUIAll="emit:gui:*",o.ReadGUIAll="read:gui:*",o.WriteGUIAll="write:gui:*",o.UpdateGUIAll="update:gui:*",o.DoGUIAll="do:gui:*",o.OnEditorAll="on:editor:*",o.EmitEditorAll="emit:editor:*",o.ReadEditorAll="read:editor:*",o.WriteEditorAll="write:editor:*",o.UpdateEditorAll="update:editor:*",o.DoEditorAll="do:editor:*",o.OnCompileBefore="on:compile:before:DefinitionEntity",o.OnCompileDefault="on:compile:default:DefinitionEntity",o.OnCompileAfter="on:compile:after:DefinitionEntity",o.EmitCompile="emit:compile:DefinitionEntity",o.DoEditorPublish="do:editor:publish",o.PostGUICanvasSlotNewToolbarButton="write:gui:canvas:slot:toolbar-button",o.ReadGUICanvasSlotToolbarButtons="read:gui:canvas:slot:toolbar-buttons",o.UpdateGUIGlobalTheme="update:gui:global:theme",o))(be||{});class o_e{constructor(p){I(this,"state",new Map);p&&(this.state=new Map(Object.entries(p)))}get(p){return this.state.get(p)}set(p,i){this.state.set(p,i)}delete(p){this.state.delete(p)}}class d_e extends o_e{constructor(p,i){super(i),this.parentExtension=p}}class ge{constructor(p,i){I(this,"manifest");I(this,"module");I(this,"state");this.extensionsRegistry=p,this.state=new d_e(this,i)}}class LC extends IR{constructor(i,r){super(i,X.Logic);I(this,"id");this._project=r,this.id=r.id}get type(){return this._project.type}get name(){return this._project.name}get description(){return this._project.description}get version(){return this._project.version}get createdAt(){return this._project.createdAt}get previousVersion(){return this._project.previousVersion}get author(){return this._project.author}get deleted(){return this._project.deleted}get editable(){return this._project.editable}get deletable(){return this._project.deletable}get entities(){return[...this._project.entities]}get projects(){return[...this._project.projects]}get functions(){return[...this._project.functions]}get events(){return[...this._project.events]}get variableDeclarations(){return[...this._project.variableDeclarations]}get variableInstances(){return[...this._project.variableInstances]}get conditions(){return[...this._project.conditions]}get operations(){return[...this._project.operations]}get functionCalls(){return[...this._project.functionCalls]}get loops(){return[...this._project.loops]}get searches(){return[...this._project.searches]}get primitives(){return[...this._project.primitives]}get builtInBaseEntities(){return[...this._project.builtInBaseEntities]}get operationDeclarations(){return[...this._project.operationDeclarations]}get globalEventActionDescriptors(){return[...this._project.globalEventActionDescriptors]}get loopDeclarations(){return[...this._project.loopDeclarations]}get loopDeclarationsBodies(){return[...this._project.loopDeclarationsBodies]}get conditionDeclarations(){return[...this._project.conditionDeclarations]}get valueDescriptors(){return[...this._project.valueDescriptors]}get dataTypes(){return[...this._project.dataTypes]}get errors(){return[...this._project.errors]}get history(){return[...this._project.history]}get undoableStackValueIndex(){return this._project.undoableStackValueIndex}get knownVersions(){return this._project.knownVersions}get activeVersion(){return this._project.activeVersion}get initialized(){return this._project.initialized}get startedInitialization(){return this._project.startedInitialization}closePersistChangeSetsSequentially(){return this._project.closePersistChangeSetsSequentially()}persistChangeSetSequentially(i){return this._project.persistChangeSetSequentially(i)}toLatestChangeSet(i,r,a,c=!1,e="here-this"){return this._project.toLatestChangeSet(i,r,a,c,e)}addChangeSet(i){return this._project.addChangeSet(i)}discardChangeSet(i){return this._project.discardChangeSet(i)}subscribeDependents(i){return this._project.subscribeDependents(i)}unsubscribeDependents(i){return this._project.unsubscribeDependents(i)}syncDependents(i){return this._project.syncDependents(i)}onDetachedDependencyRemoved(i,r,a){return this._project.onDetachedDependencyRemoved(i,r,a)}onDetachedDependencyRestored(i,r,a){return this._project.onDetachedDependencyRestored(i,r,a)}increaseVersion(i){return this._project.increaseVersion(i)}captureVersion(){return this._project.captureVersion()}restoreVersion(i){return this._project.restoreVersion(i)}updateWithShallowTransfer(i,r){return this._project.updateWithShallowTransfer(i,r)}hydrateAncestors(){return this._project.hydrateAncestors()}afterAllChildrenInitialized(i=null){return this._project.afterAllChildrenInitialized(i)}addSelfToProject(i){return this._project.addSelfToProject(i)}get instancesList(){return[...this._project.instancesList]}isOperationDeclaration(i){return this._project.isOperationDeclaration(i)}isGlobalEventActionDescriptor(i){return this._project.isGlobalEventActionDescriptor(i)}isLoopDeclaration(i){return this._project.isLoopDeclaration(i)}isConditionDeclaration(i){return this._project.isConditionDeclaration(i)}findSubscribedBuiltInInstance(i){return this._project.findSubscribedBuiltInInstance(i)}get(i){return this._project.get(i)}getDeleted(i){return this._project.getDeleted(i)}getManaged(i){return this._project.getManaged(i)}getBuiltIn(i){return this._project.getBuiltIn(i)}findSubscribedInstanceFromReference(i){return this._project.findSubscribedInstanceFromReference(i)}findSubscribedBuiltInInstanceFromReference(i){return this._project.findSubscribedBuiltInInstanceFromReference(i)}metaSync(i,r){return this._project.metaSync(i,r)}getAllBuiltInIds(){return this._project.getAllBuiltInIds()}getAllBuiltIn(){return this._project.getAllBuiltIn()}toFlat(i){return this._project.toFlat(i)}toFlatIds(i){return this._project.toFlatIds(i)}toMeta(){return this._project.toMeta()}toJSON(i){return this._project.toJSON(i)}toJSONClone(i){return this._project.toJSONClone(i)}toReference(i){return this._project.toReference(i)}toShallowJSON(i){return this._project.toShallowJSON(i)}toFlatJSON(i){return this._project.toFlatJSON(i)}toGenerationTarget(i){return this._project.toGenerationTarget(i)}toFlatGenerationTarget(i){return this._project.toFlatGenerationTarget(i)}clearErrors(){return this._project.clearErrors()}validate(){return this._project.validate()}validateChildren(){return this._project.validateChildren()}getErrors(){return this._project.getErrors()}getShallowErrors(){return this._project.getShallowErrors()}addDefinitionEntity(i){return this._project.addDefinitionEntity(i)}addFunctionDeclaration(i){return this._project.addFunctionDeclaration(i)}addFunctionCall(i){return this._project.addFunctionCall(i)}addVariableDeclaration(i){return this._project.addVariableDeclaration(i)}addVariableInstance(i){return this._project.addVariableInstance(i)}addInstalledProject(i){return this._project.addInstalledProject(i)}addGlobalEvent(i){return this._project.addGlobalEvent(i)}addCondition(i){return this._project.addCondition(i)}addOperation(i){return this._project.addOperation(i)}addLoop(i){return this._project.addLoop(i)}addSearch(i){return this._project.addSearch(i)}removeDefinitionEntity(i){return this._project.removeDefinitionEntity(i)}removeCondition(i){return this._project.removeCondition(i)}removeOperation(i){return this._project.removeOperation(i)}removeLoop(i){return this._project.removeLoop(i)}removeSearch(i){return this._project.removeSearch(i)}removeFunctionCall(i){return this._project.removeFunctionCall(i)}removeVariableInstance(i){return this._project.removeVariableInstance(i)}removeVariableDeclaration(i){return this._project.removeVariableDeclaration(i)}removeFunctionDeclaration(i){return this._project.removeFunctionDeclaration(i)}removeInstalledProject(i){return this._project.removeInstalledProject(i)}removeGlobalEvent(i){return this._project.removeGlobalEvent(i)}removeTopLevelVariableDeclaration(i){return this._project.removeTopLevelVariableDeclaration(i)}getEntryPoints(){return this._project.getEntryPoints()}getTerminationStatements(){return this._project.getTerminationStatements()}getFunctionDeclaration(i){return this._project.getFunctionDeclaration(i)}getConditions(){return this._project.getConditions()}getOperations(){return this._project.getOperations()}getVariables(){return this._project.getVariables()}getVariableInstances(){return this._project.getVariableInstances()}getVariableDeclarations(){return this._project.getVariableDeclarations()}getLoops(){return this._project.getLoops()}getSearches(){return this._project.getSearches()}getBuiltInPersistedEntity(){return this._project.getBuiltInPersistedEntity()}requestActiveDynamicValue(i,r=!1){return this._project.requestActiveDynamicValue(i,r)}undo(){return this._project.undo()}redo(){return this._project.redo()}applyExternalChangeSet(i){return this._project.applyExternalChangeSet(i)}toFullProjectTransfer(){return this._project.toFullProjectTransfer()}}function Mbi(o,p){return p instanceof LC?p:new LC(o,p)}const Oy="built-in-function-implementations__",Oe="operations-implementations__",Ba="conditions-implementations__",Ae={UUID:"uuid",SEARCH_NODE_IMPLEMENTATION:"search-node-implementation",BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION:Oy+Er.AbortExecution,BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY:Oy+Er.CreatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY:Oy+Er.UpdatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY:Oy+Er.DeletePersistedEntity,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY:Oe+Nt.Empty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY:Oe+Nt.NotEmpty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL:Oe+Nt.PrimitiveEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL:Oe+Nt.PrimitiveNotEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__HTTP_REQUEST:Oe+Jn.HttpRequest,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY:Oe+Ce.Validate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL:Oe+Ki.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+Ki.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+Ki.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+re.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT:Oe+re.Split,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS:Oe+re.DeleteLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS:Oe+re.DeleteFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX:Oe+re.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX:Oe+re.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS:Oe+re.ReplaceFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS:Oe+re.ReplaceLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL:Oe+re.ReplaceAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX:Oe+re.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM:Oe+re.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST:Oe+re.GetFirst,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST:Oe+re.GetLast,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND:Oe+re.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND:Oe+re.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE:Oe+re.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH:Oe+re.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS:Oe+re.GetFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS:Oe+re.GetLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE:Oe+re.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT:Oe+re.Concat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF:Oe+re.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF:Oe+re.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE:Oe+re.Unique,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN:Oe+re.Flatten,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT:Oe+re.Sort,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE:Oe+re.Shuffle,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK:Oe+re.Chunk,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START:Oe+re.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END:Oe+re.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT:Oe+re.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH:Oe+q.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+q.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+q.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+q.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+re.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL:Oe+re.ContainsAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY:Oe+re.ContainsAny,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX:Oe+q.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+q.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+q.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+q.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+q.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+q.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+q.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+q.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+q.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+q.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+q.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+q.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+q.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+q.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+q.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+q.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+q.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+q.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+q.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+q.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+q.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+q.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+q.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+q.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+q.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+q.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+q.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+q.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+q.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+q.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+q.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+q.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+q.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+q.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+q.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+q.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+q.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+q.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+q.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+q.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+q.RemoveSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION:Oe+te.Addition,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION:Oe+te.Subtraction,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION:Oe+te.Multiplication,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION:Oe+te.Division,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER:Oe+te.Remainder,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION:Oe+te.Exponentiation,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE:Oe+te.Absolute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN:Oe+te.Sign,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND:Oe+te.Round,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE:Oe+te.Negate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR:Oe+te.Floor,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL:Oe+te.Ceil,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP:Oe+te.Clamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC:Oe+te.Trunc,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS:Oe+te.RoundToDecimals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP:Oe+te.SnapToStep,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE:Oe+te.MapRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE:Oe+te.Average,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN:Oe+te.Median,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF:Oe+te.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF:Oe+te.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT:Oe+te.SquareRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT:Oe+te.CubeRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT:Oe+te.NthRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP:Oe+te.Exp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL:Oe+te.LogNatural,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10:Oe+te.Log10,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN:Oe+te.Sin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS:Oe+te.Cos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN:Oe+te.Tan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN:Oe+te.Asin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS:Oe+te.Acos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN:Oe+te.Atan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2:Oe+te.Atan2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS:Oe+te.ToRadians,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES:Oe+te.ToDegrees,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF:Oe+te.PercentOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE:Oe+te.PercentageChange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN:Oe+te.MoreThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN:Oe+te.LessThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL:Oe+te.LessThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL:Oe+te.MoreThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER:Oe+et.GenerateRandomInteger,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT:Oe+et.GenerateRandomFloat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL:Oe+et.GenerateRandomHexadecimal,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62:Oe+et.GenerateRandomBase62,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64:Oe+et.GenerateRandomBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC:Oe+et.GenerateRandomAlphanumeric,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER:Oe+et.GenerateIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4:Oe+et.GenerateRandomUUIDv4,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER:Oe+et.GenerateShortIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN:Oe+et.GenerateHexadecimalToken,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH:Oe+q.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+q.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+q.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+q.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+K.GetCurrentTimestamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE:Oe+K.FormatDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE:Oe+K.ParseDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE:Oe+K.AddToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE:Oe+K.SubtractFromDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES:Oe+K.DifferenceBetweenDates,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE:Oe+K.ToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX:Oe+K.ToUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX:Oe+K.FromUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING:Oe+K.ToISOString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR:Oe+K.GetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH:Oe+K.GetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE:Oe+K.GetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR:Oe+K.GetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE:Oe+K.GetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND:Oe+K.GetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND:Oe+K.GetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY:Oe+K.GetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR:Oe+K.GetWeekOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER:Oe+K.GetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR:Oe+K.GetDayOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH:Oe+K.GetDaysInMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE:Oe+K.GetCurrentIanaTimeZone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR:Oe+K.SetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH:Oe+K.SetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE:Oe+K.SetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR:Oe+K.SetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE:Oe+K.SetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND:Oe+K.SetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND:Oe+K.SetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY:Oe+K.SetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER:Oe+K.SetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF:Oe+K.StartOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF:Oe+K.EndOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO:Oe+K.RoundTo,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE:Ba+K.IsBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER:Ba+K.IsAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME:Ba+K.IsSame,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE:Ba+K.IsSameOrBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER:Ba+K.IsSameOrAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN:Ba+K.IsBetween,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID:Ba+K.IsValid,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR:Ba+K.IsLeapYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE:Oe+K.ClampToRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF:Oe+K.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF:Oe+K.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW:Oe+K.FromNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW:Oe+K.ToNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF:Oe+K.HumanizeDiff,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS:Oe+K.AddBusinessDays,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY:Oe+K.NextWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY:Oe+K.PreviousWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC:Oe+K.ToUTC,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE:Oe+K.ConvertTimezone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET:Oe+K.GetTimezoneOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET:Oe+K.SetUTCOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_READ_KEY:Oe+Ce.ReadKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_KEY:Oe+Ce.WriteKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_DELETE_KEY:Oe+Ce.DeleteKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_READ_NESTED_KEY:Oe+Ce.ReadNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_NESTED_KEY:Oe+Ce.WriteNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_DELETE_NESTED_KEY:Oe+Ce.DeleteNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_SAFE_NESTED_KEY_RECURSIVELY:Oe+Ce.WriteSafeNestedKeyRecursively,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_KEY:Ba+Ce.HasKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_NESTED_KEY:Ba+Ce.HasNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEY_VALUE_EQUALS:Ba+Ce.KeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_NESTED_KEY_VALUE_EQUALS:Ba+Ce.NestedKeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_IS_INSTANCE_OF_TYPE:Ba+Ce.IsInstanceOfType,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_MERGE:Oe+Ce.Merge,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEYS:Oe+Ce.Keys,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_VALUES:Oe+Ce.Values,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_ENTRIES:Oe+Ce.Entries,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_GET_TYPE_OF:Oe+ze.GetTypeOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HASH:Oe+li.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+li.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+li.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+li.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+tn.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+tn.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+er.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+er.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+er.DecodeJwt,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_FROM_BYTES_TO_STRING:Oe+ze.FromBytesToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_BYTES:Oe+ze.ToBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_NUMBER:Oe+ze.ToNumber,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_STRING:Oe+ze.ToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64:Oe+ze.EncodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64:Oe+ze.DecodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64URL:Oe+ze.EncodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64URL:Oe+ze.DecodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_HEX:Oe+ze.EncodeHex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_HEX:Oe+ze.DecodeHex,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_PARSE:Oe+en.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+en.Stringify};class u_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION,version:"1.0.0",description:'Implementation for the built-in function "Abort Execution". It terminates the execution of the current entity being run.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class p_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Delete Persisted Entity". It deletes the current entity as an entry in the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class c_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Create Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class f_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Update Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class y_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.SEARCH_NODE_IMPLEMENTATION,version:"1.0.0",description:"Implementation for search nodes when they get executed and query data.",initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({error:"Search module not implemented",data:null})})}}class h_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.UUID,version:"1.0.0",description:"UUID generation module, for all contexts and runtimes",initPriority:Ee.High,permissions:[be.All],contexts:[]});I(this,"module",f_)}}const m_e=o=>o.map(p=>{var i,r;return((i=p.value)==null?void 0:i.valueAsType)??((r=p.value)==null?void 0:r.value)});class T_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY,version:"1.0.0",description:"Comparison: Empty (!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.Empty);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=m_e(r),c=!a;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class v_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY,version:"1.0.0",description:"Comparison: NotEmpty (!!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.NotEmpty);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=m_e(r),c=!!a;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}const cg=class cg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveEqual (typed equality / deep JSON equality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.PrimitiveEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{var a,c,e,y,m,v;try{const E=(c=(a=r[0])==null?void 0:a.value)==null?void 0:c.name,b=(y=(e=r[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=r[1])==null?void 0:m.value)==null?void 0:v.value;let V=!1;return E&&cg.primitiveSet.has(E)?V=b===w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)===JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(cg,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let jA=cg;const fg=class fg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveNotEqual (typed inequality / deep JSON inequality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.PrimitiveNotEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{var a,c,e,y,m,v;try{const E=(c=(a=r[0])==null?void 0:a.value)==null?void 0:c.name,b=(y=(e=r[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=r[1])==null?void 0:m.value)==null?void 0:v.value;let V=!1;return E&&fg.primitiveSet.has(E)?V=b!==w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)!==JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(fg,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let KA=fg;var E_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="minute",r=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(c,e,y){var m=e.prototype;y.utc=function(M){var k={date:M,utc:!0,args:arguments};return new e(k)},m.utc=function(M){var k=y(this.toDate(),{locale:this.$L,utc:!0});return M?k.add(this.utcOffset(),i):k},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(M){M.utc&&(this.$u=!0),this.$utils().u(M.$offset)||(this.$offset=M.$offset),v.call(this,M)};var E=m.init;m.init=function(){if(this.$u){var M=this.$d;this.$y=M.getUTCFullYear(),this.$M=M.getUTCMonth(),this.$D=M.getUTCDate(),this.$W=M.getUTCDay(),this.$H=M.getUTCHours(),this.$m=M.getUTCMinutes(),this.$s=M.getUTCSeconds(),this.$ms=M.getUTCMilliseconds()}else E.call(this)};var b=m.utcOffset;m.utcOffset=function(M,k){var F=this.$utils().u;if(F(M))return this.$u?0:F(this.$offset)?b.call(this):this.$offset;if(typeof M=="string"&&(M=function(ee){ee===void 0&&(ee="");var de=ee.match(r);if(!de)return null;var ae=(""+de[0]).match(a)||["-",0,0],fe=ae[0],ve=60*+ae[1]+ +ae[2];return ve===0?0:fe==="+"?ve:-ve}(M),M===null))return this;var j=Math.abs(M)<=16?60*M:M;if(j===0)return this.utc(k);var Y=this.clone();if(k)return Y.$offset=j,Y.$u=!1,Y;var ie=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(j+ie,i)).$offset=j,Y.$x.$localOffset=ie,Y};var w=m.format;m.format=function(M){var k=M||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,k)},m.valueOf=function(){var M=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*M},m.isUTC=function(){return!!this.$u},m.toISOString=function(){return this.toDate().toISOString()},m.toString=function(){return this.toDate().toUTCString()};var V=m.toDate;m.toDate=function(M){return M==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():V.call(this)};var $=m.diff;m.diff=function(M,k,F){if(M&&this.$u===M.$u)return $.call(this,M,k,F);var j=this.local(),Y=y(M).local();return $.call(j,Y,k,F)}}})})(E_e);var Bbi=E_e.exports;const Gbi=es(Bbi);var b_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(a,c,e){var y,m=function(w,V,$){$===void 0&&($={});var M=new Date(w),k=function(F,j){j===void 0&&(j={});var Y=j.timeZoneName||"short",ie=F+"|"+Y,ee=r[ie];return ee||(ee=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:F,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),r[ie]=ee),ee}(V,$);return k.formatToParts(M)},v=function(w,V){for(var $=m(w,V),M=[],k=0;k<$.length;k+=1){var F=$[k],j=F.type,Y=F.value,ie=i[j];ie>=0&&(M[ie]=parseInt(Y,10))}var ee=M[3],de=ee===24?0:ee,ae=M[0]+"-"+M[1]+"-"+M[2]+" "+de+":"+M[4]+":"+M[5]+":000",fe=+w;return(e.utc(ae).valueOf()-(fe-=fe%1e3))/6e4},E=c.prototype;E.tz=function(w,V){w===void 0&&(w=y);var $,M=this.utcOffset(),k=this.toDate(),F=k.toLocaleString("en-US",{timeZone:w}),j=Math.round((k-new Date(F))/1e3/60),Y=15*-Math.round(k.getTimezoneOffset()/15)-j;if(!Number(Y))$=this.utcOffset(0,V);else if($=e(F,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),V){var ie=$.utcOffset();$=$.add(M-ie,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var V=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),V,{timeZoneName:w}).find(function(M){return M.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,V){if(!this.$x||!this.$x.$timezone)return b.call(this,w,V);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,V).tz(this.$x.$timezone,!0)},e.tz=function(w,V,$){var M=$&&V,k=$||V||y,F=v(+e(),k);if(typeof w!="string")return e(w).tz(k);var j=function(de,ae,fe){var ve=de-60*ae*1e3,ue=v(ve,fe);if(ae===ue)return[ve,ae];var ye=v(ve-=60*(ue-ae)*1e3,fe);return ue===ye?[ve,ue]:[de-60*Math.min(ue,ye)*1e3,Math.max(ue,ye)]}(e.utc(w,M).valueOf(),F,k),Y=j[0],ie=j[1],ee=e(Y).utcOffset(ie);return ee.$x.$timezone=k,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(b_e);var kbi=b_e.exports;const Ubi=es(kbi);var A_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){r.prototype.isBetween=function(c,e,y,m){var v=a(c),E=a(e),b=(m=m||"()")[0]==="(",w=m[1]===")";return(b?this.isAfter(v,y):!this.isBefore(v,y))&&(w?this.isBefore(E,y):!this.isAfter(E,y))||(b?this.isBefore(v,y):!this.isAfter(v,y))&&(w?this.isAfter(E,y):!this.isBefore(E,y))}}})})(A_e);var jbi=A_e.exports;const Kbi=es(jbi);var g_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isSameOrAfter=function(a,c){return this.isSame(a,c)||this.isAfter(a,c)}}})})(g_e);var Fbi=g_e.exports;const Sbi=es(Fbi);var I_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isSameOrBefore=function(a,c){return this.isSame(a,c)||this.isBefore(a,c)}}})})(I_e);var qbi=I_e.exports;const Zbi=es(qbi);var R_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="week",r="year";return function(a,c,e){var y=c.prototype;y.week=function(m){if(m===void 0&&(m=null),m!==null)return this.add(7*(m-this.week()),"day");var v=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var E=e(this).startOf(r).add(1,r).date(v),b=e(this).endOf(i);if(E.isBefore(b))return 1}var w=e(this).startOf(r).date(v).startOf(i).subtract(1,"millisecond"),V=this.diff(w,i,!0);return V<0?e(this).startOf("week").week():Math.ceil(V)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(R_e);var Hbi=R_e.exports;const Wbi=es(Hbi);var D_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="day";return function(r,a,c){var e=function(v){return v.add(4-v.isoWeekday(),i)},y=a.prototype;y.isoWeekYear=function(){return e(this).year()},y.isoWeek=function(v){if(!this.$utils().u(v))return this.add(7*(v-this.isoWeek()),i);var E,b,w,V,$=e(this),M=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),V=4-w.isoWeekday(),w.isoWeekday()>4&&(V+=7),w.add(V,i));return $.diff(M,"week")+1},y.isoWeekday=function(v){return this.$utils().u(v)?this.day()||7:this.day(this.day()%7?v:v-7)};var m=y.startOf;y.startOf=function(v,E){var b=this.$utils(),w=!!b.u(E)||E;return b.p(v)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(v,E)}}})})(D_e);var zbi=D_e.exports;const Jbi=es(zbi);var w_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="month",r="quarter";return function(a,c){var e=c.prototype;e.quarter=function(v){return this.$utils().u(v)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(v-1))};var y=e.add;e.add=function(v,E){return v=Number(v),this.$utils().p(E)===r?this.add(3*v,i):y.bind(this)(v,E)};var m=e.startOf;e.startOf=function(v,E){var b=this.$utils(),w=!!b.u(E)||E;if(b.p(v)===r){var V=this.quarter()-1;return w?this.month(3*V).startOf(i).startOf("day"):this.month(3*V+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(w_e);var Ybi=w_e.exports;const Xbi=es(Ybi);var O_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){r.prototype.dayOfYear=function(c){var e=Math.round((a(this).startOf("day")-a(this).startOf("year"))/864e5)+1;return c==null?e:this.add(c-e,"day")}}})})(O_e);var Qbi=O_e.exports;const eAi=es(Qbi);var C_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){i=i||{};var c=r.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function y(v,E,b,w){return c.fromToBase(v,E,b,w)}a.en.relativeTime=e,c.fromToBase=function(v,E,b,w,V){for(var $,M,k,F=b.$locale().relativeTime||e,j=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=j.length,ie=0;ie<Y;ie+=1){var ee=j[ie];ee.d&&($=w?a(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var de=(i.rounding||Math.round)(Math.abs($));if(k=$>0,de<=ee.r||!ee.r){de<=1&&ie>0&&(ee=j[ie-1]);var ae=F[ee.l];V&&(de=V(""+de)),M=typeof ae=="string"?ae.replace("%d",de):ae(de,E,ee.l,k);break}}if(E)return M;var fe=k?F.future:F.past;return typeof fe=="function"?fe(M):fe.replace("%s",M)},c.to=function(v,E){return y(v,E,this,!0)},c.from=function(v,E){return y(v,E,this)};var m=function(v){return v.$u?a.utc():a()};c.toNow=function(v){return this.to(m(this),v)},c.fromNow=function(v){return this.from(m(this),v)}}})})(C_e);var tAi=C_e.exports;const iAi=es(tAi);var __e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i,r,a=1e3,c=6e4,e=36e5,y=864e5,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v=31536e6,E=2628e6,b=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:v,months:E,days:y,hours:e,minutes:c,seconds:a,milliseconds:1,weeks:6048e5},V=function(de){return de instanceof ie},$=function(de,ae,fe){return new ie(de,fe,ae.$l)},M=function(de){return r.p(de)+"s"},k=function(de){return de<0},F=function(de){return k(de)?Math.ceil(de):Math.floor(de)},j=function(de){return Math.abs(de)},Y=function(de,ae){return de?k(de)?{negative:!0,format:""+j(de)+ae}:{negative:!1,format:""+de+ae}:{negative:!1,format:""}},ie=function(){function de(fe,ve,ue){var ye=this;if(this.$d={},this.$l=ue,fe===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ve)return $(fe*w[M(ve)],this);if(typeof fe=="number")return this.$ms=fe,this.parseFromMilliseconds(),this;if(typeof fe=="object")return Object.keys(fe).forEach(function(xe){ye.$d[M(xe)]=fe[xe]}),this.calMilliseconds(),this;if(typeof fe=="string"){var Ve=fe.match(b);if(Ve){var _e=Ve.slice(2).map(function(xe){return xe!=null?Number(xe):0});return this.$d.years=_e[0],this.$d.months=_e[1],this.$d.weeks=_e[2],this.$d.days=_e[3],this.$d.hours=_e[4],this.$d.minutes=_e[5],this.$d.seconds=_e[6],this.calMilliseconds(),this}}return this}var ae=de.prototype;return ae.calMilliseconds=function(){var fe=this;this.$ms=Object.keys(this.$d).reduce(function(ve,ue){return ve+(fe.$d[ue]||0)*w[ue]},0)},ae.parseFromMilliseconds=function(){var fe=this.$ms;this.$d.years=F(fe/v),fe%=v,this.$d.months=F(fe/E),fe%=E,this.$d.days=F(fe/y),fe%=y,this.$d.hours=F(fe/e),fe%=e,this.$d.minutes=F(fe/c),fe%=c,this.$d.seconds=F(fe/a),fe%=a,this.$d.milliseconds=fe},ae.toISOString=function(){var fe=Y(this.$d.years,"Y"),ve=Y(this.$d.months,"M"),ue=+this.$d.days||0;this.$d.weeks&&(ue+=7*this.$d.weeks);var ye=Y(ue,"D"),Ve=Y(this.$d.hours,"H"),_e=Y(this.$d.minutes,"M"),xe=this.$d.seconds||0;this.$d.milliseconds&&(xe+=this.$d.milliseconds/1e3,xe=Math.round(1e3*xe)/1e3);var Pe=Y(xe,"S"),Be=fe.negative||ve.negative||ye.negative||Ve.negative||_e.negative||Pe.negative,Se=Ve.format||_e.format||Pe.format?"T":"",Ue=(Be?"-":"")+"P"+fe.format+ve.format+ye.format+Se+Ve.format+_e.format+Pe.format;return Ue==="P"||Ue==="-P"?"P0D":Ue},ae.toJSON=function(){return this.toISOString()},ae.format=function(fe){var ve=fe||"YYYY-MM-DDTHH:mm:ss",ue={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return ve.replace(m,function(ye,Ve){return Ve||String(ue[ye])})},ae.as=function(fe){return this.$ms/w[M(fe)]},ae.get=function(fe){var ve=this.$ms,ue=M(fe);return ue==="milliseconds"?ve%=1e3:ve=ue==="weeks"?F(ve/w[ue]):this.$d[ue],ve||0},ae.add=function(fe,ve,ue){var ye;return ye=ve?fe*w[M(ve)]:V(fe)?fe.$ms:$(fe,this).$ms,$(this.$ms+ye*(ue?-1:1),this)},ae.subtract=function(fe,ve){return this.add(fe,ve,!0)},ae.locale=function(fe){var ve=this.clone();return ve.$l=fe,ve},ae.clone=function(){return $(this.$ms,this)},ae.humanize=function(fe){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!fe)},ae.valueOf=function(){return this.asMilliseconds()},ae.milliseconds=function(){return this.get("milliseconds")},ae.asMilliseconds=function(){return this.as("milliseconds")},ae.seconds=function(){return this.get("seconds")},ae.asSeconds=function(){return this.as("seconds")},ae.minutes=function(){return this.get("minutes")},ae.asMinutes=function(){return this.as("minutes")},ae.hours=function(){return this.get("hours")},ae.asHours=function(){return this.as("hours")},ae.days=function(){return this.get("days")},ae.asDays=function(){return this.as("days")},ae.weeks=function(){return this.get("weeks")},ae.asWeeks=function(){return this.as("weeks")},ae.months=function(){return this.get("months")},ae.asMonths=function(){return this.as("months")},ae.years=function(){return this.get("years")},ae.asYears=function(){return this.as("years")},de}(),ee=function(de,ae,fe){return de.add(ae.years()*fe,"y").add(ae.months()*fe,"M").add(ae.days()*fe,"d").add(ae.hours()*fe,"h").add(ae.minutes()*fe,"m").add(ae.seconds()*fe,"s").add(ae.milliseconds()*fe,"ms")};return function(de,ae,fe){i=fe,r=fe().$utils(),fe.duration=function(ye,Ve){var _e=fe.locale();return $(ye,{$l:_e},Ve)},fe.isDuration=V;var ve=ae.prototype.add,ue=ae.prototype.subtract;ae.prototype.add=function(ye,Ve){return V(ye)?ee(this,ye,1):ve.bind(this)(ye,Ve)},ae.prototype.subtract=function(ye,Ve){return V(ye)?ee(this,ye,-1):ue.bind(this)(ye,Ve)}}})})(__e);var rAi=__e.exports;const nAi=es(rAi);var V_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(V_e);var aAi=V_e.exports;const sAi=es(aAi);L.extend(Gbi);L.extend(Ubi);L.extend(Kbi);L.extend(Sbi);L.extend(Zbi);L.extend(Wbi);L.extend(Jbi);L.extend(Xbi);L.extend(eAi);L.extend(iAi);L.extend(nAi);L.extend(sAi);const At=o=>L(o),ir=o=>o.toISOString();function P_e(){return ir(L())}function N_e(o,p){return At(o).format(p)}function x_e(o){return ir(L(o))}function $_e(o){if(o==null)throw new TypeError("ToDate expects a non-null value.");if(typeof o=="string"){const p=L(o);if(!p.isValid())throw new TypeError("Invalid date string.");return p.toISOString()}if(typeof o=="number"&&Number.isFinite(o)){const p=Math.abs(o)<1e12?L.unix(o):L(o);if(!p.isValid())throw new TypeError("Invalid numeric timestamp.");return p.toISOString()}if(o instanceof Date){const p=L(o);if(!p.isValid())throw new TypeError("Invalid Date object.");return p.toISOString()}throw new TypeError("Unsupported value type for ToDate. Provide a string, number, or Date.")}function L_e(o,p,i){return ir(At(o).add(p,i))}function M_e(o,p,i){return ir(At(o).subtract(p,i))}function B_e(o,p,i,r=!1){return At(o).diff(At(p),i,r)}function G_e(o){return At(o).unix()}function k_e(o){return ir(L.unix(o))}function U_e(o){return ir(At(o))}function j_e(o){return At(o).year()}function K_e(o){return At(o).month()}function F_e(o){return At(o).date()}function S_e(o){return At(o).hour()}function q_e(o){return At(o).minute()}function Z_e(o){return At(o).second()}function H_e(o){return At(o).millisecond()}function W_e(o){return At(o).isoWeekday()}function z_e(o){return At(o).week()}function J_e(o){return At(o).quarter()}function Y_e(o){return At(o).dayOfYear()}function X_e(o){return At(o).daysInMonth()}function Q_e(o,p){return ir(At(o).year(p))}function eVe(o,p){return ir(At(o).month(p))}function tVe(o,p){return ir(At(o).date(p))}function iVe(o,p){return ir(At(o).hour(p))}function rVe(o,p){return ir(At(o).minute(p))}function nVe(o,p){return ir(At(o).second(p))}function aVe(o,p){return ir(At(o).millisecond(p))}function sVe(o,p){return ir(At(o).isoWeekday(p))}function lVe(o,p){return ir(At(o).quarter(p))}function oVe(o,p){return ir(At(o).startOf(p))}function dVe(o,p){return ir(At(o).endOf(p))}function uVe(o,p){const i=At(o),r=i.startOf(p),a=i.endOf(p),c=r.valueOf()+(a.valueOf()-r.valueOf())/2;return ir(i.valueOf()<c?r:a)}function pVe(o,p,i){return At(o).isBefore(At(p),i)}function cVe(o,p,i){return At(o).isAfter(At(p),i)}function fVe(o,p,i){return At(o).isSame(At(p),i)}function yVe(o,p,i){return At(o).isSameOrBefore(At(p),i)}function hVe(o,p,i){return At(o).isSameOrAfter(At(p),i)}function mVe(o,p,i,r,a="()"){return At(o).isBetween(At(p),At(i),r,a)}function TVe(o){return L(o).isValid()}function vVe(o){return At(o).isLeapYear()}function EVe(o,p,i){const r=At(o);return r.isBefore(p)?ir(At(p)):r.isAfter(i)?ir(At(i)):ir(r)}function bVe(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const r=At(o[i]);r.isBefore(p)&&(p=r)}return ir(p)}function AVe(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const r=At(o[i]);r.isAfter(p)&&(p=r)}return ir(p)}function gVe(o,p=!1){return At(o).fromNow(p)}function IVe(o,p=!1){return At(o).toNow(p)}function RVe(o,p,i=!0){const r=At(o).diff(At(p),"millisecond",!0),a=Math.abs(r),e=L.duration(a,"milliseconds").humanize();return i?r>=0?`in ${e}`:`${e} ago`:e}function DVe(o,p,i=["6","7"],r=[]){const a=v=>r.some(E=>At(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=At(o);const y=p>=0?1:-1;let m=Math.abs(p);for(;m>0;){e=e.add(y,"day");const v=c(e);!i.includes(v)&&!a(e)&&m--}return ir(e)}function wVe(o,p){let i=At(o);const r=p;for(let a=0;a<7;a++)if(i=i.add(1,"day"),i.isoWeekday()===r)return ir(i);return ir(i)}function OVe(o,p){let i=At(o);const r=p;for(let a=0;a<7;a++)if(i=i.subtract(1,"day"),i.isoWeekday()===r)return ir(i);return ir(i)}const CVe="Local";function FN(){try{const o=Intl.DateTimeFormat().resolvedOptions().timeZone;if(o&&typeof o=="string")return o}catch{}try{if(typeof process<"u"&&process.env&&process.env.TZ)return process.env.TZ}catch{}return null}function SN(){const o=FN();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function _Ve(o,p,i=!1){let r=p;if(r===CVe){const e=FN();if(!e)throw new Error("Unable to detect current timezone from host environment.");r=e}const a=r?L.tz(o,r):At(o),c=i?a.utc(!0):a.utc();return ir(c)}function VVe(o,p,i=!1){const r=At(o);return ir(i?r.tz(p,!0):r.tz(p))}function PVe(o,p){const i=o===CVe?SN():o;return At(p).tz(i).utcOffset()}function NVe(o,p,i=!1){return ir(At(o).utcOffset(p,i))}class xVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP,version:"1.0.0",description:"Date get current timestamp operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetCurrentTimestamp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=P_e();return{value:G.Success,error:null,result:a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Ve extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE,version:"1.0.0",description:"Date format operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FormatDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=N_e(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE,version:"1.0.0",description:"Date parse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ParseDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=x_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE,version:"1.0.0",description:"Date add-to-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.AddToDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=L_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class BVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE,version:"1.0.0",description:"Date subtract-from-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SubtractFromDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=M_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class GVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES,version:"1.0.0",description:"Date difference-between-dates operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.DifferenceBetweenDates);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2],m=a[3]??!1,v=B_e(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lAi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE,version:"1.0.0",description:"Date to-date operation implementation module (coerce to ISO 8601 string)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=$_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX,version:"1.0.0",description:"Date to-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToUnix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=G_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class UVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX,version:"1.0.0",description:"Date from-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FromUnix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=k_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING,version:"1.0.0",description:"Date to-iso-string operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToISOString);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=U_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class KVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR,version:"1.0.0",description:"Date get-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=j_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class FVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH,version:"1.0.0",description:"Date get-month (0-based) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=K_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class SVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE,version:"1.0.0",description:"Date get-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=F_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class qVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR,version:"1.0.0",description:"Date get-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetHour);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=S_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ZVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE,version:"1.0.0",description:"Date get-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMinute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=q_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class HVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND,version:"1.0.0",description:"Date get-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetSecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=Z_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class WVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND,version:"1.0.0",description:"Date get-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMillisecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=H_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class zVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY,version:"1.0.0",description:"Date get-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetIsoWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=W_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class JVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR,version:"1.0.0",description:"Date get-week-of-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetWeekOfYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=z_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class YVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER,version:"1.0.0",description:"Date get-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetQuarter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=J_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class XVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR,version:"1.0.0",description:"Date get-day-of-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDayOfYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=Y_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class QVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH,version:"1.0.0",description:"Date get-days-in-month operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDaysInMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=X_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ePe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE,version:"1.0.0",description:"Date get-current-iana-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetCurrentIanaTimeZone);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=SN();return{value:G.Success,error:null,result:a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class tPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR,version:"1.0.0",description:"Date set-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=Q_e(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class iPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH,version:"1.0.0",description:"Date set-month operation implementation module (0-based month)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=eVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class rPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE,version:"1.0.0",description:"Date set-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=tVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class nPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR,version:"1.0.0",description:"Date set-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetHour);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=iVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class aPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE,version:"1.0.0",description:"Date set-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMinute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=rVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class sPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND,version:"1.0.0",description:"Date set-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetSecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=nVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND,version:"1.0.0",description:"Date set-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMillisecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=aVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class oPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY,version:"1.0.0",description:"Date set-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetIsoWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=sVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER,version:"1.0.0",description:"Date set-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetQuarter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=lVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class uPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF,version:"1.0.0",description:"Date start-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.StartOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=oVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class pPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF,version:"1.0.0",description:"Date end-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.EndOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=dVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class cPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO,version:"1.0.0",description:"Date round-to operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.RoundTo);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=uVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class fPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE,version:"1.0.0",description:"Date is-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsBefore);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=pVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class yPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER,version:"1.0.0",description:"Date is-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsAfter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=cVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class hPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME,version:"1.0.0",description:"Date is-same operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSame);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=fVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class mPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE,version:"1.0.0",description:"Date is-same-or-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSameOrBefore);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=yVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class TPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER,version:"1.0.0",description:"Date is-same-or-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSameOrAfter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=hVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN,version:"1.0.0",description:"Date is-between operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsBetween);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)}),c=a[0],e=a[1],y=a[2],m=a[3],v=a[4],E=mVe(c,e,y,m,v??void 0);return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class EPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID,version:"1.0.0",description:"Date is-valid operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsValid);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=TVe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR,version:"1.0.0",description:"Date is-leap-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsLeapYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=vVe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class APe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE,version:"1.0.0",description:"Date clamp-to-range operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ClampToRange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=EVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF,version:"1.0.0",description:"Date min-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.MinOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=a.length===1&&Array.isArray(a[0])?a[0]:a,e=bVe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class IPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF,version:"1.0.0",description:"Date max-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.MaxOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=a.length===1&&Array.isArray(a[0])?a[0]:a,e=AVe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class RPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW,version:"1.0.0",description:"Date from-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FromNow);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=gVe(a,c??!1);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class DPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW,version:"1.0.0",description:"Date to-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToNow);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=IVe(a,c??!1);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF,version:"1.0.0",description:"Date humanize-diff operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.HumanizeDiff);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=RVe(a,c,e??!0);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class OPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS,version:"1.1.0",description:"Date add-business-days operation implementation module (ISO-weekend strings)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.AddBusinessDays);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??void 0,m=a[3]??[],v=DVe(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class CPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY,version:"1.0.0",description:"Date next-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.NextWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=wVe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY,version:"1.0.0",description:"Date previous-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.PreviousWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=OVe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class VPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC,version:"1.1.0",description:"Date to-utc operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToUTC);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]||void 0,y=a[2]??!1,m=_Ve(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class PPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE,version:"1.0.0",description:"Date convert-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ConvertTimezone);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=VVe(a,c,e??!1);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class NPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET,version:"1.0.0",description:"Date get-timezone-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetTimezoneOffset);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=PVe(a,c);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET,version:"1.0.0",description:"Date set-utc-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetUTCOffset);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=NVe(a,c,e??!1);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL,version:"1.0.0",description:"Execution parallel operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Parallel);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const y=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],v=c.map(b=>{const w=new $u(y.logic,[b],b,null,this.extensionsRegistry);return w.inheritValuesFromContext(y),w}).map(b=>b.execute()),E=await Promise.all(v);return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL,version:"1.0.0",description:"Execution sequential operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Sequential);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const e=[];for(let y=0;y<c.length;y++){const m=c[y],E=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],b=new $u(E.logic,[m],m,null,this.extensionsRegistry);b.inheritValuesFromContext(E);const w=await b.execute();e.push(w)}return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT,version:"1.0.0",description:"Execution wait operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Wait);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)})[0];return typeof c!="number"||c<0?{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid wait time provided",result:null}:(await new Promise(e=>setTimeout(e,c)),{value:G.Success,error:null,result:null})}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}const oAi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,qN=o=>o===null||["string","number","boolean"].includes(typeof o);function Vn(o,p="Input must be an array"){if(!Array.isArray(o))throw new TypeError(p);return o}function lo(o){const p=Vn(o,"Input must be an array");if(!p||p.length===0)throw new TypeError("No list provided or list is empty");return p}function ZN(o){return Array.isArray(o)?o:[]}function hs(o){return Number(o)}function BPe(o){if(!o||o.length===0)throw new TypeError("No input lists provided");if(!o.every(r=>Array.isArray(r)))throw new TypeError("All inputs must be arrays");const[p,...i]=o;return i.reduce((r,a)=>r.concat(a),p)}function GPe(o,...p){if(!Array.isArray(o))throw new TypeError("First input must be an array");if(!p.every(i=>Array.isArray(i)))throw new TypeError("All subsequent inputs must be arrays");return o.concat(...p)}function kPe(o,p){const i=lo(o),r=hs(p);return[i.slice(0,r),i.slice(r)]}function UPe(o){return lo(o).slice().reverse()}function jPe(o){return lo(o).slice(0,-1)}function KPe(o){return lo(o).slice(1)}function FPe(o,p,i){const r=Vn(o),a=hs(p);if(a<0||a>r.length)throw new TypeError("Index out of bounds");return[...r.slice(0,a),i,...r.slice(a)]}function SPe(o,p,i){const r=lo(o),a=hs(p);if(a<0||a>=r.length)throw new TypeError("Index out of bounds");const c=[...r];return c[a]=i,c}function qPe(o,p,i){const r=lo(o),a=r.indexOf(p);if(a===-1)return r;const c=[...r];return c[a]=i,c}function ZPe(o,p,i){const r=lo(o),a=r.lastIndexOf(p);if(a===-1)return r;const c=[...r];return c[a]=i,c}function HPe(o,p,i){return lo(o).map(a=>a===p?i:a)}function WPe(o,p){const i=lo(o),r=hs(p);if(r<0||r>=i.length)throw new TypeError("Index out of bounds");return i[r]}function zPe(o){return lo(o)[0]}function JPe(o){const p=lo(o);return p[p.length-1]}function YPe(o,p,...i){return[...Vn(o),p,...i]}function XPe(o,p){const i=Vn(o);return[p,...i]}function QPe(o){return Vn(o).length}function eNe(o,p){const i=Vn(o),r=hs(p);if(r<0||r>=i.length)throw new TypeError("Index out of bounds");return i.slice(0,r).concat(i.slice(r+1))}function tNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)??0);return i.slice(0,r)}function iNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)??0);return r===0?[]:i.slice(-r)}function rNe(o,p,i){const r=Vn(o),a=p==null?void 0:hs(p),c=i==null?void 0:hs(i);return r.slice(a,c)}function nNe(o,p){return Vn(o).indexOf(p)}function aNe(o,p){return Vn(o).lastIndexOf(p)}function sNe(o){const p=Vn(o),i=[],r=new Set;for(const a of p)r.has(a)||(r.add(a),i.push(a));return i}function lNe(o){return Vn(o).reduce((i,r)=>i.concat(r),[])}function oNe(o){const p=Vn(o);if(p.length<=1)return[...p];const i=p[0],r=typeof i=="number"&&p.every(e=>typeof e=="number"&&Number.isFinite(e)),a=typeof i=="string"&&p.every(e=>typeof e=="string");let c=null;if(r?c="number":a&&(c=p.every(y=>oAi.test(y)&&L(y).isValid())?"date":"string"),!c)throw new TypeError("All items must be of the same supported type: number, string, or ISO date string.");return c==="number"?[...p].sort((e,y)=>e-y):c==="string"?[...p].sort((e,y)=>e.localeCompare(y)):[...p].sort((e,y)=>L(e).valueOf()-L(y).valueOf())}function dNe(o){const i=[...Vn(o)];for(let r=i.length-1;r>0;r--){const a=Math.floor(bR()*(r+1));[i[r],i[a]]=[i[a],i[r]]}return i}function uNe(o,p){const i=Vn(o),r=Math.max(1,hs(p)||1),a=[];for(let c=0;c<i.length;c+=r)a.push(i.slice(c,c+r));return a}function pNe(o,p,i){const r=Vn(o),a=Math.max(0,hs(p)||0);if(r.length>=a)return[...r];const c=a-r.length;return Array(c).fill(i).concat(r)}function cNe(o,p,i){const r=Vn(o),a=Math.max(0,hs(p)||0);if(r.length>=a)return[...r];const c=a-r.length,e=Array(c).fill(i);return r.concat(e)}function fNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)||0),a=[];for(let c=0;c<r;c++)a.push(...i);return a}function yNe(o,p){if(!qN(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return ZN(o).some(r=>r===p)}function hNe(o,p){const i=ZN(o),r=Array.isArray(p)?p:[p];if(r.length===0)return!1;if(!r.every(qN))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return r.every(a=>i.includes(a))}function mNe(o,p){const i=ZN(o),r=Array.isArray(p)?p:[p];if(r.length===0)return!1;if(!r.every(qN))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return r.some(a=>i.includes(a))}class TNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN,version:"1.0.0",description:"List join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Join);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=BPe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT,version:"1.0.0",description:"List split operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Split);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],[y,m]=kPe(c,e);return{value:G.Success,error:null,result:[y,m]}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ENe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE,version:"1.0.0",description:"List reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Reverse);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=UPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS,version:"1.0.0",description:"List delete last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.DeleteLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=jPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ANe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS,version:"1.0.0",description:"List delete first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.DeleteFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=KPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX,version:"1.0.0",description:"List add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.AddAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=FPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class INe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX,version:"1.0.0",description:"List replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=SPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class RNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS,version:"1.0.0",description:"List replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=qPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class DNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS,version:"1.0.0",description:"List replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=ZPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL,version:"1.0.0",description:"List replace all operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceAll);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=HPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ONe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM,version:"1.0.0",description:"List get index item operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetIndexItem);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=WPe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class CNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST,version:"1.0.0",description:"List get first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetFirst);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=zPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _Ne extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST,version:"1.0.0",description:"List get last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetLast);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=JPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class VNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND,version:"1.0.0",description:"List append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Append);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a.slice(2),m=YPe(c,e,...y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class PNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND,version:"1.0.0",description:"List prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Prepend);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=XPe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class NNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH,version:"1.0.0",description:"List get length",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLength);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(c=>{var e,y;return((e=c.value)==null?void 0:e.valueAsType)??((y=c.value)==null?void 0:y.value)});return{value:G.Success,error:null,result:QPe(a)}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX,version:"1.0.0",description:"List delete one item at index (non-mutating)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.DeleteAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=eNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Ne extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS,version:"1.0.0",description:"List get first N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=tNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS,version:"1.0.0",description:"List get last N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=iNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE,version:"1.0.0",description:"List slice(start, end)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Slice);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=rNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class BNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT,version:"1.0.0",description:"List concat(base, ...others)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Concat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),[c,...e]=a,y=GPe(c,...e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class GNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF,version:"1.0.0",description:"List listGetIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=nNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF,version:"1.0.0",description:"List listGetLastIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLastIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=aNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class UNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE,version:"1.0.0",description:"List unique (stable, by reference/===)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Unique);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=sNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN,version:"1.0.0",description:"List flatten one level",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Flatten);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=lNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class KNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT,version:"1.0.0",description:"List sort (non-mutating). Supports lists of strings (alphabetic), numbers (numeric), or ISO date strings (chronological).",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Sort);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=oNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class FNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE,version:"1.0.0",description:"List shuffle (Fisher–Yates, secure RNG helper)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Shuffle);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=dNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class SNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK,version:"1.0.0",description:"List chunk(size) -> list of lists",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Chunk);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=uNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class qNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START,version:"1.0.0",description:"List padStart(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.PadStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=pNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ZNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END,version:"1.0.0",description:"List padEnd(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.PadEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=cNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class HNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT,version:"1.0.0",description:"List repeat(count)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Repeat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=fNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class WNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS,version:"1.0.0",description:"List contains (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Contains);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=yNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class zNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL,version:"1.0.0",description:"List contains all (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.ContainsAll);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=hNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class JNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY,version:"1.0.0",description:"List contains any (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.ContainsAny);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=mNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dAi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH,version:"1.0.0",description:"Returns the number of characters in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.GetLength);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.length;return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class YNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN,version:"1.0.0",description:"String join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Join);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{var a,c,e;try{const y=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.separator.id}),m=((a=y==null?void 0:y.value)==null?void 0:a.value)||"",v=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=r.filter(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.dynamicString.id}).map(k=>{var F,j;return((F=k.value)==null?void 0:F.valueAsType)||((j=k.value)==null?void 0:j.value)||""}),M=[E,w,...$].join(m);return{value:G.Success,error:null,result:M}}catch(y){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:y,result:null}}}})}}class XNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX,version:"1.0.0",description:"String split at index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y={firstPart:c.slice(0,e),secondPart:c.slice(e)};return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class QNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS,version:"1.0.0",description:"String split at all the occurrences of separators operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtAllSeparators);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=c.split(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR,version:"1.0.0",description:"String split at the first occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtFirstSeparator);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=c.indexOf(e),m={firstPart:c.slice(0,y),secondPart:c.slice(y+e.length)};return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class txe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR,version:"1.0.0",description:"String split at the last occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtLastSeparator);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=c.lastIndexOf(e),m={firstPart:c.slice(0,y),secondPart:c.slice(y+e.length)};return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ixe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS,version:"1.0.0",description:"String delete last number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,-e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class rxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS,version:"1.0.0",description:"String delete first number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class nxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE,version:"1.0.0",description:"String reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Reverse);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.split("").reverse().join("");return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class axe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE,version:"1.0.0",description:"String to lower case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ToLowerCase);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.toLowerCase();return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class sxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE,version:"1.0.0",description:"String to upper case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ToUpperCase);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.toUpperCase();return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX,version:"1.0.0",description:"String delete index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=Math.min(y,c.length-e),v=c.slice(0,e)+c.slice(e+m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class oxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX,version:"1.0.0",description:"String add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.AddAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.slice(0,e)+y+c.slice(e);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS,version:"1.0.0",description:"String replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]??1,y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=y+c.slice(e);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class uxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS,version:"1.0.0",description:"String replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]??1,y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.slice(0,-e)+y;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class pxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX,version:"1.0.0",description:"String replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??1,m=a[3];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const v=(c.slice(0,e)||"")+m+(c.slice(e+y)||"");return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class cxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceFirstMatch);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.replace(e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceLastMatch);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.lastIndexOf(e),v=m===-1?c:c.substring(0,m)+y+c.substring(m+e.length);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class yxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES,version:"1.0.0",description:"String replace all matches operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceAllMatches);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.split(e).join(y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class hxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM,version:"1.0.0",description:"String get index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetIndexItem);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.charAt(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class mxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS,version:"1.0.0",description:"String get last N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(-e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Txe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS,version:"1.0.0",description:"String get first N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF,version:"1.0.0",description:"String get index of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};if(typeof e!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No search value provided",result:null};const y=c.indexOf(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND,version:"1.0.0",description:"String append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Append);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};if(typeof e!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No value to append provided",result:null};const y=a.slice(2);if(!y.every(v=>typeof v=="string"))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"All values to append must be strings",result:null};const m=[c,e,...y].join("");return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND,version:"1.0.0",description:"String prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Prepend);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=e+c;return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Axe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM,version:"1.0.0",description:"String trim implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Trim);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trim();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START,version:"1.0.0",description:"String trimStart implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.TrimStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trimStart();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Ixe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END,version:"1.0.0",description:"String trimEnd implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.TrimEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trimEnd();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Rxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING,version:"1.0.0",description:"String substring(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Substring);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.substring(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Dxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE,version:"1.0.0",description:"String slice(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Slice);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.slice(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF,version:"1.0.0",description:"String lastIndexOf(search, fromIndex?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.GetLastIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.lastIndexOf(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Oxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START,version:"1.0.0",description:"String padStart(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.PadStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.padStart(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Cxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END,version:"1.0.0",description:"String padEnd(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.PadEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.padEnd(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _xe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT,version:"1.0.0",description:"String repeat(count) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Repeat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=a.repeat(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Vxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX,version:"1.0.0",description:"String match(regex) -> first match array or null",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),y=new RegExp(String(c??""),e?String(e):void 0),m=String(a??"").match(y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Pxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX,version:"1.0.0",description:"String matchAll(regex) -> array of matches",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchAllRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)??((V=b.value)==null?void 0:V.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(a??"").matchAll(v),b=>Array.from(b));return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Nxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX,version:"1.0.0",description:"String search(regex) -> index or -1",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.SearchRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)});let y=-1;try{const m=new RegExp(String(c??""),e?String(e):void 0);y=String(a??"").search(m)}catch{y=-1}return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX,version:"1.0.0",description:"String replace using RegExp (pattern, replacement, flags?)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.ReplaceRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e,y]=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)});let m=String(a??"");const v=new RegExp(String(c??""),y?String(y):void 0);return m=m.replace(v,String(e??"")),{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $xe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE,version:"1.0.0",description:"String normalize(form?) implementation module (NFC by default)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.NormalizeUnicode);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=a.normalize(c||"NFC");return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}const yg=class yg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS,version:"1.0.0",description:"Remove diacritics via NFD decomposition + strip combining marks",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemoveDiacritics);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=String(a??"").normalize("NFD").replace(yg.COMBINING_MARKS,"");return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}};I(yg,"COMBINING_MARKS",/[\u0300-\u036f]/g);let FA=yg;class Lxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES,version:"1.0.0",description:"Count literal substring occurrences in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.CountOccurrences);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=y===""?0:e.split(y).length-1;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Mxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX,version:"1.0.0",description:"Ensure string starts with given prefix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EnsurePrefix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.startsWith(y)?e:y+e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Bxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX,version:"1.0.0",description:"Ensure string ends with given suffix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EnsureSuffix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.endsWith(y)?e:e+y;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Gxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX,version:"1.0.0",description:"Remove prefix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemovePrefix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.startsWith(y)?e.slice(y.length):e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX,version:"1.0.0",description:"Remove suffix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemoveSuffix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.endsWith(y)?e.slice(0,-y.length):e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Uxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH,version:"1.0.0",description:"String startsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.StartsWith);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("StartsWith expects two strings.");const e=a.startsWith(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH,version:"1.0.0",description:"String endsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EndsWith);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("EndsWith expects two strings.");const e=a.endsWith(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Kxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS,version:"1.0.0",description:"String includes(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Contains);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("Contains expects two strings.");const e=a.includes(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX,version:"1.0.0",description:"Regex test: new RegExp(pattern, flags?).test(src) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchesRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("MatchesRegex expects source and pattern to be strings.");if(!(e===void 0||typeof e=="string"))throw new TypeError("MatchesRegex flags must be a string if provided.");let y=!1;return y=new RegExp(c,e).test(a),{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}function Sxe(o,p){const i=Number(o),a=10**Math.max(0,Number(p)||0);return Math.round(i*a)/a}function qxe(o,p){const i=Number(o),r=Math.abs(Number(p)||0);return r===0?i:Math.round(i/r)*r}function Zxe(o,p,i){const r=Number(o),a=Number(p),c=Number(i);return Math.min(Math.max(r,a),c)}function Hxe(o,p,i,r,a){const c=Number(o),e=Number(p),y=Number(i),m=Number(r),v=Number(a);if(e===y)throw new Error("Input range cannot be zero");const E=(c-e)/(y-e);return m+E*(v-m)}function Wxe(...o){const p=o.map(r=>Number(r));return p.length===0?0:p.reduce((r,a)=>r+a,0)/p.length}function zxe(...o){const p=o.map(r=>Number(r)).sort((r,a)=>r-a);if(p.length===0)return 0;const i=Math.floor(p.length/2);return p.length%2?p[i]:(p[i-1]+p[i])/2}function Jxe(o,p){const i=Number(o),r=Number(p);return r===0?NaN:i<0&&r%2===1?-Math.pow(-i,1/r):Math.pow(i,1/r)}function Yxe(o,p){const i=Number(o),r=Number(p);return i===0?1/0:(r-i)/i*100}const di=o=>o.map(p=>{var i,r;return((i=p.value)==null?void 0:i.valueAsType)??((r=p.value)==null?void 0:r.value)});class Xxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION,version:"1.0.0",description:"Number addition operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Addition);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e+y,0);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Qxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION,version:"1.0.0",description:"Number subtraction operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Subtraction);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e-y,0);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class e$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION,version:"1.0.0",description:"Number multiplication operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Multiplication);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e*y,1);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class t$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION,version:"1.0.0",description:"Number division operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Division);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r);if(c===0)throw new Error("Division by zero is not allowed");const e=a/c;return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class i$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER,version:"1.0.0",description:"Number remainder operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Remainder);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r);if(c===0)throw new Error("Division by zero is not allowed");const e=a%c;return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class r$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION,version:"1.0.0",description:"Number exponentiation operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Exponentiation);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r),e=Math.pow(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class n$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE,version:"1.0.0",description:"Number negate (unary -x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Negate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:-a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class a$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE,version:"1.0.0",description:"Number absolute (|x|)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Absolute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.abs(Number(a))}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class s$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN,version:"1.0.0",description:"Number sign (-1 | 0 | 1)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Sign);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sign(Number(a))}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class l$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND,version:"1.0.0",description:"Number round to nearest integer",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Round);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.round(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class o$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR,version:"1.0.0",description:"Number floor (⌊x⌋)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Floor);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.floor(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class d$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL,version:"1.0.0",description:"Number ceil (⌈x⌉)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Ceil);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.ceil(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class u$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC,version:"1.0.0",description:"Number truncation (drop fractional part)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Trunc);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.trunc(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class p$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS,version:"1.0.0",description:"Round to N decimals",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.RoundToDecimals);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Sxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class c$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP,version:"1.0.0",description:"Snap a number to the nearest multiple of step (>=0 step)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.SnapToStep);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=qxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class f$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP,version:"1.0.0",description:"Clamp value to [min, max]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Clamp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=di(r),y=Zxe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class y$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE,version:"1.0.0",description:"Map value from [inMin,inMax] to [outMin,outMax]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MapRange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e,y,m]=di(r),v=Hxe(a,c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class h$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE,version:"1.0.0",description:"Average(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Average);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r),c=Wxe(...a);return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class m$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN,version:"1.0.0",description:"Median(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Median);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r),c=zxe(...a);return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class T$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF,version:"1.0.0",description:"Min(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MinOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r).map(Number),c=a.length?Math.min(...a):1/0;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class v$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF,version:"1.0.0",description:"Max(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MaxOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r).map(Number),c=a.length?Math.max(...a):-1/0;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class E$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT,version:"1.0.0",description:"Square root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.SquareRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sqrt(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class b$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT,version:"1.0.0",description:"Cube root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.CubeRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.cbrt(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class A$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT,version:"1.0.0",description:"Nth root (value, n)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.NthRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Jxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class g$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP,version:"1.0.0",description:"e^x",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Exp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.exp(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class I$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL,version:"1.0.0",description:"Natural log ln(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LogNatural);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.log(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class R$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10,version:"1.0.0",description:"Log base 10",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Log10);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r),c=Number(a),e=Math.log10?Math.log10(c):Math.log(c)/Math.LN10;return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class D$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN,version:"1.0.0",description:"sin(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Sin);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sin(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class w$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS,version:"1.0.0",description:"cos(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Cos);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.cos(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class O$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN,version:"1.0.0",description:"tan(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Tan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.tan(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class C$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN,version:"1.0.0",description:"asin(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Asin);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.asin(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class _$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS,version:"1.0.0",description:"acos(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Acos);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.acos(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class V$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN,version:"1.0.0",description:"atan(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Atan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.atan(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class P$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2,version:"1.0.0",description:"atan2(y, x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Atan2);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:Math.atan2(Number(a),Number(c))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class N$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS,version:"1.0.0",description:"deg → rad",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.ToRadians);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Number(a)*Math.PI/180}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class x$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES,version:"1.0.0",description:"rad → deg",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.ToDegrees);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Number(a)*180/Math.PI}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class $$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF,version:"1.0.0",description:"x percent of y",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.PercentOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Number(a)/100*Number(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class MC extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE,version:"1.0.0",description:"((new-old)/old)*100",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.PercentageChange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Yxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class L$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN,version:"1.0.0",description:"a < b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LessThan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a<c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class M$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN,version:"1.0.0",description:"a > b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MoreThan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a>c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class B$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL,version:"1.0.0",description:"a <= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LessThanOrEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a<=c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class G$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL,version:"1.0.0",description:"a >= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MoreThanOrEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a>=c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}function k$e(o,p){return function(){return o.apply(p,arguments)}}const{toString:uAi}=Object.prototype,{getPrototypeOf:HN}=Object,{iterator:RR,toStringTag:U$e}=Symbol,DR=(o=>p=>{const i=uAi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),oo=o=>(o=o.toLowerCase(),p=>DR(p)===o),wR=o=>p=>typeof p===o,{isArray:t0}=Array,Fy=wR("undefined");function Pv(o){return o!==null&&!Fy(o)&&o.constructor!==null&&!Fy(o.constructor)&&Ka(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const j$e=oo("ArrayBuffer");function pAi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&j$e(o.buffer),p}const cAi=wR("string"),Ka=wR("function"),K$e=wR("number"),Nv=o=>o!==null&&typeof o=="object",fAi=o=>o===!0||o===!1,hA=o=>{if(DR(o)!=="object")return!1;const p=HN(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(U$e in o)&&!(RR in o)},yAi=o=>{if(!Nv(o)||Pv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},hAi=oo("Date"),mAi=oo("File"),TAi=oo("Blob"),vAi=oo("FileList"),EAi=o=>Nv(o)&&Ka(o.pipe),bAi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ka(o.append)&&((p=DR(o))==="formdata"||p==="object"&&Ka(o.toString)&&o.toString()==="[object FormData]"))},AAi=oo("URLSearchParams"),[gAi,IAi,RAi,DAi]=["ReadableStream","Request","Response","Headers"].map(oo),wAi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xv(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let r,a;if(typeof o!="object"&&(o=[o]),t0(o))for(r=0,a=o.length;r<a;r++)p.call(null,o[r],r,o);else{if(Pv(o))return;const c=i?Object.getOwnPropertyNames(o):Object.keys(o),e=c.length;let y;for(r=0;r<e;r++)y=c[r],p.call(null,o[y],y,o)}}function F$e(o,p){if(Pv(o))return null;p=p.toLowerCase();const i=Object.keys(o);let r=i.length,a;for(;r-- >0;)if(a=i[r],p===a.toLowerCase())return a;return null}const xc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),S$e=o=>!Fy(o)&&o!==xc;function BC(){const{caseless:o,skipUndefined:p}=S$e(this)&&this||{},i={},r=(a,c)=>{const e=o&&F$e(i,c)||c;hA(i[e])&&hA(a)?i[e]=BC(i[e],a):hA(a)?i[e]=BC({},a):t0(a)?i[e]=a.slice():(!p||!Fy(a))&&(i[e]=a)};for(let a=0,c=arguments.length;a<c;a++)arguments[a]&&xv(arguments[a],r);return i}const OAi=(o,p,i,{allOwnKeys:r}={})=>(xv(p,(a,c)=>{i&&Ka(a)?o[c]=k$e(a,i):o[c]=a},{allOwnKeys:r}),o),CAi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),_Ai=(o,p,i,r)=>{o.prototype=Object.create(p.prototype,r),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:p.prototype}),i&&Object.assign(o.prototype,i)},VAi=(o,p,i,r)=>{let a,c,e;const y={};if(p=p||{},o==null)return p;do{for(a=Object.getOwnPropertyNames(o),c=a.length;c-- >0;)e=a[c],(!r||r(e,o,p))&&!y[e]&&(p[e]=o[e],y[e]=!0);o=i!==!1&&HN(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},PAi=(o,p,i)=>{o=String(o),(i===void 0||i>o.length)&&(i=o.length),i-=p.length;const r=o.indexOf(p,i);return r!==-1&&r===i},NAi=o=>{if(!o)return null;if(t0(o))return o;let p=o.length;if(!K$e(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},xAi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&HN(Uint8Array)),$Ai=(o,p)=>{const r=(o&&o[RR]).call(o);let a;for(;(a=r.next())&&!a.done;){const c=a.value;p.call(o,c[0],c[1])}},LAi=(o,p)=>{let i;const r=[];for(;(i=o.exec(p))!==null;)r.push(i);return r},MAi=oo("HTMLFormElement"),BAi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,a){return r.toUpperCase()+a}),Ck=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),GAi=oo("RegExp"),q$e=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),r={};xv(i,(a,c)=>{let e;(e=p(a,c,o))!==!1&&(r[c]=e||a)}),Object.defineProperties(o,r)},kAi=o=>{q$e(o,(p,i)=>{if(Ka(o)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=o[i];if(Ka(r)){if(p.enumerable=!1,"writable"in p){p.writable=!1;return}p.set||(p.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},UAi=(o,p)=>{const i={},r=a=>{a.forEach(c=>{i[c]=!0})};return t0(o)?r(o):r(String(o).split(p)),i},jAi=()=>{},KAi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function FAi(o){return!!(o&&Ka(o.append)&&o[U$e]==="FormData"&&o[RR])}const SAi=o=>{const p=new Array(10),i=(r,a)=>{if(Nv(r)){if(p.indexOf(r)>=0)return;if(Pv(r))return r;if(!("toJSON"in r)){p[a]=r;const c=t0(r)?[]:{};return xv(r,(e,y)=>{const m=i(e,a+1);!Fy(m)&&(c[y]=m)}),p[a]=void 0,c}}return r};return i(o,0)},qAi=oo("AsyncFunction"),ZAi=o=>o&&(Nv(o)||Ka(o))&&Ka(o.then)&&Ka(o.catch),Z$e=((o,p)=>o?setImmediate:p?((i,r)=>(xc.addEventListener("message",({source:a,data:c})=>{a===xc&&c===i&&r.length&&r.shift()()},!1),a=>{r.push(a),xc.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ka(xc.postMessage)),HAi=typeof queueMicrotask<"u"?queueMicrotask.bind(xc):typeof process<"u"&&process.nextTick||Z$e,WAi=o=>o!=null&&Ka(o[RR]),je={isArray:t0,isArrayBuffer:j$e,isBuffer:Pv,isFormData:bAi,isArrayBufferView:pAi,isString:cAi,isNumber:K$e,isBoolean:fAi,isObject:Nv,isPlainObject:hA,isEmptyObject:yAi,isReadableStream:gAi,isRequest:IAi,isResponse:RAi,isHeaders:DAi,isUndefined:Fy,isDate:hAi,isFile:mAi,isBlob:TAi,isRegExp:GAi,isFunction:Ka,isStream:EAi,isURLSearchParams:AAi,isTypedArray:xAi,isFileList:vAi,forEach:xv,merge:BC,extend:OAi,trim:wAi,stripBOM:CAi,inherits:_Ai,toFlatObject:VAi,kindOf:DR,kindOfTest:oo,endsWith:PAi,toArray:NAi,forEachEntry:$Ai,matchAll:LAi,isHTMLForm:MAi,hasOwnProperty:Ck,hasOwnProp:Ck,reduceDescriptors:q$e,freezeMethods:kAi,toObjectSet:UAi,toCamelCase:BAi,noop:jAi,toFiniteNumber:KAi,findKey:F$e,global:xc,isContextDefined:S$e,isSpecCompliantForm:FAi,toJSONObject:SAi,isAsyncFn:qAi,isThenable:ZAi,setImmediate:Z$e,asap:HAi,isIterable:WAi};function si(o,p,i,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",p&&(this.code=p),i&&(this.config=i),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}je.inherits(si,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.status}}});const H$e=si.prototype,W$e={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{W$e[o]={value:o}});Object.defineProperties(si,W$e);Object.defineProperty(H$e,"isAxiosError",{value:!0});si.from=(o,p,i,r,a,c)=>{const e=Object.create(H$e);je.toFlatObject(o,e,function(E){return E!==Error.prototype},v=>v!=="isAxiosError");const y=o&&o.message?o.message:"Error",m=p==null&&o?o.code:p;return si.call(e,y,m,i,r,a),o&&e.cause==null&&Object.defineProperty(e,"cause",{value:o,configurable:!0}),e.name=o&&o.name||"Error",c&&Object.assign(e,c),e};const zAi=null;function GC(o){return je.isPlainObject(o)||je.isArray(o)}function z$e(o){return je.endsWith(o,"[]")?o.slice(0,-2):o}function _k(o,p,i){return o?o.concat(p).map(function(a,c){return a=z$e(a),!i&&c?"["+a+"]":a}).join(i?".":""):p}function JAi(o){return je.isArray(o)&&!o.some(GC)}const YAi=je.toFlatObject(je,{},null,function(p){return/^is[A-Z]/.test(p)});function OR(o,p,i){if(!je.isObject(o))throw new TypeError("target must be an object");p=p||new FormData,i=je.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,k){return!je.isUndefined(k[M])});const r=i.metaTokens,a=i.visitor||E,c=i.dots,e=i.indexes,m=(i.Blob||typeof Blob<"u"&&Blob)&&je.isSpecCompliantForm(p);if(!je.isFunction(a))throw new TypeError("visitor must be a function");function v($){if($===null)return"";if(je.isDate($))return $.toISOString();if(je.isBoolean($))return $.toString();if(!m&&je.isBlob($))throw new si("Blob is not supported. Use a Buffer instead.");return je.isArrayBuffer($)||je.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,M,k){let F=$;if($&&!k&&typeof $=="object"){if(je.endsWith(M,"{}"))M=r?M:M.slice(0,-2),$=JSON.stringify($);else if(je.isArray($)&&JAi($)||(je.isFileList($)||je.endsWith(M,"[]"))&&(F=je.toArray($)))return M=z$e(M),F.forEach(function(Y,ie){!(je.isUndefined(Y)||Y===null)&&p.append(e===!0?_k([M],ie,c):e===null?M:M+"[]",v(Y))}),!1}return GC($)?!0:(p.append(_k(k,M,c),v($)),!1)}const b=[],w=Object.assign(YAi,{defaultVisitor:E,convertValue:v,isVisitable:GC});function V($,M){if(!je.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+M.join("."));b.push($),je.forEach($,function(F,j){(!(je.isUndefined(F)||F===null)&&a.call(p,F,je.isString(j)?j.trim():j,M,w))===!0&&V(F,M?M.concat(j):[j])}),b.pop()}}if(!je.isObject(o))throw new TypeError("data must be an object");return V(o),p}function Vk(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(r){return p[r]})}function WN(o,p){this._pairs=[],o&&OR(o,this,p)}const J$e=WN.prototype;J$e.append=function(p,i){this._pairs.push([p,i])};J$e.toString=function(p){const i=p?function(r){return p.call(this,r,Vk)}:Vk;return this._pairs.map(function(a){return i(a[0])+"="+i(a[1])},"").join("&")};function XAi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Y$e(o,p,i){if(!p)return o;const r=i&&i.encode||XAi;je.isFunction(i)&&(i={serialize:i});const a=i&&i.serialize;let c;if(a?c=a(p,i):c=je.isURLSearchParams(p)?p.toString():new WN(p,i).toString(r),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class QAi{constructor(){this.handlers=[]}use(p,i,r){return this.handlers.push({fulfilled:p,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(p){this.handlers[p]&&(this.handlers[p]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(p){je.forEach(this.handlers,function(r){r!==null&&p(r)})}}const Pk=QAi,X$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},egi=typeof URLSearchParams<"u"?URLSearchParams:WN,tgi=typeof FormData<"u"?FormData:null,igi=typeof Blob<"u"?Blob:null,rgi={isBrowser:!0,classes:{URLSearchParams:egi,FormData:tgi,Blob:igi},protocols:["http","https","file","blob","url","data"]},zN=typeof window<"u"&&typeof document<"u",kC=typeof navigator=="object"&&navigator||void 0,ngi=zN&&(!kC||["ReactNative","NativeScript","NS"].indexOf(kC.product)<0),agi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),sgi=zN&&window.location.href||"http://localhost",lgi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zN,hasStandardBrowserEnv:ngi,hasStandardBrowserWebWorkerEnv:agi,navigator:kC,origin:sgi},Symbol.toStringTag,{value:"Module"})),aa={...lgi,...rgi};function ogi(o,p){return OR(o,new aa.classes.URLSearchParams,{visitor:function(i,r,a,c){return aa.isNode&&je.isBuffer(i)?(this.append(r,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...p})}function dgi(o){return je.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function ugi(o){const p={},i=Object.keys(o);let r;const a=i.length;let c;for(r=0;r<a;r++)c=i[r],p[c]=o[c];return p}function Q$e(o){function p(i,r,a,c){let e=i[c++];if(e==="__proto__")return!0;const y=Number.isFinite(+e),m=c>=i.length;return e=!e&&je.isArray(a)?a.length:e,m?(je.hasOwnProp(a,e)?a[e]=[a[e],r]:a[e]=r,!y):((!a[e]||!je.isObject(a[e]))&&(a[e]=[]),p(i,r,a[e],c)&&je.isArray(a[e])&&(a[e]=ugi(a[e])),!y)}if(je.isFormData(o)&&je.isFunction(o.entries)){const i={};return je.forEachEntry(o,(r,a)=>{p(dgi(r),a,i,0)}),i}return null}function pgi(o,p,i){if(je.isString(o))try{return(p||JSON.parse)(o),je.trim(o)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(o)}const JN={transitional:X$e,adapter:["xhr","http","fetch"],transformRequest:[function(p,i){const r=i.getContentType()||"",a=r.indexOf("application/json")>-1,c=je.isObject(p);if(c&&je.isHTMLForm(p)&&(p=new FormData(p)),je.isFormData(p))return a?JSON.stringify(Q$e(p)):p;if(je.isArrayBuffer(p)||je.isBuffer(p)||je.isStream(p)||je.isFile(p)||je.isBlob(p)||je.isReadableStream(p))return p;if(je.isArrayBufferView(p))return p.buffer;if(je.isURLSearchParams(p))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let y;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ogi(p,this.formSerializer).toString();if((y=je.isFileList(p))||r.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return OR(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||a?(i.setContentType("application/json",!1),pgi(p)):p}],transformResponse:[function(p){const i=this.transitional||JN.transitional,r=i&&i.forcedJSONParsing,a=this.responseType==="json";if(je.isResponse(p)||je.isReadableStream(p))return p;if(p&&je.isString(p)&&(r&&!this.responseType||a)){const e=!(i&&i.silentJSONParsing)&&a;try{return JSON.parse(p,this.parseReviver)}catch(y){if(e)throw y.name==="SyntaxError"?si.from(y,si.ERR_BAD_RESPONSE,this,null,this.response):y}}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:aa.classes.FormData,Blob:aa.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};je.forEach(["delete","get","head","post","put","patch"],o=>{JN.headers[o]={}});const YN=JN,cgi=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fgi=o=>{const p={};let i,r,a;return o&&o.split(`
|
|
87
|
+
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`})),{errors:r,modifiedData:i}}subscribeDependents(i){return i.forEach(r=>{this.detachedDependents[r.entity.id]||(this.detachedDependents[r.entity.id]=r)}),this}unsubscribeDependents(i){return i.forEach(r=>{this.detachedDependents[r.entity.id]&&delete this.detachedDependents[r.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"sync-dependents"))){const r=[],a=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);r.push(...m.updated),a.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,r,a){const c=[],e=[],y=[],m=[];return r==="value-as-type-single"&&(this.valueAsTypeSingle=null,a==null||a.add(this,H.Updated)),r==="value-as-type-list"&&(this.valueAsTypeList=(this.valueAsTypeList||[]).filter(v=>v.id!==i.id),a==null||a.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,r,a){const c=[],e=[],y=[],m=[];return r==="value-as-type-single"&&(this.valueAsTypeSingle=i,a==null||a.add(this,H.Updated)),r==="value-as-type-list"&&(this.valueAsTypeList=[...Array.isArray(this.valueAsTypeList||[])?this.valueAsTypeList:[],i],a==null||a.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}unsubscribeFromDependencies(){return this.valueAsTypeSingle&&this.valueAsTypeSingle.type!==d.BuiltInBaseEntity&&this.valueAsTypeSingle.unsubscribeDependents([{entity:this,field:"value-as-type-single"}]),this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&this.valueAsTypeList.forEach(i=>{i.type!==d.BuiltInBaseEntity&&i.unsubscribeDependents([{entity:this,field:"value-as-type-list"}])}),this}subscribeToDependencies(){return!this.valueAsTypeSingle&&!this.valueAsTypeList?this:(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.forEach(i=>{i.type!==d.BuiltInBaseEntity&&i.subscribeDependents([{entity:this,field:"value-as-type-list"}])}):this.valueAsTypeSingle&&this.valueAsTypeSingle.type!==d.BuiltInBaseEntity&&this.valueAsTypeSingle.subscribeDependents([{entity:this,field:"value-as-type-single"}]),this)}increaseVersion(i){if(i&&!L(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&L(i).isSame(L(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=L(i).toISOString()||L().toISOString(),this)}captureVersion(){var r;const i=((r=this.knownVersions)==null?void 0:r.get(this.version))||new hi(this,this.project);return i.metaSync(this.toMeta(),null),this.knownVersions=this.knownVersions?this.knownVersions.set(this.version,i):new Map([[this.version,i]]),i.valueAsTypeSingle=this.valueAsTypeSingle,i.valueAsTypeList=this.valueAsTypeList?[...this.valueAsTypeList]:this.valueAsTypeList,i.parent=this.parent,this}recursiveCaptureUpstreamVersions(i){const r=[],a=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);r.push(this.parent,...y.updated),a.push(...y.added),c.push(...y.removed)}return{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const r=[],a=[],c=[],e=[];if(this.version===i)return{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this};if(!this.knownVersions){const v=new Map;for(const[E,b]of this.knownVersions||new Map){if(v.set(E,b),b.activeVersion=!1,b.knownVersions)for(const[w,V]of b.knownVersions)v.set(w,V);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new hi(v,this.project)}return this.metaSync(y.toShallowJSON(),null),this.previousVersion=y.previousVersion,this.version=y.version,this.createdAt=y.createdAt,this.author=y.author,this.deleted=y.deleted,this.valueAsTypeSingle=y.valueAsTypeSingle,this.parent=y.parent,{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,r))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,r),this.version=i.version,this.createdAt=i.createdAt,this.author=i.author,this.deleted=i.deleted,this.previousVersion=i.previousVersion,i.parent&&i.standaloneParent)throw new Error(`Entity with id '${this.id}' cannot have both 'parent' and 'standaloneParent' properties set.`);if(i.parent){const a=ne(i.parent),c=this.project.get(a),e=this.parent;if(e&&e.id!==(c==null?void 0:c.id)&&this.removeFromParent(r),c)this.setParent(c,r),this.addSelfToProject(r);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${a}' that isn't found in the project`)}else if(i.standaloneParent){const a=ne(i.standaloneParent),c=this.project.get(a);if(c)this.setStandaloneParent(c,r);else throw new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${a}' that isn't found in the project`)}else throw new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(i.valueAsTypeList&&Array.isArray(i.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],i.valueAsTypeList.forEach(a=>{const c=ne(a),e=this.project.get(c);e&&this.addValueAsTypeToList(e,r)}),[...this.valueAsTypeList].forEach(a=>{(i.valueAsTypeList||[]).find(e=>ne(e)===a.id)||this.removeValueAsTypeFromList(a,r)}),this.setValueAsTypeSingle(null,r),this.metaSync({value:null},r);else if(i.valueAsTypeSingle){const a=ne(i.valueAsTypeSingle),c=this.project.get(a);c&&(this.setValueAsTypeSingle(c,r),this.setValueAsTypeList(null,r),this.metaSync({value:null},r))}else this.setValueAsTypeSingle(null,r),this.setValueAsTypeList(null,r);return this.captureVersion(),this.subscribeToDependencies(),r==null||r.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],r=[],a=[],c=[];if(this.initialData.parent&&this.initialData.standaloneParent)throw new Error(`Entity with id '${this.id}' cannot have both 'parent' and 'standaloneParent' properties set.`);if(this.initialData.parent){const e=ne(this.initialData.parent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting parent reference '${y.id}' for entity with id '${this.id}'`),this.setParent(y,null),i.push(y);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else if(this.initialData.standaloneParent){const e=ne(this.initialData.standaloneParent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating standalone parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting standalone parent reference '${y.id}' for entity with id '${this.id}'`),this.setStandaloneParent(y,null);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Standalone parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${e}' that isn't found in the project`)}else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Entity with id '${this.id}' must have a 'parent'`),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],this.initialData.valueAsTypeList.forEach(e=>{const y=ne(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=ne(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(r),removed:D(a),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.AfterAllChildrenInitialized))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[afterAllChildrenInitialized] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:[],added:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return this.initialized=!0,this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"add-self-to-project"))){var y,m;const r=[this],a=[],c=[],e=[];return((y=this.parent)==null?void 0:y.type)===d.DataType?this.parent.setEntity(this,i):(m=this.parent)==null||m.setDefaultValue(this,i),e.push(this.parent),this.subscribe(),this.subscribeToDependencies(),i==null||i.attemptAutoclose("add-self-to-project",this.id),{updated:D(r),added:D(a),removed:D(c),affected:D(e),self:this}}setParent(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetParent))){var a;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,r)?(((a=this.parent)==null?void 0:a.id)!==(i==null?void 0:i.id)&&(this.parent=i,r&&(r==null||r.add(this,H.Updated))),r==null||r.attemptAutoclose(_.SetParent,this.id),this):this}setStandaloneParent(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetStandaloneParent))){var a;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetStandaloneParent,r)?(((a=this.standaloneParent)==null?void 0:a.id)!==(i==null?void 0:i.id)&&(this.standaloneParent=i,r&&(r==null||r.add(this,H.Updated))),r==null||r.attemptAutoclose(_.SetStandaloneParent,this.id),this):this}addValueAsTypeToList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.AddValueAsTypeToList))){return this.checkCanEdit(this,r)?((this.valueAsTypeList||[]).includes(i)||(this.valueAsTypeList=this.valueAsTypeList||[],this.valueAsTypeList.push(i),this.value!==null&&this.metaSync({value:null},r),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,r==null||r.add(this,H.Updated)),r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.AddValueAsTypeToList,this.id),this):(J.Logger.warn(`[addValueAsTypeToList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.AddValueAsTypeToList,this.id),this)}removeValueAsTypeFromList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveValueAsTypeFromList))){return this.checkCanEdit(this,r)?(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&(this.valueAsTypeList||[]).includes(i)&&(this.valueAsTypeList=this.valueAsTypeList.filter(a=>a.id!==i.id),this.valueAsTypeList.length===0?this.valueAsTypeList=null:(this.value!==null&&this.metaSync({value:null},r),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,r==null||r.add(this,H.Updated))),r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this):(J.Logger.warn(`[removeValueAsTypeFromList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this)}setValueAsTypeSingle(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsTypeSingle))){return this.checkCanEdit(this,r)?(this.valueAsTypeSingle!==i&&(this.valueAsTypeSingle=i,r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this):(J.Logger.warn(`[setValueAsTypeSingle] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this)}setValueAsTypeList(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsTypeList))){var a,c;return this.checkCanEdit(this,r)?(!i&&this.valueAsTypeList?(this.valueAsTypeList=null,r==null||r.add(this,H.Updated)):i&&!this.valueAsTypeList?(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)):i&&this.valueAsTypeList&&((a=this.valueAsTypeList)==null?void 0:a.length)!==i.length?(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)):i&&this.valueAsTypeList&&((c=this.valueAsTypeList)!=null&&c.every((e,y)=>e!==i[y]))&&(this.valueAsTypeList=i,r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose(_.SetValueAsTypeList,this.id),this):(J.Logger.warn(`[setValueAsTypeList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsTypeList,this.id),this)}setValueAsType(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.SetValueAsType))){return this.checkCanEdit(this,r)?i?(Array.isArray(i)?this.setValueAsTypeList(i,r):this.setValueAsTypeSingle(i,r),r==null||r.attemptAutoclose(_.SetValueAsType,this.id),this):(this.setValueAsTypeSingle(null,r),this.setValueAsTypeList(null,r),this):(J.Logger.warn(`[setValueAsType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),r==null||r.attemptAutoclose(_.SetValueAsType,this.id),this)}initChildren(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"init-children"))){if(this.initialized||this.startedInitialization)return this;if(this.startedInitialization=!0,this.standalone){if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(r=>{if(r.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(r);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.entityType}' with id '${r.entityId}' that is not part of the project state.`);return c}const a=this.project.get(r.id);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.type}' with id '${r.id}' that is not part of the project state.`);return a});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const a=this.project.findSubscribedBuiltInInstanceFromReference(this.initialData.valueAsTypeSingle);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.entityType}' with id '${this.initialData.valueAsTypeSingle.entityId}' that is not part of the project state.`);return this.valueAsTypeSingle=a,this}const r=this.project.get(this.initialData.valueAsTypeSingle.id);if(!r)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.type}' with id '${this.initialData.valueAsTypeSingle.id}' that is not part of the project state.`);this.valueAsTypeSingle=r}return this}if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(r=>{if(r.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(r);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.entityType}' with id '${r.entityId}' that is not part of the project state.`);return c}const a=this.project.get(r.id);if(!a)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${r.type}' with id '${r.id}' that is not part of the project state.`);return a});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const a=ne(this.initialData.valueAsTypeSingle),c=a?this.project.get(a):null;if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.entityType}' with id '${this.initialData.valueAsTypeSingle.entityId}' that is not part of the project state.`);return this.valueAsTypeSingle=c,this}const r=this.project.get(this.initialData.valueAsTypeSingle.id);if(!r)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${this.initialData.valueAsTypeSingle.type}' with id '${this.initialData.valueAsTypeSingle.id}' that is not part of the project state.`);this.valueAsTypeSingle=r}return this.subscribeToDependencies(),this.afterAllChildrenInitialized(i),i==null||i.attemptAutoclose("init-children",this.id),this}subscribe(){return this.activeVersion=!0,this.project.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}metaSync(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"meta-sync"))){const a=Mr(this,i,r),c=Lr(this,a),e=this.toMeta();return this.name=a.name!==void 0?a.name:e.name,this.autogeneration=a.autogeneration!==void 0?a.autogeneration:e.autogeneration,this.value=a.value!==void 0?a.value:e.value,super.baseMetaSync(a,this,r),a.deleted===!0&&!e.deleted?r==null||r.add(this,H.Removed):a.deleted===!1&&e.deleted?r==null||r.add(this,H.Added):c&&(r==null||r.add(this,H.Updated)),r==null||r.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=ke,...r){return await hi.repository.APILoad(this.id,...r),this}async APICreate(i=ke,...r){return await hi.repository.APICreate(this.toShallowJSON(),...r),this}async APIUpdate(i=ke,...r){return await hi.repository.APIUpdate(this.toShallowJSON(),...r),this}async APIDelete(i=ke,...r){return await hi.repository.APIDelete(this.toShallowJSON(),...r),this}async APIClone(i=ke,...r){return await hi.repository.APIClone(this.id,...r),this}async APILoadVersion(i=ke,r,...a){return await hi.repository.APILoadVersion(this.id,r,...a)}removeFromParent(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveFromParent))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[removeFromParent] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return this.parent&&(this.parent.type===d.DataType?this.parent.setEntity(null,i):Tg.includes(this.parent.type)&&this.parent.setDefaultValue(null,i),e.push(this.parent)),i==null||i.attemptAutoclose(_.RemoveFromParent,this.id),{added:D(c),updated:D(r),removed:D(a),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,r))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),r==null||r.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:Ri.ActionOwnerEntityNonDeletable,rootAction:((m=r==null?void 0:r.self)==null?void 0:m.id)===this.id&&(r==null?void 0:r.autoCloseActionName)===_.RemoveEntity}),r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const a=[],c=[],e=[],y=[];if(r!=null&&r.hasRemoved(this.id))return r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};if(c.push(this),this.unsubscribe(),this.unsubscribeFromDependencies(),this.project.subscribeDeletedInstance(this),this.metaSync({deleted:!0},r),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,r);a.push(...E),c.push(...b),e.push(...w)}),!i){const v=this.removeFromParent(r);e.push(...v.added),a.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return r==null||r.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(a),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.RestoreEntity))){if(!this.checkCanEdit(this,i))return J.Logger.warn(`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const r=[],a=[],c=[],e=[];return i!=null&&i.hasAdded(this.id)?(i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this}):(this.subscribe(),this.project.unsubscribeDeletedInstance(this),this.metaSync({deleted:!1},i),Object.values(this.detachedDependents).forEach(y=>{const{updated:m,removed:v,added:E}=y.entity.onDetachedDependencyRestored(this,y.field,i);a.push(...m),c.push(...v),r.push(...E)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(r),updated:D(a),removed:D(c),affected:D(e),self:this})}toFlat(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this,...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlat(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlat(i)):[]])}toFlatIds(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatIds(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatIds(i)):[]])}toMeta(){return{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,value:this.value,autogeneration:this.autogeneration,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name}}toJSON(i=new Set){var r,a,c;return i.has(this.id)?this.toReference():(i.add(this.id),{id:this.id,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsTypeSingle:((r=this.valueAsTypeSingle)==null?void 0:r.toJSON(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(e=>e.toJSON(i)):null,parent:(a=this.parent)==null?void 0:a.toReference(),standaloneParent:(c=this.standaloneParent)==null?void 0:c.toReference()})}toJSONClone(i=tt){var a,c,e,y,m,v,E;let r;return(a=i.seenEntityMaps)!=null&&a.has(this.id)?r=i.seenEntityMaps.get(this.id):(r=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,r)),(c=i.seenEntities)!=null&&c.has(r)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(r),(m=i.seenEntities)==null||m.add(this.id),{id:r,version:x.UUID.uuid(),createdAt:i.timestamp||L().toISOString(),previousVersion:null,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,autogeneration:this.autogeneration,value:this.value,valueAsTypeSingle:this.valueAsTypeSingle?this.project.getBuiltIn(this.valueAsTypeSingle.id)?this.valueAsTypeSingle.toJSON():this.valueAsTypeSingle.toJSONClone({...i,newId:null}):null,valueAsTypeList:this.valueAsTypeSingle&&Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(b=>this.project.getBuiltIn(b.id)?b.toJSON(i.seenEntities):b.toJSONClone({...i,newId:null})):null,parent:(v=this.parent)==null?void 0:v.toReference({seenEntityMaps:i.seenEntityMaps}),standaloneParent:(E=this.standaloneParent)==null?void 0:E.toReference({seenEntityMaps:i.seenEntityMaps})})}toReference(i=tt){var a;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:r,version:this.version,entityType:this.type}}toShallowJSON(i=tt){var a,c,e,y;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r,version:this.version,createdAt:this.createdAt,previousVersion:this.previousVersion,author:this.author,deleted:this.deleted,type:this.type,editable:this.editable,deletable:this.deletable,name:this.name,valueAsTypeSingle:((c=this.valueAsTypeSingle)==null?void 0:c.toReference(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(m=>m.toReference(i)):null,value:this.value,autogeneration:this.autogeneration,parent:(e=this.parent)==null?void 0:e.toReference(i),standaloneParent:(y=this.standaloneParent)==null?void 0:y.toReference(i)}}toFlatJSON(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatJSON(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatJSON(i)):[]])}toGenerationTarget(i=tt){var a,c,e,y;let r=this.id;return(a=i.seenEntityMaps)!=null&&a.has(this.id)&&(r=i.seenEntityMaps.get(this.id)),{id:r,type:this.type,name:this.name,valueAsTypeSingle:((c=this.valueAsTypeSingle)==null?void 0:c.id)||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(m=>m.id):null,value:this.value,autogeneration:this.autogeneration,parent:(e=this.parent)==null?void 0:e.id,standaloneParent:(y=this.standaloneParent)==null?void 0:y.id}}toFlatGenerationTarget(i=new Set){return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.valueAsTypeSingle?this.valueAsTypeSingle.toFlatGenerationTarget(i):[],...this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)?this.valueAsTypeList.flatMap(a=>a.toFlatGenerationTarget(i)):[]])}clearErrors(){return this.errors=[],this}validate(){return this.errors=VCe(this),{success:!0}}async validateAsync(i={}){const r=J.YieldTracker.from(i);return this.errors=await _Ce(this,{tracker:r}),{success:!0}}getErrors(){return[...this.errors]}async getErrorsAsync(i={}){const r=J.YieldTracker.from(i),a=[...this.errors];return await r.tick(),a}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,_.CloneEntity)),r=null,a=null,c=!0){const e=Rr(r,this),y=this.toJSON(),m=a||x.UUID.uuid();y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||L().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0;const v=Si(y,e);return v.hydrateAncestors(),r&&v.setParent(r,i),c&&(v.subscribe(),v.addSelfToProject(i)),i==null||i.add(v,H.Added),v.initChildren(i),i==null||i.attemptAutoclose(_.CloneEntity,this.id),v}merge(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),this,!0,"merge-literal-value"))){const a=[],c=[],e=[],y=[];return this.valueAsTypeSingle!==(i==null?void 0:i.valueAsTypeSingle)&&(this.setValueAsType(i.valueAsTypeSingle,r),a.push(this)),this.valueAsTypeList!==i.valueAsTypeList&&(this.setValueAsTypeList(i.valueAsTypeList,r),a.push(this)),this.value!==i.value&&(this.metaSync({value:i.value},r),a.push(this)),this.autogeneration!==i.autogeneration&&(this.metaSync({autogeneration:i.autogeneration},r),a.push(this)),this.name!==i.name&&(this.metaSync({name:i.name},r),a.push(this)),r==null||r.attemptAutoclose("merge-literal-value",this.id),{updated:D(a),added:D(c),removed:D(e),affected:D(y),self:this}}};I(hi,"repository",{APICreate:async(i,...r)=>i,APIUpdate:async(i,...r)=>i,APIDelete:async(i,...r)=>i,APIClone:async(i,...r)=>{},APILoad:async(i,...r)=>null,APILoadVersion:async(i,r,...a)=>null}),I(hi,"type",d.LiteralValue),I(hi,"USER_MANAGED_PARENT_TYPES",[d.DataType,d.InputMap,d.Property,d.ArgumentDeclaration,d.ReturnStatement,d.BreakStatement,d.ContinueStatement,d.VariableDeclaration,d.VariableInstance,d.ValueDescriptor,d.OutputMap]),I(hi,"PARENT_TYPES",[...hi.USER_MANAGED_PARENT_TYPES]),I(hi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(hi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(hi,"BASE_PROPERTIES",[...hi.MUTABLE_BASE_PROPERTIES,...hi.INMUTABLE_BASE_PROPERTIES]),I(hi,"MUTABLE_META_PROPERTIES",[...hi.MUTABLE_BASE_PROPERTIES]),I(hi,"INMUTABLE_META_PROPERTIES",[...hi.INMUTABLE_BASE_PROPERTIES]),I(hi,"META_PROPERTIES",[...hi.MUTABLE_META_PROPERTIES,...hi.INMUTABLE_META_PROPERTIES]),I(hi,"MUTABLE_UPSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(hi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(hi,"UPSTREAM_PROPERTIES",[...hi.MUTABLE_UPSTREAM_PROPERTIES,...hi.INMUTABLE_UPSTREAM_PROPERTIES]),I(hi,"MUTABLE_DOWNSTREAM_PROPERTIES",[]),I(hi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(hi,"DOWNSTREAM_PROPERTIES",[...hi.MUTABLE_DOWNSTREAM_PROPERTIES,...hi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(hi,"PROPERTIES",[...hi.META_PROPERTIES,...hi.UPSTREAM_PROPERTIES,...hi.DOWNSTREAM_PROPERTIES]);let Qr=hi;function hf(o){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const i=new Uint8Array(o);return crypto.getRandomValues(i),i}const{randomBytes:p}=require("crypto");return p(o)}function NCe(o,p){const i=p-o+1,a=bR()*i;return Math.floor(a)+o}function xCe(){const o=hf(4);return(o[0]<<24|o[1]<<16|o[2]<<8|o[3])>>>0}function bR(){return xCe()/2**32}function VN(o){const p=hf(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const NC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function PN(o){let p="";const i=hf(o);for(let r=0;r<o;r++)p+=NC[i[r]%NC.length];return p}function $Ce(o){const p=hf(o);let i;if(typeof Buffer<"u")i=Buffer.from(p).toString("base64");else{const r=String.fromCharCode(...p);i=btoa(r)}return i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function NN(o){return PN(o)}function xN(o,p=NC){let i="";const r=hf(o);for(let a=0;a<o;a++)i+=p[r[a]%p.length];return i}function Mu(){const o=hf(16);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const p=Array.from(o).map(i=>i.toString(16).padStart(2,"0")).join("");return[p.slice(0,8),p.slice(8,12),p.slice(12,16),p.slice(16,20),p.slice(20,32)].join("-")}function LCe(){return xN(6)}function MCe(){return VN(32)}const ibi=63,rbi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function nbi(o){return o.length>=1&&o.length<=ibi&&rbi.test(o)&&!o.includes("--")}function*abi(){yield"";const o="abcdefghijklmnopqrstuvwxyz";for(let p=1;;p++){const i=new Array(p).fill(0);let r=!1;for(;!r;){yield i.map(a=>o[a]).join("");for(let a=p-1;a>=0&&(i[a]++,!(i[a]<o.length));a--)i[a]=0,a===0&&(r=!0)}}}function sbi(o,p){const i=new Set(o.map(a=>a.toLowerCase())),r=p>0?"secondary-db":"main";for(const a of abi()){const c=a?`${r}-${a}`:r;if(nbi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function BCe(o,p){switch(o.id){case Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const i=o.project.entities.filter(m=>!!m.implements.find(v=>v.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)),r=i.find(m=>{const v=m.properties.find(w=>w.implements.find(V=>V.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.getDefaultValue();return(E==null?void 0:E.value)===!0});if(!r&&i.length){const v=i[0].properties.find(b=>b.implements.find(w=>w.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.defaultValue;if(E)E.metaSync({value:!0},p);else if(v!=null&&v.dataType){const b={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=me(b,o.project);return w.setParent(v,p),w.initChildren(p),p==null||p.add(w,H.Added),w.addSelfToProject(p),{newEntities:[w]}}return{newEntities:[]}}else if(r)return{newEntities:[]};const a=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=AR(a,"Main database",p);if(c.errors.length>0)return{newEntities:[]};const e=c.properties.find(m=>m.implements.find(v=>v.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),y=e==null?void 0:e.defaultValue;if(y)y.metaSync({value:!0},p);else if(e!=null&&e.dataType){const m={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=me(m,o.project);v.setParent(e,p),v.initChildren(p),p==null||p.add(v,H.Added),v.addSelfToProject(p)}return{newEntities:[c]}}}return{newEntities:[]}}function GCe(o,p){const i=[],r=[],a=[],c=[];return o.implements.filter(y=>y.type===d.BuiltInBaseEntity).forEach(y=>{var m,v,E,b,w;switch(y.id){case Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.id:{const V=o.project.entities.filter(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=V.find(j=>!!j.properties.find(Y=>{var ie;return Y.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((ie=Y.getDefaultValue())==null?void 0:ie.value)===!0}));if(!$&&V.length)$=V[0];else if(!$&&!V.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const Y=$.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=Y==null?void 0:Y.defaultValue)==null||m.metaSync({value:!0},p),r.push($)}const M=o.properties.find(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(M&&!(M!=null&&M.defaultValue)){const j={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:M==null?void 0:M.toReference()},Y=me(j,o.project);Y.hydrateAncestors(),Y.setParent(M,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p),(M==null?void 0:M.defaultValue).setValueAsTypeSingle($||null,p),r.push(Y);return}else M!=null&&M.defaultValue&&!(M!=null&&M.defaultValue.valueAsTypeSingle)&&(M==null||M.defaultValue.setValueAsTypeSingle($||null,p));const k=o.properties.find(j=>j.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!k)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!k.dataType){const j=ur.new(p);j.parent=k.toReference();const Y=me(j,o.project);Y.hydrateAncestors(),Y.setParent(k,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p)}const F=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=k.dataType)==null||v.setEntity(F,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const V=o.project.entities.filter(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&ie.id!==o.id),$=V.map(ie=>{var ae;const ee=ie.properties.find(fe=>fe.implements.find(ve=>ve.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(ae=ee==null?void 0:ee.getDefaultValue())==null?void 0:ae.value}).filter(ie=>!!ie),M=o.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!V.find(ie=>!!ie.properties.find(ee=>{var de;return ee.implements.find(ae=>ae.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((de=ee.getDefaultValue())==null?void 0:de.value)===!0}))){const ie=o.properties.find(ee=>ee.implements.find(de=>de.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!ie)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(ie!=null&&ie.defaultValue)){const ee=Qr.new(p);ee.parent=ie.toReference();const de=me(ee,o.project);de.hydrateAncestors(),de.setParent(ie,p),de.addSelfToProject(p),p==null||p.add(de,H.Added),de.initChildren(p)}(E=ie==null?void 0:ie.defaultValue)==null||E.metaSync({value:!0},p)}if(!M)throw new Error("Identifier property not found for relational database entity with id: "+o.id);if(!(M!=null&&M.defaultValue)){const ie=Qr.new(p);ie.parent=M.toReference();const ee=me(ie,o.project);ee.hydrateAncestors(),ee.setParent(M,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const F=sbi($,V.length);(b=M.defaultValue)==null||b.metaSync({value:F},p);const j=o.properties.find(ie=>ie.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!j)throw new Error(`[handleAfterEntityImplementationSideEffects] Password property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id} with id ${o.id}`);if(!j.defaultValue){const ie=Qr.new(p);ie.parent=j.toReference();const ee=me(ie,o.project);ee.hydrateAncestors(),ee.setParent(j,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),r.push(ee)}const Y=NN(24);(w=j.defaultValue)==null||w.metaSync({value:Y},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const V=o.properties.find(F=>F.implements.find(j=>j.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!V)throw new Error(`[handleAfterEntityImplementationSideEffects] Time property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let $=V.defaultValue||null;if(!$){const F=Qr.new(p);F.parent=V.toReference(),F.name=oe.Date,F.id=x.UUID.uuid(),$=me(F,o.project),$.hydrateAncestors(),$.setParent(V,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),V.metaSync({editable:!1,deletable:!1},p);const M=o.properties.find(F=>F.implements.find(j=>j.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id));if(!M)throw new Error(`[handleAfterEntityImplementationSideEffects] Definition property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let k=M.defaultValue||null;if(!k){const F=Qr.new(p);F.name=oe.EntityTemplate,F.parent=M.toReference(),F.id=x.UUID.uuid(),k=me(F,o.project),k.hydrateAncestors(),k.setParent(M,p),k.addSelfToProject(p),k.initChildren(p),p==null||p.add(k,H.Added)}}}}),{self:o,updated:D(i),added:D(r),removed:D(a),affected:D(c)}}function AR(o,p,i,r){const a=r||x.UUID.uuid(),c=Ts.new(i);c.id=a,c.name=p,c.static=o.static,c.implements=[o.toJSON()],c.parent=o.project.toReference(),c.static=o.static,BCe(o,i);const e=me(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),GCe(e,i),e.afterAllChildrenInitialized(i),e}function $N(o,p){return p.entities.find(a=>{const c=a.properties,e=c.map(b=>b.name),y=o.every(b=>e.includes(b)),m=e.filter(b=>!o.includes(b)),v=c.every(b=>!m.includes(b.name)||!b.required);return y&&v})||null}function kCe(o,p,i,r=Ze.OrDataTypeGroup){const a=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ur.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=r;const E=me(v,o.project);return c.push(E),E.setParent(p,i),E.initChildren(i),i==null||i.add(E,H.Added),E.setEntity(o,i),E.addSelfToProject(i),{updated:D(a),added:D(c),removed:D(e),affected:D(y),self:E}}function LN(o,p,i,r,a){var v,E,b,w,V,$,M,k;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let F=!1;const j=new Date(o);if(j instanceof Date&&!isNaN(j.valueOf())&&(F=!0),F){const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Date].id);p.setEntity(Y,r);break}else{const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id);p.setEntity(Y,r);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},r),o.length>0){const Y=o.slice(0,5).filter(ee=>ee!==void 0);if(Y.every(ee=>typeof ee==typeof Y[0])&&(typeof Y[0]!="object"||Y[0]===null))switch(typeof Y[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),r);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}else{const ee=[];let de=!1;Y.forEach(fe=>{var ve,ue,ye,Ve;if(Array.isArray(fe)&&(de=!0),typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const _e=fA(fe,p.project,{...i,id:x.UUID.uuid()},r,a);_e.hasCreated&&ee.push((ve=_e.changeSet)==null?void 0:ve.self),c.push(...(ue=_e.changeSet)==null?void 0:ue.updated),e.push(...(ye=_e.changeSet)==null?void 0:ye.added),y.push(...(Ve=_e.changeSet)==null?void 0:Ve.removed)}});const ae=D(ee);if(!ae.length&&!de){Y.forEach(fe=>{const ve=ur.new(r);ve.parentRelationType=Ze.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);switch(ue.setParent(p,r),ue.initChildren(r),r==null||r.add(ue,H.Added),ue.addSelfToProject(r),typeof fe){case"string":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),r);break;case"number":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),r);break;case"boolean":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),r);break;case"object":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),r);break}});break}else ae.length===1&&!de?p.setEntity(ae[0],r):Y.forEach(fe=>{if(typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const ve=$N(Object.keys(fe),p.project);if(ve){const ue=kCe(ve||ae[0],p,r,Ze.OrDataTypeGroup);c.push(...ue.updated),e.push(...ue.added),y.push(...ue.removed)}}else{const ve=ur.new(r);ve.parentRelationType=Ze.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);ue.setParent(p,r),ue.initChildren(r),r==null||r.add(ue,H.Added),ue.addSelfToProject(r);const ye=LN(fe,ue,{...i,id:x.UUID.uuid()},r,a);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const Y=fA(o[0],p.project,{...i},r,a);p.setEntity((v=Y.changeSet)==null?void 0:v.self,r),c.push(...(E=Y.changeSet)==null?void 0:E.updated),e.push(...(b=Y.changeSet)==null?void 0:b.added),y.push(...(w=Y.changeSet)==null?void 0:w.removed);break}else{const Y=fA(o,p.project,{...i},r,a);p.setEntity((V=Y.changeSet)==null?void 0:V.self,r),c.push(...($=Y.changeSet)==null?void 0:$.updated),e.push(...(M=Y.changeSet)==null?void 0:M.added),y.push(...(k=Y.changeSet)==null?void 0:k.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function fA(o,p,i,r,a){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=$N(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=a?i.name+" of "+a.name:i.name,V={id:i.id||x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(r==null?void 0:r.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,name:b,codeName:null,deletable:!0,editable:!0,type:d.DefinitionEntity,additionalProperties:!1,additionalPropertiesDataType:null,allPropertiesImplement:null,description:i.description||null,static:i.static||!1,abstract:i.abstract||!1,properties:[],methods:[],abstractMethods:[],extends:null,implements:[],x:0,y:0,parent:p.toReference()},$=me(V,p);return $.setParent(p,r),$.initChildren(r),r==null||r.add($,H.Added),$.addSelfToProject(r),e.push($),v.forEach((M,k)=>{const F=x.UUID.uuid(),j=Za.new(r);j.id=F,j.name=M,j.codeName=M,j.parent=$.toReference(),j.index=k,j.required=!0,j.interactive=!0;const Y=me(j,p);Y.setParent($,r),Y.initChildren(r),r==null||r.add(Y,H.Added),Y.addSelfToProject(r),e.push(Y);const ie=o[M],ee=x.UUID.uuid(),de=ur.new(r);de.id=ee,de.parent=Y.toReference(),de.like=!0,de.isList=!1;const ae=me(de,p);ae.setParent(Y,r),ae.initChildren(r),r==null||r.add(ae,H.Added),ae.addSelfToProject(r),e.push(ae);const fe=LN(ie,ae,{...i,name:M,id:x.UUID.uuid()},r,a||$);c.push(...fe.updated),e.push(...fe.added),y.push(...fe.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function bd(o,p,i,r){const a=[];return!o.length||!p.length?{errors:a,overlap:!1}:(o.length>p.length?o.forEach(c=>{const e=p.find(m=>m.name===c.name),y=p.find(m=>{var v,E;return Array.isArray(m.implements)?m.implements.some(b=>!!c.implements.find(w=>w.id===b.id)):((v=m.implements)==null?void 0:v.id)===((E=c.implements)==null?void 0:E.id)});if(e){const m=new ki({id:c.id+"--"+e.id+"--"+r,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${e.type} ${e.name} with id "${e.id}" that has the same name`,severity:ce.Error,code:r,entity:c,firstRelationship:e});a.push(m)}if(y){const m=new ki({id:c.id+"--"+y.id+"--"+i,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${y.type} ${y.name} with id "${y.id}" that implements the same base descriptor`,severity:ce.Error,code:i,entity:c,firstRelationship:y});a.push(m)}}):p.forEach(c=>{var m;const e=o.find(v=>v.name===c.name),y=o.find(v=>{var E,b;return v.implements&&Array.isArray(v.implements)?v.implements.some(w=>!!c.implements.find(V=>V.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new ki({id:e.id+"--"+c.id+"--"+r,message:`Entity of type ${e.type} named "${e.name}" with id "${e.id}" overrides a base entity ${c.name} with id "${c.id}" that has the same name`,severity:ce.Error,code:r,entity:e,firstRelationship:c});a.push(v)}if(y){const v=new ki({id:y.id+"--"+c.id+"--"+i,message:`Entity of type ${y.type} named "${y.name}" with id "${y.id}" overrides a base entity ${c.name} with id "${c.id}" that implements the same base ${Array.isArray(y==null?void 0:y.implements)?Dt(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:ce.Error,code:i,entity:y,firstRelationship:c});a.push(v)}}),{errors:a,overlap:!!a.length})}function lbi(o,p){return o.abstract||(o.properties.forEach(r=>{r.abstract||r.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(r=>{r.field===t$.EntityField&&r.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function obi(o,p){return o.abstract&&(o.properties.forEach(r=>{r.abstract&&r.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(r=>{(r.field===ig.Implements||r.field===ig.Extends)&&r.entity.onDetachedDependencyRemoved(o,r.field,p)}),o.metaSync({abstract:!1},p)),o}function dbi(o,p){return o.static||(o.properties.forEach(r=>{r.static||r.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function ubi(o,p){return o.static&&o.metaSync({static:!1},p),o}const lT=class lT extends DN{constructor(i,r){super(i);I(this,"initialData");I(this,"id");I(this,"version");I(this,"name");I(this,"description",null);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",!1);I(this,"static");I(this,"additionalProperties",!1);I(this,"properties",[]);I(this,"allPropertiesImplement",null);I(this,"additionalPropertiesDataType",null);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"interactive",!1);I(this,"errors",[]);I(this,"project");if(this.initialData=this.initialData||i,this.project=this.project||r,this.id=this.id||i.id,this.version=this.version||i.version,this.name=this.name||i.name,this.static=this.static||i.static,this.interactive=this.interactive||i.interactive,this.abstract=i.abstract,this.additionalProperties=i.additionalProperties,this.properties=this.initialData.properties.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(a=>{const c=me(a,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const a=me(this.initialData.allPropertiesImplement,this.project);a.setParent(this,null),a.initChildren(null),this.allPropertiesImplement=a}if(this.initialData.additionalPropertiesDataType){const a=me(this.initialData.additionalPropertiesDataType,this.project);a.setParent(this,null),a.initChildren(null),this.additionalPropertiesDataType=a}this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var a;const i=((a=this.extends)==null?void 0:a.allMethods)||[],r=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(r)}get allBasePropertiesFromOriginalParents(){var a;const i=((a=this.extends)==null?void 0:a.allProperties)||[],r=[...i].filter(c=>!i.some(e=>{var y;return e.id!==c.id&&(!!e.implements.find(m=>m.id===c.id)||((y=e.extends)==null?void 0:y.id)===c.id)}));return D(r)}get allBasePropertiesFromExtendedAndImplementedEntities(){var a,c;const i=[...((a=this.extends)==null?void 0:a.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),r=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D([...r])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,r)=>r.type===d.PrimitiveEntity?i:[...[...r.ownDeclaredMethods,...r.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==d.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var a,c;const i=[...((a=this.extends)==null?void 0:a.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),r=[...i].filter(e=>!i.some(y=>{var m;return y.id!==e.id&&(!!y.implements.find(v=>v.id===e.id)||((m=y.extends)==null?void 0:m.id)===e.id)}));return D(r)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,r)=>{const a=r.implementedPropertiesFromOriginalParents,c=[...r.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...a,...c,...i];return[...e].filter(m=>!!!e.find(E=>{var b;return((b=E.extends)==null?void 0:b.id)===m.id||!!E.implements.find(w=>w.id===m.id)}))},[])].filter(i=>!!i.abstract))}get extendedProperties(){return this.properties.filter(i=>i.isExtendedProperty)}get ownDeclaredMethods(){return[...this.methods,...this.abstractMethods]}get ownDeclaredProperties(){return this.properties.filter(i=>!i.isExtendedProperty)}subscribe(){return this.project.subscribeBuiltInInstance(this),this}unsubscribe(){return this.project.unsubscribeBuiltInInstance(this),this}async APILoad(i=ke,...r){return await lT.repository.APILoad(this.id,...r),this}toFlat(i=new Set){var a;return i.has(this.id)?[]:(i.add(this.id),[this,...this.properties.flatMap(c=>c.toFlat(i)),...this.methods.flatMap(c=>c.toFlat(i)),...this.abstractMethods.flatMap(c=>c.toFlat(i)),...((a=this.extends)==null?void 0:a.toFlat(i))||[]])}toFlatIds(i=new Set){var a;return i.has(this.id)?[]:(i.add(this.id),[this.id,...this.properties.flatMap(c=>c.toFlatIds(i)),...this.methods.flatMap(c=>c.toFlatIds(i)),...this.abstractMethods.flatMap(c=>c.toFlatIds(i)),...((a=this.extends)==null?void 0:a.toFlatIds(i))||[]])}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,additionalProperties:this.additionalProperties,abstract:this.abstract,static:this.static,type:this.type,name:this.name}}toJSON(i=new Set){var r,a,c;return i.has(this.id)?this.toReference():(i.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,additionalProperties:this.additionalProperties,interactive:this.interactive,additionalPropertiesDataType:((r=this.additionalPropertiesDataType)==null?void 0:r.toJSON(i))||null,allPropertiesImplement:((a=this.allPropertiesImplement)==null?void 0:a.toJSON(i))||null,properties:this.properties.map(e=>e.toJSON(i)),methods:this.methods.map(e=>e.toJSON(i)),abstractMethods:this.abstractMethods.map(e=>e.toJSON(i)),extends:((c=this.extends)==null?void 0:c.toJSON(i))||null})}toReference(i=tt){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=tt){var r,a,c;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,additionalProperties:this.additionalProperties,additionalPropertiesDataType:((r=this.additionalPropertiesDataType)==null?void 0:r.toReference())||null,allPropertiesImplement:((a=this.allPropertiesImplement)==null?void 0:a.toReference())||null,properties:this.properties.map(e=>e.toReference()),methods:this.methods.map(e=>e.toReference()),abstractMethods:this.abstractMethods.map(e=>e.toReference()),extends:((c=this.extends)==null?void 0:c.toReference())||null}}toFlatJSON(i=new Set){var a,c;return i.has(this.id)?[]:(i.add(this.id),[this.toShallowJSON(),...this.properties.flatMap(e=>e.toFlatJSON(i)),...this.methods.flatMap(e=>e.toFlatJSON(i)),...this.abstractMethods.flatMap(e=>e.toFlatJSON(i)),...((a=this.additionalPropertiesDataType)==null?void 0:a.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(i=tt){var r;return{id:this.id,type:this.type,name:this.name,description:this.description,static:this.static,abstract:this.abstract,interactive:this.interactive,additionalProperties:this.additionalProperties,extends:(r=this.extends)==null?void 0:r.id}}toFlatGenerationTarget(i=new Set){var a,c;return i.has(this.id)?[]:(i.add(this.id),[this.toGenerationTarget(),...this.properties.flatMap(e=>e.toFlatGenerationTarget(i)),...this.methods.flatMap(e=>e.toFlatGenerationTarget(i)),...this.abstractMethods.flatMap(e=>e.toFlatGenerationTarget(i)),...((a=this.additionalPropertiesDataType)==null?void 0:a.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,r;return this.errors=[],this.properties.forEach(a=>a.clearErrors()),this.methods.forEach(a=>a.clearErrors()),this.abstractMethods.forEach(a=>a.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(r=this.allPropertiesImplement)==null||r.clearErrors(),this}validate(){return this.errors=QEi(this),{success:!0}}async validateAsync(i={}){const r=J.YieldTracker.from(i);return this.errors=await XEi(this,{tracker:r}),{success:!0}}getErrors(){var r,a;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((r=this.additionalPropertiesDataType)==null?void 0:r.getErrors())||[],...((a=this.allPropertiesImplement)==null?void 0:a.getErrors())||[]]}async getErrorsAsync(i={}){const r=J.YieldTracker.from(i),a=[...this.errors];await r.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:r});a.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:r});a.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:r});a.push(...c)}return a}getShallowErrors(){return this.errors}implement(i,r=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,L().toISOString(),null,!0,"implement-built-in-base-entity")),a){const c=AR(this,i,r,a);return r==null||r.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var r;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((r=this.extends)==null?void 0:r.type)===d.BuiltInBaseEntity&&i.push(...this.extends.getAllPropertiesImplements()||[]),i}getAllInteractiveMethods(){const i=[];if(this.interactive){if(i.push(...this.methods,...this.abstractMethods),!this.extends||this.extends.type===d.BuiltInBaseEntity&&this.extends.interactive||this.extends.type===d.PrimitiveEntity)return i;this.extends instanceof lT&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(lT,"repository",{APILoad:async(i,...r)=>null});let Vd=lT;class UCe extends Vd{constructor(i){super(un,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",un.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",un.abstract);I(this,"static",un.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=un,this.project=i,this.id=un.id,this.version=un.version,this.name=un.name,this.static=un.static,this.abstract=un.abstract,this.properties=this.initialData.properties.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.methods=this.initialData.methods.map(r=>{const a=me(r,this.project);return a.parent=this,a}),this.abstractMethods=this.initialData.abstractMethods.map(r=>{const a=me(r,this.project);return a.parent=this,a}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}}var la=(o=>(o.StringValueMustNotHaveSpaces="string-value-must-not-have-spaces",o.StringValueMustNotHaveDashes="string-value-must-not-have-dashes",o.MustBeUniqueAmongSameEntities="must-be-unique-among-same-entities",o))(la||{});function MN(o,p){const i=[],r=p;if(!r)return{errors:i,override:p};if(typeof r!="string")return{errors:[],override:p};if(r.includes(" ")){const a=new ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(a)}return{errors:i,override:r.replace(/\s/g,"-")}}function jCe(o,p){const i=[],r=p;if(!r)return{errors:i,override:p};if(typeof r!="string")return{errors:[],override:p};if(r.includes(" ")){const a=new ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(a)}if(r.includes("-")){const a=new ki({id:o.id+"--string-value-must-not-have-dashes",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(a)}return{errors:i,override:r.replace(/\s|-/g,"_")}}var Ko=(o=>(o.StatusCodeMustBeNumber="status-code-must-be-number",o.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",o))(Ko||{});function KCe(o,p){const i=[];if(typeof p!="number"){const r=new ki({id:o.id+"--status-code-must-be-number",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number.`,severity:ce.Error,code:"status-code-must-be-number",entity:o});return i.push(r),{errors:i,override:p}}if(p<100){const r=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(r)}if(p>599){const r=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(r)}return{errors:i,override:p}}class FCe extends Vd{constructor(i){var e,y;super(Ga,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",Ga.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",Ga.abstract);I(this,"static",Ga.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=Ga,this.project=i,this.id=Ga.id,this.version=Ga.version,this.name=Ga.name,this.static=Ga.static,this.abstract=Ga.abstract,this.properties=this.initialData.properties.map(m=>{const v=me(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project));const r=this.properties.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!r)throw new Error("Path property not found in endpoint entity");r._codeNativeValueValidation=(m,v)=>{const E=MN(m,v);if(m.project.entities.filter(w=>Wi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const V=w.properties.find(k=>k.implements.find(F=>F.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!V)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=V.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new ki({id:m.id+"--"+la.MustBeUniqueAmongSameEntities,message:`Entity of type ${m.type} with id "${m.id}" has an invalid value "${v}". The value must be unique among all endpoint paths.`,severity:ce.Error,code:la.MustBeUniqueAmongSameEntities,entity:m});E.errors.push(w)}return E};const a=this.abstractMethods.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!a)throw new Error("Handler method not found in endpoint entity");const c=(((y=(e=a.dataType)==null?void 0:e.entity)==null?void 0:y.properties)||[]).find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.dataType.entity.properties.statusCode.id);if(!c)throw new Error("Status code output not found in handler method");c._codeNativeValueValidation=(m,v)=>KCe(m,v)}}class SCe extends Mi{constructor(i){super(No,i);I(this,"id",Ki.Parallel);I(this,"name",Ki.Parallel);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=No.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(No.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=No.error?me(No.error,this.project):null}}class qCe extends Mi{constructor(i){super(us,i);I(this,"id",us.id);I(this,"name",us.name);I(this,"description",us.description);I(this,"version",us.version);I(this,"autoexecutable",!1);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=us.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(us.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=us.error?me(us.error,this.project):null}}class ZCe extends Mi{constructor(i){super(xu,i);I(this,"id",Ki.Sequential);I(this,"name",Ki.Sequential);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=xu.inputs.map(r=>{const a=me(r,this.project);return a.setParent(this,null),a.initChildren(null),a}),this.dataType=me(xu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=xu.error?me(xu.error,this.project):null}}var ja=(o=>(o.UUIDMustBeString="uuid-must-be-string",o.UUIDMustBeValidFormat="uuid-must-be-valid-format",o.UUIDMustNotContainSpaces="uuid-must-not-contain-spaces",o))(ja||{});function pbi(o,p){const i=[];if(typeof p!="string"){const a=new ki({id:o.id+"--uuid-must-be-string",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be text.`,severity:ce.Error,code:"uuid-must-be-string",entity:o});return i.push(a),{errors:i,override:p}}const r=MN(o,p);if(r.errors.length>0)return i.push(...r.errors),{errors:i,override:p};if(!RN(p)){const a=new ki({id:o.id+"--uuid-must-be-valid-format",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a valid UUID format. Eg: "123e4567-e89b-12d3-a456-426614174000".`,severity:ce.Error,code:"uuid-must-be-valid-format",entity:o});i.push(a)}return{errors:i,override:p}}var Ne=(o=>(o.Inherited="inherited",o.DefaultValue="default-value",o.Missing="missing",o.Empty="empty",o.AutoCalculated="auto-calculated",o.QueuedAutocalculation="queued-autocalculation",o.External="external",o.Testing="testing",o.ExecutionResult="execution-result",o))(Ne||{});const HCe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function zm(o,p){return{...HCe,id:o,project:p}}class Jm{constructor(p,i){I(this,"initialized",!1);I(this,"id");I(this,"project");I(this,"values",{});I(this,"onWriteCallback",()=>{});I(this,"onRemoveCallback",()=>{});this.id=p,this.project=i,this.init()}onWrite(p){this.onWriteCallback=p}onRemove(p){this.onRemoveCallback=p}init(){var r;if(!((r=this.project)!=null&&r.id)||this.initialized)return;const p={},i={};Object.keys(p).forEach(a=>{const c=p[a],e=new Qr(c,this.project);try{if(c.parent){const v=this.project.findSubscribedInstanceFromReference(c.parent);if(!v)return;e.setParent(v,null),e.hydrateAncestors(),e.initChildren(null)}else if(c.standaloneParent){const v=this.project.findSubscribedInstanceFromReference(c.standaloneParent);if(!v)return;e.standalone=!0,e.setStandaloneParent(v,null),e.hydrateAncestors(),e.initChildren(null)}i[a]=e;const y=e.parent||e.standaloneParent,m=zCe(e,y,this.project);m?i[a]=m:delete p[a]}catch(y){J.Logger.error("Error hydrating ancestors: ",y),delete p[a]}}),this.values={...this.values,...i},this.initialized=!0}toJSON(){const p={};return Object.keys(this.values).forEach(i=>{p[i]=this.values[i].toJSON()}),p}writeValue(p,i){if(!p)throw new Error("The value owner entity is required when writing a value to a value store");let a=this.values[p.id];if(!a)if(i instanceof Qr)a=i;else if(i)a=Si(i,this.project);else{const c={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:new Date().toISOString(),author:x.sessionAuthor,deleted:!1,previousVersion:null,value:null,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:p.toReference(),parent:null,valueAsTypeSingle:null,valueAsTypeList:null,autogeneration:null,name:Cc(p.getDataType(null))};a=Si(c,this.project)}a.standalone=!0,a.initialData.standaloneParent||J.Logger.warn("instance.initialData: ",a.initialData),a.setStandaloneParent(p,null),a.hydrateAncestors(),a.initChildren(null),i&&(a.metaSync({...i},null),a.setValueAsType(i.valueAsType,null)),this.values[p.id]=a,this.onWriteCallback(p,a)}readValue(p){return this.values[p]||null}removeValue(p){if(!this.values[p])return;delete this.values[p];const i=this.project.get(p);i&&this.onRemoveCallback(i)}clear(){this.values={}}}function hr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function WCe(o){if(Array.isArray(o))return o.map(m=>typeof m=="number"?m:e(m)?Number(m):String(m));const p=[];let i=0,r="",a=!1,c=null;for(;i<o.length;){const m=o[i];if(m==="."&&!a){r.length&&(p.push(y(r)),r=""),i++;continue}if(m==="["&&!a){r.length&&(p.push(y(r)),r=""),a=!0,i++;continue}if(a){if(!c&&(m==='"'||m==="'")){c=m,i++;continue}if(c){if(m==="\\"&&i+1<o.length){r+=o[i+1],i+=2;continue}if(m===c){c=null,i++;continue}r+=m,i++;continue}if(m==="]"){p.push(y(r)),r="",a=!1,i++;continue}if(/\s/.test(m)&&!c){i++;continue}r+=m,i++;continue}r+=m,i++}return r.length&&p.push(y(r)),p;function e(m){return/^[0-9]+$/.test(m)}function y(m){const v=m.trim();return e(v)?Number(v):v}}function BN(o,p,i){if(o==null)return i;const r=WCe(p);let a=o;for(let c=0;c<r.length;c++){const e=r[c];if(a==null)return i;if(Array.isArray(a)&&typeof e=="number"){if(!(e in a))return i;a=a[e]}else{if(!Object.prototype.hasOwnProperty.call(a,e))return i;a=a[e]}}return a}const cbi=new Set(["__proto__","prototype","constructor"]);function fbi(o){return typeof o=="string"&&cbi.has(o)}function GN(o,p,i,r){const a=WCe(p);if(a.length===0)return o;function c(e,y){const m=a[y],v=y===a.length-1;if(r==="strict-set"||r==="strict-delete"){if(fbi(m))throw new Error(`Unsafe key "${String(m)}"`);if(e==null||typeof e!="object"&&!Array.isArray(e))throw new Error(`Missing parent or invalid container at segment "${String(m)}".`);if(r==="strict-delete"&&v&&!(m in e))return e}let E;if(Array.isArray(e))E=[...e];else if(e&&typeof e=="object")E={...e};else if(r==="safe-set")E=typeof m=="number"?[]:{};else throw new Error(`Cannot traverse path at "${String(m)}"`);if(v)return r==="strict-delete"?delete E[m]:E[m]=i,E;const b=e?e[m]:void 0;if(r==="safe-set"&&b==null){const w=typeof a[y+1]=="number",V=c(w?[]:{},y+1);return E[m]=V,E}return E[m]=c(b,y+1),E}if(o==null&&r==="safe-set"){const e=typeof a[0]=="number";return c(e?[]:{},0)}return c(o,0)}const Ok=Symbol("missing"),ybi=o=>o!=null&&typeof o=="object";function gR(o,p){if(typeof o!="string")throw new TypeError(`${p} expects the key to be a string.`);return o}function Qh(o,p){if(typeof o!="string"&&!Array.isArray(o))throw new TypeError(`${p} expects the path to be string or array.`);return o}function mf(o,p){if(!hr(o))throw new TypeError(`${p} expects the first argument to be an object.`);return o??{}}function hbi(o,p){const i=gR(p,"ReadKey");return(o??{})[i]}function mbi(o,p,i){const r=gR(p,"WriteKey");if(o&&typeof o=="object"){const a=Array.isArray(o)?[...o]:{...o};return a[r]=i,a}return{[r]:i}}function Tbi(o,p){if(!o||typeof o!="object")return{};const i=String(p),{[i]:r,...a}=o;return a}function vbi(o,p,i){const r=mf(o,"ReadNestedKey"),a=Qh(p,"ReadNestedKey");return BN(r,a,i)}function Ebi(o,p,i){const r=mf(o,"WriteNestedKey"),a=Qh(p,"WriteNestedKey");return GN(r,a,i,"strict-set")}function bbi(o,p,i){const r=mf(o,"WriteSafeNestedKeyRecursively"),a=Qh(p,"WriteSafeNestedKeyRecursively");return GN(r,a,i,"safe-set")}function Abi(o,p){const i=mf(o,"DeleteNestedKey"),r=Qh(p,"DeleteNestedKey");return GN(i,r,null,"strict-delete")}function gbi(o,p){const i=gR(p,"HasKey"),r=o;return r!=null&&ybi(r)&&Object.prototype.hasOwnProperty.call(r,i)}function Ibi(o,p,i){const r=gR(p,"KeyValueEquals");return o==null||typeof o!="object"?!1:o[r]===i}function Rbi(o,p){const i=o,r=Qh(p,"HasNestedKey");return BN(i,r,Ok)!==Ok}function Dbi(o,p,i){const r=Qh(p,"NestedKeyValueEquals");return BN(o,r)===i}function wbi(...o){const p={};for(let i=0;i<o.length;i++){const r=o[i];if(r!=null){if(!hr(r))throw new TypeError("MergeObjects expects every argument to be an object (or null/undefined).");Object.assign(p,r)}}return p}function Obi(o){const p=mf(o,"ObjectKeys");return Object.keys(p)}function Cbi(o){const p=mf(o,"ObjectValues");return Object.values(p)}function _bi(o){const p=mf(o,"ObjectEntries");return Object.entries(p)}function Vbi(o){return{execution:null,project:o,localTestValues:zm("local-test-values",o),resolvedValues:zm("resolved-values",o),persistedExecutionResults:zm("persisted-execution-results",o),lastExecutionResults:zm("last-execution-results",o),getValueTypePreference:()=>null,setValueTypePreference:()=>{}}}function uu(o,p,i,r){var y;let a;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case oe.EntityTemplate:a=oe.EntityTemplate;break;case oe.String:a=oe.String;break;case oe.Number:a=oe.Number;break;case oe.Boolean:a=oe.Boolean;break;case oe.Null:a=oe.Null;break;case oe.Enum:a=oe.Enum;break;case oe.KeyValue:a=oe.KeyValue;break;case oe.Untyped:a=oe.Untyped;break;case oe.KeyValue:a=oe.KeyValue;break;case oe.Date:a=oe.Date;break;case oe.UUID:a=oe.UUID;break;case oe.File:a=oe.File;break;case oe.Void:a=oe.Void;break;case oe.ActionDescriptor:a=oe.ActionDescriptor;break;case oe.Bytes:a=oe.Bytes;break;default:throw new Error(`Primitive type ${le(o.entity,i)} is not supported`)}else a=oe.Untyped;const c=Qr.new(r);c.name=a,c.parent=p.toReference();const e=me(c,i);return e.hydrateAncestors(),r==null||r.add(e,H.Added),e.addSelfToProject(r),e.initChildren(r),e}function Bo(o,p,i=new Set){var r,a,c;if(i.has(o.id))return[];if(i.add(o.id),Gt.includes(o.type)){const e=zn(o);return D([e,...[e].flatMap(y=>Bo(y,p,i))])}else if(o.type===d.OutputMap){if(Gt.includes(o.parent.type)&&((r=o.declaration)==null?void 0:r.type)===d.Property&&o.declaration.static)return D([o,o.declaration,...[o,o.declaration].flatMap(e=>Bo(e,p,i))])}else if(o.type===d.InputMap&&Gt.includes(o.parent.type)&&((a=o.declaration)==null?void 0:a.type)===d.Property&&(c=o.declaration)!=null&&c.static)return D([o.declaration,...[o.declaration].flatMap(e=>Bo(e,p,i))]);return[o]}function zCe(o,p,i){return o}function e0(o,p,i=!1){const r=o.readsValue;let a=null;const c=Uc(r,p,i);if(c){const e={sources:[c],target:o};a={value:c.value,valueOwner:o,type:Ne.Inherited,inheritanceLink:e}}return a}function It(o,p,i){var y;if(!p)return null;let r;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case oe.EntityTemplate:r=oe.EntityTemplate;break;case oe.String:r=oe.String;break;case oe.Number:r=oe.Number;break;case oe.Boolean:r=oe.Boolean;break;case oe.Null:r=oe.Null;break;case oe.Enum:r=oe.Enum;break;case oe.KeyValue:r=oe.KeyValue;break;case oe.Untyped:r=oe.Untyped;break;case oe.KeyValue:r=oe.KeyValue;break;case oe.Date:r=oe.Date;break;case oe.UUID:r=oe.UUID;break;case oe.File:r=oe.File;break;case oe.Void:r=oe.Void;break;case oe.ActionDescriptor:r=oe.ActionDescriptor;break;case oe.Bytes:r=oe.Bytes;break;default:throw new Error(`Primitive type ${le(o.entity,i)} is not supported`)}else r=oe.Untyped;if(!i.get(p.id))return null;const c=Qr.new(null);c.name=r,c.standaloneParent=p.toReference();let e=new Qr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function JCe(o,p,i=!1){var c,e;if(p.execution&&p.execution.hasEntity(o)&&!i){const y=(c=p.lastExecutionResults)==null?void 0:c.readValue(o.id);if(y)return{value:y,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(e=p.localTestValues)==null?void 0:e.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:null}}function yA(o,p,i,r=!1){var e,y;const a={...o},c=p.type===d.VariableDeclaration?p.inputs:jt.includes(p.type)?p.outputs:[];if(!c||c.length===0)return a;for(const m of c){if(!sE(m))continue;const v=uT(m,i,r);if(v&&v.value){const E=le(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);a[b]=bn((v==null?void 0:v.value)||null)?a[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return a}function Ym(o,p,i,r=!1){var e,y;const a={...o},c=p.inputs;if(!c)return a;for(const m of c){if(!sE(m))continue;const v=Vv(m,i,r);if(v&&v.value){const E=le(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);a[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return a}function YCe(o,p,i=!1){var E,b,w,V,$,M,k,F;let r={};if(((b=(E=o.getDataType(null))==null?void 0:E.entity)==null?void 0:b.type)===d.DefinitionEntity&&(r={...r,...((w=o.getDataType(null))==null?void 0:w.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const j=(V=p.lastExecutionResults)==null?void 0:V.readValue(o.id);if(j){if(hr(j.value)){const ie={...r,...j.value},ee={...Ym(ie,o,p,i)};j.metaSync({value:ee},null)}return{value:j,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}}const a=!!(($=p.execution)!=null&&$.entities.length),c=(M=p.execution)==null?void 0:M.hasEntity(o),e=o.readsValue;let y=null;if(e){const j=(k=p.execution)==null?void 0:k.hasEntity(e);if((!a||a&&j&&c||a&&!j&&!c)&&(y=e0(o,p,i),y&&y.value&&hr(y.value.value))){const ie={...r,...y.value.value},ee={...Ym(ie,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const j=m;if(j&&j.value===null&&j.autogeneration){const Y=T1(j);if(j.metaSync({value:Y},null),hr(Y)){const ie={...Ym(Y,o,p,i)};j.metaSync({value:ie},null)}}(i||v===null||v!==Ne.Testing)&&(y={value:j,valueOwner:o,type:bn(j)?o.readsValue?Ne.Inherited:Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const j=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(j){if(hr(j.value)){const Y={...r,...j.value},ie={...Ym(Y,o,p,i)};j.metaSync({value:ie},null)}return{value:j,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}}return bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function kN(o,p,i=!1){var e,y,m,v,E,b,w,V,$;let r={};if(((y=(e=o.getDataType(null))==null?void 0:e.entity)==null?void 0:y.type)===d.DefinitionEntity&&(r={...r,...((m=o.getDataType(null))==null?void 0:m.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const M=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(M){if(hr(M.value)){const F={...r,...M.value},j=yA(F,o,p,i);M==null||M.metaSync({value:j},null)}return{value:M,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}}const a=(E=p.localTestValues)==null?void 0:E.readValue(o.id),c=p.getValueTypePreference(o.id);if(a&&!i&&(c===null||c!==Ne.DefaultValue)){if(hr(a.value)){const k={...r,...a.value},F=yA(k,o,p,i);a.metaSync({value:F},null)}return{value:a,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((V=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:V.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const M=It(o.dataType,o,p.project),k=yA(r,o,p,i);return M==null||M.metaSync({value:k},null),{value:M,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null}}return null}function _v(o,p,i=!1){var E,b,w,V,$;if((E=o.dataType)!=null&&E.isObject())return YCe(o,p,i);const r=oi(o),a=!!((b=p.execution)!=null&&b.entities.length),c=(w=p.execution)==null?void 0:w.hasEntity(r),e=o.readsValue;let y=null;if(e){const M=(V=p.execution)==null?void 0:V.hasEntity(e);(!a||a&&M&&c||a&&!M&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const M=m;if(M&&M.value===null&&M.autogeneration){const k=T1(M);M.metaSync({value:k},null)}(i||v===null||v!==Ne.Testing)&&(y={value:M,valueOwner:o,type:bn(M)?o.readsValue?Ne.Inherited:Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const M=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(M)return{value:M,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}return bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function UN(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return kN(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const v=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(v)return{value:v,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(m=p.localTestValues)==null?void 0:m.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:_v(o,p,i)}function jN(o,p,i=!1){var w,V,$,M;const r=!!((w=p.execution)!=null&&w.entities.length),a=(V=p.execution)==null?void 0:V.hasEntity(o);let c=null;const e=o.readsValue;if(e){const k=($=p.execution)==null?void 0:$.hasEntity(e);(!r||r&&k&&a||r&&!k&&!a)&&(c=e0(o,p,i))}const y=o.declaration;if(!c&&y){const k=_v(y,p);k&&k.value&&(c=k)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Ne.DefaultValue||c.type===Ne.External)&&!i||m===null||m!==Ne.DefaultValue){const k=(M=p.localTestValues)==null?void 0:M.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const v=So(o),E=o.getDataType(null);return v&&a&&(!(c!=null&&c.value)||!ba(E)&&Fo(c==null?void 0:c.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:a&&!v&&bn((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Ne.External,inheritanceLink:null}}function XCe(o,p,i=!1){return UN(o.declaration,p,i)}function QCe(o,p,i=!1){var w,V,$,M;if(!i&&p.execution&&p.execution.hasEntity(o)){const k=(w=p.lastExecutionResults)==null?void 0:w.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=oi(o),a=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((V=p.execution)!=null&&V.hasEntity(r))||!!a&&!!(($=p.execution)!=null&&$.hasEntity(a));let e=null;const y=o.defaultValue,m=p.getValueTypePreference(o.id);if(y){const k=y||null;if(k&&k.value===null&&k.autogeneration){const F=T1(k);k.metaSync({value:F},null)}(i||m===null||m!==Ne.Testing)&&(e={value:k,valueOwner:o,type:bn(k)?Ne.Empty:Ne.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Ne.DefaultValue||e.type===Ne.External)&&!i||m===null||m!==Ne.DefaultValue){const k=(M=p.localTestValues)==null?void 0:M.readValue(o.id),F=p.getValueTypePreference(o.id);if(k&&!i&&(F===null||F!==Ne.DefaultValue))return{value:k,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const v=So(o),E=o.getDataType(null);let b=v&&c&&(!(e!=null&&e.value)||!ba(E)&&Fo(e==null?void 0:e.value));return r.type===d.Loop&&c&&(b=!1),b?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:c&&!v&&bn((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Ne.External,inheritanceLink:null}}function KN(o,p,i=!1){var V,$,M,k,F,j;if((V=o.getDataType(null))!=null&&V.isObject())return kN(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const Y=($=p.lastExecutionResults)==null?void 0:$.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=oi(o),a=!!((M=p.execution)!=null&&M.entities.length),c=(k=p.execution)==null?void 0:k.hasEntity(r),e=o.readsValue;let y=null;if(e){const Y=(F=p.execution)==null?void 0:F.hasEntity(e);(!a||a&&Y&&c||a&&!Y&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m){const Y=m;(i||v===null||v!==Ne.Testing)&&(y={value:Y,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ne.DefaultValue||y.type===Ne.External)&&!i||v===null||v!==Ne.DefaultValue){const Y=(j=p.localTestValues)==null?void 0:j.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const E=So(o),b=o.getDataType(null);return E&&(!(y!=null&&y.value)||!ba(b)&&Fo(y==null?void 0:y.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:!E&&bn((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function e_e(o,p,i=!1){var y,m,v,E,b,w,V,$,M,k,F,j,Y;if(p.execution&&p.execution.hasEntity(o)&&!i){const ie=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(ie)return{value:ie,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=IT(o);if(xy.includes(r.type)){const ie=Uc(r,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||Hi(le(o,p.project));if(ie!=null&&ie.value&&hr(ie.value.value)){const de=ie.value.value[ee],ae=It(o.getDataType(null),o,p.project);return ae==null||ae.metaSync({value:de},null),{value:ae,valueOwner:o,type:!Gt.includes(r.type)&&ie.type===Ne.Empty?Ne.QueuedAutocalculation:ie.type,inheritanceLink:{sources:[ie],target:o}}}return{value:null,valueOwner:o,type:Gt.includes(r.type)?Ne.Empty:Ne.QueuedAutocalculation,inheritanceLink:null}}const a=(v=p.execution)==null?void 0:v.hasEntity(r),c=((E=p.execution)==null?void 0:E.state)===rx.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!a&&!c&&!i){const ie=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((ie==null?void 0:ie.value)!==null||(ie==null?void 0:ie.valueAsType)!==null)return{value:ie,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const e=o.parent;if(!e)throw new Error(`Couldn't find the parent that generates the output ${o.id}`);switch(e.type){case d.VariableInstance:{const ee=jN(e,p,i);if(ee&&ee.value){const ae=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[ae.name],ve=It(((V=o.declaration)==null?void 0:V.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=_v(e,p,i);if(ee&&ee.value){const ae=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[ae.name],ve=It(((M=o.declaration)==null?void 0:M.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It(((k=o.declaration)==null?void 0:k.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Ne.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const ie=e.outputs.map(de=>{var ae,fe;if((ae=p.persistedExecutionResults)!=null&&ae.values[de.id]){const ve=(fe=p.persistedExecutionResults)==null?void 0:fe.values[de.id];if(ve.value!==null||ve.valueAsType!==null)return{value:ve,valueOwner:de,type:Ne.ExecutionResult,inheritanceLink:null}}}).filter(de=>!!de),ee=It(((F=o.declaration)==null?void 0:F.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.FunctionCall:{const ie=e.inputs.map(de=>UA(de,p,i)).filter(de=>!!de),ee=It(((j=o.declaration)==null?void 0:j.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.Loop:{const ie=e.inputs.map(de=>UA(de,p,i)).filter(de=>!!de),ee=It(((Y=o.declaration)==null?void 0:Y.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:ie.length?{sources:ie,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Ne.QueuedAutocalculation,inheritanceLink:null}}return null}function xC(o,p,i=!1){var b,w,V;if(![...jt,...Gt].includes(o.parent.type)||!sE(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Uc(o.declaration,p);const r=Vv(o,p,i);if(r&&r.type!==Ne.Empty&&r.type!==Ne.Missing)return r;const a=zn(o.parent),c=Po(a,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(le(o,p.project)),y=It(o.getDataType(null),o,p.project),m=So(o),v=(V=c==null?void 0:c.value)==null?void 0:V.value;if(v&&hr(v)){let $=v[e];v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null);const M=So(o),k=o.getDataType(null);return M&&(!y||!ba(k)&&Fo(y))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Ne.Inherited:Ne.Empty,inheritanceLink:null}}function $C(o,p,i=!1){var b,w,V,$,M,k,F,j;if(![...jt,...Gt].includes(o.parent.type)||!sE(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Uc(o.declaration,p,i);const r=jt.includes(o.parent.type)?o.parent:zn(o.parent),a=Uc(r,p,i);let c=o;r.type===d.VariableDeclaration&&(c=(o.parent===r?o:r.inputs.find(ie=>{var ee,de;return((ee=ie.declaration)==null?void 0:ee.id)===((de=o.declaration)==null?void 0:de.id)}))||o);const e=uT(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(le(o,p.project)),m=(r.type===d.VariableDeclaration,o.defaultValue||It(o.getDataType(null),o,p.project)),v=(V=a==null?void 0:a.value)==null?void 0:V.value;if(((a==null?void 0:a.type)===Ne.ExecutionResult||(a==null?void 0:a.type)===Ne.Testing)&&!i&&v&&hr(v)){let Y=v[y];return v[y]===void 0&&(Y=null),m==null||m.metaSync({value:Y},null),{value:m,valueOwner:o,type:a.type,inheritanceLink:{sources:a?[a]:[],target:o}}}if(e&&e.type!==Ne.Empty&&e.type!==Ne.Missing)return e;if(v&&hr(v)){let Y=v[y];v[y]===void 0&&(Y=null),m!=null&&m.standaloneParent&&(m==null||m.metaSync({value:Y},null));const ie=So(o),ee=o.getDataType(null),de=ie&&(!m||!ba(ee)&&Fo(m)),ae=!!(($=p.execution)!=null&&$.entities.length),fe=(M=p.execution)==null?void 0:M.hasEntity(r),ve=r.readsValue;if(ve){const ue=(k=p.execution)==null?void 0:k.hasEntity(ve);if(de&&(!ae||ae&&ue&&fe||ae&&!ue&&!fe))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}if(o.readsValue){const ue=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(de&&(!ae||ae&&ue&&fe||ae&&!ue&&!fe))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}return de?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:((j=m==null?void 0:m.parent)==null?void 0:j.id)===(o==null?void 0:o.id)?a.type:Ne.Inherited,inheritanceLink:{sources:a?[a]:[],target:o}}}return uT(o,p,i)}function Vv(o,p,i=!1){var V,$,M,k,F,j;const r=oi(o),a=!!((V=p.execution)!=null&&V.entities.length),c=($=p.execution)==null?void 0:$.hasEntity(r),e=o.readsValue;let y=null;if(e){const Y=(M=p.execution)==null?void 0:M.hasEntity(e);(!a||a&&Y&&c||a&&!Y&&!c)&&(y=e0(o,p,i))}const m=o.defaultValue,v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Ne.Testing)&&(y={value:m,valueOwner:o,type:Fo(m)?Ne.Empty:Ne.DefaultValue,inheritanceLink:null}),!y||y.type===Ne.DefaultValue||(y==null?void 0:y.type)===Ne.Empty){const Y=(k=p.persistedExecutionResults)==null?void 0:k.readValue(o.id);if(Y&&!i)return{value:Y,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const ie=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(ie&&!i&&(v===null||v!==Ne.DefaultValue))return{value:ie,valueOwner:o,type:Ne.Testing,inheritanceLink:null}}const E=So(o),b=o.getDataType(null),w=E&&(!(y!=null&&y.value)||!ba(b)&&Fo(y==null?void 0:y.value));if(o.readsValue){const Y=(j=p.execution)==null?void 0:j.hasEntity(o.readsValue);if(w&&(!a||a&&Y&&c||a&&!Y&&!c))return{value:null,valueOwner:o,type:Ne.Inherited,inheritanceLink:null}}return w?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Ne.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue||!(y!=null&&y.value)?Ne.Inherited:Ne.Empty,inheritanceLink:null}:y}function uT(o,p,i=!1){var e,y;if(p.execution&&p.execution.hasEntity(o)&&!i){const m=(e=p.lastExecutionResults)==null?void 0:e.readValue(o.id);if(m)return{value:m,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(y=p.localTestValues)==null?void 0:y.readValue(o.id),a=p.getValueTypePreference(o.id);return r&&!i&&(a===null||a!==Ne.DefaultValue)?{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null}:Vv(o,p,i)}function UA(o,p,i=!1){var r,a;return Gt.includes(o.parent.type)&&(r=zn(o.parent).dataType)!=null&&r.isObject()||jt.includes(o.parent.type)&&(a=o.parent.getDataType(null))!=null&&a.isObject()?xC(o,p,i):Vv(o,p,i)}function t_e(o,p,i=!1){var r,a;return Gt.includes(o.parent.type)&&(r=zn(o.parent).dataType)!=null&&r.isObject()||jt.includes(o.parent.type)&&(a=o.parent.getDataType(null))!=null&&a.isObject()?$C(o,p,i):uT(o,p,i)}function i_e(o,p,i=!1){var E,b;if(!o.static)return null;if(p.execution){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w&&!i)return{value:w,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(b=p.localTestValues)==null?void 0:b.readValue(o.id),a=p.getValueTypePreference(o.id);if(r&&!i&&(a===null||a!==Ne.DefaultValue))return{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const c=o.defaultValue;let e=null;c&&(i||a===null||a!==Ne.Testing)&&(e={value:c,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null});const y=So(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!ba(m)&&Fo(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:bn(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e}function r_e(o,p,i=!1){var E,b;if(p.execution&&p.execution.hasEntity(o)&&!i){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w)return{value:w,valueOwner:o,type:Ne.ExecutionResult,inheritanceLink:null}}const r=(b=p.localTestValues)==null?void 0:b.readValue(o.id),a=p.getValueTypePreference(o.id);if(r&&!i&&(a===null||a!==Ne.DefaultValue))return{value:r,valueOwner:o,type:Ne.Testing,inheritanceLink:null};const c=o.defaultValue;let e=null;c&&(i||a===null||a!==Ne.Testing)&&(e={value:c,valueOwner:o,type:Ne.DefaultValue,inheritanceLink:null});const y=So(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!ba(m)&&Fo(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Ne.Missing,inheritanceLink:null}:bn((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ne.Empty,inheritanceLink:null}:e}function Uc(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return QCe(o,p,i);case d.InputMap:return t_e(o,p,i);case d.VariableDeclaration:return UN(o,p,i);case d.VariableInstance:return XCe(o,p,i);case d.OutputMap:return e_e(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return KN(o,p,i);case d.Property:return i_e(o,p,i);case d.ValueDescriptor:return r_e(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return JCe(o,p,i);default:return null}}function Po(o,p,i=!1){switch(o.type){case d.InputMap:return UA(o,p,i);case d.VariableDeclaration:return _v(o,p,i);case d.VariableInstance:return jN(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return KN(o,p,i);default:return null}}function Pbi(o){var p;if(o&&o.type===Ne.DefaultValue&&o.value&&o.valueOwner&&(!Tg.includes(o.valueOwner.type)||((p=o.valueOwner.defaultValue)==null?void 0:p.id)===o.value.id)){const i=It(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Ne.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function Mc(o,p,i,r){let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,V,$,M,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=a?v.defaultValue:e==null?void 0:e.readValue(v.id);F?!a&&F&&F.id===((w=v.defaultValue)==null?void 0:w.id)&&(F=It(v.getDataType(null),v,p)):a?F=uu(v.getDataType(null),v,p,c):F=It(v.getDataType(null),v,p);const j=le(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(j);let ie={};((k=(M=v.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(ie={...ie,...v.dataType.entity.getActiveRawDefaultValue()}),hr(F==null?void 0:F.value)&&(ie={...ie,...F.value}),ie[Y]=i,F==null||F.metaSync({value:ie},c),a||e==null||e.writeValue(v,F);return}}),c}function pT(o,p,i,r){var V,$,M,k;let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=zn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=a?y.defaultValue:e==null?void 0:e.readValue(y.id);v?!a&&v&&v.id===((V=y.defaultValue)==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):a?v=uu(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=le(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(M=y.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),a||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const F=y.inputs.find(j=>{var Y,ie;return((Y=j.declaration)==null?void 0:Y.id)===((ie=o.declaration)==null?void 0:ie.id)||le(j,p)===E});if(F){let j=a?F.defaultValue:e==null?void 0:e.readValue(F.id);j&&j.metaSync({value:null},c),a||e==null||e.removeValue(F.id)}}return c}function n_e(o,p,i){var e,y,m,v,E;let r=!1,a=null,c=null;if(i instanceof Z?(r=!0,a=i,c=null):(a=null,c=i),Gt.includes(o.type)){const b=zn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var V,$,M,k,F,j;if(((V=w.declaration)==null?void 0:V.type)===d.Property&&w.declaration.static){let Y=r?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);Y?!r&&Y&&Y.id===((M=w.declaration.defaultValue)==null?void 0:M.id)&&(Y=It(w.declaration.getDataType(null),w.declaration,p)):r?Y=uu(w.declaration.getDataType(null),w.declaration,p,a):Y=It(w.declaration.getDataType(null),w.declaration,p),Y==null||Y.metaSync({value:null},a),r||c==null||c.removeValue((k=w.declaration)==null?void 0:k.id)}else if(((F=w.declaration)==null?void 0:F.type)===d.Property){let Y=r?((j=w.getDefaultValue)==null?void 0:j.call(w))||null:c==null?void 0:c.readValue(w.id);Y&&Y.metaSync({value:null},a),r||c==null||c.removeValue(w.id)}})}else o.type===d.InputMap?((y=o.declaration)==null?void 0:y.type)===d.Property&&o.declaration.static?Mc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((m=o.declaration)==null?void 0:m.type)===d.Property&&pT(o,p,null,i):o.type===d.OutputMap?((v=o.declaration)==null?void 0:v.type)===d.Property&&o.declaration.static?Mc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((E=o.declaration)==null?void 0:E.type)===d.Property&&pT(o,p,null,i):o.type===d.Property&&o.static&&Mc(o,p,null,i);return a}function a_e(o,p,i,r){var y,m,v,E,b,w,V;let a=!1,c=null,e=null;if(r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r),Gt.includes(p.type)){const $=zn(p);if((y=$.dataType)!=null&&y.isObject()){let M={};((v=(m=$.dataType)==null?void 0:m.entity)==null?void 0:v.type)===d.DefinitionEntity&&(M={...M,...$.dataType.entity.getActiveRawDefaultValue()});const k=hr(o)?o:M;$.inputs.forEach(F=>{var j,Y,ie,ee,de,ae;if(((j=F.declaration)==null?void 0:j.type)===d.Property&&F.declaration.static){let fe=a?((Y=p.getDefaultValue)==null?void 0:Y.call(p))||null:e==null?void 0:e.readValue(F.declaration.id);fe?!a&&fe&&fe.id===((ie=F.declaration.defaultValue)==null?void 0:ie.id)&&(fe=It(F.declaration.getDataType(null),F.declaration,i)):a?fe=uu(F.declaration.getDataType(null),F.declaration,i,c):fe=It(F.declaration.getDataType(null),F.declaration,i);const ve=le(F,i),ue=F.codeName||((ee=F.declaration)==null?void 0:ee.codeName)||Hi(ve),ye=k[ue];fe==null||fe.metaSync({value:ye},c),a||e==null||e.writeValue(F.declaration,fe)}else if(((de=F.declaration)==null?void 0:de.type)===d.Property){let fe=a?((ae=p.getDefaultValue)==null?void 0:ae.call(p))||null:e==null?void 0:e.readValue(F.id);fe&&fe.metaSync({value:null},c),a||e==null||e.removeValue(F.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?Mc(p.declaration,i,o,r):Gt.includes(p.parent.type)&&((b=p.declaration)==null?void 0:b.type)===d.Property&&pT(p,i,o,r):p.type===d.OutputMap?((w=p.declaration)==null?void 0:w.type)===d.Property&&p.declaration.static?Mc(p.declaration,i,null,r):Gt.includes(p.parent.type)&&((V=p.declaration)==null?void 0:V.type)===d.Property&&pT(p,i,null,r):p.type===d.Property&&p.static&&Mc(p,i,o,r);return c}function Nbi(o,p,i){const r=Bo(o,p);let a=!1,c=null,e=null;return i instanceof Z?(a=!0,c=i,e=null):(c=null,e=i),r.forEach(y=>{var v;let m=a?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);a?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),n_e(y,p,i)}),c}function xbi(o,p,i,r){const a=Bo(p,i);let c=!1,e=null,y=null;return r instanceof Z?(c=!0,e=r,y=null):(e=null,y=r),i.diggestedBuiltInBaseEntitiesIds.has(p.id)||a.forEach(m=>{var E,b,w,V;if(i.diggestedBuiltInBaseEntitiesIds.has(m.id))return;let v=null;if(c){const $=((E=m.getDefaultValue)==null?void 0:E.call(m))||null;$&&(i.diggestedBuiltInBaseEntitiesIds.has($.id)||((b=$.parent)==null?void 0:b.id)!==m.id?v=$.clone(e,m):v=$)}else v=y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((V=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:V.id)&&(v=It(m.getDataType(null),m,i)):c?(v=uu(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=It(m.getDataType(null),m,i),v==null||v.setValueAsType(null,e),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),a_e(o,m,i,r)}),e}function Bc(o,p,i,r){let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,V,$,M,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=a?v.defaultValue:e==null?void 0:e.readValue(v.id);F?!a&&F&&F.id===((w=v.defaultValue)==null?void 0:w.id)&&(F=It(v.getDataType(null),v,p)):a?F=uu(v.getDataType(null),v,p,c):F=It(v.getDataType(null),v,p);const j=le(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(j);let ie={};((k=(M=v.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(ie={...ie,...v.dataType.entity.getActiveRawDefaultValue()}),hr(F==null?void 0:F.value)&&(ie={...ie,...F.value}),Array.isArray(i)?ie[Y]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:ie[Y]=(i==null?void 0:i.toShallowJSON())||null,F==null||F.metaSync({value:ie},c),a||e==null||e.writeValue(v,F);return}}),c}function cT(o,p,i,r){var V,$,M,k;let a=!1,c=null,e=null;r instanceof Z?(a=!0,c=r,e=null):(c=null,e=r);const y=zn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=a?y.defaultValue:e==null?void 0:e.readValue(y.id);v?!a&&v&&v.id===((V=y.defaultValue)==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):a?v=uu(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=le(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(M=y.dataType)==null?void 0:M.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),Array.isArray(i)?w[b]=(i==null?void 0:i.map(F=>F.toShallowJSON()))||null:w[b]=(i==null?void 0:i.toShallowJSON())||null,v==null||v.metaSync({value:w},c),a||e==null||e.writeValue(y,v),i==null&&o.type===d.OutputMap){const F=y.inputs.find(j=>{var Y,ie;return((Y=j.declaration)==null?void 0:Y.id)===((ie=o.declaration)==null?void 0:ie.id)||le(j,p)===E});if(F){let j=a?F.defaultValue:e==null?void 0:e.readValue(F.id);j&&(Array.isArray(i)?j==null||j.setValueAsTypeList(i,c):j==null||j.setValueAsTypeSingle(i,c)),a||e==null||e.removeValue(F.id)}}return c}function s_e(o,p,i){var r,a,c,e;return o.type===d.InputMap?((r=o.declaration)==null?void 0:r.type)===d.Property&&o.declaration.static?Bc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((a=o.declaration)==null?void 0:a.type)===d.Property&&cT(o,p,null,i):o.type===d.OutputMap?((c=o.declaration)==null?void 0:c.type)===d.Property&&o.declaration.static?Bc(o.declaration,p,null,i):Gt.includes(o.parent.type)&&((e=o.declaration)==null?void 0:e.type)===d.Property&&cT(o,p,null,i):o.type===d.Property&&o.static&&Bc(o,p,null,i),i}function l_e(o,p,i,r){var a,c,e,y;return p.type===d.InputMap?((a=p.declaration)==null?void 0:a.type)===d.Property&&p.declaration.static?Bc(p.declaration,i,o,r):Gt.includes(p.parent.type)&&((c=p.declaration)==null?void 0:c.type)===d.Property&&cT(p,i,o,r):p.type===d.OutputMap?((e=p.declaration)==null?void 0:e.type)===d.Property&&p.declaration.static?Bc(p.declaration,i,null,r):Gt.includes(p.parent.type)&&((y=p.declaration)==null?void 0:y.type)===d.Property&&cT(p,i,null,r):p.type===d.Property&&p.static&&Bc(p,i,o,r),r}function $bi(o,p,i){const r=Bo(o,p);let a=!1,c=null,e=null;return i instanceof Z?(a=!0,c=i,e=null):(c=null,e=i),r.forEach(y=>{var v;let m=a?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);a?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),s_e(y,p,i)}),c}function Lbi(o,p,i,r){const a=Bo(p,i);let c=!1,e=null,y=null;return r instanceof Z?(c=!0,e=r,y=null):(e=null,y=r),a.forEach(m=>{var E,b,w;let v=c?(E=m.getDefaultValue)==null?void 0:E.call(m):y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((w=(b=m.getDefaultValue)==null?void 0:b.call(m))==null?void 0:w.id)&&(v=It(m.getDataType(null),m,m.project)):c?v=uu(m.getDataType(null),m,i,e):v=It(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),v==null||v.metaSync({value:null},e),c||y==null||y.writeValue(m,v),l_e(o,m,i,r)}),e}class IR{constructor(p,i){this.extensionsRegistry=p,this.contextType=i,this.off=this.extensionsRegistry.off.bind(this.extensionsRegistry),this.on=this.extensionsRegistry.on.bind(this.extensionsRegistry),this.emit=this.extensionsRegistry.emit.bind(this.extensionsRegistry),this.emitAsync=this.extensionsRegistry.emitAsync.bind(this.extensionsRegistry),this.emitAsyncAll=this.extensionsRegistry.emitAsyncAll.bind(this.extensionsRegistry),this.emitAsyncAllSettled=this.extensionsRegistry.emitAsyncAllSettled.bind(this.extensionsRegistry),this.emitAsyncSequentially=this.extensionsRegistry.emitAsyncSequentially.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAll=this.extensionsRegistry.emitAsyncSequentiallyAll.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAllSettled=this.extensionsRegistry.emitAsyncSequentiallyAllSettled.bind(this.extensionsRegistry)}on(p,i){this.extensionsRegistry.on(p,i)}emit(p,...i){this.extensionsRegistry.emit(p,...i)}off(p,i){this.extensionsRegistry.off(p,i)}emitAsync(p,...i){return this.extensionsRegistry.emitAsync(p,...i)}emitAsyncAll(p,...i){return this.extensionsRegistry.emitAsyncAll(p,...i)}emitAsyncAllSettled(p,...i){return this.extensionsRegistry.emitAsyncAllSettled(p,...i)}emitAsyncSequentially(p,...i){return this.extensionsRegistry.emitAsyncSequentially(p,...i)}emitAsyncSequentiallyAll(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAll(p,...i)}emitAsyncSequentiallyAllSettled(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled(p,...i)}}var Ee=(o=>(o[o.High=1]="High",o[o.Normal=5]="Normal",o[o.Low=10]="Low",o))(Ee||{}),X=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(X||{}),be=(o=>(o.All="*",o.OnAll="on:*",o.EmitAll="emit:*",o.ReadAll="read:*",o.WriteAll="write:*",o.UpdateAll="update:*",o.DoAll="do:*",o.OnLogicAll="on:logic:*",o.EmitLogicAll="emit:logic:*",o.ReadLogicAll="read:logic:*",o.WriteLogicAll="write:logic:*",o.UpdateLogicAll="update:logic:*",o.DoLogicAll="do:logic:*",o.OnGUIAll="on:gui:*",o.EmitGUIAll="emit:gui:*",o.ReadGUIAll="read:gui:*",o.WriteGUIAll="write:gui:*",o.UpdateGUIAll="update:gui:*",o.DoGUIAll="do:gui:*",o.OnEditorAll="on:editor:*",o.EmitEditorAll="emit:editor:*",o.ReadEditorAll="read:editor:*",o.WriteEditorAll="write:editor:*",o.UpdateEditorAll="update:editor:*",o.DoEditorAll="do:editor:*",o.OnCompileBefore="on:compile:before:DefinitionEntity",o.OnCompileDefault="on:compile:default:DefinitionEntity",o.OnCompileAfter="on:compile:after:DefinitionEntity",o.EmitCompile="emit:compile:DefinitionEntity",o.DoEditorPublish="do:editor:publish",o.PostGUICanvasSlotNewToolbarButton="write:gui:canvas:slot:toolbar-button",o.ReadGUICanvasSlotToolbarButtons="read:gui:canvas:slot:toolbar-buttons",o.UpdateGUIGlobalTheme="update:gui:global:theme",o))(be||{});class o_e{constructor(p){I(this,"state",new Map);p&&(this.state=new Map(Object.entries(p)))}get(p){return this.state.get(p)}set(p,i){this.state.set(p,i)}delete(p){this.state.delete(p)}}class d_e extends o_e{constructor(p,i){super(i),this.parentExtension=p}}class ge{constructor(p,i){I(this,"manifest");I(this,"module");I(this,"state");this.extensionsRegistry=p,this.state=new d_e(this,i)}}class LC extends IR{constructor(i,r){super(i,X.Logic);I(this,"id");this._project=r,this.id=r.id}get type(){return this._project.type}get name(){return this._project.name}get description(){return this._project.description}get version(){return this._project.version}get createdAt(){return this._project.createdAt}get previousVersion(){return this._project.previousVersion}get author(){return this._project.author}get deleted(){return this._project.deleted}get editable(){return this._project.editable}get deletable(){return this._project.deletable}get entities(){return[...this._project.entities]}get projects(){return[...this._project.projects]}get functions(){return[...this._project.functions]}get events(){return[...this._project.events]}get variableDeclarations(){return[...this._project.variableDeclarations]}get variableInstances(){return[...this._project.variableInstances]}get conditions(){return[...this._project.conditions]}get operations(){return[...this._project.operations]}get functionCalls(){return[...this._project.functionCalls]}get loops(){return[...this._project.loops]}get searches(){return[...this._project.searches]}get primitives(){return[...this._project.primitives]}get builtInBaseEntities(){return[...this._project.builtInBaseEntities]}get operationDeclarations(){return[...this._project.operationDeclarations]}get globalEventActionDescriptors(){return[...this._project.globalEventActionDescriptors]}get loopDeclarations(){return[...this._project.loopDeclarations]}get loopDeclarationsBodies(){return[...this._project.loopDeclarationsBodies]}get conditionDeclarations(){return[...this._project.conditionDeclarations]}get valueDescriptors(){return[...this._project.valueDescriptors]}get dataTypes(){return[...this._project.dataTypes]}get errors(){return[...this._project.errors]}get history(){return[...this._project.history]}get undoableStackValueIndex(){return this._project.undoableStackValueIndex}get knownVersions(){return this._project.knownVersions}get activeVersion(){return this._project.activeVersion}get initialized(){return this._project.initialized}get startedInitialization(){return this._project.startedInitialization}closePersistChangeSetsSequentially(){return this._project.closePersistChangeSetsSequentially()}persistChangeSetSequentially(i){return this._project.persistChangeSetSequentially(i)}toLatestChangeSet(i,r,a,c=!1,e="here-this"){return this._project.toLatestChangeSet(i,r,a,c,e)}addChangeSet(i){return this._project.addChangeSet(i)}discardChangeSet(i){return this._project.discardChangeSet(i)}subscribeDependents(i){return this._project.subscribeDependents(i)}unsubscribeDependents(i){return this._project.unsubscribeDependents(i)}syncDependents(i){return this._project.syncDependents(i)}onDetachedDependencyRemoved(i,r,a){return this._project.onDetachedDependencyRemoved(i,r,a)}onDetachedDependencyRestored(i,r,a){return this._project.onDetachedDependencyRestored(i,r,a)}increaseVersion(i){return this._project.increaseVersion(i)}captureVersion(){return this._project.captureVersion()}restoreVersion(i){return this._project.restoreVersion(i)}updateWithShallowTransfer(i,r){return this._project.updateWithShallowTransfer(i,r)}hydrateAncestors(){return this._project.hydrateAncestors()}afterAllChildrenInitialized(i=null){return this._project.afterAllChildrenInitialized(i)}addSelfToProject(i){return this._project.addSelfToProject(i)}get instancesList(){return[...this._project.instancesList]}isOperationDeclaration(i){return this._project.isOperationDeclaration(i)}isGlobalEventActionDescriptor(i){return this._project.isGlobalEventActionDescriptor(i)}isLoopDeclaration(i){return this._project.isLoopDeclaration(i)}isConditionDeclaration(i){return this._project.isConditionDeclaration(i)}findSubscribedBuiltInInstance(i){return this._project.findSubscribedBuiltInInstance(i)}get(i){return this._project.get(i)}getDeleted(i){return this._project.getDeleted(i)}getManaged(i){return this._project.getManaged(i)}getBuiltIn(i){return this._project.getBuiltIn(i)}findSubscribedInstanceFromReference(i){return this._project.findSubscribedInstanceFromReference(i)}findSubscribedBuiltInInstanceFromReference(i){return this._project.findSubscribedBuiltInInstanceFromReference(i)}metaSync(i,r){return this._project.metaSync(i,r)}getAllBuiltInIds(){return this._project.getAllBuiltInIds()}getAllBuiltIn(){return this._project.getAllBuiltIn()}toFlat(i){return this._project.toFlat(i)}toFlatIds(i){return this._project.toFlatIds(i)}toMeta(){return this._project.toMeta()}toJSON(i){return this._project.toJSON(i)}toJSONClone(i){return this._project.toJSONClone(i)}toReference(i){return this._project.toReference(i)}toShallowJSON(i){return this._project.toShallowJSON(i)}toFlatJSON(i){return this._project.toFlatJSON(i)}toGenerationTarget(i){return this._project.toGenerationTarget(i)}toFlatGenerationTarget(i){return this._project.toFlatGenerationTarget(i)}clearErrors(){return this._project.clearErrors()}validate(){return this._project.validate()}validateChildren(){return this._project.validateChildren()}getErrors(){return this._project.getErrors()}getShallowErrors(){return this._project.getShallowErrors()}addDefinitionEntity(i){return this._project.addDefinitionEntity(i)}addFunctionDeclaration(i){return this._project.addFunctionDeclaration(i)}addFunctionCall(i){return this._project.addFunctionCall(i)}addVariableDeclaration(i){return this._project.addVariableDeclaration(i)}addVariableInstance(i){return this._project.addVariableInstance(i)}addInstalledProject(i){return this._project.addInstalledProject(i)}addGlobalEvent(i){return this._project.addGlobalEvent(i)}addCondition(i){return this._project.addCondition(i)}addOperation(i){return this._project.addOperation(i)}addLoop(i){return this._project.addLoop(i)}addSearch(i){return this._project.addSearch(i)}removeDefinitionEntity(i){return this._project.removeDefinitionEntity(i)}removeCondition(i){return this._project.removeCondition(i)}removeOperation(i){return this._project.removeOperation(i)}removeLoop(i){return this._project.removeLoop(i)}removeSearch(i){return this._project.removeSearch(i)}removeFunctionCall(i){return this._project.removeFunctionCall(i)}removeVariableInstance(i){return this._project.removeVariableInstance(i)}removeVariableDeclaration(i){return this._project.removeVariableDeclaration(i)}removeFunctionDeclaration(i){return this._project.removeFunctionDeclaration(i)}removeInstalledProject(i){return this._project.removeInstalledProject(i)}removeGlobalEvent(i){return this._project.removeGlobalEvent(i)}removeTopLevelVariableDeclaration(i){return this._project.removeTopLevelVariableDeclaration(i)}getEntryPoints(){return this._project.getEntryPoints()}getTerminationStatements(){return this._project.getTerminationStatements()}getFunctionDeclaration(i){return this._project.getFunctionDeclaration(i)}getConditions(){return this._project.getConditions()}getOperations(){return this._project.getOperations()}getVariables(){return this._project.getVariables()}getVariableInstances(){return this._project.getVariableInstances()}getVariableDeclarations(){return this._project.getVariableDeclarations()}getLoops(){return this._project.getLoops()}getSearches(){return this._project.getSearches()}getBuiltInPersistedEntity(){return this._project.getBuiltInPersistedEntity()}requestActiveDynamicValue(i,r=!1){return this._project.requestActiveDynamicValue(i,r)}undo(){return this._project.undo()}redo(){return this._project.redo()}applyExternalChangeSet(i){return this._project.applyExternalChangeSet(i)}toFullProjectTransfer(){return this._project.toFullProjectTransfer()}}function Mbi(o,p){return p instanceof LC?p:new LC(o,p)}const Oy="built-in-function-implementations__",Oe="operations-implementations__",Ba="conditions-implementations__",Ae={UUID:"uuid",SEARCH_NODE_IMPLEMENTATION:"search-node-implementation",BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION:Oy+Er.AbortExecution,BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY:Oy+Er.CreatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY:Oy+Er.UpdatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY:Oy+Er.DeletePersistedEntity,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY:Oe+Nt.Empty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY:Oe+Nt.NotEmpty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL:Oe+Nt.PrimitiveEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL:Oe+Nt.PrimitiveNotEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__HTTP_REQUEST:Oe+Jn.HttpRequest,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY:Oe+Ce.Validate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL:Oe+Ki.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+Ki.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+Ki.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+re.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT:Oe+re.Split,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS:Oe+re.DeleteLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS:Oe+re.DeleteFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX:Oe+re.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX:Oe+re.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS:Oe+re.ReplaceFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS:Oe+re.ReplaceLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL:Oe+re.ReplaceAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX:Oe+re.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM:Oe+re.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST:Oe+re.GetFirst,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST:Oe+re.GetLast,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND:Oe+re.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND:Oe+re.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE:Oe+re.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH:Oe+re.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS:Oe+re.GetFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS:Oe+re.GetLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE:Oe+re.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT:Oe+re.Concat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF:Oe+re.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF:Oe+re.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE:Oe+re.Unique,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN:Oe+re.Flatten,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT:Oe+re.Sort,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE:Oe+re.Shuffle,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK:Oe+re.Chunk,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START:Oe+re.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END:Oe+re.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT:Oe+re.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH:Oe+q.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+q.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+q.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+q.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+re.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL:Oe+re.ContainsAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY:Oe+re.ContainsAny,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX:Oe+q.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+q.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+q.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+q.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+q.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+q.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+q.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+q.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+q.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+q.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+q.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+q.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+q.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+q.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+q.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+q.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+q.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+q.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+q.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+q.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+q.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+q.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+q.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+q.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+q.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+q.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+q.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+q.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+q.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+q.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+q.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+q.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+q.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+q.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+q.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+q.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+q.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+q.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+q.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+q.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+q.RemoveSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION:Oe+te.Addition,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION:Oe+te.Subtraction,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION:Oe+te.Multiplication,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION:Oe+te.Division,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER:Oe+te.Remainder,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION:Oe+te.Exponentiation,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE:Oe+te.Absolute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN:Oe+te.Sign,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND:Oe+te.Round,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE:Oe+te.Negate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR:Oe+te.Floor,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL:Oe+te.Ceil,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP:Oe+te.Clamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC:Oe+te.Trunc,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS:Oe+te.RoundToDecimals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP:Oe+te.SnapToStep,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE:Oe+te.MapRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE:Oe+te.Average,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN:Oe+te.Median,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF:Oe+te.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF:Oe+te.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT:Oe+te.SquareRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT:Oe+te.CubeRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT:Oe+te.NthRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP:Oe+te.Exp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL:Oe+te.LogNatural,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10:Oe+te.Log10,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN:Oe+te.Sin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS:Oe+te.Cos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN:Oe+te.Tan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN:Oe+te.Asin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS:Oe+te.Acos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN:Oe+te.Atan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2:Oe+te.Atan2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS:Oe+te.ToRadians,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES:Oe+te.ToDegrees,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF:Oe+te.PercentOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE:Oe+te.PercentageChange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN:Oe+te.MoreThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN:Oe+te.LessThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL:Oe+te.LessThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL:Oe+te.MoreThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER:Oe+et.GenerateRandomInteger,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT:Oe+et.GenerateRandomFloat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL:Oe+et.GenerateRandomHexadecimal,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62:Oe+et.GenerateRandomBase62,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64:Oe+et.GenerateRandomBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC:Oe+et.GenerateRandomAlphanumeric,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER:Oe+et.GenerateIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4:Oe+et.GenerateRandomUUIDv4,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER:Oe+et.GenerateShortIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN:Oe+et.GenerateHexadecimalToken,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH:Oe+q.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+q.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+q.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+q.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+K.GetCurrentTimestamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE:Oe+K.FormatDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE:Oe+K.ParseDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE:Oe+K.AddToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE:Oe+K.SubtractFromDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES:Oe+K.DifferenceBetweenDates,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE:Oe+K.ToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX:Oe+K.ToUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX:Oe+K.FromUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING:Oe+K.ToISOString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR:Oe+K.GetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH:Oe+K.GetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE:Oe+K.GetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR:Oe+K.GetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE:Oe+K.GetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND:Oe+K.GetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND:Oe+K.GetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY:Oe+K.GetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR:Oe+K.GetWeekOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER:Oe+K.GetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR:Oe+K.GetDayOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH:Oe+K.GetDaysInMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE:Oe+K.GetCurrentIanaTimeZone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR:Oe+K.SetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH:Oe+K.SetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE:Oe+K.SetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR:Oe+K.SetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE:Oe+K.SetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND:Oe+K.SetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND:Oe+K.SetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY:Oe+K.SetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER:Oe+K.SetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF:Oe+K.StartOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF:Oe+K.EndOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO:Oe+K.RoundTo,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE:Ba+K.IsBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER:Ba+K.IsAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME:Ba+K.IsSame,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE:Ba+K.IsSameOrBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER:Ba+K.IsSameOrAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN:Ba+K.IsBetween,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID:Ba+K.IsValid,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR:Ba+K.IsLeapYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE:Oe+K.ClampToRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF:Oe+K.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF:Oe+K.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW:Oe+K.FromNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW:Oe+K.ToNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF:Oe+K.HumanizeDiff,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS:Oe+K.AddBusinessDays,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY:Oe+K.NextWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY:Oe+K.PreviousWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC:Oe+K.ToUTC,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE:Oe+K.ConvertTimezone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET:Oe+K.GetTimezoneOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET:Oe+K.SetUTCOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_READ_KEY:Oe+Ce.ReadKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_KEY:Oe+Ce.WriteKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_DELETE_KEY:Oe+Ce.DeleteKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_READ_NESTED_KEY:Oe+Ce.ReadNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_NESTED_KEY:Oe+Ce.WriteNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_DELETE_NESTED_KEY:Oe+Ce.DeleteNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__ENTITY_WRITE_SAFE_NESTED_KEY_RECURSIVELY:Oe+Ce.WriteSafeNestedKeyRecursively,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_KEY:Ba+Ce.HasKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_NESTED_KEY:Ba+Ce.HasNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEY_VALUE_EQUALS:Ba+Ce.KeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_NESTED_KEY_VALUE_EQUALS:Ba+Ce.NestedKeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_IS_INSTANCE_OF_TYPE:Ba+Ce.IsInstanceOfType,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_MERGE:Oe+Ce.Merge,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEYS:Oe+Ce.Keys,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_VALUES:Oe+Ce.Values,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_ENTRIES:Oe+Ce.Entries,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_GET_TYPE_OF:Oe+ze.GetTypeOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HASH:Oe+li.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+li.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+li.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+li.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+tn.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+tn.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+er.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+er.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+er.DecodeJwt,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_FROM_BYTES_TO_STRING:Oe+ze.FromBytesToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_BYTES:Oe+ze.ToBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_NUMBER:Oe+ze.ToNumber,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_STRING:Oe+ze.ToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64:Oe+ze.EncodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64:Oe+ze.DecodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64URL:Oe+ze.EncodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64URL:Oe+ze.DecodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_HEX:Oe+ze.EncodeHex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_HEX:Oe+ze.DecodeHex,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_PARSE:Oe+en.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+en.Stringify};class u_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION,version:"1.0.0",description:'Implementation for the built-in function "Abort Execution". It terminates the execution of the current entity being run.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class p_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Delete Persisted Entity". It deletes the current entity as an entry in the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class c_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Create Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class f_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Update Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class y_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.SEARCH_NODE_IMPLEMENTATION,version:"1.0.0",description:"Implementation for search nodes when they get executed and query data.",initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,r)=>({error:"Search module not implemented",data:null})})}}class h_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.UUID,version:"1.0.0",description:"UUID generation module, for all contexts and runtimes",initPriority:Ee.High,permissions:[be.All],contexts:[]});I(this,"module",f_)}}const m_e=o=>o.map(p=>{var i,r;return((i=p.value)==null?void 0:i.valueAsType)??((r=p.value)==null?void 0:r.value)});class T_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY,version:"1.0.0",description:"Comparison: Empty (!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.Empty);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=m_e(r),c=!a;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class v_e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY,version:"1.0.0",description:"Comparison: NotEmpty (!!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.NotEmpty);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=m_e(r),c=!!a;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}const cg=class cg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveEqual (typed equality / deep JSON equality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.PrimitiveEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{var a,c,e,y,m,v;try{const E=(c=(a=r[0])==null?void 0:a.value)==null?void 0:c.name,b=(y=(e=r[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=r[1])==null?void 0:m.value)==null?void 0:v.value;let V=!1;return E&&cg.primitiveSet.has(E)?V=b===w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)===JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(cg,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let jA=cg;const fg=class fg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveNotEqual (typed inequality / deep JSON inequality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic);if(!r)return;const a=r.get(Nt.PrimitiveNotEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{var a,c,e,y,m,v;try{const E=(c=(a=r[0])==null?void 0:a.value)==null?void 0:c.name,b=(y=(e=r[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=r[1])==null?void 0:m.value)==null?void 0:v.value;let V=!1;return E&&fg.primitiveSet.has(E)?V=b!==w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)!==JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(fg,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let KA=fg;var E_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="minute",r=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(c,e,y){var m=e.prototype;y.utc=function(M){var k={date:M,utc:!0,args:arguments};return new e(k)},m.utc=function(M){var k=y(this.toDate(),{locale:this.$L,utc:!0});return M?k.add(this.utcOffset(),i):k},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(M){M.utc&&(this.$u=!0),this.$utils().u(M.$offset)||(this.$offset=M.$offset),v.call(this,M)};var E=m.init;m.init=function(){if(this.$u){var M=this.$d;this.$y=M.getUTCFullYear(),this.$M=M.getUTCMonth(),this.$D=M.getUTCDate(),this.$W=M.getUTCDay(),this.$H=M.getUTCHours(),this.$m=M.getUTCMinutes(),this.$s=M.getUTCSeconds(),this.$ms=M.getUTCMilliseconds()}else E.call(this)};var b=m.utcOffset;m.utcOffset=function(M,k){var F=this.$utils().u;if(F(M))return this.$u?0:F(this.$offset)?b.call(this):this.$offset;if(typeof M=="string"&&(M=function(ee){ee===void 0&&(ee="");var de=ee.match(r);if(!de)return null;var ae=(""+de[0]).match(a)||["-",0,0],fe=ae[0],ve=60*+ae[1]+ +ae[2];return ve===0?0:fe==="+"?ve:-ve}(M),M===null))return this;var j=Math.abs(M)<=16?60*M:M;if(j===0)return this.utc(k);var Y=this.clone();if(k)return Y.$offset=j,Y.$u=!1,Y;var ie=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(j+ie,i)).$offset=j,Y.$x.$localOffset=ie,Y};var w=m.format;m.format=function(M){var k=M||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,k)},m.valueOf=function(){var M=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*M},m.isUTC=function(){return!!this.$u},m.toISOString=function(){return this.toDate().toISOString()},m.toString=function(){return this.toDate().toUTCString()};var V=m.toDate;m.toDate=function(M){return M==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():V.call(this)};var $=m.diff;m.diff=function(M,k,F){if(M&&this.$u===M.$u)return $.call(this,M,k,F);var j=this.local(),Y=y(M).local();return $.call(j,Y,k,F)}}})})(E_e);var Bbi=E_e.exports;const Gbi=es(Bbi);var b_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(a,c,e){var y,m=function(w,V,$){$===void 0&&($={});var M=new Date(w),k=function(F,j){j===void 0&&(j={});var Y=j.timeZoneName||"short",ie=F+"|"+Y,ee=r[ie];return ee||(ee=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:F,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),r[ie]=ee),ee}(V,$);return k.formatToParts(M)},v=function(w,V){for(var $=m(w,V),M=[],k=0;k<$.length;k+=1){var F=$[k],j=F.type,Y=F.value,ie=i[j];ie>=0&&(M[ie]=parseInt(Y,10))}var ee=M[3],de=ee===24?0:ee,ae=M[0]+"-"+M[1]+"-"+M[2]+" "+de+":"+M[4]+":"+M[5]+":000",fe=+w;return(e.utc(ae).valueOf()-(fe-=fe%1e3))/6e4},E=c.prototype;E.tz=function(w,V){w===void 0&&(w=y);var $,M=this.utcOffset(),k=this.toDate(),F=k.toLocaleString("en-US",{timeZone:w}),j=Math.round((k-new Date(F))/1e3/60),Y=15*-Math.round(k.getTimezoneOffset()/15)-j;if(!Number(Y))$=this.utcOffset(0,V);else if($=e(F,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),V){var ie=$.utcOffset();$=$.add(M-ie,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var V=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),V,{timeZoneName:w}).find(function(M){return M.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,V){if(!this.$x||!this.$x.$timezone)return b.call(this,w,V);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,V).tz(this.$x.$timezone,!0)},e.tz=function(w,V,$){var M=$&&V,k=$||V||y,F=v(+e(),k);if(typeof w!="string")return e(w).tz(k);var j=function(de,ae,fe){var ve=de-60*ae*1e3,ue=v(ve,fe);if(ae===ue)return[ve,ae];var ye=v(ve-=60*(ue-ae)*1e3,fe);return ue===ye?[ve,ue]:[de-60*Math.min(ue,ye)*1e3,Math.max(ue,ye)]}(e.utc(w,M).valueOf(),F,k),Y=j[0],ie=j[1],ee=e(Y).utcOffset(ie);return ee.$x.$timezone=k,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(b_e);var kbi=b_e.exports;const Ubi=es(kbi);var A_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){r.prototype.isBetween=function(c,e,y,m){var v=a(c),E=a(e),b=(m=m||"()")[0]==="(",w=m[1]===")";return(b?this.isAfter(v,y):!this.isBefore(v,y))&&(w?this.isBefore(E,y):!this.isAfter(E,y))||(b?this.isBefore(v,y):!this.isAfter(v,y))&&(w?this.isAfter(E,y):!this.isBefore(E,y))}}})})(A_e);var jbi=A_e.exports;const Kbi=es(jbi);var g_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isSameOrAfter=function(a,c){return this.isSame(a,c)||this.isAfter(a,c)}}})})(g_e);var Fbi=g_e.exports;const Sbi=es(Fbi);var I_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isSameOrBefore=function(a,c){return this.isSame(a,c)||this.isBefore(a,c)}}})})(I_e);var qbi=I_e.exports;const Zbi=es(qbi);var R_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="week",r="year";return function(a,c,e){var y=c.prototype;y.week=function(m){if(m===void 0&&(m=null),m!==null)return this.add(7*(m-this.week()),"day");var v=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var E=e(this).startOf(r).add(1,r).date(v),b=e(this).endOf(i);if(E.isBefore(b))return 1}var w=e(this).startOf(r).date(v).startOf(i).subtract(1,"millisecond"),V=this.diff(w,i,!0);return V<0?e(this).startOf("week").week():Math.ceil(V)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(R_e);var Hbi=R_e.exports;const Wbi=es(Hbi);var D_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="day";return function(r,a,c){var e=function(v){return v.add(4-v.isoWeekday(),i)},y=a.prototype;y.isoWeekYear=function(){return e(this).year()},y.isoWeek=function(v){if(!this.$utils().u(v))return this.add(7*(v-this.isoWeek()),i);var E,b,w,V,$=e(this),M=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),V=4-w.isoWeekday(),w.isoWeekday()>4&&(V+=7),w.add(V,i));return $.diff(M,"week")+1},y.isoWeekday=function(v){return this.$utils().u(v)?this.day()||7:this.day(this.day()%7?v:v-7)};var m=y.startOf;y.startOf=function(v,E){var b=this.$utils(),w=!!b.u(E)||E;return b.p(v)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(v,E)}}})})(D_e);var zbi=D_e.exports;const Jbi=es(zbi);var w_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i="month",r="quarter";return function(a,c){var e=c.prototype;e.quarter=function(v){return this.$utils().u(v)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(v-1))};var y=e.add;e.add=function(v,E){return v=Number(v),this.$utils().p(E)===r?this.add(3*v,i):y.bind(this)(v,E)};var m=e.startOf;e.startOf=function(v,E){var b=this.$utils(),w=!!b.u(E)||E;if(b.p(v)===r){var V=this.quarter()-1;return w?this.month(3*V).startOf(i).startOf("day"):this.month(3*V+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(w_e);var Ybi=w_e.exports;const Xbi=es(Ybi);var O_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){r.prototype.dayOfYear=function(c){var e=Math.round((a(this).startOf("day")-a(this).startOf("year"))/864e5)+1;return c==null?e:this.add(c-e,"day")}}})})(O_e);var Qbi=O_e.exports;const eAi=es(Qbi);var C_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r,a){i=i||{};var c=r.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function y(v,E,b,w){return c.fromToBase(v,E,b,w)}a.en.relativeTime=e,c.fromToBase=function(v,E,b,w,V){for(var $,M,k,F=b.$locale().relativeTime||e,j=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=j.length,ie=0;ie<Y;ie+=1){var ee=j[ie];ee.d&&($=w?a(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var de=(i.rounding||Math.round)(Math.abs($));if(k=$>0,de<=ee.r||!ee.r){de<=1&&ie>0&&(ee=j[ie-1]);var ae=F[ee.l];V&&(de=V(""+de)),M=typeof ae=="string"?ae.replace("%d",de):ae(de,E,ee.l,k);break}}if(E)return M;var fe=k?F.future:F.past;return typeof fe=="function"?fe(M):fe.replace("%s",M)},c.to=function(v,E){return y(v,E,this,!0)},c.from=function(v,E){return y(v,E,this)};var m=function(v){return v.$u?a.utc():a()};c.toNow=function(v){return this.to(m(this),v)},c.fromNow=function(v){return this.from(m(this),v)}}})})(C_e);var tAi=C_e.exports;const iAi=es(tAi);var __e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){var i,r,a=1e3,c=6e4,e=36e5,y=864e5,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v=31536e6,E=2628e6,b=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:v,months:E,days:y,hours:e,minutes:c,seconds:a,milliseconds:1,weeks:6048e5},V=function(de){return de instanceof ie},$=function(de,ae,fe){return new ie(de,fe,ae.$l)},M=function(de){return r.p(de)+"s"},k=function(de){return de<0},F=function(de){return k(de)?Math.ceil(de):Math.floor(de)},j=function(de){return Math.abs(de)},Y=function(de,ae){return de?k(de)?{negative:!0,format:""+j(de)+ae}:{negative:!1,format:""+de+ae}:{negative:!1,format:""}},ie=function(){function de(fe,ve,ue){var ye=this;if(this.$d={},this.$l=ue,fe===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ve)return $(fe*w[M(ve)],this);if(typeof fe=="number")return this.$ms=fe,this.parseFromMilliseconds(),this;if(typeof fe=="object")return Object.keys(fe).forEach(function(xe){ye.$d[M(xe)]=fe[xe]}),this.calMilliseconds(),this;if(typeof fe=="string"){var Ve=fe.match(b);if(Ve){var _e=Ve.slice(2).map(function(xe){return xe!=null?Number(xe):0});return this.$d.years=_e[0],this.$d.months=_e[1],this.$d.weeks=_e[2],this.$d.days=_e[3],this.$d.hours=_e[4],this.$d.minutes=_e[5],this.$d.seconds=_e[6],this.calMilliseconds(),this}}return this}var ae=de.prototype;return ae.calMilliseconds=function(){var fe=this;this.$ms=Object.keys(this.$d).reduce(function(ve,ue){return ve+(fe.$d[ue]||0)*w[ue]},0)},ae.parseFromMilliseconds=function(){var fe=this.$ms;this.$d.years=F(fe/v),fe%=v,this.$d.months=F(fe/E),fe%=E,this.$d.days=F(fe/y),fe%=y,this.$d.hours=F(fe/e),fe%=e,this.$d.minutes=F(fe/c),fe%=c,this.$d.seconds=F(fe/a),fe%=a,this.$d.milliseconds=fe},ae.toISOString=function(){var fe=Y(this.$d.years,"Y"),ve=Y(this.$d.months,"M"),ue=+this.$d.days||0;this.$d.weeks&&(ue+=7*this.$d.weeks);var ye=Y(ue,"D"),Ve=Y(this.$d.hours,"H"),_e=Y(this.$d.minutes,"M"),xe=this.$d.seconds||0;this.$d.milliseconds&&(xe+=this.$d.milliseconds/1e3,xe=Math.round(1e3*xe)/1e3);var Pe=Y(xe,"S"),Be=fe.negative||ve.negative||ye.negative||Ve.negative||_e.negative||Pe.negative,Se=Ve.format||_e.format||Pe.format?"T":"",Ue=(Be?"-":"")+"P"+fe.format+ve.format+ye.format+Se+Ve.format+_e.format+Pe.format;return Ue==="P"||Ue==="-P"?"P0D":Ue},ae.toJSON=function(){return this.toISOString()},ae.format=function(fe){var ve=fe||"YYYY-MM-DDTHH:mm:ss",ue={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return ve.replace(m,function(ye,Ve){return Ve||String(ue[ye])})},ae.as=function(fe){return this.$ms/w[M(fe)]},ae.get=function(fe){var ve=this.$ms,ue=M(fe);return ue==="milliseconds"?ve%=1e3:ve=ue==="weeks"?F(ve/w[ue]):this.$d[ue],ve||0},ae.add=function(fe,ve,ue){var ye;return ye=ve?fe*w[M(ve)]:V(fe)?fe.$ms:$(fe,this).$ms,$(this.$ms+ye*(ue?-1:1),this)},ae.subtract=function(fe,ve){return this.add(fe,ve,!0)},ae.locale=function(fe){var ve=this.clone();return ve.$l=fe,ve},ae.clone=function(){return $(this.$ms,this)},ae.humanize=function(fe){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!fe)},ae.valueOf=function(){return this.asMilliseconds()},ae.milliseconds=function(){return this.get("milliseconds")},ae.asMilliseconds=function(){return this.as("milliseconds")},ae.seconds=function(){return this.get("seconds")},ae.asSeconds=function(){return this.as("seconds")},ae.minutes=function(){return this.get("minutes")},ae.asMinutes=function(){return this.as("minutes")},ae.hours=function(){return this.get("hours")},ae.asHours=function(){return this.as("hours")},ae.days=function(){return this.get("days")},ae.asDays=function(){return this.as("days")},ae.weeks=function(){return this.get("weeks")},ae.asWeeks=function(){return this.as("weeks")},ae.months=function(){return this.get("months")},ae.asMonths=function(){return this.as("months")},ae.years=function(){return this.get("years")},ae.asYears=function(){return this.as("years")},de}(),ee=function(de,ae,fe){return de.add(ae.years()*fe,"y").add(ae.months()*fe,"M").add(ae.days()*fe,"d").add(ae.hours()*fe,"h").add(ae.minutes()*fe,"m").add(ae.seconds()*fe,"s").add(ae.milliseconds()*fe,"ms")};return function(de,ae,fe){i=fe,r=fe().$utils(),fe.duration=function(ye,Ve){var _e=fe.locale();return $(ye,{$l:_e},Ve)},fe.isDuration=V;var ve=ae.prototype.add,ue=ae.prototype.subtract;ae.prototype.add=function(ye,Ve){return V(ye)?ee(this,ye,1):ve.bind(this)(ye,Ve)},ae.prototype.subtract=function(ye,Ve){return V(ye)?ee(this,ye,-1):ue.bind(this)(ye,Ve)}}})})(__e);var rAi=__e.exports;const nAi=es(rAi);var V_e={exports:{}};(function(o,p){(function(i,r){o.exports=r()})(Nr,function(){return function(i,r){r.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(V_e);var aAi=V_e.exports;const sAi=es(aAi);L.extend(Gbi);L.extend(Ubi);L.extend(Kbi);L.extend(Sbi);L.extend(Zbi);L.extend(Wbi);L.extend(Jbi);L.extend(Xbi);L.extend(eAi);L.extend(iAi);L.extend(nAi);L.extend(sAi);const At=o=>L(o),ir=o=>o.toISOString();function P_e(){return ir(L())}function N_e(o,p){return At(o).format(p)}function x_e(o){return ir(L(o))}function $_e(o){if(o==null)throw new TypeError("ToDate expects a non-null value.");if(typeof o=="string"){const p=L(o);if(!p.isValid())throw new TypeError("Invalid date string.");return p.toISOString()}if(typeof o=="number"&&Number.isFinite(o)){const p=Math.abs(o)<1e12?L.unix(o):L(o);if(!p.isValid())throw new TypeError("Invalid numeric timestamp.");return p.toISOString()}if(o instanceof Date){const p=L(o);if(!p.isValid())throw new TypeError("Invalid Date object.");return p.toISOString()}throw new TypeError("Unsupported value type for ToDate. Provide a string, number, or Date.")}function L_e(o,p,i){return ir(At(o).add(p,i))}function M_e(o,p,i){return ir(At(o).subtract(p,i))}function B_e(o,p,i,r=!1){return At(o).diff(At(p),i,r)}function G_e(o){return At(o).unix()}function k_e(o){return ir(L.unix(o))}function U_e(o){return ir(At(o))}function j_e(o){return At(o).year()}function K_e(o){return At(o).month()}function F_e(o){return At(o).date()}function S_e(o){return At(o).hour()}function q_e(o){return At(o).minute()}function Z_e(o){return At(o).second()}function H_e(o){return At(o).millisecond()}function W_e(o){return At(o).isoWeekday()}function z_e(o){return At(o).week()}function J_e(o){return At(o).quarter()}function Y_e(o){return At(o).dayOfYear()}function X_e(o){return At(o).daysInMonth()}function Q_e(o,p){return ir(At(o).year(p))}function eVe(o,p){return ir(At(o).month(p))}function tVe(o,p){return ir(At(o).date(p))}function iVe(o,p){return ir(At(o).hour(p))}function rVe(o,p){return ir(At(o).minute(p))}function nVe(o,p){return ir(At(o).second(p))}function aVe(o,p){return ir(At(o).millisecond(p))}function sVe(o,p){return ir(At(o).isoWeekday(p))}function lVe(o,p){return ir(At(o).quarter(p))}function oVe(o,p){return ir(At(o).startOf(p))}function dVe(o,p){return ir(At(o).endOf(p))}function uVe(o,p){const i=At(o),r=i.startOf(p),a=i.endOf(p),c=r.valueOf()+(a.valueOf()-r.valueOf())/2;return ir(i.valueOf()<c?r:a)}function pVe(o,p,i){return At(o).isBefore(At(p),i)}function cVe(o,p,i){return At(o).isAfter(At(p),i)}function fVe(o,p,i){return At(o).isSame(At(p),i)}function yVe(o,p,i){return At(o).isSameOrBefore(At(p),i)}function hVe(o,p,i){return At(o).isSameOrAfter(At(p),i)}function mVe(o,p,i,r,a="()"){return At(o).isBetween(At(p),At(i),r,a)}function TVe(o){return L(o).isValid()}function vVe(o){return At(o).isLeapYear()}function EVe(o,p,i){const r=At(o);return r.isBefore(p)?ir(At(p)):r.isAfter(i)?ir(At(i)):ir(r)}function bVe(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const r=At(o[i]);r.isBefore(p)&&(p=r)}return ir(p)}function AVe(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const r=At(o[i]);r.isAfter(p)&&(p=r)}return ir(p)}function gVe(o,p=!1){return At(o).fromNow(p)}function IVe(o,p=!1){return At(o).toNow(p)}function RVe(o,p,i=!0){const r=At(o).diff(At(p),"millisecond",!0),a=Math.abs(r),e=L.duration(a,"milliseconds").humanize();return i?r>=0?`in ${e}`:`${e} ago`:e}function DVe(o,p,i=["6","7"],r=[]){const a=v=>r.some(E=>At(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=At(o);const y=p>=0?1:-1;let m=Math.abs(p);for(;m>0;){e=e.add(y,"day");const v=c(e);!i.includes(v)&&!a(e)&&m--}return ir(e)}function wVe(o,p){let i=At(o);const r=p;for(let a=0;a<7;a++)if(i=i.add(1,"day"),i.isoWeekday()===r)return ir(i);return ir(i)}function OVe(o,p){let i=At(o);const r=p;for(let a=0;a<7;a++)if(i=i.subtract(1,"day"),i.isoWeekday()===r)return ir(i);return ir(i)}const CVe="Local";function FN(){try{const o=Intl.DateTimeFormat().resolvedOptions().timeZone;if(o&&typeof o=="string")return o}catch{}try{if(typeof process<"u"&&process.env&&process.env.TZ)return process.env.TZ}catch{}return null}function SN(){const o=FN();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function _Ve(o,p,i=!1){let r=p;if(r===CVe){const e=FN();if(!e)throw new Error("Unable to detect current timezone from host environment.");r=e}const a=r?L.tz(o,r):At(o),c=i?a.utc(!0):a.utc();return ir(c)}function VVe(o,p,i=!1){const r=At(o);return ir(i?r.tz(p,!0):r.tz(p))}function PVe(o,p){const i=o===CVe?SN():o;return At(p).tz(i).utcOffset()}function NVe(o,p,i=!1){return ir(At(o).utcOffset(p,i))}class xVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP,version:"1.0.0",description:"Date get current timestamp operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetCurrentTimestamp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=P_e();return{value:G.Success,error:null,result:a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Ve extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE,version:"1.0.0",description:"Date format operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FormatDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=N_e(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE,version:"1.0.0",description:"Date parse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ParseDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=x_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE,version:"1.0.0",description:"Date add-to-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.AddToDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=L_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class BVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE,version:"1.0.0",description:"Date subtract-from-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SubtractFromDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=M_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class GVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES,version:"1.0.0",description:"Date difference-between-dates operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.DifferenceBetweenDates);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2],m=a[3]??!1,v=B_e(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lAi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE,version:"1.0.0",description:"Date to-date operation implementation module (coerce to ISO 8601 string)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=$_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX,version:"1.0.0",description:"Date to-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToUnix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=G_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class UVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX,version:"1.0.0",description:"Date from-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FromUnix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=k_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING,version:"1.0.0",description:"Date to-iso-string operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToISOString);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=U_e(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class KVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR,version:"1.0.0",description:"Date get-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=j_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class FVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH,version:"1.0.0",description:"Date get-month (0-based) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=K_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class SVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE,version:"1.0.0",description:"Date get-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=F_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class qVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR,version:"1.0.0",description:"Date get-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetHour);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=S_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ZVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE,version:"1.0.0",description:"Date get-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMinute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=q_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class HVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND,version:"1.0.0",description:"Date get-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetSecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=Z_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class WVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND,version:"1.0.0",description:"Date get-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetMillisecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=H_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class zVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY,version:"1.0.0",description:"Date get-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetIsoWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=W_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class JVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR,version:"1.0.0",description:"Date get-week-of-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetWeekOfYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=z_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class YVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER,version:"1.0.0",description:"Date get-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetQuarter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=J_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class XVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR,version:"1.0.0",description:"Date get-day-of-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDayOfYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=Y_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class QVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH,version:"1.0.0",description:"Date get-days-in-month operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetDaysInMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=X_e(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ePe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE,version:"1.0.0",description:"Date get-current-iana-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetCurrentIanaTimeZone);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=SN();return{value:G.Success,error:null,result:a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class tPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR,version:"1.0.0",description:"Date set-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=Q_e(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class iPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH,version:"1.0.0",description:"Date set-month operation implementation module (0-based month)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMonth);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=eVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class rPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE,version:"1.0.0",description:"Date set-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetDate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=tVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class nPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR,version:"1.0.0",description:"Date set-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetHour);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=iVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class aPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE,version:"1.0.0",description:"Date set-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMinute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=rVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class sPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND,version:"1.0.0",description:"Date set-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetSecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=nVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND,version:"1.0.0",description:"Date set-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetMillisecond);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=aVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class oPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY,version:"1.0.0",description:"Date set-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetIsoWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=sVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER,version:"1.0.0",description:"Date set-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetQuarter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=lVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class uPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF,version:"1.0.0",description:"Date start-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.StartOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=oVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class pPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF,version:"1.0.0",description:"Date end-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.EndOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=dVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class cPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO,version:"1.0.0",description:"Date round-to operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.RoundTo);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=uVe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class fPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE,version:"1.0.0",description:"Date is-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsBefore);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=pVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class yPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER,version:"1.0.0",description:"Date is-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsAfter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=cVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class hPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME,version:"1.0.0",description:"Date is-same operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSame);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=fVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class mPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE,version:"1.0.0",description:"Date is-same-or-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSameOrBefore);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=yVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class TPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER,version:"1.0.0",description:"Date is-same-or-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsSameOrAfter);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=hVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN,version:"1.0.0",description:"Date is-between operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsBetween);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)}),c=a[0],e=a[1],y=a[2],m=a[3],v=a[4],E=mVe(c,e,y,m,v??void 0);return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class EPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID,version:"1.0.0",description:"Date is-valid operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsValid);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=TVe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR,version:"1.0.0",description:"Date is-leap-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.IsLeapYear);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=vVe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class APe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE,version:"1.0.0",description:"Date clamp-to-range operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ClampToRange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=EVe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF,version:"1.0.0",description:"Date min-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.MinOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=a.length===1&&Array.isArray(a[0])?a[0]:a,e=bVe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class IPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF,version:"1.0.0",description:"Date max-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.MaxOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=a.length===1&&Array.isArray(a[0])?a[0]:a,e=AVe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class RPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW,version:"1.0.0",description:"Date from-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.FromNow);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=gVe(a,c??!1);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class DPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW,version:"1.0.0",description:"Date to-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToNow);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=IVe(a,c??!1);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF,version:"1.0.0",description:"Date humanize-diff operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.HumanizeDiff);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=RVe(a,c,e??!0);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class OPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS,version:"1.1.0",description:"Date add-business-days operation implementation module (ISO-weekend strings)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.AddBusinessDays);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??void 0,m=a[3]??[],v=DVe(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class CPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY,version:"1.0.0",description:"Date next-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.NextWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=wVe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY,version:"1.0.0",description:"Date previous-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.PreviousWeekday);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=OVe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class VPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC,version:"1.1.0",description:"Date to-utc operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ToUTC);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]||void 0,y=a[2]??!1,m=_Ve(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class PPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE,version:"1.0.0",description:"Date convert-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.ConvertTimezone);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=VVe(a,c,e??!1);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class NPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET,version:"1.0.0",description:"Date get-timezone-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.GetTimezoneOffset);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=PVe(a,c);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET,version:"1.0.0",description:"Date set-utc-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(K.SetUTCOffset);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=NVe(a,c,e??!1);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL,version:"1.0.0",description:"Execution parallel operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Parallel);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const y=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],v=c.map(b=>{const w=new $u(y.logic,[b],b,null,this.extensionsRegistry);return w.inheritValuesFromContext(y),w}).map(b=>b.execute()),E=await Promise.all(v);return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL,version:"1.0.0",description:"Execution sequential operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Sequential);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const e=[];for(let y=0;y<c.length;y++){const m=c[y],E=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],b=new $u(E.logic,[m],m,null,this.extensionsRegistry);b.inheritValuesFromContext(E);const w=await b.execute();e.push(w)}return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT,version:"1.0.0",description:"Execution wait operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(Ki.Wait);a&&(a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)})[0];return typeof c!="number"||c<0?{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid wait time provided",result:null}:(await new Promise(e=>setTimeout(e,c)),{value:G.Success,error:null,result:null})}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}const oAi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,qN=o=>o===null||["string","number","boolean"].includes(typeof o);function Vn(o,p="Input must be an array"){if(!Array.isArray(o))throw new TypeError(p);return o}function lo(o){const p=Vn(o,"Input must be an array");if(!p||p.length===0)throw new TypeError("No list provided or list is empty");return p}function ZN(o){return Array.isArray(o)?o:[]}function hs(o){return Number(o)}function BPe(o){if(!o||o.length===0)throw new TypeError("No input lists provided");if(!o.every(r=>Array.isArray(r)))throw new TypeError("All inputs must be arrays");const[p,...i]=o;return i.reduce((r,a)=>r.concat(a),p)}function GPe(o,...p){if(!Array.isArray(o))throw new TypeError("First input must be an array");if(!p.every(i=>Array.isArray(i)))throw new TypeError("All subsequent inputs must be arrays");return o.concat(...p)}function kPe(o,p){const i=lo(o),r=hs(p);return[i.slice(0,r),i.slice(r)]}function UPe(o){return lo(o).slice().reverse()}function jPe(o){return lo(o).slice(0,-1)}function KPe(o){return lo(o).slice(1)}function FPe(o,p,i){const r=Vn(o),a=hs(p);if(a<0||a>r.length)throw new TypeError("Index out of bounds");return[...r.slice(0,a),i,...r.slice(a)]}function SPe(o,p,i){const r=lo(o),a=hs(p);if(a<0||a>=r.length)throw new TypeError("Index out of bounds");const c=[...r];return c[a]=i,c}function qPe(o,p,i){const r=lo(o),a=r.indexOf(p);if(a===-1)return r;const c=[...r];return c[a]=i,c}function ZPe(o,p,i){const r=lo(o),a=r.lastIndexOf(p);if(a===-1)return r;const c=[...r];return c[a]=i,c}function HPe(o,p,i){return lo(o).map(a=>a===p?i:a)}function WPe(o,p){const i=lo(o),r=hs(p);if(r<0||r>=i.length)throw new TypeError("Index out of bounds");return i[r]}function zPe(o){return lo(o)[0]}function JPe(o){const p=lo(o);return p[p.length-1]}function YPe(o,p,...i){return[...Vn(o),p,...i]}function XPe(o,p){const i=Vn(o);return[p,...i]}function QPe(o){return Vn(o).length}function eNe(o,p){const i=Vn(o),r=hs(p);if(r<0||r>=i.length)throw new TypeError("Index out of bounds");return i.slice(0,r).concat(i.slice(r+1))}function tNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)??0);return i.slice(0,r)}function iNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)??0);return r===0?[]:i.slice(-r)}function rNe(o,p,i){const r=Vn(o),a=p==null?void 0:hs(p),c=i==null?void 0:hs(i);return r.slice(a,c)}function nNe(o,p){return Vn(o).indexOf(p)}function aNe(o,p){return Vn(o).lastIndexOf(p)}function sNe(o){const p=Vn(o),i=[],r=new Set;for(const a of p)r.has(a)||(r.add(a),i.push(a));return i}function lNe(o){return Vn(o).reduce((i,r)=>i.concat(r),[])}function oNe(o){const p=Vn(o);if(p.length<=1)return[...p];const i=p[0],r=typeof i=="number"&&p.every(e=>typeof e=="number"&&Number.isFinite(e)),a=typeof i=="string"&&p.every(e=>typeof e=="string");let c=null;if(r?c="number":a&&(c=p.every(y=>oAi.test(y)&&L(y).isValid())?"date":"string"),!c)throw new TypeError("All items must be of the same supported type: number, string, or ISO date string.");return c==="number"?[...p].sort((e,y)=>e-y):c==="string"?[...p].sort((e,y)=>e.localeCompare(y)):[...p].sort((e,y)=>L(e).valueOf()-L(y).valueOf())}function dNe(o){const i=[...Vn(o)];for(let r=i.length-1;r>0;r--){const a=Math.floor(bR()*(r+1));[i[r],i[a]]=[i[a],i[r]]}return i}function uNe(o,p){const i=Vn(o),r=Math.max(1,hs(p)||1),a=[];for(let c=0;c<i.length;c+=r)a.push(i.slice(c,c+r));return a}function pNe(o,p,i){const r=Vn(o),a=Math.max(0,hs(p)||0);if(r.length>=a)return[...r];const c=a-r.length;return Array(c).fill(i).concat(r)}function cNe(o,p,i){const r=Vn(o),a=Math.max(0,hs(p)||0);if(r.length>=a)return[...r];const c=a-r.length,e=Array(c).fill(i);return r.concat(e)}function fNe(o,p){const i=Vn(o),r=Math.max(0,hs(p)||0),a=[];for(let c=0;c<r;c++)a.push(...i);return a}function yNe(o,p){if(!qN(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return ZN(o).some(r=>r===p)}function hNe(o,p){const i=ZN(o),r=Array.isArray(p)?p:[p];if(r.length===0)return!1;if(!r.every(qN))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return r.every(a=>i.includes(a))}function mNe(o,p){const i=ZN(o),r=Array.isArray(p)?p:[p];if(r.length===0)return!1;if(!r.every(qN))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return r.some(a=>i.includes(a))}class TNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN,version:"1.0.0",description:"List join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Join);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=BPe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT,version:"1.0.0",description:"List split operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Split);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],[y,m]=kPe(c,e);return{value:G.Success,error:null,result:[y,m]}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ENe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE,version:"1.0.0",description:"List reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Reverse);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=UPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS,version:"1.0.0",description:"List delete last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.DeleteLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=jPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ANe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS,version:"1.0.0",description:"List delete first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.DeleteFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=KPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX,version:"1.0.0",description:"List add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.AddAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=FPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class INe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX,version:"1.0.0",description:"List replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=SPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class RNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS,version:"1.0.0",description:"List replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=qPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class DNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS,version:"1.0.0",description:"List replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=ZPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL,version:"1.0.0",description:"List replace all operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.ReplaceAll);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2],m=HPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ONe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM,version:"1.0.0",description:"List get index item operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetIndexItem);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=WPe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class CNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST,version:"1.0.0",description:"List get first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetFirst);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=zPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _Ne extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST,version:"1.0.0",description:"List get last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.GetLast);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=JPe(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class VNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND,version:"1.0.0",description:"List append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Append);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a.slice(2),m=YPe(c,e,...y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class PNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND,version:"1.0.0",description:"List prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(re.Prepend);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=XPe(c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class NNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH,version:"1.0.0",description:"List get length",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLength);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(c=>{var e,y;return((e=c.value)==null?void 0:e.valueAsType)??((y=c.value)==null?void 0:y.value)});return{value:G.Success,error:null,result:QPe(a)}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX,version:"1.0.0",description:"List delete one item at index (non-mutating)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.DeleteAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=eNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $Ne extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS,version:"1.0.0",description:"List get first N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetFirstNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=tNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class LNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS,version:"1.0.0",description:"List get last N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLastNItems);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=iNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class MNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE,version:"1.0.0",description:"List slice(start, end)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Slice);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=rNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class BNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT,version:"1.0.0",description:"List concat(base, ...others)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Concat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),[c,...e]=a,y=GPe(c,...e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class GNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF,version:"1.0.0",description:"List listGetIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=nNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF,version:"1.0.0",description:"List listGetLastIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.GetLastIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=aNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class UNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE,version:"1.0.0",description:"List unique (stable, by reference/===)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Unique);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=sNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN,version:"1.0.0",description:"List flatten one level",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Flatten);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=lNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class KNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT,version:"1.0.0",description:"List sort (non-mutating). Supports lists of strings (alphabetic), numbers (numeric), or ISO date strings (chronological).",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Sort);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=oNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class FNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE,version:"1.0.0",description:"List shuffle (Fisher–Yates, secure RNG helper)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Shuffle);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=dNe(a);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class SNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK,version:"1.0.0",description:"List chunk(size) -> list of lists",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Chunk);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=uNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class qNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START,version:"1.0.0",description:"List padStart(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.PadStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=pNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ZNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END,version:"1.0.0",description:"List padEnd(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.PadEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=cNe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class HNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT,version:"1.0.0",description:"List repeat(count)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Repeat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=fNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class WNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS,version:"1.0.0",description:"List contains (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.Contains);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=yNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class zNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL,version:"1.0.0",description:"List contains all (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.ContainsAll);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=hNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class JNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY,version:"1.0.0",description:"List contains any (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(re.ContainsAny);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=mNe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dAi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH,version:"1.0.0",description:"Returns the number of characters in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.GetLength);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.length;return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class YNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN,version:"1.0.0",description:"String join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Join);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{var a,c,e;try{const y=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.separator.id}),m=((a=y==null?void 0:y.value)==null?void 0:a.value)||"",v=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=r.find(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=r.filter(k=>{var F,j;return((j=(F=k.valueOwner)==null?void 0:F.declaration)==null?void 0:j.id)===Q.operation[q.Join].inputs.dynamicString.id}).map(k=>{var F,j;return((F=k.value)==null?void 0:F.valueAsType)||((j=k.value)==null?void 0:j.value)||""}),M=[E,w,...$].join(m);return{value:G.Success,error:null,result:M}}catch(y){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:y,result:null}}}})}}class XNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX,version:"1.0.0",description:"String split at index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y={firstPart:c.slice(0,e),secondPart:c.slice(e)};return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class QNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS,version:"1.0.0",description:"String split at all the occurrences of separators operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtAllSeparators);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1],y=c.split(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR,version:"1.0.0",description:"String split at the first occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtFirstSeparator);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=c.indexOf(e),m={firstPart:c.slice(0,y),secondPart:c.slice(y+e.length)};return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class txe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR,version:"1.0.0",description:"String split at the last occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.SplitAtLastSeparator);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=c.lastIndexOf(e),m={firstPart:c.slice(0,y),secondPart:c.slice(y+e.length)};return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class ixe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS,version:"1.0.0",description:"String delete last number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,-e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class rxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS,version:"1.0.0",description:"String delete first number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class nxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE,version:"1.0.0",description:"String reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Reverse);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.split("").reverse().join("");return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class axe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE,version:"1.0.0",description:"String to lower case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ToLowerCase);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.toLowerCase();return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class sxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE,version:"1.0.0",description:"String to upper case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ToUpperCase);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const e=c.toUpperCase();return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class lxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX,version:"1.0.0",description:"String delete index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.DeleteAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??1;if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=Math.min(y,c.length-e),v=c.slice(0,e)+c.slice(e+m);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class oxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX,version:"1.0.0",description:"String add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.AddAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.slice(0,e)+y+c.slice(e);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class dxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS,version:"1.0.0",description:"String replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]??1,y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=y+c.slice(e);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class uxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS,version:"1.0.0",description:"String replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1]??1,y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.slice(0,-e)+y;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class pxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX,version:"1.0.0",description:"String replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceAtIndex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2]??1,m=a[3];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const v=(c.slice(0,e)||"")+m+(c.slice(e+y)||"");return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class cxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceFirstMatch);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.replace(e,y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceLastMatch);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.lastIndexOf(e),v=m===-1?c:c.substring(0,m)+y+c.substring(m+e.length);return{value:G.Success,error:null,result:v}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class yxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES,version:"1.0.0",description:"String replace all matches operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.ReplaceAllMatches);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1],y=a[2];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const m=c.split(e).join(y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class hxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM,version:"1.0.0",description:"String get index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetIndexItem);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.charAt(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class mxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS,version:"1.0.0",description:"String get last N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetLastNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(-e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Txe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS,version:"1.0.0",description:"String get first N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetFirstNChars);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=c.slice(0,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class vxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF,version:"1.0.0",description:"String get index of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.GetIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};if(typeof e!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No search value provided",result:null};const y=c.indexOf(e);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND,version:"1.0.0",description:"String append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Append);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};if(typeof e!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No value to append provided",result:null};const y=a.slice(2);if(!y.every(v=>typeof v=="string"))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"All values to append must be strings",result:null};const m=[c,e,...y].join("");return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class bxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND,version:"1.0.0",description:"String prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(q.Prepend);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const a=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=a[0],e=a[1];if(typeof c!="string")return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No string provided",result:null};const y=e+c;return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Axe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM,version:"1.0.0",description:"String trim implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Trim);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trim();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class gxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START,version:"1.0.0",description:"String trimStart implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.TrimStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trimStart();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Ixe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END,version:"1.0.0",description:"String trimEnd implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.TrimEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=a.trimEnd();return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Rxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING,version:"1.0.0",description:"String substring(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Substring);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.substring(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Dxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE,version:"1.0.0",description:"String slice(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Slice);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.slice(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class wxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF,version:"1.0.0",description:"String lastIndexOf(search, fromIndex?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.GetLastIndexOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.lastIndexOf(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Oxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START,version:"1.0.0",description:"String padStart(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.PadStart);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.padStart(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Cxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END,version:"1.0.0",description:"String padEnd(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.PadEnd);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=a.padEnd(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class _xe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT,version:"1.0.0",description:"String repeat(count) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Repeat);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=a.repeat(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Vxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX,version:"1.0.0",description:"String match(regex) -> first match array or null",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),y=new RegExp(String(c??""),e?String(e):void 0),m=String(a??"").match(y);return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Pxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX,version:"1.0.0",description:"String matchAll(regex) -> array of matches",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchAllRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)??((V=b.value)==null?void 0:V.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(a??"").matchAll(v),b=>Array.from(b));return{value:G.Success,error:null,result:E}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Nxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX,version:"1.0.0",description:"String search(regex) -> index or -1",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.SearchRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)});let y=-1;try{const m=new RegExp(String(c??""),e?String(e):void 0);y=String(a??"").search(m)}catch{y=-1}return{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class xxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX,version:"1.0.0",description:"String replace using RegExp (pattern, replacement, flags?)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.ReplaceRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e,y]=r.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)});let m=String(a??"");const v=new RegExp(String(c??""),y?String(y):void 0);return m=m.replace(v,String(e??"")),{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class $xe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE,version:"1.0.0",description:"String normalize(form?) implementation module (NFC by default)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.NormalizeUnicode);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=a.normalize(c||"NFC");return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}const yg=class yg extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS,version:"1.0.0",description:"Remove diacritics via NFD decomposition + strip combining marks",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemoveDiacritics);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=r.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=String(a??"").normalize("NFD").replace(yg.COMBINING_MARKS,"");return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}};I(yg,"COMBINING_MARKS",/[\u0300-\u036f]/g);let FA=yg;class Lxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES,version:"1.0.0",description:"Count literal substring occurrences in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.CountOccurrences);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=y===""?0:e.split(y).length-1;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Mxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX,version:"1.0.0",description:"Ensure string starts with given prefix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EnsurePrefix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.startsWith(y)?e:y+e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Bxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX,version:"1.0.0",description:"Ensure string ends with given suffix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EnsureSuffix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.endsWith(y)?e:e+y;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Gxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX,version:"1.0.0",description:"Remove prefix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemovePrefix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.startsWith(y)?e.slice(y.length):e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class kxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX,version:"1.0.0",description:"Remove suffix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.RemoveSuffix);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(a??""),y=String(c??""),m=e.endsWith(y)?e.slice(0,-y.length):e;return{value:G.Success,error:null,result:m}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Uxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH,version:"1.0.0",description:"String startsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.StartsWith);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("StartsWith expects two strings.");const e=a.startsWith(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class jxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH,version:"1.0.0",description:"String endsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.EndsWith);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("EndsWith expects two strings.");const e=a.endsWith(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Kxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS,version:"1.0.0",description:"String includes(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.Contains);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=r.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("Contains expects two strings.");const e=a.includes(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX,version:"1.0.0",description:"Regex test: new RegExp(pattern, flags?).test(src) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(q.MatchesRegex);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=r.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)});if(typeof a!="string"||typeof c!="string")throw new TypeError("MatchesRegex expects source and pattern to be strings.");if(!(e===void 0||typeof e=="string"))throw new TypeError("MatchesRegex flags must be a string if provided.");let y=!1;return y=new RegExp(c,e).test(a),{value:G.Success,error:null,result:y}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}function Sxe(o,p){const i=Number(o),a=10**Math.max(0,Number(p)||0);return Math.round(i*a)/a}function qxe(o,p){const i=Number(o),r=Math.abs(Number(p)||0);return r===0?i:Math.round(i/r)*r}function Zxe(o,p,i){const r=Number(o),a=Number(p),c=Number(i);return Math.min(Math.max(r,a),c)}function Hxe(o,p,i,r,a){const c=Number(o),e=Number(p),y=Number(i),m=Number(r),v=Number(a);if(e===y)throw new Error("Input range cannot be zero");const E=(c-e)/(y-e);return m+E*(v-m)}function Wxe(...o){const p=o.map(r=>Number(r));return p.length===0?0:p.reduce((r,a)=>r+a,0)/p.length}function zxe(...o){const p=o.map(r=>Number(r)).sort((r,a)=>r-a);if(p.length===0)return 0;const i=Math.floor(p.length/2);return p.length%2?p[i]:(p[i-1]+p[i])/2}function Jxe(o,p){const i=Number(o),r=Number(p);return r===0?NaN:i<0&&r%2===1?-Math.pow(-i,1/r):Math.pow(i,1/r)}function Yxe(o,p){const i=Number(o),r=Number(p);return i===0?1/0:(r-i)/i*100}const di=o=>o.map(p=>{var i,r;return((i=p.value)==null?void 0:i.valueAsType)??((r=p.value)==null?void 0:r.value)});class Xxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION,version:"1.0.0",description:"Number addition operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Addition);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e+y,0);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class Qxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION,version:"1.0.0",description:"Number subtraction operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Subtraction);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e-y,0);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class e$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION,version:"1.0.0",description:"Number multiplication operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Multiplication);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const c=di(r).reduce((e,y)=>e*y,1);return{value:G.Success,error:null,result:c}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class t$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION,version:"1.0.0",description:"Number division operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Division);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r);if(c===0)throw new Error("Division by zero is not allowed");const e=a/c;return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class i$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER,version:"1.0.0",description:"Number remainder operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Remainder);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r);if(c===0)throw new Error("Division by zero is not allowed");const e=a%c;return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class r$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION,version:"1.0.0",description:"Number exponentiation operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(a=>a.contextType===X.Logic);if(r){const a=r.get(te.Exponentiation);a&&(a.autoexecutable=!0,a.implementation=this.module.main)}},main:async(i,r)=>{try{const[a,c]=di(r),e=Math.pow(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class n$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE,version:"1.0.0",description:"Number negate (unary -x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Negate);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:-a}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class a$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE,version:"1.0.0",description:"Number absolute (|x|)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Absolute);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.abs(Number(a))}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class s$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN,version:"1.0.0",description:"Number sign (-1 | 0 | 1)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Sign);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sign(Number(a))}}catch(a){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:a,result:null}}}})}}class l$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND,version:"1.0.0",description:"Number round to nearest integer",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Round);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.round(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class o$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR,version:"1.0.0",description:"Number floor (⌊x⌋)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Floor);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.floor(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class d$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL,version:"1.0.0",description:"Number ceil (⌈x⌉)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Ceil);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.ceil(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class u$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC,version:"1.0.0",description:"Number truncation (drop fractional part)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Trunc);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.trunc(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class p$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS,version:"1.0.0",description:"Round to N decimals",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.RoundToDecimals);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Sxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class c$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP,version:"1.0.0",description:"Snap a number to the nearest multiple of step (>=0 step)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.SnapToStep);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=qxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class f$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP,version:"1.0.0",description:"Clamp value to [min, max]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Clamp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e]=di(r),y=Zxe(a,c,e);return{value:G.Success,error:null,result:y}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class y$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE,version:"1.0.0",description:"Map value from [inMin,inMax] to [outMin,outMax]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MapRange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c,e,y,m]=di(r),v=Hxe(a,c,e,y,m);return{value:G.Success,error:null,result:v}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class h$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE,version:"1.0.0",description:"Average(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Average);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r),c=Wxe(...a);return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class m$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN,version:"1.0.0",description:"Median(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Median);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r),c=zxe(...a);return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class T$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF,version:"1.0.0",description:"Min(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MinOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r).map(Number),c=a.length?Math.min(...a):1/0;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class v$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF,version:"1.0.0",description:"Max(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MaxOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const a=di(r).map(Number),c=a.length?Math.max(...a):-1/0;return{value:G.Success,error:null,result:c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class E$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT,version:"1.0.0",description:"Square root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.SquareRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sqrt(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class b$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT,version:"1.0.0",description:"Cube root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.CubeRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.cbrt(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class A$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT,version:"1.0.0",description:"Nth root (value, n)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.NthRoot);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Jxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class g$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP,version:"1.0.0",description:"e^x",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Exp);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.exp(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class I$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL,version:"1.0.0",description:"Natural log ln(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LogNatural);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.log(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class R$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10,version:"1.0.0",description:"Log base 10",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Log10);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r),c=Number(a),e=Math.log10?Math.log10(c):Math.log(c)/Math.LN10;return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class D$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN,version:"1.0.0",description:"sin(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Sin);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.sin(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class w$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS,version:"1.0.0",description:"cos(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Cos);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.cos(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class O$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN,version:"1.0.0",description:"tan(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Tan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.tan(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class C$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN,version:"1.0.0",description:"asin(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Asin);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.asin(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class _$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS,version:"1.0.0",description:"acos(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Acos);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.acos(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class V$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN,version:"1.0.0",description:"atan(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Atan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Math.atan(Number(a))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class P$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2,version:"1.0.0",description:"atan2(y, x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.Atan2);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:Math.atan2(Number(a),Number(c))}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class N$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS,version:"1.0.0",description:"deg → rad",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.ToRadians);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Number(a)*Math.PI/180}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class x$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES,version:"1.0.0",description:"rad → deg",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.ToDegrees);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a]=di(r);return{value:G.Success,error:null,result:Number(a)*180/Math.PI}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class $$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF,version:"1.0.0",description:"x percent of y",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.PercentOf);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Number(a)/100*Number(c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class MC extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE,version:"1.0.0",description:"((new-old)/old)*100",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.PercentageChange);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r),e=Yxe(a,c);return{value:G.Success,error:null,result:e}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class L$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN,version:"1.0.0",description:"a < b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LessThan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a<c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class M$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN,version:"1.0.0",description:"a > b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MoreThan);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a>c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class B$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL,version:"1.0.0",description:"a <= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.LessThanOrEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a<=c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}class G$e extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL,version:"1.0.0",description:"a >= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const r=i.find(c=>c.contextType===X.Logic),a=r==null?void 0:r.get(te.MoreThanOrEqual);a&&(a.autoexecutable=!0,a.implementation=this.module.main)},main:async(i,r)=>{try{const[a,c]=di(r);return{value:G.Success,error:null,result:a>=c}}catch(a){return{value:G.UnhandledError,error:a,result:null}}}})}}function k$e(o,p){return function(){return o.apply(p,arguments)}}const{toString:uAi}=Object.prototype,{getPrototypeOf:HN}=Object,{iterator:RR,toStringTag:U$e}=Symbol,DR=(o=>p=>{const i=uAi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),oo=o=>(o=o.toLowerCase(),p=>DR(p)===o),wR=o=>p=>typeof p===o,{isArray:t0}=Array,Fy=wR("undefined");function Pv(o){return o!==null&&!Fy(o)&&o.constructor!==null&&!Fy(o.constructor)&&Ka(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const j$e=oo("ArrayBuffer");function pAi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&j$e(o.buffer),p}const cAi=wR("string"),Ka=wR("function"),K$e=wR("number"),Nv=o=>o!==null&&typeof o=="object",fAi=o=>o===!0||o===!1,hA=o=>{if(DR(o)!=="object")return!1;const p=HN(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(U$e in o)&&!(RR in o)},yAi=o=>{if(!Nv(o)||Pv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},hAi=oo("Date"),mAi=oo("File"),TAi=oo("Blob"),vAi=oo("FileList"),EAi=o=>Nv(o)&&Ka(o.pipe),bAi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ka(o.append)&&((p=DR(o))==="formdata"||p==="object"&&Ka(o.toString)&&o.toString()==="[object FormData]"))},AAi=oo("URLSearchParams"),[gAi,IAi,RAi,DAi]=["ReadableStream","Request","Response","Headers"].map(oo),wAi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xv(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let r,a;if(typeof o!="object"&&(o=[o]),t0(o))for(r=0,a=o.length;r<a;r++)p.call(null,o[r],r,o);else{if(Pv(o))return;const c=i?Object.getOwnPropertyNames(o):Object.keys(o),e=c.length;let y;for(r=0;r<e;r++)y=c[r],p.call(null,o[y],y,o)}}function F$e(o,p){if(Pv(o))return null;p=p.toLowerCase();const i=Object.keys(o);let r=i.length,a;for(;r-- >0;)if(a=i[r],p===a.toLowerCase())return a;return null}const xc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),S$e=o=>!Fy(o)&&o!==xc;function BC(){const{caseless:o,skipUndefined:p}=S$e(this)&&this||{},i={},r=(a,c)=>{const e=o&&F$e(i,c)||c;hA(i[e])&&hA(a)?i[e]=BC(i[e],a):hA(a)?i[e]=BC({},a):t0(a)?i[e]=a.slice():(!p||!Fy(a))&&(i[e]=a)};for(let a=0,c=arguments.length;a<c;a++)arguments[a]&&xv(arguments[a],r);return i}const OAi=(o,p,i,{allOwnKeys:r}={})=>(xv(p,(a,c)=>{i&&Ka(a)?o[c]=k$e(a,i):o[c]=a},{allOwnKeys:r}),o),CAi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),_Ai=(o,p,i,r)=>{o.prototype=Object.create(p.prototype,r),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:p.prototype}),i&&Object.assign(o.prototype,i)},VAi=(o,p,i,r)=>{let a,c,e;const y={};if(p=p||{},o==null)return p;do{for(a=Object.getOwnPropertyNames(o),c=a.length;c-- >0;)e=a[c],(!r||r(e,o,p))&&!y[e]&&(p[e]=o[e],y[e]=!0);o=i!==!1&&HN(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},PAi=(o,p,i)=>{o=String(o),(i===void 0||i>o.length)&&(i=o.length),i-=p.length;const r=o.indexOf(p,i);return r!==-1&&r===i},NAi=o=>{if(!o)return null;if(t0(o))return o;let p=o.length;if(!K$e(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},xAi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&HN(Uint8Array)),$Ai=(o,p)=>{const r=(o&&o[RR]).call(o);let a;for(;(a=r.next())&&!a.done;){const c=a.value;p.call(o,c[0],c[1])}},LAi=(o,p)=>{let i;const r=[];for(;(i=o.exec(p))!==null;)r.push(i);return r},MAi=oo("HTMLFormElement"),BAi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,a){return r.toUpperCase()+a}),Ck=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),GAi=oo("RegExp"),q$e=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),r={};xv(i,(a,c)=>{let e;(e=p(a,c,o))!==!1&&(r[c]=e||a)}),Object.defineProperties(o,r)},kAi=o=>{q$e(o,(p,i)=>{if(Ka(o)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=o[i];if(Ka(r)){if(p.enumerable=!1,"writable"in p){p.writable=!1;return}p.set||(p.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},UAi=(o,p)=>{const i={},r=a=>{a.forEach(c=>{i[c]=!0})};return t0(o)?r(o):r(String(o).split(p)),i},jAi=()=>{},KAi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function FAi(o){return!!(o&&Ka(o.append)&&o[U$e]==="FormData"&&o[RR])}const SAi=o=>{const p=new Array(10),i=(r,a)=>{if(Nv(r)){if(p.indexOf(r)>=0)return;if(Pv(r))return r;if(!("toJSON"in r)){p[a]=r;const c=t0(r)?[]:{};return xv(r,(e,y)=>{const m=i(e,a+1);!Fy(m)&&(c[y]=m)}),p[a]=void 0,c}}return r};return i(o,0)},qAi=oo("AsyncFunction"),ZAi=o=>o&&(Nv(o)||Ka(o))&&Ka(o.then)&&Ka(o.catch),Z$e=((o,p)=>o?setImmediate:p?((i,r)=>(xc.addEventListener("message",({source:a,data:c})=>{a===xc&&c===i&&r.length&&r.shift()()},!1),a=>{r.push(a),xc.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ka(xc.postMessage)),HAi=typeof queueMicrotask<"u"?queueMicrotask.bind(xc):typeof process<"u"&&process.nextTick||Z$e,WAi=o=>o!=null&&Ka(o[RR]),je={isArray:t0,isArrayBuffer:j$e,isBuffer:Pv,isFormData:bAi,isArrayBufferView:pAi,isString:cAi,isNumber:K$e,isBoolean:fAi,isObject:Nv,isPlainObject:hA,isEmptyObject:yAi,isReadableStream:gAi,isRequest:IAi,isResponse:RAi,isHeaders:DAi,isUndefined:Fy,isDate:hAi,isFile:mAi,isBlob:TAi,isRegExp:GAi,isFunction:Ka,isStream:EAi,isURLSearchParams:AAi,isTypedArray:xAi,isFileList:vAi,forEach:xv,merge:BC,extend:OAi,trim:wAi,stripBOM:CAi,inherits:_Ai,toFlatObject:VAi,kindOf:DR,kindOfTest:oo,endsWith:PAi,toArray:NAi,forEachEntry:$Ai,matchAll:LAi,isHTMLForm:MAi,hasOwnProperty:Ck,hasOwnProp:Ck,reduceDescriptors:q$e,freezeMethods:kAi,toObjectSet:UAi,toCamelCase:BAi,noop:jAi,toFiniteNumber:KAi,findKey:F$e,global:xc,isContextDefined:S$e,isSpecCompliantForm:FAi,toJSONObject:SAi,isAsyncFn:qAi,isThenable:ZAi,setImmediate:Z$e,asap:HAi,isIterable:WAi};function si(o,p,i,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",p&&(this.code=p),i&&(this.config=i),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}je.inherits(si,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:je.toJSONObject(this.config),code:this.code,status:this.status}}});const H$e=si.prototype,W$e={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(o=>{W$e[o]={value:o}});Object.defineProperties(si,W$e);Object.defineProperty(H$e,"isAxiosError",{value:!0});si.from=(o,p,i,r,a,c)=>{const e=Object.create(H$e);je.toFlatObject(o,e,function(E){return E!==Error.prototype},v=>v!=="isAxiosError");const y=o&&o.message?o.message:"Error",m=p==null&&o?o.code:p;return si.call(e,y,m,i,r,a),o&&e.cause==null&&Object.defineProperty(e,"cause",{value:o,configurable:!0}),e.name=o&&o.name||"Error",c&&Object.assign(e,c),e};const zAi=null;function GC(o){return je.isPlainObject(o)||je.isArray(o)}function z$e(o){return je.endsWith(o,"[]")?o.slice(0,-2):o}function _k(o,p,i){return o?o.concat(p).map(function(a,c){return a=z$e(a),!i&&c?"["+a+"]":a}).join(i?".":""):p}function JAi(o){return je.isArray(o)&&!o.some(GC)}const YAi=je.toFlatObject(je,{},null,function(p){return/^is[A-Z]/.test(p)});function OR(o,p,i){if(!je.isObject(o))throw new TypeError("target must be an object");p=p||new FormData,i=je.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,k){return!je.isUndefined(k[M])});const r=i.metaTokens,a=i.visitor||E,c=i.dots,e=i.indexes,m=(i.Blob||typeof Blob<"u"&&Blob)&&je.isSpecCompliantForm(p);if(!je.isFunction(a))throw new TypeError("visitor must be a function");function v($){if($===null)return"";if(je.isDate($))return $.toISOString();if(je.isBoolean($))return $.toString();if(!m&&je.isBlob($))throw new si("Blob is not supported. Use a Buffer instead.");return je.isArrayBuffer($)||je.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,M,k){let F=$;if($&&!k&&typeof $=="object"){if(je.endsWith(M,"{}"))M=r?M:M.slice(0,-2),$=JSON.stringify($);else if(je.isArray($)&&JAi($)||(je.isFileList($)||je.endsWith(M,"[]"))&&(F=je.toArray($)))return M=z$e(M),F.forEach(function(Y,ie){!(je.isUndefined(Y)||Y===null)&&p.append(e===!0?_k([M],ie,c):e===null?M:M+"[]",v(Y))}),!1}return GC($)?!0:(p.append(_k(k,M,c),v($)),!1)}const b=[],w=Object.assign(YAi,{defaultVisitor:E,convertValue:v,isVisitable:GC});function V($,M){if(!je.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+M.join("."));b.push($),je.forEach($,function(F,j){(!(je.isUndefined(F)||F===null)&&a.call(p,F,je.isString(j)?j.trim():j,M,w))===!0&&V(F,M?M.concat(j):[j])}),b.pop()}}if(!je.isObject(o))throw new TypeError("data must be an object");return V(o),p}function Vk(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(r){return p[r]})}function WN(o,p){this._pairs=[],o&&OR(o,this,p)}const J$e=WN.prototype;J$e.append=function(p,i){this._pairs.push([p,i])};J$e.toString=function(p){const i=p?function(r){return p.call(this,r,Vk)}:Vk;return this._pairs.map(function(a){return i(a[0])+"="+i(a[1])},"").join("&")};function XAi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Y$e(o,p,i){if(!p)return o;const r=i&&i.encode||XAi;je.isFunction(i)&&(i={serialize:i});const a=i&&i.serialize;let c;if(a?c=a(p,i):c=je.isURLSearchParams(p)?p.toString():new WN(p,i).toString(r),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class QAi{constructor(){this.handlers=[]}use(p,i,r){return this.handlers.push({fulfilled:p,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(p){this.handlers[p]&&(this.handlers[p]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(p){je.forEach(this.handlers,function(r){r!==null&&p(r)})}}const Pk=QAi,X$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},egi=typeof URLSearchParams<"u"?URLSearchParams:WN,tgi=typeof FormData<"u"?FormData:null,igi=typeof Blob<"u"?Blob:null,rgi={isBrowser:!0,classes:{URLSearchParams:egi,FormData:tgi,Blob:igi},protocols:["http","https","file","blob","url","data"]},zN=typeof window<"u"&&typeof document<"u",kC=typeof navigator=="object"&&navigator||void 0,ngi=zN&&(!kC||["ReactNative","NativeScript","NS"].indexOf(kC.product)<0),agi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),sgi=zN&&window.location.href||"http://localhost",lgi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zN,hasStandardBrowserEnv:ngi,hasStandardBrowserWebWorkerEnv:agi,navigator:kC,origin:sgi},Symbol.toStringTag,{value:"Module"})),aa={...lgi,...rgi};function ogi(o,p){return OR(o,new aa.classes.URLSearchParams,{visitor:function(i,r,a,c){return aa.isNode&&je.isBuffer(i)?(this.append(r,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...p})}function dgi(o){return je.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function ugi(o){const p={},i=Object.keys(o);let r;const a=i.length;let c;for(r=0;r<a;r++)c=i[r],p[c]=o[c];return p}function Q$e(o){function p(i,r,a,c){let e=i[c++];if(e==="__proto__")return!0;const y=Number.isFinite(+e),m=c>=i.length;return e=!e&&je.isArray(a)?a.length:e,m?(je.hasOwnProp(a,e)?a[e]=[a[e],r]:a[e]=r,!y):((!a[e]||!je.isObject(a[e]))&&(a[e]=[]),p(i,r,a[e],c)&&je.isArray(a[e])&&(a[e]=ugi(a[e])),!y)}if(je.isFormData(o)&&je.isFunction(o.entries)){const i={};return je.forEachEntry(o,(r,a)=>{p(dgi(r),a,i,0)}),i}return null}function pgi(o,p,i){if(je.isString(o))try{return(p||JSON.parse)(o),je.trim(o)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(o)}const JN={transitional:X$e,adapter:["xhr","http","fetch"],transformRequest:[function(p,i){const r=i.getContentType()||"",a=r.indexOf("application/json")>-1,c=je.isObject(p);if(c&&je.isHTMLForm(p)&&(p=new FormData(p)),je.isFormData(p))return a?JSON.stringify(Q$e(p)):p;if(je.isArrayBuffer(p)||je.isBuffer(p)||je.isStream(p)||je.isFile(p)||je.isBlob(p)||je.isReadableStream(p))return p;if(je.isArrayBufferView(p))return p.buffer;if(je.isURLSearchParams(p))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let y;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ogi(p,this.formSerializer).toString();if((y=je.isFileList(p))||r.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return OR(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||a?(i.setContentType("application/json",!1),pgi(p)):p}],transformResponse:[function(p){const i=this.transitional||JN.transitional,r=i&&i.forcedJSONParsing,a=this.responseType==="json";if(je.isResponse(p)||je.isReadableStream(p))return p;if(p&&je.isString(p)&&(r&&!this.responseType||a)){const e=!(i&&i.silentJSONParsing)&&a;try{return JSON.parse(p,this.parseReviver)}catch(y){if(e)throw y.name==="SyntaxError"?si.from(y,si.ERR_BAD_RESPONSE,this,null,this.response):y}}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:aa.classes.FormData,Blob:aa.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};je.forEach(["delete","get","head","post","put","patch"],o=>{JN.headers[o]={}});const YN=JN,cgi=je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fgi=o=>{const p={};let i,r,a;return o&&o.split(`
|
|
88
88
|
`).forEach(function(e){a=e.indexOf(":"),i=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!(!i||p[i]&&cgi[i])&&(i==="set-cookie"?p[i]?p[i].push(r):p[i]=[r]:p[i]=p[i]?p[i]+", "+r:r)}),p},Nk=Symbol("internals");function sm(o){return o&&String(o).trim().toLowerCase()}function mA(o){return o===!1||o==null?o:je.isArray(o)?o.map(mA):String(o)}function ygi(o){const p=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(o);)p[r[1]]=r[2];return p}const hgi=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function QO(o,p,i,r,a){if(je.isFunction(r))return r.call(this,p,i);if(a&&(p=i),!!je.isString(p)){if(je.isString(r))return p.indexOf(r)!==-1;if(je.isRegExp(r))return r.test(p)}}function mgi(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(p,i,r)=>i.toUpperCase()+r)}function Tgi(o,p){const i=je.toCamelCase(" "+p);["get","set","has"].forEach(r=>{Object.defineProperty(o,r+i,{value:function(a,c,e){return this[r].call(this,p,a,c,e)},configurable:!0})})}class CR{constructor(p){p&&this.set(p)}set(p,i,r){const a=this;function c(y,m,v){const E=sm(m);if(!E)throw new Error("header name must be a non-empty string");const b=je.findKey(a,E);(!b||a[b]===void 0||v===!0||v===void 0&&a[b]!==!1)&&(a[b||m]=mA(y))}const e=(y,m)=>je.forEach(y,(v,E)=>c(v,E,m));if(je.isPlainObject(p)||p instanceof this.constructor)e(p,i);else if(je.isString(p)&&(p=p.trim())&&!hgi(p))e(fgi(p),i);else if(je.isObject(p)&&je.isIterable(p)){let y={},m,v;for(const E of p){if(!je.isArray(E))throw TypeError("Object iterator must return a key-value pair");y[v=E[0]]=(m=y[v])?je.isArray(m)?[...m,E[1]]:[m,E[1]]:E[1]}e(y,i)}else p!=null&&c(i,p,r);return this}get(p,i){if(p=sm(p),p){const r=je.findKey(this,p);if(r){const a=this[r];if(!i)return a;if(i===!0)return ygi(a);if(je.isFunction(i))return i.call(this,a,r);if(je.isRegExp(i))return i.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(p,i){if(p=sm(p),p){const r=je.findKey(this,p);return!!(r&&this[r]!==void 0&&(!i||QO(this,this[r],r,i)))}return!1}delete(p,i){const r=this;let a=!1;function c(e){if(e=sm(e),e){const y=je.findKey(r,e);y&&(!i||QO(r,r[y],y,i))&&(delete r[y],a=!0)}}return je.isArray(p)?p.forEach(c):c(p),a}clear(p){const i=Object.keys(this);let r=i.length,a=!1;for(;r--;){const c=i[r];(!p||QO(this,this[c],c,p,!0))&&(delete this[c],a=!0)}return a}normalize(p){const i=this,r={};return je.forEach(this,(a,c)=>{const e=je.findKey(r,c);if(e){i[e]=mA(a),delete i[c];return}const y=p?mgi(c):String(c).trim();y!==c&&delete i[c],i[y]=mA(a),r[y]=!0}),this}concat(...p){return this.constructor.concat(this,...p)}toJSON(p){const i=Object.create(null);return je.forEach(this,(r,a)=>{r!=null&&r!==!1&&(i[a]=p&&je.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([p,i])=>p+": "+i).join(`
|
|
89
89
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(p){return p instanceof this?p:new this(p)}static concat(p,...i){const r=new this(p);return i.forEach(a=>r.set(a)),r}static accessor(p){const r=(this[Nk]=this[Nk]={accessors:{}}).accessors,a=this.prototype;function c(e){const y=sm(e);r[y]||(Tgi(a,e),r[y]=!0)}return je.isArray(p)?p.forEach(c):c(p),this}}CR.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);je.reduceDescriptors(CR.prototype,({value:o},p)=>{let i=p[0].toUpperCase()+p.slice(1);return{get:()=>o,set(r){this[i]=r}}});je.freezeMethods(CR);const Cl=CR;function eC(o,p){const i=this||YN,r=p||i,a=Cl.from(r.headers);let c=r.data;return je.forEach(o,function(y){c=y.call(i,c,a.normalize(),p?p.status:void 0)}),a.normalize(),c}function eLe(o){return!!(o&&o.__CANCEL__)}function i0(o,p,i){si.call(this,o??"canceled",si.ERR_CANCELED,p,i),this.name="CanceledError"}je.inherits(i0,si,{__CANCEL__:!0});function tLe(o,p,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?o(i):p(new si("Request failed with status code "+i.status,[si.ERR_BAD_REQUEST,si.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function vgi(o){const p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return p&&p[1]||""}function Egi(o,p){o=o||10;const i=new Array(o),r=new Array(o);let a=0,c=0,e;return p=p!==void 0?p:1e3,function(m){const v=Date.now(),E=r[c];e||(e=v),i[a]=m,r[a]=v;let b=c,w=0;for(;b!==a;)w+=i[b++],b=b%o;if(a=(a+1)%o,a===c&&(c=(c+1)%o),v-e<p)return;const V=E&&v-E;return V?Math.round(w*1e3/V):void 0}}function bgi(o,p){let i=0,r=1e3/p,a,c;const e=(v,E=Date.now())=>{i=E,a=null,c&&(clearTimeout(c),c=null),o(...v)};return[(...v)=>{const E=Date.now(),b=E-i;b>=r?e(v,E):(a=v,c||(c=setTimeout(()=>{c=null,e(a)},r-b)))},()=>a&&e(a)]}const SA=(o,p,i=3)=>{let r=0;const a=Egi(50,250);return bgi(c=>{const e=c.loaded,y=c.lengthComputable?c.total:void 0,m=e-r,v=a(m),E=e<=y;r=e;const b={loaded:e,total:y,progress:y?e/y:void 0,bytes:m,rate:v||void 0,estimated:v&&y&&E?(y-e)/v:void 0,event:c,lengthComputable:y!=null,[p?"download":"upload"]:!0};o(b)},i)},xk=(o,p)=>{const i=o!=null;return[r=>p[0]({lengthComputable:i,total:o,loaded:r}),p[1]]},$k=o=>(...p)=>je.asap(()=>o(...p)),Agi=aa.hasStandardBrowserEnv?((o,p)=>i=>(i=new URL(i,aa.origin),o.protocol===i.protocol&&o.host===i.host&&(p||o.port===i.port)))(new URL(aa.origin),aa.navigator&&/(msie|trident)/i.test(aa.navigator.userAgent)):()=>!0,ggi=aa.hasStandardBrowserEnv?{write(o,p,i,r,a,c,e){if(typeof document>"u")return;const y=[`${o}=${encodeURIComponent(p)}`];je.isNumber(i)&&y.push(`expires=${new Date(i).toUTCString()}`),je.isString(r)&&y.push(`path=${r}`),je.isString(a)&&y.push(`domain=${a}`),c===!0&&y.push("secure"),je.isString(e)&&y.push(`SameSite=${e}`),document.cookie=y.join("; ")},read(o){if(typeof document>"u")return null;const p=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return p?decodeURIComponent(p[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Igi(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function Rgi(o,p){return p?o.replace(/\/?\/$/,"")+"/"+p.replace(/^\/+/,""):o}function iLe(o,p,i){let r=!Igi(p);return o&&(r||i==!1)?Rgi(o,p):p}const Lk=o=>o instanceof Cl?{...o}:o;function jc(o,p){p=p||{};const i={};function r(v,E,b,w){return je.isPlainObject(v)&&je.isPlainObject(E)?je.merge.call({caseless:w},v,E):je.isPlainObject(E)?je.merge({},E):je.isArray(E)?E.slice():E}function a(v,E,b,w){if(je.isUndefined(E)){if(!je.isUndefined(v))return r(void 0,v,b,w)}else return r(v,E,b,w)}function c(v,E){if(!je.isUndefined(E))return r(void 0,E)}function e(v,E){if(je.isUndefined(E)){if(!je.isUndefined(v))return r(void 0,v)}else return r(void 0,E)}function y(v,E,b){if(b in p)return r(v,E);if(b in o)return r(void 0,v)}const m={url:c,method:c,data:c,baseURL:e,transformRequest:e,transformResponse:e,paramsSerializer:e,timeout:e,timeoutMessage:e,withCredentials:e,withXSRFToken:e,adapter:e,responseType:e,xsrfCookieName:e,xsrfHeaderName:e,onUploadProgress:e,onDownloadProgress:e,decompress:e,maxContentLength:e,maxBodyLength:e,beforeRedirect:e,transport:e,httpAgent:e,httpsAgent:e,cancelToken:e,socketPath:e,responseEncoding:e,validateStatus:y,headers:(v,E,b)=>a(Lk(v),Lk(E),b,!0)};return je.forEach(Object.keys({...o,...p}),function(E){const b=m[E]||a,w=b(o[E],p[E],E);je.isUndefined(w)&&b!==y||(i[E]=w)}),i}const rLe=o=>{const p=jc({},o);let{data:i,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:c,headers:e,auth:y}=p;if(p.headers=e=Cl.from(e),p.url=Y$e(iLe(p.baseURL,p.url,p.allowAbsoluteUrls),o.params,o.paramsSerializer),y&&e.set("Authorization","Basic "+btoa((y.username||"")+":"+(y.password?unescape(encodeURIComponent(y.password)):""))),je.isFormData(i)){if(aa.hasStandardBrowserEnv||aa.hasStandardBrowserWebWorkerEnv)e.setContentType(void 0);else if(je.isFunction(i.getHeaders)){const m=i.getHeaders(),v=["content-type","content-length"];Object.entries(m).forEach(([E,b])=>{v.includes(E.toLowerCase())&&e.set(E,b)})}}if(aa.hasStandardBrowserEnv&&(r&&je.isFunction(r)&&(r=r(p)),r||r!==!1&&Agi(p.url))){const m=a&&c&&ggi.read(c);m&&e.set(a,m)}return p},Dgi=typeof XMLHttpRequest<"u",wgi=Dgi&&function(o){return new Promise(function(i,r){const a=rLe(o);let c=a.data;const e=Cl.from(a.headers).normalize();let{responseType:y,onUploadProgress:m,onDownloadProgress:v}=a,E,b,w,V,$;function M(){V&&V(),$&&$(),a.cancelToken&&a.cancelToken.unsubscribe(E),a.signal&&a.signal.removeEventListener("abort",E)}let k=new XMLHttpRequest;k.open(a.method.toUpperCase(),a.url,!0),k.timeout=a.timeout;function F(){if(!k)return;const Y=Cl.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),ee={data:!y||y==="text"||y==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:Y,config:o,request:k};tLe(function(ae){i(ae),M()},function(ae){r(ae),M()},ee),k=null}"onloadend"in k?k.onloadend=F:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(F)},k.onabort=function(){k&&(r(new si("Request aborted",si.ECONNABORTED,o,k)),k=null)},k.onerror=function(ie){const ee=ie&&ie.message?ie.message:"Network Error",de=new si(ee,si.ERR_NETWORK,o,k);de.event=ie||null,r(de),k=null},k.ontimeout=function(){let ie=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const ee=a.transitional||X$e;a.timeoutErrorMessage&&(ie=a.timeoutErrorMessage),r(new si(ie,ee.clarifyTimeoutError?si.ETIMEDOUT:si.ECONNABORTED,o,k)),k=null},c===void 0&&e.setContentType(null),"setRequestHeader"in k&&je.forEach(e.toJSON(),function(ie,ee){k.setRequestHeader(ee,ie)}),je.isUndefined(a.withCredentials)||(k.withCredentials=!!a.withCredentials),y&&y!=="json"&&(k.responseType=a.responseType),v&&([w,$]=SA(v,!0),k.addEventListener("progress",w)),m&&k.upload&&([b,V]=SA(m),k.upload.addEventListener("progress",b),k.upload.addEventListener("loadend",V)),(a.cancelToken||a.signal)&&(E=Y=>{k&&(r(!Y||Y.type?new i0(null,o,k):Y),k.abort(),k=null)},a.cancelToken&&a.cancelToken.subscribe(E),a.signal&&(a.signal.aborted?E():a.signal.addEventListener("abort",E)));const j=vgi(a.url);if(j&&aa.protocols.indexOf(j)===-1){r(new si("Unsupported protocol "+j+":",si.ERR_BAD_REQUEST,o));return}k.send(c||null)})},Ogi=(o,p)=>{const{length:i}=o=o?o.filter(Boolean):[];if(p||i){let r=new AbortController,a;const c=function(v){if(!a){a=!0,y();const E=v instanceof Error?v:this.reason;r.abort(E instanceof si?E:new i0(E instanceof Error?E.message:E))}};let e=p&&setTimeout(()=>{e=null,c(new si(`timeout ${p} of ms exceeded`,si.ETIMEDOUT))},p);const y=()=>{o&&(e&&clearTimeout(e),e=null,o.forEach(v=>{v.unsubscribe?v.unsubscribe(c):v.removeEventListener("abort",c)}),o=null)};o.forEach(v=>v.addEventListener("abort",c));const{signal:m}=r;return m.unsubscribe=()=>je.asap(y),m}},Cgi=Ogi,_gi=function*(o,p){let i=o.byteLength;if(!p||i<p){yield o;return}let r=0,a;for(;r<i;)a=r+p,yield o.slice(r,a),r=a},Vgi=async function*(o,p){for await(const i of Pgi(o))yield*_gi(i,p)},Pgi=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const p=o.getReader();try{for(;;){const{done:i,value:r}=await p.read();if(i)break;yield r}}finally{await p.cancel()}},Mk=(o,p,i,r)=>{const a=Vgi(o,p);let c=0,e,y=m=>{e||(e=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:v,value:E}=await a.next();if(v){y(),m.close();return}let b=E.byteLength;if(i){let w=c+=b;i(w)}m.enqueue(new Uint8Array(E))}catch(v){throw y(v),v}},cancel(m){return y(m),a.return()}},{highWaterMark:2})},Bk=64*1024,{isFunction:lA}=je,Ngi=(({Request:o,Response:p})=>({Request:o,Response:p}))(je.global),{ReadableStream:Gk,TextEncoder:kk}=je.global,Uk=(o,...p)=>{try{return!!o(...p)}catch{return!1}},xgi=o=>{o=je.merge.call({skipUndefined:!0},Ngi,o);const{fetch:p,Request:i,Response:r}=o,a=p?lA(p):typeof fetch=="function",c=lA(i),e=lA(r);if(!a)return!1;const y=a&&lA(Gk),m=a&&(typeof kk=="function"?($=>M=>$.encode(M))(new kk):async $=>new Uint8Array(await new i($).arrayBuffer())),v=c&&y&&Uk(()=>{let $=!1;const M=new i(aa.origin,{body:new Gk,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type");return $&&!M}),E=e&&y&&Uk(()=>je.isReadableStream(new r("").body)),b={stream:E&&($=>$.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach($=>{!b[$]&&(b[$]=(M,k)=>{let F=M&&M[$];if(F)return F.call(M);throw new si(`Response type '${$}' is not supported`,si.ERR_NOT_SUPPORT,k)})});const w=async $=>{if($==null)return 0;if(je.isBlob($))return $.size;if(je.isSpecCompliantForm($))return(await new i(aa.origin,{method:"POST",body:$}).arrayBuffer()).byteLength;if(je.isArrayBufferView($)||je.isArrayBuffer($))return $.byteLength;if(je.isURLSearchParams($)&&($=$+""),je.isString($))return(await m($)).byteLength},V=async($,M)=>{const k=je.toFiniteNumber($.getContentLength());return k??w(M)};return async $=>{let{url:M,method:k,data:F,signal:j,cancelToken:Y,timeout:ie,onDownloadProgress:ee,onUploadProgress:de,responseType:ae,headers:fe,withCredentials:ve="same-origin",fetchOptions:ue}=rLe($),ye=p||fetch;ae=ae?(ae+"").toLowerCase():"text";let Ve=Cgi([j,Y&&Y.toAbortSignal()],ie),_e=null;const xe=Ve&&Ve.unsubscribe&&(()=>{Ve.unsubscribe()});let Pe;try{if(de&&v&&k!=="get"&&k!=="head"&&(Pe=await V(fe,F))!==0){let lt=new i(M,{method:"POST",body:F,duplex:"half"}),ut;if(je.isFormData(F)&&(ut=lt.headers.get("content-type"))&&fe.setContentType(ut),lt.body){const[_t,Bt]=xk(Pe,SA($k(de)));F=Mk(lt.body,Bk,_t,Bt)}}je.isString(ve)||(ve=ve?"include":"omit");const Be=c&&"credentials"in i.prototype,Se={...ue,signal:Ve,method:k.toUpperCase(),headers:fe.normalize().toJSON(),body:F,duplex:"half",credentials:Be?ve:void 0};_e=c&&new i(M,Se);let Ue=await(c?ye(_e,ue):ye(M,Se));const He=E&&(ae==="stream"||ae==="response");if(E&&(ee||He&&xe)){const lt={};["status","statusText","headers"].forEach(Gi=>{lt[Gi]=Ue[Gi]});const ut=je.toFiniteNumber(Ue.headers.get("content-length")),[_t,Bt]=ee&&xk(ut,SA($k(ee),!0))||[];Ue=new r(Mk(Ue.body,Bk,_t,()=>{Bt&&Bt(),xe&&xe()}),lt)}ae=ae||"text";let Ye=await b[je.findKey(b,ae)||"text"](Ue,$);return!He&&xe&&xe(),await new Promise((lt,ut)=>{tLe(lt,ut,{data:Ye,headers:Cl.from(Ue.headers),status:Ue.status,statusText:Ue.statusText,config:$,request:_e})})}catch(Be){throw xe&&xe(),Be&&Be.name==="TypeError"&&/Load failed|fetch/i.test(Be.message)?Object.assign(new si("Network Error",si.ERR_NETWORK,$,_e),{cause:Be.cause||Be}):si.from(Be,Be&&Be.code,$,_e)}}},$gi=new Map,nLe=o=>{let p=o&&o.env||{};const{fetch:i,Request:r,Response:a}=p,c=[r,a,i];let e=c.length,y=e,m,v,E=$gi;for(;y--;)m=c[y],v=E.get(m),v===void 0&&E.set(m,v=y?new Map:xgi(p)),E=v;return v};nLe();const XN={http:zAi,xhr:wgi,fetch:{get:nLe}};je.forEach(XN,(o,p)=>{if(o){try{Object.defineProperty(o,"name",{value:p})}catch{}Object.defineProperty(o,"adapterName",{value:p})}});const jk=o=>`- ${o}`,Lgi=o=>je.isFunction(o)||o===null||o===!1;function Mgi(o,p){o=je.isArray(o)?o:[o];const{length:i}=o;let r,a;const c={};for(let e=0;e<i;e++){r=o[e];let y;if(a=r,!Lgi(r)&&(a=XN[(y=String(r)).toLowerCase()],a===void 0))throw new si(`Unknown adapter '${y}'`);if(a&&(je.isFunction(a)||(a=a.get(p))))break;c[y||"#"+e]=a}if(!a){const e=Object.entries(c).map(([m,v])=>`adapter ${m} `+(v===!1?"is not supported by the environment":"is not available in the build"));let y=i?e.length>1?`since :
|
|
90
90
|
`+e.map(jk).join(`
|