@elyx-code/project-logic-tree 0.0.6727 → 0.0.6728
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.js +3 -3
- 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}--${ae.InvalidParentReference}`,code:ae.InvalidParentReference,severity:fe.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}--${ae.ReferencedEntityNotFound}`,code:ae.ReferencedEntityNotFound,severity:fe.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:fe.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:fe.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=gR(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}--${ae.InvalidImplementsReference}`,code:ae.InvalidImplementsReference,severity:fe.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}--${ae.ReferencedEntityNotFound}`,code:ae.ReferencedEntityNotFound,severity:fe.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 oOe=(o=>(o.ValueAsTypeSingle="value-as-type-single",o.ValueAsTypeList="value-as-type-list",o))(oOe||{});const fi=class fi extends Ur{constructor(i,n){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=n,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)||M().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,n){const s=re(i.parent),c=n.get(s);let e=null,y=null;i.valueAsTypeList?Array.isArray(i.valueAsTypeList)&&(y=i.valueAsTypeList.map(E=>n.get(E)||n.getBuiltIn(E))):i.valueAsTypeSingle&&(e=n.get(i.valueAsTypeSingle)||n.getBuiltIn(i.valueAsTypeSingle));const m={id:i.id,version:x.UUID.uuid(),createdAt:M().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=he(m,n);return v.setParent(c,null),v}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[],e=XTi(s,n);return c.push(...e,...$r(s)),{errors:c,modifiedData:s}}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&&!lf(this.parent.parent))}validateGeneratedUpdate(i){const n=[];return i.parent&&n.push(new De({id:`${this.id}--${ae.InvalidParentUpdate}`,code:ae.InvalidParentUpdate,severity:fe.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:n,modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return n==="value-as-type-single"&&(this.valueAsTypeSingle=null,s==null||s.add(this,H.Updated)),n==="value-as-type-list"&&(this.valueAsTypeList=(this.valueAsTypeList||[]).filter(v=>v.id!==i.id),s==null||s.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return n==="value-as-type-single"&&(this.valueAsTypeSingle=i,s==null||s.add(this,H.Updated)),n==="value-as-type-list"&&(this.valueAsTypeList=[...Array.isArray(this.valueAsTypeList||[])?this.valueAsTypeList:[],i],s==null||s.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&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new fi(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 n=[],s=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),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,P]of b.knownVersions)v.set(w,P);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 fi(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(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),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 s=re(i.parent),c=this.project.get(s),e=this.parent;if(e&&e.id!==(c==null?void 0:c.id)&&this.removeFromParent(n),c)this.setParent(c,n),this.addSelfToProject(n);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${s}' that isn't found in the project`)}else if(i.standaloneParent){const s=re(i.standaloneParent),c=this.project.get(s);if(c)this.setStandaloneParent(c,n);else throw new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${s}' 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(s=>{const c=re(s),e=this.project.get(c);e&&this.addValueAsTypeToList(e,n)}),[...this.valueAsTypeList].forEach(s=>{(i.valueAsTypeList||[]).find(e=>re(e)===s.id)||this.removeValueAsTypeFromList(s,n)}),this.setValueAsTypeSingle(null,n),this.metaSync({value:null},n);else if(i.valueAsTypeSingle){const s=re(i.valueAsTypeSingle),c=this.project.get(s);c&&(this.setValueAsTypeSingle(c,n),this.setValueAsTypeList(null,n),this.metaSync({value:null},n))}else this.setValueAsTypeSingle(null,n),this.setValueAsTypeList(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],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=re(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=re(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=re(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=re(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],c=[],e=[];return this.initialized=!0,this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){var y,m;const n=[this],s=[],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(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,H.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}setStandaloneParent(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetStandaloneParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetStandaloneParent,n)?(((s=this.standaloneParent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.standaloneParent=i,n&&(n==null||n.add(this,H.Updated))),n==null||n.attemptAutoclose(_.SetStandaloneParent,this.id),this):this}addValueAsTypeToList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddValueAsTypeToList))){return this.checkCanEdit(this,n)?((this.valueAsTypeList||[]).includes(i)||(this.valueAsTypeList=this.valueAsTypeList||[],this.valueAsTypeList.push(i),this.value!==null&&this.metaSync({value:null},n),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,n==null||n.add(this,H.Updated)),n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.AddValueAsTypeToList,this.id),this):(J.Logger.warn(`[addValueAsTypeToList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddValueAsTypeToList,this.id),this)}removeValueAsTypeFromList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveValueAsTypeFromList))){return this.checkCanEdit(this,n)?(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&(this.valueAsTypeList||[]).includes(i)&&(this.valueAsTypeList=this.valueAsTypeList.filter(s=>s.id!==i.id),this.valueAsTypeList.length===0?this.valueAsTypeList=null:(this.value!==null&&this.metaSync({value:null},n),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,n==null||n.add(this,H.Updated))),n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this):(J.Logger.warn(`[removeValueAsTypeFromList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this)}setValueAsTypeSingle(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsTypeSingle))){return this.checkCanEdit(this,n)?(this.valueAsTypeSingle!==i&&(this.valueAsTypeSingle=i,n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this):(J.Logger.warn(`[setValueAsTypeSingle] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this)}setValueAsTypeList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsTypeList))){var s,c;return this.checkCanEdit(this,n)?(!i&&this.valueAsTypeList?(this.valueAsTypeList=null,n==null||n.add(this,H.Updated)):i&&!this.valueAsTypeList?(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)):i&&this.valueAsTypeList&&((s=this.valueAsTypeList)==null?void 0:s.length)!==i.length?(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)):i&&this.valueAsTypeList&&((c=this.valueAsTypeList)!=null&&c.every((e,y)=>e!==i[y]))&&(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.SetValueAsTypeList,this.id),this):(J.Logger.warn(`[setValueAsTypeList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsTypeList,this.id),this)}setValueAsType(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsType))){return this.checkCanEdit(this,n)?i?(Array.isArray(i)?this.setValueAsTypeList(i,n):this.setValueAsTypeSingle(i,n),n==null||n.attemptAutoclose(_.SetValueAsType,this.id),this):(this.setValueAsTypeSingle(null,n),this.setValueAsTypeList(null,n),this):(J.Logger.warn(`[setValueAsType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsType,this.id),this)}initChildren(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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(n=>{if(n.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(n);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.entityType}' with id '${n.entityId}' that is not part of the project state.`);return c}const s=this.project.get(n.id);if(!s)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.type}' with id '${n.id}' that is not part of the project state.`);return s});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const s=this.project.findSubscribedBuiltInInstanceFromReference(this.initialData.valueAsTypeSingle);if(!s)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=s,this}const n=this.project.get(this.initialData.valueAsTypeSingle.id);if(!n)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=n}return this}if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(n=>{if(n.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(n);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.entityType}' with id '${n.entityId}' that is not part of the project state.`);return c}const s=this.project.get(n.id);if(!s)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.type}' with id '${n.id}' that is not part of the project state.`);return s});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const s=re(this.initialData.valueAsTypeSingle),c=s?this.project.get(s):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 n=this.project.get(this.initialData.valueAsTypeSingle.id);if(!n)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=n}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,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=Mr(this,i,n),c=Lr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.autogeneration=s.autogeneration!==void 0?s.autogeneration:e.autogeneration,this.value=s.value!==void 0?s.value:e.value,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,H.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,H.Added):c&&(n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=ke,...n){return await fi.repository.APILoad(this.id,...n),this}async APICreate(i=ke,...n){return await fi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=ke,...n){return await fi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=ke,...n){return await fi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=ke,...n){return await fi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=ke,n,...s){return await fi.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],c=[],e=[];return this.parent&&(this.parent.type===d.DataType?this.parent.setEntity(null,i):BA.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(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:rr.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.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},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],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);s.push(...m),c.push(...v),n.push(...E)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),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(s=>s.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(s=>s.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 n,s,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:((n=this.valueAsTypeSingle)==null?void 0:n.toJSON(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(e=>e.toJSON(i)):null,parent:(s=this.parent)==null?void 0:s.toReference(),standaloneParent:(c=this.standaloneParent)==null?void 0:c.toReference()})}toJSONClone(i=ct){var s,c,e,y,m,v,E;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().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=ct){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=ct){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,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(s=>s.toFlatJSON(i)):[]])}toGenerationTarget(){var i,n,s;return{id:this.id,type:this.type,name:this.name,valueAsTypeSingle:((i=this.valueAsTypeSingle)==null?void 0:i.id)||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(c=>c.id):null,value:this.value,autogeneration:this.autogeneration,parent:(n=this.parent)==null?void 0:n.id,standaloneParent:(s=this.standaloneParent)==null?void 0:s.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(s=>s.toFlatGenerationTarget(i)):[]])}clearErrors(){return this.errors=[],this}validate(){return this.errors=lOe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await sOe(this,{tracker:n}),{success:!0}}getErrors(){return[...this.errors]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];return await n.tick(),s}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){const e=Nr(n,this),y=this.toJSON(),m=s||x.UUID.uuid();y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||M().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0;const v=Ki(y,e);return v.hydrateAncestors(),n&&v.setParent(n,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,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"merge-literal-value"))){const s=[],c=[],e=[],y=[];return this.valueAsTypeSingle!==(i==null?void 0:i.valueAsTypeSingle)&&(this.setValueAsType(i.valueAsTypeSingle,n),s.push(this)),this.valueAsTypeList!==i.valueAsTypeList&&(this.setValueAsTypeList(i.valueAsTypeList,n),s.push(this)),this.value!==i.value&&(this.metaSync({value:i.value},n),s.push(this)),this.autogeneration!==i.autogeneration&&(this.metaSync({autogeneration:i.autogeneration},n),s.push(this)),this.name!==i.name&&(this.metaSync({name:i.name},n),s.push(this)),n==null||n.attemptAutoclose("merge-literal-value",this.id),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:this}}};I(fi,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(fi,"type",d.LiteralValue),I(fi,"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(fi,"PARENT_TYPES",[...fi.USER_MANAGED_PARENT_TYPES]),I(fi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(fi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(fi,"BASE_PROPERTIES",[...fi.MUTABLE_BASE_PROPERTIES,...fi.INMUTABLE_BASE_PROPERTIES]),I(fi,"MUTABLE_META_PROPERTIES",[...fi.MUTABLE_BASE_PROPERTIES]),I(fi,"INMUTABLE_META_PROPERTIES",[...fi.INMUTABLE_BASE_PROPERTIES]),I(fi,"META_PROPERTIES",[...fi.MUTABLE_META_PROPERTIES,...fi.INMUTABLE_META_PROPERTIES]),I(fi,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(fi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(fi,"UPSTREAM_PROPERTIES",[...fi.MUTABLE_UPSTREAM_PROPERTIES,...fi.INMUTABLE_UPSTREAM_PROPERTIES]),I(fi,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(fi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(fi,"DOWNSTREAM_PROPERTIES",[...fi.MUTABLE_DOWNSTREAM_PROPERTIES,...fi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(fi,"PROPERTIES",[...fi.META_PROPERTIES,...fi.UPSTREAM_PROPERTIES,...fi.DOWNSTREAM_PROPERTIES]);let Xr=fi;function Xc(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 dOe(o,p){const i=p-o,n=jI()*i;return Math.floor(n)+o}function uOe(){const o=Xc(4);return o[0]<<24>>>0|o[1]<<16|o[2]<<8|o[3]}function jI(){return uOe()/2**32}function $V(o){const p=Xc(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const FO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function LV(o){let p="";const i=Xc(o);for(let n=0;n<o;n++)p+=FO[i[n]%FO.length];return p}function pOe(o){const p=Xc(o);let i;if(typeof Buffer<"u")i=Buffer.from(p).toString("base64");else{const n=String.fromCharCode(...p);i=btoa(n)}return i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function MV(o){return LV(o)}function BV(o,p=FO){let i="";const n=Xc(o);for(let s=0;s<o;s++)i+=p[n[s]%p.length];return i}function Iu(){const o=Xc(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.substr(0,8),p.substr(8,4),p.substr(12,4),p.substr(16,4),p.substr(20,12)].join("-")}function cOe(){return BV(6)}function fOe(){return $V(32)}const QTi=63,evi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function tvi(o){return o.length>=1&&o.length<=QTi&&evi.test(o)&&!o.includes("--")}function*ivi(){yield"";const o="abcdefghijklmnopqrstuvwxyz";for(let p=1;;p++){const i=new Array(p).fill(0);let n=!1;for(;!n;){yield i.map(s=>o[s]).join("");for(let s=p-1;s>=0&&(i[s]++,!(i[s]<o.length));s--)i[s]=0,s===0&&(n=!0)}}}function rvi(o,p){const i=new Set(o.map(s=>s.toLowerCase())),n=p>0?"secondary-db":"main";for(const s of ivi()){const c=s?`${n}-${s}`:n;if(tvi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function yOe(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)),n=i.find(m=>{const v=m.properties.find(w=>w.implements.find(P=>P.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(!n&&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:le.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=he(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(n)return{newEntities:[]};const s=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=UI(s,"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:le.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=he(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 hOe(o,p){const i=[],n=[],s=[],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 P=o.project.entities.filter(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=P.find(q=>!!q.properties.find(X=>{var ne;return X.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((ne=X.getDefaultValue())==null?void 0:ne.value)===!0}));if(!$&&P.length)$=P[0];else if(!$&&!P.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const X=$.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=X==null?void 0:X.defaultValue)==null||m.metaSync({value:!0},p),n.push($)}const L=o.properties.find(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(L&&!(L!=null&&L.defaultValue)){const q={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:le.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:L==null?void 0:L.toReference()},X=he(q,o.project);X.hydrateAncestors(),X.setParent(L,p),X.addSelfToProject(p),p==null||p.add(X,H.Added),X.initChildren(p),(L==null?void 0:L.defaultValue).setValueAsTypeSingle($||null,p),n.push(X);return}else L!=null&&L.defaultValue&&!(L!=null&&L.defaultValue.valueAsTypeSingle)&&(L==null||L.defaultValue.setValueAsTypeSingle($||null,p));const j=o.properties.find(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!j)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!j.dataType){const q=ir.new(p);q.parent=j.toReference();const X=he(q,o.project);X.hydrateAncestors(),X.setParent(j,p),X.addSelfToProject(p),p==null||p.add(X,H.Added),X.initChildren(p)}const F=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=j.dataType)==null||v.setEntity(F,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const P=o.project.entities.filter(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&ne.id!==o.id),$=P.map(ne=>{var oe;const ee=ne.properties.find(ce=>ce.implements.find(Te=>Te.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(oe=ee==null?void 0:ee.getDefaultValue())==null?void 0:oe.value}).filter(ne=>!!ne),L=o.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!P.find(ne=>!!ne.properties.find(ee=>{var pe;return ee.implements.find(oe=>oe.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((pe=ee.getDefaultValue())==null?void 0:pe.value)===!0}))){const ne=o.properties.find(ee=>ee.implements.find(pe=>pe.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!ne)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(ne!=null&&ne.defaultValue)){const ee=Xr.new(p);ee.parent=ne.toReference();const pe=he(ee,o.project);pe.hydrateAncestors(),pe.setParent(ne,p),pe.addSelfToProject(p),p==null||p.add(pe,H.Added),pe.initChildren(p)}(E=ne==null?void 0:ne.defaultValue)==null||E.metaSync({value:!0},p)}if(!L)throw new Error("Identifier property not found for relational database entity with id: "+o.id);if(!(L!=null&&L.defaultValue)){const ne=Xr.new(p);ne.parent=L.toReference();const ee=he(ne,o.project);ee.hydrateAncestors(),ee.setParent(L,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const F=rvi($,P.length);(b=L.defaultValue)==null||b.metaSync({value:F},p);const q=o.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!q)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(!q.defaultValue){const ne=Xr.new(p);ne.parent=q.toReference();const ee=he(ne,o.project);ee.hydrateAncestors(),ee.setParent(q,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),n.push(ee)}const X=MV(24);(w=q.defaultValue)==null||w.metaSync({value:X},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const P=o.properties.find(F=>F.implements.find(q=>q.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!P)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 $=P.defaultValue||null;if(!$){const F=Xr.new(p);F.parent=P.toReference(),F.name=le.Date,F.id=x.UUID.uuid(),$=he(F,o.project),$.hydrateAncestors(),$.setParent(P,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),P.metaSync({editable:!1,deletable:!1},p);const L=o.properties.find(F=>F.implements.find(q=>q.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id));if(!L)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 j=L.defaultValue||null;if(!j){const F=Xr.new(p);F.name=le.EntityTemplate,F.parent=L.toReference(),F.id=x.UUID.uuid(),j=he(F,o.project),j.hydrateAncestors(),j.setParent(L,p),j.addSelfToProject(p),j.initChildren(p),p==null||p.add(j,H.Added)}}}}),{self:o,updated:D(i),added:D(n),removed:D(s),affected:D(c)}}function UI(o,p,i,n){const s=n||x.UUID.uuid(),c=us.new(i);c.id=s,c.name=p,c.static=o.static,c.implements=[o.toJSON()],c.parent=o.project.toReference(),c.static=o.static,yOe(o,i);const e=he(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),hOe(e,i),e.afterAllChildrenInitialized(i),e}function GV(o,p){return p.entities.find(s=>{const c=s.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 mOe(o,p,i,n=He.OrDataTypeGroup){const s=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ir.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=n;const E=he(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(s),added:D(c),removed:D(e),affected:D(y),self:E}}function kV(o,p,i,n,s){var v,E,b,w,P,$,L,j;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let F=!1;const q=new Date(o);if(q instanceof Date&&!isNaN(q.valueOf())&&(F=!0),F){const X=p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Date].id);p.setEntity(X,n);break}else{const X=p.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id);p.setEntity(X,n);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},n),o.length>0){const X=o.slice(0,5).filter(ee=>ee!==void 0);if(X.every(ee=>typeof ee==typeof X[0])&&(typeof X[0]!="object"||X[0]===null))switch(typeof X[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id),n);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}else{const ee=[];let pe=!1;X.forEach(ce=>{var Te,de,ye,_e;if(Array.isArray(ce)&&(pe=!0),typeof ce=="object"&&!Array.isArray(ce)&&ce!==null){const Pe=Gb(ce,p.project,{...i,id:x.UUID.uuid()},n,s);Pe.hasCreated&&ee.push((Te=Pe.changeSet)==null?void 0:Te.self),c.push(...(de=Pe.changeSet)==null?void 0:de.updated),e.push(...(ye=Pe.changeSet)==null?void 0:ye.added),y.push(...(_e=Pe.changeSet)==null?void 0:_e.removed)}});const oe=D(ee);if(!oe.length&&!pe){X.forEach(ce=>{const Te=ir.new(n);Te.parentRelationType=He.OrDataTypeGroup,Te.parent=p.toReference();const de=he(Te,p.project);switch(de.setParent(p,n),de.initChildren(n),n==null||n.add(de,H.Added),de.addSelfToProject(n),typeof ce){case"string":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id),n);break;case"number":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}});break}else oe.length===1&&!pe?p.setEntity(oe[0],n):X.forEach(ce=>{if(typeof ce=="object"&&!Array.isArray(ce)&&ce!==null){const Te=GV(Object.keys(ce),p.project);if(Te){const de=mOe(Te||oe[0],p,n,He.OrDataTypeGroup);c.push(...de.updated),e.push(...de.added),y.push(...de.removed)}}else{const Te=ir.new(n);Te.parentRelationType=He.OrDataTypeGroup,Te.parent=p.toReference();const de=he(Te,p.project);de.setParent(p,n),de.initChildren(n),n==null||n.add(de,H.Added),de.addSelfToProject(n);const ye=kV(ce,de,{...i,id:x.UUID.uuid()},n,s);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const X=Gb(o[0],p.project,{...i},n,s);p.setEntity((v=X.changeSet)==null?void 0:v.self,n),c.push(...(E=X.changeSet)==null?void 0:E.updated),e.push(...(b=X.changeSet)==null?void 0:b.added),y.push(...(w=X.changeSet)==null?void 0:w.removed);break}else{const X=Gb(o,p.project,{...i},n,s);p.setEntity((P=X.changeSet)==null?void 0:P.self,n),c.push(...($=X.changeSet)==null?void 0:$.updated),e.push(...(L=X.changeSet)==null?void 0:L.added),y.push(...(j=X.changeSet)==null?void 0:j.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function Gb(o,p,i,n,s){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=GV(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=s?i.name+" of "+s.name:i.name,P={id:i.id||x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(n==null?void 0:n.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()},$=he(P,p);return $.setParent(p,n),$.initChildren(n),n==null||n.add($,H.Added),$.addSelfToProject(n),e.push($),v.forEach((L,j)=>{const F=x.UUID.uuid(),q=ja.new(n);q.id=F,q.name=L,q.codeName=L,q.parent=$.toReference(),q.index=j,q.required=!0,q.interactive=!0;const X=he(q,p);X.setParent($,n),X.initChildren(n),n==null||n.add(X,H.Added),X.addSelfToProject(n),e.push(X);const ne=o[L],ee=x.UUID.uuid(),pe=ir.new(n);pe.id=ee,pe.parent=X.toReference(),pe.like=!0,pe.isList=!1;const oe=he(pe,p);oe.setParent(X,n),oe.initChildren(n),n==null||n.add(oe,H.Added),oe.addSelfToProject(n),e.push(oe);const ce=kV(ne,oe,{...i,name:L,id:x.UUID.uuid()},n,s||$);c.push(...ce.updated),e.push(...ce.added),y.push(...ce.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function ud(o,p,i,n){const s=[];return!o.length||!p.length?{errors:s,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 Bi({id:c.id+"--"+e.id+"--"+n,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:fe.Error,code:n,entity:c,firstRelationship:e});s.push(m)}if(y){const m=new Bi({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:fe.Error,code:i,entity:c,firstRelationship:y});s.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(P=>P.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new Bi({id:e.id+"--"+c.id+"--"+n,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:fe.Error,code:n,entity:e,firstRelationship:c});s.push(v)}if(y){const v=new Bi({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)?Ot(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:fe.Error,code:i,entity:y,firstRelationship:c});s.push(v)}}),{errors:s,overlap:!!s.length})}function nvi(o,p){return o.abstract||(o.properties.forEach(n=>{n.abstract||n.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(n=>{n.field===FN.EntityField&&n.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function avi(o,p){return o.abstract&&(o.properties.forEach(n=>{n.abstract&&n.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(n=>{(n.field===gA.Implements||n.field===gA.Extends)&&n.entity.onDetachedDependencyRemoved(o,n.field,p)}),o.metaSync({abstract:!1},p)),o}function svi(o,p){return o.static||(o.properties.forEach(n=>{n.static||n.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function lvi(o,p){return o.static&&o.metaSync({static:!1},p),o}const km=class km extends _V{constructor(i,n){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||n,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(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=he(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=he(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...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(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...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([...n])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type===d.PrimitiveEntity?i:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==d.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...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(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...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.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=ke,...n){return await km.repository.APILoad(this.id,...n),this}toFlat(i=new Set){var s;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)),...((s=this.extends)==null?void 0:s.toFlat(i))||[]])}toFlatIds(i=new Set){var s;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)),...((s=this.extends)==null?void 0:s.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 n,s,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:((n=this.additionalPropertiesDataType)==null?void 0:n.toJSON(i))||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.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=ct){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=ct){var n,s,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:((n=this.additionalPropertiesDataType)==null?void 0:n.toReference())||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.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 s,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)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(){var i;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:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){var s,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)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=JTi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await zTi(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:n});s.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),null,!0,"implement-built-in-base-entity")),s){const c=UI(this,i,n,s);return n==null||n.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((n=this.extends)==null?void 0:n.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 km&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(km,"repository",{APILoad:async(i,...n)=>null});let No=km;class TOe extends No{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(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.methods=this.initialData.methods.map(n=>{const s=he(n,this.project);return s.parent=this,s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=he(n,this.project);return s.parent=this,s}),this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project))}}var sa=(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))(sa||{});function jV(o,p){const i=[],n=p;if(!n)return{errors:i,override:p};if(typeof n!="string")return{errors:[],override:p};if(n.includes(" ")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s/g,"-")}}function vOe(o,p){const i=[],n=p;if(!n)return{errors:i,override:p};if(typeof n!="string")return{errors:[],override:p};if(n.includes(" ")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}if(n.includes("-")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s|-/g,"_")}}var xo=(o=>(o.StatusCodeMustBeNumber="status-code-must-be-number",o.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",o))(xo||{});function EOe(o,p){const i=[];if(typeof p!="number"){const n=new Bi({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:fe.Error,code:"status-code-must-be-number",entity:o});return i.push(n),{errors:i,override:p}}if(p<100){const n=new Bi({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:fe.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}if(p>599){const n=new Bi({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:fe.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}return{errors:i,override:p}}class bOe extends No{constructor(i){var e,y;super(xa,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",xa.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",xa.abstract);I(this,"static",xa.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=xa,this.project=i,this.id=xa.id,this.version=xa.version,this.name=xa.name,this.static=xa.static,this.abstract=xa.abstract,this.properties=this.initialData.properties.map(m=>{const v=he(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=he(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=he(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project));const n=this.properties.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!n)throw new Error("Path property not found in endpoint entity");n._codeNativeValueValidation=(m,v)=>{const E=jV(m,v);if(m.project.entities.filter(w=>Zi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const P=w.properties.find(j=>j.implements.find(F=>F.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!P)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=P.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new Bi({id:m.id+"--"+sa.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:fe.Error,code:sa.MustBeUniqueAmongSameEntities,entity:m});E.errors.push(w)}return E};const s=this.abstractMethods.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!s)throw new Error("Handler method not found in endpoint entity");const c=(((y=(e=s.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)=>EOe(m,v)}}class AOe extends Li{constructor(i){super(go,i);I(this,"id",ji.Parallel);I(this,"name",ji.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=go.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(go.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=go.error?he(go.error,this.project):null}}class gOe extends Li{constructor(i){super(rs,i);I(this,"id",rs.id);I(this,"name",rs.name);I(this,"description",rs.description);I(this,"version",rs.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=rs.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(rs.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=rs.error?he(rs.error,this.project):null}}class IOe extends Li{constructor(i){super(bu,i);I(this,"id",ji.Sequential);I(this,"name",ji.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=bu.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(bu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=bu.error?he(bu.error,this.project):null}}var Ba=(o=>(o.UUIDMustBeString="uuid-must-be-string",o.UUIDMustBeValidFormat="uuid-must-be-valid-format",o.UUIDMustNotContainSpaces="uuid-must-not-contain-spaces",o))(Ba||{});function ovi(o,p){const i=[];if(typeof p!="string"){const s=new Bi({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:fe.Error,code:"uuid-must-be-string",entity:o});return i.push(s),{errors:i,override:p}}const n=jV(o,p);if(n.errors.length>0)return i.push(...n.errors),{errors:i,override:p};if(!CV(p)){const s=new Bi({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:fe.Error,code:"uuid-must-be-valid-format",entity:o});i.push(s)}return{errors:i,override:p}}var Ve=(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))(Ve||{});const ROe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function dvi(o,p){return{...ROe,id:o,project:p}}class _m{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 n;if(!((n=this.project)!=null&&n.id)||this.initialized)return;const p={},i={};Object.keys(p).forEach(s=>{const c=p[s],e=new Xr(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[s]=e;const y=e.parent||e.standaloneParent,m=OOe(e,y,this.project);m?i[s]=m:delete p[s]}catch(y){J.Logger.error("Error hydrating ancestors: ",y),delete p[s]}}),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 s=this.values[p.id];if(!s)if(i instanceof Xr)s=i;else if(i)s=Ki(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:yc(p.getDataType(null))};s=Ki(c,this.project)}s.standalone=!0,s.initialData.standaloneParent||J.Logger.warn("instance.initialData: ",s.initialData),s.setStandaloneParent(p,null),s.hydrateAncestors(),s.initChildren(null),i&&(s.metaSync({...i},null),s.setValueAsType(i.valueAsType,null)),this.values[p.id]=s,this.onWriteCallback(p,s)}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 vr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function DOe(o){if(Array.isArray(o))return o.map(m=>typeof m=="number"?m:e(m)?Number(m):String(m));const p=[];let i=0,n="",s=!1,c=null;for(;i<o.length;){const m=o[i];if(m==="."&&!s){n.length&&(p.push(y(n)),n=""),i++;continue}if(m==="["&&!s){n.length&&(p.push(y(n)),n=""),s=!0,i++;continue}if(s){if(!c&&(m==='"'||m==="'")){c=m,i++;continue}if(c){if(m==="\\"&&i+1<o.length){n+=o[i+1],i+=2;continue}if(m===c){c=null,i++;continue}n+=m,i++;continue}if(m==="]"){p.push(y(n)),n="",s=!1,i++;continue}if(/\s/.test(m)&&!c){i++;continue}n+=m,i++;continue}n+=m,i++}return n.length&&p.push(y(n)),p;function e(m){return/^[0-9]+$/.test(m)}function y(m){const v=m.trim();return e(v)?Number(v):v}}function UV(o,p,i){if(o==null)return i;const n=DOe(p);let s=o;for(let c=0;c<n.length;c++){const e=n[c];if(s==null)return i;if(Array.isArray(s)&&typeof e=="number"){if(!(e in s))return i;s=s[e]}else{if(!Object.prototype.hasOwnProperty.call(s,e))return i;s=s[e]}}return s}const uvi=new Set(["__proto__","prototype","constructor"]);function pvi(o){return typeof o=="string"&&uvi.has(o)}function wOe(o,p,i,n){const{createMissing:s=!0,coerce:c=!0}=n??{};if(o==null||typeof o!="object")throw new TypeError("set(...) expects a non-null object as target.");const e=DOe(p);if(e.length===0)throw new Error("set(...) path must not be empty.");let y=o;for(let m=0;m<e.length;m++){const v=e[m];if(pvi(v))throw new Error(`Refusing to set unsafe key "${String(v)}" on object.`);const E=m===e.length-1,w=typeof e[m+1]=="number",P=Array.isArray(y)&&typeof v=="number";if(E){if(P&&y[v]==null&&!s)throw new Error(`set(...) missing array index "${String(v)}" (createMissing=false).`);return y[v]=i,o}else{if(!Object.prototype.hasOwnProperty.call(y,v)||y[v]==null){if(!s)throw new Error(`set(...) missing parent at segment "${String(v)}" (createMissing=false).`);y[v]=w?[]:{}}else{const $=y[v],L=$!==null&&typeof $=="object",j=Array.isArray($);if(w){if(!j){if(!c)throw new Error(`set(...) expected an array at "${String(v)}" but found non-array (coerce=false).`);y[v]=[]}}else if(!L||j){if(!c)throw new Error(`set(...) expected an object at "${String(v)}" but found non-object (coerce=false).`);y[v]={}}}y=y[v]}}return o}function rv(o){return globalThis.structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o))}function cvi(o){if(Array.isArray(o))return o.slice();const p=[];let i="",n=0;for(;n<o.length;){const s=o[n];if(s==="."||s==="["||s==="]"){if(i.length){const c=Number(i);p.push(!Number.isNaN(c)&&/^\d+$/.test(i)?c:i),i=""}if(s==="["){n++;let c="";for(;n<o.length&&o[n]!=="]";)c+=o[n++];const e=Number(c);p.push(!Number.isNaN(e)&&/^\d+$/.test(c)?e:c)}n++;continue}i+=s,n++}if(i.length){const s=Number(i);p.push(!Number.isNaN(s)&&/^\d+$/.test(i)?s:i)}return p}function KV(o,p,i){const n=cvi(p);if(n.length===0)throw new Error("Path must not be empty.");const s=n[n.length-1];let c=o;for(let e=0;e<n.length-1;e++){const y=n[e],m=typeof n[e+1]=="number",v=c==null?void 0:c[y];if(v==null){if(!i)throw new Error(`Missing parent at segment "${String(y)}" for path "${Array.isArray(p)?JSON.stringify(p):p}".`);c[y]=m?[]:{}}else if(typeof v!="object"||v!==null&&Array.isArray(v)!==m&&typeof n[e+1]=="number"){if(!i)throw new Error(`Parent at "${String(y)}" is not a container suitable for continuing the path.`);c[y]=m?[]:{}}c=c[y]}return{target:c,lastKey:s}}function Jl(o,p,i,n){var y;let s;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case le.EntityTemplate:s=le.EntityTemplate;break;case le.String:s=le.String;break;case le.Number:s=le.Number;break;case le.Boolean:s=le.Boolean;break;case le.Null:s=le.Null;break;case le.Enum:s=le.Enum;break;case le.KeyValue:s=le.KeyValue;break;case le.Untyped:s=le.Untyped;break;case le.KeyValue:s=le.KeyValue;break;case le.Date:s=le.Date;break;case le.UUID:s=le.UUID;break;case le.File:s=le.File;break;case le.Void:s=le.Void;break;case le.ActionDescriptor:s=le.ActionDescriptor;break;case le.Bytes:s=le.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else s=le.Untyped;const c=Xr.new(n);c.name=s,c.parent=p.toReference();const e=he(c,i);return e.hydrateAncestors(),n==null||n.add(e,H.Added),e.addSelfToProject(n),e.initChildren(n),e}function Oo(o,p,i=new Set){var n,s,c;if(i.has(o.id))return[];if(i.add(o.id),qt.includes(o.type)){const e=Wn(o);return D([e,...[e].flatMap(y=>Oo(y,p,i))])}else if(o.type===d.OutputMap){if(qt.includes(o.parent.type)&&((n=o.declaration)==null?void 0:n.type)===d.Property&&o.declaration.static)return D([o,o.declaration,...[o,o.declaration].flatMap(e=>Oo(e,p,i))])}else if(o.type===d.InputMap&&qt.includes(o.parent.type)&&((s=o.declaration)==null?void 0:s.type)===d.Property&&(c=o.declaration)!=null&&c.static)return D([o.declaration,...[o.declaration].flatMap(e=>Oo(e,p,i))]);return[o]}function OOe(o,p,i){return o}function xh(o,p,i=!1){const n=o.readsValue;let s=null;const c=$u(n,p,i);if(c){const e={sources:[c],target:o};s={value:c.value,valueOwner:o,type:Ve.Inherited,inheritanceLink:e}}return s}function vt(o,p,i){var y;if(!p)return null;let n;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case le.EntityTemplate:n=le.EntityTemplate;break;case le.String:n=le.String;break;case le.Number:n=le.Number;break;case le.Boolean:n=le.Boolean;break;case le.Null:n=le.Null;break;case le.Enum:n=le.Enum;break;case le.KeyValue:n=le.KeyValue;break;case le.Untyped:n=le.Untyped;break;case le.KeyValue:n=le.KeyValue;break;case le.Date:n=le.Date;break;case le.UUID:n=le.UUID;break;case le.File:n=le.File;break;case le.Void:n=le.Void;break;case le.ActionDescriptor:n=le.ActionDescriptor;break;case le.Bytes:n=le.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else n=le.Untyped;if(!i.get(p.id))return null;const c=Xr.new(null);c.name=n,c.standaloneParent=p.toReference();let e=new Xr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function COe(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(e=p.localTestValues)==null?void 0:e.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:null}}function kb(o,p,i,n=!1){var e,y;const s={...o},c=p.type===d.VariableDeclaration?p.inputs:St.includes(p.type)?p.outputs:[];if(!c||c.length===0)return s;for(const m of c){if(!Nv(m))continue;const v=Km(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||qi(E);s[b]=Pr((v==null?void 0:v.value)||null)?s[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function Pm(o,p,i,n=!1){var e,y;const s={...o},c=p.inputs;if(!c)return s;for(const m of c){if(!Nv(m))continue;const v=av(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||qi(E);s[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function _Oe(o,p,i=!1){var E,b,w,P,$,L,j,F;let n={};if(((b=(E=o.getDataType(null))==null?void 0:E.entity)==null?void 0:b.type)===d.DefinitionEntity&&(n={...n,...((w=o.getDataType(null))==null?void 0:w.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const q=(P=p.lastExecutionResults)==null?void 0:P.readValue(o.id);if(q){if(vr(q.value)){const ne={...n,...q.value},ee={...Pm(ne,o,p,i)};q.metaSync({value:ee},null)}return{value:q,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}}const s=!!(($=p.execution)!=null&&$.entities.length),c=(L=p.execution)==null?void 0:L.hasEntity(o),e=o.readsValue;let y=null;if(e){const q=(j=p.execution)==null?void 0:j.hasEntity(e);if((!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i),y&&y.value&&vr(y.value.value))){const ne={...n,...y.value.value},ee={...Pm(ne,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const q=m;if(q&&q.value===null&&q.autogeneration){const X=xR(q);if(q.metaSync({value:X},null),vr(X)){const ne={...Pm(X,o,p,i)};q.metaSync({value:ne},null)}}(i||v===null||v!==Ve.Testing)&&(y={value:q,valueOwner:o,type:Pr(q)?o.readsValue?Ve.Inherited:Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const q=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(q){if(vr(q.value)){const X={...n,...q.value},ne={...Pm(X,o,p,i)};q.metaSync({value:ne},null)}return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}}return Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function FV(o,p,i=!1){var e,y,m,v,E,b,w,P,$;let n={};if(((y=(e=o.getDataType(null))==null?void 0:e.entity)==null?void 0:y.type)===d.DefinitionEntity&&(n={...n,...((m=o.getDataType(null))==null?void 0:m.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const L=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(L){if(vr(L.value)){const F={...n,...L.value},q=kb(F,o,p,i);L==null||L.metaSync({value:q},null)}return{value:L,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}}const s=(E=p.localTestValues)==null?void 0:E.readValue(o.id),c=p.getValueTypePreference(o.id);if(s&&!i&&(c===null||c!==Ve.DefaultValue)){if(vr(s.value)){const j={...n,...s.value},F=kb(j,o,p,i);s.metaSync({value:F},null)}return{value:s,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((P=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:P.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const L=vt(o.dataType,o,p.project),j=kb(n,o,p,i);return L==null||L.metaSync({value:j},null),{value:L,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}}return null}function nv(o,p,i=!1){var E,b,w,P,$;if((E=o.dataType)!=null&&E.isObject())return _Oe(o,p,i);const n=si(o),s=!!((b=p.execution)!=null&&b.entities.length),c=(w=p.execution)==null?void 0:w.hasEntity(n),e=o.readsValue;let y=null;if(e){const L=(P=p.execution)==null?void 0:P.hasEntity(e);(!s||s&&L&&c||s&&!L&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const L=m;if(L&&L.value===null&&L.autogeneration){const j=xR(L);L.metaSync({value:j},null)}(i||v===null||v!==Ve.Testing)&&(y={value:L,valueOwner:o,type:Pr(L)?o.readsValue?Ve.Inherited:Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}return Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function SV(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return FV(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(m=p.localTestValues)==null?void 0:m.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:nv(o,p,i)}function qV(o,p,i=!1){var b,w,P,$;const n=!!((b=p.execution)!=null&&b.entities.length),s=(w=p.execution)==null?void 0:w.hasEntity(o);let c=null;const e=o.readsValue;if(e){const L=(P=p.execution)==null?void 0:P.hasEntity(e);(!n||n&&L&&s||n&&!L&&!s)&&(c=xh(o,p,i))}const y=o.declaration;if(!c&&y){const L=nv(y,p);L&&L.value&&(c=L)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Ve.DefaultValue||c.type===Ve.External)&&!i||m===null||m!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const v=Xd(o);return v&&s&&!c?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:s&&!v&&Pr((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Ve.External,inheritanceLink:null}}function POe(o,p,i=!1){return SV(o.declaration,p,i)}function VOe(o,p,i=!1){var b,w,P,$;if(!i&&p.execution&&p.execution.hasEntity(o)){const L=(b=p.lastExecutionResults)==null?void 0:b.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=si(o),s=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((w=p.execution)!=null&&w.hasEntity(n))||!!s&&!!((P=p.execution)!=null&&P.hasEntity(s));let e=null;const y=o.getDefaultValue(),m=p.getValueTypePreference(o.id);if(y){const L=y||null;if(L&&L.value===null&&L.autogeneration){const j=xR(L);L.metaSync({value:j},null)}(i||m===null||m!==Ve.Testing)&&(e={value:L,valueOwner:o,type:Pr(L)?Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Ve.DefaultValue||e.type===Ve.External)&&!i||m===null||m!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id),j=p.getValueTypePreference(o.id);if(L&&!i&&(j===null||j!==Ve.DefaultValue))return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const v=Xd(o);let E=v&&c&&!e;return n.type===d.Loop&&c&&(E=!1),E?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:c&&!v&&Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Ve.External,inheritanceLink:null}}function ZV(o,p,i=!1){var w,P,$,L,j,F;if((w=o.getDataType(null))!=null&&w.isObject())return FV(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const q=(P=p.lastExecutionResults)==null?void 0:P.readValue(o.id);if(q)return{value:q,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=si(o),s=!!(($=p.execution)!=null&&$.entities.length),c=(L=p.execution)==null?void 0:L.hasEntity(n),e=o.readsValue;let y=null;if(e){const q=(j=p.execution)==null?void 0:j.hasEntity(e);(!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const q=m;(i||v===null||v!==Ve.Testing)&&(y={value:q,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const q=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(q)return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const E=Xd(o);return E&&!y?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:!E&&Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function NOe(o,p,i=!1){var y,m,v,E,b,w,P,$,L,j,F,q,X;if(p.execution&&p.execution.hasEntity(o)&&!i){const ne=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(ne)return{value:ne,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=Py(o);if(hy.includes(n.type)){const ne=$u(n,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||qi(se(o,p.project));if(ne!=null&&ne.value&&vr(ne.value.value)){const pe=ne.value.value[ee],oe=vt(o.getDataType(null),o,p.project);return oe==null||oe.metaSync({value:pe},null),{value:oe,valueOwner:o,type:ne.type,inheritanceLink:{sources:[ne],target:o}}}return null}const s=(v=p.execution)==null?void 0:v.hasEntity(n),c=((E=p.execution)==null?void 0:E.state)===lN.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!s&&!c&&!i){const ne=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((ne==null?void 0:ne.value)!==null||(ne==null?void 0:ne.valueAsType)!==null)return{value:ne,valueOwner:o,type:Ve.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=qV(e,p,i);if(ee&&ee.value){const oe=o.declaration;if(vr(ee.value.value)){const ce=ee.value.value[oe.name],Te=vt(((P=o.declaration)==null?void 0:P.dataType)||null,o,p.project);return Te==null||Te.metaSync({value:ce},null),{value:Te,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const pe=vt((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return pe==null||pe.metaSync({value:null},null),{value:pe,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=nv(e,p,i);if(ee&&ee.value){const oe=o.declaration;if(vr(ee.value.value)){const ce=ee.value.value[oe.name],Te=vt(((L=o.declaration)==null?void 0:L.dataType)||null,o,p.project);return Te==null||Te.metaSync({value:ce},null),{value:Te,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const pe=vt(((j=o.declaration)==null?void 0:j.dataType)||null,o,p.project);return pe==null||pe.metaSync({value:null},null),{value:pe,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const ne=e.outputs.map(pe=>{var oe,ce;if((oe=p.persistedExecutionResults)!=null&&oe.values[pe.id]){const Te=(ce=p.persistedExecutionResults)==null?void 0:ce.values[pe.id];if(Te.value!==null||Te.valueAsType!==null)return{value:Te,valueOwner:pe,type:Ve.ExecutionResult,inheritanceLink:null}}}).filter(pe=>!!pe),ee=vt(((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:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.FunctionCall:{const ne=e.inputs.map(pe=>dA(pe,p,i)).filter(pe=>!!pe),ee=vt(((q=o.declaration)==null?void 0:q.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.Loop:{const ne=e.inputs.map(pe=>dA(pe,p,i)).filter(pe=>!!pe),ee=vt(((X=o.declaration)==null?void 0:X.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:null}}return null}function SO(o,p,i=!1){var b,w,P;if(![...St,...qt].includes(o.parent.type)||!Nv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return $u(o.declaration,p);const n=av(o,p,i);if(n&&n.type!==Ve.Empty&&n.type!==Ve.Missing)return n;const s=Wn(o.parent),c=Ao(s,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||qi(se(o,p.project)),y=vt(o.getDataType(null),o,p.project),m=Xd(o),v=(P=c==null?void 0:c.value)==null?void 0:P.value;if(v&&vr(v)){let $=v[e];return v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null),m&&Pr(y)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}}function qO(o,p,i=!1){var b,w,P,$,L,j,F;if(![...St,...qt].includes(o.parent.type)||!Nv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return $u(o.declaration,p,i);const n=St.includes(o.parent.type)?o.parent:Wn(o.parent),s=$u(n,p,i);let c=o;n.type===d.VariableDeclaration&&(c=(o.parent===n?o:n.inputs.find(X=>{var ne,ee;return((ne=X.declaration)==null?void 0:ne.id)===((ee=o.declaration)==null?void 0:ee.id)}))||o);const e=Km(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||qi(se(o,p.project)),m=vt(o.getDataType(null),o,p.project),v=Xd(o),E=(P=s==null?void 0:s.value)==null?void 0:P.value;if(((s==null?void 0:s.type)===Ve.ExecutionResult||(s==null?void 0:s.type)===Ve.Testing)&&!i&&E&&vr(E)){let q=E[y];return E[y]===void 0&&(q=null),m==null||m.metaSync({value:q},null),{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}if(e&&e.type!==Ve.Empty&&e.type!==Ve.Missing)return e;if(E&&vr(E)){let q=E[y];E[y]===void 0&&(q=null),m==null||m.metaSync({value:q},null);const X=v&&Pr(m),ne=!!(($=p.execution)!=null&&$.entities.length),ee=(L=p.execution)==null?void 0:L.hasEntity(n),pe=n.readsValue;if(pe){const oe=(j=p.execution)==null?void 0:j.hasEntity(pe);if(X&&(!ne||ne&&oe&&ee||ne&&!oe&&!ee))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}if(o.readsValue){const oe=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(X&&(!ne||ne&&oe&&ee||ne&&!oe&&!ee))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}return X?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}return Km(o,p,i)}function av(o,p,i=!1){var w,P,$,L,j,F;const n=si(o),s=!!((w=p.execution)!=null&&w.entities.length),c=(P=p.execution)==null?void 0:P.hasEntity(n),e=o.readsValue;let y=null;if(e){const q=($=p.execution)==null?void 0:$.hasEntity(e);(!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Ve.Testing)&&(y={value:m,valueOwner:o,type:Pr(m)?Ve.Empty:Ve.DefaultValue,inheritanceLink:null}),!y&&o.declaration){const q=$u(o.declaration,p,i);q&&q.value&&(i||v===null||v!==Ve.Testing)&&(y={...q,valueOwner:o,type:Ve.DefaultValue})}if(!y||y.type===Ve.DefaultValue||(y==null?void 0:y.type)===Ve.Empty){const q=(L=p.persistedExecutionResults)==null?void 0:L.readValue(o.id);if(q&&!i)return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const X=(j=p.localTestValues)==null?void 0:j.readValue(o.id);if(X&&!i&&(v===null||v!==Ve.DefaultValue))return{value:X,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const E=Xd(o),b=E&&(!y||(y==null?void 0:y.type)===Ve.Empty);if(o.readsValue){const q=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(b&&(!s||s&&q&&c||s&&!q&&!c))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}return b?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Ve.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function Km(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(y=p.localTestValues)==null?void 0:y.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:av(o,p,i)}function dA(o,p,i=!1){var n,s;return qt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||St.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?SO(o,p,i):av(o,p,i)}function xOe(o,p,i=!1){var n,s;return qt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||St.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?qO(o,p,i):Km(o,p,i)}function $Oe(o,p,i=!1){var v,E;if(!o.static)return null;if(p.execution){const b=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(b&&!i)return{value:b,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=(E=p.localTestValues)==null?void 0:E.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Ve.DefaultValue))return{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;return c&&(i||s===null||s!==Ve.Testing)&&(e={value:c,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}),Xd(o)&&Pr(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:Pr(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e}function LOe(o,p,i=!1){var v,E;if(p.execution&&p.execution.hasEntity(o)&&!i){const b=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(b)return{value:b,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=(E=p.localTestValues)==null?void 0:E.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Ve.DefaultValue))return{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;return c&&(i||s===null||s!==Ve.Testing)&&(e={value:c,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}),Xd(o)&&Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e}function $u(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return VOe(o,p,i);case d.InputMap:return xOe(o,p,i);case d.VariableDeclaration:return SV(o,p,i);case d.VariableInstance:return POe(o,p,i);case d.OutputMap:return NOe(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return ZV(o,p,i);case d.Property:return $Oe(o,p,i);case d.ValueDescriptor:return LOe(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return COe(o,p,i);default:return null}}function Ao(o,p,i=!1){switch(o.type){case d.InputMap:return dA(o,p,i);case d.VariableDeclaration:return nv(o,p,i);case d.VariableInstance:return qV(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return ZV(o,p,i);default:return null}}function fvi(o){var p;if(o&&o.type===Ve.DefaultValue&&o.value&&o.valueOwner&&(!BA.includes(o.valueOwner.type)||((p=o.valueOwner.getDefaultValue())==null?void 0:p.id)===o.value.id)){const i=vt(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Ve.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function gc(o,p,i,n){let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,P,$,L,j;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);F?!s&&F&&F.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(F=vt(v.getDataType(null),v,p)):s?F=Jl(v.getDataType(null),v,p,c):F=vt(v.getDataType(null),v,p);const q=se(o,p),X=o.codeName||((P=o.extends)==null?void 0:P.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||qi(q);let ne={};((j=(L=v.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(ne={...ne,...v.dataType.entity.getActiveRawDefaultValue()}),vr(F==null?void 0:F.value)&&(ne={...ne,...F.value}),ne[X]=i,F==null||F.metaSync({value:ne},c),s||e==null||e.writeValue(v,F);return}}),c}function Fm(o,p,i,n){var P,$,L,j;let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=Wn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=s?y.getDefaultValue():e==null?void 0:e.readValue(y.id);v?!s&&v&&v.id===((P=y.getDefaultValue())==null?void 0:P.id)&&(v=vt(y.getDataType(null),y,p)):s?v=Jl(y.getDataType(null),y,p,c):v=vt(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||qi(E);let w={};if(((j=(L=y.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),vr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),s||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const F=y.inputs.find(q=>{var X,ne;return((X=q.declaration)==null?void 0:X.id)===((ne=o.declaration)==null?void 0:ne.id)||se(q,p)===E});if(F){let q=s?F.getDefaultValue():e==null?void 0:e.readValue(F.id);q&&q.metaSync({value:null},c),s||e==null||e.removeValue(F.id)}}return c}function MOe(o,p,i){var e,y,m,v,E;let n=!1,s=null,c=null;if(i instanceof Z?(n=!0,s=i,c=null):(s=null,c=i),qt.includes(o.type)){const b=Wn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var P,$,L,j,F,q;if(((P=w.declaration)==null?void 0:P.type)===d.Property&&w.declaration.static){let X=n?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);X?!n&&X&&X.id===((L=w.declaration.getDefaultValue())==null?void 0:L.id)&&(X=vt(w.declaration.getDataType(null),w.declaration,p)):n?X=Jl(w.declaration.getDataType(null),w.declaration,p,s):X=vt(w.declaration.getDataType(null),w.declaration,p),X==null||X.metaSync({value:null},s),n||c==null||c.removeValue((j=w.declaration)==null?void 0:j.id)}else if(((F=w.declaration)==null?void 0:F.type)===d.Property){let X=n?((q=w.getDefaultValue)==null?void 0:q.call(w))||null:c==null?void 0:c.readValue(w.id);X&&X.metaSync({value:null},s),n||c==null||c.removeValue(w.id)}})}else o.type===d.InputMap?((y=o.declaration)==null?void 0:y.type)===d.Property&&o.declaration.static?gc(o.declaration,p,null,i):qt.includes(o.parent.type)&&((m=o.declaration)==null?void 0:m.type)===d.Property&&Fm(o,p,null,i):o.type===d.OutputMap?((v=o.declaration)==null?void 0:v.type)===d.Property&&o.declaration.static?gc(o.declaration,p,null,i):qt.includes(o.parent.type)&&((E=o.declaration)==null?void 0:E.type)===d.Property&&Fm(o,p,null,i):o.type===d.Property&&o.static&&gc(o,p,null,i);return s}function BOe(o,p,i,n){var y,m,v,E,b,w,P;let s=!1,c=null,e=null;if(n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n),qt.includes(p.type)){const $=Wn(p);if((y=$.dataType)!=null&&y.isObject()){let L={};((v=(m=$.dataType)==null?void 0:m.entity)==null?void 0:v.type)===d.DefinitionEntity&&(L={...L,...$.dataType.entity.getActiveRawDefaultValue()});const j=vr(o)?o:L;$.inputs.forEach(F=>{var q,X,ne,ee,pe,oe;if(((q=F.declaration)==null?void 0:q.type)===d.Property&&F.declaration.static){let ce=s?((X=p.getDefaultValue)==null?void 0:X.call(p))||null:e==null?void 0:e.readValue(F.declaration.id);ce?!s&&ce&&ce.id===((ne=F.declaration.getDefaultValue())==null?void 0:ne.id)&&(ce=vt(F.declaration.getDataType(null),F.declaration,i)):s?ce=Jl(F.declaration.getDataType(null),F.declaration,i,c):ce=vt(F.declaration.getDataType(null),F.declaration,i);const Te=se(F,i),de=F.codeName||((ee=F.declaration)==null?void 0:ee.codeName)||qi(Te),ye=j[de];ce==null||ce.metaSync({value:ye},c),s||e==null||e.writeValue(F.declaration,ce)}else if(((pe=F.declaration)==null?void 0:pe.type)===d.Property){let ce=s?((oe=p.getDefaultValue)==null?void 0:oe.call(p))||null:e==null?void 0:e.readValue(F.id);ce&&ce.metaSync({value:null},c),s||e==null||e.removeValue(F.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?gc(p.declaration,i,o,n):qt.includes(p.parent.type)&&((b=p.declaration)==null?void 0:b.type)===d.Property&&Fm(p,i,o,n):p.type===d.OutputMap?((w=p.declaration)==null?void 0:w.type)===d.Property&&p.declaration.static?gc(p.declaration,i,null,n):qt.includes(p.parent.type)&&((P=p.declaration)==null?void 0:P.type)===d.Property&&Fm(p,i,null,n):p.type===d.Property&&p.static&&gc(p,i,o,n);return c}function GOe(o,p,i){const n=Oo(o,p);let s=!1,c=null,e=null;return i instanceof Z?(s=!0,c=i,e=null):(c=null,e=i),n.forEach(y=>{var v,E,b;let m=s?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);m?!s&&m&&m.id===((b=((E=y.getDefaultValue)==null?void 0:E.call(y))||null)==null?void 0:b.id)&&(m=vt(o.getDataType(null),o,o.project)):s?m=Jl(y.getDataType(null),y,p,c):m=vt(y.getDataType(null),y,p),m==null||m.metaSync({value:null},c),s||e==null||e.removeValue(y.id),MOe(y,p,i)}),c}function yvi(o,p,i,n){if(zN(o))return GOe(p,i,n);const s=Oo(p,i);let c=!1,e=null,y=null;return n instanceof Z?(c=!0,e=n,y=null):(e=null,y=n),i.diggestedBuiltInBaseEntitiesIds.has(p.id)||s.forEach(m=>{var E,b,w,P;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===((P=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:P.id)&&(v=vt(m.getDataType(null),m,i)):c?(v=Jl(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=vt(m.getDataType(null),m,i),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),BOe(o,m,i,n)}),e}function Ic(o,p,i,n){let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,P,$,L,j;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);F?!s&&F&&F.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(F=vt(v.getDataType(null),v,p)):s?F=Jl(v.getDataType(null),v,p,c):F=vt(v.getDataType(null),v,p);const q=se(o,p),X=o.codeName||((P=o.extends)==null?void 0:P.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||qi(q);let ne={};((j=(L=v.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(ne={...ne,...v.dataType.entity.getActiveRawDefaultValue()}),vr(F==null?void 0:F.value)&&(ne={...ne,...F.value}),Array.isArray(i)?ne[X]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:ne[X]=(i==null?void 0:i.toShallowJSON())||null,F==null||F.metaSync({value:ne},c),s||e==null||e.writeValue(v,F);return}}),c}function Sm(o,p,i,n){var P,$,L,j;let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=Wn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=s?y.getDefaultValue():e==null?void 0:e.readValue(y.id);v?!s&&v&&v.id===((P=y.getDefaultValue())==null?void 0:P.id)&&(v=vt(y.getDataType(null),y,p)):s?v=Jl(y.getDataType(null),y,p,c):v=vt(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||qi(E);let w={};if(((j=(L=y.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),vr(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),s||e==null||e.writeValue(y,v),i==null&&o.type===d.OutputMap){const F=y.inputs.find(q=>{var X,ne;return((X=q.declaration)==null?void 0:X.id)===((ne=o.declaration)==null?void 0:ne.id)||se(q,p)===E});if(F){let q=s?F.getDefaultValue():e==null?void 0:e.readValue(F.id);q&&(Array.isArray(i)?q==null||q.setValueAsTypeList(i,c):q==null||q.setValueAsTypeSingle(i,c)),s||e==null||e.removeValue(F.id)}}return c}function kOe(o,p,i){var n,s,c,e;return o.type===d.InputMap?((n=o.declaration)==null?void 0:n.type)===d.Property&&o.declaration.static?Ic(o.declaration,p,null,i):qt.includes(o.parent.type)&&((s=o.declaration)==null?void 0:s.type)===d.Property&&Sm(o,p,null,i):o.type===d.OutputMap?((c=o.declaration)==null?void 0:c.type)===d.Property&&o.declaration.static?Ic(o.declaration,p,null,i):qt.includes(o.parent.type)&&((e=o.declaration)==null?void 0:e.type)===d.Property&&Sm(o,p,null,i):o.type===d.Property&&o.static&&Ic(o,p,null,i),i}function jOe(o,p,i,n){var s,c,e,y;return p.type===d.InputMap?((s=p.declaration)==null?void 0:s.type)===d.Property&&p.declaration.static?Ic(p.declaration,i,o,n):qt.includes(p.parent.type)&&((c=p.declaration)==null?void 0:c.type)===d.Property&&Sm(p,i,o,n):p.type===d.OutputMap?((e=p.declaration)==null?void 0:e.type)===d.Property&&p.declaration.static?Ic(p.declaration,i,null,n):qt.includes(p.parent.type)&&((y=p.declaration)==null?void 0:y.type)===d.Property&&Sm(p,i,null,n):p.type===d.Property&&p.static&&Ic(p,i,o,n),n}function UOe(o,p,i){const n=Oo(o,p);let s=!1,c=null,e=null;return i instanceof Z?(s=!0,c=i,e=null):(c=null,e=i),n.forEach(y=>{var v,E,b;let m=s?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);m?!s&&m&&m.id===((b=(E=y.getDefaultValue)==null?void 0:E.call(y))==null?void 0:b.id)&&(m=vt(y.getDataType(null),y,y.project)):s?m=Jl(y.getDataType(null),y,p,c):m=vt(y.getDataType(null),y,p),m==null||m.setValueAsTypeSingle(null,c),m==null||m.setValueAsTypeList(null,c),s||e==null||e.removeValue(y.id),kOe(y,p,i)}),c}function hvi(o,p,i,n){if(o==null)return UOe(p,i,n);const s=Oo(p,i);let c=!1,e=null,y=null;return n instanceof Z?(c=!0,e=n,y=null):(e=null,y=n),s.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=vt(m.getDataType(null),m,m.project)):c?v=Jl(m.getDataType(null),m,i,e):v=vt(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),c||y==null||y.writeValue(m,v),jOe(o,m,i,n)}),e}class KI{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||{}),Y=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(Y||{}),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 KOe{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 FOe extends KOe{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 FOe(this,i)}}class ZO extends KI{constructor(i,n){super(i,Y.Logic);I(this,"id");this._project=n,this.id=n.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,n,s,c=!1,e="here-this"){return this._project.toLatestChangeSet(i,n,s,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,n,s){return this._project.onDetachedDependencyRemoved(i,n,s)}onDetachedDependencyRestored(i,n,s){return this._project.onDetachedDependencyRestored(i,n,s)}increaseVersion(i){return this._project.increaseVersion(i)}captureVersion(){return this._project.captureVersion()}restoreVersion(i){return this._project.restoreVersion(i)}updateWithShallowTransfer(i,n){return this._project.updateWithShallowTransfer(i,n)}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,n){return this._project.metaSync(i,n)}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(){return this._project.toGenerationTarget()}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()}getDefinitionEntity(i){return this._project.getDefinitionEntity(i)}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,n=!1){return this._project.requestActiveDynamicValue(i,n)}undo(){return this._project.undo()}redo(){return this._project.redo()}applyExternalChangeSet(i){return this._project.applyExternalChangeSet(i)}toFullProjectTransfer(){return this._project.toFullProjectTransfer()}}function mvi(o,p){return p instanceof ZO?p:new ZO(o,p)}const oy="built-in-function-implementations__",Oe="operations-implementations__",Na="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+zn.HttpRequest,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY:Oe+Ce.Validate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL:Oe+ji.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+ji.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+ji.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+ie.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT:Oe+ie.Split,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS:Oe+ie.DeleteLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS:Oe+ie.DeleteFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX:Oe+ie.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX:Oe+ie.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS:Oe+ie.ReplaceFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS:Oe+ie.ReplaceLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL:Oe+ie.ReplaceAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX:Oe+ie.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM:Oe+ie.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST:Oe+ie.GetFirst,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST:Oe+ie.GetLast,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND:Oe+ie.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND:Oe+ie.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE:Oe+ie.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH:Oe+ie.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS:Oe+ie.GetFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS:Oe+ie.GetLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE:Oe+ie.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT:Oe+ie.Concat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF:Oe+ie.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF:Oe+ie.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE:Oe+ie.Unique,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN:Oe+ie.Flatten,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT:Oe+ie.Sort,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE:Oe+ie.Shuffle,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK:Oe+ie.Chunk,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START:Oe+ie.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END:Oe+ie.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT:Oe+ie.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH:Oe+S.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+S.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+S.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+S.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+ie.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL:Oe+ie.ContainsAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY:Oe+ie.ContainsAny,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX:Oe+S.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+S.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+S.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+S.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+S.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+S.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+S.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+S.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+S.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+S.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+S.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+S.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+S.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+S.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+S.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+S.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+S.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+S.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+S.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+S.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+S.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+S.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+S.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+S.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+S.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+S.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+S.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+S.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+S.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+S.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+S.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+S.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+S.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+S.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+S.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+S.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+S.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+S.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+S.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+S.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+S.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+S.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+S.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+S.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+S.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+U.GetCurrentTimestamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE:Oe+U.FormatDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE:Oe+U.ParseDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE:Oe+U.AddToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE:Oe+U.SubtractFromDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES:Oe+U.DifferenceBetweenDates,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE:Oe+U.ToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX:Oe+U.ToUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX:Oe+U.FromUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING:Oe+U.ToISOString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR:Oe+U.GetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH:Oe+U.GetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE:Oe+U.GetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR:Oe+U.GetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE:Oe+U.GetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND:Oe+U.GetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND:Oe+U.GetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY:Oe+U.GetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR:Oe+U.GetWeekOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER:Oe+U.GetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR:Oe+U.GetDayOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH:Oe+U.GetDaysInMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE:Oe+U.GetCurrentIanaTimeZone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR:Oe+U.SetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH:Oe+U.SetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE:Oe+U.SetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR:Oe+U.SetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE:Oe+U.SetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND:Oe+U.SetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND:Oe+U.SetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY:Oe+U.SetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER:Oe+U.SetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF:Oe+U.StartOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF:Oe+U.EndOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO:Oe+U.RoundTo,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE:Na+U.IsBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER:Na+U.IsAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME:Na+U.IsSame,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE:Na+U.IsSameOrBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER:Na+U.IsSameOrAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN:Na+U.IsBetween,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID:Na+U.IsValid,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR:Na+U.IsLeapYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE:Oe+U.ClampToRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF:Oe+U.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF:Oe+U.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW:Oe+U.FromNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW:Oe+U.ToNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF:Oe+U.HumanizeDiff,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS:Oe+U.AddBusinessDays,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY:Oe+U.NextWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY:Oe+U.PreviousWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC:Oe+U.ToUTC,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE:Oe+U.ConvertTimezone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET:Oe+U.GetTimezoneOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET:Oe+U.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:Na+Ce.HasKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_NESTED_KEY:Na+Ce.HasNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEY_VALUE_EQUALS:Na+Ce.KeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_NESTED_KEY_VALUE_EQUALS:Na+Ce.NestedKeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_IS_INSTANCE_OF_TYPE:Na+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+ai.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+ai.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+ai.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+ai.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+en.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+en.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+Xi.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+Xi.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+Xi.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+Qr.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+Qr.Stringify};class SOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class qOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class ZOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class HOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class WOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({data:null,error:"Search module not implemented"})})}}class zOe 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",TC)}}const JOe=o=>o.map(p=>{var i,n;return((i=p.value)==null?void 0:i.valueAsType)??((n=p.value)==null?void 0:n.value)});class YOe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.Empty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=JOe(n),c=!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class XOe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.NotEmpty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=JOe(n),c=!!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}const NA=class NA 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.PrimitiveEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{var s,c,e,y,m,v;try{const E=(c=(s=n[0])==null?void 0:s.value)==null?void 0:c.name,b=(y=(e=n[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=n[1])==null?void 0:m.value)==null?void 0:v.value;let P=!1;return E&&NA.primitiveSet.has(E)?P=b===w:E===le.Untyped||E===le.KeyValue?P=JSON.stringify(b)===JSON.stringify(w):P=!1,{value:G.Success,error:null,result:P}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(NA,"primitiveSet",new Set([le.String,le.Number,le.Boolean,le.Null,le.Enum,le.Date,le.UUID]));let uA=NA;const xA=class xA 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.PrimitiveNotEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{var s,c,e,y,m,v;try{const E=(c=(s=n[0])==null?void 0:s.value)==null?void 0:c.name,b=(y=(e=n[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=n[1])==null?void 0:m.value)==null?void 0:v.value;let P=!1;return E&&xA.primitiveSet.has(E)?P=b!==w:E===le.Untyped||E===le.KeyValue?P=JSON.stringify(b)!==JSON.stringify(w):P=!1,{value:G.Success,error:null,result:P}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(xA,"primitiveSet",new Set([le.String,le.Number,le.Boolean,le.Null,le.Enum,le.Date,le.UUID]));let pA=xA;var QOe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(c,e,y){var m=e.prototype;y.utc=function(L){var j={date:L,utc:!0,args:arguments};return new e(j)},m.utc=function(L){var j=y(this.toDate(),{locale:this.$L,utc:!0});return L?j.add(this.utcOffset(),i):j},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(L){L.utc&&(this.$u=!0),this.$utils().u(L.$offset)||(this.$offset=L.$offset),v.call(this,L)};var E=m.init;m.init=function(){if(this.$u){var L=this.$d;this.$y=L.getUTCFullYear(),this.$M=L.getUTCMonth(),this.$D=L.getUTCDate(),this.$W=L.getUTCDay(),this.$H=L.getUTCHours(),this.$m=L.getUTCMinutes(),this.$s=L.getUTCSeconds(),this.$ms=L.getUTCMilliseconds()}else E.call(this)};var b=m.utcOffset;m.utcOffset=function(L,j){var F=this.$utils().u;if(F(L))return this.$u?0:F(this.$offset)?b.call(this):this.$offset;if(typeof L=="string"&&(L=function(ee){ee===void 0&&(ee="");var pe=ee.match(n);if(!pe)return null;var oe=(""+pe[0]).match(s)||["-",0,0],ce=oe[0],Te=60*+oe[1]+ +oe[2];return Te===0?0:ce==="+"?Te:-Te}(L),L===null))return this;var q=Math.abs(L)<=16?60*L:L;if(q===0)return this.utc(j);var X=this.clone();if(j)return X.$offset=q,X.$u=!1,X;var ne=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(X=this.local().add(q+ne,i)).$offset=q,X.$x.$localOffset=ne,X};var w=m.format;m.format=function(L){var j=L||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,j)},m.valueOf=function(){var L=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*L},m.isUTC=function(){return!!this.$u},m.toISOString=function(){return this.toDate().toISOString()},m.toString=function(){return this.toDate().toUTCString()};var P=m.toDate;m.toDate=function(L){return L==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var $=m.diff;m.diff=function(L,j,F){if(L&&this.$u===L.$u)return $.call(this,L,j,F);var q=this.local(),X=y(L).local();return $.call(q,X,j,F)}}})})(QOe);var Tvi=QOe.exports;const vvi=Wa(Tvi);var eCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,c,e){var y,m=function(w,P,$){$===void 0&&($={});var L=new Date(w),j=function(F,q){q===void 0&&(q={});var X=q.timeZoneName||"short",ne=F+"|"+X,ee=n[ne];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:X}),n[ne]=ee),ee}(P,$);return j.formatToParts(L)},v=function(w,P){for(var $=m(w,P),L=[],j=0;j<$.length;j+=1){var F=$[j],q=F.type,X=F.value,ne=i[q];ne>=0&&(L[ne]=parseInt(X,10))}var ee=L[3],pe=ee===24?0:ee,oe=L[0]+"-"+L[1]+"-"+L[2]+" "+pe+":"+L[4]+":"+L[5]+":000",ce=+w;return(e.utc(oe).valueOf()-(ce-=ce%1e3))/6e4},E=c.prototype;E.tz=function(w,P){w===void 0&&(w=y);var $,L=this.utcOffset(),j=this.toDate(),F=j.toLocaleString("en-US",{timeZone:w}),q=Math.round((j-new Date(F))/1e3/60),X=15*-Math.round(j.getTimezoneOffset()/15)-q;if(!Number(X))$=this.utcOffset(0,P);else if($=e(F,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(X,!0),P){var ne=$.utcOffset();$=$.add(L-ne,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var P=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),P,{timeZoneName:w}).find(function(L){return L.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,P){if(!this.$x||!this.$x.$timezone)return b.call(this,w,P);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,P).tz(this.$x.$timezone,!0)},e.tz=function(w,P,$){var L=$&&P,j=$||P||y,F=v(+e(),j);if(typeof w!="string")return e(w).tz(j);var q=function(pe,oe,ce){var Te=pe-60*oe*1e3,de=v(Te,ce);if(oe===de)return[Te,oe];var ye=v(Te-=60*(de-oe)*1e3,ce);return de===ye?[Te,de]:[pe-60*Math.min(de,ye)*1e3,Math.max(de,ye)]}(e.utc(w,L).valueOf(),F,j),X=q[0],ne=q[1],ee=e(X).utcOffset(ne);return ee.$x.$timezone=j,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(eCe);var Evi=eCe.exports;const bvi=Wa(Evi);var tCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){n.prototype.isBetween=function(c,e,y,m){var v=s(c),E=s(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))}}})})(tCe);var Avi=tCe.exports;const gvi=Wa(Avi);var iCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isSameOrAfter=function(s,c){return this.isSame(s,c)||this.isAfter(s,c)}}})})(iCe);var Ivi=iCe.exports;const Rvi=Wa(Ivi);var rCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isSameOrBefore=function(s,c){return this.isSame(s,c)||this.isBefore(s,c)}}})})(rCe);var Dvi=rCe.exports;const wvi=Wa(Dvi);var nCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="week",n="year";return function(s,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(n).add(1,n).date(v),b=e(this).endOf(i);if(E.isBefore(b))return 1}var w=e(this).startOf(n).date(v).startOf(i).subtract(1,"millisecond"),P=this.diff(w,i,!0);return P<0?e(this).startOf("week").week():Math.ceil(P)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(nCe);var Ovi=nCe.exports;const Cvi=Wa(Ovi);var aCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="day";return function(n,s,c){var e=function(v){return v.add(4-v.isoWeekday(),i)},y=s.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,P,$=e(this),L=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),P=4-w.isoWeekday(),w.isoWeekday()>4&&(P+=7),w.add(P,i));return $.diff(L,"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)}}})})(aCe);var _vi=aCe.exports;const Pvi=Wa(_vi);var sCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="month",n="quarter";return function(s,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)===n?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)===n){var P=this.quarter()-1;return w?this.month(3*P).startOf(i).startOf("day"):this.month(3*P+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(sCe);var Vvi=sCe.exports;const Nvi=Wa(Vvi);var lCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){n.prototype.dayOfYear=function(c){var e=Math.round((s(this).startOf("day")-s(this).startOf("year"))/864e5)+1;return c==null?e:this.add(c-e,"day")}}})})(lCe);var xvi=lCe.exports;const $vi=Wa(xvi);var oCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){i=i||{};var c=n.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)}s.en.relativeTime=e,c.fromToBase=function(v,E,b,w,P){for(var $,L,j,F=b.$locale().relativeTime||e,q=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"}],X=q.length,ne=0;ne<X;ne+=1){var ee=q[ne];ee.d&&($=w?s(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var pe=(i.rounding||Math.round)(Math.abs($));if(j=$>0,pe<=ee.r||!ee.r){pe<=1&&ne>0&&(ee=q[ne-1]);var oe=F[ee.l];P&&(pe=P(""+pe)),L=typeof oe=="string"?oe.replace("%d",pe):oe(pe,E,ee.l,j);break}}if(E)return L;var ce=j?F.future:F.past;return typeof ce=="function"?ce(L):ce.replace("%s",L)},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?s.utc():s()};c.toNow=function(v){return this.to(m(this),v)},c.fromNow=function(v){return this.from(m(this),v)}}})})(oCe);var Lvi=oCe.exports;const Mvi=Wa(Lvi);var dCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i,n,s=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:s,milliseconds:1,weeks:6048e5},P=function(pe){return pe instanceof ne},$=function(pe,oe,ce){return new ne(pe,ce,oe.$l)},L=function(pe){return n.p(pe)+"s"},j=function(pe){return pe<0},F=function(pe){return j(pe)?Math.ceil(pe):Math.floor(pe)},q=function(pe){return Math.abs(pe)},X=function(pe,oe){return pe?j(pe)?{negative:!0,format:""+q(pe)+oe}:{negative:!1,format:""+pe+oe}:{negative:!1,format:""}},ne=function(){function pe(ce,Te,de){var ye=this;if(this.$d={},this.$l=de,ce===void 0&&(this.$ms=0,this.parseFromMilliseconds()),Te)return $(ce*w[L(Te)],this);if(typeof ce=="number")return this.$ms=ce,this.parseFromMilliseconds(),this;if(typeof ce=="object")return Object.keys(ce).forEach(function(Ge){ye.$d[L(Ge)]=ce[Ge]}),this.calMilliseconds(),this;if(typeof ce=="string"){var _e=ce.match(b);if(_e){var Pe=_e.slice(2).map(function(Ge){return Ge!=null?Number(Ge):0});return this.$d.years=Pe[0],this.$d.months=Pe[1],this.$d.weeks=Pe[2],this.$d.days=Pe[3],this.$d.hours=Pe[4],this.$d.minutes=Pe[5],this.$d.seconds=Pe[6],this.calMilliseconds(),this}}return this}var oe=pe.prototype;return oe.calMilliseconds=function(){var ce=this;this.$ms=Object.keys(this.$d).reduce(function(Te,de){return Te+(ce.$d[de]||0)*w[de]},0)},oe.parseFromMilliseconds=function(){var ce=this.$ms;this.$d.years=F(ce/v),ce%=v,this.$d.months=F(ce/E),ce%=E,this.$d.days=F(ce/y),ce%=y,this.$d.hours=F(ce/e),ce%=e,this.$d.minutes=F(ce/c),ce%=c,this.$d.seconds=F(ce/s),ce%=s,this.$d.milliseconds=ce},oe.toISOString=function(){var ce=X(this.$d.years,"Y"),Te=X(this.$d.months,"M"),de=+this.$d.days||0;this.$d.weeks&&(de+=7*this.$d.weeks);var ye=X(de,"D"),_e=X(this.$d.hours,"H"),Pe=X(this.$d.minutes,"M"),Ge=this.$d.seconds||0;this.$d.milliseconds&&(Ge+=this.$d.milliseconds/1e3,Ge=Math.round(1e3*Ge)/1e3);var xe=X(Ge,"S"),Me=ce.negative||Te.negative||ye.negative||_e.negative||Pe.negative||xe.negative,Se=_e.format||Pe.format||xe.format?"T":"",je=(Me?"-":"")+"P"+ce.format+Te.format+ye.format+Se+_e.format+Pe.format+xe.format;return je==="P"||je==="-P"?"P0D":je},oe.toJSON=function(){return this.toISOString()},oe.format=function(ce){var Te=ce||"YYYY-MM-DDTHH:mm:ss",de={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return Te.replace(m,function(ye,_e){return _e||String(de[ye])})},oe.as=function(ce){return this.$ms/w[L(ce)]},oe.get=function(ce){var Te=this.$ms,de=L(ce);return de==="milliseconds"?Te%=1e3:Te=de==="weeks"?F(Te/w[de]):this.$d[de],Te||0},oe.add=function(ce,Te,de){var ye;return ye=Te?ce*w[L(Te)]:P(ce)?ce.$ms:$(ce,this).$ms,$(this.$ms+ye*(de?-1:1),this)},oe.subtract=function(ce,Te){return this.add(ce,Te,!0)},oe.locale=function(ce){var Te=this.clone();return Te.$l=ce,Te},oe.clone=function(){return $(this.$ms,this)},oe.humanize=function(ce){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!ce)},oe.valueOf=function(){return this.asMilliseconds()},oe.milliseconds=function(){return this.get("milliseconds")},oe.asMilliseconds=function(){return this.as("milliseconds")},oe.seconds=function(){return this.get("seconds")},oe.asSeconds=function(){return this.as("seconds")},oe.minutes=function(){return this.get("minutes")},oe.asMinutes=function(){return this.as("minutes")},oe.hours=function(){return this.get("hours")},oe.asHours=function(){return this.as("hours")},oe.days=function(){return this.get("days")},oe.asDays=function(){return this.as("days")},oe.weeks=function(){return this.get("weeks")},oe.asWeeks=function(){return this.as("weeks")},oe.months=function(){return this.get("months")},oe.asMonths=function(){return this.as("months")},oe.years=function(){return this.get("years")},oe.asYears=function(){return this.as("years")},pe}(),ee=function(pe,oe,ce){return pe.add(oe.years()*ce,"y").add(oe.months()*ce,"M").add(oe.days()*ce,"d").add(oe.hours()*ce,"h").add(oe.minutes()*ce,"m").add(oe.seconds()*ce,"s").add(oe.milliseconds()*ce,"ms")};return function(pe,oe,ce){i=ce,n=ce().$utils(),ce.duration=function(ye,_e){var Pe=ce.locale();return $(ye,{$l:Pe},_e)},ce.isDuration=P;var Te=oe.prototype.add,de=oe.prototype.subtract;oe.prototype.add=function(ye,_e){return P(ye)?ee(this,ye,1):Te.bind(this)(ye,_e)},oe.prototype.subtract=function(ye,_e){return P(ye)?ee(this,ye,-1):de.bind(this)(ye,_e)}}})})(dCe);var Bvi=dCe.exports;const Gvi=Wa(Bvi);var uCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(uCe);var kvi=uCe.exports;const jvi=Wa(kvi);M.extend(vvi);M.extend(bvi);M.extend(gvi);M.extend(Rvi);M.extend(wvi);M.extend(Cvi);M.extend(Pvi);M.extend(Nvi);M.extend($vi);M.extend(Mvi);M.extend(Gvi);M.extend(jvi);const gt=o=>M(o),er=o=>o.toISOString();function pCe(){return er(M())}function cCe(o,p){return gt(o).format(p)}function fCe(o){return er(M(o))}function yCe(o){if(o==null)throw new TypeError("ToDate expects a non-null value.");if(typeof o=="string"){const p=M(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?M.unix(o):M(o);if(!p.isValid())throw new TypeError("Invalid numeric timestamp.");return p.toISOString()}if(o instanceof Date){const p=M(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 hCe(o,p,i){return er(gt(o).add(p,i))}function mCe(o,p,i){return er(gt(o).subtract(p,i))}function TCe(o,p,i,n=!1){return gt(o).diff(gt(p),i,n)}function vCe(o){return gt(o).unix()}function ECe(o){return er(M.unix(o))}function bCe(o){return er(gt(o))}function ACe(o){return gt(o).year()}function gCe(o){return gt(o).month()}function ICe(o){return gt(o).date()}function RCe(o){return gt(o).hour()}function DCe(o){return gt(o).minute()}function wCe(o){return gt(o).second()}function OCe(o){return gt(o).millisecond()}function CCe(o){return gt(o).isoWeekday()}function _Ce(o){return gt(o).week()}function PCe(o){return gt(o).quarter()}function VCe(o){return gt(o).dayOfYear()}function NCe(o){return gt(o).daysInMonth()}function xCe(o,p){return er(gt(o).year(p))}function $Ce(o,p){return er(gt(o).month(p))}function LCe(o,p){return er(gt(o).date(p))}function MCe(o,p){return er(gt(o).hour(p))}function BCe(o,p){return er(gt(o).minute(p))}function GCe(o,p){return er(gt(o).second(p))}function kCe(o,p){return er(gt(o).millisecond(p))}function jCe(o,p){return er(gt(o).isoWeekday(p))}function UCe(o,p){return er(gt(o).quarter(p))}function KCe(o,p){return er(gt(o).startOf(p))}function FCe(o,p){return er(gt(o).endOf(p))}function SCe(o,p){const i=gt(o),n=i.startOf(p),s=i.endOf(p),c=n.valueOf()+(s.valueOf()-n.valueOf())/2;return er(i.valueOf()<c?n:s)}function qCe(o,p,i){return gt(o).isBefore(gt(p),i)}function ZCe(o,p,i){return gt(o).isAfter(gt(p),i)}function HCe(o,p,i){return gt(o).isSame(gt(p),i)}function WCe(o,p,i){return gt(o).isSameOrBefore(gt(p),i)}function zCe(o,p,i){return gt(o).isSameOrAfter(gt(p),i)}function JCe(o,p,i,n,s="()"){return gt(o).isBetween(gt(p),gt(i),n,s)}function YCe(o){return M(o).isValid()}function XCe(o){return gt(o).isLeapYear()}function QCe(o,p,i){const n=gt(o);return n.isBefore(p)?er(gt(p)):n.isAfter(i)?er(gt(i)):er(n)}function e_e(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=gt(o[0]);for(let i=1;i<o.length;i++){const n=gt(o[i]);n.isBefore(p)&&(p=n)}return er(p)}function t_e(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=gt(o[0]);for(let i=1;i<o.length;i++){const n=gt(o[i]);n.isAfter(p)&&(p=n)}return er(p)}function i_e(o,p=!1){return gt(o).fromNow(p)}function r_e(o,p=!1){return gt(o).toNow(p)}function n_e(o,p,i=!0){const n=gt(o).diff(gt(p),"millisecond",!0),s=Math.abs(n),e=M.duration(s,"milliseconds").humanize();return i?n>=0?`in ${e}`:`${e} ago`:e}function a_e(o,p,i=["6","7"],n=[]){const s=v=>n.some(E=>gt(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=gt(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)&&!s(e)&&m--}return er(e)}function s_e(o,p){let i=gt(o);const n=p;for(let s=0;s<7;s++)if(i=i.add(1,"day"),i.isoWeekday()===n)return er(i);return er(i)}function l_e(o,p){let i=gt(o);const n=p;for(let s=0;s<7;s++)if(i=i.subtract(1,"day"),i.isoWeekday()===n)return er(i);return er(i)}const o_e="Local";function HV(){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 WV(){const o=HV();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function d_e(o,p,i=!1){let n=p;if(n===o_e){const e=HV();if(!e)throw new Error("Unable to detect current timezone from host environment.");n=e}const s=n?M.tz(o,n):gt(o),c=i?s.utc(!0):s.utc();return er(c)}function u_e(o,p,i=!1){const n=gt(o);return er(i?n.tz(p,!0):n.tz(p))}function p_e(o,p){const i=o===o_e?WV():o;return gt(p).tz(i).utcOffset()}function c_e(o,p,i=!1){return er(gt(o).utcOffset(p,i))}class f_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetCurrentTimestamp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=pCe();return{value:G.Success,error:null,result:s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class y_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FormatDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=cCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class h_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ParseDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=fCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class m_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.AddToDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=hCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class T_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SubtractFromDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=mCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class v_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.DifferenceBetweenDates);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2],m=s[3]??!1,v=TCe(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Uvi 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=yCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class E_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToUnix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=vCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class b_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FromUnix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=ECe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class A_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToISOString);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=bCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class g_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=ACe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class I_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=gCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class R_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=ICe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class D_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetHour);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=RCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class w_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMinute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=DCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class O_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetSecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=wCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class C_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMillisecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=OCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class __e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetIsoWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=CCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class P_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetWeekOfYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=_Ce(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class V_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetQuarter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=PCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class N_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDayOfYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=VCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class x_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDaysInMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=NCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetCurrentIanaTimeZone);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=WV();return{value:G.Success,error:null,result:s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class L_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=xCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class M_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=$Ce(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class B_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=LCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class G_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetHour);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=MCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class k_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMinute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=BCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class j_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetSecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=GCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class U_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMillisecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=kCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class K_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetIsoWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=jCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class F_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetQuarter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=UCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class S_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.StartOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=KCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class q_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.EndOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=FCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Z_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.RoundTo);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=SCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class H_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsBefore);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=qCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class W_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsAfter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=ZCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class z_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSame);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=HCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class J_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSameOrBefore);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=WCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Y_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSameOrAfter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=zCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class X_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsBetween);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)||((P=b.value)==null?void 0:P.value)}),c=s[0],e=s[1],y=s[2],m=s[3],v=s[4],E=JCe(c,e,y,m,v??void 0);return{value:G.Success,error:null,result:E}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Q_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsValid);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=YCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ePe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsLeapYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=XCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ClampToRange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=QCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.MinOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=s.length===1&&Array.isArray(s[0])?s[0]:s,e=e_e(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.MaxOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=s.length===1&&Array.isArray(s[0])?s[0]:s,e=t_e(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FromNow);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=i_e(s,c??!1);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToNow);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=r_e(s,c??!1);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.HumanizeDiff);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=n_e(s,c,e??!0);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.AddBusinessDays);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2]??void 0,m=s[3]??[],v=a_e(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.NextWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=s_e(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.PreviousWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=l_e(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToUTC);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]||void 0,y=s[2]??!1,m=d_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ConvertTimezone);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=u_e(s,c,e??!1);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetTimezoneOffset);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=p_e(s,c);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetUTCOffset);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=c_e(s,c,e??!1);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Parallel);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)||((P=b.value)==null?void 0:P.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,[Y.Editor])[0],v=c.map(b=>{const w=new Au(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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class hPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Sequential);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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,[Y.Editor])[0],b=new Au(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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Wait);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}const Kvi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,zV=o=>o===null||["string","number","boolean"].includes(typeof o);function Cn(o,p="Input must be an array"){if(!Array.isArray(o))throw new TypeError(p);return o}function Yl(o){const p=Cn(o,"Input must be an array");if(!p||p.length===0)throw new TypeError("No list provided or list is empty");return p}function JV(o){return Array.isArray(o)?o:[]}function os(o){return Number(o)}function TPe(o){if(!o||o.length===0)throw new TypeError("No input lists provided");if(!o.every(n=>Array.isArray(n)))throw new TypeError("All inputs must be arrays");const[p,...i]=o;return i.reduce((n,s)=>n.concat(s),p)}function vPe(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 EPe(o,p){const i=Yl(o),n=os(p);return[i.slice(0,n),i.slice(n)]}function bPe(o){return Yl(o).slice().reverse()}function APe(o){return Yl(o).slice(0,-1)}function gPe(o){return Yl(o).slice(1)}function IPe(o,p,i){const n=Cn(o),s=os(p);if(s<0||s>n.length)throw new TypeError("Index out of bounds");return[...n.slice(0,s),i,...n.slice(s)]}function RPe(o,p,i){const n=Yl(o),s=os(p);if(s<0||s>=n.length)throw new TypeError("Index out of bounds");const c=[...n];return c[s]=i,c}function DPe(o,p,i){const n=Yl(o),s=n.indexOf(p);if(s===-1)return n;const c=[...n];return c[s]=i,c}function wPe(o,p,i){const n=Yl(o),s=n.lastIndexOf(p);if(s===-1)return n;const c=[...n];return c[s]=i,c}function OPe(o,p,i){return Yl(o).map(s=>s===p?i:s)}function CPe(o,p){const i=Yl(o),n=os(p);if(n<0||n>=i.length)throw new TypeError("Index out of bounds");return i[n]}function _Pe(o){return Yl(o)[0]}function PPe(o){const p=Yl(o);return p[p.length-1]}function VPe(o,p,...i){return[...Cn(o),p,...i]}function NPe(o,p){const i=Cn(o);return[p,...i]}function xPe(o){return Cn(o).length}function $Pe(o,p){const i=Cn(o),n=os(p);if(n<0||n>=i.length)throw new TypeError("Index out of bounds");return i.slice(0,n).concat(i.slice(n+1))}function LPe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return i.slice(0,n)}function MPe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return n===0?[]:i.slice(-n)}function BPe(o,p,i){const n=Cn(o),s=p==null?void 0:os(p),c=i==null?void 0:os(i);return n.slice(s,c)}function GPe(o,p){return Cn(o).indexOf(p)}function kPe(o,p){return Cn(o).lastIndexOf(p)}function jPe(o){const p=Cn(o),i=[],n=new Set;for(const s of p)n.has(s)||(n.add(s),i.push(s));return i}function UPe(o){return Cn(o).reduce((i,n)=>i.concat(n),[])}function KPe(o){const p=Cn(o);if(p.length<=1)return[...p];const i=p[0],n=typeof i=="number"&&p.every(e=>typeof e=="number"&&Number.isFinite(e)),s=typeof i=="string"&&p.every(e=>typeof e=="string");let c=null;if(n?c="number":s&&(c=p.every(y=>Kvi.test(y)&&M(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)=>M(e).valueOf()-M(y).valueOf())}function FPe(o){const i=[...Cn(o)];for(let n=i.length-1;n>0;n--){const s=Math.floor(jI()*(n+1));[i[n],i[s]]=[i[s],i[n]]}return i}function SPe(o,p){const i=Cn(o),n=Math.max(1,os(p)||1),s=[];for(let c=0;c<i.length;c+=n)s.push(i.slice(c,c+n));return s}function qPe(o,p,i){const n=Cn(o),s=Math.max(0,os(p)||0);if(n.length>=s)return[...n];const c=s-n.length;return Array(c).fill(i).concat(n)}function ZPe(o,p,i){const n=Cn(o),s=Math.max(0,os(p)||0);if(n.length>=s)return[...n];const c=s-n.length,e=Array(c).fill(i);return n.concat(e)}function HPe(o,p){const i=Cn(o),n=Math.max(0,os(p)||0),s=[];for(let c=0;c<n;c++)s.push(...i);return s}function WPe(o,p){if(!zV(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return JV(o).some(n=>n===p)}function zPe(o,p){const i=JV(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(zV))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return n.every(s=>i.includes(s))}function JPe(o,p){const i=JV(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(zV))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return n.some(s=>i.includes(s))}class YPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=TPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class XPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Split);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],[y,m]=EPe(c,e);return{value:G.Success,error:null,result:[y,m]}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class QPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Reverse);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=bPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class eVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.DeleteLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=APe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.DeleteFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=gPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.AddAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=IPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=RPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=DPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=wPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceAll);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=OPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetIndexItem);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=CPe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetFirst);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=_Pe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetLast);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=PPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Append);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s.slice(2),m=VPe(c,e,...y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class pVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Prepend);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=NPe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLength);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.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:xPe(s)}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.DeleteAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=$Pe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=LPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class hVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=MPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class mVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Slice);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=BPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class TVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Concat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),[c,...e]=s,y=vPe(c,...e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class vVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=GPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class EVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLastIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=kPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class bVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Unique);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=jPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class AVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Flatten);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=UPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class gVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Sort);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=KPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class IVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Shuffle);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=FPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class RVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Chunk);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=SPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class DVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.PadStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=qPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class wVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.PadEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=ZPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class OVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Repeat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=HPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class CVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Contains);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=WPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class _Ve 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.ContainsAll);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=zPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class PVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.ContainsAny);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=JPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Fvi 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.GetLength);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.length;return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class VVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{var s,c,e;try{const y=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.separator.id}),m=((s=y==null?void 0:y.value)==null?void 0:s.value)||"",v=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=n.filter(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.dynamicString.id}).map(j=>{var F,q;return((F=j.value)==null?void 0:F.valueAsType)||((q=j.value)==null?void 0:q.value)||""}),L=[E,w,...$].join(m);return{value:G.Success,error:null,result:L}}catch(y){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:y,result:null}}}})}}class NVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y={firstPart:c.slice(0,e),secondPart:c.slice(e)};return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class xVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtAllSeparators);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=c.split(e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $Ve 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtFirstSeparator);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class LVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtLastSeparator);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class MVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class BVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class GVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Reverse);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class kVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ToLowerCase);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class jVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ToUpperCase);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class UVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class KVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.AddAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class FVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]??1,y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class SVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]??1,y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class qVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2]??1,m=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ZVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceFirstMatch);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class HVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceLastMatch);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class WVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceAllMatches);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class zVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetIndexItem);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class JVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class YVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class XVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class QVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Append);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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=s.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class eNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Prepend);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Trim);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trim();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.TrimStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trimStart();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.TrimEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trimEnd();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Substring);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.substring(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Slice);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.slice(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.GetLastIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.lastIndexOf(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.PadStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.padStart(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.PadEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.padEnd(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Repeat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=s.repeat(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.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(s??"").match(y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class pNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchAllRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)??((P=b.value)==null?void 0:P.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(s??"").matchAll(v),b=>Array.from(b));return{value:G.Success,error:null,result:E}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.SearchRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.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(s??"").search(m)}catch{y=-1}return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.ReplaceRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e,y]=n.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(s??"");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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.NormalizeUnicode);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=s.normalize(c||"NFC");return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}const $A=class $A 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemoveDiacritics);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=String(s??"").normalize("NFD").replace($A.COMBINING_MARKS,"");return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}};I($A,"COMBINING_MARKS",/[\u0300-\u036f]/g);let cA=$A;class hNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.CountOccurrences);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=y===""?0:e.split(y).length-1;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class mNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EnsurePrefix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.startsWith(y)?e:y+e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class TNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EnsureSuffix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.endsWith(y)?e:e+y;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class vNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemovePrefix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.startsWith(y)?e.slice(y.length):e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ENe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemoveSuffix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.endsWith(y)?e.slice(0,-y.length):e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class bNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.StartsWith);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("StartsWith expects two strings.");const e=s.startsWith(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ANe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EndsWith);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("EndsWith expects two strings.");const e=s.endsWith(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class gNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Contains);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("Contains expects two strings.");const e=s.includes(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class INe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchesRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)});if(typeof s!="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(s),{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}function RNe(o,p){const i=Number(o),s=10**Math.max(0,Number(p)||0);return Math.round(i*s)/s}function DNe(o,p){const i=Number(o),n=Math.abs(Number(p)||0);return n===0?i:Math.round(i/n)*n}function wNe(o,p,i){const n=Number(o),s=Number(p),c=Number(i);return Math.min(Math.max(n,s),c)}function ONe(o,p,i,n,s){const c=Number(o),e=Number(p),y=Number(i),m=Number(n),v=Number(s);if(e===y)throw new Error("Input range cannot be zero");const E=(c-e)/(y-e);return m+E*(v-m)}function CNe(...o){const p=o.map(n=>Number(n));return p.length===0?0:p.reduce((n,s)=>n+s,0)/p.length}function _Ne(...o){const p=o.map(n=>Number(n)).sort((n,s)=>n-s);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 PNe(o,p){const i=Number(o),n=Number(p);return n===0?NaN:i<0&&n%2===1?-Math.pow(-i,1/n):Math.pow(i,1/n)}function VNe(o,p){const i=Number(o),n=Number(p);return i===0?1/0:(n-i)/i*100}const li=o=>o.map(p=>{var i,n;return((i=p.value)==null?void 0:i.valueAsType)??((n=p.value)==null?void 0:n.value)});class NNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Addition);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e+y,0);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class xNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Subtraction);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e-y,0);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $Ne 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Multiplication);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e*y,1);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class LNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Division);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n);if(c===0)throw new Error("Division by zero is not allowed");const e=s/c;return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class MNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Remainder);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n);if(c===0)throw new Error("Division by zero is not allowed");const e=s%c;return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class BNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Exponentiation);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n),e=Math.pow(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class GNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Negate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:-s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class kNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Absolute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.abs(Number(s))}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class jNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Sign);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sign(Number(s))}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class UNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Round);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.round(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class KNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Floor);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.floor(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class FNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Ceil);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.ceil(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class SNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Trunc);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.trunc(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class qNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.RoundToDecimals);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=RNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class ZNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.SnapToStep);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=DNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class HNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Clamp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=li(n),y=wNe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class WNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MapRange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e,y,m]=li(n),v=ONe(s,c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class zNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Average);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n),c=CNe(...s);return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class JNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Median);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n),c=_Ne(...s);return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class YNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MinOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n).map(Number),c=s.length?Math.min(...s):1/0;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class XNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MaxOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n).map(Number),c=s.length?Math.max(...s):-1/0;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class QNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.SquareRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sqrt(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class exe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.CubeRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.cbrt(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class txe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.NthRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=PNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class ixe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Exp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.exp(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class rxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LogNatural);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.log(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class nxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Log10);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n),c=Number(s),e=Math.log10?Math.log10(c):Math.log(c)/Math.LN10;return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class axe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Sin);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sin(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class sxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Cos);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.cos(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class lxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Tan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.tan(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class oxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Asin);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.asin(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class dxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Acos);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.acos(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class uxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Atan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.atan(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class pxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Atan2);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:Math.atan2(Number(s),Number(c))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class cxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.ToRadians);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Number(s)*Math.PI/180}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class fxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.ToDegrees);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Number(s)*180/Math.PI}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class yxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.PercentOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=Number(s)/100*Number(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class HO 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.PercentageChange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=VNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class hxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LessThan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s<c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class mxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MoreThan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s>c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class Txe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LessThanOrEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s<=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class vxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MoreThanOrEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s>=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}function Exe(o,p){return function(){return o.apply(p,arguments)}}const{toString:Svi}=Object.prototype,{getPrototypeOf:YV}=Object,{iterator:FI,toStringTag:bxe}=Symbol,SI=(o=>p=>{const i=Svi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Xl=o=>(o=o.toLowerCase(),p=>SI(p)===o),qI=o=>p=>typeof p===o,{isArray:$h}=Array,Ry=qI("undefined");function sv(o){return o!==null&&!Ry(o)&&o.constructor!==null&&!Ry(o.constructor)&&Ga(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Axe=Xl("ArrayBuffer");function qvi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&Axe(o.buffer),p}const Zvi=qI("string"),Ga=qI("function"),gxe=qI("number"),lv=o=>o!==null&&typeof o=="object",Hvi=o=>o===!0||o===!1,jb=o=>{if(SI(o)!=="object")return!1;const p=YV(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(bxe in o)&&!(FI in o)},Wvi=o=>{if(!lv(o)||sv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},zvi=Xl("Date"),Jvi=Xl("File"),Yvi=Xl("Blob"),Xvi=Xl("FileList"),Qvi=o=>lv(o)&&Ga(o.pipe),eEi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ga(o.append)&&((p=SI(o))==="formdata"||p==="object"&&Ga(o.toString)&&o.toString()==="[object FormData]"))},tEi=Xl("URLSearchParams"),[iEi,rEi,nEi,aEi]=["ReadableStream","Request","Response","Headers"].map(Xl),sEi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ov(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let n,s;if(typeof o!="object"&&(o=[o]),$h(o))for(n=0,s=o.length;n<s;n++)p.call(null,o[n],n,o);else{if(sv(o))return;const c=i?Object.getOwnPropertyNames(o):Object.keys(o),e=c.length;let y;for(n=0;n<e;n++)y=c[n],p.call(null,o[y],y,o)}}function Ixe(o,p){if(sv(o))return null;p=p.toLowerCase();const i=Object.keys(o);let n=i.length,s;for(;n-- >0;)if(s=i[n],p===s.toLowerCase())return s;return null}const Ec=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Rxe=o=>!Ry(o)&&o!==Ec;function WO(){const{caseless:o,skipUndefined:p}=Rxe(this)&&this||{},i={},n=(s,c)=>{const e=o&&Ixe(i,c)||c;jb(i[e])&&jb(s)?i[e]=WO(i[e],s):jb(s)?i[e]=WO({},s):$h(s)?i[e]=s.slice():(!p||!Ry(s))&&(i[e]=s)};for(let s=0,c=arguments.length;s<c;s++)arguments[s]&&ov(arguments[s],n);return i}const lEi=(o,p,i,{allOwnKeys:n}={})=>(ov(p,(s,c)=>{i&&Ga(s)?o[c]=Exe(s,i):o[c]=s},{allOwnKeys:n}),o),oEi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),dEi=(o,p,i,n)=>{o.prototype=Object.create(p.prototype,n),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:p.prototype}),i&&Object.assign(o.prototype,i)},uEi=(o,p,i,n)=>{let s,c,e;const y={};if(p=p||{},o==null)return p;do{for(s=Object.getOwnPropertyNames(o),c=s.length;c-- >0;)e=s[c],(!n||n(e,o,p))&&!y[e]&&(p[e]=o[e],y[e]=!0);o=i!==!1&&YV(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},pEi=(o,p,i)=>{o=String(o),(i===void 0||i>o.length)&&(i=o.length),i-=p.length;const n=o.indexOf(p,i);return n!==-1&&n===i},cEi=o=>{if(!o)return null;if($h(o))return o;let p=o.length;if(!gxe(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},fEi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&YV(Uint8Array)),yEi=(o,p)=>{const n=(o&&o[FI]).call(o);let s;for(;(s=n.next())&&!s.done;){const c=s.value;p.call(o,c[0],c[1])}},hEi=(o,p)=>{let i;const n=[];for(;(i=o.exec(p))!==null;)n.push(i);return n},mEi=Xl("HTMLFormElement"),TEi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),T4=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),vEi=Xl("RegExp"),Dxe=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),n={};ov(i,(s,c)=>{let e;(e=p(s,c,o))!==!1&&(n[c]=e||s)}),Object.defineProperties(o,n)},EEi=o=>{Dxe(o,(p,i)=>{if(Ga(o)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const n=o[i];if(Ga(n)){if(p.enumerable=!1,"writable"in p){p.writable=!1;return}p.set||(p.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},bEi=(o,p)=>{const i={},n=s=>{s.forEach(c=>{i[c]=!0})};return $h(o)?n(o):n(String(o).split(p)),i},AEi=()=>{},gEi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function IEi(o){return!!(o&&Ga(o.append)&&o[bxe]==="FormData"&&o[FI])}const REi=o=>{const p=new Array(10),i=(n,s)=>{if(lv(n)){if(p.indexOf(n)>=0)return;if(sv(n))return n;if(!("toJSON"in n)){p[s]=n;const c=$h(n)?[]:{};return ov(n,(e,y)=>{const m=i(e,s+1);!Ry(m)&&(c[y]=m)}),p[s]=void 0,c}}return n};return i(o,0)},DEi=Xl("AsyncFunction"),wEi=o=>o&&(lv(o)||Ga(o))&&Ga(o.then)&&Ga(o.catch),wxe=((o,p)=>o?setImmediate:p?((i,n)=>(Ec.addEventListener("message",({source:s,data:c})=>{s===Ec&&c===i&&n.length&&n.shift()()},!1),s=>{n.push(s),Ec.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ga(Ec.postMessage)),OEi=typeof queueMicrotask<"u"?queueMicrotask.bind(Ec):typeof process<"u"&&process.nextTick||wxe,CEi=o=>o!=null&&Ga(o[FI]),Ue={isArray:$h,isArrayBuffer:Axe,isBuffer:sv,isFormData:eEi,isArrayBufferView:qvi,isString:Zvi,isNumber:gxe,isBoolean:Hvi,isObject:lv,isPlainObject:jb,isEmptyObject:Wvi,isReadableStream:iEi,isRequest:rEi,isResponse:nEi,isHeaders:aEi,isUndefined:Ry,isDate:zvi,isFile:Jvi,isBlob:Yvi,isRegExp:vEi,isFunction:Ga,isStream:Qvi,isURLSearchParams:tEi,isTypedArray:fEi,isFileList:Xvi,forEach:ov,merge:WO,extend:lEi,trim:sEi,stripBOM:oEi,inherits:dEi,toFlatObject:uEi,kindOf:SI,kindOfTest:Xl,endsWith:pEi,toArray:cEi,forEachEntry:yEi,matchAll:hEi,isHTMLForm:mEi,hasOwnProperty:T4,hasOwnProp:T4,reduceDescriptors:Dxe,freezeMethods:EEi,toObjectSet:bEi,toCamelCase:TEi,noop:AEi,toFiniteNumber:gEi,findKey:Ixe,global:Ec,isContextDefined:Rxe,isSpecCompliantForm:IEi,toJSONObject:REi,isAsyncFn:DEi,isThenable:wEi,setImmediate:wxe,asap:OEi,isIterable:CEi};function ni(o,p,i,n,s){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),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}Ue.inherits(ni,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:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const Oxe=ni.prototype,Cxe={};["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=>{Cxe[o]={value:o}});Object.defineProperties(ni,Cxe);Object.defineProperty(Oxe,"isAxiosError",{value:!0});ni.from=(o,p,i,n,s,c)=>{const e=Object.create(Oxe);Ue.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 ni.call(e,y,m,i,n,s),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 _Ei=null;function zO(o){return Ue.isPlainObject(o)||Ue.isArray(o)}function _xe(o){return Ue.endsWith(o,"[]")?o.slice(0,-2):o}function v4(o,p,i){return o?o.concat(p).map(function(s,c){return s=_xe(s),!i&&c?"["+s+"]":s}).join(i?".":""):p}function PEi(o){return Ue.isArray(o)&&!o.some(zO)}const VEi=Ue.toFlatObject(Ue,{},null,function(p){return/^is[A-Z]/.test(p)});function ZI(o,p,i){if(!Ue.isObject(o))throw new TypeError("target must be an object");p=p||new FormData,i=Ue.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,j){return!Ue.isUndefined(j[L])});const n=i.metaTokens,s=i.visitor||E,c=i.dots,e=i.indexes,m=(i.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(p);if(!Ue.isFunction(s))throw new TypeError("visitor must be a function");function v($){if($===null)return"";if(Ue.isDate($))return $.toISOString();if(Ue.isBoolean($))return $.toString();if(!m&&Ue.isBlob($))throw new ni("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer($)||Ue.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,L,j){let F=$;if($&&!j&&typeof $=="object"){if(Ue.endsWith(L,"{}"))L=n?L:L.slice(0,-2),$=JSON.stringify($);else if(Ue.isArray($)&&PEi($)||(Ue.isFileList($)||Ue.endsWith(L,"[]"))&&(F=Ue.toArray($)))return L=_xe(L),F.forEach(function(X,ne){!(Ue.isUndefined(X)||X===null)&&p.append(e===!0?v4([L],ne,c):e===null?L:L+"[]",v(X))}),!1}return zO($)?!0:(p.append(v4(j,L,c),v($)),!1)}const b=[],w=Object.assign(VEi,{defaultVisitor:E,convertValue:v,isVisitable:zO});function P($,L){if(!Ue.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+L.join("."));b.push($),Ue.forEach($,function(F,q){(!(Ue.isUndefined(F)||F===null)&&s.call(p,F,Ue.isString(q)?q.trim():q,L,w))===!0&&P(F,L?L.concat(q):[q])}),b.pop()}}if(!Ue.isObject(o))throw new TypeError("data must be an object");return P(o),p}function E4(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(n){return p[n]})}function XV(o,p){this._pairs=[],o&&ZI(o,this,p)}const Pxe=XV.prototype;Pxe.append=function(p,i){this._pairs.push([p,i])};Pxe.toString=function(p){const i=p?function(n){return p.call(this,n,E4)}:E4;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function NEi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vxe(o,p,i){if(!p)return o;const n=i&&i.encode||NEi;Ue.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let c;if(s?c=s(p,i):c=Ue.isURLSearchParams(p)?p.toString():new XV(p,i).toString(n),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class xEi{constructor(){this.handlers=[]}use(p,i,n){return this.handlers.push({fulfilled:p,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(p){this.handlers[p]&&(this.handlers[p]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(p){Ue.forEach(this.handlers,function(n){n!==null&&p(n)})}}const b4=xEi,Nxe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$Ei=typeof URLSearchParams<"u"?URLSearchParams:XV,LEi=typeof FormData<"u"?FormData:null,MEi=typeof Blob<"u"?Blob:null,BEi={isBrowser:!0,classes:{URLSearchParams:$Ei,FormData:LEi,Blob:MEi},protocols:["http","https","file","blob","url","data"]},QV=typeof window<"u"&&typeof document<"u",JO=typeof navigator=="object"&&navigator||void 0,GEi=QV&&(!JO||["ReactNative","NativeScript","NS"].indexOf(JO.product)<0),kEi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),jEi=QV&&window.location.href||"http://localhost",UEi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:QV,hasStandardBrowserEnv:GEi,hasStandardBrowserWebWorkerEnv:kEi,navigator:JO,origin:jEi},Symbol.toStringTag,{value:"Module"})),na={...UEi,...BEi};function KEi(o,p){return ZI(o,new na.classes.URLSearchParams,{visitor:function(i,n,s,c){return na.isNode&&Ue.isBuffer(i)?(this.append(n,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...p})}function FEi(o){return Ue.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function SEi(o){const p={},i=Object.keys(o);let n;const s=i.length;let c;for(n=0;n<s;n++)c=i[n],p[c]=o[c];return p}function xxe(o){function p(i,n,s,c){let e=i[c++];if(e==="__proto__")return!0;const y=Number.isFinite(+e),m=c>=i.length;return e=!e&&Ue.isArray(s)?s.length:e,m?(Ue.hasOwnProp(s,e)?s[e]=[s[e],n]:s[e]=n,!y):((!s[e]||!Ue.isObject(s[e]))&&(s[e]=[]),p(i,n,s[e],c)&&Ue.isArray(s[e])&&(s[e]=SEi(s[e])),!y)}if(Ue.isFormData(o)&&Ue.isFunction(o.entries)){const i={};return Ue.forEachEntry(o,(n,s)=>{p(FEi(n),s,i,0)}),i}return null}function qEi(o,p,i){if(Ue.isString(o))try{return(p||JSON.parse)(o),Ue.trim(o)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(o)}const eN={transitional:Nxe,adapter:["xhr","http","fetch"],transformRequest:[function(p,i){const n=i.getContentType()||"",s=n.indexOf("application/json")>-1,c=Ue.isObject(p);if(c&&Ue.isHTMLForm(p)&&(p=new FormData(p)),Ue.isFormData(p))return s?JSON.stringify(xxe(p)):p;if(Ue.isArrayBuffer(p)||Ue.isBuffer(p)||Ue.isStream(p)||Ue.isFile(p)||Ue.isBlob(p)||Ue.isReadableStream(p))return p;if(Ue.isArrayBufferView(p))return p.buffer;if(Ue.isURLSearchParams(p))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let y;if(c){if(n.indexOf("application/x-www-form-urlencoded")>-1)return KEi(p,this.formSerializer).toString();if((y=Ue.isFileList(p))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return ZI(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||s?(i.setContentType("application/json",!1),qEi(p)):p}],transformResponse:[function(p){const i=this.transitional||eN.transitional,n=i&&i.forcedJSONParsing,s=this.responseType==="json";if(Ue.isResponse(p)||Ue.isReadableStream(p))return p;if(p&&Ue.isString(p)&&(n&&!this.responseType||s)){const e=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(p,this.parseReviver)}catch(y){if(e)throw y.name==="SyntaxError"?ni.from(y,ni.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:na.classes.FormData,Blob:na.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],o=>{eN.headers[o]={}});const tN=eN,ZEi=Ue.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"]),HEi=o=>{const p={};let i,n,s;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:n,modifiedData:i}}subscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]||(this.detachedDependents[n.entity.id]=n)}),this}unsubscribeDependents(i){return i.forEach(n=>{this.detachedDependents[n.entity.id]&&delete this.detachedDependents[n.entity.id]}),this}syncDependents(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"sync-dependents"))){const n=[],s=[],c=[],e=[];return Object.values(this.detachedDependents).forEach(y=>{const m=y.entity.afterAllChildrenInitialized(i);n.push(...m.updated),s.push(...m.added),c.push(...m.removed),e.push(...m.affected)}),i==null||i.attemptAutoclose("sync-dependents",this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}onDetachedDependencyRemoved(i,n,s){const c=[],e=[],y=[],m=[];return n==="value-as-type-single"&&(this.valueAsTypeSingle=null,s==null||s.add(this,H.Updated)),n==="value-as-type-list"&&(this.valueAsTypeList=(this.valueAsTypeList||[]).filter(v=>v.id!==i.id),s==null||s.add(this,H.Updated)),{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:this}}onDetachedDependencyRestored(i,n,s){const c=[],e=[],y=[],m=[];return n==="value-as-type-single"&&(this.valueAsTypeSingle=i,s==null||s.add(this,H.Updated)),n==="value-as-type-list"&&(this.valueAsTypeList=[...Array.isArray(this.valueAsTypeList||[])?this.valueAsTypeList:[],i],s==null||s.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&&!M(i).isValid())throw new Error(`The shared timestamp '${i}' is not a valid ISO 8601 date string.`);return i&&M(i).isSame(M(this.createdAt))?this:(this.previousVersion=this.version,this.version=x.UUID.uuid(),this.createdAt=M(i).toISOString()||M().toISOString(),this)}captureVersion(){var n;const i=((n=this.knownVersions)==null?void 0:n.get(this.version))||new fi(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 n=[],s=[],c=[],e=[];if(this.parent){this.parent.increaseVersion(i);const y=this.parent.recursiveCaptureUpstreamVersions(i);n.push(this.parent,...y.updated),s.push(...y.added),c.push(...y.removed)}return{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}async restoreVersion(i){var m;const n=[],s=[],c=[],e=[];if(this.version===i)return{updated:D(n),added:D(s),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,P]of b.knownVersions)v.set(w,P);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 fi(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(n),added:D(s),removed:D(c),affected:D(e),self:this}}updateWithShallowTransfer(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.UpdateWithShallowTransfer))){if(!this.checkCanEdit(this,n))return J.Logger.warn(`[updateWithShallowTransfer] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this;if(this.metaSync(i,n),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 s=re(i.parent),c=this.project.get(s),e=this.parent;if(e&&e.id!==(c==null?void 0:c.id)&&this.removeFromParent(n),c)this.setParent(c,n),this.addSelfToProject(n);else throw new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${s}' that isn't found in the project`)}else if(i.standaloneParent){const s=re(i.standaloneParent),c=this.project.get(s);if(c)this.setStandaloneParent(c,n);else throw new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${s}' 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(s=>{const c=re(s),e=this.project.get(c);e&&this.addValueAsTypeToList(e,n)}),[...this.valueAsTypeList].forEach(s=>{(i.valueAsTypeList||[]).find(e=>re(e)===s.id)||this.removeValueAsTypeFromList(s,n)}),this.setValueAsTypeSingle(null,n),this.metaSync({value:null},n);else if(i.valueAsTypeSingle){const s=re(i.valueAsTypeSingle),c=this.project.get(s);c&&(this.setValueAsTypeSingle(c,n),this.setValueAsTypeList(null,n),this.metaSync({value:null},n))}else this.setValueAsTypeSingle(null,n),this.setValueAsTypeList(null,n);return this.captureVersion(),this.subscribeToDependencies(),n==null||n.attemptAutoclose(_.UpdateWithShallowTransfer,this.id),this}hydrateAncestors(){const i=[],n=[],s=[],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=re(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=re(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=re(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=re(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(n),removed:D(s),affected:D(c),self:this}}afterAllChildrenInitialized(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],c=[],e=[];return this.initialized=!0,this.captureVersion(),i==null||i.attemptAutoclose(_.AfterAllChildrenInitialized,this.id),{updated:D(n),added:D(s),removed:D(c),affected:D(e),self:this}}addSelfToProject(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"add-self-to-project"))){var y,m;const n=[this],s=[],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(n),added:D(s),removed:D(c),affected:D(e),self:this}}setParent(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetParent,n)?(((s=this.parent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.parent=i,n&&(n==null||n.add(this,H.Updated))),n==null||n.attemptAutoclose(_.SetParent,this.id),this):this}setStandaloneParent(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetStandaloneParent))){var s;return this.checkCanEditWithCounterpartAndSideEffects(this,i,_.SetStandaloneParent,n)?(((s=this.standaloneParent)==null?void 0:s.id)!==(i==null?void 0:i.id)&&(this.standaloneParent=i,n&&(n==null||n.add(this,H.Updated))),n==null||n.attemptAutoclose(_.SetStandaloneParent,this.id),this):this}addValueAsTypeToList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.AddValueAsTypeToList))){return this.checkCanEdit(this,n)?((this.valueAsTypeList||[]).includes(i)||(this.valueAsTypeList=this.valueAsTypeList||[],this.valueAsTypeList.push(i),this.value!==null&&this.metaSync({value:null},n),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,n==null||n.add(this,H.Updated)),n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.AddValueAsTypeToList,this.id),this):(J.Logger.warn(`[addValueAsTypeToList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.AddValueAsTypeToList,this.id),this)}removeValueAsTypeFromList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveValueAsTypeFromList))){return this.checkCanEdit(this,n)?(this.valueAsTypeList&&Array.isArray(this.valueAsTypeList)&&(this.valueAsTypeList||[]).includes(i)&&(this.valueAsTypeList=this.valueAsTypeList.filter(s=>s.id!==i.id),this.valueAsTypeList.length===0?this.valueAsTypeList=null:(this.value!==null&&this.metaSync({value:null},n),this.valueAsTypeSingle!==null&&(this.valueAsTypeSingle=null,n==null||n.add(this,H.Updated))),n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this):(J.Logger.warn(`[removeValueAsTypeFromList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.RemoveValueAsTypeFromList,this.id),this)}setValueAsTypeSingle(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsTypeSingle))){return this.checkCanEdit(this,n)?(this.valueAsTypeSingle!==i&&(this.valueAsTypeSingle=i,n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this):(J.Logger.warn(`[setValueAsTypeSingle] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsTypeSingle,this.id),this)}setValueAsTypeList(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsTypeList))){var s,c;return this.checkCanEdit(this,n)?(!i&&this.valueAsTypeList?(this.valueAsTypeList=null,n==null||n.add(this,H.Updated)):i&&!this.valueAsTypeList?(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)):i&&this.valueAsTypeList&&((s=this.valueAsTypeList)==null?void 0:s.length)!==i.length?(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)):i&&this.valueAsTypeList&&((c=this.valueAsTypeList)!=null&&c.every((e,y)=>e!==i[y]))&&(this.valueAsTypeList=i,n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose(_.SetValueAsTypeList,this.id),this):(J.Logger.warn(`[setValueAsTypeList] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsTypeList,this.id),this)}setValueAsType(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.SetValueAsType))){return this.checkCanEdit(this,n)?i?(Array.isArray(i)?this.setValueAsTypeList(i,n):this.setValueAsTypeSingle(i,n),n==null||n.attemptAutoclose(_.SetValueAsType,this.id),this):(this.setValueAsTypeSingle(null,n),this.setValueAsTypeList(null,n),this):(J.Logger.warn(`[setValueAsType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`),n==null||n.attemptAutoclose(_.SetValueAsType,this.id),this)}initChildren(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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(n=>{if(n.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(n);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.entityType}' with id '${n.entityId}' that is not part of the project state.`);return c}const s=this.project.get(n.id);if(!s)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.type}' with id '${n.id}' that is not part of the project state.`);return s});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const s=this.project.findSubscribedBuiltInInstanceFromReference(this.initialData.valueAsTypeSingle);if(!s)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=s,this}const n=this.project.get(this.initialData.valueAsTypeSingle.id);if(!n)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=n}return this}if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.initialData.valueAsTypeList.map(n=>{if(n.type===d.GenericReference){const c=this.project.findSubscribedBuiltInInstanceFromReference(n);if(!c)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.entityType}' with id '${n.entityId}' that is not part of the project state.`);return c}const s=this.project.get(n.id);if(!s)throw new Error(`Standalone entity of type '${this.type}' with id '${this.id}' has a reference to an entity of type '${n.type}' with id '${n.id}' that is not part of the project state.`);return s});else if(this.initialData.valueAsTypeSingle){if(this.initialData.valueAsTypeSingle.type===d.GenericReference){const s=re(this.initialData.valueAsTypeSingle),c=s?this.project.get(s):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 n=this.project.get(this.initialData.valueAsTypeSingle.id);if(!n)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=n}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,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"meta-sync"))){const s=Mr(this,i,n),c=Lr(this,s),e=this.toMeta();return this.name=s.name!==void 0?s.name:e.name,this.autogeneration=s.autogeneration!==void 0?s.autogeneration:e.autogeneration,this.value=s.value!==void 0?s.value:e.value,super.baseMetaSync(s,this,n),s.deleted===!0&&!e.deleted?n==null||n.add(this,H.Removed):s.deleted===!1&&e.deleted?n==null||n.add(this,H.Added):c&&(n==null||n.add(this,H.Updated)),n==null||n.attemptAutoclose("meta-sync",this.id),this}async APILoad(i=ke,...n){return await fi.repository.APILoad(this.id,...n),this}async APICreate(i=ke,...n){return await fi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=ke,...n){return await fi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=ke,...n){return await fi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=ke,...n){return await fi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=ke,n,...s){return await fi.repository.APILoadVersion(this.id,n,...s)}removeFromParent(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],c=[],e=[];return this.parent&&(this.parent.type===d.DataType?this.parent.setEntity(null,i):BA.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(n),removed:D(s),affected:D(e),self:this}}remove({ignoreUpstream:i}={ignoreUpstream:!1},n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.RemoveEntity))){var m;if(!this.checkCanDelete(this,n))return J.Logger.warn(`[remove] User is not allowed to delete or edit this ${this.type} entity with id: ${this.id}`),n==null||n.event({id:`${_.RemoveEntity}-${this.id}`,action:_.RemoveEntity,owner:this,errorReason:rr.ActionOwnerEntityNonDeletable,rootAction:((m=n==null?void 0:n.self)==null?void 0:m.id)===this.id&&(n==null?void 0:n.autoCloseActionName)===_.RemoveEntity}),n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:[],updated:[],removed:[],affected:[],self:this};const s=[],c=[],e=[],y=[];if(n!=null&&n.hasRemoved(this.id))return n==null||n.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},n),Object.values(this.detachedDependents).forEach(v=>{const{updated:E,removed:b,added:w}=v.entity.onDetachedDependencyRemoved(this,v.field,n);s.push(...E),c.push(...b),e.push(...w)}),!i){const v=this.removeFromParent(n);e.push(...v.added),s.push(...v.updated),c.push(...v.removed),y.push(...v.affected)}return n==null||n.attemptAutoclose(_.RemoveEntity,this.id),{added:D(e),updated:D(s),removed:D(c),affected:D(y),self:this}}restore({}={},i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().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 n=[],s=[],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);s.push(...m),c.push(...v),n.push(...E)}),i==null||i.attemptAutoclose(_.RestoreEntity,this.id),{added:D(n),updated:D(s),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(s=>s.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(s=>s.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 n,s,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:((n=this.valueAsTypeSingle)==null?void 0:n.toJSON(i))||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(e=>e.toJSON(i)):null,parent:(s=this.parent)==null?void 0:s.toReference(),standaloneParent:(c=this.standaloneParent)==null?void 0:c.toReference()})}toJSONClone(i=ct){var s,c,e,y,m,v,E;let n;return(s=i.seenEntityMaps)!=null&&s.has(this.id)?n=i.seenEntityMaps.get(this.id):(n=i.newId||jr(this,this.project,i.uuidStrategy),i.seenEntityMaps&&i.seenEntityMaps.set(this.id,n)),(c=i.seenEntities)!=null&&c.has(n)||(e=i.seenEntities)!=null&&e.has(this.id)?this.toReference({seenEntityMaps:i.seenEntityMaps}):((y=i.seenEntities)==null||y.add(n),(m=i.seenEntities)==null||m.add(this.id),{id:n,version:x.UUID.uuid(),createdAt:i.timestamp||M().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=ct){var s;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:n,version:this.version,entityType:this.type}}toShallowJSON(i=ct){var s,c,e,y;let n=this.id;return(s=i.seenEntityMaps)!=null&&s.has(this.id)&&(n=i.seenEntityMaps.get(this.id)),{id:n,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(s=>s.toFlatJSON(i)):[]])}toGenerationTarget(){var i,n,s;return{id:this.id,type:this.type,name:this.name,valueAsTypeSingle:((i=this.valueAsTypeSingle)==null?void 0:i.id)||null,valueAsTypeList:Array.isArray(this.valueAsTypeSingle)?this.valueAsTypeSingle.map(c=>c.id):null,value:this.value,autogeneration:this.autogeneration,parent:(n=this.parent)==null?void 0:n.id,standaloneParent:(s=this.standaloneParent)==null?void 0:s.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(s=>s.toFlatGenerationTarget(i)):[]])}clearErrors(){return this.errors=[],this}validate(){return this.errors=lOe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await sOe(this,{tracker:n}),{success:!0}}getErrors(){return[...this.errors]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];return await n.tick(),s}getShallowErrors(){return this.errors}clone(i=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,_.CloneEntity)),n=null,s=null,c=!0){const e=Nr(n,this),y=this.toJSON(),m=s||x.UUID.uuid();y.id=m,y.version=x.UUID.uuid(),y.createdAt=(i==null?void 0:i.timestamp)||M().toISOString(),y.author=(i==null?void 0:i.author)||"1",y.previousVersion=null,y.deleted=!1,y.editable=!0,y.deletable=!0;const v=Ki(y,e);return v.hydrateAncestors(),n&&v.setParent(n,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,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),this,!0,"merge-literal-value"))){const s=[],c=[],e=[],y=[];return this.valueAsTypeSingle!==(i==null?void 0:i.valueAsTypeSingle)&&(this.setValueAsType(i.valueAsTypeSingle,n),s.push(this)),this.valueAsTypeList!==i.valueAsTypeList&&(this.setValueAsTypeList(i.valueAsTypeList,n),s.push(this)),this.value!==i.value&&(this.metaSync({value:i.value},n),s.push(this)),this.autogeneration!==i.autogeneration&&(this.metaSync({autogeneration:i.autogeneration},n),s.push(this)),this.name!==i.name&&(this.metaSync({name:i.name},n),s.push(this)),n==null||n.attemptAutoclose("merge-literal-value",this.id),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:this}}};I(fi,"repository",{APICreate:async(i,...n)=>i,APIUpdate:async(i,...n)=>i,APIDelete:async(i,...n)=>i,APIClone:async(i,...n)=>{},APILoad:async(i,...n)=>null,APILoadVersion:async(i,n,...s)=>null}),I(fi,"type",d.LiteralValue),I(fi,"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(fi,"PARENT_TYPES",[...fi.USER_MANAGED_PARENT_TYPES]),I(fi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(fi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(fi,"BASE_PROPERTIES",[...fi.MUTABLE_BASE_PROPERTIES,...fi.INMUTABLE_BASE_PROPERTIES]),I(fi,"MUTABLE_META_PROPERTIES",[...fi.MUTABLE_BASE_PROPERTIES]),I(fi,"INMUTABLE_META_PROPERTIES",[...fi.INMUTABLE_BASE_PROPERTIES]),I(fi,"META_PROPERTIES",[...fi.MUTABLE_META_PROPERTIES,...fi.INMUTABLE_META_PROPERTIES]),I(fi,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(fi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(fi,"UPSTREAM_PROPERTIES",[...fi.MUTABLE_UPSTREAM_PROPERTIES,...fi.INMUTABLE_UPSTREAM_PROPERTIES]),I(fi,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(fi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(fi,"DOWNSTREAM_PROPERTIES",[...fi.MUTABLE_DOWNSTREAM_PROPERTIES,...fi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(fi,"PROPERTIES",[...fi.META_PROPERTIES,...fi.UPSTREAM_PROPERTIES,...fi.DOWNSTREAM_PROPERTIES]);let Xr=fi;function Xc(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 dOe(o,p){const i=p-o+1,s=jI()*i;return Math.floor(s)+o}function uOe(){const o=Xc(4);return(o[0]<<24|o[1]<<16|o[2]<<8|o[3])>>>0}function jI(){return uOe()/2**32}function $V(o){const p=Xc(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const FO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function LV(o){let p="";const i=Xc(o);for(let n=0;n<o;n++)p+=FO[i[n]%FO.length];return p}function pOe(o){const p=Xc(o);let i;if(typeof Buffer<"u")i=Buffer.from(p).toString("base64");else{const n=String.fromCharCode(...p);i=btoa(n)}return i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function MV(o){return LV(o)}function BV(o,p=FO){let i="";const n=Xc(o);for(let s=0;s<o;s++)i+=p[n[s]%p.length];return i}function Iu(){const o=Xc(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.substr(0,8),p.substr(8,4),p.substr(12,4),p.substr(16,4),p.substr(20,12)].join("-")}function cOe(){return BV(6)}function fOe(){return $V(32)}const QTi=63,evi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function tvi(o){return o.length>=1&&o.length<=QTi&&evi.test(o)&&!o.includes("--")}function*ivi(){yield"";const o="abcdefghijklmnopqrstuvwxyz";for(let p=1;;p++){const i=new Array(p).fill(0);let n=!1;for(;!n;){yield i.map(s=>o[s]).join("");for(let s=p-1;s>=0&&(i[s]++,!(i[s]<o.length));s--)i[s]=0,s===0&&(n=!0)}}}function rvi(o,p){const i=new Set(o.map(s=>s.toLowerCase())),n=p>0?"secondary-db":"main";for(const s of ivi()){const c=s?`${n}-${s}`:n;if(tvi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function yOe(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)),n=i.find(m=>{const v=m.properties.find(w=>w.implements.find(P=>P.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(!n&&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:le.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=he(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(n)return{newEntities:[]};const s=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=UI(s,"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:le.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=he(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 hOe(o,p){const i=[],n=[],s=[],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 P=o.project.entities.filter(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=P.find(q=>!!q.properties.find(X=>{var ne;return X.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((ne=X.getDefaultValue())==null?void 0:ne.value)===!0}));if(!$&&P.length)$=P[0];else if(!$&&!P.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const X=$.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=X==null?void 0:X.defaultValue)==null||m.metaSync({value:!0},p),n.push($)}const L=o.properties.find(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(L&&!(L!=null&&L.defaultValue)){const q={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:le.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:L==null?void 0:L.toReference()},X=he(q,o.project);X.hydrateAncestors(),X.setParent(L,p),X.addSelfToProject(p),p==null||p.add(X,H.Added),X.initChildren(p),(L==null?void 0:L.defaultValue).setValueAsTypeSingle($||null,p),n.push(X);return}else L!=null&&L.defaultValue&&!(L!=null&&L.defaultValue.valueAsTypeSingle)&&(L==null||L.defaultValue.setValueAsTypeSingle($||null,p));const j=o.properties.find(q=>q.implements.find(X=>X.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!j)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!j.dataType){const q=ir.new(p);q.parent=j.toReference();const X=he(q,o.project);X.hydrateAncestors(),X.setParent(j,p),X.addSelfToProject(p),p==null||p.add(X,H.Added),X.initChildren(p)}const F=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=j.dataType)==null||v.setEntity(F,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const P=o.project.entities.filter(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&ne.id!==o.id),$=P.map(ne=>{var oe;const ee=ne.properties.find(ce=>ce.implements.find(Te=>Te.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(oe=ee==null?void 0:ee.getDefaultValue())==null?void 0:oe.value}).filter(ne=>!!ne),L=o.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!P.find(ne=>!!ne.properties.find(ee=>{var pe;return ee.implements.find(oe=>oe.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((pe=ee.getDefaultValue())==null?void 0:pe.value)===!0}))){const ne=o.properties.find(ee=>ee.implements.find(pe=>pe.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!ne)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(ne!=null&&ne.defaultValue)){const ee=Xr.new(p);ee.parent=ne.toReference();const pe=he(ee,o.project);pe.hydrateAncestors(),pe.setParent(ne,p),pe.addSelfToProject(p),p==null||p.add(pe,H.Added),pe.initChildren(p)}(E=ne==null?void 0:ne.defaultValue)==null||E.metaSync({value:!0},p)}if(!L)throw new Error("Identifier property not found for relational database entity with id: "+o.id);if(!(L!=null&&L.defaultValue)){const ne=Xr.new(p);ne.parent=L.toReference();const ee=he(ne,o.project);ee.hydrateAncestors(),ee.setParent(L,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const F=rvi($,P.length);(b=L.defaultValue)==null||b.metaSync({value:F},p);const q=o.properties.find(ne=>ne.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!q)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(!q.defaultValue){const ne=Xr.new(p);ne.parent=q.toReference();const ee=he(ne,o.project);ee.hydrateAncestors(),ee.setParent(q,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),n.push(ee)}const X=MV(24);(w=q.defaultValue)==null||w.metaSync({value:X},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const P=o.properties.find(F=>F.implements.find(q=>q.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!P)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 $=P.defaultValue||null;if(!$){const F=Xr.new(p);F.parent=P.toReference(),F.name=le.Date,F.id=x.UUID.uuid(),$=he(F,o.project),$.hydrateAncestors(),$.setParent(P,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),P.metaSync({editable:!1,deletable:!1},p);const L=o.properties.find(F=>F.implements.find(q=>q.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.definition.id));if(!L)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 j=L.defaultValue||null;if(!j){const F=Xr.new(p);F.name=le.EntityTemplate,F.parent=L.toReference(),F.id=x.UUID.uuid(),j=he(F,o.project),j.hydrateAncestors(),j.setParent(L,p),j.addSelfToProject(p),j.initChildren(p),p==null||p.add(j,H.Added)}}}}),{self:o,updated:D(i),added:D(n),removed:D(s),affected:D(c)}}function UI(o,p,i,n){const s=n||x.UUID.uuid(),c=us.new(i);c.id=s,c.name=p,c.static=o.static,c.implements=[o.toJSON()],c.parent=o.project.toReference(),c.static=o.static,yOe(o,i);const e=he(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),hOe(e,i),e.afterAllChildrenInitialized(i),e}function GV(o,p){return p.entities.find(s=>{const c=s.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 mOe(o,p,i,n=He.OrDataTypeGroup){const s=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ir.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=n;const E=he(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(s),added:D(c),removed:D(e),affected:D(y),self:E}}function kV(o,p,i,n,s){var v,E,b,w,P,$,L,j;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let F=!1;const q=new Date(o);if(q instanceof Date&&!isNaN(q.valueOf())&&(F=!0),F){const X=p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Date].id);p.setEntity(X,n);break}else{const X=p.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id);p.setEntity(X,n);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},n),o.length>0){const X=o.slice(0,5).filter(ee=>ee!==void 0);if(X.every(ee=>typeof ee==typeof X[0])&&(typeof X[0]!="object"||X[0]===null))switch(typeof X[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id),n);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}else{const ee=[];let pe=!1;X.forEach(ce=>{var Te,de,ye,_e;if(Array.isArray(ce)&&(pe=!0),typeof ce=="object"&&!Array.isArray(ce)&&ce!==null){const Pe=Gb(ce,p.project,{...i,id:x.UUID.uuid()},n,s);Pe.hasCreated&&ee.push((Te=Pe.changeSet)==null?void 0:Te.self),c.push(...(de=Pe.changeSet)==null?void 0:de.updated),e.push(...(ye=Pe.changeSet)==null?void 0:ye.added),y.push(...(_e=Pe.changeSet)==null?void 0:_e.removed)}});const oe=D(ee);if(!oe.length&&!pe){X.forEach(ce=>{const Te=ir.new(n);Te.parentRelationType=He.OrDataTypeGroup,Te.parent=p.toReference();const de=he(Te,p.project);switch(de.setParent(p,n),de.initChildren(n),n==null||n.add(de,H.Added),de.addSelfToProject(n),typeof ce){case"string":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.String].id),n);break;case"number":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Number].id),n);break;case"boolean":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Boolean].id),n);break;case"object":de.setEntity(de.project.getBuiltIn(Q[d.PrimitiveEntity][le.Null].id),n);break}});break}else oe.length===1&&!pe?p.setEntity(oe[0],n):X.forEach(ce=>{if(typeof ce=="object"&&!Array.isArray(ce)&&ce!==null){const Te=GV(Object.keys(ce),p.project);if(Te){const de=mOe(Te||oe[0],p,n,He.OrDataTypeGroup);c.push(...de.updated),e.push(...de.added),y.push(...de.removed)}}else{const Te=ir.new(n);Te.parentRelationType=He.OrDataTypeGroup,Te.parent=p.toReference();const de=he(Te,p.project);de.setParent(p,n),de.initChildren(n),n==null||n.add(de,H.Added),de.addSelfToProject(n);const ye=kV(ce,de,{...i,id:x.UUID.uuid()},n,s);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const X=Gb(o[0],p.project,{...i},n,s);p.setEntity((v=X.changeSet)==null?void 0:v.self,n),c.push(...(E=X.changeSet)==null?void 0:E.updated),e.push(...(b=X.changeSet)==null?void 0:b.added),y.push(...(w=X.changeSet)==null?void 0:w.removed);break}else{const X=Gb(o,p.project,{...i},n,s);p.setEntity((P=X.changeSet)==null?void 0:P.self,n),c.push(...($=X.changeSet)==null?void 0:$.updated),e.push(...(L=X.changeSet)==null?void 0:L.added),y.push(...(j=X.changeSet)==null?void 0:j.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function Gb(o,p,i,n,s){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=GV(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=s?i.name+" of "+s.name:i.name,P={id:i.id||x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(n==null?void 0:n.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()},$=he(P,p);return $.setParent(p,n),$.initChildren(n),n==null||n.add($,H.Added),$.addSelfToProject(n),e.push($),v.forEach((L,j)=>{const F=x.UUID.uuid(),q=ja.new(n);q.id=F,q.name=L,q.codeName=L,q.parent=$.toReference(),q.index=j,q.required=!0,q.interactive=!0;const X=he(q,p);X.setParent($,n),X.initChildren(n),n==null||n.add(X,H.Added),X.addSelfToProject(n),e.push(X);const ne=o[L],ee=x.UUID.uuid(),pe=ir.new(n);pe.id=ee,pe.parent=X.toReference(),pe.like=!0,pe.isList=!1;const oe=he(pe,p);oe.setParent(X,n),oe.initChildren(n),n==null||n.add(oe,H.Added),oe.addSelfToProject(n),e.push(oe);const ce=kV(ne,oe,{...i,name:L,id:x.UUID.uuid()},n,s||$);c.push(...ce.updated),e.push(...ce.added),y.push(...ce.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function ud(o,p,i,n){const s=[];return!o.length||!p.length?{errors:s,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 Bi({id:c.id+"--"+e.id+"--"+n,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:fe.Error,code:n,entity:c,firstRelationship:e});s.push(m)}if(y){const m=new Bi({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:fe.Error,code:i,entity:c,firstRelationship:y});s.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(P=>P.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new Bi({id:e.id+"--"+c.id+"--"+n,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:fe.Error,code:n,entity:e,firstRelationship:c});s.push(v)}if(y){const v=new Bi({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)?Ot(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:fe.Error,code:i,entity:y,firstRelationship:c});s.push(v)}}),{errors:s,overlap:!!s.length})}function nvi(o,p){return o.abstract||(o.properties.forEach(n=>{n.abstract||n.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(n=>{n.field===FN.EntityField&&n.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function avi(o,p){return o.abstract&&(o.properties.forEach(n=>{n.abstract&&n.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(n=>{(n.field===gA.Implements||n.field===gA.Extends)&&n.entity.onDetachedDependencyRemoved(o,n.field,p)}),o.metaSync({abstract:!1},p)),o}function svi(o,p){return o.static||(o.properties.forEach(n=>{n.static||n.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function lvi(o,p){return o.static&&o.metaSync({static:!1},p),o}const km=class km extends _V{constructor(i,n){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||n,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(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=he(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=he(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=he(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allMethods)||[],n=[...i].filter(c=>!i.some(e=>e.id!==c.id));return D(n)}get allBasePropertiesFromOriginalParents(){var s;const i=((s=this.extends)==null?void 0:s.allProperties)||[],n=[...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(n)}get allBasePropertiesFromExtendedAndImplementedEntities(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.allBasePropertiesFromExtendedAndImplementedEntities)||[]].filter(e=>!e.abstract),n=[...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([...n])}get allBaseMethodsFromExtendedAndImplementedEntities(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>n.type===d.PrimitiveEntity?i:[...[...n.ownDeclaredMethods,...n.allBaseMethodsFromExtendedAndImplementedEntities].filter(c=>c.type!==d.ActionDescriptor),...i],[])])}get extendedPropertiesFromOriginalParents(){var s,c;const i=[...((s=this.extends)==null?void 0:s.ownDeclaredProperties)||[],...((c=this.extends)==null?void 0:c.extendedPropertiesFromOriginalParents)||[]].filter(e=>!e.abstract),n=[...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(n)}get implementedPropertiesFromOriginalParents(){return D([...(this.extends?[this.extends]:[]).reduce((i,n)=>{const s=n.implementedPropertiesFromOriginalParents,c=[...n.ownDeclaredProperties].filter(m=>!!m.abstract),e=[...s,...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.subscribeInstance(this),this}unsubscribe(){return this.project.unsubscribeInstance(this),this}async APILoad(i=ke,...n){return await km.repository.APILoad(this.id,...n),this}toFlat(i=new Set){var s;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)),...((s=this.extends)==null?void 0:s.toFlat(i))||[]])}toFlatIds(i=new Set){var s;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)),...((s=this.extends)==null?void 0:s.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 n,s,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:((n=this.additionalPropertiesDataType)==null?void 0:n.toJSON(i))||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.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=ct){return{id:this.id+"--"+x.UUID.uuid()+"--ref",type:d.GenericReference,entityId:this.id,version:this.version,entityType:this.type}}toShallowJSON(i=ct){var n,s,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:((n=this.additionalPropertiesDataType)==null?void 0:n.toReference())||null,allPropertiesImplement:((s=this.allPropertiesImplement)==null?void 0:s.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 s,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)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatJSON(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatJSON(i))||[]])}toGenerationTarget(){var i;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:(i=this.extends)==null?void 0:i.id}}toFlatGenerationTarget(i=new Set){var s,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)),...((s=this.additionalPropertiesDataType)==null?void 0:s.toFlatGenerationTarget(i))||[],...((c=this.allPropertiesImplement)==null?void 0:c.toFlatGenerationTarget(i))||[]])}clearErrors(){var i,n;return this.errors=[],this.properties.forEach(s=>s.clearErrors()),this.methods.forEach(s=>s.clearErrors()),this.abstractMethods.forEach(s=>s.clearErrors()),(i=this.additionalPropertiesDataType)==null||i.clearErrors(),(n=this.allPropertiesImplement)==null||n.clearErrors(),this}validate(){return this.errors=JTi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await zTi(this,{tracker:n}),{success:!0}}getErrors(){var n,s;return[...this.errors,...this.properties.flatMap(c=>c.getErrors()),...this.methods.flatMap(c=>c.getErrors()),...this.abstractMethods.flatMap(c=>c.getErrors()),...((n=this.additionalPropertiesDataType)==null?void 0:n.getErrors())||[],...((s=this.allPropertiesImplement)==null?void 0:s.getErrors())||[]]}async getErrorsAsync(i={}){const n=J.YieldTracker.from(i),s=[...this.errors];await n.tick();for(const c of this.properties){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.methods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}for(const c of this.abstractMethods){const e=await c.getErrorsAsync({tracker:n});s.push(...e)}if(this.additionalPropertiesDataType){const c=await this.additionalPropertiesDataType.getErrorsAsync({tracker:n});s.push(...c)}if(this.allPropertiesImplement){const c=await this.allPropertiesImplement.getErrorsAsync({tracker:n});s.push(...c)}return s}getShallowErrors(){return this.errors}implement(i,n=this.project.addChangeSet(new Z(this.project,x.sessionAuthor,M().toISOString(),null,!0,"implement-built-in-base-entity")),s){const c=UI(this,i,n,s);return n==null||n.attemptAutoclose("implement-built-in-base-entity",this.id),c}getAllPropertiesImplements(){var n;const i=[];return this.allPropertiesImplement&&i.push(this.allPropertiesImplement),((n=this.extends)==null?void 0:n.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 km&&i.push(...this.extends.getAllInteractiveMethods())}return D(i)}};I(km,"repository",{APILoad:async(i,...n)=>null});let No=km;class TOe extends No{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(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.methods=this.initialData.methods.map(n=>{const s=he(n,this.project);return s.parent=this,s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=he(n,this.project);return s.parent=this,s}),this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project))}}var sa=(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))(sa||{});function jV(o,p){const i=[],n=p;if(!n)return{errors:i,override:p};if(typeof n!="string")return{errors:[],override:p};if(n.includes(" ")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s/g,"-")}}function vOe(o,p){const i=[],n=p;if(!n)return{errors:i,override:p};if(typeof n!="string")return{errors:[],override:p};if(n.includes(" ")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}if(n.includes("-")){const s=new Bi({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:fe.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s|-/g,"_")}}var xo=(o=>(o.StatusCodeMustBeNumber="status-code-must-be-number",o.StatusCodeMustBeBetween100And599="status-code-must-be-between-100-and-599",o))(xo||{});function EOe(o,p){const i=[];if(typeof p!="number"){const n=new Bi({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:fe.Error,code:"status-code-must-be-number",entity:o});return i.push(n),{errors:i,override:p}}if(p<100){const n=new Bi({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:fe.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}if(p>599){const n=new Bi({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:fe.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}return{errors:i,override:p}}class bOe extends No{constructor(i){var e,y;super(xa,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",xa.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",xa.abstract);I(this,"static",xa.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=xa,this.project=i,this.id=xa.id,this.version=xa.version,this.name=xa.name,this.static=xa.static,this.abstract=xa.abstract,this.properties=this.initialData.properties.map(m=>{const v=he(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=he(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=he(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=he(this.initialData.extends,this.project));const n=this.properties.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id);if(!n)throw new Error("Path property not found in endpoint entity");n._codeNativeValueValidation=(m,v)=>{const E=jV(m,v);if(m.project.entities.filter(w=>Zi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const P=w.properties.find(j=>j.implements.find(F=>F.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!P)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=P.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new Bi({id:m.id+"--"+sa.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:fe.Error,code:sa.MustBeUniqueAmongSameEntities,entity:m});E.errors.push(w)}return E};const s=this.abstractMethods.find(m=>m.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id);if(!s)throw new Error("Handler method not found in endpoint entity");const c=(((y=(e=s.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)=>EOe(m,v)}}class AOe extends Li{constructor(i){super(go,i);I(this,"id",ji.Parallel);I(this,"name",ji.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=go.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(go.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=go.error?he(go.error,this.project):null}}class gOe extends Li{constructor(i){super(rs,i);I(this,"id",rs.id);I(this,"name",rs.name);I(this,"description",rs.description);I(this,"version",rs.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=rs.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(rs.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=rs.error?he(rs.error,this.project):null}}class IOe extends Li{constructor(i){super(bu,i);I(this,"id",ji.Sequential);I(this,"name",ji.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=bu.inputs.map(n=>{const s=he(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=he(bu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=bu.error?he(bu.error,this.project):null}}var Ba=(o=>(o.UUIDMustBeString="uuid-must-be-string",o.UUIDMustBeValidFormat="uuid-must-be-valid-format",o.UUIDMustNotContainSpaces="uuid-must-not-contain-spaces",o))(Ba||{});function ovi(o,p){const i=[];if(typeof p!="string"){const s=new Bi({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:fe.Error,code:"uuid-must-be-string",entity:o});return i.push(s),{errors:i,override:p}}const n=jV(o,p);if(n.errors.length>0)return i.push(...n.errors),{errors:i,override:p};if(!CV(p)){const s=new Bi({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:fe.Error,code:"uuid-must-be-valid-format",entity:o});i.push(s)}return{errors:i,override:p}}var Ve=(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))(Ve||{});const ROe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function dvi(o,p){return{...ROe,id:o,project:p}}class _m{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 n;if(!((n=this.project)!=null&&n.id)||this.initialized)return;const p={},i={};Object.keys(p).forEach(s=>{const c=p[s],e=new Xr(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[s]=e;const y=e.parent||e.standaloneParent,m=OOe(e,y,this.project);m?i[s]=m:delete p[s]}catch(y){J.Logger.error("Error hydrating ancestors: ",y),delete p[s]}}),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 s=this.values[p.id];if(!s)if(i instanceof Xr)s=i;else if(i)s=Ki(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:yc(p.getDataType(null))};s=Ki(c,this.project)}s.standalone=!0,s.initialData.standaloneParent||J.Logger.warn("instance.initialData: ",s.initialData),s.setStandaloneParent(p,null),s.hydrateAncestors(),s.initChildren(null),i&&(s.metaSync({...i},null),s.setValueAsType(i.valueAsType,null)),this.values[p.id]=s,this.onWriteCallback(p,s)}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 vr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function DOe(o){if(Array.isArray(o))return o.map(m=>typeof m=="number"?m:e(m)?Number(m):String(m));const p=[];let i=0,n="",s=!1,c=null;for(;i<o.length;){const m=o[i];if(m==="."&&!s){n.length&&(p.push(y(n)),n=""),i++;continue}if(m==="["&&!s){n.length&&(p.push(y(n)),n=""),s=!0,i++;continue}if(s){if(!c&&(m==='"'||m==="'")){c=m,i++;continue}if(c){if(m==="\\"&&i+1<o.length){n+=o[i+1],i+=2;continue}if(m===c){c=null,i++;continue}n+=m,i++;continue}if(m==="]"){p.push(y(n)),n="",s=!1,i++;continue}if(/\s/.test(m)&&!c){i++;continue}n+=m,i++;continue}n+=m,i++}return n.length&&p.push(y(n)),p;function e(m){return/^[0-9]+$/.test(m)}function y(m){const v=m.trim();return e(v)?Number(v):v}}function UV(o,p,i){if(o==null)return i;const n=DOe(p);let s=o;for(let c=0;c<n.length;c++){const e=n[c];if(s==null)return i;if(Array.isArray(s)&&typeof e=="number"){if(!(e in s))return i;s=s[e]}else{if(!Object.prototype.hasOwnProperty.call(s,e))return i;s=s[e]}}return s}const uvi=new Set(["__proto__","prototype","constructor"]);function pvi(o){return typeof o=="string"&&uvi.has(o)}function wOe(o,p,i,n){const{createMissing:s=!0,coerce:c=!0}=n??{};if(o==null||typeof o!="object")throw new TypeError("set(...) expects a non-null object as target.");const e=DOe(p);if(e.length===0)throw new Error("set(...) path must not be empty.");let y=o;for(let m=0;m<e.length;m++){const v=e[m];if(pvi(v))throw new Error(`Refusing to set unsafe key "${String(v)}" on object.`);const E=m===e.length-1,w=typeof e[m+1]=="number",P=Array.isArray(y)&&typeof v=="number";if(E){if(P&&y[v]==null&&!s)throw new Error(`set(...) missing array index "${String(v)}" (createMissing=false).`);return y[v]=i,o}else{if(!Object.prototype.hasOwnProperty.call(y,v)||y[v]==null){if(!s)throw new Error(`set(...) missing parent at segment "${String(v)}" (createMissing=false).`);y[v]=w?[]:{}}else{const $=y[v],L=$!==null&&typeof $=="object",j=Array.isArray($);if(w){if(!j){if(!c)throw new Error(`set(...) expected an array at "${String(v)}" but found non-array (coerce=false).`);y[v]=[]}}else if(!L||j){if(!c)throw new Error(`set(...) expected an object at "${String(v)}" but found non-object (coerce=false).`);y[v]={}}}y=y[v]}}return o}function rv(o){return globalThis.structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o))}function cvi(o){if(Array.isArray(o))return o.slice();const p=[];let i="",n=0;for(;n<o.length;){const s=o[n];if(s==="."||s==="["||s==="]"){if(i.length){const c=Number(i);p.push(!Number.isNaN(c)&&/^\d+$/.test(i)?c:i),i=""}if(s==="["){n++;let c="";for(;n<o.length&&o[n]!=="]";)c+=o[n++];const e=Number(c);p.push(!Number.isNaN(e)&&/^\d+$/.test(c)?e:c)}n++;continue}i+=s,n++}if(i.length){const s=Number(i);p.push(!Number.isNaN(s)&&/^\d+$/.test(i)?s:i)}return p}function KV(o,p,i){const n=cvi(p);if(n.length===0)throw new Error("Path must not be empty.");const s=n[n.length-1];let c=o;for(let e=0;e<n.length-1;e++){const y=n[e],m=typeof n[e+1]=="number",v=c==null?void 0:c[y];if(v==null){if(!i)throw new Error(`Missing parent at segment "${String(y)}" for path "${Array.isArray(p)?JSON.stringify(p):p}".`);c[y]=m?[]:{}}else if(typeof v!="object"||v!==null&&Array.isArray(v)!==m&&typeof n[e+1]=="number"){if(!i)throw new Error(`Parent at "${String(y)}" is not a container suitable for continuing the path.`);c[y]=m?[]:{}}c=c[y]}return{target:c,lastKey:s}}function Jl(o,p,i,n){var y;let s;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case le.EntityTemplate:s=le.EntityTemplate;break;case le.String:s=le.String;break;case le.Number:s=le.Number;break;case le.Boolean:s=le.Boolean;break;case le.Null:s=le.Null;break;case le.Enum:s=le.Enum;break;case le.KeyValue:s=le.KeyValue;break;case le.Untyped:s=le.Untyped;break;case le.KeyValue:s=le.KeyValue;break;case le.Date:s=le.Date;break;case le.UUID:s=le.UUID;break;case le.File:s=le.File;break;case le.Void:s=le.Void;break;case le.ActionDescriptor:s=le.ActionDescriptor;break;case le.Bytes:s=le.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else s=le.Untyped;const c=Xr.new(n);c.name=s,c.parent=p.toReference();const e=he(c,i);return e.hydrateAncestors(),n==null||n.add(e,H.Added),e.addSelfToProject(n),e.initChildren(n),e}function Oo(o,p,i=new Set){var n,s,c;if(i.has(o.id))return[];if(i.add(o.id),qt.includes(o.type)){const e=Wn(o);return D([e,...[e].flatMap(y=>Oo(y,p,i))])}else if(o.type===d.OutputMap){if(qt.includes(o.parent.type)&&((n=o.declaration)==null?void 0:n.type)===d.Property&&o.declaration.static)return D([o,o.declaration,...[o,o.declaration].flatMap(e=>Oo(e,p,i))])}else if(o.type===d.InputMap&&qt.includes(o.parent.type)&&((s=o.declaration)==null?void 0:s.type)===d.Property&&(c=o.declaration)!=null&&c.static)return D([o.declaration,...[o.declaration].flatMap(e=>Oo(e,p,i))]);return[o]}function OOe(o,p,i){return o}function xh(o,p,i=!1){const n=o.readsValue;let s=null;const c=$u(n,p,i);if(c){const e={sources:[c],target:o};s={value:c.value,valueOwner:o,type:Ve.Inherited,inheritanceLink:e}}return s}function vt(o,p,i){var y;if(!p)return null;let n;if(((y=o==null?void 0:o.entity)==null?void 0:y.type)===d.PrimitiveEntity)switch(o.entity.name){case le.EntityTemplate:n=le.EntityTemplate;break;case le.String:n=le.String;break;case le.Number:n=le.Number;break;case le.Boolean:n=le.Boolean;break;case le.Null:n=le.Null;break;case le.Enum:n=le.Enum;break;case le.KeyValue:n=le.KeyValue;break;case le.Untyped:n=le.Untyped;break;case le.KeyValue:n=le.KeyValue;break;case le.Date:n=le.Date;break;case le.UUID:n=le.UUID;break;case le.File:n=le.File;break;case le.Void:n=le.Void;break;case le.ActionDescriptor:n=le.ActionDescriptor;break;case le.Bytes:n=le.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else n=le.Untyped;if(!i.get(p.id))return null;const c=Xr.new(null);c.name=n,c.standaloneParent=p.toReference();let e=new Xr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function COe(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(e=p.localTestValues)==null?void 0:e.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:null}}function kb(o,p,i,n=!1){var e,y;const s={...o},c=p.type===d.VariableDeclaration?p.inputs:St.includes(p.type)?p.outputs:[];if(!c||c.length===0)return s;for(const m of c){if(!Nv(m))continue;const v=Km(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||qi(E);s[b]=Pr((v==null?void 0:v.value)||null)?s[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function Pm(o,p,i,n=!1){var e,y;const s={...o},c=p.inputs;if(!c)return s;for(const m of c){if(!Nv(m))continue;const v=av(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||qi(E);s[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function _Oe(o,p,i=!1){var E,b,w,P,$,L,j,F;let n={};if(((b=(E=o.getDataType(null))==null?void 0:E.entity)==null?void 0:b.type)===d.DefinitionEntity&&(n={...n,...((w=o.getDataType(null))==null?void 0:w.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const q=(P=p.lastExecutionResults)==null?void 0:P.readValue(o.id);if(q){if(vr(q.value)){const ne={...n,...q.value},ee={...Pm(ne,o,p,i)};q.metaSync({value:ee},null)}return{value:q,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}}const s=!!(($=p.execution)!=null&&$.entities.length),c=(L=p.execution)==null?void 0:L.hasEntity(o),e=o.readsValue;let y=null;if(e){const q=(j=p.execution)==null?void 0:j.hasEntity(e);if((!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i),y&&y.value&&vr(y.value.value))){const ne={...n,...y.value.value},ee={...Pm(ne,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const q=m;if(q&&q.value===null&&q.autogeneration){const X=xR(q);if(q.metaSync({value:X},null),vr(X)){const ne={...Pm(X,o,p,i)};q.metaSync({value:ne},null)}}(i||v===null||v!==Ve.Testing)&&(y={value:q,valueOwner:o,type:Pr(q)?o.readsValue?Ve.Inherited:Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const q=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(q){if(vr(q.value)){const X={...n,...q.value},ne={...Pm(X,o,p,i)};q.metaSync({value:ne},null)}return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}}return Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function FV(o,p,i=!1){var e,y,m,v,E,b,w,P,$;let n={};if(((y=(e=o.getDataType(null))==null?void 0:e.entity)==null?void 0:y.type)===d.DefinitionEntity&&(n={...n,...((m=o.getDataType(null))==null?void 0:m.entity).getActiveRawDefaultValue()}),p.execution&&p.execution.hasEntity(o)&&!i){const L=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(L){if(vr(L.value)){const F={...n,...L.value},q=kb(F,o,p,i);L==null||L.metaSync({value:q},null)}return{value:L,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}}const s=(E=p.localTestValues)==null?void 0:E.readValue(o.id),c=p.getValueTypePreference(o.id);if(s&&!i&&(c===null||c!==Ve.DefaultValue)){if(vr(s.value)){const j={...n,...s.value},F=kb(j,o,p,i);s.metaSync({value:F},null)}return{value:s,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((P=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:P.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const L=vt(o.dataType,o,p.project),j=kb(n,o,p,i);return L==null||L.metaSync({value:j},null),{value:L,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}}return null}function nv(o,p,i=!1){var E,b,w,P,$;if((E=o.dataType)!=null&&E.isObject())return _Oe(o,p,i);const n=si(o),s=!!((b=p.execution)!=null&&b.entities.length),c=(w=p.execution)==null?void 0:w.hasEntity(n),e=o.readsValue;let y=null;if(e){const L=(P=p.execution)==null?void 0:P.hasEntity(e);(!s||s&&L&&c||s&&!L&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const L=m;if(L&&L.value===null&&L.autogeneration){const j=xR(L);L.metaSync({value:j},null)}(i||v===null||v!==Ve.Testing)&&(y={value:L,valueOwner:o,type:Pr(L)?o.readsValue?Ve.Inherited:Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}return Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function SV(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return FV(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(m=p.localTestValues)==null?void 0:m.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:nv(o,p,i)}function qV(o,p,i=!1){var b,w,P,$;const n=!!((b=p.execution)!=null&&b.entities.length),s=(w=p.execution)==null?void 0:w.hasEntity(o);let c=null;const e=o.readsValue;if(e){const L=(P=p.execution)==null?void 0:P.hasEntity(e);(!n||n&&L&&s||n&&!L&&!s)&&(c=xh(o,p,i))}const y=o.declaration;if(!c&&y){const L=nv(y,p);L&&L.value&&(c=L)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Ve.DefaultValue||c.type===Ve.External)&&!i||m===null||m!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const v=Xd(o);return v&&s&&!c?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:s&&!v&&Pr((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Ve.External,inheritanceLink:null}}function POe(o,p,i=!1){return SV(o.declaration,p,i)}function VOe(o,p,i=!1){var b,w,P,$;if(!i&&p.execution&&p.execution.hasEntity(o)){const L=(b=p.lastExecutionResults)==null?void 0:b.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=si(o),s=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((w=p.execution)!=null&&w.hasEntity(n))||!!s&&!!((P=p.execution)!=null&&P.hasEntity(s));let e=null;const y=o.getDefaultValue(),m=p.getValueTypePreference(o.id);if(y){const L=y||null;if(L&&L.value===null&&L.autogeneration){const j=xR(L);L.metaSync({value:j},null)}(i||m===null||m!==Ve.Testing)&&(e={value:L,valueOwner:o,type:Pr(L)?Ve.Empty:Ve.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Ve.DefaultValue||e.type===Ve.External)&&!i||m===null||m!==Ve.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id),j=p.getValueTypePreference(o.id);if(L&&!i&&(j===null||j!==Ve.DefaultValue))return{value:L,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const v=Xd(o);let E=v&&c&&!e;return n.type===d.Loop&&c&&(E=!1),E?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:c&&!v&&Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Ve.External,inheritanceLink:null}}function ZV(o,p,i=!1){var w,P,$,L,j,F;if((w=o.getDataType(null))!=null&&w.isObject())return FV(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const q=(P=p.lastExecutionResults)==null?void 0:P.readValue(o.id);if(q)return{value:q,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=si(o),s=!!(($=p.execution)!=null&&$.entities.length),c=(L=p.execution)==null?void 0:L.hasEntity(n),e=o.readsValue;let y=null;if(e){const q=(j=p.execution)==null?void 0:j.hasEntity(e);(!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const q=m;(i||v===null||v!==Ve.Testing)&&(y={value:q,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Ve.DefaultValue||y.type===Ve.External)&&!i||v===null||v!==Ve.DefaultValue){const q=(F=p.localTestValues)==null?void 0:F.readValue(o.id);if(q)return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const E=Xd(o);return E&&!y?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:!E&&Pr((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function NOe(o,p,i=!1){var y,m,v,E,b,w,P,$,L,j,F,q,X;if(p.execution&&p.execution.hasEntity(o)&&!i){const ne=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(ne)return{value:ne,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=Py(o);if(hy.includes(n.type)){const ne=$u(n,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||qi(se(o,p.project));if(ne!=null&&ne.value&&vr(ne.value.value)){const pe=ne.value.value[ee],oe=vt(o.getDataType(null),o,p.project);return oe==null||oe.metaSync({value:pe},null),{value:oe,valueOwner:o,type:ne.type,inheritanceLink:{sources:[ne],target:o}}}return null}const s=(v=p.execution)==null?void 0:v.hasEntity(n),c=((E=p.execution)==null?void 0:E.state)===lN.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!s&&!c&&!i){const ne=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((ne==null?void 0:ne.value)!==null||(ne==null?void 0:ne.valueAsType)!==null)return{value:ne,valueOwner:o,type:Ve.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=qV(e,p,i);if(ee&&ee.value){const oe=o.declaration;if(vr(ee.value.value)){const ce=ee.value.value[oe.name],Te=vt(((P=o.declaration)==null?void 0:P.dataType)||null,o,p.project);return Te==null||Te.metaSync({value:ce},null),{value:Te,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const pe=vt((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return pe==null||pe.metaSync({value:null},null),{value:pe,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=nv(e,p,i);if(ee&&ee.value){const oe=o.declaration;if(vr(ee.value.value)){const ce=ee.value.value[oe.name],Te=vt(((L=o.declaration)==null?void 0:L.dataType)||null,o,p.project);return Te==null||Te.metaSync({value:ce},null),{value:Te,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const pe=vt(((j=o.declaration)==null?void 0:j.dataType)||null,o,p.project);return pe==null||pe.metaSync({value:null},null),{value:pe,valueOwner:o,type:Ve.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const ne=e.outputs.map(pe=>{var oe,ce;if((oe=p.persistedExecutionResults)!=null&&oe.values[pe.id]){const Te=(ce=p.persistedExecutionResults)==null?void 0:ce.values[pe.id];if(Te.value!==null||Te.valueAsType!==null)return{value:Te,valueOwner:pe,type:Ve.ExecutionResult,inheritanceLink:null}}}).filter(pe=>!!pe),ee=vt(((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:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.FunctionCall:{const ne=e.inputs.map(pe=>dA(pe,p,i)).filter(pe=>!!pe),ee=vt(((q=o.declaration)==null?void 0:q.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.Loop:{const ne=e.inputs.map(pe=>dA(pe,p,i)).filter(pe=>!!pe),ee=vt(((X=o.declaration)==null?void 0:X.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:ne.length?{sources:ne,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Ve.QueuedAutocalculation,inheritanceLink:null}}return null}function SO(o,p,i=!1){var b,w,P;if(![...St,...qt].includes(o.parent.type)||!Nv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return $u(o.declaration,p);const n=av(o,p,i);if(n&&n.type!==Ve.Empty&&n.type!==Ve.Missing)return n;const s=Wn(o.parent),c=Ao(s,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||qi(se(o,p.project)),y=vt(o.getDataType(null),o,p.project),m=Xd(o),v=(P=c==null?void 0:c.value)==null?void 0:P.value;if(v&&vr(v)){let $=v[e];return v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null),m&&Pr(y)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}}function qO(o,p,i=!1){var b,w,P,$,L,j,F;if(![...St,...qt].includes(o.parent.type)||!Nv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return $u(o.declaration,p,i);const n=St.includes(o.parent.type)?o.parent:Wn(o.parent),s=$u(n,p,i);let c=o;n.type===d.VariableDeclaration&&(c=(o.parent===n?o:n.inputs.find(X=>{var ne,ee;return((ne=X.declaration)==null?void 0:ne.id)===((ee=o.declaration)==null?void 0:ee.id)}))||o);const e=Km(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||qi(se(o,p.project)),m=vt(o.getDataType(null),o,p.project),v=Xd(o),E=(P=s==null?void 0:s.value)==null?void 0:P.value;if(((s==null?void 0:s.type)===Ve.ExecutionResult||(s==null?void 0:s.type)===Ve.Testing)&&!i&&E&&vr(E)){let q=E[y];return E[y]===void 0&&(q=null),m==null||m.metaSync({value:q},null),{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}if(e&&e.type!==Ve.Empty&&e.type!==Ve.Missing)return e;if(E&&vr(E)){let q=E[y];E[y]===void 0&&(q=null),m==null||m.metaSync({value:q},null);const X=v&&Pr(m),ne=!!(($=p.execution)!=null&&$.entities.length),ee=(L=p.execution)==null?void 0:L.hasEntity(n),pe=n.readsValue;if(pe){const oe=(j=p.execution)==null?void 0:j.hasEntity(pe);if(X&&(!ne||ne&&oe&&ee||ne&&!oe&&!ee))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}if(o.readsValue){const oe=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(X&&(!ne||ne&&oe&&ee||ne&&!oe&&!ee))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}return X?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}return Km(o,p,i)}function av(o,p,i=!1){var w,P,$,L,j,F;const n=si(o),s=!!((w=p.execution)!=null&&w.entities.length),c=(P=p.execution)==null?void 0:P.hasEntity(n),e=o.readsValue;let y=null;if(e){const q=($=p.execution)==null?void 0:$.hasEntity(e);(!s||s&&q&&c||s&&!q&&!c)&&(y=xh(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Ve.Testing)&&(y={value:m,valueOwner:o,type:Pr(m)?Ve.Empty:Ve.DefaultValue,inheritanceLink:null}),!y&&o.declaration){const q=$u(o.declaration,p,i);q&&q.value&&(i||v===null||v!==Ve.Testing)&&(y={...q,valueOwner:o,type:Ve.DefaultValue})}if(!y||y.type===Ve.DefaultValue||(y==null?void 0:y.type)===Ve.Empty){const q=(L=p.persistedExecutionResults)==null?void 0:L.readValue(o.id);if(q&&!i)return{value:q,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const X=(j=p.localTestValues)==null?void 0:j.readValue(o.id);if(X&&!i&&(v===null||v!==Ve.DefaultValue))return{value:X,valueOwner:o,type:Ve.Testing,inheritanceLink:null}}const E=Xd(o),b=E&&(!y||(y==null?void 0:y.type)===Ve.Empty);if(o.readsValue){const q=(F=p.execution)==null?void 0:F.hasEntity(o.readsValue);if(b&&(!s||s&&q&&c||s&&!q&&!c))return{value:null,valueOwner:o,type:Ve.Inherited,inheritanceLink:null}}return b?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Ve.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue?Ve.Inherited:Ve.Empty,inheritanceLink:null}:y}function Km(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:Ve.ExecutionResult,inheritanceLink:null}}const n=(y=p.localTestValues)==null?void 0:y.readValue(o.id),s=p.getValueTypePreference(o.id);return n&&!i&&(s===null||s!==Ve.DefaultValue)?{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null}:av(o,p,i)}function dA(o,p,i=!1){var n,s;return qt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||St.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?SO(o,p,i):av(o,p,i)}function xOe(o,p,i=!1){var n,s;return qt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||St.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?qO(o,p,i):Km(o,p,i)}function $Oe(o,p,i=!1){var v,E;if(!o.static)return null;if(p.execution){const b=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(b&&!i)return{value:b,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=(E=p.localTestValues)==null?void 0:E.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Ve.DefaultValue))return{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;return c&&(i||s===null||s!==Ve.Testing)&&(e={value:c,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}),Xd(o)&&Pr(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:Pr(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e}function LOe(o,p,i=!1){var v,E;if(p.execution&&p.execution.hasEntity(o)&&!i){const b=(v=p.lastExecutionResults)==null?void 0:v.readValue(o.id);if(b)return{value:b,valueOwner:o,type:Ve.ExecutionResult,inheritanceLink:null}}const n=(E=p.localTestValues)==null?void 0:E.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Ve.DefaultValue))return{value:n,valueOwner:o,type:Ve.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;return c&&(i||s===null||s!==Ve.Testing)&&(e={value:c,valueOwner:o,type:Ve.DefaultValue,inheritanceLink:null}),Xd(o)&&Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Missing,inheritanceLink:null}:Pr((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Ve.Empty,inheritanceLink:null}:e}function $u(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return VOe(o,p,i);case d.InputMap:return xOe(o,p,i);case d.VariableDeclaration:return SV(o,p,i);case d.VariableInstance:return POe(o,p,i);case d.OutputMap:return NOe(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return ZV(o,p,i);case d.Property:return $Oe(o,p,i);case d.ValueDescriptor:return LOe(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return COe(o,p,i);default:return null}}function Ao(o,p,i=!1){switch(o.type){case d.InputMap:return dA(o,p,i);case d.VariableDeclaration:return nv(o,p,i);case d.VariableInstance:return qV(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return ZV(o,p,i);default:return null}}function fvi(o){var p;if(o&&o.type===Ve.DefaultValue&&o.value&&o.valueOwner&&(!BA.includes(o.valueOwner.type)||((p=o.valueOwner.getDefaultValue())==null?void 0:p.id)===o.value.id)){const i=vt(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Ve.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function gc(o,p,i,n){let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,P,$,L,j;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);F?!s&&F&&F.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(F=vt(v.getDataType(null),v,p)):s?F=Jl(v.getDataType(null),v,p,c):F=vt(v.getDataType(null),v,p);const q=se(o,p),X=o.codeName||((P=o.extends)==null?void 0:P.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||qi(q);let ne={};((j=(L=v.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(ne={...ne,...v.dataType.entity.getActiveRawDefaultValue()}),vr(F==null?void 0:F.value)&&(ne={...ne,...F.value}),ne[X]=i,F==null||F.metaSync({value:ne},c),s||e==null||e.writeValue(v,F);return}}),c}function Fm(o,p,i,n){var P,$,L,j;let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=Wn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=s?y.getDefaultValue():e==null?void 0:e.readValue(y.id);v?!s&&v&&v.id===((P=y.getDefaultValue())==null?void 0:P.id)&&(v=vt(y.getDataType(null),y,p)):s?v=Jl(y.getDataType(null),y,p,c):v=vt(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||qi(E);let w={};if(((j=(L=y.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),vr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),s||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const F=y.inputs.find(q=>{var X,ne;return((X=q.declaration)==null?void 0:X.id)===((ne=o.declaration)==null?void 0:ne.id)||se(q,p)===E});if(F){let q=s?F.getDefaultValue():e==null?void 0:e.readValue(F.id);q&&q.metaSync({value:null},c),s||e==null||e.removeValue(F.id)}}return c}function MOe(o,p,i){var e,y,m,v,E;let n=!1,s=null,c=null;if(i instanceof Z?(n=!0,s=i,c=null):(s=null,c=i),qt.includes(o.type)){const b=Wn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var P,$,L,j,F,q;if(((P=w.declaration)==null?void 0:P.type)===d.Property&&w.declaration.static){let X=n?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);X?!n&&X&&X.id===((L=w.declaration.getDefaultValue())==null?void 0:L.id)&&(X=vt(w.declaration.getDataType(null),w.declaration,p)):n?X=Jl(w.declaration.getDataType(null),w.declaration,p,s):X=vt(w.declaration.getDataType(null),w.declaration,p),X==null||X.metaSync({value:null},s),n||c==null||c.removeValue((j=w.declaration)==null?void 0:j.id)}else if(((F=w.declaration)==null?void 0:F.type)===d.Property){let X=n?((q=w.getDefaultValue)==null?void 0:q.call(w))||null:c==null?void 0:c.readValue(w.id);X&&X.metaSync({value:null},s),n||c==null||c.removeValue(w.id)}})}else o.type===d.InputMap?((y=o.declaration)==null?void 0:y.type)===d.Property&&o.declaration.static?gc(o.declaration,p,null,i):qt.includes(o.parent.type)&&((m=o.declaration)==null?void 0:m.type)===d.Property&&Fm(o,p,null,i):o.type===d.OutputMap?((v=o.declaration)==null?void 0:v.type)===d.Property&&o.declaration.static?gc(o.declaration,p,null,i):qt.includes(o.parent.type)&&((E=o.declaration)==null?void 0:E.type)===d.Property&&Fm(o,p,null,i):o.type===d.Property&&o.static&&gc(o,p,null,i);return s}function BOe(o,p,i,n){var y,m,v,E,b,w,P;let s=!1,c=null,e=null;if(n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n),qt.includes(p.type)){const $=Wn(p);if((y=$.dataType)!=null&&y.isObject()){let L={};((v=(m=$.dataType)==null?void 0:m.entity)==null?void 0:v.type)===d.DefinitionEntity&&(L={...L,...$.dataType.entity.getActiveRawDefaultValue()});const j=vr(o)?o:L;$.inputs.forEach(F=>{var q,X,ne,ee,pe,oe;if(((q=F.declaration)==null?void 0:q.type)===d.Property&&F.declaration.static){let ce=s?((X=p.getDefaultValue)==null?void 0:X.call(p))||null:e==null?void 0:e.readValue(F.declaration.id);ce?!s&&ce&&ce.id===((ne=F.declaration.getDefaultValue())==null?void 0:ne.id)&&(ce=vt(F.declaration.getDataType(null),F.declaration,i)):s?ce=Jl(F.declaration.getDataType(null),F.declaration,i,c):ce=vt(F.declaration.getDataType(null),F.declaration,i);const Te=se(F,i),de=F.codeName||((ee=F.declaration)==null?void 0:ee.codeName)||qi(Te),ye=j[de];ce==null||ce.metaSync({value:ye},c),s||e==null||e.writeValue(F.declaration,ce)}else if(((pe=F.declaration)==null?void 0:pe.type)===d.Property){let ce=s?((oe=p.getDefaultValue)==null?void 0:oe.call(p))||null:e==null?void 0:e.readValue(F.id);ce&&ce.metaSync({value:null},c),s||e==null||e.removeValue(F.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?gc(p.declaration,i,o,n):qt.includes(p.parent.type)&&((b=p.declaration)==null?void 0:b.type)===d.Property&&Fm(p,i,o,n):p.type===d.OutputMap?((w=p.declaration)==null?void 0:w.type)===d.Property&&p.declaration.static?gc(p.declaration,i,null,n):qt.includes(p.parent.type)&&((P=p.declaration)==null?void 0:P.type)===d.Property&&Fm(p,i,null,n):p.type===d.Property&&p.static&&gc(p,i,o,n);return c}function GOe(o,p,i){const n=Oo(o,p);let s=!1,c=null,e=null;return i instanceof Z?(s=!0,c=i,e=null):(c=null,e=i),n.forEach(y=>{var v,E,b;let m=s?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);m?!s&&m&&m.id===((b=((E=y.getDefaultValue)==null?void 0:E.call(y))||null)==null?void 0:b.id)&&(m=vt(o.getDataType(null),o,o.project)):s?m=Jl(y.getDataType(null),y,p,c):m=vt(y.getDataType(null),y,p),m==null||m.metaSync({value:null},c),s||e==null||e.removeValue(y.id),MOe(y,p,i)}),c}function yvi(o,p,i,n){if(zN(o))return GOe(p,i,n);const s=Oo(p,i);let c=!1,e=null,y=null;return n instanceof Z?(c=!0,e=n,y=null):(e=null,y=n),i.diggestedBuiltInBaseEntitiesIds.has(p.id)||s.forEach(m=>{var E,b,w,P;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===((P=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:P.id)&&(v=vt(m.getDataType(null),m,i)):c?(v=Jl(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=vt(m.getDataType(null),m,i),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),BOe(o,m,i,n)}),e}function Ic(o,p,i,n){let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=o.parent;return p.getVariableDeclarations().forEach(v=>{var b,w,P,$,L,j;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let F=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);F?!s&&F&&F.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(F=vt(v.getDataType(null),v,p)):s?F=Jl(v.getDataType(null),v,p,c):F=vt(v.getDataType(null),v,p);const q=se(o,p),X=o.codeName||((P=o.extends)==null?void 0:P.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||qi(q);let ne={};((j=(L=v.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(ne={...ne,...v.dataType.entity.getActiveRawDefaultValue()}),vr(F==null?void 0:F.value)&&(ne={...ne,...F.value}),Array.isArray(i)?ne[X]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:ne[X]=(i==null?void 0:i.toShallowJSON())||null,F==null||F.metaSync({value:ne},c),s||e==null||e.writeValue(v,F);return}}),c}function Sm(o,p,i,n){var P,$,L,j;let s=!1,c=null,e=null;n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n);const y=Wn(o.parent),m=y.getDataType(null);if(!(m!=null&&m.isObject()))return c;let v=s?y.getDefaultValue():e==null?void 0:e.readValue(y.id);v?!s&&v&&v.id===((P=y.getDefaultValue())==null?void 0:P.id)&&(v=vt(y.getDataType(null),y,p)):s?v=Jl(y.getDataType(null),y,p,c):v=vt(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||qi(E);let w={};if(((j=(L=y.dataType)==null?void 0:L.entity)==null?void 0:j.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),vr(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),s||e==null||e.writeValue(y,v),i==null&&o.type===d.OutputMap){const F=y.inputs.find(q=>{var X,ne;return((X=q.declaration)==null?void 0:X.id)===((ne=o.declaration)==null?void 0:ne.id)||se(q,p)===E});if(F){let q=s?F.getDefaultValue():e==null?void 0:e.readValue(F.id);q&&(Array.isArray(i)?q==null||q.setValueAsTypeList(i,c):q==null||q.setValueAsTypeSingle(i,c)),s||e==null||e.removeValue(F.id)}}return c}function kOe(o,p,i){var n,s,c,e;return o.type===d.InputMap?((n=o.declaration)==null?void 0:n.type)===d.Property&&o.declaration.static?Ic(o.declaration,p,null,i):qt.includes(o.parent.type)&&((s=o.declaration)==null?void 0:s.type)===d.Property&&Sm(o,p,null,i):o.type===d.OutputMap?((c=o.declaration)==null?void 0:c.type)===d.Property&&o.declaration.static?Ic(o.declaration,p,null,i):qt.includes(o.parent.type)&&((e=o.declaration)==null?void 0:e.type)===d.Property&&Sm(o,p,null,i):o.type===d.Property&&o.static&&Ic(o,p,null,i),i}function jOe(o,p,i,n){var s,c,e,y;return p.type===d.InputMap?((s=p.declaration)==null?void 0:s.type)===d.Property&&p.declaration.static?Ic(p.declaration,i,o,n):qt.includes(p.parent.type)&&((c=p.declaration)==null?void 0:c.type)===d.Property&&Sm(p,i,o,n):p.type===d.OutputMap?((e=p.declaration)==null?void 0:e.type)===d.Property&&p.declaration.static?Ic(p.declaration,i,null,n):qt.includes(p.parent.type)&&((y=p.declaration)==null?void 0:y.type)===d.Property&&Sm(p,i,null,n):p.type===d.Property&&p.static&&Ic(p,i,o,n),n}function UOe(o,p,i){const n=Oo(o,p);let s=!1,c=null,e=null;return i instanceof Z?(s=!0,c=i,e=null):(c=null,e=i),n.forEach(y=>{var v,E,b;let m=s?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);m?!s&&m&&m.id===((b=(E=y.getDefaultValue)==null?void 0:E.call(y))==null?void 0:b.id)&&(m=vt(y.getDataType(null),y,y.project)):s?m=Jl(y.getDataType(null),y,p,c):m=vt(y.getDataType(null),y,p),m==null||m.setValueAsTypeSingle(null,c),m==null||m.setValueAsTypeList(null,c),s||e==null||e.removeValue(y.id),kOe(y,p,i)}),c}function hvi(o,p,i,n){if(o==null)return UOe(p,i,n);const s=Oo(p,i);let c=!1,e=null,y=null;return n instanceof Z?(c=!0,e=n,y=null):(e=null,y=n),s.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=vt(m.getDataType(null),m,m.project)):c?v=Jl(m.getDataType(null),m,i,e):v=vt(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),c||y==null||y.writeValue(m,v),jOe(o,m,i,n)}),e}class KI{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||{}),Y=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(Y||{}),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 KOe{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 FOe extends KOe{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 FOe(this,i)}}class ZO extends KI{constructor(i,n){super(i,Y.Logic);I(this,"id");this._project=n,this.id=n.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,n,s,c=!1,e="here-this"){return this._project.toLatestChangeSet(i,n,s,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,n,s){return this._project.onDetachedDependencyRemoved(i,n,s)}onDetachedDependencyRestored(i,n,s){return this._project.onDetachedDependencyRestored(i,n,s)}increaseVersion(i){return this._project.increaseVersion(i)}captureVersion(){return this._project.captureVersion()}restoreVersion(i){return this._project.restoreVersion(i)}updateWithShallowTransfer(i,n){return this._project.updateWithShallowTransfer(i,n)}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,n){return this._project.metaSync(i,n)}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(){return this._project.toGenerationTarget()}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()}getDefinitionEntity(i){return this._project.getDefinitionEntity(i)}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,n=!1){return this._project.requestActiveDynamicValue(i,n)}undo(){return this._project.undo()}redo(){return this._project.redo()}applyExternalChangeSet(i){return this._project.applyExternalChangeSet(i)}toFullProjectTransfer(){return this._project.toFullProjectTransfer()}}function mvi(o,p){return p instanceof ZO?p:new ZO(o,p)}const oy="built-in-function-implementations__",Oe="operations-implementations__",Na="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+zn.HttpRequest,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY:Oe+Ce.Validate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL:Oe+ji.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+ji.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+ji.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+ie.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT:Oe+ie.Split,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS:Oe+ie.DeleteLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS:Oe+ie.DeleteFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_AT_INDEX:Oe+ie.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_AT_INDEX:Oe+ie.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS:Oe+ie.ReplaceFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS:Oe+ie.ReplaceLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL:Oe+ie.ReplaceAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX:Oe+ie.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM:Oe+ie.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST:Oe+ie.GetFirst,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST:Oe+ie.GetLast,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND:Oe+ie.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND:Oe+ie.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE:Oe+ie.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH:Oe+ie.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS:Oe+ie.GetFirstNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS:Oe+ie.GetLastNItems,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE:Oe+ie.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT:Oe+ie.Concat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF:Oe+ie.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF:Oe+ie.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE:Oe+ie.Unique,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN:Oe+ie.Flatten,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT:Oe+ie.Sort,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE:Oe+ie.Shuffle,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK:Oe+ie.Chunk,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START:Oe+ie.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END:Oe+ie.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT:Oe+ie.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH:Oe+S.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+S.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+S.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+S.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+ie.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL:Oe+ie.ContainsAll,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY:Oe+ie.ContainsAny,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX:Oe+S.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+S.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+S.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+S.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+S.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+S.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+S.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+S.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+S.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+S.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+S.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+S.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+S.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+S.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+S.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+S.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+S.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+S.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+S.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+S.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+S.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+S.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+S.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+S.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+S.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+S.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+S.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+S.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+S.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+S.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+S.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+S.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+S.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+S.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+S.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+S.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+S.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+S.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+S.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+S.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+S.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+S.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+S.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+S.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+S.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+U.GetCurrentTimestamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FORMAT_DATE:Oe+U.FormatDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PARSE_DATE:Oe+U.ParseDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_TO_DATE:Oe+U.AddToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SUBTRACT_FROM_DATE:Oe+U.SubtractFromDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_DIFFERENCE_BETWEEN_DATES:Oe+U.DifferenceBetweenDates,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE:Oe+U.ToDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UNIX:Oe+U.ToUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_UNIX:Oe+U.FromUnix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_ISO_STRING:Oe+U.ToISOString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_YEAR:Oe+U.GetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MONTH:Oe+U.GetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DATE:Oe+U.GetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_HOUR:Oe+U.GetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MINUTE:Oe+U.GetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_SECOND:Oe+U.GetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_MILLISECOND:Oe+U.GetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_ISO_WEEKDAY:Oe+U.GetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_WEEK_OF_YEAR:Oe+U.GetWeekOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_QUARTER:Oe+U.GetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAY_OF_YEAR:Oe+U.GetDayOfYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_DAYS_IN_MONTH:Oe+U.GetDaysInMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_IANA_TIMEZONE:Oe+U.GetCurrentIanaTimeZone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_YEAR:Oe+U.SetYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MONTH:Oe+U.SetMonth,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_DATE:Oe+U.SetDate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_HOUR:Oe+U.SetHour,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MINUTE:Oe+U.SetMinute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_SECOND:Oe+U.SetSecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_MILLISECOND:Oe+U.SetMillisecond,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_ISO_WEEKDAY:Oe+U.SetIsoWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_QUARTER:Oe+U.SetQuarter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_START_OF:Oe+U.StartOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_END_OF:Oe+U.EndOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ROUND_TO:Oe+U.RoundTo,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BEFORE:Na+U.IsBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_AFTER:Na+U.IsAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME:Na+U.IsSame,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_BEFORE:Na+U.IsSameOrBefore,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_SAME_OR_AFTER:Na+U.IsSameOrAfter,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_BETWEEN:Na+U.IsBetween,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID:Na+U.IsValid,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR:Na+U.IsLeapYear,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CLAMP_TO_RANGE:Oe+U.ClampToRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF:Oe+U.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF:Oe+U.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW:Oe+U.FromNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW:Oe+U.ToNow,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF:Oe+U.HumanizeDiff,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS:Oe+U.AddBusinessDays,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY:Oe+U.NextWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY:Oe+U.PreviousWeekday,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC:Oe+U.ToUTC,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE:Oe+U.ConvertTimezone,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET:Oe+U.GetTimezoneOffset,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET:Oe+U.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:Na+Ce.HasKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_HAS_NESTED_KEY:Na+Ce.HasNestedKey,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_KEY_VALUE_EQUALS:Na+Ce.KeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_NESTED_KEY_VALUE_EQUALS:Na+Ce.NestedKeyValueEquals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__OBJECT_IS_INSTANCE_OF_TYPE:Na+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+ai.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+ai.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+ai.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+ai.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+en.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+en.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+Xi.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+Xi.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+Xi.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+Qr.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+Qr.Stringify};class SOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class qOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class ZOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class HOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,entity:i,error:null,result:null})})}}class WOe 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:[Y.Editor]});I(this,"module",{main:async(i,n)=>({data:null,error:"Search module not implemented"})})}}class zOe 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",TC)}}const JOe=o=>o.map(p=>{var i,n;return((i=p.value)==null?void 0:i.valueAsType)??((n=p.value)==null?void 0:n.value)});class YOe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.Empty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=JOe(n),c=!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class XOe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.NotEmpty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=JOe(n),c=!!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}const NA=class NA 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.PrimitiveEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{var s,c,e,y,m,v;try{const E=(c=(s=n[0])==null?void 0:s.value)==null?void 0:c.name,b=(y=(e=n[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=n[1])==null?void 0:m.value)==null?void 0:v.value;let P=!1;return E&&NA.primitiveSet.has(E)?P=b===w:E===le.Untyped||E===le.KeyValue?P=JSON.stringify(b)===JSON.stringify(w):P=!1,{value:G.Success,error:null,result:P}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(NA,"primitiveSet",new Set([le.String,le.Number,le.Boolean,le.Null,le.Enum,le.Date,le.UUID]));let uA=NA;const xA=class xA 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic);if(!n)return;const s=n.get(Nt.PrimitiveNotEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{var s,c,e,y,m,v;try{const E=(c=(s=n[0])==null?void 0:s.value)==null?void 0:c.name,b=(y=(e=n[0])==null?void 0:e.value)==null?void 0:y.value,w=(v=(m=n[1])==null?void 0:m.value)==null?void 0:v.value;let P=!1;return E&&xA.primitiveSet.has(E)?P=b!==w:E===le.Untyped||E===le.KeyValue?P=JSON.stringify(b)!==JSON.stringify(w):P=!1,{value:G.Success,error:null,result:P}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(xA,"primitiveSet",new Set([le.String,le.Number,le.Boolean,le.Null,le.Enum,le.Date,le.UUID]));let pA=xA;var QOe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(c,e,y){var m=e.prototype;y.utc=function(L){var j={date:L,utc:!0,args:arguments};return new e(j)},m.utc=function(L){var j=y(this.toDate(),{locale:this.$L,utc:!0});return L?j.add(this.utcOffset(),i):j},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(L){L.utc&&(this.$u=!0),this.$utils().u(L.$offset)||(this.$offset=L.$offset),v.call(this,L)};var E=m.init;m.init=function(){if(this.$u){var L=this.$d;this.$y=L.getUTCFullYear(),this.$M=L.getUTCMonth(),this.$D=L.getUTCDate(),this.$W=L.getUTCDay(),this.$H=L.getUTCHours(),this.$m=L.getUTCMinutes(),this.$s=L.getUTCSeconds(),this.$ms=L.getUTCMilliseconds()}else E.call(this)};var b=m.utcOffset;m.utcOffset=function(L,j){var F=this.$utils().u;if(F(L))return this.$u?0:F(this.$offset)?b.call(this):this.$offset;if(typeof L=="string"&&(L=function(ee){ee===void 0&&(ee="");var pe=ee.match(n);if(!pe)return null;var oe=(""+pe[0]).match(s)||["-",0,0],ce=oe[0],Te=60*+oe[1]+ +oe[2];return Te===0?0:ce==="+"?Te:-Te}(L),L===null))return this;var q=Math.abs(L)<=16?60*L:L;if(q===0)return this.utc(j);var X=this.clone();if(j)return X.$offset=q,X.$u=!1,X;var ne=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(X=this.local().add(q+ne,i)).$offset=q,X.$x.$localOffset=ne,X};var w=m.format;m.format=function(L){var j=L||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,j)},m.valueOf=function(){var L=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*L},m.isUTC=function(){return!!this.$u},m.toISOString=function(){return this.toDate().toISOString()},m.toString=function(){return this.toDate().toUTCString()};var P=m.toDate;m.toDate=function(L){return L==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var $=m.diff;m.diff=function(L,j,F){if(L&&this.$u===L.$u)return $.call(this,L,j,F);var q=this.local(),X=y(L).local();return $.call(q,X,j,F)}}})})(QOe);var Tvi=QOe.exports;const vvi=Wa(Tvi);var eCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,c,e){var y,m=function(w,P,$){$===void 0&&($={});var L=new Date(w),j=function(F,q){q===void 0&&(q={});var X=q.timeZoneName||"short",ne=F+"|"+X,ee=n[ne];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:X}),n[ne]=ee),ee}(P,$);return j.formatToParts(L)},v=function(w,P){for(var $=m(w,P),L=[],j=0;j<$.length;j+=1){var F=$[j],q=F.type,X=F.value,ne=i[q];ne>=0&&(L[ne]=parseInt(X,10))}var ee=L[3],pe=ee===24?0:ee,oe=L[0]+"-"+L[1]+"-"+L[2]+" "+pe+":"+L[4]+":"+L[5]+":000",ce=+w;return(e.utc(oe).valueOf()-(ce-=ce%1e3))/6e4},E=c.prototype;E.tz=function(w,P){w===void 0&&(w=y);var $,L=this.utcOffset(),j=this.toDate(),F=j.toLocaleString("en-US",{timeZone:w}),q=Math.round((j-new Date(F))/1e3/60),X=15*-Math.round(j.getTimezoneOffset()/15)-q;if(!Number(X))$=this.utcOffset(0,P);else if($=e(F,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(X,!0),P){var ne=$.utcOffset();$=$.add(L-ne,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var P=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),P,{timeZoneName:w}).find(function(L){return L.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,P){if(!this.$x||!this.$x.$timezone)return b.call(this,w,P);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,P).tz(this.$x.$timezone,!0)},e.tz=function(w,P,$){var L=$&&P,j=$||P||y,F=v(+e(),j);if(typeof w!="string")return e(w).tz(j);var q=function(pe,oe,ce){var Te=pe-60*oe*1e3,de=v(Te,ce);if(oe===de)return[Te,oe];var ye=v(Te-=60*(de-oe)*1e3,ce);return de===ye?[Te,de]:[pe-60*Math.min(de,ye)*1e3,Math.max(de,ye)]}(e.utc(w,L).valueOf(),F,j),X=q[0],ne=q[1],ee=e(X).utcOffset(ne);return ee.$x.$timezone=j,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(eCe);var Evi=eCe.exports;const bvi=Wa(Evi);var tCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){n.prototype.isBetween=function(c,e,y,m){var v=s(c),E=s(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))}}})})(tCe);var Avi=tCe.exports;const gvi=Wa(Avi);var iCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isSameOrAfter=function(s,c){return this.isSame(s,c)||this.isAfter(s,c)}}})})(iCe);var Ivi=iCe.exports;const Rvi=Wa(Ivi);var rCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isSameOrBefore=function(s,c){return this.isSame(s,c)||this.isBefore(s,c)}}})})(rCe);var Dvi=rCe.exports;const wvi=Wa(Dvi);var nCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="week",n="year";return function(s,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(n).add(1,n).date(v),b=e(this).endOf(i);if(E.isBefore(b))return 1}var w=e(this).startOf(n).date(v).startOf(i).subtract(1,"millisecond"),P=this.diff(w,i,!0);return P<0?e(this).startOf("week").week():Math.ceil(P)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(nCe);var Ovi=nCe.exports;const Cvi=Wa(Ovi);var aCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="day";return function(n,s,c){var e=function(v){return v.add(4-v.isoWeekday(),i)},y=s.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,P,$=e(this),L=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),P=4-w.isoWeekday(),w.isoWeekday()>4&&(P+=7),w.add(P,i));return $.diff(L,"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)}}})})(aCe);var _vi=aCe.exports;const Pvi=Wa(_vi);var sCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i="month",n="quarter";return function(s,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)===n?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)===n){var P=this.quarter()-1;return w?this.month(3*P).startOf(i).startOf("day"):this.month(3*P+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(sCe);var Vvi=sCe.exports;const Nvi=Wa(Vvi);var lCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){n.prototype.dayOfYear=function(c){var e=Math.round((s(this).startOf("day")-s(this).startOf("year"))/864e5)+1;return c==null?e:this.add(c-e,"day")}}})})(lCe);var xvi=lCe.exports;const $vi=Wa(xvi);var oCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n,s){i=i||{};var c=n.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)}s.en.relativeTime=e,c.fromToBase=function(v,E,b,w,P){for(var $,L,j,F=b.$locale().relativeTime||e,q=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"}],X=q.length,ne=0;ne<X;ne+=1){var ee=q[ne];ee.d&&($=w?s(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var pe=(i.rounding||Math.round)(Math.abs($));if(j=$>0,pe<=ee.r||!ee.r){pe<=1&&ne>0&&(ee=q[ne-1]);var oe=F[ee.l];P&&(pe=P(""+pe)),L=typeof oe=="string"?oe.replace("%d",pe):oe(pe,E,ee.l,j);break}}if(E)return L;var ce=j?F.future:F.past;return typeof ce=="function"?ce(L):ce.replace("%s",L)},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?s.utc():s()};c.toNow=function(v){return this.to(m(this),v)},c.fromNow=function(v){return this.from(m(this),v)}}})})(oCe);var Lvi=oCe.exports;const Mvi=Wa(Lvi);var dCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){var i,n,s=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:s,milliseconds:1,weeks:6048e5},P=function(pe){return pe instanceof ne},$=function(pe,oe,ce){return new ne(pe,ce,oe.$l)},L=function(pe){return n.p(pe)+"s"},j=function(pe){return pe<0},F=function(pe){return j(pe)?Math.ceil(pe):Math.floor(pe)},q=function(pe){return Math.abs(pe)},X=function(pe,oe){return pe?j(pe)?{negative:!0,format:""+q(pe)+oe}:{negative:!1,format:""+pe+oe}:{negative:!1,format:""}},ne=function(){function pe(ce,Te,de){var ye=this;if(this.$d={},this.$l=de,ce===void 0&&(this.$ms=0,this.parseFromMilliseconds()),Te)return $(ce*w[L(Te)],this);if(typeof ce=="number")return this.$ms=ce,this.parseFromMilliseconds(),this;if(typeof ce=="object")return Object.keys(ce).forEach(function(Ge){ye.$d[L(Ge)]=ce[Ge]}),this.calMilliseconds(),this;if(typeof ce=="string"){var _e=ce.match(b);if(_e){var Pe=_e.slice(2).map(function(Ge){return Ge!=null?Number(Ge):0});return this.$d.years=Pe[0],this.$d.months=Pe[1],this.$d.weeks=Pe[2],this.$d.days=Pe[3],this.$d.hours=Pe[4],this.$d.minutes=Pe[5],this.$d.seconds=Pe[6],this.calMilliseconds(),this}}return this}var oe=pe.prototype;return oe.calMilliseconds=function(){var ce=this;this.$ms=Object.keys(this.$d).reduce(function(Te,de){return Te+(ce.$d[de]||0)*w[de]},0)},oe.parseFromMilliseconds=function(){var ce=this.$ms;this.$d.years=F(ce/v),ce%=v,this.$d.months=F(ce/E),ce%=E,this.$d.days=F(ce/y),ce%=y,this.$d.hours=F(ce/e),ce%=e,this.$d.minutes=F(ce/c),ce%=c,this.$d.seconds=F(ce/s),ce%=s,this.$d.milliseconds=ce},oe.toISOString=function(){var ce=X(this.$d.years,"Y"),Te=X(this.$d.months,"M"),de=+this.$d.days||0;this.$d.weeks&&(de+=7*this.$d.weeks);var ye=X(de,"D"),_e=X(this.$d.hours,"H"),Pe=X(this.$d.minutes,"M"),Ge=this.$d.seconds||0;this.$d.milliseconds&&(Ge+=this.$d.milliseconds/1e3,Ge=Math.round(1e3*Ge)/1e3);var xe=X(Ge,"S"),Me=ce.negative||Te.negative||ye.negative||_e.negative||Pe.negative||xe.negative,Se=_e.format||Pe.format||xe.format?"T":"",je=(Me?"-":"")+"P"+ce.format+Te.format+ye.format+Se+_e.format+Pe.format+xe.format;return je==="P"||je==="-P"?"P0D":je},oe.toJSON=function(){return this.toISOString()},oe.format=function(ce){var Te=ce||"YYYY-MM-DDTHH:mm:ss",de={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return Te.replace(m,function(ye,_e){return _e||String(de[ye])})},oe.as=function(ce){return this.$ms/w[L(ce)]},oe.get=function(ce){var Te=this.$ms,de=L(ce);return de==="milliseconds"?Te%=1e3:Te=de==="weeks"?F(Te/w[de]):this.$d[de],Te||0},oe.add=function(ce,Te,de){var ye;return ye=Te?ce*w[L(Te)]:P(ce)?ce.$ms:$(ce,this).$ms,$(this.$ms+ye*(de?-1:1),this)},oe.subtract=function(ce,Te){return this.add(ce,Te,!0)},oe.locale=function(ce){var Te=this.clone();return Te.$l=ce,Te},oe.clone=function(){return $(this.$ms,this)},oe.humanize=function(ce){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!ce)},oe.valueOf=function(){return this.asMilliseconds()},oe.milliseconds=function(){return this.get("milliseconds")},oe.asMilliseconds=function(){return this.as("milliseconds")},oe.seconds=function(){return this.get("seconds")},oe.asSeconds=function(){return this.as("seconds")},oe.minutes=function(){return this.get("minutes")},oe.asMinutes=function(){return this.as("minutes")},oe.hours=function(){return this.get("hours")},oe.asHours=function(){return this.as("hours")},oe.days=function(){return this.get("days")},oe.asDays=function(){return this.as("days")},oe.weeks=function(){return this.get("weeks")},oe.asWeeks=function(){return this.as("weeks")},oe.months=function(){return this.get("months")},oe.asMonths=function(){return this.as("months")},oe.years=function(){return this.get("years")},oe.asYears=function(){return this.as("years")},pe}(),ee=function(pe,oe,ce){return pe.add(oe.years()*ce,"y").add(oe.months()*ce,"M").add(oe.days()*ce,"d").add(oe.hours()*ce,"h").add(oe.minutes()*ce,"m").add(oe.seconds()*ce,"s").add(oe.milliseconds()*ce,"ms")};return function(pe,oe,ce){i=ce,n=ce().$utils(),ce.duration=function(ye,_e){var Pe=ce.locale();return $(ye,{$l:Pe},_e)},ce.isDuration=P;var Te=oe.prototype.add,de=oe.prototype.subtract;oe.prototype.add=function(ye,_e){return P(ye)?ee(this,ye,1):Te.bind(this)(ye,_e)},oe.prototype.subtract=function(ye,_e){return P(ye)?ee(this,ye,-1):de.bind(this)(ye,_e)}}})})(dCe);var Bvi=dCe.exports;const Gvi=Wa(Bvi);var uCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Vr,function(){return function(i,n){n.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(uCe);var kvi=uCe.exports;const jvi=Wa(kvi);M.extend(vvi);M.extend(bvi);M.extend(gvi);M.extend(Rvi);M.extend(wvi);M.extend(Cvi);M.extend(Pvi);M.extend(Nvi);M.extend($vi);M.extend(Mvi);M.extend(Gvi);M.extend(jvi);const gt=o=>M(o),er=o=>o.toISOString();function pCe(){return er(M())}function cCe(o,p){return gt(o).format(p)}function fCe(o){return er(M(o))}function yCe(o){if(o==null)throw new TypeError("ToDate expects a non-null value.");if(typeof o=="string"){const p=M(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?M.unix(o):M(o);if(!p.isValid())throw new TypeError("Invalid numeric timestamp.");return p.toISOString()}if(o instanceof Date){const p=M(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 hCe(o,p,i){return er(gt(o).add(p,i))}function mCe(o,p,i){return er(gt(o).subtract(p,i))}function TCe(o,p,i,n=!1){return gt(o).diff(gt(p),i,n)}function vCe(o){return gt(o).unix()}function ECe(o){return er(M.unix(o))}function bCe(o){return er(gt(o))}function ACe(o){return gt(o).year()}function gCe(o){return gt(o).month()}function ICe(o){return gt(o).date()}function RCe(o){return gt(o).hour()}function DCe(o){return gt(o).minute()}function wCe(o){return gt(o).second()}function OCe(o){return gt(o).millisecond()}function CCe(o){return gt(o).isoWeekday()}function _Ce(o){return gt(o).week()}function PCe(o){return gt(o).quarter()}function VCe(o){return gt(o).dayOfYear()}function NCe(o){return gt(o).daysInMonth()}function xCe(o,p){return er(gt(o).year(p))}function $Ce(o,p){return er(gt(o).month(p))}function LCe(o,p){return er(gt(o).date(p))}function MCe(o,p){return er(gt(o).hour(p))}function BCe(o,p){return er(gt(o).minute(p))}function GCe(o,p){return er(gt(o).second(p))}function kCe(o,p){return er(gt(o).millisecond(p))}function jCe(o,p){return er(gt(o).isoWeekday(p))}function UCe(o,p){return er(gt(o).quarter(p))}function KCe(o,p){return er(gt(o).startOf(p))}function FCe(o,p){return er(gt(o).endOf(p))}function SCe(o,p){const i=gt(o),n=i.startOf(p),s=i.endOf(p),c=n.valueOf()+(s.valueOf()-n.valueOf())/2;return er(i.valueOf()<c?n:s)}function qCe(o,p,i){return gt(o).isBefore(gt(p),i)}function ZCe(o,p,i){return gt(o).isAfter(gt(p),i)}function HCe(o,p,i){return gt(o).isSame(gt(p),i)}function WCe(o,p,i){return gt(o).isSameOrBefore(gt(p),i)}function zCe(o,p,i){return gt(o).isSameOrAfter(gt(p),i)}function JCe(o,p,i,n,s="()"){return gt(o).isBetween(gt(p),gt(i),n,s)}function YCe(o){return M(o).isValid()}function XCe(o){return gt(o).isLeapYear()}function QCe(o,p,i){const n=gt(o);return n.isBefore(p)?er(gt(p)):n.isAfter(i)?er(gt(i)):er(n)}function e_e(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=gt(o[0]);for(let i=1;i<o.length;i++){const n=gt(o[i]);n.isBefore(p)&&(p=n)}return er(p)}function t_e(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=gt(o[0]);for(let i=1;i<o.length;i++){const n=gt(o[i]);n.isAfter(p)&&(p=n)}return er(p)}function i_e(o,p=!1){return gt(o).fromNow(p)}function r_e(o,p=!1){return gt(o).toNow(p)}function n_e(o,p,i=!0){const n=gt(o).diff(gt(p),"millisecond",!0),s=Math.abs(n),e=M.duration(s,"milliseconds").humanize();return i?n>=0?`in ${e}`:`${e} ago`:e}function a_e(o,p,i=["6","7"],n=[]){const s=v=>n.some(E=>gt(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=gt(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)&&!s(e)&&m--}return er(e)}function s_e(o,p){let i=gt(o);const n=p;for(let s=0;s<7;s++)if(i=i.add(1,"day"),i.isoWeekday()===n)return er(i);return er(i)}function l_e(o,p){let i=gt(o);const n=p;for(let s=0;s<7;s++)if(i=i.subtract(1,"day"),i.isoWeekday()===n)return er(i);return er(i)}const o_e="Local";function HV(){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 WV(){const o=HV();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function d_e(o,p,i=!1){let n=p;if(n===o_e){const e=HV();if(!e)throw new Error("Unable to detect current timezone from host environment.");n=e}const s=n?M.tz(o,n):gt(o),c=i?s.utc(!0):s.utc();return er(c)}function u_e(o,p,i=!1){const n=gt(o);return er(i?n.tz(p,!0):n.tz(p))}function p_e(o,p){const i=o===o_e?WV():o;return gt(p).tz(i).utcOffset()}function c_e(o,p,i=!1){return er(gt(o).utcOffset(p,i))}class f_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetCurrentTimestamp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=pCe();return{value:G.Success,error:null,result:s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class y_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FormatDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=cCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class h_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ParseDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=fCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class m_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.AddToDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=hCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class T_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SubtractFromDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=mCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class v_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.DifferenceBetweenDates);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2],m=s[3]??!1,v=TCe(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Uvi 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=yCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class E_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToUnix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=vCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class b_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FromUnix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=ECe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class A_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToISOString);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=bCe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class g_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=ACe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class I_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=gCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class R_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=ICe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class D_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetHour);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=RCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class w_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMinute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=DCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class O_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetSecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=wCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class C_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetMillisecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=OCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class __e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetIsoWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=CCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class P_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetWeekOfYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=_Ce(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class V_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetQuarter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=PCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class N_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDayOfYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=VCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class x_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetDaysInMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=NCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetCurrentIanaTimeZone);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=WV();return{value:G.Success,error:null,result:s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class L_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=xCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class M_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMonth);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=$Ce(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class B_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetDate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=LCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class G_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetHour);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=MCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class k_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMinute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=BCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class j_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetSecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=GCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class U_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetMillisecond);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=kCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class K_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetIsoWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=jCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class F_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetQuarter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=UCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class S_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.StartOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=KCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class q_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.EndOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=FCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Z_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.RoundTo);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=SCe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class H_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsBefore);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=qCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class W_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsAfter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=ZCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class z_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSame);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=HCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class J_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSameOrBefore);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=WCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Y_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsSameOrAfter);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=zCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class X_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsBetween);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)||((P=b.value)==null?void 0:P.value)}),c=s[0],e=s[1],y=s[2],m=s[3],v=s[4],E=JCe(c,e,y,m,v??void 0);return{value:G.Success,error:null,result:E}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Q_e 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsValid);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=YCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ePe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.IsLeapYear);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)||((m=e.value)==null?void 0:m.value)}),c=XCe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ClampToRange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=QCe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.MinOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=s.length===1&&Array.isArray(s[0])?s[0]:s,e=e_e(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.MaxOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),c=s.length===1&&Array.isArray(s[0])?s[0]:s,e=t_e(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.FromNow);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=i_e(s,c??!1);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToNow);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),y=r_e(s,c??!1);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.HumanizeDiff);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=n_e(s,c,e??!0);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.AddBusinessDays);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)??((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2]??void 0,m=s[3]??[],v=a_e(c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.NextWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=s_e(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.PreviousWeekday);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)}),e=l_e(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ToUTC);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]||void 0,y=s[2]??!1,m=d_e(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.ConvertTimezone);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=u_e(s,c,e??!1);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.GetTimezoneOffset);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=p_e(s,c);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(U.SetUTCOffset);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),m=c_e(s,c,e??!1);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Parallel);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)||((P=b.value)==null?void 0:P.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,[Y.Editor])[0],v=c.map(b=>{const w=new Au(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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class hPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Sequential);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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,[Y.Editor])[0],b=new Au(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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ji.Wait);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}const Kvi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,zV=o=>o===null||["string","number","boolean"].includes(typeof o);function Cn(o,p="Input must be an array"){if(!Array.isArray(o))throw new TypeError(p);return o}function Yl(o){const p=Cn(o,"Input must be an array");if(!p||p.length===0)throw new TypeError("No list provided or list is empty");return p}function JV(o){return Array.isArray(o)?o:[]}function os(o){return Number(o)}function TPe(o){if(!o||o.length===0)throw new TypeError("No input lists provided");if(!o.every(n=>Array.isArray(n)))throw new TypeError("All inputs must be arrays");const[p,...i]=o;return i.reduce((n,s)=>n.concat(s),p)}function vPe(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 EPe(o,p){const i=Yl(o),n=os(p);return[i.slice(0,n),i.slice(n)]}function bPe(o){return Yl(o).slice().reverse()}function APe(o){return Yl(o).slice(0,-1)}function gPe(o){return Yl(o).slice(1)}function IPe(o,p,i){const n=Cn(o),s=os(p);if(s<0||s>n.length)throw new TypeError("Index out of bounds");return[...n.slice(0,s),i,...n.slice(s)]}function RPe(o,p,i){const n=Yl(o),s=os(p);if(s<0||s>=n.length)throw new TypeError("Index out of bounds");const c=[...n];return c[s]=i,c}function DPe(o,p,i){const n=Yl(o),s=n.indexOf(p);if(s===-1)return n;const c=[...n];return c[s]=i,c}function wPe(o,p,i){const n=Yl(o),s=n.lastIndexOf(p);if(s===-1)return n;const c=[...n];return c[s]=i,c}function OPe(o,p,i){return Yl(o).map(s=>s===p?i:s)}function CPe(o,p){const i=Yl(o),n=os(p);if(n<0||n>=i.length)throw new TypeError("Index out of bounds");return i[n]}function _Pe(o){return Yl(o)[0]}function PPe(o){const p=Yl(o);return p[p.length-1]}function VPe(o,p,...i){return[...Cn(o),p,...i]}function NPe(o,p){const i=Cn(o);return[p,...i]}function xPe(o){return Cn(o).length}function $Pe(o,p){const i=Cn(o),n=os(p);if(n<0||n>=i.length)throw new TypeError("Index out of bounds");return i.slice(0,n).concat(i.slice(n+1))}function LPe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return i.slice(0,n)}function MPe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return n===0?[]:i.slice(-n)}function BPe(o,p,i){const n=Cn(o),s=p==null?void 0:os(p),c=i==null?void 0:os(i);return n.slice(s,c)}function GPe(o,p){return Cn(o).indexOf(p)}function kPe(o,p){return Cn(o).lastIndexOf(p)}function jPe(o){const p=Cn(o),i=[],n=new Set;for(const s of p)n.has(s)||(n.add(s),i.push(s));return i}function UPe(o){return Cn(o).reduce((i,n)=>i.concat(n),[])}function KPe(o){const p=Cn(o);if(p.length<=1)return[...p];const i=p[0],n=typeof i=="number"&&p.every(e=>typeof e=="number"&&Number.isFinite(e)),s=typeof i=="string"&&p.every(e=>typeof e=="string");let c=null;if(n?c="number":s&&(c=p.every(y=>Kvi.test(y)&&M(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)=>M(e).valueOf()-M(y).valueOf())}function FPe(o){const i=[...Cn(o)];for(let n=i.length-1;n>0;n--){const s=Math.floor(jI()*(n+1));[i[n],i[s]]=[i[s],i[n]]}return i}function SPe(o,p){const i=Cn(o),n=Math.max(1,os(p)||1),s=[];for(let c=0;c<i.length;c+=n)s.push(i.slice(c,c+n));return s}function qPe(o,p,i){const n=Cn(o),s=Math.max(0,os(p)||0);if(n.length>=s)return[...n];const c=s-n.length;return Array(c).fill(i).concat(n)}function ZPe(o,p,i){const n=Cn(o),s=Math.max(0,os(p)||0);if(n.length>=s)return[...n];const c=s-n.length,e=Array(c).fill(i);return n.concat(e)}function HPe(o,p){const i=Cn(o),n=Math.max(0,os(p)||0),s=[];for(let c=0;c<n;c++)s.push(...i);return s}function WPe(o,p){if(!zV(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return JV(o).some(n=>n===p)}function zPe(o,p){const i=JV(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(zV))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return n.every(s=>i.includes(s))}function JPe(o,p){const i=JV(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(zV))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return n.some(s=>i.includes(s))}class YPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=TPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class XPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Split);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],[y,m]=EPe(c,e);return{value:G.Success,error:null,result:[y,m]}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class QPe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Reverse);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=bPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class eVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.DeleteLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=APe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.DeleteFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=gPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.AddAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=IPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=RPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=DPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=wPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.ReplaceAll);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[2],m=OPe(c,e,y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetIndexItem);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=CPe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetFirst);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=_Pe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.GetLast);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)||((v=y.value)==null?void 0:v.value)})[0],e=PPe(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Append);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s.slice(2),m=VPe(c,e,...y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class pVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(ie.Prepend);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=NPe(c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLength);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.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:xPe(s)}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.DeleteAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=$Pe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetFirstNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=LPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class hVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLastNItems);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=MPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class mVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Slice);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=BPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class TVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Concat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),[c,...e]=s,y=vPe(c,...e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class vVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=GPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class EVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.GetLastIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=kPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class bVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Unique);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=jPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class AVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Flatten);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=UPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class gVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Sort);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=KPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class IVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Shuffle);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=FPe(s);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class RVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Chunk);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=SPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class DVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.PadStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=qPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class wVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.PadEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=ZPe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class OVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Repeat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=HPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class CVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.Contains);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=WPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class _Ve 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.ContainsAll);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=zPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class PVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(ie.ContainsAny);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=JPe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class Fvi 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.GetLength);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.length;return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class VVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{var s,c,e;try{const y=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.separator.id}),m=((s=y==null?void 0:y.value)==null?void 0:s.value)||"",v=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=n.find(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=n.filter(j=>{var F;return((F=j.valueOwner)==null?void 0:F.id)===Q.operation[S.Join].inputs.dynamicString.id}).map(j=>{var F,q;return((F=j.value)==null?void 0:F.valueAsType)||((q=j.value)==null?void 0:q.value)||""}),L=[E,w,...$].join(m);return{value:G.Success,error:null,result:L}}catch(y){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:y,result:null}}}})}}class NVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y={firstPart:c.slice(0,e),secondPart:c.slice(e)};return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class xVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtAllSeparators);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[1],y=c.split(e);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $Ve 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtFirstSeparator);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class LVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.SplitAtLastSeparator);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class MVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class BVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class GVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Reverse);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class kVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ToLowerCase);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class jVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ToUpperCase);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class UVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.DeleteAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class KVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.AddAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class FVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]??1,y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class SVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1]??1,y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class qVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceAtIndex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[2]??1,m=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ZVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceFirstMatch);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class HVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceLastMatch);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(E=>{var b,w;return((b=E.value)==null?void 0:b.valueAsType)||((w=E.value)==null?void 0:w.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class WVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.ReplaceAllMatches);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[1],y=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class zVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetIndexItem);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class JVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetLastNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class YVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetFirstNChars);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class XVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.GetIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class QVe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Append);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)||((b=v.value)==null?void 0:b.value)}),c=s[0],e=s[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=s.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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class eNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(S.Prepend);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const s=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)||((E=m.value)==null?void 0:E.value)}),c=s[0],e=s[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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class tNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Trim);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trim();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class iNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.TrimStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trimStart();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class rNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.TrimEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=s.trimEnd();return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class nNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Substring);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.substring(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class aNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Slice);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.slice(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class sNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.GetLastIndexOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.lastIndexOf(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class lNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.PadStart);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.padStart(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class oNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.PadEnd);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(m=>{var v,E;return((v=m.value)==null?void 0:v.valueAsType)??((E=m.value)==null?void 0:E.value)}),y=s.padEnd(c,e??void 0);return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class dNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Repeat);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=s.repeat(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class uNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.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(s??"").match(y);return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class pNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchAllRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(b=>{var w,P;return((w=b.value)==null?void 0:w.valueAsType)??((P=b.value)==null?void 0:P.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(s??"").matchAll(v),b=>Array.from(b));return{value:G.Success,error:null,result:E}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class cNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.SearchRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.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(s??"").search(m)}catch{y=-1}return{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class fNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.ReplaceRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e,y]=n.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(s??"");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(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class yNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.NormalizeUnicode);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)}),e=s.normalize(c||"NFC");return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}const $A=class $A 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemoveDiacritics);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=n.map(e=>{var y,m;return((y=e.value)==null?void 0:y.valueAsType)??((m=e.value)==null?void 0:m.value)}),c=String(s??"").normalize("NFD").replace($A.COMBINING_MARKS,"");return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}};I($A,"COMBINING_MARKS",/[\u0300-\u036f]/g);let cA=$A;class hNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.CountOccurrences);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=y===""?0:e.split(y).length-1;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class mNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EnsurePrefix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.startsWith(y)?e:y+e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class TNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EnsureSuffix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.endsWith(y)?e:e+y;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class vNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemovePrefix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.startsWith(y)?e.slice(y.length):e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ENe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.RemoveSuffix);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)}),e=String(s??""),y=String(c??""),m=e.endsWith(y)?e.slice(0,-y.length):e;return{value:G.Success,error:null,result:m}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class bNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.StartsWith);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("StartsWith expects two strings.");const e=s.startsWith(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class ANe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.EndsWith);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("EndsWith expects two strings.");const e=s.endsWith(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class gNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.Contains);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=n.map(y=>{var m,v;return((m=y.value)==null?void 0:m.valueAsType)??((v=y.value)==null?void 0:v.value)});if(typeof s!="string"||typeof c!="string")throw new TypeError("Contains expects two strings.");const e=s.includes(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class INe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(S.MatchesRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(v=>{var E,b;return((E=v.value)==null?void 0:E.valueAsType)??((b=v.value)==null?void 0:b.value)});if(typeof s!="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(s),{value:G.Success,error:null,result:y}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}function RNe(o,p){const i=Number(o),s=10**Math.max(0,Number(p)||0);return Math.round(i*s)/s}function DNe(o,p){const i=Number(o),n=Math.abs(Number(p)||0);return n===0?i:Math.round(i/n)*n}function wNe(o,p,i){const n=Number(o),s=Number(p),c=Number(i);return Math.min(Math.max(n,s),c)}function ONe(o,p,i,n,s){const c=Number(o),e=Number(p),y=Number(i),m=Number(n),v=Number(s);if(e===y)throw new Error("Input range cannot be zero");const E=(c-e)/(y-e);return m+E*(v-m)}function CNe(...o){const p=o.map(n=>Number(n));return p.length===0?0:p.reduce((n,s)=>n+s,0)/p.length}function _Ne(...o){const p=o.map(n=>Number(n)).sort((n,s)=>n-s);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 PNe(o,p){const i=Number(o),n=Number(p);return n===0?NaN:i<0&&n%2===1?-Math.pow(-i,1/n):Math.pow(i,1/n)}function VNe(o,p){const i=Number(o),n=Number(p);return i===0?1/0:(n-i)/i*100}const li=o=>o.map(p=>{var i,n;return((i=p.value)==null?void 0:i.valueAsType)??((n=p.value)==null?void 0:n.value)});class NNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Addition);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e+y,0);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class xNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Subtraction);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e-y,0);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class $Ne 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Multiplication);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=li(n).reduce((e,y)=>e*y,1);return{value:G.Success,error:null,result:c}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class LNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Division);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n);if(c===0)throw new Error("Division by zero is not allowed");const e=s/c;return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class MNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Remainder);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n);if(c===0)throw new Error("Division by zero is not allowed");const e=s%c;return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class BNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===Y.Logic);if(n){const s=n.get(te.Exponentiation);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{try{const[s,c]=li(n),e=Math.pow(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class GNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Negate);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:-s}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class kNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Absolute);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.abs(Number(s))}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class jNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Sign);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sign(Number(s))}}catch(s){return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:s,result:null}}}})}}class UNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Round);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.round(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class KNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Floor);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.floor(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class FNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Ceil);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.ceil(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class SNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Trunc);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.trunc(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class qNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.RoundToDecimals);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=RNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class ZNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.SnapToStep);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=DNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class HNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Clamp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=li(n),y=wNe(s,c,e);return{value:G.Success,error:null,result:y}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class WNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MapRange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e,y,m]=li(n),v=ONe(s,c,e,y,m);return{value:G.Success,error:null,result:v}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class zNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Average);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n),c=CNe(...s);return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class JNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Median);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n),c=_Ne(...s);return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class YNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MinOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n).map(Number),c=s.length?Math.min(...s):1/0;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class XNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MaxOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const s=li(n).map(Number),c=s.length?Math.max(...s):-1/0;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class QNe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.SquareRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sqrt(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class exe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.CubeRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.cbrt(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class txe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.NthRoot);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=PNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class ixe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Exp);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.exp(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class rxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LogNatural);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.log(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class nxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Log10);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n),c=Number(s),e=Math.log10?Math.log10(c):Math.log(c)/Math.LN10;return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class axe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Sin);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.sin(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class sxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Cos);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.cos(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class lxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Tan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.tan(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class oxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Asin);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.asin(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class dxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Acos);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.acos(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class uxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Atan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Math.atan(Number(s))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class pxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.Atan2);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:Math.atan2(Number(s),Number(c))}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class cxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.ToRadians);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Number(s)*Math.PI/180}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class fxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.ToDegrees);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=li(n);return{value:G.Success,error:null,result:Number(s)*180/Math.PI}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class yxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.PercentOf);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=Number(s)/100*Number(c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class HO 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.PercentageChange);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n),e=VNe(s,c);return{value:G.Success,error:null,result:e}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class hxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LessThan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s<c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class mxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MoreThan);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s>c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class Txe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.LessThanOrEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s<=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class vxe 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:[Y.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===Y.Logic),s=n==null?void 0:n.get(te.MoreThanOrEqual);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c]=li(n);return{value:G.Success,error:null,result:s>=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}function Exe(o,p){return function(){return o.apply(p,arguments)}}const{toString:Svi}=Object.prototype,{getPrototypeOf:YV}=Object,{iterator:FI,toStringTag:bxe}=Symbol,SI=(o=>p=>{const i=Svi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Xl=o=>(o=o.toLowerCase(),p=>SI(p)===o),qI=o=>p=>typeof p===o,{isArray:$h}=Array,Ry=qI("undefined");function sv(o){return o!==null&&!Ry(o)&&o.constructor!==null&&!Ry(o.constructor)&&Ga(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Axe=Xl("ArrayBuffer");function qvi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&Axe(o.buffer),p}const Zvi=qI("string"),Ga=qI("function"),gxe=qI("number"),lv=o=>o!==null&&typeof o=="object",Hvi=o=>o===!0||o===!1,jb=o=>{if(SI(o)!=="object")return!1;const p=YV(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(bxe in o)&&!(FI in o)},Wvi=o=>{if(!lv(o)||sv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},zvi=Xl("Date"),Jvi=Xl("File"),Yvi=Xl("Blob"),Xvi=Xl("FileList"),Qvi=o=>lv(o)&&Ga(o.pipe),eEi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ga(o.append)&&((p=SI(o))==="formdata"||p==="object"&&Ga(o.toString)&&o.toString()==="[object FormData]"))},tEi=Xl("URLSearchParams"),[iEi,rEi,nEi,aEi]=["ReadableStream","Request","Response","Headers"].map(Xl),sEi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ov(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let n,s;if(typeof o!="object"&&(o=[o]),$h(o))for(n=0,s=o.length;n<s;n++)p.call(null,o[n],n,o);else{if(sv(o))return;const c=i?Object.getOwnPropertyNames(o):Object.keys(o),e=c.length;let y;for(n=0;n<e;n++)y=c[n],p.call(null,o[y],y,o)}}function Ixe(o,p){if(sv(o))return null;p=p.toLowerCase();const i=Object.keys(o);let n=i.length,s;for(;n-- >0;)if(s=i[n],p===s.toLowerCase())return s;return null}const Ec=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Rxe=o=>!Ry(o)&&o!==Ec;function WO(){const{caseless:o,skipUndefined:p}=Rxe(this)&&this||{},i={},n=(s,c)=>{const e=o&&Ixe(i,c)||c;jb(i[e])&&jb(s)?i[e]=WO(i[e],s):jb(s)?i[e]=WO({},s):$h(s)?i[e]=s.slice():(!p||!Ry(s))&&(i[e]=s)};for(let s=0,c=arguments.length;s<c;s++)arguments[s]&&ov(arguments[s],n);return i}const lEi=(o,p,i,{allOwnKeys:n}={})=>(ov(p,(s,c)=>{i&&Ga(s)?o[c]=Exe(s,i):o[c]=s},{allOwnKeys:n}),o),oEi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),dEi=(o,p,i,n)=>{o.prototype=Object.create(p.prototype,n),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:p.prototype}),i&&Object.assign(o.prototype,i)},uEi=(o,p,i,n)=>{let s,c,e;const y={};if(p=p||{},o==null)return p;do{for(s=Object.getOwnPropertyNames(o),c=s.length;c-- >0;)e=s[c],(!n||n(e,o,p))&&!y[e]&&(p[e]=o[e],y[e]=!0);o=i!==!1&&YV(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},pEi=(o,p,i)=>{o=String(o),(i===void 0||i>o.length)&&(i=o.length),i-=p.length;const n=o.indexOf(p,i);return n!==-1&&n===i},cEi=o=>{if(!o)return null;if($h(o))return o;let p=o.length;if(!gxe(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},fEi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&YV(Uint8Array)),yEi=(o,p)=>{const n=(o&&o[FI]).call(o);let s;for(;(s=n.next())&&!s.done;){const c=s.value;p.call(o,c[0],c[1])}},hEi=(o,p)=>{let i;const n=[];for(;(i=o.exec(p))!==null;)n.push(i);return n},mEi=Xl("HTMLFormElement"),TEi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),T4=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),vEi=Xl("RegExp"),Dxe=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),n={};ov(i,(s,c)=>{let e;(e=p(s,c,o))!==!1&&(n[c]=e||s)}),Object.defineProperties(o,n)},EEi=o=>{Dxe(o,(p,i)=>{if(Ga(o)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const n=o[i];if(Ga(n)){if(p.enumerable=!1,"writable"in p){p.writable=!1;return}p.set||(p.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},bEi=(o,p)=>{const i={},n=s=>{s.forEach(c=>{i[c]=!0})};return $h(o)?n(o):n(String(o).split(p)),i},AEi=()=>{},gEi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function IEi(o){return!!(o&&Ga(o.append)&&o[bxe]==="FormData"&&o[FI])}const REi=o=>{const p=new Array(10),i=(n,s)=>{if(lv(n)){if(p.indexOf(n)>=0)return;if(sv(n))return n;if(!("toJSON"in n)){p[s]=n;const c=$h(n)?[]:{};return ov(n,(e,y)=>{const m=i(e,s+1);!Ry(m)&&(c[y]=m)}),p[s]=void 0,c}}return n};return i(o,0)},DEi=Xl("AsyncFunction"),wEi=o=>o&&(lv(o)||Ga(o))&&Ga(o.then)&&Ga(o.catch),wxe=((o,p)=>o?setImmediate:p?((i,n)=>(Ec.addEventListener("message",({source:s,data:c})=>{s===Ec&&c===i&&n.length&&n.shift()()},!1),s=>{n.push(s),Ec.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ga(Ec.postMessage)),OEi=typeof queueMicrotask<"u"?queueMicrotask.bind(Ec):typeof process<"u"&&process.nextTick||wxe,CEi=o=>o!=null&&Ga(o[FI]),Ue={isArray:$h,isArrayBuffer:Axe,isBuffer:sv,isFormData:eEi,isArrayBufferView:qvi,isString:Zvi,isNumber:gxe,isBoolean:Hvi,isObject:lv,isPlainObject:jb,isEmptyObject:Wvi,isReadableStream:iEi,isRequest:rEi,isResponse:nEi,isHeaders:aEi,isUndefined:Ry,isDate:zvi,isFile:Jvi,isBlob:Yvi,isRegExp:vEi,isFunction:Ga,isStream:Qvi,isURLSearchParams:tEi,isTypedArray:fEi,isFileList:Xvi,forEach:ov,merge:WO,extend:lEi,trim:sEi,stripBOM:oEi,inherits:dEi,toFlatObject:uEi,kindOf:SI,kindOfTest:Xl,endsWith:pEi,toArray:cEi,forEachEntry:yEi,matchAll:hEi,isHTMLForm:mEi,hasOwnProperty:T4,hasOwnProp:T4,reduceDescriptors:Dxe,freezeMethods:EEi,toObjectSet:bEi,toCamelCase:TEi,noop:AEi,toFiniteNumber:gEi,findKey:Ixe,global:Ec,isContextDefined:Rxe,isSpecCompliantForm:IEi,toJSONObject:REi,isAsyncFn:DEi,isThenable:wEi,setImmediate:wxe,asap:OEi,isIterable:CEi};function ni(o,p,i,n,s){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),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}Ue.inherits(ni,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:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const Oxe=ni.prototype,Cxe={};["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=>{Cxe[o]={value:o}});Object.defineProperties(ni,Cxe);Object.defineProperty(Oxe,"isAxiosError",{value:!0});ni.from=(o,p,i,n,s,c)=>{const e=Object.create(Oxe);Ue.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 ni.call(e,y,m,i,n,s),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 _Ei=null;function zO(o){return Ue.isPlainObject(o)||Ue.isArray(o)}function _xe(o){return Ue.endsWith(o,"[]")?o.slice(0,-2):o}function v4(o,p,i){return o?o.concat(p).map(function(s,c){return s=_xe(s),!i&&c?"["+s+"]":s}).join(i?".":""):p}function PEi(o){return Ue.isArray(o)&&!o.some(zO)}const VEi=Ue.toFlatObject(Ue,{},null,function(p){return/^is[A-Z]/.test(p)});function ZI(o,p,i){if(!Ue.isObject(o))throw new TypeError("target must be an object");p=p||new FormData,i=Ue.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,j){return!Ue.isUndefined(j[L])});const n=i.metaTokens,s=i.visitor||E,c=i.dots,e=i.indexes,m=(i.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(p);if(!Ue.isFunction(s))throw new TypeError("visitor must be a function");function v($){if($===null)return"";if(Ue.isDate($))return $.toISOString();if(Ue.isBoolean($))return $.toString();if(!m&&Ue.isBlob($))throw new ni("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer($)||Ue.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,L,j){let F=$;if($&&!j&&typeof $=="object"){if(Ue.endsWith(L,"{}"))L=n?L:L.slice(0,-2),$=JSON.stringify($);else if(Ue.isArray($)&&PEi($)||(Ue.isFileList($)||Ue.endsWith(L,"[]"))&&(F=Ue.toArray($)))return L=_xe(L),F.forEach(function(X,ne){!(Ue.isUndefined(X)||X===null)&&p.append(e===!0?v4([L],ne,c):e===null?L:L+"[]",v(X))}),!1}return zO($)?!0:(p.append(v4(j,L,c),v($)),!1)}const b=[],w=Object.assign(VEi,{defaultVisitor:E,convertValue:v,isVisitable:zO});function P($,L){if(!Ue.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+L.join("."));b.push($),Ue.forEach($,function(F,q){(!(Ue.isUndefined(F)||F===null)&&s.call(p,F,Ue.isString(q)?q.trim():q,L,w))===!0&&P(F,L?L.concat(q):[q])}),b.pop()}}if(!Ue.isObject(o))throw new TypeError("data must be an object");return P(o),p}function E4(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(n){return p[n]})}function XV(o,p){this._pairs=[],o&&ZI(o,this,p)}const Pxe=XV.prototype;Pxe.append=function(p,i){this._pairs.push([p,i])};Pxe.toString=function(p){const i=p?function(n){return p.call(this,n,E4)}:E4;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function NEi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vxe(o,p,i){if(!p)return o;const n=i&&i.encode||NEi;Ue.isFunction(i)&&(i={serialize:i});const s=i&&i.serialize;let c;if(s?c=s(p,i):c=Ue.isURLSearchParams(p)?p.toString():new XV(p,i).toString(n),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class xEi{constructor(){this.handlers=[]}use(p,i,n){return this.handlers.push({fulfilled:p,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(p){this.handlers[p]&&(this.handlers[p]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(p){Ue.forEach(this.handlers,function(n){n!==null&&p(n)})}}const b4=xEi,Nxe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$Ei=typeof URLSearchParams<"u"?URLSearchParams:XV,LEi=typeof FormData<"u"?FormData:null,MEi=typeof Blob<"u"?Blob:null,BEi={isBrowser:!0,classes:{URLSearchParams:$Ei,FormData:LEi,Blob:MEi},protocols:["http","https","file","blob","url","data"]},QV=typeof window<"u"&&typeof document<"u",JO=typeof navigator=="object"&&navigator||void 0,GEi=QV&&(!JO||["ReactNative","NativeScript","NS"].indexOf(JO.product)<0),kEi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),jEi=QV&&window.location.href||"http://localhost",UEi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:QV,hasStandardBrowserEnv:GEi,hasStandardBrowserWebWorkerEnv:kEi,navigator:JO,origin:jEi},Symbol.toStringTag,{value:"Module"})),na={...UEi,...BEi};function KEi(o,p){return ZI(o,new na.classes.URLSearchParams,{visitor:function(i,n,s,c){return na.isNode&&Ue.isBuffer(i)?(this.append(n,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...p})}function FEi(o){return Ue.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function SEi(o){const p={},i=Object.keys(o);let n;const s=i.length;let c;for(n=0;n<s;n++)c=i[n],p[c]=o[c];return p}function xxe(o){function p(i,n,s,c){let e=i[c++];if(e==="__proto__")return!0;const y=Number.isFinite(+e),m=c>=i.length;return e=!e&&Ue.isArray(s)?s.length:e,m?(Ue.hasOwnProp(s,e)?s[e]=[s[e],n]:s[e]=n,!y):((!s[e]||!Ue.isObject(s[e]))&&(s[e]=[]),p(i,n,s[e],c)&&Ue.isArray(s[e])&&(s[e]=SEi(s[e])),!y)}if(Ue.isFormData(o)&&Ue.isFunction(o.entries)){const i={};return Ue.forEachEntry(o,(n,s)=>{p(FEi(n),s,i,0)}),i}return null}function qEi(o,p,i){if(Ue.isString(o))try{return(p||JSON.parse)(o),Ue.trim(o)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(o)}const eN={transitional:Nxe,adapter:["xhr","http","fetch"],transformRequest:[function(p,i){const n=i.getContentType()||"",s=n.indexOf("application/json")>-1,c=Ue.isObject(p);if(c&&Ue.isHTMLForm(p)&&(p=new FormData(p)),Ue.isFormData(p))return s?JSON.stringify(xxe(p)):p;if(Ue.isArrayBuffer(p)||Ue.isBuffer(p)||Ue.isStream(p)||Ue.isFile(p)||Ue.isBlob(p)||Ue.isReadableStream(p))return p;if(Ue.isArrayBufferView(p))return p.buffer;if(Ue.isURLSearchParams(p))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let y;if(c){if(n.indexOf("application/x-www-form-urlencoded")>-1)return KEi(p,this.formSerializer).toString();if((y=Ue.isFileList(p))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return ZI(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||s?(i.setContentType("application/json",!1),qEi(p)):p}],transformResponse:[function(p){const i=this.transitional||eN.transitional,n=i&&i.forcedJSONParsing,s=this.responseType==="json";if(Ue.isResponse(p)||Ue.isReadableStream(p))return p;if(p&&Ue.isString(p)&&(n&&!this.responseType||s)){const e=!(i&&i.silentJSONParsing)&&s;try{return JSON.parse(p,this.parseReviver)}catch(y){if(e)throw y.name==="SyntaxError"?ni.from(y,ni.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:na.classes.FormData,Blob:na.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],o=>{eN.headers[o]={}});const tN=eN,ZEi=Ue.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"]),HEi=o=>{const p={};let i,n,s;return o&&o.split(`
|
|
88
88
|
`).forEach(function(e){s=e.indexOf(":"),i=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!(!i||p[i]&&ZEi[i])&&(i==="set-cookie"?p[i]?p[i].push(n):p[i]=[n]:p[i]=p[i]?p[i]+", "+n:n)}),p},A4=Symbol("internals");function j0(o){return o&&String(o).trim().toLowerCase()}function Ub(o){return o===!1||o==null?o:Ue.isArray(o)?o.map(Ub):String(o)}function WEi(o){const p=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(o);)p[n[1]]=n[2];return p}const zEi=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function yO(o,p,i,n,s){if(Ue.isFunction(n))return n.call(this,p,i);if(s&&(p=i),!!Ue.isString(p)){if(Ue.isString(n))return p.indexOf(n)!==-1;if(Ue.isRegExp(n))return n.test(p)}}function JEi(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(p,i,n)=>i.toUpperCase()+n)}function YEi(o,p){const i=Ue.toCamelCase(" "+p);["get","set","has"].forEach(n=>{Object.defineProperty(o,n+i,{value:function(s,c,e){return this[n].call(this,p,s,c,e)},configurable:!0})})}class HI{constructor(p){p&&this.set(p)}set(p,i,n){const s=this;function c(y,m,v){const E=j0(m);if(!E)throw new Error("header name must be a non-empty string");const b=Ue.findKey(s,E);(!b||s[b]===void 0||v===!0||v===void 0&&s[b]!==!1)&&(s[b||m]=Ub(y))}const e=(y,m)=>Ue.forEach(y,(v,E)=>c(v,E,m));if(Ue.isPlainObject(p)||p instanceof this.constructor)e(p,i);else if(Ue.isString(p)&&(p=p.trim())&&!zEi(p))e(HEi(p),i);else if(Ue.isObject(p)&&Ue.isIterable(p)){let y={},m,v;for(const E of p){if(!Ue.isArray(E))throw TypeError("Object iterator must return a key-value pair");y[v=E[0]]=(m=y[v])?Ue.isArray(m)?[...m,E[1]]:[m,E[1]]:E[1]}e(y,i)}else p!=null&&c(i,p,n);return this}get(p,i){if(p=j0(p),p){const n=Ue.findKey(this,p);if(n){const s=this[n];if(!i)return s;if(i===!0)return WEi(s);if(Ue.isFunction(i))return i.call(this,s,n);if(Ue.isRegExp(i))return i.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(p,i){if(p=j0(p),p){const n=Ue.findKey(this,p);return!!(n&&this[n]!==void 0&&(!i||yO(this,this[n],n,i)))}return!1}delete(p,i){const n=this;let s=!1;function c(e){if(e=j0(e),e){const y=Ue.findKey(n,e);y&&(!i||yO(n,n[y],y,i))&&(delete n[y],s=!0)}}return Ue.isArray(p)?p.forEach(c):c(p),s}clear(p){const i=Object.keys(this);let n=i.length,s=!1;for(;n--;){const c=i[n];(!p||yO(this,this[c],c,p,!0))&&(delete this[c],s=!0)}return s}normalize(p){const i=this,n={};return Ue.forEach(this,(s,c)=>{const e=Ue.findKey(n,c);if(e){i[e]=Ub(s),delete i[c];return}const y=p?JEi(c):String(c).trim();y!==c&&delete i[c],i[y]=Ub(s),n[y]=!0}),this}concat(...p){return this.constructor.concat(this,...p)}toJSON(p){const i=Object.create(null);return Ue.forEach(this,(n,s)=>{n!=null&&n!==!1&&(i[s]=p&&Ue.isArray(n)?n.join(", "):n)}),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 n=new this(p);return i.forEach(s=>n.set(s)),n}static accessor(p){const n=(this[A4]=this[A4]={accessors:{}}).accessors,s=this.prototype;function c(e){const y=j0(e);n[y]||(YEi(s,e),n[y]=!0)}return Ue.isArray(p)?p.forEach(c):c(p),this}}HI.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ue.reduceDescriptors(HI.prototype,({value:o},p)=>{let i=p[0].toUpperCase()+p.slice(1);return{get:()=>o,set(n){this[i]=n}}});Ue.freezeMethods(HI);const El=HI;function hO(o,p){const i=this||tN,n=p||i,s=El.from(n.headers);let c=n.data;return Ue.forEach(o,function(y){c=y.call(i,c,s.normalize(),p?p.status:void 0)}),s.normalize(),c}function $xe(o){return!!(o&&o.__CANCEL__)}function Lh(o,p,i){ni.call(this,o??"canceled",ni.ERR_CANCELED,p,i),this.name="CanceledError"}Ue.inherits(Lh,ni,{__CANCEL__:!0});function Lxe(o,p,i){const n=i.config.validateStatus;!i.status||!n||n(i.status)?o(i):p(new ni("Request failed with status code "+i.status,[ni.ERR_BAD_REQUEST,ni.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function XEi(o){const p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return p&&p[1]||""}function QEi(o,p){o=o||10;const i=new Array(o),n=new Array(o);let s=0,c=0,e;return p=p!==void 0?p:1e3,function(m){const v=Date.now(),E=n[c];e||(e=v),i[s]=m,n[s]=v;let b=c,w=0;for(;b!==s;)w+=i[b++],b=b%o;if(s=(s+1)%o,s===c&&(c=(c+1)%o),v-e<p)return;const P=E&&v-E;return P?Math.round(w*1e3/P):void 0}}function ebi(o,p){let i=0,n=1e3/p,s,c;const e=(v,E=Date.now())=>{i=E,s=null,c&&(clearTimeout(c),c=null),o(...v)};return[(...v)=>{const E=Date.now(),b=E-i;b>=n?e(v,E):(s=v,c||(c=setTimeout(()=>{c=null,e(s)},n-b)))},()=>s&&e(s)]}const fA=(o,p,i=3)=>{let n=0;const s=QEi(50,250);return ebi(c=>{const e=c.loaded,y=c.lengthComputable?c.total:void 0,m=e-n,v=s(m),E=e<=y;n=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)},g4=(o,p)=>{const i=o!=null;return[n=>p[0]({lengthComputable:i,total:o,loaded:n}),p[1]]},I4=o=>(...p)=>Ue.asap(()=>o(...p)),tbi=na.hasStandardBrowserEnv?((o,p)=>i=>(i=new URL(i,na.origin),o.protocol===i.protocol&&o.host===i.host&&(p||o.port===i.port)))(new URL(na.origin),na.navigator&&/(msie|trident)/i.test(na.navigator.userAgent)):()=>!0,ibi=na.hasStandardBrowserEnv?{write(o,p,i,n,s,c,e){if(typeof document>"u")return;const y=[`${o}=${encodeURIComponent(p)}`];Ue.isNumber(i)&&y.push(`expires=${new Date(i).toUTCString()}`),Ue.isString(n)&&y.push(`path=${n}`),Ue.isString(s)&&y.push(`domain=${s}`),c===!0&&y.push("secure"),Ue.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 rbi(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function nbi(o,p){return p?o.replace(/\/?\/$/,"")+"/"+p.replace(/^\/+/,""):o}function Mxe(o,p,i){let n=!rbi(p);return o&&(n||i==!1)?nbi(o,p):p}const R4=o=>o instanceof El?{...o}:o;function wc(o,p){p=p||{};const i={};function n(v,E,b,w){return Ue.isPlainObject(v)&&Ue.isPlainObject(E)?Ue.merge.call({caseless:w},v,E):Ue.isPlainObject(E)?Ue.merge({},E):Ue.isArray(E)?E.slice():E}function s(v,E,b,w){if(Ue.isUndefined(E)){if(!Ue.isUndefined(v))return n(void 0,v,b,w)}else return n(v,E,b,w)}function c(v,E){if(!Ue.isUndefined(E))return n(void 0,E)}function e(v,E){if(Ue.isUndefined(E)){if(!Ue.isUndefined(v))return n(void 0,v)}else return n(void 0,E)}function y(v,E,b){if(b in p)return n(v,E);if(b in o)return n(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)=>s(R4(v),R4(E),b,!0)};return Ue.forEach(Object.keys({...o,...p}),function(E){const b=m[E]||s,w=b(o[E],p[E],E);Ue.isUndefined(w)&&b!==y||(i[E]=w)}),i}const Bxe=o=>{const p=wc({},o);let{data:i,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:c,headers:e,auth:y}=p;if(p.headers=e=El.from(e),p.url=Vxe(Mxe(p.baseURL,p.url,p.allowAbsoluteUrls),o.params,o.paramsSerializer),y&&e.set("Authorization","Basic "+btoa((y.username||"")+":"+(y.password?unescape(encodeURIComponent(y.password)):""))),Ue.isFormData(i)){if(na.hasStandardBrowserEnv||na.hasStandardBrowserWebWorkerEnv)e.setContentType(void 0);else if(Ue.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(na.hasStandardBrowserEnv&&(n&&Ue.isFunction(n)&&(n=n(p)),n||n!==!1&&tbi(p.url))){const m=s&&c&&ibi.read(c);m&&e.set(s,m)}return p},abi=typeof XMLHttpRequest<"u",sbi=abi&&function(o){return new Promise(function(i,n){const s=Bxe(o);let c=s.data;const e=El.from(s.headers).normalize();let{responseType:y,onUploadProgress:m,onDownloadProgress:v}=s,E,b,w,P,$;function L(){P&&P(),$&&$(),s.cancelToken&&s.cancelToken.unsubscribe(E),s.signal&&s.signal.removeEventListener("abort",E)}let j=new XMLHttpRequest;j.open(s.method.toUpperCase(),s.url,!0),j.timeout=s.timeout;function F(){if(!j)return;const X=El.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),ee={data:!y||y==="text"||y==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:X,config:o,request:j};Lxe(function(oe){i(oe),L()},function(oe){n(oe),L()},ee),j=null}"onloadend"in j?j.onloadend=F:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(F)},j.onabort=function(){j&&(n(new ni("Request aborted",ni.ECONNABORTED,o,j)),j=null)},j.onerror=function(ne){const ee=ne&&ne.message?ne.message:"Network Error",pe=new ni(ee,ni.ERR_NETWORK,o,j);pe.event=ne||null,n(pe),j=null},j.ontimeout=function(){let ne=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const ee=s.transitional||Nxe;s.timeoutErrorMessage&&(ne=s.timeoutErrorMessage),n(new ni(ne,ee.clarifyTimeoutError?ni.ETIMEDOUT:ni.ECONNABORTED,o,j)),j=null},c===void 0&&e.setContentType(null),"setRequestHeader"in j&&Ue.forEach(e.toJSON(),function(ne,ee){j.setRequestHeader(ee,ne)}),Ue.isUndefined(s.withCredentials)||(j.withCredentials=!!s.withCredentials),y&&y!=="json"&&(j.responseType=s.responseType),v&&([w,$]=fA(v,!0),j.addEventListener("progress",w)),m&&j.upload&&([b,P]=fA(m),j.upload.addEventListener("progress",b),j.upload.addEventListener("loadend",P)),(s.cancelToken||s.signal)&&(E=X=>{j&&(n(!X||X.type?new Lh(null,o,j):X),j.abort(),j=null)},s.cancelToken&&s.cancelToken.subscribe(E),s.signal&&(s.signal.aborted?E():s.signal.addEventListener("abort",E)));const q=XEi(s.url);if(q&&na.protocols.indexOf(q)===-1){n(new ni("Unsupported protocol "+q+":",ni.ERR_BAD_REQUEST,o));return}j.send(c||null)})},lbi=(o,p)=>{const{length:i}=o=o?o.filter(Boolean):[];if(p||i){let n=new AbortController,s;const c=function(v){if(!s){s=!0,y();const E=v instanceof Error?v:this.reason;n.abort(E instanceof ni?E:new Lh(E instanceof Error?E.message:E))}};let e=p&&setTimeout(()=>{e=null,c(new ni(`timeout ${p} of ms exceeded`,ni.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}=n;return m.unsubscribe=()=>Ue.asap(y),m}},obi=lbi,dbi=function*(o,p){let i=o.byteLength;if(!p||i<p){yield o;return}let n=0,s;for(;n<i;)s=n+p,yield o.slice(n,s),n=s},ubi=async function*(o,p){for await(const i of pbi(o))yield*dbi(i,p)},pbi=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const p=o.getReader();try{for(;;){const{done:i,value:n}=await p.read();if(i)break;yield n}}finally{await p.cancel()}},D4=(o,p,i,n)=>{const s=ubi(o,p);let c=0,e,y=m=>{e||(e=!0,n&&n(m))};return new ReadableStream({async pull(m){try{const{done:v,value:E}=await s.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),s.return()}},{highWaterMark:2})},w4=64*1024,{isFunction:Nb}=Ue,cbi=(({Request:o,Response:p})=>({Request:o,Response:p}))(Ue.global),{ReadableStream:O4,TextEncoder:C4}=Ue.global,_4=(o,...p)=>{try{return!!o(...p)}catch{return!1}},fbi=o=>{o=Ue.merge.call({skipUndefined:!0},cbi,o);const{fetch:p,Request:i,Response:n}=o,s=p?Nb(p):typeof fetch=="function",c=Nb(i),e=Nb(n);if(!s)return!1;const y=s&&Nb(O4),m=s&&(typeof C4=="function"?($=>L=>$.encode(L))(new C4):async $=>new Uint8Array(await new i($).arrayBuffer())),v=c&&y&&_4(()=>{let $=!1;const L=new i(na.origin,{body:new O4,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type");return $&&!L}),E=e&&y&&_4(()=>Ue.isReadableStream(new n("").body)),b={stream:E&&($=>$.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach($=>{!b[$]&&(b[$]=(L,j)=>{let F=L&&L[$];if(F)return F.call(L);throw new ni(`Response type '${$}' is not supported`,ni.ERR_NOT_SUPPORT,j)})});const w=async $=>{if($==null)return 0;if(Ue.isBlob($))return $.size;if(Ue.isSpecCompliantForm($))return(await new i(na.origin,{method:"POST",body:$}).arrayBuffer()).byteLength;if(Ue.isArrayBufferView($)||Ue.isArrayBuffer($))return $.byteLength;if(Ue.isURLSearchParams($)&&($=$+""),Ue.isString($))return(await m($)).byteLength},P=async($,L)=>{const j=Ue.toFiniteNumber($.getContentLength());return j??w(L)};return async $=>{let{url:L,method:j,data:F,signal:q,cancelToken:X,timeout:ne,onDownloadProgress:ee,onUploadProgress:pe,responseType:oe,headers:ce,withCredentials:Te="same-origin",fetchOptions:de}=Bxe($),ye=p||fetch;oe=oe?(oe+"").toLowerCase():"text";let _e=obi([q,X&&X.toAbortSignal()],ne),Pe=null;const Ge=_e&&_e.unsubscribe&&(()=>{_e.unsubscribe()});let xe;try{if(pe&&v&&j!=="get"&&j!=="head"&&(xe=await P(ce,F))!==0){let lt=new i(L,{method:"POST",body:F,duplex:"half"}),ot;if(Ue.isFormData(F)&&(ot=lt.headers.get("content-type"))&&ce.setContentType(ot),lt.body){const[Rt,Pt]=g4(xe,fA(I4(pe)));F=D4(lt.body,w4,Rt,Pt)}}Ue.isString(Te)||(Te=Te?"include":"omit");const Me=c&&"credentials"in i.prototype,Se={...de,signal:_e,method:j.toUpperCase(),headers:ce.normalize().toJSON(),body:F,duplex:"half",credentials:Me?Te:void 0};Pe=c&&new i(L,Se);let je=await(c?ye(Pe,de):ye(L,Se));const Ze=E&&(oe==="stream"||oe==="response");if(E&&(ee||Ze&&Ge)){const lt={};["status","statusText","headers"].forEach(Ri=>{lt[Ri]=je[Ri]});const ot=Ue.toFiniteNumber(je.headers.get("content-length")),[Rt,Pt]=ee&&g4(ot,fA(I4(ee),!0))||[];je=new n(D4(je.body,w4,Rt,()=>{Pt&&Pt(),Ge&&Ge()}),lt)}oe=oe||"text";let Ye=await b[Ue.findKey(b,oe)||"text"](je,$);return!Ze&&Ge&&Ge(),await new Promise((lt,ot)=>{Lxe(lt,ot,{data:Ye,headers:El.from(je.headers),status:je.status,statusText:je.statusText,config:$,request:Pe})})}catch(Me){throw Ge&&Ge(),Me&&Me.name==="TypeError"&&/Load failed|fetch/i.test(Me.message)?Object.assign(new ni("Network Error",ni.ERR_NETWORK,$,Pe),{cause:Me.cause||Me}):ni.from(Me,Me&&Me.code,$,Pe)}}},ybi=new Map,Gxe=o=>{let p=o&&o.env||{};const{fetch:i,Request:n,Response:s}=p,c=[n,s,i];let e=c.length,y=e,m,v,E=ybi;for(;y--;)m=c[y],v=E.get(m),v===void 0&&E.set(m,v=y?new Map:fbi(p)),E=v;return v};Gxe();const iN={http:_Ei,xhr:sbi,fetch:{get:Gxe}};Ue.forEach(iN,(o,p)=>{if(o){try{Object.defineProperty(o,"name",{value:p})}catch{}Object.defineProperty(o,"adapterName",{value:p})}});const P4=o=>`- ${o}`,hbi=o=>Ue.isFunction(o)||o===null||o===!1;function mbi(o,p){o=Ue.isArray(o)?o:[o];const{length:i}=o;let n,s;const c={};for(let e=0;e<i;e++){n=o[e];let y;if(s=n,!hbi(n)&&(s=iN[(y=String(n)).toLowerCase()],s===void 0))throw new ni(`Unknown adapter '${y}'`);if(s&&(Ue.isFunction(s)||(s=s.get(p))))break;c[y||"#"+e]=s}if(!s){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(P4).join(`
|