@elyx-code/project-logic-tree 0.0.6744 → 0.0.6745
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 +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -84,7 +84,7 @@ You can update the existing 'literal-value' with the 'update' action, for exampl
|
|
|
84
84
|
}
|
|
85
85
|
}\`\`\`
|
|
86
86
|
Or 'delete' and then 'post' actions to replace it.`})):i.push(new De({id:`${o.id}--${o.parent}--${ae.InvalidParentReference}`,code:ae.InvalidParentReference,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", has a parent reference that isn't pointing to an entity of type 'input-map' or 'data-type'.`})):i.push(new De({id:`${o.id}--${o.parent}--${ae.ReferencedEntityNotFound}`,code:ae.ReferencedEntityNotFound,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", is referencing an entity with id "${o.parent}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))}else i.push(new De({id:`${o.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}" is missing a 'parent' reference. The 'parent' of a literal value entity must be a reference to an entity of type 'input-map' or 'data-type'.`}));else return i.push(new De({id:`${o.id}--${Ie.InvalidObjectStructure}`,code:Ie.InvalidObjectStructure,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}" is missing a 'parent' reference. The 'parent' of a literal value entity must be a reference to an entity of type 'input-map' or 'data-type'.`})),i;if(o.valueAsTypeSingle){const c=[],e=[],y=o.valueAsTypeSingle;Array.isArray(y)?y.forEach(m=>{typeof m=="string"?e.push(m):c.push(m)}):typeof y=="string"?e.push(y):c.push(y),c.forEach(m=>{const v=RR(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:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", has an 'valueAsTypeSingle' reference that isn't pointing to an entity of type 'definition-entity', 'function-declaration' or 'operation'.`})):i.push(new De({id:`${o.id}--${m}--${ae.ReferencedEntityNotFound}`,code:ae.ReferencedEntityNotFound,severity:ce.Error,message:`Entity of type "${o.type}" with id "${o.id}", is referencing an entity with id "${m}" that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`}))})}return i}var pOe=(o=>(o.ValueAsTypeSingle="value-as-type-single",o.ValueAsTypeList="value-as-type-list",o))(pOe||{});const yi=class yi 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=ne(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=me(m,n);return v.setParent(c,null),v}static validateGenerationTarget(i,n){let s=JSON.parse(JSON.stringify(i));const c=[],e=tvi(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&&!df(this.parent.parent))}validateGeneratedUpdate(i){const n=[];return i.parent&&n.push(new De({id:`${this.id}--${ae.InvalidParentUpdate}`,code:ae.InvalidParentUpdate,severity:ce.Error,message:`Entity of type '${this.type}' with id '${this.id}' cannot have the 'parent' property updated, as it would mean moving the '${this.type}' entity to another parent entity.
|
|
87
|
-
This is likely an incorrect strategy, either the '${this.type}' entity doesn't need to be updated or it should be deleted and a new one created in the desired parent.`})),{errors: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 yi(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,V]of b.knownVersions)v.set(w,V);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new yi(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=ne(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=ne(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=ne(s),e=this.project.get(c);e&&this.addValueAsTypeToList(e,n)}),[...this.valueAsTypeList].forEach(s=>{(i.valueAsTypeList||[]).find(e=>ne(e)===s.id)||this.removeValueAsTypeFromList(s,n)}),this.setValueAsTypeSingle(null,n),this.metaSync({value:null},n);else if(i.valueAsTypeSingle){const s=ne(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=ne(this.initialData.parent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting parent reference '${y.id}' for entity with id '${this.id}'`),this.setParent(y,null),i.push(y);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else if(this.initialData.standaloneParent){const e=ne(this.initialData.standaloneParent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating standalone parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting standalone parent reference '${y.id}' for entity with id '${this.id}'`),this.setStandaloneParent(y,null);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Standalone parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${e}' that isn't found in the project`)}else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Entity with id '${this.id}' must have a 'parent'`),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],this.initialData.valueAsTypeList.forEach(e=>{const y=ne(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=ne(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(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=ne(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 yi.repository.APILoad(this.id,...n),this}async APICreate(i=ke,...n){return await yi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=ke,...n){return await yi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=ke,...n){return await yi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=ke,...n){return await yi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=ke,n,...s){return await yi.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):kA.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:Ii.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=uOe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await dOe(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=Rr(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=Si(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(yi,"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(yi,"type",d.LiteralValue),I(yi,"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(yi,"PARENT_TYPES",[...yi.USER_MANAGED_PARENT_TYPES]),I(yi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(yi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(yi,"BASE_PROPERTIES",[...yi.MUTABLE_BASE_PROPERTIES,...yi.INMUTABLE_BASE_PROPERTIES]),I(yi,"MUTABLE_META_PROPERTIES",[...yi.MUTABLE_BASE_PROPERTIES]),I(yi,"INMUTABLE_META_PROPERTIES",[...yi.INMUTABLE_BASE_PROPERTIES]),I(yi,"META_PROPERTIES",[...yi.MUTABLE_META_PROPERTIES,...yi.INMUTABLE_META_PROPERTIES]),I(yi,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(yi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(yi,"UPSTREAM_PROPERTIES",[...yi.MUTABLE_UPSTREAM_PROPERTIES,...yi.INMUTABLE_UPSTREAM_PROPERTIES]),I(yi,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(yi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(yi,"DOWNSTREAM_PROPERTIES",[...yi.MUTABLE_DOWNSTREAM_PROPERTIES,...yi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(yi,"PROPERTIES",[...yi.META_PROPERTIES,...yi.UPSTREAM_PROPERTIES,...yi.DOWNSTREAM_PROPERTIES]);let Yr=yi;function ef(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 cOe(o,p){const i=p-o+1,s=KI()*i;return Math.floor(s)+o}function fOe(){const o=ef(4);return(o[0]<<24|o[1]<<16|o[2]<<8|o[3])>>>0}function KI(){return fOe()/2**32}function GP(o){const p=ef(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const ZO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function kP(o){let p="";const i=ef(o);for(let n=0;n<o;n++)p+=ZO[i[n]%ZO.length];return p}function yOe(o){const p=ef(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 jP(o){return kP(o)}function UP(o,p=ZO){let i="";const n=ef(o);for(let s=0;s<o;s++)i+=p[n[s]%p.length];return i}function Du(){const o=ef(16);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const p=Array.from(o).map(i=>i.toString(16).padStart(2,"0")).join("");return[p.slice(0,8),p.slice(8,12),p.slice(12,16),p.slice(16,20),p.slice(20,32)].join("-")}function hOe(){return UP(6)}function mOe(){return GP(32)}const ivi=63,rvi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function nvi(o){return o.length>=1&&o.length<=ivi&&rvi.test(o)&&!o.includes("--")}function*avi(){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 svi(o,p){const i=new Set(o.map(s=>s.toLowerCase())),n=p>0?"secondary-db":"main";for(const s of avi()){const c=s?`${n}-${s}`:n;if(nvi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function TOe(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(V=>V.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.getDefaultValue();return(E==null?void 0:E.value)===!0});if(!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:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=me(b,o.project);return w.setParent(v,p),w.initChildren(p),p==null||p.add(w,H.Added),w.addSelfToProject(p),{newEntities:[w]}}return{newEntities:[]}}else if(n)return{newEntities:[]};const s=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=FI(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:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=me(m,o.project);v.setParent(e,p),v.initChildren(p),p==null||p.add(v,H.Added),v.addSelfToProject(p)}return{newEntities:[c]}}}return{newEntities:[]}}function vOe(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 V=o.project.entities.filter(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=V.find(S=>!!S.properties.find(Y=>{var re;return Y.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((re=Y.getDefaultValue())==null?void 0:re.value)===!0}));if(!$&&V.length)$=V[0];else if(!$&&!V.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const Y=$.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=Y==null?void 0:Y.defaultValue)==null||m.metaSync({value:!0},p),n.push($)}const L=o.properties.find(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(L&&!(L!=null&&L.defaultValue)){const S={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:L==null?void 0:L.toReference()},Y=me(S,o.project);Y.hydrateAncestors(),Y.setParent(L,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p),(L==null?void 0:L.defaultValue).setValueAsTypeSingle($||null,p),n.push(Y);return}else L!=null&&L.defaultValue&&!(L!=null&&L.defaultValue.valueAsTypeSingle)&&(L==null||L.defaultValue.setValueAsTypeSingle($||null,p));const k=o.properties.find(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!k)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!k.dataType){const S=ur.new(p);S.parent=k.toReference();const Y=me(S,o.project);Y.hydrateAncestors(),Y.setParent(k,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p)}const K=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=k.dataType)==null||v.setEntity(K,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const V=o.project.entities.filter(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&re.id!==o.id),$=V.map(re=>{var le;const ee=re.properties.find(fe=>fe.implements.find(ve=>ve.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(le=ee==null?void 0:ee.getDefaultValue())==null?void 0:le.value}).filter(re=>!!re),L=o.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!V.find(re=>!!re.properties.find(ee=>{var de;return ee.implements.find(le=>le.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((de=ee.getDefaultValue())==null?void 0:de.value)===!0}))){const re=o.properties.find(ee=>ee.implements.find(de=>de.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!re)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(re!=null&&re.defaultValue)){const ee=Yr.new(p);ee.parent=re.toReference();const de=me(ee,o.project);de.hydrateAncestors(),de.setParent(re,p),de.addSelfToProject(p),p==null||p.add(de,H.Added),de.initChildren(p)}(E=re==null?void 0:re.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 re=Yr.new(p);re.parent=L.toReference();const ee=me(re,o.project);ee.hydrateAncestors(),ee.setParent(L,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const K=svi($,V.length);(b=L.defaultValue)==null||b.metaSync({value:K},p);const S=o.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!S)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(!S.defaultValue){const re=Yr.new(p);re.parent=S.toReference();const ee=me(re,o.project);ee.hydrateAncestors(),ee.setParent(S,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),n.push(ee)}const Y=jP(24);(w=S.defaultValue)==null||w.metaSync({value:Y},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const V=o.properties.find(K=>K.implements.find(S=>S.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!V)throw new Error(`[handleAfterEntityImplementationSideEffects] Time property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let $=V.defaultValue||null;if(!$){const K=Yr.new(p);K.parent=V.toReference(),K.name=oe.Date,K.id=x.UUID.uuid(),$=me(K,o.project),$.hydrateAncestors(),$.setParent(V,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),V.metaSync({editable:!1,deletable:!1},p);const L=o.properties.find(K=>K.implements.find(S=>S.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 k=L.defaultValue||null;if(!k){const K=Yr.new(p);K.name=oe.EntityTemplate,K.parent=L.toReference(),K.id=x.UUID.uuid(),k=me(K,o.project),k.hydrateAncestors(),k.setParent(L,p),k.addSelfToProject(p),k.initChildren(p),p==null||p.add(k,H.Added)}}}}),{self:o,updated:D(i),added:D(n),removed:D(s),affected:D(c)}}function FI(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,TOe(o,i);const e=me(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),vOe(e,i),e.afterAllChildrenInitialized(i),e}function KP(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 EOe(o,p,i,n=He.OrDataTypeGroup){const s=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ur.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=n;const E=me(v,o.project);return c.push(E),E.setParent(p,i),E.initChildren(i),i==null||i.add(E,H.Added),E.setEntity(o,i),E.addSelfToProject(i),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:E}}function FP(o,p,i,n,s){var v,E,b,w,V,$,L,k;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let K=!1;const S=new Date(o);if(S instanceof Date&&!isNaN(S.valueOf())&&(K=!0),K){const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Date].id);p.setEntity(Y,n);break}else{const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id);p.setEntity(Y,n);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},n),o.length>0){const Y=o.slice(0,5).filter(ee=>ee!==void 0);if(Y.every(ee=>typeof ee==typeof Y[0])&&(typeof Y[0]!="object"||Y[0]===null))switch(typeof Y[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),n);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}else{const ee=[];let de=!1;Y.forEach(fe=>{var ve,ue,ye,Ve;if(Array.isArray(fe)&&(de=!0),typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const _e=jb(fe,p.project,{...i,id:x.UUID.uuid()},n,s);_e.hasCreated&&ee.push((ve=_e.changeSet)==null?void 0:ve.self),c.push(...(ue=_e.changeSet)==null?void 0:ue.updated),e.push(...(ye=_e.changeSet)==null?void 0:ye.added),y.push(...(Ve=_e.changeSet)==null?void 0:Ve.removed)}});const le=D(ee);if(!le.length&&!de){Y.forEach(fe=>{const ve=ur.new(n);ve.parentRelationType=He.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);switch(ue.setParent(p,n),ue.initChildren(n),n==null||n.add(ue,H.Added),ue.addSelfToProject(n),typeof fe){case"string":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),n);break;case"number":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}});break}else le.length===1&&!de?p.setEntity(le[0],n):Y.forEach(fe=>{if(typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const ve=KP(Object.keys(fe),p.project);if(ve){const ue=EOe(ve||le[0],p,n,He.OrDataTypeGroup);c.push(...ue.updated),e.push(...ue.added),y.push(...ue.removed)}}else{const ve=ur.new(n);ve.parentRelationType=He.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);ue.setParent(p,n),ue.initChildren(n),n==null||n.add(ue,H.Added),ue.addSelfToProject(n);const ye=FP(fe,ue,{...i,id:x.UUID.uuid()},n,s);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const Y=jb(o[0],p.project,{...i},n,s);p.setEntity((v=Y.changeSet)==null?void 0:v.self,n),c.push(...(E=Y.changeSet)==null?void 0:E.updated),e.push(...(b=Y.changeSet)==null?void 0:b.added),y.push(...(w=Y.changeSet)==null?void 0:w.removed);break}else{const Y=jb(o,p.project,{...i},n,s);p.setEntity((V=Y.changeSet)==null?void 0:V.self,n),c.push(...($=Y.changeSet)==null?void 0:$.updated),e.push(...(L=Y.changeSet)==null?void 0:L.added),y.push(...(k=Y.changeSet)==null?void 0:k.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function jb(o,p,i,n,s){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=KP(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=s?i.name+" of "+s.name:i.name,V={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()},$=me(V,p);return $.setParent(p,n),$.initChildren(n),n==null||n.add($,H.Added),$.addSelfToProject(n),e.push($),v.forEach((L,k)=>{const K=x.UUID.uuid(),S=ja.new(n);S.id=K,S.name=L,S.codeName=L,S.parent=$.toReference(),S.index=k,S.required=!0,S.interactive=!0;const Y=me(S,p);Y.setParent($,n),Y.initChildren(n),n==null||n.add(Y,H.Added),Y.addSelfToProject(n),e.push(Y);const re=o[L],ee=x.UUID.uuid(),de=ur.new(n);de.id=ee,de.parent=Y.toReference(),de.like=!0,de.isList=!1;const le=me(de,p);le.setParent(Y,n),le.initChildren(n),n==null||n.add(le,H.Added),le.addSelfToProject(n),e.push(le);const fe=FP(re,le,{...i,name:L,id:x.UUID.uuid()},n,s||$);c.push(...fe.updated),e.push(...fe.added),y.push(...fe.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function pd(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 ki({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:ce.Error,code:n,entity:c,firstRelationship:e});s.push(m)}if(y){const m=new ki({id:c.id+"--"+y.id+"--"+i,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${y.type} ${y.name} with id "${y.id}" that implements the same base descriptor`,severity:ce.Error,code:i,entity:c,firstRelationship:y});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(V=>V.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new ki({id:e.id+"--"+c.id+"--"+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:ce.Error,code:n,entity:e,firstRelationship:c});s.push(v)}if(y){const v=new ki({id:y.id+"--"+c.id+"--"+i,message:`Entity of type ${y.type} named "${y.name}" with id "${y.id}" overrides a base entity ${c.name} with id "${c.id}" that implements the same base ${Array.isArray(y==null?void 0:y.implements)?wt(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:ce.Error,code:i,entity:y,firstRelationship:c});s.push(v)}}),{errors:s,overlap:!!s.length})}function lvi(o,p){return o.abstract||(o.properties.forEach(n=>{n.abstract||n.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(n=>{n.field===HN.EntityField&&n.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function ovi(o,p){return o.abstract&&(o.properties.forEach(n=>{n.abstract&&n.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(n=>{(n.field===RA.Implements||n.field===RA.Extends)&&n.entity.onDetachedDependencyRemoved(o,n.field,p)}),o.metaSync({abstract:!1},p)),o}function dvi(o,p){return o.static||(o.properties.forEach(n=>{n.static||n.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function uvi(o,p){return o.static&&o.metaSync({static:!1},p),o}const km=class km extends xP{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=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=me(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=me(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var 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=QTi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await XTi(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=FI(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 bOe extends No{constructor(i){super(dn,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",dn.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",dn.abstract);I(this,"static",dn.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=dn,this.project=i,this.id=dn.id,this.version=dn.version,this.name=dn.name,this.static=dn.static,this.abstract=dn.abstract,this.properties=this.initialData.properties.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.methods=this.initialData.methods.map(n=>{const s=me(n,this.project);return s.parent=this,s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=me(n,this.project);return s.parent=this,s}),this.initialData.extends&&(this.extends=me(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 SP(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 ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s/g,"-")}}function AOe(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 ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}if(n.includes("-")){const s=new ki({id:o.id+"--string-value-must-not-have-dashes",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(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 gOe(o,p){const i=[];if(typeof p!="number"){const n=new ki({id:o.id+"--status-code-must-be-number",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number.`,severity:ce.Error,code:"status-code-must-be-number",entity:o});return i.push(n),{errors:i,override:p}}if(p<100){const n=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}if(p>599){const n=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}return{errors:i,override:p}}class IOe 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=me(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project));const 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=SP(m,v);if(m.project.entities.filter(w=>Wi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const V=w.properties.find(k=>k.implements.find(K=>K.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!V)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=V.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new ki({id:m.id+"--"+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:ce.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)=>gOe(m,v)}}class ROe extends Bi{constructor(i){super(go,i);I(this,"id",Ki.Parallel);I(this,"name",Ki.Parallel);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=go.inputs.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(go.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=go.error?me(go.error,this.project):null}}class DOe extends Bi{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=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(rs.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=rs.error?me(rs.error,this.project):null}}class wOe extends Bi{constructor(i){super(gu,i);I(this,"id",Ki.Sequential);I(this,"name",Ki.Sequential);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=gu.inputs.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(gu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=gu.error?me(gu.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 pvi(o,p){const i=[];if(typeof p!="string"){const s=new ki({id:o.id+"--uuid-must-be-string",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be text.`,severity:ce.Error,code:"uuid-must-be-string",entity:o});return i.push(s),{errors:i,override:p}}const n=SP(o,p);if(n.errors.length>0)return i.push(...n.errors),{errors:i,override:p};if(!NP(p)){const s=new ki({id:o.id+"--uuid-must-be-valid-format",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a valid UUID format. Eg: "123e4567-e89b-12d3-a456-426614174000".`,severity:ce.Error,code:"uuid-must-be-valid-format",entity:o});i.push(s)}return{errors:i,override:p}}var Pe=(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))(Pe||{});const OOe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function cvi(o,p){return{...OOe,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 Yr(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=VOe(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 Yr)s=i;else if(i)s=Si(i,this.project);else{const c={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:new Date().toISOString(),author:x.sessionAuthor,deleted:!1,previousVersion:null,value:null,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:p.toReference(),parent:null,valueAsTypeSingle:null,valueAsTypeList:null,autogeneration:null,name:mc(p.getDataType(null))};s=Si(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 hr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function COe(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 qP(o,p,i){if(o==null)return i;const n=COe(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 fvi=new Set(["__proto__","prototype","constructor"]);function yvi(o){return typeof o=="string"&&fvi.has(o)}function _Oe(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=COe(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(yvi(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",V=Array.isArray(y)&&typeof v=="number";if(E){if(V&&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",k=Array.isArray($);if(w){if(!k){if(!c)throw new Error(`set(...) expected an array at "${String(v)}" but found non-array (coerce=false).`);y[v]=[]}}else if(!L||k){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 nv(o){return globalThis.structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o))}function hvi(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 ZP(o,p,i){const n=hvi(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 Qd(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 oe.EntityTemplate:s=oe.EntityTemplate;break;case oe.String:s=oe.String;break;case oe.Number:s=oe.Number;break;case oe.Boolean:s=oe.Boolean;break;case oe.Null:s=oe.Null;break;case oe.Enum:s=oe.Enum;break;case oe.KeyValue:s=oe.KeyValue;break;case oe.Untyped:s=oe.Untyped;break;case oe.KeyValue:s=oe.KeyValue;break;case oe.Date:s=oe.Date;break;case oe.UUID:s=oe.UUID;break;case oe.File:s=oe.File;break;case oe.Void:s=oe.Void;break;case oe.ActionDescriptor:s=oe.ActionDescriptor;break;case oe.Bytes:s=oe.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else s=oe.Untyped;const c=Yr.new(n);c.name=s,c.parent=p.toReference();const e=me(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),Gt.includes(o.type)){const e=Wn(o);return D([e,...[e].flatMap(y=>Oo(y,p,i))])}else if(o.type===d.OutputMap){if(Gt.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&&Gt.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 VOe(o,p,i){return o}function $h(o,p,i=!1){const n=o.readsValue;let s=null;const c=Mu(n,p,i);if(c){const e={sources:[c],target:o};s={value:c.value,valueOwner:o,type:Pe.Inherited,inheritanceLink:e}}return s}function It(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 oe.EntityTemplate:n=oe.EntityTemplate;break;case oe.String:n=oe.String;break;case oe.Number:n=oe.Number;break;case oe.Boolean:n=oe.Boolean;break;case oe.Null:n=oe.Null;break;case oe.Enum:n=oe.Enum;break;case oe.KeyValue:n=oe.KeyValue;break;case oe.Untyped:n=oe.Untyped;break;case oe.KeyValue:n=oe.KeyValue;break;case oe.Date:n=oe.Date;break;case oe.UUID:n=oe.UUID;break;case oe.File:n=oe.File;break;case oe.Void:n=oe.Void;break;case oe.ActionDescriptor:n=oe.ActionDescriptor;break;case oe.Bytes:n=oe.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else n=oe.Untyped;if(!i.get(p.id))return null;const c=Yr.new(null);c.name=n,c.standaloneParent=p.toReference();let e=new Yr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function POe(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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:null}}function Ub(o,p,i,n=!1){var e,y;const s={...o},c=p.type===d.VariableDeclaration?p.inputs:Ut.includes(p.type)?p.outputs:[];if(!c||c.length===0)return s;for(const m of c){if(!xv(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)||Hi(E);s[b]=un((v==null?void 0:v.value)||null)?s[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function Vm(o,p,i,n=!1){var e,y;const s={...o},c=p.inputs;if(!c)return s;for(const m of c){if(!xv(m))continue;const v=sv(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);s[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function NOe(o,p,i=!1){var E,b,w,V,$,L,k,K;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 S=(V=p.lastExecutionResults)==null?void 0:V.readValue(o.id);if(S){if(hr(S.value)){const re={...n,...S.value},ee={...Vm(re,o,p,i)};S.metaSync({value:ee},null)}return{value:S,valueOwner:o,type:Pe.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 S=(k=p.execution)==null?void 0:k.hasEntity(e);if((!s||s&&S&&c||s&&!S&&!c)&&(y=$h(o,p,i),y&&y.value&&hr(y.value.value))){const re={...n,...y.value.value},ee={...Vm(re,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const S=m;if(S&&S.value===null&&S.autogeneration){const Y=LR(S);if(S.metaSync({value:Y},null),hr(Y)){const re={...Vm(Y,o,p,i)};S.metaSync({value:re},null)}}(i||v===null||v!==Pe.Testing)&&(y={value:S,valueOwner:o,type:un(S)?o.readsValue?Pe.Inherited:Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const S=(K=p.localTestValues)==null?void 0:K.readValue(o.id);if(S){if(hr(S.value)){const Y={...n,...S.value},re={...Vm(Y,o,p,i)};S.metaSync({value:re},null)}return{value:S,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}}return un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function HP(o,p,i=!1){var e,y,m,v,E,b,w,V,$;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(hr(L.value)){const K={...n,...L.value},S=Ub(K,o,p,i);L==null||L.metaSync({value:S},null)}return{value:L,valueOwner:o,type:Pe.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!==Pe.DefaultValue)){if(hr(s.value)){const k={...n,...s.value},K=Ub(k,o,p,i);s.metaSync({value:K},null)}return{value:s,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((V=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:V.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const L=It(o.dataType,o,p.project),k=Ub(n,o,p,i);return L==null||L.metaSync({value:k},null),{value:L,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null}}return null}function av(o,p,i=!1){var E,b,w,V,$;if((E=o.dataType)!=null&&E.isObject())return NOe(o,p,i);const n=li(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=(V=p.execution)==null?void 0:V.hasEntity(e);(!s||s&&L&&c||s&&!L&&!c)&&(y=$h(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 k=LR(L);L.metaSync({value:k},null)}(i||v===null||v!==Pe.Testing)&&(y={value:L,valueOwner:o,type:un(L)?o.readsValue?Pe.Inherited:Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}return un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function WP(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return HP(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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:av(o,p,i)}function zP(o,p,i=!1){var w,V,$,L;const n=!!((w=p.execution)!=null&&w.entities.length),s=(V=p.execution)==null?void 0:V.hasEntity(o);let c=null;const e=o.readsValue;if(e){const k=($=p.execution)==null?void 0:$.hasEntity(e);(!n||n&&k&&s||n&&!k&&!s)&&(c=$h(o,p,i))}const y=o.declaration;if(!c&&y){const k=av(y,p);k&&k.value&&(c=k)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Pe.DefaultValue||c.type===Pe.External)&&!i||m===null||m!==Pe.DefaultValue){const k=(L=p.localTestValues)==null?void 0:L.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const v=$o(o),E=o.getDataType(null);return v&&s&&(!(c!=null&&c.value)||!Il(E)&&eu(c==null?void 0:c.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:s&&!v&&un((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Pe.External,inheritanceLink:null}}function xOe(o,p,i=!1){return WP(o.declaration,p,i)}function $Oe(o,p,i=!1){var w,V,$,L;if(!i&&p.execution&&p.execution.hasEntity(o)){const k=(w=p.lastExecutionResults)==null?void 0:w.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=li(o),s=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((V=p.execution)!=null&&V.hasEntity(n))||!!s&&!!(($=p.execution)!=null&&$.hasEntity(s));let e=null;const y=o.getDefaultValue(),m=p.getValueTypePreference(o.id);if(y){const k=y||null;if(k&&k.value===null&&k.autogeneration){const K=LR(k);k.metaSync({value:K},null)}(i||m===null||m!==Pe.Testing)&&(e={value:k,valueOwner:o,type:un(k)?Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Pe.DefaultValue||e.type===Pe.External)&&!i||m===null||m!==Pe.DefaultValue){const k=(L=p.localTestValues)==null?void 0:L.readValue(o.id),K=p.getValueTypePreference(o.id);if(k&&!i&&(K===null||K!==Pe.DefaultValue))return{value:k,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const v=$o(o),E=o.getDataType(null);let b=v&&c&&(!(e!=null&&e.value)||!Il(E)&&eu(e==null?void 0:e.value));return n.type===d.Loop&&c&&(b=!1),b?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:c&&!v&&un((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Pe.External,inheritanceLink:null}}function JP(o,p,i=!1){var V,$,L,k,K,S;if((V=o.getDataType(null))!=null&&V.isObject())return HP(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const Y=($=p.lastExecutionResults)==null?void 0:$.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=li(o),s=!!((L=p.execution)!=null&&L.entities.length),c=(k=p.execution)==null?void 0:k.hasEntity(n),e=o.readsValue;let y=null;if(e){const Y=(K=p.execution)==null?void 0:K.hasEntity(e);(!s||s&&Y&&c||s&&!Y&&!c)&&(y=$h(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const Y=m;(i||v===null||v!==Pe.Testing)&&(y={value:Y,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const Y=(S=p.localTestValues)==null?void 0:S.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const E=$o(o),b=o.getDataType(null);return E&&(!(y!=null&&y.value)||!Il(b)&&eu(y==null?void 0:y.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:!E&&un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function LOe(o,p,i=!1){var y,m,v,E,b,w,V,$,L,k,K,S,Y;if(p.execution&&p.execution.hasEntity(o)&&!i){const re=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(re)return{value:re,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=Xm(o);if(Ty.includes(n.type)){const re=Mu(n,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||Hi(se(o,p.project));if(re!=null&&re.value&&hr(re.value.value)){const de=re.value.value[ee],le=It(o.getDataType(null),o,p.project);return le==null||le.metaSync({value:de},null),{value:le,valueOwner:o,type:!Gt.includes(n.type)&&re.type===Pe.Empty?Pe.QueuedAutocalculation:re.type,inheritanceLink:{sources:[re],target:o}}}return{value:null,valueOwner:o,type:Gt.includes(n.type)?Pe.Empty:Pe.QueuedAutocalculation,inheritanceLink:null}}const s=(v=p.execution)==null?void 0:v.hasEntity(n),c=((E=p.execution)==null?void 0:E.state)===pN.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!s&&!c&&!i){const re=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((re==null?void 0:re.value)!==null||(re==null?void 0:re.valueAsType)!==null)return{value:re,valueOwner:o,type:Pe.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=zP(e,p,i);if(ee&&ee.value){const le=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[le.name],ve=It(((V=o.declaration)==null?void 0:V.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=av(e,p,i);if(ee&&ee.value){const le=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[le.name],ve=It(((L=o.declaration)==null?void 0:L.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It(((k=o.declaration)==null?void 0:k.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const re=e.outputs.map(de=>{var le,fe;if((le=p.persistedExecutionResults)!=null&&le.values[de.id]){const ve=(fe=p.persistedExecutionResults)==null?void 0:fe.values[de.id];if(ve.value!==null||ve.valueAsType!==null)return{value:ve,valueOwner:de,type:Pe.ExecutionResult,inheritanceLink:null}}}).filter(de=>!!de),ee=It(((K=o.declaration)==null?void 0:K.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.FunctionCall:{const re=e.inputs.map(de=>pA(de,p,i)).filter(de=>!!de),ee=It(((S=o.declaration)==null?void 0:S.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.Loop:{const re=e.inputs.map(de=>pA(de,p,i)).filter(de=>!!de),ee=It(((Y=o.declaration)==null?void 0:Y.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:null}}return null}function HO(o,p,i=!1){var b,w,V;if(![...Ut,...Gt].includes(o.parent.type)||!xv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Mu(o.declaration,p);const n=sv(o,p,i);if(n&&n.type!==Pe.Empty&&n.type!==Pe.Missing)return n;const s=Wn(o.parent),c=Ao(s,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(se(o,p.project)),y=It(o.getDataType(null),o,p.project),m=$o(o),v=(V=c==null?void 0:c.value)==null?void 0:V.value;if(v&&hr(v)){let $=v[e];v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null);const L=$o(o),k=o.getDataType(null);return L&&(!y||!Il(k)&&eu(y))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}}function WO(o,p,i=!1){var b,w,V,$,L,k,K,S;if(![...Ut,...Gt].includes(o.parent.type)||!xv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Mu(o.declaration,p,i);const n=Ut.includes(o.parent.type)?o.parent:Wn(o.parent),s=Mu(n,p,i);let c=o;n.type===d.VariableDeclaration&&(c=(o.parent===n?o:n.inputs.find(re=>{var ee,de;return((ee=re.declaration)==null?void 0:ee.id)===((de=o.declaration)==null?void 0:de.id)}))||o);const e=Km(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(se(o,p.project)),m=(n.type===d.VariableDeclaration?o.getDefaultValue():o.defaultValue)||It(o.getDataType(null),o,p.project),v=(V=s==null?void 0:s.value)==null?void 0:V.value;if(((s==null?void 0:s.type)===Pe.ExecutionResult||(s==null?void 0:s.type)===Pe.Testing)&&!i&&v&&hr(v)){let Y=v[y];return v[y]===void 0&&(Y=null),m==null||m.metaSync({value:Y},null),{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}if(e&&e.type!==Pe.Empty&&e.type!==Pe.Missing)return e;if(v&&hr(v)){let Y=v[y];v[y]===void 0&&(Y=null),m!=null&&m.standaloneParent&&(m==null||m.metaSync({value:Y},null));const re=$o(o),ee=o.getDataType(null),de=re&&(!m||!Il(ee)&&eu(m)),le=!!(($=p.execution)!=null&&$.entities.length),fe=(L=p.execution)==null?void 0:L.hasEntity(n),ve=n.readsValue;if(ve){const ue=(k=p.execution)==null?void 0:k.hasEntity(ve);if(de&&(!le||le&&ue&&fe||le&&!ue&&!fe))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}if(o.readsValue){const ue=(K=p.execution)==null?void 0:K.hasEntity(o.readsValue);if(de&&(!le||le&&ue&&fe||le&&!ue&&!fe))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}return de?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:((S=m==null?void 0:m.parent)==null?void 0:S.id)===(o==null?void 0:o.id)?s.type:Pe.Inherited,inheritanceLink:{sources:s?[s]:[],target:o}}}return Km(o,p,i)}function sv(o,p,i=!1){var V,$,L,k,K,S;const n=li(o),s=!!((V=p.execution)!=null&&V.entities.length),c=($=p.execution)==null?void 0:$.hasEntity(n),e=o.readsValue;let y=null;if(e){const Y=(L=p.execution)==null?void 0:L.hasEntity(e);(!s||s&&Y&&c||s&&!Y&&!c)&&(y=$h(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Pe.Testing)&&(y={value:m,valueOwner:o,type:un(m)?Pe.Empty:Pe.DefaultValue,inheritanceLink:null}),!y&&o.declaration){const Y=Mu(o.declaration,p,i);Y&&Y.value&&(i||v===null||v!==Pe.Testing)&&(y={...Y,valueOwner:o,type:Pe.DefaultValue})}if(!y||y.type===Pe.DefaultValue||(y==null?void 0:y.type)===Pe.Empty){const Y=(k=p.persistedExecutionResults)==null?void 0:k.readValue(o.id);if(Y&&!i)return{value:Y,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const re=(K=p.localTestValues)==null?void 0:K.readValue(o.id);if(re&&!i&&(v===null||v!==Pe.DefaultValue))return{value:re,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const E=$o(o),b=o.getDataType(null),w=E&&(!(y!=null&&y.value)||!Il(b)&&eu(y==null?void 0:y.value));if(o.readsValue){const Y=(S=p.execution)==null?void 0:S.hasEntity(o.readsValue);if(w&&(!s||s&&Y&&c||s&&!Y&&!c))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}return w?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Pe.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:sv(o,p,i)}function pA(o,p,i=!1){var n,s;return Gt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||Ut.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?HO(o,p,i):sv(o,p,i)}function MOe(o,p,i=!1){var n,s;return Gt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||Ut.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?WO(o,p,i):Km(o,p,i)}function BOe(o,p,i=!1){var E,b;if(!o.static)return null;if(p.execution){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w&&!i)return{value:w,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=(b=p.localTestValues)==null?void 0:b.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Pe.DefaultValue))return{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;c&&(i||s===null||s!==Pe.Testing)&&(e={value:c,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null});const y=$o(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!Il(m)&&eu(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:un(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e}function GOe(o,p,i=!1){var E,b;if(p.execution&&p.execution.hasEntity(o)&&!i){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w)return{value:w,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=(b=p.localTestValues)==null?void 0:b.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Pe.DefaultValue))return{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;c&&(i||s===null||s!==Pe.Testing)&&(e={value:c,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null});const y=$o(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!Il(m)&&eu(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:un((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e}function Mu(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return $Oe(o,p,i);case d.InputMap:return MOe(o,p,i);case d.VariableDeclaration:return WP(o,p,i);case d.VariableInstance:return xOe(o,p,i);case d.OutputMap:return LOe(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return JP(o,p,i);case d.Property:return BOe(o,p,i);case d.ValueDescriptor:return GOe(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return POe(o,p,i);default:return null}}function Ao(o,p,i=!1){switch(o.type){case d.InputMap:return pA(o,p,i);case d.VariableDeclaration:return av(o,p,i);case d.VariableInstance:return zP(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return JP(o,p,i);default:return null}}function mvi(o){var p;if(o&&o.type===Pe.DefaultValue&&o.value&&o.valueOwner&&(!kA.includes(o.valueOwner.type)||((p=o.valueOwner.getDefaultValue())==null?void 0:p.id)===o.value.id)){const i=It(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Pe.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function Rc(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,V,$,L,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let K=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);K?!s&&K&&K.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(K=It(v.getDataType(null),v,p)):s?K=Qd(v.getDataType(null),v,p,c):K=It(v.getDataType(null),v,p);const S=se(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(S);let re={};((k=(L=v.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(re={...re,...v.dataType.entity.getActiveRawDefaultValue()}),hr(K==null?void 0:K.value)&&(re={...re,...K.value}),re[Y]=i,K==null||K.metaSync({value:re},c),s||e==null||e.writeValue(v,K);return}}),c}function Fm(o,p,i,n){var V,$,L,k;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===((V=y.getDefaultValue())==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):s?v=Qd(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(L=y.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),s||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const K=y.inputs.find(S=>{var Y,re;return((Y=S.declaration)==null?void 0:Y.id)===((re=o.declaration)==null?void 0:re.id)||se(S,p)===E});if(K){let S=s?K.getDefaultValue():e==null?void 0:e.readValue(K.id);S&&S.metaSync({value:null},c),s||e==null||e.removeValue(K.id)}}return c}function kOe(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),Gt.includes(o.type)){const b=Wn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var V,$,L,k,K,S;if(((V=w.declaration)==null?void 0:V.type)===d.Property&&w.declaration.static){let Y=n?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);Y?!n&&Y&&Y.id===((L=w.declaration.getDefaultValue())==null?void 0:L.id)&&(Y=It(w.declaration.getDataType(null),w.declaration,p)):n?Y=Qd(w.declaration.getDataType(null),w.declaration,p,s):Y=It(w.declaration.getDataType(null),w.declaration,p),Y==null||Y.metaSync({value:null},s),n||c==null||c.removeValue((k=w.declaration)==null?void 0:k.id)}else if(((K=w.declaration)==null?void 0:K.type)===d.Property){let Y=n?((S=w.getDefaultValue)==null?void 0:S.call(w))||null:c==null?void 0:c.readValue(w.id);Y&&Y.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?Rc(o.declaration,p,null,i):Gt.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?Rc(o.declaration,p,null,i):Gt.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&&Rc(o,p,null,i);return s}function jOe(o,p,i,n){var y,m,v,E,b,w,V;let s=!1,c=null,e=null;if(n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n),Gt.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 k=hr(o)?o:L;$.inputs.forEach(K=>{var S,Y,re,ee,de,le;if(((S=K.declaration)==null?void 0:S.type)===d.Property&&K.declaration.static){let fe=s?((Y=p.getDefaultValue)==null?void 0:Y.call(p))||null:e==null?void 0:e.readValue(K.declaration.id);fe?!s&&fe&&fe.id===((re=K.declaration.getDefaultValue())==null?void 0:re.id)&&(fe=It(K.declaration.getDataType(null),K.declaration,i)):s?fe=Qd(K.declaration.getDataType(null),K.declaration,i,c):fe=It(K.declaration.getDataType(null),K.declaration,i);const ve=se(K,i),ue=K.codeName||((ee=K.declaration)==null?void 0:ee.codeName)||Hi(ve),ye=k[ue];fe==null||fe.metaSync({value:ye},c),s||e==null||e.writeValue(K.declaration,fe)}else if(((de=K.declaration)==null?void 0:de.type)===d.Property){let fe=s?((le=p.getDefaultValue)==null?void 0:le.call(p))||null:e==null?void 0:e.readValue(K.id);fe&&fe.metaSync({value:null},c),s||e==null||e.removeValue(K.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?Rc(p.declaration,i,o,n):Gt.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?Rc(p.declaration,i,null,n):Gt.includes(p.parent.type)&&((V=p.declaration)==null?void 0:V.type)===d.Property&&Fm(p,i,null,n):p.type===d.Property&&p.static&&Rc(p,i,o,n);return c}function Tvi(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;let m=s?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);s?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),kOe(y,p,i)}),c}function vvi(o,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,V;if(i.diggestedBuiltInBaseEntitiesIds.has(m.id))return;let v=null;if(c){const $=((E=m.getDefaultValue)==null?void 0:E.call(m))||null;$&&(i.diggestedBuiltInBaseEntitiesIds.has($.id)||((b=$.parent)==null?void 0:b.id)!==m.id?v=$.clone(e,m):v=$)}else v=y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((V=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:V.id)&&(v=It(m.getDataType(null),m,i)):c?(v=Qd(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=It(m.getDataType(null),m,i),v==null||v.setValueAsType(null,e),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),jOe(o,m,i,n)}),e}function Dc(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,V,$,L,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let K=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);K?!s&&K&&K.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(K=It(v.getDataType(null),v,p)):s?K=Qd(v.getDataType(null),v,p,c):K=It(v.getDataType(null),v,p);const S=se(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(S);let re={};((k=(L=v.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(re={...re,...v.dataType.entity.getActiveRawDefaultValue()}),hr(K==null?void 0:K.value)&&(re={...re,...K.value}),Array.isArray(i)?re[Y]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:re[Y]=(i==null?void 0:i.toShallowJSON())||null,K==null||K.metaSync({value:re},c),s||e==null||e.writeValue(v,K);return}}),c}function Sm(o,p,i,n){var V,$,L,k;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===((V=y.getDefaultValue())==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):s?v=Qd(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(L=y.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),Array.isArray(i)?w[b]=(i==null?void 0:i.map(K=>K.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 K=y.inputs.find(S=>{var Y,re;return((Y=S.declaration)==null?void 0:Y.id)===((re=o.declaration)==null?void 0:re.id)||se(S,p)===E});if(K){let S=s?K.getDefaultValue():e==null?void 0:e.readValue(K.id);S&&(Array.isArray(i)?S==null||S.setValueAsTypeList(i,c):S==null||S.setValueAsTypeSingle(i,c)),s||e==null||e.removeValue(K.id)}}return c}function UOe(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?Dc(o.declaration,p,null,i):Gt.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?Dc(o.declaration,p,null,i):Gt.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&&Dc(o,p,null,i),i}function KOe(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?Dc(p.declaration,i,o,n):Gt.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?Dc(p.declaration,i,null,n):Gt.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&&Dc(p,i,o,n),n}function Evi(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;let m=s?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);s?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),UOe(y,p,i)}),c}function bvi(o,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=It(m.getDataType(null),m,m.project)):c?v=Qd(m.getDataType(null),m,i,e):v=It(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),v==null||v.metaSync({value:null},e),c||y==null||y.writeValue(m,v),KOe(o,m,i,n)}),e}class SI{constructor(p,i){this.extensionsRegistry=p,this.contextType=i,this.off=this.extensionsRegistry.off.bind(this.extensionsRegistry),this.on=this.extensionsRegistry.on.bind(this.extensionsRegistry),this.emit=this.extensionsRegistry.emit.bind(this.extensionsRegistry),this.emitAsync=this.extensionsRegistry.emitAsync.bind(this.extensionsRegistry),this.emitAsyncAll=this.extensionsRegistry.emitAsyncAll.bind(this.extensionsRegistry),this.emitAsyncAllSettled=this.extensionsRegistry.emitAsyncAllSettled.bind(this.extensionsRegistry),this.emitAsyncSequentially=this.extensionsRegistry.emitAsyncSequentially.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAll=this.extensionsRegistry.emitAsyncSequentiallyAll.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAllSettled=this.extensionsRegistry.emitAsyncSequentiallyAllSettled.bind(this.extensionsRegistry)}on(p,i){this.extensionsRegistry.on(p,i)}emit(p,...i){this.extensionsRegistry.emit(p,...i)}off(p,i){this.extensionsRegistry.off(p,i)}emitAsync(p,...i){return this.extensionsRegistry.emitAsync(p,...i)}emitAsyncAll(p,...i){return this.extensionsRegistry.emitAsyncAll(p,...i)}emitAsyncAllSettled(p,...i){return this.extensionsRegistry.emitAsyncAllSettled(p,...i)}emitAsyncSequentially(p,...i){return this.extensionsRegistry.emitAsyncSequentially(p,...i)}emitAsyncSequentiallyAll(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAll(p,...i)}emitAsyncSequentiallyAllSettled(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled(p,...i)}}var Ee=(o=>(o[o.High=1]="High",o[o.Normal=5]="Normal",o[o.Low=10]="Low",o))(Ee||{}),X=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(X||{}),be=(o=>(o.All="*",o.OnAll="on:*",o.EmitAll="emit:*",o.ReadAll="read:*",o.WriteAll="write:*",o.UpdateAll="update:*",o.DoAll="do:*",o.OnLogicAll="on:logic:*",o.EmitLogicAll="emit:logic:*",o.ReadLogicAll="read:logic:*",o.WriteLogicAll="write:logic:*",o.UpdateLogicAll="update:logic:*",o.DoLogicAll="do:logic:*",o.OnGUIAll="on:gui:*",o.EmitGUIAll="emit:gui:*",o.ReadGUIAll="read:gui:*",o.WriteGUIAll="write:gui:*",o.UpdateGUIAll="update:gui:*",o.DoGUIAll="do:gui:*",o.OnEditorAll="on:editor:*",o.EmitEditorAll="emit:editor:*",o.ReadEditorAll="read:editor:*",o.WriteEditorAll="write:editor:*",o.UpdateEditorAll="update:editor:*",o.DoEditorAll="do:editor:*",o.OnCompileBefore="on:compile:before:DefinitionEntity",o.OnCompileDefault="on:compile:default:DefinitionEntity",o.OnCompileAfter="on:compile:after:DefinitionEntity",o.EmitCompile="emit:compile:DefinitionEntity",o.DoEditorPublish="do:editor:publish",o.PostGUICanvasSlotNewToolbarButton="write:gui:canvas:slot:toolbar-button",o.ReadGUICanvasSlotToolbarButtons="read:gui:canvas:slot:toolbar-buttons",o.UpdateGUIGlobalTheme="update:gui:global:theme",o))(be||{});class FOe{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 SOe extends FOe{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 SOe(this,i)}}class zO extends SI{constructor(i,n){super(i,X.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 Avi(o,p){return p instanceof zO?p:new zO(o,p)}const uy="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:uy+br.AbortExecution,BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY:uy+br.CreatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY:uy+br.UpdatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY:uy+br.DeletePersistedEntity,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY:Oe+xt.Empty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY:Oe+xt.NotEmpty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL:Oe+xt.PrimitiveEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL:Oe+xt.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+Ki.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+Ki.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+Ki.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+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+q.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+q.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+q.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+q.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+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+q.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+q.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+q.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+q.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+q.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+q.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+q.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+q.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+q.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+q.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+q.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+q.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+q.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+q.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+q.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+q.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+q.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+q.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+q.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+q.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+q.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+q.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+q.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+q.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+q.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+q.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+q.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+q.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+q.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+q.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+q.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+q.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+q.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+q.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+q.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+q.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+q.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+q.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+q.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+q.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+q.RemoveSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION:Oe+te.Addition,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION:Oe+te.Subtraction,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION:Oe+te.Multiplication,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION:Oe+te.Division,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER:Oe+te.Remainder,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION:Oe+te.Exponentiation,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE:Oe+te.Absolute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN:Oe+te.Sign,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND:Oe+te.Round,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE:Oe+te.Negate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR:Oe+te.Floor,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL:Oe+te.Ceil,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP:Oe+te.Clamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC:Oe+te.Trunc,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS:Oe+te.RoundToDecimals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP:Oe+te.SnapToStep,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE:Oe+te.MapRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE:Oe+te.Average,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN:Oe+te.Median,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF:Oe+te.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF:Oe+te.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT:Oe+te.SquareRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT:Oe+te.CubeRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT:Oe+te.NthRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP:Oe+te.Exp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL:Oe+te.LogNatural,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10:Oe+te.Log10,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN:Oe+te.Sin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS:Oe+te.Cos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN:Oe+te.Tan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN:Oe+te.Asin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS:Oe+te.Acos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN:Oe+te.Atan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2:Oe+te.Atan2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS:Oe+te.ToRadians,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES:Oe+te.ToDegrees,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF:Oe+te.PercentOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE:Oe+te.PercentageChange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN:Oe+te.MoreThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN:Oe+te.LessThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL:Oe+te.LessThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL:Oe+te.MoreThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER:Oe+et.GenerateRandomInteger,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT:Oe+et.GenerateRandomFloat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL:Oe+et.GenerateRandomHexadecimal,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62:Oe+et.GenerateRandomBase62,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64:Oe+et.GenerateRandomBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC:Oe+et.GenerateRandomAlphanumeric,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER:Oe+et.GenerateIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4:Oe+et.GenerateRandomUUIDv4,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER:Oe+et.GenerateShortIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN:Oe+et.GenerateHexadecimalToken,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH:Oe+q.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+q.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+q.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+q.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+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+si.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+si.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+si.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+si.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+Qr.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+Qr.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+er.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+er.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+er.DecodeJwt,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_FROM_BYTES_TO_STRING:Oe+ze.FromBytesToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_BYTES:Oe+ze.ToBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_NUMBER:Oe+ze.ToNumber,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_STRING:Oe+ze.ToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64:Oe+ze.EncodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64:Oe+ze.DecodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64URL:Oe+ze.EncodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64URL:Oe+ze.DecodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_HEX:Oe+ze.EncodeHex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_HEX:Oe+ze.DecodeHex,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_PARSE:Oe+Xr.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+Xr.Stringify};class qOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION,version:"1.0.0",description:'Implementation for the built-in function "Abort Execution". It terminates the execution of the current entity being run.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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__DELETE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Delete Persisted Entity". It deletes the current entity as an entry in the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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__CREATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Create Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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.BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Update Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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.SEARCH_NODE_IMPLEMENTATION,version:"1.0.0",description:"Implementation for search nodes when they get executed and query data.",initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,n)=>({error:"Search module not implemented",data:null})})}}class JOe 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",bC)}}const YOe=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 XOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY,version:"1.0.0",description:"Comparison: Empty (!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.Empty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=YOe(n),c=!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class QOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY,version:"1.0.0",description:"Comparison: NotEmpty (!!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.NotEmpty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=YOe(n),c=!!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}const $A=class $A extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveEqual (typed equality / deep JSON equality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.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 V=!1;return E&&$A.primitiveSet.has(E)?V=b===w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)===JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I($A,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let cA=$A;const LA=class LA extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveNotEqual (typed inequality / deep JSON inequality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.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 V=!1;return E&&LA.primitiveSet.has(E)?V=b!==w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)!==JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(LA,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let fA=LA;var eCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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 k={date:L,utc:!0,args:arguments};return new e(k)},m.utc=function(L){var k=y(this.toDate(),{locale:this.$L,utc:!0});return L?k.add(this.utcOffset(),i):k},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(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,k){var K=this.$utils().u;if(K(L))return this.$u?0:K(this.$offset)?b.call(this):this.$offset;if(typeof L=="string"&&(L=function(ee){ee===void 0&&(ee="");var de=ee.match(n);if(!de)return null;var le=(""+de[0]).match(s)||["-",0,0],fe=le[0],ve=60*+le[1]+ +le[2];return ve===0?0:fe==="+"?ve:-ve}(L),L===null))return this;var S=Math.abs(L)<=16?60*L:L;if(S===0)return this.utc(k);var Y=this.clone();if(k)return Y.$offset=S,Y.$u=!1,Y;var re=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(S+re,i)).$offset=S,Y.$x.$localOffset=re,Y};var w=m.format;m.format=function(L){var k=L||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,k)},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 V=m.toDate;m.toDate=function(L){return L==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():V.call(this)};var $=m.diff;m.diff=function(L,k,K){if(L&&this.$u===L.$u)return $.call(this,L,k,K);var S=this.local(),Y=y(L).local();return $.call(S,Y,k,K)}}})})(eCe);var gvi=eCe.exports;const Ivi=Wa(gvi);var tCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V,$){$===void 0&&($={});var L=new Date(w),k=function(K,S){S===void 0&&(S={});var Y=S.timeZoneName||"short",re=K+"|"+Y,ee=n[re];return ee||(ee=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:K,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),n[re]=ee),ee}(V,$);return k.formatToParts(L)},v=function(w,V){for(var $=m(w,V),L=[],k=0;k<$.length;k+=1){var K=$[k],S=K.type,Y=K.value,re=i[S];re>=0&&(L[re]=parseInt(Y,10))}var ee=L[3],de=ee===24?0:ee,le=L[0]+"-"+L[1]+"-"+L[2]+" "+de+":"+L[4]+":"+L[5]+":000",fe=+w;return(e.utc(le).valueOf()-(fe-=fe%1e3))/6e4},E=c.prototype;E.tz=function(w,V){w===void 0&&(w=y);var $,L=this.utcOffset(),k=this.toDate(),K=k.toLocaleString("en-US",{timeZone:w}),S=Math.round((k-new Date(K))/1e3/60),Y=15*-Math.round(k.getTimezoneOffset()/15)-S;if(!Number(Y))$=this.utcOffset(0,V);else if($=e(K,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),V){var re=$.utcOffset();$=$.add(L-re,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var V=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),V,{timeZoneName:w}).find(function(L){return L.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,V){if(!this.$x||!this.$x.$timezone)return b.call(this,w,V);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,V).tz(this.$x.$timezone,!0)},e.tz=function(w,V,$){var L=$&&V,k=$||V||y,K=v(+e(),k);if(typeof w!="string")return e(w).tz(k);var S=function(de,le,fe){var ve=de-60*le*1e3,ue=v(ve,fe);if(le===ue)return[ve,le];var ye=v(ve-=60*(ue-le)*1e3,fe);return ue===ye?[ve,ue]:[de-60*Math.min(ue,ye)*1e3,Math.max(ue,ye)]}(e.utc(w,L).valueOf(),K,k),Y=S[0],re=S[1],ee=e(Y).utcOffset(re);return ee.$x.$timezone=k,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(tCe);var Rvi=tCe.exports;const Dvi=Wa(Rvi);var iCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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))}}})})(iCe);var wvi=iCe.exports;const Ovi=Wa(wvi);var rCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isSameOrAfter=function(s,c){return this.isSame(s,c)||this.isAfter(s,c)}}})})(rCe);var Cvi=rCe.exports;const _vi=Wa(Cvi);var nCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isSameOrBefore=function(s,c){return this.isSame(s,c)||this.isBefore(s,c)}}})})(nCe);var Vvi=nCe.exports;const Pvi=Wa(Vvi);var aCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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"),V=this.diff(w,i,!0);return V<0?e(this).startOf("week").week():Math.ceil(V)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(aCe);var Nvi=aCe.exports;const xvi=Wa(Nvi);var sCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V,$=e(this),L=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),V=4-w.isoWeekday(),w.isoWeekday()>4&&(V+=7),w.add(V,i));return $.diff(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)}}})})(sCe);var $vi=sCe.exports;const Lvi=Wa($vi);var lCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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 V=this.quarter()-1;return w?this.month(3*V).startOf(i).startOf("day"):this.month(3*V+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(lCe);var Mvi=lCe.exports;const Bvi=Wa(Mvi);var oCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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")}}})})(oCe);var Gvi=oCe.exports;const kvi=Wa(Gvi);var dCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V){for(var $,L,k,K=b.$locale().relativeTime||e,S=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=S.length,re=0;re<Y;re+=1){var ee=S[re];ee.d&&($=w?s(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var de=(i.rounding||Math.round)(Math.abs($));if(k=$>0,de<=ee.r||!ee.r){de<=1&&re>0&&(ee=S[re-1]);var le=K[ee.l];V&&(de=V(""+de)),L=typeof le=="string"?le.replace("%d",de):le(de,E,ee.l,k);break}}if(E)return L;var fe=k?K.future:K.past;return typeof fe=="function"?fe(L):fe.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)}}})})(dCe);var jvi=dCe.exports;const Uvi=Wa(jvi);var uCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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},V=function(de){return de instanceof re},$=function(de,le,fe){return new re(de,fe,le.$l)},L=function(de){return n.p(de)+"s"},k=function(de){return de<0},K=function(de){return k(de)?Math.ceil(de):Math.floor(de)},S=function(de){return Math.abs(de)},Y=function(de,le){return de?k(de)?{negative:!0,format:""+S(de)+le}:{negative:!1,format:""+de+le}:{negative:!1,format:""}},re=function(){function de(fe,ve,ue){var ye=this;if(this.$d={},this.$l=ue,fe===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ve)return $(fe*w[L(ve)],this);if(typeof fe=="number")return this.$ms=fe,this.parseFromMilliseconds(),this;if(typeof fe=="object")return Object.keys(fe).forEach(function($e){ye.$d[L($e)]=fe[$e]}),this.calMilliseconds(),this;if(typeof fe=="string"){var Ve=fe.match(b);if(Ve){var _e=Ve.slice(2).map(function($e){return $e!=null?Number($e):0});return this.$d.years=_e[0],this.$d.months=_e[1],this.$d.weeks=_e[2],this.$d.days=_e[3],this.$d.hours=_e[4],this.$d.minutes=_e[5],this.$d.seconds=_e[6],this.calMilliseconds(),this}}return this}var le=de.prototype;return le.calMilliseconds=function(){var fe=this;this.$ms=Object.keys(this.$d).reduce(function(ve,ue){return ve+(fe.$d[ue]||0)*w[ue]},0)},le.parseFromMilliseconds=function(){var fe=this.$ms;this.$d.years=K(fe/v),fe%=v,this.$d.months=K(fe/E),fe%=E,this.$d.days=K(fe/y),fe%=y,this.$d.hours=K(fe/e),fe%=e,this.$d.minutes=K(fe/c),fe%=c,this.$d.seconds=K(fe/s),fe%=s,this.$d.milliseconds=fe},le.toISOString=function(){var fe=Y(this.$d.years,"Y"),ve=Y(this.$d.months,"M"),ue=+this.$d.days||0;this.$d.weeks&&(ue+=7*this.$d.weeks);var ye=Y(ue,"D"),Ve=Y(this.$d.hours,"H"),_e=Y(this.$d.minutes,"M"),$e=this.$d.seconds||0;this.$d.milliseconds&&($e+=this.$d.milliseconds/1e3,$e=Math.round(1e3*$e)/1e3);var Ne=Y($e,"S"),Be=fe.negative||ve.negative||ye.negative||Ve.negative||_e.negative||Ne.negative,Se=Ve.format||_e.format||Ne.format?"T":"",je=(Be?"-":"")+"P"+fe.format+ve.format+ye.format+Se+Ve.format+_e.format+Ne.format;return je==="P"||je==="-P"?"P0D":je},le.toJSON=function(){return this.toISOString()},le.format=function(fe){var ve=fe||"YYYY-MM-DDTHH:mm:ss",ue={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 ve.replace(m,function(ye,Ve){return Ve||String(ue[ye])})},le.as=function(fe){return this.$ms/w[L(fe)]},le.get=function(fe){var ve=this.$ms,ue=L(fe);return ue==="milliseconds"?ve%=1e3:ve=ue==="weeks"?K(ve/w[ue]):this.$d[ue],ve||0},le.add=function(fe,ve,ue){var ye;return ye=ve?fe*w[L(ve)]:V(fe)?fe.$ms:$(fe,this).$ms,$(this.$ms+ye*(ue?-1:1),this)},le.subtract=function(fe,ve){return this.add(fe,ve,!0)},le.locale=function(fe){var ve=this.clone();return ve.$l=fe,ve},le.clone=function(){return $(this.$ms,this)},le.humanize=function(fe){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!fe)},le.valueOf=function(){return this.asMilliseconds()},le.milliseconds=function(){return this.get("milliseconds")},le.asMilliseconds=function(){return this.as("milliseconds")},le.seconds=function(){return this.get("seconds")},le.asSeconds=function(){return this.as("seconds")},le.minutes=function(){return this.get("minutes")},le.asMinutes=function(){return this.as("minutes")},le.hours=function(){return this.get("hours")},le.asHours=function(){return this.as("hours")},le.days=function(){return this.get("days")},le.asDays=function(){return this.as("days")},le.weeks=function(){return this.get("weeks")},le.asWeeks=function(){return this.as("weeks")},le.months=function(){return this.get("months")},le.asMonths=function(){return this.as("months")},le.years=function(){return this.get("years")},le.asYears=function(){return this.as("years")},de}(),ee=function(de,le,fe){return de.add(le.years()*fe,"y").add(le.months()*fe,"M").add(le.days()*fe,"d").add(le.hours()*fe,"h").add(le.minutes()*fe,"m").add(le.seconds()*fe,"s").add(le.milliseconds()*fe,"ms")};return function(de,le,fe){i=fe,n=fe().$utils(),fe.duration=function(ye,Ve){var _e=fe.locale();return $(ye,{$l:_e},Ve)},fe.isDuration=V;var ve=le.prototype.add,ue=le.prototype.subtract;le.prototype.add=function(ye,Ve){return V(ye)?ee(this,ye,1):ve.bind(this)(ye,Ve)},le.prototype.subtract=function(ye,Ve){return V(ye)?ee(this,ye,-1):ue.bind(this)(ye,Ve)}}})})(uCe);var Kvi=uCe.exports;const Fvi=Wa(Kvi);var pCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(pCe);var Svi=pCe.exports;const qvi=Wa(Svi);M.extend(Ivi);M.extend(Dvi);M.extend(Ovi);M.extend(_vi);M.extend(Pvi);M.extend(xvi);M.extend(Lvi);M.extend(Bvi);M.extend(kvi);M.extend(Uvi);M.extend(Fvi);M.extend(qvi);const At=o=>M(o),ir=o=>o.toISOString();function cCe(){return ir(M())}function fCe(o,p){return At(o).format(p)}function yCe(o){return ir(M(o))}function hCe(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 mCe(o,p,i){return ir(At(o).add(p,i))}function TCe(o,p,i){return ir(At(o).subtract(p,i))}function vCe(o,p,i,n=!1){return At(o).diff(At(p),i,n)}function ECe(o){return At(o).unix()}function bCe(o){return ir(M.unix(o))}function ACe(o){return ir(At(o))}function gCe(o){return At(o).year()}function ICe(o){return At(o).month()}function RCe(o){return At(o).date()}function DCe(o){return At(o).hour()}function wCe(o){return At(o).minute()}function OCe(o){return At(o).second()}function CCe(o){return At(o).millisecond()}function _Ce(o){return At(o).isoWeekday()}function VCe(o){return At(o).week()}function PCe(o){return At(o).quarter()}function NCe(o){return At(o).dayOfYear()}function xCe(o){return At(o).daysInMonth()}function $Ce(o,p){return ir(At(o).year(p))}function LCe(o,p){return ir(At(o).month(p))}function MCe(o,p){return ir(At(o).date(p))}function BCe(o,p){return ir(At(o).hour(p))}function GCe(o,p){return ir(At(o).minute(p))}function kCe(o,p){return ir(At(o).second(p))}function jCe(o,p){return ir(At(o).millisecond(p))}function UCe(o,p){return ir(At(o).isoWeekday(p))}function KCe(o,p){return ir(At(o).quarter(p))}function FCe(o,p){return ir(At(o).startOf(p))}function SCe(o,p){return ir(At(o).endOf(p))}function qCe(o,p){const i=At(o),n=i.startOf(p),s=i.endOf(p),c=n.valueOf()+(s.valueOf()-n.valueOf())/2;return ir(i.valueOf()<c?n:s)}function ZCe(o,p,i){return At(o).isBefore(At(p),i)}function HCe(o,p,i){return At(o).isAfter(At(p),i)}function WCe(o,p,i){return At(o).isSame(At(p),i)}function zCe(o,p,i){return At(o).isSameOrBefore(At(p),i)}function JCe(o,p,i){return At(o).isSameOrAfter(At(p),i)}function YCe(o,p,i,n,s="()"){return At(o).isBetween(At(p),At(i),n,s)}function XCe(o){return M(o).isValid()}function QCe(o){return At(o).isLeapYear()}function e_e(o,p,i){const n=At(o);return n.isBefore(p)?ir(At(p)):n.isAfter(i)?ir(At(i)):ir(n)}function t_e(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const n=At(o[i]);n.isBefore(p)&&(p=n)}return ir(p)}function i_e(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const n=At(o[i]);n.isAfter(p)&&(p=n)}return ir(p)}function r_e(o,p=!1){return At(o).fromNow(p)}function n_e(o,p=!1){return At(o).toNow(p)}function a_e(o,p,i=!0){const n=At(o).diff(At(p),"millisecond",!0),s=Math.abs(n),e=M.duration(s,"milliseconds").humanize();return i?n>=0?`in ${e}`:`${e} ago`:e}function s_e(o,p,i=["6","7"],n=[]){const s=v=>n.some(E=>At(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=At(o);const y=p>=0?1:-1;let m=Math.abs(p);for(;m>0;){e=e.add(y,"day");const v=c(e);!i.includes(v)&&!s(e)&&m--}return ir(e)}function l_e(o,p){let i=At(o);const n=p;for(let s=0;s<7;s++)if(i=i.add(1,"day"),i.isoWeekday()===n)return ir(i);return ir(i)}function o_e(o,p){let i=At(o);const n=p;for(let s=0;s<7;s++)if(i=i.subtract(1,"day"),i.isoWeekday()===n)return ir(i);return ir(i)}const d_e="Local";function YP(){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 XP(){const o=YP();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function u_e(o,p,i=!1){let n=p;if(n===d_e){const e=YP();if(!e)throw new Error("Unable to detect current timezone from host environment.");n=e}const s=n?M.tz(o,n):At(o),c=i?s.utc(!0):s.utc();return ir(c)}function p_e(o,p,i=!1){const n=At(o);return ir(i?n.tz(p,!0):n.tz(p))}function c_e(o,p){const i=o===d_e?XP():o;return At(p).tz(i).utcOffset()}function f_e(o,p,i=!1){return ir(At(o).utcOffset(p,i))}class y_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=cCe();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 h_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 m_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=yCe(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 T_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SUBTRACT_FROM_DATE,version:"1.0.0",description:"Date subtract-from-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=TCe(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 E_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=vCe(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 Zvi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE,version:"1.0.0",description:"Date to-date operation implementation module (coerce to ISO 8601 string)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=hCe(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 b_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_FROM_UNIX,version:"1.0.0",description:"Date from-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_TO_ISO_STRING,version:"1.0.0",description:"Date to-iso-string operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=ACe(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 I_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MONTH,version:"1.0.0",description:"Date get-month (0-based) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DATE,version:"1.0.0",description:"Date get-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_HOUR,version:"1.0.0",description:"Date get-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MINUTE,version:"1.0.0",description:"Date get-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SECOND,version:"1.0.0",description:"Date get-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MILLISECOND,version:"1.0.0",description:"Date get-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 V_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=_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 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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 N_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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 x_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DAYS_IN_MONTH,version:"1.0.0",description:"Date get-days-in-month operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 L_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=XP();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 M_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=$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_MONTH,version:"1.0.0",description:"Date set-month operation implementation module (0-based month)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DATE,version:"1.0.0",description:"Date set-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_HOUR,version:"1.0.0",description:"Date set-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MINUTE,version:"1.0.0",description:"Date set-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SECOND,version:"1.0.0",description:"Date set-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MILLISECOND,version:"1.0.0",description:"Date set-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_ISO_WEEKDAY,version:"1.0.0",description:"Date set-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SET_QUARTER,version:"1.0.0",description:"Date set-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_START_OF,version:"1.0.0",description:"Date start-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_END_OF,version:"1.0.0",description:"Date end-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_ROUND_TO,version:"1.0.0",description:"Date round-to operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=qCe(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 W_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_AFTER,version:"1.0.0",description:"Date is-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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,version:"1.0.0",description:"Date is-same operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_BEFORE,version:"1.0.0",description:"Date is-same-or-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SAME_OR_AFTER,version:"1.0.0",description:"Date is-same-or-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=JCe(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 Q_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)}),c=s[0],e=s[1],y=s[2],m=s[3],v=s[4],E=YCe(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 eVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID,version:"1.0.0",description:"Date is-valid operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 tVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR,version:"1.0.0",description:"Date is-leap-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=QCe(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__DATE_CLAMP_TO_RANGE,version:"1.0.0",description:"Date clamp-to-range operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=e_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 rVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF,version:"1.0.0",description:"Date min-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 nVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF,version:"1.0.0",description:"Date max-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=i_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 aVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW,version:"1.0.0",description:"Date from-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 sVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW,version:"1.0.0",description:"Date to-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=n_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 lVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF,version:"1.0.0",description:"Date humanize-diff operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=a_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 oVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS,version:"1.1.0",description:"Date add-business-days operation implementation module (ISO-weekend strings)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=s_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 dVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY,version:"1.0.0",description:"Date next-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 uVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY,version:"1.0.0",description:"Date previous-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=o_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 pVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC,version:"1.1.0",description:"Date to-utc operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=u_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 cVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE,version:"1.0.0",description:"Date convert-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=p_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 fVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET,version:"1.0.0",description:"Date get-timezone-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=c_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 yVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET,version:"1.0.0",description:"Date set-utc-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=f_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 hVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL,version:"1.0.0",description:"Execution parallel operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.Parallel);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const y=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],v=c.map(b=>{const w=new Iu(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 mVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL,version:"1.0.0",description:"Execution sequential operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.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,[X.Editor])[0],b=new Iu(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 TVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT,version:"1.0.0",description:"Execution wait operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.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 Hvi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,QP=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 eN(o){return Array.isArray(o)?o:[]}function os(o){return Number(o)}function vVe(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 EVe(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 bVe(o,p){const i=Yl(o),n=os(p);return[i.slice(0,n),i.slice(n)]}function AVe(o){return Yl(o).slice().reverse()}function gVe(o){return Yl(o).slice(0,-1)}function IVe(o){return Yl(o).slice(1)}function RVe(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 DVe(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 wVe(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 OVe(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 CVe(o,p,i){return Yl(o).map(s=>s===p?i:s)}function _Ve(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 VVe(o){return Yl(o)[0]}function PVe(o){const p=Yl(o);return p[p.length-1]}function NVe(o,p,...i){return[...Cn(o),p,...i]}function xVe(o,p){const i=Cn(o);return[p,...i]}function $Ve(o){return Cn(o).length}function LVe(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 MVe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return i.slice(0,n)}function BVe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return n===0?[]:i.slice(-n)}function GVe(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 kVe(o,p){return Cn(o).indexOf(p)}function jVe(o,p){return Cn(o).lastIndexOf(p)}function UVe(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 KVe(o){return Cn(o).reduce((i,n)=>i.concat(n),[])}function FVe(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=>Hvi.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 SVe(o){const i=[...Cn(o)];for(let n=i.length-1;n>0;n--){const s=Math.floor(KI()*(n+1));[i[n],i[s]]=[i[s],i[n]]}return i}function qVe(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 ZVe(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 HVe(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 WVe(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 zVe(o,p){if(!QP(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return eN(o).some(n=>n===p)}function JVe(o,p){const i=eN(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(QP))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return n.every(s=>i.includes(s))}function YVe(o,p){const i=eN(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(QP))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return n.some(s=>i.includes(s))}class XVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN,version:"1.0.0",description:"List join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=vVe(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 QVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT,version:"1.0.0",description:"List split operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=bVe(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 ePe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE,version:"1.0.0",description:"List reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=AVe(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 tPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS,version:"1.0.0",description:"List delete last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=gVe(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 iPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS,version:"1.0.0",description:"List delete first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=IVe(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__LIST_ADD_AT_INDEX,version:"1.0.0",description:"List add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=RVe(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 nPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX,version:"1.0.0",description:"List replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=DVe(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 aPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS,version:"1.0.0",description:"List replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=wVe(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 sPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS,version:"1.0.0",description:"List replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=OVe(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 lPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL,version:"1.0.0",description:"List replace all operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=CVe(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 oPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM,version:"1.0.0",description:"List get index item operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=_Ve(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 dPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST,version:"1.0.0",description:"List get first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=VVe(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__LIST_GET_LAST,version:"1.0.0",description:"List get last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=PVe(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 pPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND,version:"1.0.0",description:"List append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=NVe(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 cPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND,version:"1.0.0",description:"List prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=xVe(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 fPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH,version:"1.0.0",description:"List get length",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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:$Ve(s)}}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__LIST_DELETE_AT_INDEX,version:"1.0.0",description:"List delete one item at index (non-mutating)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=LVe(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 hPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS,version:"1.0.0",description:"List get first N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=MVe(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 mPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS,version:"1.0.0",description:"List get last N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=BVe(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 TPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE,version:"1.0.0",description:"List slice(start, end)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=GVe(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 vPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT,version:"1.0.0",description:"List concat(base, ...others)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=EVe(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 EPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF,version:"1.0.0",description:"List listGetIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=kVe(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 bPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF,version:"1.0.0",description:"List listGetLastIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=jVe(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 APe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE,version:"1.0.0",description:"List unique (stable, by reference/===)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=UVe(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 gPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN,version:"1.0.0",description:"List flatten one level",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=KVe(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 IPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT,version:"1.0.0",description:"List sort (non-mutating). Supports lists of strings (alphabetic), numbers (numeric), or ISO date strings (chronological).",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=FVe(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 RPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE,version:"1.0.0",description:"List shuffle (Fisher–Yates, secure RNG helper)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=SVe(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 DPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK,version:"1.0.0",description:"List chunk(size) -> list of lists",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=qVe(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 wPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START,version:"1.0.0",description:"List padStart(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=ZVe(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 OPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END,version:"1.0.0",description:"List padEnd(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=HVe(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 CPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT,version:"1.0.0",description:"List repeat(count)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=WVe(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 _Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS,version:"1.0.0",description:"List contains (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=zVe(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 VPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL,version:"1.0.0",description:"List contains all (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=JVe(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 PPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY,version:"1.0.0",description:"List contains any (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=YVe(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 Wvi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH,version:"1.0.0",description:"Returns the number of characters in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 NPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN,version:"1.0.0",description:"String join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{var s,c,e;try{const y=n.find(k=>{var K;return((K=k.valueOwner)==null?void 0:K.id)===Q.operation[q.Join].inputs.separator.id}),m=((s=y==null?void 0:y.value)==null?void 0:s.value)||"",v=n.find(k=>{var K;return((K=k.valueOwner)==null?void 0:K.id)===Q.operation[q.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=n.find(k=>{var K;return((K=k.valueOwner)==null?void 0:K.id)===Q.operation[q.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=n.filter(k=>{var K;return((K=k.valueOwner)==null?void 0:K.id)===Q.operation[q.Join].inputs.dynamicString.id}).map(k=>{var K,S;return((K=k.value)==null?void 0:K.valueAsType)||((S=k.value)==null?void 0:S.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 xPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX,version:"1.0.0",description:"String split at index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 $Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS,version:"1.0.0",description:"String split at all the occurrences of separators operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 LPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR,version:"1.0.0",description:"String split at the first occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 MPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR,version:"1.0.0",description:"String split at the last occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 BPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS,version:"1.0.0",description:"String delete last number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 GPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS,version:"1.0.0",description:"String delete first number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 kPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE,version:"1.0.0",description:"String reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 jPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE,version:"1.0.0",description:"String to lower case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 UPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE,version:"1.0.0",description:"String to upper case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 KPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX,version:"1.0.0",description:"String delete index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 FPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX,version:"1.0.0",description:"String add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 SPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS,version:"1.0.0",description:"String replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 qPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS,version:"1.0.0",description:"String replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 ZPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX,version:"1.0.0",description:"String replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 HPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 WPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 zPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES,version:"1.0.0",description:"String replace all matches operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 JPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM,version:"1.0.0",description:"String get index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 YPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS,version:"1.0.0",description:"String get last N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 XPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS,version:"1.0.0",description:"String get first N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 QPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF,version:"1.0.0",description:"String get index of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 eNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND,version:"1.0.0",description:"String append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 tNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND,version:"1.0.0",description:"String prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 iNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM,version:"1.0.0",description:"String trim implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 rNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START,version:"1.0.0",description:"String trimStart implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 nNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END,version:"1.0.0",description:"String trimEnd implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 aNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING,version:"1.0.0",description:"String substring(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 sNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE,version:"1.0.0",description:"String slice(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 lNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF,version:"1.0.0",description:"String lastIndexOf(search, fromIndex?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 oNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START,version:"1.0.0",description:"String padStart(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 dNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END,version:"1.0.0",description:"String padEnd(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 uNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT,version:"1.0.0",description:"String repeat(count) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 pNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX,version:"1.0.0",description:"String match(regex) -> first match array or null",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 cNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX,version:"1.0.0",description:"String matchAll(regex) -> array of matches",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.MatchAllRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)??((V=b.value)==null?void 0:V.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(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 fNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX,version:"1.0.0",description:"String search(regex) -> index or -1",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 yNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX,version:"1.0.0",description:"String replace using RegExp (pattern, replacement, flags?)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 hNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE,version:"1.0.0",description:"String normalize(form?) implementation module (NFC by default)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 MA=class MA extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS,version:"1.0.0",description:"Remove diacritics via NFD decomposition + strip combining marks",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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(MA.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(MA,"COMBINING_MARKS",/[\u0300-\u036f]/g);let yA=MA;class mNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES,version:"1.0.0",description:"Count literal substring occurrences in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 TNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX,version:"1.0.0",description:"Ensure string starts with given prefix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 vNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX,version:"1.0.0",description:"Ensure string ends with given suffix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 ENe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX,version:"1.0.0",description:"Remove prefix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 bNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX,version:"1.0.0",description:"Remove suffix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 ANe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH,version:"1.0.0",description:"String startsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 gNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH,version:"1.0.0",description:"String endsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 INe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS,version:"1.0.0",description:"String includes(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 RNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX,version:"1.0.0",description:"Regex test: new RegExp(pattern, flags?).test(src) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 DNe(o,p){const i=Number(o),s=10**Math.max(0,Number(p)||0);return Math.round(i*s)/s}function wNe(o,p){const i=Number(o),n=Math.abs(Number(p)||0);return n===0?i:Math.round(i/n)*n}function ONe(o,p,i){const n=Number(o),s=Number(p),c=Number(i);return Math.min(Math.max(n,s),c)}function CNe(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 _Ne(...o){const p=o.map(n=>Number(n));return p.length===0?0:p.reduce((n,s)=>n+s,0)/p.length}function VNe(...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 NNe(o,p){const i=Number(o),n=Number(p);return i===0?1/0:(n-i)/i*100}const oi=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 xNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION,version:"1.0.0",description:"Number addition operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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_SUBTRACTION,version:"1.0.0",description:"Number subtraction operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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 LNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION,version:"1.0.0",description:"Number multiplication operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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 MNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION,version:"1.0.0",description:"Number division operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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_REMAINDER,version:"1.0.0",description:"Number remainder operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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 GNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION,version:"1.0.0",description:"Number exponentiation operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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 kNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE,version:"1.0.0",description:"Number negate (unary -x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 jNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE,version:"1.0.0",description:"Number absolute (|x|)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 UNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN,version:"1.0.0",description:"Number sign (-1 | 0 | 1)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 KNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND,version:"1.0.0",description:"Number round to nearest integer",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.round(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_FLOOR,version:"1.0.0",description:"Number floor (⌊x⌋)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.floor(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_CEIL,version:"1.0.0",description:"Number ceil (⌈x⌉)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.ceil(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_TRUNC,version:"1.0.0",description:"Number truncation (drop fractional part)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.trunc(Number(s))}}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_ROUND_TO_DECIMALS,version:"1.0.0",description:"Round to N decimals",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_SNAP_TO_STEP,version:"1.0.0",description:"Snap a number to the nearest multiple of step (>=0 step)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=wNe(s,c);return{value:G.Success,error:null,result:e}}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_CLAMP,version:"1.0.0",description:"Clamp value to [min, max]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),y=ONe(s,c,e);return{value:G.Success,error:null,result:y}}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_MAP_RANGE,version:"1.0.0",description:"Map value from [inMin,inMax] to [outMin,outMax]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),v=CNe(s,c,e,y,m);return{value:G.Success,error:null,result:v}}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_AVERAGE,version:"1.0.0",description:"Average(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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_MEDIAN,version:"1.0.0",description:"Median(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(n),c=VNe(...s);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_MIN_OF,version:"1.0.0",description:"Min(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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 QNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF,version:"1.0.0",description:"Max(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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 exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT,version:"1.0.0",description:"Square root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.sqrt(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_CUBE_ROOT,version:"1.0.0",description:"Cube root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.cbrt(Number(s))}}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_NTH_ROOT,version:"1.0.0",description:"Nth root (value, n)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=PNe(s,c);return{value:G.Success,error:null,result:e}}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_EXP,version:"1.0.0",description:"e^x",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.exp(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_LOG_NATURAL,version:"1.0.0",description:"Natural log ln(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.log(Number(s))}}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_LOG10,version:"1.0.0",description:"Log base 10",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 sxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN,version:"1.0.0",description:"sin(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.sin(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_COS,version:"1.0.0",description:"cos(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.cos(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_TAN,version:"1.0.0",description:"tan(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.tan(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_ASIN,version:"1.0.0",description:"asin(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.asin(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_ACOS,version:"1.0.0",description:"acos(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.acos(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_ATAN,version:"1.0.0",description:"atan(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.atan(Number(s))}}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_ATAN2,version:"1.0.0",description:"atan2(y, x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS,version:"1.0.0",description:"deg → rad",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Number(s)*Math.PI/180}}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_TO_DEGREES,version:"1.0.0",description:"rad → deg",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Number(s)*180/Math.PI}}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_PERCENT_OF,version:"1.0.0",description:"x percent of y",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 JO extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE,version:"1.0.0",description:"((new-old)/old)*100",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=NNe(s,c);return{value:G.Success,error:null,result:e}}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_LESS_THAN,version:"1.0.0",description:"a < b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_MORE_THAN,version:"1.0.0",description:"a > b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_LESS_THAN_OR_EQUAL,version:"1.0.0",description:"a <= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:s<=c}}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_MORE_THAN_OR_EQUAL,version:"1.0.0",description:"a >= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:s>=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}function bxe(o,p){return function(){return o.apply(p,arguments)}}const{toString:zvi}=Object.prototype,{getPrototypeOf:tN}=Object,{iterator:qI,toStringTag:Axe}=Symbol,ZI=(o=>p=>{const i=zvi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Xl=o=>(o=o.toLowerCase(),p=>ZI(p)===o),HI=o=>p=>typeof p===o,{isArray:Lh}=Array,wy=HI("undefined");function lv(o){return o!==null&&!wy(o)&&o.constructor!==null&&!wy(o.constructor)&&Ga(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const gxe=Xl("ArrayBuffer");function Jvi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&gxe(o.buffer),p}const Yvi=HI("string"),Ga=HI("function"),Ixe=HI("number"),ov=o=>o!==null&&typeof o=="object",Xvi=o=>o===!0||o===!1,Kb=o=>{if(ZI(o)!=="object")return!1;const p=tN(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(Axe in o)&&!(qI in o)},Qvi=o=>{if(!ov(o)||lv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},eEi=Xl("Date"),tEi=Xl("File"),iEi=Xl("Blob"),rEi=Xl("FileList"),nEi=o=>ov(o)&&Ga(o.pipe),aEi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ga(o.append)&&((p=ZI(o))==="formdata"||p==="object"&&Ga(o.toString)&&o.toString()==="[object FormData]"))},sEi=Xl("URLSearchParams"),[lEi,oEi,dEi,uEi]=["ReadableStream","Request","Response","Headers"].map(Xl),pEi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dv(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let n,s;if(typeof o!="object"&&(o=[o]),Lh(o))for(n=0,s=o.length;n<s;n++)p.call(null,o[n],n,o);else{if(lv(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 Rxe(o,p){if(lv(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 Ac=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Dxe=o=>!wy(o)&&o!==Ac;function YO(){const{caseless:o,skipUndefined:p}=Dxe(this)&&this||{},i={},n=(s,c)=>{const e=o&&Rxe(i,c)||c;Kb(i[e])&&Kb(s)?i[e]=YO(i[e],s):Kb(s)?i[e]=YO({},s):Lh(s)?i[e]=s.slice():(!p||!wy(s))&&(i[e]=s)};for(let s=0,c=arguments.length;s<c;s++)arguments[s]&&dv(arguments[s],n);return i}const cEi=(o,p,i,{allOwnKeys:n}={})=>(dv(p,(s,c)=>{i&&Ga(s)?o[c]=bxe(s,i):o[c]=s},{allOwnKeys:n}),o),fEi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),yEi=(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)},hEi=(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&&tN(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},mEi=(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},TEi=o=>{if(!o)return null;if(Lh(o))return o;let p=o.length;if(!Ixe(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},vEi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&tN(Uint8Array)),EEi=(o,p)=>{const n=(o&&o[qI]).call(o);let s;for(;(s=n.next())&&!s.done;){const c=s.value;p.call(o,c[0],c[1])}},bEi=(o,p)=>{let i;const n=[];for(;(i=o.exec(p))!==null;)n.push(i);return n},AEi=Xl("HTMLFormElement"),gEi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),b4=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),IEi=Xl("RegExp"),wxe=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),n={};dv(i,(s,c)=>{let e;(e=p(s,c,o))!==!1&&(n[c]=e||s)}),Object.defineProperties(o,n)},REi=o=>{wxe(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+"'")})}})},DEi=(o,p)=>{const i={},n=s=>{s.forEach(c=>{i[c]=!0})};return Lh(o)?n(o):n(String(o).split(p)),i},wEi=()=>{},OEi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function CEi(o){return!!(o&&Ga(o.append)&&o[Axe]==="FormData"&&o[qI])}const _Ei=o=>{const p=new Array(10),i=(n,s)=>{if(ov(n)){if(p.indexOf(n)>=0)return;if(lv(n))return n;if(!("toJSON"in n)){p[s]=n;const c=Lh(n)?[]:{};return dv(n,(e,y)=>{const m=i(e,s+1);!wy(m)&&(c[y]=m)}),p[s]=void 0,c}}return n};return i(o,0)},VEi=Xl("AsyncFunction"),PEi=o=>o&&(ov(o)||Ga(o))&&Ga(o.then)&&Ga(o.catch),Oxe=((o,p)=>o?setImmediate:p?((i,n)=>(Ac.addEventListener("message",({source:s,data:c})=>{s===Ac&&c===i&&n.length&&n.shift()()},!1),s=>{n.push(s),Ac.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ga(Ac.postMessage)),NEi=typeof queueMicrotask<"u"?queueMicrotask.bind(Ac):typeof process<"u"&&process.nextTick||Oxe,xEi=o=>o!=null&&Ga(o[qI]),Ue={isArray:Lh,isArrayBuffer:gxe,isBuffer:lv,isFormData:aEi,isArrayBufferView:Jvi,isString:Yvi,isNumber:Ixe,isBoolean:Xvi,isObject:ov,isPlainObject:Kb,isEmptyObject:Qvi,isReadableStream:lEi,isRequest:oEi,isResponse:dEi,isHeaders:uEi,isUndefined:wy,isDate:eEi,isFile:tEi,isBlob:iEi,isRegExp:IEi,isFunction:Ga,isStream:nEi,isURLSearchParams:sEi,isTypedArray:vEi,isFileList:rEi,forEach:dv,merge:YO,extend:cEi,trim:pEi,stripBOM:fEi,inherits:yEi,toFlatObject:hEi,kindOf:ZI,kindOfTest:Xl,endsWith:mEi,toArray:TEi,forEachEntry:EEi,matchAll:bEi,isHTMLForm:AEi,hasOwnProperty:b4,hasOwnProp:b4,reduceDescriptors:wxe,freezeMethods:REi,toObjectSet:DEi,toCamelCase:gEi,noop:wEi,toFiniteNumber:OEi,findKey:Rxe,global:Ac,isContextDefined:Dxe,isSpecCompliantForm:CEi,toJSONObject:_Ei,isAsyncFn:VEi,isThenable:PEi,setImmediate:Oxe,asap:NEi,isIterable:xEi};function ai(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(ai,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 Cxe=ai.prototype,_xe={};["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=>{_xe[o]={value:o}});Object.defineProperties(ai,_xe);Object.defineProperty(Cxe,"isAxiosError",{value:!0});ai.from=(o,p,i,n,s,c)=>{const e=Object.create(Cxe);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 ai.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 XO(o){return Ue.isPlainObject(o)||Ue.isArray(o)}function Vxe(o){return Ue.endsWith(o,"[]")?o.slice(0,-2):o}function A4(o,p,i){return o?o.concat(p).map(function(s,c){return s=Vxe(s),!i&&c?"["+s+"]":s}).join(i?".":""):p}function LEi(o){return Ue.isArray(o)&&!o.some(XO)}const MEi=Ue.toFlatObject(Ue,{},null,function(p){return/^is[A-Z]/.test(p)});function WI(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,k){return!Ue.isUndefined(k[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 ai("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer($)||Ue.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,L,k){let K=$;if($&&!k&&typeof $=="object"){if(Ue.endsWith(L,"{}"))L=n?L:L.slice(0,-2),$=JSON.stringify($);else if(Ue.isArray($)&&LEi($)||(Ue.isFileList($)||Ue.endsWith(L,"[]"))&&(K=Ue.toArray($)))return L=Vxe(L),K.forEach(function(Y,re){!(Ue.isUndefined(Y)||Y===null)&&p.append(e===!0?A4([L],re,c):e===null?L:L+"[]",v(Y))}),!1}return XO($)?!0:(p.append(A4(k,L,c),v($)),!1)}const b=[],w=Object.assign(MEi,{defaultVisitor:E,convertValue:v,isVisitable:XO});function V($,L){if(!Ue.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+L.join("."));b.push($),Ue.forEach($,function(K,S){(!(Ue.isUndefined(K)||K===null)&&s.call(p,K,Ue.isString(S)?S.trim():S,L,w))===!0&&V(K,L?L.concat(S):[S])}),b.pop()}}if(!Ue.isObject(o))throw new TypeError("data must be an object");return V(o),p}function g4(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(n){return p[n]})}function iN(o,p){this._pairs=[],o&&WI(o,this,p)}const Pxe=iN.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,g4)}:g4;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function BEi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nxe(o,p,i){if(!p)return o;const n=i&&i.encode||BEi;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 iN(p,i).toString(n),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class GEi{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 I4=GEi,xxe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kEi=typeof URLSearchParams<"u"?URLSearchParams:iN,jEi=typeof FormData<"u"?FormData:null,UEi=typeof Blob<"u"?Blob:null,KEi={isBrowser:!0,classes:{URLSearchParams:kEi,FormData:jEi,Blob:UEi},protocols:["http","https","file","blob","url","data"]},rN=typeof window<"u"&&typeof document<"u",QO=typeof navigator=="object"&&navigator||void 0,FEi=rN&&(!QO||["ReactNative","NativeScript","NS"].indexOf(QO.product)<0),SEi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),qEi=rN&&window.location.href||"http://localhost",ZEi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rN,hasStandardBrowserEnv:FEi,hasStandardBrowserWebWorkerEnv:SEi,navigator:QO,origin:qEi},Symbol.toStringTag,{value:"Module"})),na={...ZEi,...KEi};function HEi(o,p){return WI(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 WEi(o){return Ue.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function zEi(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 $xe(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]=zEi(s[e])),!y)}if(Ue.isFormData(o)&&Ue.isFunction(o.entries)){const i={};return Ue.forEachEntry(o,(n,s)=>{p(WEi(n),s,i,0)}),i}return null}function JEi(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 nN={transitional:xxe,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($xe(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 HEi(p,this.formSerializer).toString();if((y=Ue.isFileList(p))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return WI(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||s?(i.setContentType("application/json",!1),JEi(p)):p}],transformResponse:[function(p){const i=this.transitional||nN.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"?ai.from(y,ai.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=>{nN.headers[o]={}});const aN=nN,YEi=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"]),XEi=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 yi(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,V]of b.knownVersions)v.set(w,V);b.knownVersions=null}}let y=(m=this.knownVersions)==null?void 0:m.get(i);if(!y){const v=await this.APILoadVersion({},i);if(!v)throw new Error(`Version with id '${i}' for entity with id '${this.id}' not found.`);y=new yi(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=ne(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=ne(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=ne(s),e=this.project.get(c);e&&this.addValueAsTypeToList(e,n)}),[...this.valueAsTypeList].forEach(s=>{(i.valueAsTypeList||[]).find(e=>ne(e)===s.id)||this.removeValueAsTypeFromList(s,n)}),this.setValueAsTypeSingle(null,n),this.metaSync({value:null},n);else if(i.valueAsTypeSingle){const s=ne(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=ne(this.initialData.parent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting parent reference '${y.id}' for entity with id '${this.id}'`),this.setParent(y,null),i.push(y);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`)}else if(this.initialData.standaloneParent){const e=ne(this.initialData.standaloneParent),y=this.project.get(e);if(J.Logger.log(`[LiteralValueState.hydrateAncestors] Hydrating standalone parent reference '${e}' for entity with id '${this.id}'`),y)J.Logger.log(`[LiteralValueState.hydrateAncestors] Setting standalone parent reference '${y.id}' for entity with id '${this.id}'`),this.setStandaloneParent(y,null);else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Standalone parent reference '${e}' for entity with id '${this.id}' not found in the project`),new Error(`${this.type} with id '${this.id}' has a 'standaloneParent' reference '${e}' that isn't found in the project`)}else throw J.Logger.error(`[LiteralValueState.hydrateAncestors] Entity with id '${this.id}' must have a 'parent'`),new Error(`${this.type} with id '${this.id}' must have a 'parent'`);if(this.initialData.valueAsTypeList&&Array.isArray(this.initialData.valueAsTypeList))this.valueAsTypeList=this.valueAsTypeList||[],this.initialData.valueAsTypeList.forEach(e=>{const y=ne(e),m=this.project.get(y);m&&this.valueAsTypeList.push(m)});else if(this.initialData.valueAsTypeSingle){const e=ne(this.initialData.valueAsTypeSingle),y=this.project.get(e);y&&(this.valueAsTypeSingle=y)}return{updated:D(i),added:D(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=ne(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 yi.repository.APILoad(this.id,...n),this}async APICreate(i=ke,...n){return await yi.repository.APICreate(this.toShallowJSON(),...n),this}async APIUpdate(i=ke,...n){return await yi.repository.APIUpdate(this.toShallowJSON(),...n),this}async APIDelete(i=ke,...n){return await yi.repository.APIDelete(this.toShallowJSON(),...n),this}async APIClone(i=ke,...n){return await yi.repository.APIClone(this.id,...n),this}async APILoadVersion(i=ke,n,...s){return await yi.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):kA.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:Ii.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=uOe(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await dOe(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=Rr(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=Si(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(yi,"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(yi,"type",d.LiteralValue),I(yi,"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(yi,"PARENT_TYPES",[...yi.USER_MANAGED_PARENT_TYPES]),I(yi,"MUTABLE_BASE_PROPERTIES",["name","autogeneration","value"]),I(yi,"INMUTABLE_BASE_PROPERTIES",["id","type","version","createdAt","author","previousVersion"]),I(yi,"BASE_PROPERTIES",[...yi.MUTABLE_BASE_PROPERTIES,...yi.INMUTABLE_BASE_PROPERTIES]),I(yi,"MUTABLE_META_PROPERTIES",[...yi.MUTABLE_BASE_PROPERTIES]),I(yi,"INMUTABLE_META_PROPERTIES",[...yi.INMUTABLE_BASE_PROPERTIES]),I(yi,"META_PROPERTIES",[...yi.MUTABLE_META_PROPERTIES,...yi.INMUTABLE_META_PROPERTIES]),I(yi,"MUTABLE_UPSTREAM_PROPERTIES",[]),I(yi,"INMUTABLE_UPSTREAM_PROPERTIES",["parent"]),I(yi,"UPSTREAM_PROPERTIES",[...yi.MUTABLE_UPSTREAM_PROPERTIES,...yi.INMUTABLE_UPSTREAM_PROPERTIES]),I(yi,"MUTABLE_DOWNSTREAM_PROPERTIES",["valueAsTypeSingle","valueAsTypeList"]),I(yi,"INMUTABLE_DOWNSTREAM_PROPERTIES",[]),I(yi,"DOWNSTREAM_PROPERTIES",[...yi.MUTABLE_DOWNSTREAM_PROPERTIES,...yi.INMUTABLE_DOWNSTREAM_PROPERTIES]),I(yi,"PROPERTIES",[...yi.META_PROPERTIES,...yi.UPSTREAM_PROPERTIES,...yi.DOWNSTREAM_PROPERTIES]);let Yr=yi;function ef(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 cOe(o,p){const i=p-o+1,s=KI()*i;return Math.floor(s)+o}function fOe(){const o=ef(4);return(o[0]<<24|o[1]<<16|o[2]<<8|o[3])>>>0}function KI(){return fOe()/2**32}function GP(o){const p=ef(o);return Array.from(p).map(i=>i.toString(16).padStart(2,"0")).join("")}const ZO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function kP(o){let p="";const i=ef(o);for(let n=0;n<o;n++)p+=ZO[i[n]%ZO.length];return p}function yOe(o){const p=ef(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 jP(o){return kP(o)}function UP(o,p=ZO){let i="";const n=ef(o);for(let s=0;s<o;s++)i+=p[n[s]%p.length];return i}function Du(){const o=ef(16);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const p=Array.from(o).map(i=>i.toString(16).padStart(2,"0")).join("");return[p.slice(0,8),p.slice(8,12),p.slice(12,16),p.slice(16,20),p.slice(20,32)].join("-")}function hOe(){return UP(6)}function mOe(){return GP(32)}const ivi=63,rvi=/^[a-z][a-z0-9-]*[a-z0-9]$/;function nvi(o){return o.length>=1&&o.length<=ivi&&rvi.test(o)&&!o.includes("--")}function*avi(){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 svi(o,p){const i=new Set(o.map(s=>s.toLowerCase())),n=p>0?"secondary-db":"main";for(const s of avi()){const c=s?`${n}-${s}`:n;if(nvi(c)&&!i.has(c))return c}throw new Error("Unable to generate identifier")}function TOe(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(V=>V.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)),E=v==null?void 0:v.getDefaultValue();return(E==null?void 0:E.value)===!0});if(!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:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:v==null?void 0:v.toReference()},w=me(b,o.project);return w.setParent(v,p),w.initChildren(p),p==null||p.add(w,H.Added),w.addSelfToProject(p),{newEntities:[w]}}return{newEntities:[]}}else if(n)return{newEntities:[]};const s=o.project.get(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id),c=FI(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:oe.EntityTemplate,autogeneration:null,value:!0,valueAsTypeSingle:null,valueAsTypeList:null,parent:e==null?void 0:e.toReference()},v=me(m,o.project);v.setParent(e,p),v.initChildren(p),p==null||p.add(v,H.Added),v.addSelfToProject(p)}return{newEntities:[c]}}}return{newEntities:[]}}function vOe(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 V=o.project.entities.filter(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id));let $=V.find(S=>!!S.properties.find(Y=>{var re;return Y.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((re=Y.getDefaultValue())==null?void 0:re.value)===!0}));if(!$&&V.length)$=V[0];else if(!$&&!V.length){$=o.project.getBuiltIn(Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id).implement("Relational database",p);const Y=$.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));(m=Y==null?void 0:Y.defaultValue)==null||m.metaSync({value:!0},p),n.push($)}const L=o.properties.find(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.database.id));if(L&&!(L!=null&&L.defaultValue)){const S={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:(p==null?void 0:p.timestamp)||new Date().toISOString(),author:x.sessionAuthor,previousVersion:null,deleted:!1,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:null,name:oe.EntityTemplate,autogeneration:null,value:null,valueAsTypeSingle:($==null?void 0:$.toJSON())||null,valueAsTypeList:null,parent:L==null?void 0:L.toReference()},Y=me(S,o.project);Y.hydrateAncestors(),Y.setParent(L,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p),(L==null?void 0:L.defaultValue).setValueAsTypeSingle($||null,p),n.push(Y);return}else L!=null&&L.defaultValue&&!(L!=null&&L.defaultValue.valueAsTypeSingle)&&(L==null||L.defaultValue.setValueAsTypeSingle($||null,p));const k=o.properties.find(S=>S.implements.find(Y=>Y.id===Q["built-in-base-entity"].BUILT_IN_PERSISTED_ENTITY_ENTITY.properties.primaryKey.id));if(!k)throw new Error(`[handleAfterEntityImplementationSideEffects] Primary key property not found for implemented base entity ${Q["built-in-base-entity"]}`);if(!k.dataType){const S=ur.new(p);S.parent=k.toReference();const Y=me(S,o.project);Y.hydrateAncestors(),Y.setParent(k,p),Y.addSelfToProject(p),p==null||p.add(Y,H.Added),Y.initChildren(p)}const K=o.project.getBuiltIn(Q["primitive-entity"].number.id);(v=k.dataType)==null||v.setEntity(K,p);return}case Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id:{const V=o.project.entities.filter(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.id)&&re.id!==o.id),$=V.map(re=>{var le;const ee=re.properties.find(fe=>fe.implements.find(ve=>ve.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));return(le=ee==null?void 0:ee.getDefaultValue())==null?void 0:le.value}).filter(re=>!!re),L=o.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.identifier.id));if(!V.find(re=>!!re.properties.find(ee=>{var de;return ee.implements.find(le=>le.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id)&&((de=ee.getDefaultValue())==null?void 0:de.value)===!0}))){const re=o.properties.find(ee=>ee.implements.find(de=>de.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.default.id));if(!re)throw new Error("Default boolean property not found for relational database entity with id: "+o.id);if(!(re!=null&&re.defaultValue)){const ee=Yr.new(p);ee.parent=re.toReference();const de=me(ee,o.project);de.hydrateAncestors(),de.setParent(re,p),de.addSelfToProject(p),p==null||p.add(de,H.Added),de.initChildren(p)}(E=re==null?void 0:re.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 re=Yr.new(p);re.parent=L.toReference();const ee=me(re,o.project);ee.hydrateAncestors(),ee.setParent(L,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added)}const K=svi($,V.length);(b=L.defaultValue)==null||b.metaSync({value:K},p);const S=o.properties.find(re=>re.implements.find(ee=>ee.id===Q["built-in-base-entity"].BUILT_IN_RELATIONAL_DATABASE_ENTITY.properties.password.id));if(!S)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(!S.defaultValue){const re=Yr.new(p);re.parent=S.toReference();const ee=me(re,o.project);ee.hydrateAncestors(),ee.setParent(S,p),ee.addSelfToProject(p),ee.initChildren(p),p==null||p.add(ee,H.Added),n.push(ee)}const Y=jP(24);(w=S.defaultValue)==null||w.metaSync({value:Y},p);return}case Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id:{const V=o.properties.find(K=>K.implements.find(S=>S.id===Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.properties.time.id));if(!V)throw new Error(`[handleAfterEntityImplementationSideEffects] Time property not found for implemented base entity ${Q["built-in-base-entity"].BUILT_IN_SQL_ROW_TRANSFORMER_ENTITY.id} with id ${o.id}`);let $=V.defaultValue||null;if(!$){const K=Yr.new(p);K.parent=V.toReference(),K.name=oe.Date,K.id=x.UUID.uuid(),$=me(K,o.project),$.hydrateAncestors(),$.setParent(V,p),$.addSelfToProject(p),$.initChildren(p),p==null||p.add($,H.Added)}$.metaSync({value:new Date().toISOString()},p),$.metaSync({editable:!1,deletable:!1},p),V.metaSync({editable:!1,deletable:!1},p);const L=o.properties.find(K=>K.implements.find(S=>S.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 k=L.defaultValue||null;if(!k){const K=Yr.new(p);K.name=oe.EntityTemplate,K.parent=L.toReference(),K.id=x.UUID.uuid(),k=me(K,o.project),k.hydrateAncestors(),k.setParent(L,p),k.addSelfToProject(p),k.initChildren(p),p==null||p.add(k,H.Added)}}}}),{self:o,updated:D(i),added:D(n),removed:D(s),affected:D(c)}}function FI(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,TOe(o,i);const e=me(c,o.project);return e.hydrateAncestors(),i==null||i.add(e,H.Added),e.addSelfToProject(i),e.initChildren(i),vOe(e,i),e.afterAllChildrenInitialized(i),e}function KP(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 EOe(o,p,i,n=He.OrDataTypeGroup){const s=[],c=[],e=[],y=[],m=x.UUID.uuid(),v=ur.new(i);v.id=m,v.parent=p.toReference(),v.like=!0,v.parentRelationType=n;const E=me(v,o.project);return c.push(E),E.setParent(p,i),E.initChildren(i),i==null||i.add(E,H.Added),E.setEntity(o,i),E.addSelfToProject(i),{updated:D(s),added:D(c),removed:D(e),affected:D(y),self:E}}function FP(o,p,i,n,s){var v,E,b,w,V,$,L,k;const c=[],e=[],y=[],m=[];switch(typeof o){case"string":let K=!1;const S=new Date(o);if(S instanceof Date&&!isNaN(S.valueOf())&&(K=!0),K){const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Date].id);p.setEntity(Y,n);break}else{const Y=p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id);p.setEntity(Y,n);break}case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":if(o===null){p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}else if(Array.isArray(o))if(p.metaSync({isList:!0},n),o.length>0){const Y=o.slice(0,5).filter(ee=>ee!==void 0);if(Y.every(ee=>typeof ee==typeof Y[0])&&(typeof Y[0]!="object"||Y[0]===null))switch(typeof Y[0]){case"string":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),n);break;case"number":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":p.setEntity(p.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}else{const ee=[];let de=!1;Y.forEach(fe=>{var ve,ue,ye,Ve;if(Array.isArray(fe)&&(de=!0),typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const _e=jb(fe,p.project,{...i,id:x.UUID.uuid()},n,s);_e.hasCreated&&ee.push((ve=_e.changeSet)==null?void 0:ve.self),c.push(...(ue=_e.changeSet)==null?void 0:ue.updated),e.push(...(ye=_e.changeSet)==null?void 0:ye.added),y.push(...(Ve=_e.changeSet)==null?void 0:Ve.removed)}});const le=D(ee);if(!le.length&&!de){Y.forEach(fe=>{const ve=ur.new(n);ve.parentRelationType=He.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);switch(ue.setParent(p,n),ue.initChildren(n),n==null||n.add(ue,H.Added),ue.addSelfToProject(n),typeof fe){case"string":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.String].id),n);break;case"number":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Number].id),n);break;case"boolean":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Boolean].id),n);break;case"object":ue.setEntity(ue.project.getBuiltIn(Q[d.PrimitiveEntity][oe.Null].id),n);break}});break}else le.length===1&&!de?p.setEntity(le[0],n):Y.forEach(fe=>{if(typeof fe=="object"&&!Array.isArray(fe)&&fe!==null){const ve=KP(Object.keys(fe),p.project);if(ve){const ue=EOe(ve||le[0],p,n,He.OrDataTypeGroup);c.push(...ue.updated),e.push(...ue.added),y.push(...ue.removed)}}else{const ve=ur.new(n);ve.parentRelationType=He.OrDataTypeGroup,ve.parent=p.toReference();const ue=me(ve,p.project);ue.setParent(p,n),ue.initChildren(n),n==null||n.add(ue,H.Added),ue.addSelfToProject(n);const ye=FP(fe,ue,{...i,id:x.UUID.uuid()},n,s);c.push(...ye.updated),e.push(...ye.added),y.push(...ye.removed)}})}}else{const Y=jb(o[0],p.project,{...i},n,s);p.setEntity((v=Y.changeSet)==null?void 0:v.self,n),c.push(...(E=Y.changeSet)==null?void 0:E.updated),e.push(...(b=Y.changeSet)==null?void 0:b.added),y.push(...(w=Y.changeSet)==null?void 0:w.removed);break}else{const Y=jb(o,p.project,{...i},n,s);p.setEntity((V=Y.changeSet)==null?void 0:V.self,n),c.push(...($=Y.changeSet)==null?void 0:$.updated),e.push(...(L=Y.changeSet)==null?void 0:L.added),y.push(...(k=Y.changeSet)==null?void 0:k.removed);break}}return{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:p}}function jb(o,p,i,n,s){const c=[],e=[],y=[],m=[],v=Object.keys(o),E=KP(v,p);if(E)return{hasCreated:!1,changeSet:{updated:[],added:[],removed:[],affected:[],self:E}};const b=s?i.name+" of "+s.name:i.name,V={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()},$=me(V,p);return $.setParent(p,n),$.initChildren(n),n==null||n.add($,H.Added),$.addSelfToProject(n),e.push($),v.forEach((L,k)=>{const K=x.UUID.uuid(),S=ja.new(n);S.id=K,S.name=L,S.codeName=L,S.parent=$.toReference(),S.index=k,S.required=!0,S.interactive=!0;const Y=me(S,p);Y.setParent($,n),Y.initChildren(n),n==null||n.add(Y,H.Added),Y.addSelfToProject(n),e.push(Y);const re=o[L],ee=x.UUID.uuid(),de=ur.new(n);de.id=ee,de.parent=Y.toReference(),de.like=!0,de.isList=!1;const le=me(de,p);le.setParent(Y,n),le.initChildren(n),n==null||n.add(le,H.Added),le.addSelfToProject(n),e.push(le);const fe=FP(re,le,{...i,name:L,id:x.UUID.uuid()},n,s||$);c.push(...fe.updated),e.push(...fe.added),y.push(...fe.removed)}),{hasCreated:!0,changeSet:{updated:D(c),added:D(e),removed:D(y),affected:D(m),self:$}}}function pd(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 ki({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:ce.Error,code:n,entity:c,firstRelationship:e});s.push(m)}if(y){const m=new ki({id:c.id+"--"+y.id+"--"+i,message:`Entity of type ${c.type} named "${c.name}" with id "${c.id}" overrides a base ${y.type} ${y.name} with id "${y.id}" that implements the same base descriptor`,severity:ce.Error,code:i,entity:c,firstRelationship:y});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(V=>V.id===w.id)):((E=v.implements)==null?void 0:E.id)===((b=c.implements)==null?void 0:b.id)});if(e){const v=new ki({id:e.id+"--"+c.id+"--"+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:ce.Error,code:n,entity:e,firstRelationship:c});s.push(v)}if(y){const v=new ki({id:y.id+"--"+c.id+"--"+i,message:`Entity of type ${y.type} named "${y.name}" with id "${y.id}" overrides a base entity ${c.name} with id "${c.id}" that implements the same base ${Array.isArray(y==null?void 0:y.implements)?wt(y==null?void 0:y.implements.map(E=>E.type),"', '","' and '"):(m=y.implements)==null?void 0:m.id}`,severity:ce.Error,code:i,entity:y,firstRelationship:c});s.push(v)}}),{errors:s,overlap:!!s.length})}function lvi(o,p){return o.abstract||(o.properties.forEach(n=>{n.abstract||n.metaSync({abstract:!0},p)}),Object.values(o.detachedDependents).forEach(n=>{n.field===HN.EntityField&&n.entity.remove({ignoreUpstream:!1},p)}),o.metaSync({abstract:!0},p)),o}function ovi(o,p){return o.abstract&&(o.properties.forEach(n=>{n.abstract&&n.metaSync({abstract:!1},p)}),Object.values(o.detachedDependents).forEach(n=>{(n.field===RA.Implements||n.field===RA.Extends)&&n.entity.onDetachedDependencyRemoved(o,n.field,p)}),o.metaSync({abstract:!1},p)),o}function dvi(o,p){return o.static||(o.properties.forEach(n=>{n.static||n.metaSync({static:!0},p)}),o.metaSync({static:!0},p)),o}function uvi(o,p){return o.static&&o.metaSync({static:!1},p),o}const km=class km extends xP{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=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.methods=this.initialData.methods.map(s=>{const c=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.abstractMethods=this.initialData.abstractMethods.map(s=>{const c=me(s,this.project);return c.setParent(this,null),c.initChildren(null),c}),this.initialData.allPropertiesImplement){const s=me(this.initialData.allPropertiesImplement,this.project);s.setParent(this,null),s.initChildren(null),this.allPropertiesImplement=s}if(this.initialData.additionalPropertiesDataType){const s=me(this.initialData.additionalPropertiesDataType,this.project);s.setParent(this,null),s.initChildren(null),this.additionalPropertiesDataType=s}this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project))}get allMethods(){return D([...this.ownDeclaredMethods,...this.allBaseMethodsFromOriginalParents])}get allProperties(){return D([...this.ownDeclaredProperties,...this.allBasePropertiesFromOriginalParents])}get allBaseMethodsFromOriginalParents(){var 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=QTi(this),{success:!0}}async validateAsync(i={}){const n=J.YieldTracker.from(i);return this.errors=await XTi(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=FI(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 bOe extends No{constructor(i){super(dn,i);I(this,"initialData");I(this,"id",Re.PERSISTED_ENTITY);I(this,"version","1");I(this,"name",Re.PERSISTED_ENTITY);I(this,"description",dn.description);I(this,"type",d.BuiltInBaseEntity);I(this,"abstract",dn.abstract);I(this,"static",dn.static);I(this,"properties",[]);I(this,"methods",[]);I(this,"abstractMethods",[]);I(this,"extends",null);I(this,"errors",[]);I(this,"project");this.initialData=dn,this.project=i,this.id=dn.id,this.version=dn.version,this.name=dn.name,this.static=dn.static,this.abstract=dn.abstract,this.properties=this.initialData.properties.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.methods=this.initialData.methods.map(n=>{const s=me(n,this.project);return s.parent=this,s}),this.abstractMethods=this.initialData.abstractMethods.map(n=>{const s=me(n,this.project);return s.parent=this,s}),this.initialData.extends&&(this.extends=me(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 SP(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 ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}return{errors:i,override:n.replace(/\s/g,"-")}}function AOe(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 ki({id:o.id+"--string-value-must-not-have-spaces",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-spaces",entity:o});i.push(s)}if(n.includes("-")){const s=new ki({id:o.id+"--string-value-must-not-have-dashes",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value cannot contain spaces or dashes.`,severity:ce.Error,code:"string-value-must-not-have-dashes",entity:o});i.push(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 gOe(o,p){const i=[];if(typeof p!="number"){const n=new ki({id:o.id+"--status-code-must-be-number",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number.`,severity:ce.Error,code:"status-code-must-be-number",entity:o});return i.push(n),{errors:i,override:p}}if(p<100){const n=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}if(p>599){const n=new ki({id:o.id+"--status-code-must-be-between-100-and-599",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a number between 100 and 599.`,severity:ce.Error,code:"status-code-must-be-between-100-and-599",entity:o});i.push(n)}return{errors:i,override:p}}class IOe 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=me(m,this.project);return v.setParent(this,null),v.initChildren(null),v}),this.methods=this.initialData.methods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.abstractMethods=this.initialData.abstractMethods.map(m=>{const v=me(m,this.project);return v.parent=this,v}),this.initialData.extends&&(this.extends=me(this.initialData.extends,this.project));const 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=SP(m,v);if(m.project.entities.filter(w=>Wi(w,Re.HTTP_ENDPOINT)&&w.id!==m.parent.id).map(w=>{const V=w.properties.find(k=>k.implements.find(K=>K.id===Q["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.properties.path.id));if(!V)throw new Error("Path property not found in endpoint entity "+w.name+" ("+w.id+")");const $=V.getDefaultValue();return($==null?void 0:$.value)||""}).includes(v)){const w=new ki({id:m.id+"--"+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:ce.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)=>gOe(m,v)}}class ROe extends Bi{constructor(i){super(go,i);I(this,"id",Ki.Parallel);I(this,"name",Ki.Parallel);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=go.inputs.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(go.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=go.error?me(go.error,this.project):null}}class DOe extends Bi{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=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(rs.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=rs.error?me(rs.error,this.project):null}}class wOe extends Bi{constructor(i){super(gu,i);I(this,"id",Ki.Sequential);I(this,"name",Ki.Sequential);I(this,"description","Programmatically execute a list of actions one after the other");I(this,"version","1");I(this,"autoexecutable",!0);I(this,"type",d.ActionDescriptor);I(this,"inputs",[]);I(this,"dataType",null);I(this,"error",null);I(this,"project");this.project=i,this.inputs=gu.inputs.map(n=>{const s=me(n,this.project);return s.setParent(this,null),s.initChildren(null),s}),this.dataType=me(gu.dataType,this.project),this.dataType.setParent(this,null),this.dataType.initChildren(null),this.error=gu.error?me(gu.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 pvi(o,p){const i=[];if(typeof p!="string"){const s=new ki({id:o.id+"--uuid-must-be-string",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be text.`,severity:ce.Error,code:"uuid-must-be-string",entity:o});return i.push(s),{errors:i,override:p}}const n=SP(o,p);if(n.errors.length>0)return i.push(...n.errors),{errors:i,override:p};if(!NP(p)){const s=new ki({id:o.id+"--uuid-must-be-valid-format",message:`Entity of type ${o.type} with id "${o.id}" has an invalid value "${p}". The value must be a valid UUID format. Eg: "123e4567-e89b-12d3-a456-426614174000".`,severity:ce.Error,code:"uuid-must-be-valid-format",entity:o});i.push(s)}return{errors:i,override:p}}var Pe=(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))(Pe||{});const OOe={initialized:!1,id:"",project:null,values:{},onWriteCallback:()=>{},onRemoveCallback:()=>{},onWrite:()=>{},onRemove:()=>{},init:()=>{},toJSON:()=>({}),writeValue:()=>{},readValue:()=>null,removeValue:()=>{},clear:()=>{}};function cvi(o,p){return{...OOe,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 Yr(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=VOe(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 Yr)s=i;else if(i)s=Si(i,this.project);else{const c={id:x.UUID.uuid(),version:x.UUID.uuid(),createdAt:new Date().toISOString(),author:x.sessionAuthor,deleted:!1,previousVersion:null,value:null,deletable:!0,editable:!0,type:d.LiteralValue,standaloneParent:p.toReference(),parent:null,valueAsTypeSingle:null,valueAsTypeList:null,autogeneration:null,name:mc(p.getDataType(null))};s=Si(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 hr(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function COe(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 qP(o,p,i){if(o==null)return i;const n=COe(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 fvi=new Set(["__proto__","prototype","constructor"]);function yvi(o){return typeof o=="string"&&fvi.has(o)}function _Oe(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=COe(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(yvi(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",V=Array.isArray(y)&&typeof v=="number";if(E){if(V&&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",k=Array.isArray($);if(w){if(!k){if(!c)throw new Error(`set(...) expected an array at "${String(v)}" but found non-array (coerce=false).`);y[v]=[]}}else if(!L||k){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 nv(o){return globalThis.structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o))}function hvi(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 ZP(o,p,i){const n=hvi(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 Qd(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 oe.EntityTemplate:s=oe.EntityTemplate;break;case oe.String:s=oe.String;break;case oe.Number:s=oe.Number;break;case oe.Boolean:s=oe.Boolean;break;case oe.Null:s=oe.Null;break;case oe.Enum:s=oe.Enum;break;case oe.KeyValue:s=oe.KeyValue;break;case oe.Untyped:s=oe.Untyped;break;case oe.KeyValue:s=oe.KeyValue;break;case oe.Date:s=oe.Date;break;case oe.UUID:s=oe.UUID;break;case oe.File:s=oe.File;break;case oe.Void:s=oe.Void;break;case oe.ActionDescriptor:s=oe.ActionDescriptor;break;case oe.Bytes:s=oe.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else s=oe.Untyped;const c=Yr.new(n);c.name=s,c.parent=p.toReference();const e=me(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),Gt.includes(o.type)){const e=Wn(o);return D([e,...[e].flatMap(y=>Oo(y,p,i))])}else if(o.type===d.OutputMap){if(Gt.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&&Gt.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 VOe(o,p,i){return o}function $h(o,p,i=!1){const n=o.readsValue;let s=null;const c=Mu(n,p,i);if(c){const e={sources:[c],target:o};s={value:c.value,valueOwner:o,type:Pe.Inherited,inheritanceLink:e}}return s}function It(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 oe.EntityTemplate:n=oe.EntityTemplate;break;case oe.String:n=oe.String;break;case oe.Number:n=oe.Number;break;case oe.Boolean:n=oe.Boolean;break;case oe.Null:n=oe.Null;break;case oe.Enum:n=oe.Enum;break;case oe.KeyValue:n=oe.KeyValue;break;case oe.Untyped:n=oe.Untyped;break;case oe.KeyValue:n=oe.KeyValue;break;case oe.Date:n=oe.Date;break;case oe.UUID:n=oe.UUID;break;case oe.File:n=oe.File;break;case oe.Void:n=oe.Void;break;case oe.ActionDescriptor:n=oe.ActionDescriptor;break;case oe.Bytes:n=oe.Bytes;break;default:throw new Error(`Primitive type ${se(o.entity,i)} is not supported`)}else n=oe.Untyped;if(!i.get(p.id))return null;const c=Yr.new(null);c.name=n,c.standaloneParent=p.toReference();let e=new Yr(c,i);return e.hydrateAncestors(),e.standalone=!0,e.setStandaloneParent(p,null),e.initChildren(null),e}function POe(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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:{value:null,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:null}}function Ub(o,p,i,n=!1){var e,y;const s={...o},c=p.type===d.VariableDeclaration?p.inputs:Ut.includes(p.type)?p.outputs:[];if(!c||c.length===0)return s;for(const m of c){if(!xv(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)||Hi(E);s[b]=un((v==null?void 0:v.value)||null)?s[b]:(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function Vm(o,p,i,n=!1){var e,y;const s={...o},c=p.inputs;if(!c)return s;for(const m of c){if(!xv(m))continue;const v=sv(m,i,n);if(v&&v.value){const E=se(m,i.project),b=m.codeName||((e=m.declaration)==null?void 0:e.codeName)||Hi(E);s[b]=(y=v==null?void 0:v.value)==null?void 0:y.value}}return s}function NOe(o,p,i=!1){var E,b,w,V,$,L,k,K;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 S=(V=p.lastExecutionResults)==null?void 0:V.readValue(o.id);if(S){if(hr(S.value)){const re={...n,...S.value},ee={...Vm(re,o,p,i)};S.metaSync({value:ee},null)}return{value:S,valueOwner:o,type:Pe.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 S=(k=p.execution)==null?void 0:k.hasEntity(e);if((!s||s&&S&&c||s&&!S&&!c)&&(y=$h(o,p,i),y&&y.value&&hr(y.value.value))){const re={...n,...y.value.value},ee={...Vm(re,o,p,i)};y.value.metaSync({value:ee},null)}}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const S=m;if(S&&S.value===null&&S.autogeneration){const Y=LR(S);if(S.metaSync({value:Y},null),hr(Y)){const re={...Vm(Y,o,p,i)};S.metaSync({value:re},null)}}(i||v===null||v!==Pe.Testing)&&(y={value:S,valueOwner:o,type:un(S)?o.readsValue?Pe.Inherited:Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const S=(K=p.localTestValues)==null?void 0:K.readValue(o.id);if(S){if(hr(S.value)){const Y={...n,...S.value},re={...Vm(Y,o,p,i)};S.metaSync({value:re},null)}return{value:S,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}}return un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function HP(o,p,i=!1){var e,y,m,v,E,b,w,V,$;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(hr(L.value)){const K={...n,...L.value},S=Ub(K,o,p,i);L==null||L.metaSync({value:S},null)}return{value:L,valueOwner:o,type:Pe.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!==Pe.DefaultValue)){if(hr(s.value)){const k={...n,...s.value},K=Ub(k,o,p,i);s.metaSync({value:K},null)}return{value:s,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}if((b=o.getDataType(null))!=null&&b.entity&&((V=(w=o.getDataType(null))==null?void 0:w.entity)==null?void 0:V.type)===d.DefinitionEntity&&(($=o.getDataType(null))!=null&&$.isObject())){const L=It(o.dataType,o,p.project),k=Ub(n,o,p,i);return L==null||L.metaSync({value:k},null),{value:L,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null}}return null}function av(o,p,i=!1){var E,b,w,V,$;if((E=o.dataType)!=null&&E.isObject())return NOe(o,p,i);const n=li(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=(V=p.execution)==null?void 0:V.hasEntity(e);(!s||s&&L&&c||s&&!L&&!c)&&(y=$h(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 k=LR(L);L.metaSync({value:k},null)}(i||v===null||v!==Pe.Testing)&&(y={value:L,valueOwner:o,type:un(L)?o.readsValue?Pe.Inherited:Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const L=($=p.localTestValues)==null?void 0:$.readValue(o.id);if(L)return{value:L,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}return un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function WP(o,p,i=!1){var e,y,m;if((e=o.dataType)!=null&&e.isObject())return HP(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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:av(o,p,i)}function zP(o,p,i=!1){var w,V,$,L;const n=!!((w=p.execution)!=null&&w.entities.length),s=(V=p.execution)==null?void 0:V.hasEntity(o);let c=null;const e=o.readsValue;if(e){const k=($=p.execution)==null?void 0:$.hasEntity(e);(!n||n&&k&&s||n&&!k&&!s)&&(c=$h(o,p,i))}const y=o.declaration;if(!c&&y){const k=av(y,p);k&&k.value&&(c=k)}const m=p.getValueTypePreference(o.id);if(!c||(c.type===Pe.DefaultValue||c.type===Pe.External)&&!i||m===null||m!==Pe.DefaultValue){const k=(L=p.localTestValues)==null?void 0:L.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const v=$o(o),E=o.getDataType(null);return v&&s&&(!(c!=null&&c.value)||!Il(E)&&eu(c==null?void 0:c.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:s&&!v&&un((c==null?void 0:c.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:c||{value:null,valueOwner:o,type:Pe.External,inheritanceLink:null}}function xOe(o,p,i=!1){return WP(o.declaration,p,i)}function $Oe(o,p,i=!1){var w,V,$,L;if(!i&&p.execution&&p.execution.hasEntity(o)){const k=(w=p.lastExecutionResults)==null?void 0:w.readValue(o.id);if(k)return{value:k,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=li(o),s=o.parent.type===d.FunctionDeclaration&&o.parent.parent.type===d.Loop?o.parent:null,c=!!((V=p.execution)!=null&&V.hasEntity(n))||!!s&&!!(($=p.execution)!=null&&$.hasEntity(s));let e=null;const y=o.getDefaultValue(),m=p.getValueTypePreference(o.id);if(y){const k=y||null;if(k&&k.value===null&&k.autogeneration){const K=LR(k);k.metaSync({value:K},null)}(i||m===null||m!==Pe.Testing)&&(e={value:k,valueOwner:o,type:un(k)?Pe.Empty:Pe.DefaultValue,inheritanceLink:null})}if(!e||(e.type===Pe.DefaultValue||e.type===Pe.External)&&!i||m===null||m!==Pe.DefaultValue){const k=(L=p.localTestValues)==null?void 0:L.readValue(o.id),K=p.getValueTypePreference(o.id);if(k&&!i&&(K===null||K!==Pe.DefaultValue))return{value:k,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const v=$o(o),E=o.getDataType(null);let b=v&&c&&(!(e!=null&&e.value)||!Il(E)&&eu(e==null?void 0:e.value));return n.type===d.Loop&&c&&(b=!1),b?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:c&&!v&&un((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e||{value:null,valueOwner:o,type:Pe.External,inheritanceLink:null}}function JP(o,p,i=!1){var V,$,L,k,K,S;if((V=o.getDataType(null))!=null&&V.isObject())return HP(o,p);if(p.execution&&p.execution.hasEntity(o)&&!i){const Y=($=p.lastExecutionResults)==null?void 0:$.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=li(o),s=!!((L=p.execution)!=null&&L.entities.length),c=(k=p.execution)==null?void 0:k.hasEntity(n),e=o.readsValue;let y=null;if(e){const Y=(K=p.execution)==null?void 0:K.hasEntity(e);(!s||s&&Y&&c||s&&!Y&&!c)&&(y=$h(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m){const Y=m;(i||v===null||v!==Pe.Testing)&&(y={value:Y,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null})}if(!y||(y.type===Pe.DefaultValue||y.type===Pe.External)&&!i||v===null||v!==Pe.DefaultValue){const Y=(S=p.localTestValues)==null?void 0:S.readValue(o.id);if(Y)return{value:Y,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const E=$o(o),b=o.getDataType(null);return E&&(!(y!=null&&y.value)||!Il(b)&&eu(y==null?void 0:y.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:!E&&un((y==null?void 0:y.value)||null)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}:y}function LOe(o,p,i=!1){var y,m,v,E,b,w,V,$,L,k,K,S,Y;if(p.execution&&p.execution.hasEntity(o)&&!i){const re=(y=p.lastExecutionResults)==null?void 0:y.readValue(o.id);if(re)return{value:re,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=Xm(o);if(Ty.includes(n.type)){const re=Mu(n,p,i),ee=o.codeName||((m=o.declaration)==null?void 0:m.codeName)||Hi(se(o,p.project));if(re!=null&&re.value&&hr(re.value.value)){const de=re.value.value[ee],le=It(o.getDataType(null),o,p.project);return le==null||le.metaSync({value:de},null),{value:le,valueOwner:o,type:!Gt.includes(n.type)&&re.type===Pe.Empty?Pe.QueuedAutocalculation:re.type,inheritanceLink:{sources:[re],target:o}}}return{value:null,valueOwner:o,type:Gt.includes(n.type)?Pe.Empty:Pe.QueuedAutocalculation,inheritanceLink:null}}const s=(v=p.execution)==null?void 0:v.hasEntity(n),c=((E=p.execution)==null?void 0:E.state)===pN.Running;if((b=p.persistedExecutionResults)!=null&&b.values[o.id]&&!s&&!c&&!i){const re=(w=p.persistedExecutionResults)==null?void 0:w.readValue(o.id);if((re==null?void 0:re.value)!==null||(re==null?void 0:re.valueAsType)!==null)return{value:re,valueOwner:o,type:Pe.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=zP(e,p,i);if(ee&&ee.value){const le=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[le.name],ve=It(((V=o.declaration)==null?void 0:V.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It((($=o.declaration)==null?void 0:$.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.VariableDeclaration:{const ee=av(e,p,i);if(ee&&ee.value){const le=o.declaration;if(hr(ee.value.value)){const fe=ee.value.value[le.name],ve=It(((L=o.declaration)==null?void 0:L.dataType)||null,o,p.project);return ve==null||ve.metaSync({value:fe},null),{value:ve,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:[ee],target:o}}}}const de=It(((k=o.declaration)==null?void 0:k.dataType)||null,o,p.project);return de==null||de.metaSync({value:null},null),{value:de,valueOwner:o,type:Pe.Inherited,inheritanceLink:{sources:ee?[ee]:[],target:o}}}case d.Operation:{const re=e.outputs.map(de=>{var le,fe;if((le=p.persistedExecutionResults)!=null&&le.values[de.id]){const ve=(fe=p.persistedExecutionResults)==null?void 0:fe.values[de.id];if(ve.value!==null||ve.valueAsType!==null)return{value:ve,valueOwner:de,type:Pe.ExecutionResult,inheritanceLink:null}}}).filter(de=>!!de),ee=It(((K=o.declaration)==null?void 0:K.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.FunctionCall:{const re=e.inputs.map(de=>pA(de,p,i)).filter(de=>!!de),ee=It(((S=o.declaration)==null?void 0:S.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.Loop:{const re=e.inputs.map(de=>pA(de,p,i)).filter(de=>!!de),ee=It(((Y=o.declaration)==null?void 0:Y.dataType)||null,o,p.project);return ee==null||ee.metaSync({value:null},null),{value:ee,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:re.length?{sources:re,target:o}:null}}case d.Search:return{value:null,valueOwner:o,type:Pe.QueuedAutocalculation,inheritanceLink:null}}return null}function HO(o,p,i=!1){var b,w,V;if(![...Ut,...Gt].includes(o.parent.type)||!xv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Mu(o.declaration,p);const n=sv(o,p,i);if(n&&n.type!==Pe.Empty&&n.type!==Pe.Missing)return n;const s=Wn(o.parent),c=Ao(s,p,i),e=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(se(o,p.project)),y=It(o.getDataType(null),o,p.project),m=$o(o),v=(V=c==null?void 0:c.value)==null?void 0:V.value;if(v&&hr(v)){let $=v[e];v[e]===void 0&&($=null),y==null||y.metaSync({value:$},null);const L=$o(o),k=o.getDataType(null);return L&&(!y||!Il(k)&&eu(y))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:y,valueOwner:o,type:c.type,inheritanceLink:{sources:c?[c]:[],target:o}}}return m?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.Empty,inheritanceLink:null}}function WO(o,p,i=!1){var b,w,V,$,L,k,K,S;if(![...Ut,...Gt].includes(o.parent.type)||!xv(o))return null;if(((b=o.declaration)==null?void 0:b.type)===d.Property&&o.declaration.static)return Mu(o.declaration,p,i);const n=Ut.includes(o.parent.type)?o.parent:Wn(o.parent),s=Mu(n,p,i);let c=o;n.type===d.VariableDeclaration&&(c=(o.parent===n?o:n.inputs.find(re=>{var ee,de;return((ee=re.declaration)==null?void 0:ee.id)===((de=o.declaration)==null?void 0:de.id)}))||o);const e=Km(c,p,i),y=o.codeName||((w=o.declaration)==null?void 0:w.codeName)||Hi(se(o,p.project)),m=(n.type===d.VariableDeclaration?o.getDefaultValue():o.defaultValue)||It(o.getDataType(null),o,p.project),v=(V=s==null?void 0:s.value)==null?void 0:V.value;if(((s==null?void 0:s.type)===Pe.ExecutionResult||(s==null?void 0:s.type)===Pe.Testing)&&!i&&v&&hr(v)){let Y=v[y];return v[y]===void 0&&(Y=null),m==null||m.metaSync({value:Y},null),{value:m,valueOwner:o,type:s.type,inheritanceLink:{sources:s?[s]:[],target:o}}}if(e&&e.type!==Pe.Empty&&e.type!==Pe.Missing)return e;if(v&&hr(v)){let Y=v[y];v[y]===void 0&&(Y=null),m!=null&&m.standaloneParent&&(m==null||m.metaSync({value:Y},null));const re=$o(o),ee=o.getDataType(null),de=re&&(!m||!Il(ee)&&eu(m)),le=!!(($=p.execution)!=null&&$.entities.length),fe=(L=p.execution)==null?void 0:L.hasEntity(n),ve=n.readsValue;if(ve){const ue=(k=p.execution)==null?void 0:k.hasEntity(ve);if(de&&(!le||le&&ue&&fe||le&&!ue&&!fe))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}if(o.readsValue){const ue=(K=p.execution)==null?void 0:K.hasEntity(o.readsValue);if(de&&(!le||le&&ue&&fe||le&&!ue&&!fe))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}return de?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:{value:m,valueOwner:o,type:((S=m==null?void 0:m.parent)==null?void 0:S.id)===(o==null?void 0:o.id)?s.type:Pe.Inherited,inheritanceLink:{sources:s?[s]:[],target:o}}}return Km(o,p,i)}function sv(o,p,i=!1){var V,$,L,k,K,S;const n=li(o),s=!!((V=p.execution)!=null&&V.entities.length),c=($=p.execution)==null?void 0:$.hasEntity(n),e=o.readsValue;let y=null;if(e){const Y=(L=p.execution)==null?void 0:L.hasEntity(e);(!s||s&&Y&&c||s&&!Y&&!c)&&(y=$h(o,p,i))}const m=o.getDefaultValue(),v=p.getValueTypePreference(o.id);if(!y&&m&&(i||v===null||v!==Pe.Testing)&&(y={value:m,valueOwner:o,type:un(m)?Pe.Empty:Pe.DefaultValue,inheritanceLink:null}),!y&&o.declaration){const Y=Mu(o.declaration,p,i);Y&&Y.value&&(i||v===null||v!==Pe.Testing)&&(y={...Y,valueOwner:o,type:Pe.DefaultValue})}if(!y||y.type===Pe.DefaultValue||(y==null?void 0:y.type)===Pe.Empty){const Y=(k=p.persistedExecutionResults)==null?void 0:k.readValue(o.id);if(Y&&!i)return{value:Y,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const re=(K=p.localTestValues)==null?void 0:K.readValue(o.id);if(re&&!i&&(v===null||v!==Pe.DefaultValue))return{value:re,valueOwner:o,type:Pe.Testing,inheritanceLink:null}}const E=$o(o),b=o.getDataType(null),w=E&&(!(y!=null&&y.value)||!Il(b)&&eu(y==null?void 0:y.value));if(o.readsValue){const Y=(S=p.execution)==null?void 0:S.hasEntity(o.readsValue);if(w&&(!s||s&&Y&&c||s&&!Y&&!c))return{value:null,valueOwner:o,type:Pe.Inherited,inheritanceLink:null}}return w?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:(y==null?void 0:y.inheritanceLink)||null}:!E&&(!y||y.type===Pe.Inherited)&&!(y!=null&&y.inheritanceLink)?{value:null,valueOwner:o,type:o.readsValue?Pe.Inherited:Pe.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:Pe.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!==Pe.DefaultValue)?{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null}:sv(o,p,i)}function pA(o,p,i=!1){var n,s;return Gt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||Ut.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?HO(o,p,i):sv(o,p,i)}function MOe(o,p,i=!1){var n,s;return Gt.includes(o.parent.type)&&(n=Wn(o.parent).dataType)!=null&&n.isObject()||Ut.includes(o.parent.type)&&(s=o.parent.getDataType(null))!=null&&s.isObject()?WO(o,p,i):Km(o,p,i)}function BOe(o,p,i=!1){var E,b;if(!o.static)return null;if(p.execution){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w&&!i)return{value:w,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=(b=p.localTestValues)==null?void 0:b.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Pe.DefaultValue))return{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;c&&(i||s===null||s!==Pe.Testing)&&(e={value:c,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null});const y=$o(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!Il(m)&&eu(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:un(e==null?void 0:e.value)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e}function GOe(o,p,i=!1){var E,b;if(p.execution&&p.execution.hasEntity(o)&&!i){const w=(E=p.lastExecutionResults)==null?void 0:E.readValue(o.id);if(w)return{value:w,valueOwner:o,type:Pe.ExecutionResult,inheritanceLink:null}}const n=(b=p.localTestValues)==null?void 0:b.readValue(o.id),s=p.getValueTypePreference(o.id);if(n&&!i&&(s===null||s!==Pe.DefaultValue))return{value:n,valueOwner:o,type:Pe.Testing,inheritanceLink:null};const c=o.getDefaultValue();let e=null;c&&(i||s===null||s!==Pe.Testing)&&(e={value:c,valueOwner:o,type:Pe.DefaultValue,inheritanceLink:null});const y=$o(o),m=o.getDataType(null);return y&&(!(e!=null&&e.value)||!Il(m)&&eu(e==null?void 0:e.value))?{value:null,valueOwner:o,type:Pe.Missing,inheritanceLink:null}:un((e==null?void 0:e.value)||null)?{value:null,valueOwner:o,type:Pe.Empty,inheritanceLink:null}:e}function Mu(o,p,i=!1){switch(o.type){case d.ArgumentDeclaration:return $Oe(o,p,i);case d.InputMap:return MOe(o,p,i);case d.VariableDeclaration:return WP(o,p,i);case d.VariableInstance:return xOe(o,p,i);case d.OutputMap:return LOe(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return JP(o,p,i);case d.Property:return BOe(o,p,i);case d.ValueDescriptor:return GOe(o,p,i);case d.Operation:case d.FunctionCall:case d.InternalCall:case d.Search:return POe(o,p,i);default:return null}}function Ao(o,p,i=!1){switch(o.type){case d.InputMap:return pA(o,p,i);case d.VariableDeclaration:return av(o,p,i);case d.VariableInstance:return zP(o,p,i);case d.ReturnStatement:case d.BreakStatement:case d.ContinueStatement:return JP(o,p,i);default:return null}}function mvi(o){var p;if(o&&o.type===Pe.DefaultValue&&o.value&&o.valueOwner&&(!kA.includes(o.valueOwner.type)||((p=o.valueOwner.getDefaultValue())==null?void 0:p.id)===o.value.id)){const i=It(o.valueOwner.getDataType(null),o.valueOwner,o.valueOwner.project);return{type:Pe.DefaultValue,value:i,valueOwner:o.valueOwner,inheritanceLink:null}}return o}function Rc(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,V,$,L,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let K=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);K?!s&&K&&K.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(K=It(v.getDataType(null),v,p)):s?K=Qd(v.getDataType(null),v,p,c):K=It(v.getDataType(null),v,p);const S=se(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(S);let re={};((k=(L=v.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(re={...re,...v.dataType.entity.getActiveRawDefaultValue()}),hr(K==null?void 0:K.value)&&(re={...re,...K.value}),re[Y]=i,K==null||K.metaSync({value:re},c),s||e==null||e.writeValue(v,K);return}}),c}function Fm(o,p,i,n){var V,$,L,k;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===((V=y.getDefaultValue())==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):s?v=Qd(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(L=y.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),w[b]=i,v==null||v.metaSync({value:w},c),s||e==null||e.writeValue(y,v),(i===""||i===null||i===void 0)&&o.type===d.OutputMap){const K=y.inputs.find(S=>{var Y,re;return((Y=S.declaration)==null?void 0:Y.id)===((re=o.declaration)==null?void 0:re.id)||se(S,p)===E});if(K){let S=s?K.getDefaultValue():e==null?void 0:e.readValue(K.id);S&&S.metaSync({value:null},c),s||e==null||e.removeValue(K.id)}}return c}function kOe(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),Gt.includes(o.type)){const b=Wn(o);(e=b.dataType)!=null&&e.isObject()&&b.inputs.forEach(w=>{var V,$,L,k,K,S;if(((V=w.declaration)==null?void 0:V.type)===d.Property&&w.declaration.static){let Y=n?(($=w.getDefaultValue)==null?void 0:$.call(w))||null:c==null?void 0:c.readValue(w.declaration.id);Y?!n&&Y&&Y.id===((L=w.declaration.getDefaultValue())==null?void 0:L.id)&&(Y=It(w.declaration.getDataType(null),w.declaration,p)):n?Y=Qd(w.declaration.getDataType(null),w.declaration,p,s):Y=It(w.declaration.getDataType(null),w.declaration,p),Y==null||Y.metaSync({value:null},s),n||c==null||c.removeValue((k=w.declaration)==null?void 0:k.id)}else if(((K=w.declaration)==null?void 0:K.type)===d.Property){let Y=n?((S=w.getDefaultValue)==null?void 0:S.call(w))||null:c==null?void 0:c.readValue(w.id);Y&&Y.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?Rc(o.declaration,p,null,i):Gt.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?Rc(o.declaration,p,null,i):Gt.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&&Rc(o,p,null,i);return s}function jOe(o,p,i,n){var y,m,v,E,b,w,V;let s=!1,c=null,e=null;if(n instanceof Z?(s=!0,c=n,e=null):(c=null,e=n),Gt.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 k=hr(o)?o:L;$.inputs.forEach(K=>{var S,Y,re,ee,de,le;if(((S=K.declaration)==null?void 0:S.type)===d.Property&&K.declaration.static){let fe=s?((Y=p.getDefaultValue)==null?void 0:Y.call(p))||null:e==null?void 0:e.readValue(K.declaration.id);fe?!s&&fe&&fe.id===((re=K.declaration.getDefaultValue())==null?void 0:re.id)&&(fe=It(K.declaration.getDataType(null),K.declaration,i)):s?fe=Qd(K.declaration.getDataType(null),K.declaration,i,c):fe=It(K.declaration.getDataType(null),K.declaration,i);const ve=se(K,i),ue=K.codeName||((ee=K.declaration)==null?void 0:ee.codeName)||Hi(ve),ye=k[ue];fe==null||fe.metaSync({value:ye},c),s||e==null||e.writeValue(K.declaration,fe)}else if(((de=K.declaration)==null?void 0:de.type)===d.Property){let fe=s?((le=p.getDefaultValue)==null?void 0:le.call(p))||null:e==null?void 0:e.readValue(K.id);fe&&fe.metaSync({value:null},c),s||e==null||e.removeValue(K.id)}})}}else p.type===d.InputMap?((E=p.declaration)==null?void 0:E.type)===d.Property&&p.declaration.static?Rc(p.declaration,i,o,n):Gt.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?Rc(p.declaration,i,null,n):Gt.includes(p.parent.type)&&((V=p.declaration)==null?void 0:V.type)===d.Property&&Fm(p,i,null,n):p.type===d.Property&&p.static&&Rc(p,i,o,n);return c}function Tvi(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;let m=s?((v=y.getDefaultValue)==null?void 0:v.call(y))||null:e==null?void 0:e.readValue(y.id);s?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),kOe(y,p,i)}),c}function vvi(o,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,V;if(i.diggestedBuiltInBaseEntitiesIds.has(m.id))return;let v=null;if(c){const $=((E=m.getDefaultValue)==null?void 0:E.call(m))||null;$&&(i.diggestedBuiltInBaseEntitiesIds.has($.id)||((b=$.parent)==null?void 0:b.id)!==m.id?v=$.clone(e,m):v=$)}else v=y==null?void 0:y.readValue(m.id);v?!c&&v&&v.id===((V=(w=m.getDefaultValue)==null?void 0:w.call(m))==null?void 0:V.id)&&(v=It(m.getDataType(null),m,i)):c?(v=Qd(m.getDataType(null),m,i,e),e==null||e.add(v,H.Added)):v=It(m.getDataType(null),m,i),v==null||v.setValueAsType(null,e),v==null||v.metaSync({value:o},e),c||y==null||y.writeValue(m,v),jOe(o,m,i,n)}),e}function Dc(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,V,$,L,k;const E=v.getDataType(null);if(((b=E==null?void 0:E.entity)==null?void 0:b.id)===y.id){let K=s?v.getDefaultValue():e==null?void 0:e.readValue(v.id);K?!s&&K&&K.id===((w=v.getDefaultValue())==null?void 0:w.id)&&(K=It(v.getDataType(null),v,p)):s?K=Qd(v.getDataType(null),v,p,c):K=It(v.getDataType(null),v,p);const S=se(o,p),Y=o.codeName||((V=o.extends)==null?void 0:V.codeName)||(($=o.implements[0])==null?void 0:$.codeName)||Hi(S);let re={};((k=(L=v.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(re={...re,...v.dataType.entity.getActiveRawDefaultValue()}),hr(K==null?void 0:K.value)&&(re={...re,...K.value}),Array.isArray(i)?re[Y]=(i==null?void 0:i.map(ee=>ee.toShallowJSON()))||null:re[Y]=(i==null?void 0:i.toShallowJSON())||null,K==null||K.metaSync({value:re},c),s||e==null||e.writeValue(v,K);return}}),c}function Sm(o,p,i,n){var V,$,L,k;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===((V=y.getDefaultValue())==null?void 0:V.id)&&(v=It(y.getDataType(null),y,p)):s?v=Qd(y.getDataType(null),y,p,c):v=It(y.getDataType(null),y,p);const E=se(o,p),b=o.codeName||(($=o.declaration)==null?void 0:$.codeName)||Hi(E);let w={};if(((k=(L=y.dataType)==null?void 0:L.entity)==null?void 0:k.type)===d.DefinitionEntity&&(w={...w,...y.dataType.entity.getActiveRawDefaultValue()}),hr(v==null?void 0:v.value)&&(w={...w,...v.value}),Array.isArray(i)?w[b]=(i==null?void 0:i.map(K=>K.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 K=y.inputs.find(S=>{var Y,re;return((Y=S.declaration)==null?void 0:Y.id)===((re=o.declaration)==null?void 0:re.id)||se(S,p)===E});if(K){let S=s?K.getDefaultValue():e==null?void 0:e.readValue(K.id);S&&(Array.isArray(i)?S==null||S.setValueAsTypeList(i,c):S==null||S.setValueAsTypeSingle(i,c)),s||e==null||e.removeValue(K.id)}}return c}function UOe(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?Dc(o.declaration,p,null,i):Gt.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?Dc(o.declaration,p,null,i):Gt.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&&Dc(o,p,null,i),i}function KOe(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?Dc(p.declaration,i,o,n):Gt.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?Dc(p.declaration,i,null,n):Gt.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&&Dc(p,i,o,n),n}function Evi(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;let m=s?(v=y.getDefaultValue)==null?void 0:v.call(y):e==null?void 0:e.readValue(y.id);s?m==null||m.remove({ignoreUpstream:!1},c):e==null||e.removeValue(y.id),UOe(y,p,i)}),c}function bvi(o,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=It(m.getDataType(null),m,m.project)):c?v=Qd(m.getDataType(null),m,i,e):v=It(m.getDataType(null),m,i),Array.isArray(o)?v==null||v.setValueAsTypeList(o,e):v==null||v.setValueAsTypeSingle(o,e),v==null||v.metaSync({value:null},e),c||y==null||y.writeValue(m,v),KOe(o,m,i,n)}),e}class SI{constructor(p,i){this.extensionsRegistry=p,this.contextType=i,this.off=this.extensionsRegistry.off.bind(this.extensionsRegistry),this.on=this.extensionsRegistry.on.bind(this.extensionsRegistry),this.emit=this.extensionsRegistry.emit.bind(this.extensionsRegistry),this.emitAsync=this.extensionsRegistry.emitAsync.bind(this.extensionsRegistry),this.emitAsyncAll=this.extensionsRegistry.emitAsyncAll.bind(this.extensionsRegistry),this.emitAsyncAllSettled=this.extensionsRegistry.emitAsyncAllSettled.bind(this.extensionsRegistry),this.emitAsyncSequentially=this.extensionsRegistry.emitAsyncSequentially.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAll=this.extensionsRegistry.emitAsyncSequentiallyAll.bind(this.extensionsRegistry),this.emitAsyncSequentiallyAllSettled=this.extensionsRegistry.emitAsyncSequentiallyAllSettled.bind(this.extensionsRegistry)}on(p,i){this.extensionsRegistry.on(p,i)}emit(p,...i){this.extensionsRegistry.emit(p,...i)}off(p,i){this.extensionsRegistry.off(p,i)}emitAsync(p,...i){return this.extensionsRegistry.emitAsync(p,...i)}emitAsyncAll(p,...i){return this.extensionsRegistry.emitAsyncAll(p,...i)}emitAsyncAllSettled(p,...i){return this.extensionsRegistry.emitAsyncAllSettled(p,...i)}emitAsyncSequentially(p,...i){return this.extensionsRegistry.emitAsyncSequentially(p,...i)}emitAsyncSequentiallyAll(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAll(p,...i)}emitAsyncSequentiallyAllSettled(p,...i){return this.extensionsRegistry.emitAsyncSequentiallyAllSettled(p,...i)}}var Ee=(o=>(o[o.High=1]="High",o[o.Normal=5]="Normal",o[o.Low=10]="Low",o))(Ee||{}),X=(o=>(o.Logic="logic",o.EditorGUI="editor-gui",o.GUI="gui",o.Editor="editor",o.Compile="compile",o.PublicationRun="publication-run",o))(X||{}),be=(o=>(o.All="*",o.OnAll="on:*",o.EmitAll="emit:*",o.ReadAll="read:*",o.WriteAll="write:*",o.UpdateAll="update:*",o.DoAll="do:*",o.OnLogicAll="on:logic:*",o.EmitLogicAll="emit:logic:*",o.ReadLogicAll="read:logic:*",o.WriteLogicAll="write:logic:*",o.UpdateLogicAll="update:logic:*",o.DoLogicAll="do:logic:*",o.OnGUIAll="on:gui:*",o.EmitGUIAll="emit:gui:*",o.ReadGUIAll="read:gui:*",o.WriteGUIAll="write:gui:*",o.UpdateGUIAll="update:gui:*",o.DoGUIAll="do:gui:*",o.OnEditorAll="on:editor:*",o.EmitEditorAll="emit:editor:*",o.ReadEditorAll="read:editor:*",o.WriteEditorAll="write:editor:*",o.UpdateEditorAll="update:editor:*",o.DoEditorAll="do:editor:*",o.OnCompileBefore="on:compile:before:DefinitionEntity",o.OnCompileDefault="on:compile:default:DefinitionEntity",o.OnCompileAfter="on:compile:after:DefinitionEntity",o.EmitCompile="emit:compile:DefinitionEntity",o.DoEditorPublish="do:editor:publish",o.PostGUICanvasSlotNewToolbarButton="write:gui:canvas:slot:toolbar-button",o.ReadGUICanvasSlotToolbarButtons="read:gui:canvas:slot:toolbar-buttons",o.UpdateGUIGlobalTheme="update:gui:global:theme",o))(be||{});class FOe{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 SOe extends FOe{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 SOe(this,i)}}class zO extends SI{constructor(i,n){super(i,X.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 Avi(o,p){return p instanceof zO?p:new zO(o,p)}const uy="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:uy+br.AbortExecution,BUILT_IN_FUNCTION_IMPLEMENTATIONS__CREATE_PERSISTED_ENTITY:uy+br.CreatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY:uy+br.UpdatePersistedEntity,BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY:uy+br.DeletePersistedEntity,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY:Oe+xt.Empty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY:Oe+xt.NotEmpty,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL:Oe+xt.PrimitiveEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL:Oe+xt.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+Ki.Sequential,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL:Oe+Ki.Parallel,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT:Oe+Ki.Wait,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN:Oe+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+q.GetLength,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE:Oe+q.ToLowerCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE:Oe+q.ToUpperCase,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN:Oe+q.Join,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS:Oe+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+q.SplitAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS:Oe+q.SplitAtAllSeparators,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR:Oe+q.SplitAtFirstSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR:Oe+q.SplitAtLastSeparator,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS:Oe+q.DeleteLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS:Oe+q.DeleteFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX:Oe+q.DeleteAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX:Oe+q.AddAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS:Oe+q.ReplaceFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS:Oe+q.ReplaceLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX:Oe+q.ReplaceAtIndex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH:Oe+q.ReplaceFirstMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH:Oe+q.ReplaceLastMatch,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES:Oe+q.ReplaceAllMatches,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM:Oe+q.GetIndexItem,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS:Oe+q.GetFirstNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS:Oe+q.GetLastNChars,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF:Oe+q.GetIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND:Oe+q.Append,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND:Oe+q.Prepend,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE:Oe+q.Reverse,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM:Oe+q.Trim,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START:Oe+q.TrimStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END:Oe+q.TrimEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING:Oe+q.Substring,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE:Oe+q.Slice,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START:Oe+q.PadStart,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END:Oe+q.PadEnd,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT:Oe+q.Repeat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF:Oe+q.GetLastIndexOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX:Oe+q.MatchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX:Oe+q.MatchAllRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX:Oe+q.SearchRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX:Oe+q.ReplaceRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE:Oe+q.NormalizeUnicode,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS:Oe+q.RemoveDiacritics,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES:Oe+q.CountOccurrences,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX:Oe+q.EnsurePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX:Oe+q.EnsureSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX:Oe+q.RemovePrefix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX:Oe+q.RemoveSuffix,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION:Oe+te.Addition,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION:Oe+te.Subtraction,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION:Oe+te.Multiplication,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION:Oe+te.Division,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER:Oe+te.Remainder,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION:Oe+te.Exponentiation,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE:Oe+te.Absolute,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN:Oe+te.Sign,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND:Oe+te.Round,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE:Oe+te.Negate,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_FLOOR:Oe+te.Floor,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CEIL:Oe+te.Ceil,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CLAMP:Oe+te.Clamp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TRUNC:Oe+te.Trunc,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND_TO_DECIMALS:Oe+te.RoundToDecimals,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SNAP_TO_STEP:Oe+te.SnapToStep,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAP_RANGE:Oe+te.MapRange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_AVERAGE:Oe+te.Average,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MEDIAN:Oe+te.Median,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MIN_OF:Oe+te.MinOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF:Oe+te.MaxOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT:Oe+te.SquareRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_CUBE_ROOT:Oe+te.CubeRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NTH_ROOT:Oe+te.NthRoot,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXP:Oe+te.Exp,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG_NATURAL:Oe+te.LogNatural,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LOG10:Oe+te.Log10,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN:Oe+te.Sin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_COS:Oe+te.Cos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TAN:Oe+te.Tan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ASIN:Oe+te.Asin,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ACOS:Oe+te.Acos,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN:Oe+te.Atan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ATAN2:Oe+te.Atan2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS:Oe+te.ToRadians,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_DEGREES:Oe+te.ToDegrees,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENT_OF:Oe+te.PercentOf,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE:Oe+te.PercentageChange,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN:Oe+te.MoreThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN:Oe+te.LessThan,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_LESS_THAN_OR_EQUAL:Oe+te.LessThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MORE_THAN_OR_EQUAL:Oe+te.MoreThanOrEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER:Oe+et.GenerateRandomInteger,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT:Oe+et.GenerateRandomFloat,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL:Oe+et.GenerateRandomHexadecimal,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62:Oe+et.GenerateRandomBase62,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64:Oe+et.GenerateRandomBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC:Oe+et.GenerateRandomAlphanumeric,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER:Oe+et.GenerateIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4:Oe+et.GenerateRandomUUIDv4,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER:Oe+et.GenerateShortIdentifier,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN:Oe+et.GenerateHexadecimalToken,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH:Oe+q.StartsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH:Oe+q.EndsWith,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS:Oe+q.Contains,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX:Oe+q.MatchesRegex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_CURRENT_TIMESTAMP:Oe+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+si.Hash,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_HMAC:Oe+si.Hmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_GENERATE_RANDOM_BYTES:Oe+et.GenerateRandomBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_CONSTANT_TIME_EQUAL:Oe+si.ConstantTimeEqual,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CRYPTO_DERIVE_KEY_PBKDF2:Oe+si.DeriveKeyPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_HASH_PBKDF2:Oe+Qr.HashPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__PASSWORD_VERIFY_PBKDF2:Oe+Qr.VerifyPasswordPBKDF2,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_BUILD_HMAC:Oe+er.BuildJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_VERIFY_HMAC:Oe+er.VerifyJwtHmac,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__JWT_DECODE:Oe+er.DecodeJwt,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_FROM_BYTES_TO_STRING:Oe+ze.FromBytesToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_BYTES:Oe+ze.ToBytes,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_NUMBER:Oe+ze.ToNumber,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_TO_STRING:Oe+ze.ToString,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64:Oe+ze.EncodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64:Oe+ze.DecodeBase64,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_BASE64URL:Oe+ze.EncodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_BASE64URL:Oe+ze.DecodeBase64Url,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_ENCODE_HEX:Oe+ze.EncodeHex,BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATA_TYPE_DECODE_HEX:Oe+ze.DecodeHex,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_PARSE:Oe+Xr.Parse,BUILT_IN_OPERATIONS_IMPLEMENTATIONS__JSON_STRINGIFY:Oe+Xr.Stringify};class qOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION,version:"1.0.0",description:'Implementation for the built-in function "Abort Execution". It terminates the execution of the current entity being run.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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__DELETE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Delete Persisted Entity". It deletes the current entity as an entry in the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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__CREATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Create Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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.BUILT_IN_FUNCTION_IMPLEMENTATIONS__UPDATE_PERSISTED_ENTITY,version:"1.0.0",description:'Implementation for the built-in function "Update Persisted Entity". It saves the current entity state to the persisted storage.',initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,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.SEARCH_NODE_IMPLEMENTATION,version:"1.0.0",description:"Implementation for search nodes when they get executed and query data.",initPriority:Ee.High,permissions:[be.All],contexts:[X.Editor]});I(this,"module",{main:async(i,n)=>({error:"Search module not implemented",data:null})})}}class JOe 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",bC)}}const YOe=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 XOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_EMPTY,version:"1.0.0",description:"Comparison: Empty (!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.Empty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=YOe(n),c=!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}class QOe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_NOT_EMPTY,version:"1.0.0",description:"Comparison: NotEmpty (!!value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.NotEmpty);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s]=YOe(n),c=!!s;return{value:G.Success,error:null,result:c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}const $A=class $A extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveEqual (typed equality / deep JSON equality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.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 V=!1;return E&&$A.primitiveSet.has(E)?V=b===w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)===JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I($A,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let cA=$A;const LA=class LA extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__COMPARISON_PRIMITIVE_NOT_EQUAL,version:"1.0.0",description:"Comparison: PrimitiveNotEqual (typed inequality / deep JSON inequality)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic);if(!n)return;const s=n.get(xt.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 V=!1;return E&&LA.primitiveSet.has(E)?V=b!==w:E===oe.Untyped||E===oe.KeyValue?V=JSON.stringify(b)!==JSON.stringify(w):V=!1,{value:G.Success,error:null,result:V}}catch(E){return{value:G.UnhandledError,error:E,result:null}}}})}};I(LA,"primitiveSet",new Set([oe.String,oe.Number,oe.Boolean,oe.Null,oe.Enum,oe.Date,oe.UUID]));let fA=LA;var eCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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 k={date:L,utc:!0,args:arguments};return new e(k)},m.utc=function(L){var k=y(this.toDate(),{locale:this.$L,utc:!0});return L?k.add(this.utcOffset(),i):k},m.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var v=m.parse;m.parse=function(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,k){var K=this.$utils().u;if(K(L))return this.$u?0:K(this.$offset)?b.call(this):this.$offset;if(typeof L=="string"&&(L=function(ee){ee===void 0&&(ee="");var de=ee.match(n);if(!de)return null;var le=(""+de[0]).match(s)||["-",0,0],fe=le[0],ve=60*+le[1]+ +le[2];return ve===0?0:fe==="+"?ve:-ve}(L),L===null))return this;var S=Math.abs(L)<=16?60*L:L;if(S===0)return this.utc(k);var Y=this.clone();if(k)return Y.$offset=S,Y.$u=!1,Y;var re=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(S+re,i)).$offset=S,Y.$x.$localOffset=re,Y};var w=m.format;m.format=function(L){var k=L||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return w.call(this,k)},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 V=m.toDate;m.toDate=function(L){return L==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():V.call(this)};var $=m.diff;m.diff=function(L,k,K){if(L&&this.$u===L.$u)return $.call(this,L,k,K);var S=this.local(),Y=y(L).local();return $.call(S,Y,k,K)}}})})(eCe);var gvi=eCe.exports;const Ivi=Wa(gvi);var tCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V,$){$===void 0&&($={});var L=new Date(w),k=function(K,S){S===void 0&&(S={});var Y=S.timeZoneName||"short",re=K+"|"+Y,ee=n[re];return ee||(ee=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:K,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),n[re]=ee),ee}(V,$);return k.formatToParts(L)},v=function(w,V){for(var $=m(w,V),L=[],k=0;k<$.length;k+=1){var K=$[k],S=K.type,Y=K.value,re=i[S];re>=0&&(L[re]=parseInt(Y,10))}var ee=L[3],de=ee===24?0:ee,le=L[0]+"-"+L[1]+"-"+L[2]+" "+de+":"+L[4]+":"+L[5]+":000",fe=+w;return(e.utc(le).valueOf()-(fe-=fe%1e3))/6e4},E=c.prototype;E.tz=function(w,V){w===void 0&&(w=y);var $,L=this.utcOffset(),k=this.toDate(),K=k.toLocaleString("en-US",{timeZone:w}),S=Math.round((k-new Date(K))/1e3/60),Y=15*-Math.round(k.getTimezoneOffset()/15)-S;if(!Number(Y))$=this.utcOffset(0,V);else if($=e(K,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),V){var re=$.utcOffset();$=$.add(L-re,"minute")}return $.$x.$timezone=w,$},E.offsetName=function(w){var V=this.$x.$timezone||e.tz.guess(),$=m(this.valueOf(),V,{timeZoneName:w}).find(function(L){return L.type.toLowerCase()==="timezonename"});return $&&$.value};var b=E.startOf;E.startOf=function(w,V){if(!this.$x||!this.$x.$timezone)return b.call(this,w,V);var $=e(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return b.call($,w,V).tz(this.$x.$timezone,!0)},e.tz=function(w,V,$){var L=$&&V,k=$||V||y,K=v(+e(),k);if(typeof w!="string")return e(w).tz(k);var S=function(de,le,fe){var ve=de-60*le*1e3,ue=v(ve,fe);if(le===ue)return[ve,le];var ye=v(ve-=60*(ue-le)*1e3,fe);return ue===ye?[ve,ue]:[de-60*Math.min(ue,ye)*1e3,Math.max(ue,ye)]}(e.utc(w,L).valueOf(),K,k),Y=S[0],re=S[1],ee=e(Y).utcOffset(re);return ee.$x.$timezone=k,ee},e.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},e.tz.setDefault=function(w){y=w}}})})(tCe);var Rvi=tCe.exports;const Dvi=Wa(Rvi);var iCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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))}}})})(iCe);var wvi=iCe.exports;const Ovi=Wa(wvi);var rCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isSameOrAfter=function(s,c){return this.isSame(s,c)||this.isAfter(s,c)}}})})(rCe);var Cvi=rCe.exports;const _vi=Wa(Cvi);var nCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isSameOrBefore=function(s,c){return this.isSame(s,c)||this.isBefore(s,c)}}})})(nCe);var Vvi=nCe.exports;const Pvi=Wa(Vvi);var aCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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"),V=this.diff(w,i,!0);return V<0?e(this).startOf("week").week():Math.ceil(V)},y.weeks=function(m){return m===void 0&&(m=null),this.week(m)}}})})(aCe);var Nvi=aCe.exports;const xvi=Wa(Nvi);var sCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V,$=e(this),L=(E=this.isoWeekYear(),b=this.$u,w=(b?c.utc:c)().year(E).startOf("year"),V=4-w.isoWeekday(),w.isoWeekday()>4&&(V+=7),w.add(V,i));return $.diff(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)}}})})(sCe);var $vi=sCe.exports;const Lvi=Wa($vi);var lCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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 V=this.quarter()-1;return w?this.month(3*V).startOf(i).startOf("day"):this.month(3*V+2).endOf(i).endOf("day")}return m.bind(this)(v,E)}}})})(lCe);var Mvi=lCe.exports;const Bvi=Wa(Mvi);var oCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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")}}})})(oCe);var Gvi=oCe.exports;const kvi=Wa(Gvi);var dCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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,V){for(var $,L,k,K=b.$locale().relativeTime||e,S=i.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=S.length,re=0;re<Y;re+=1){var ee=S[re];ee.d&&($=w?s(v).diff(b,ee.d,!0):b.diff(v,ee.d,!0));var de=(i.rounding||Math.round)(Math.abs($));if(k=$>0,de<=ee.r||!ee.r){de<=1&&re>0&&(ee=S[re-1]);var le=K[ee.l];V&&(de=V(""+de)),L=typeof le=="string"?le.replace("%d",de):le(de,E,ee.l,k);break}}if(E)return L;var fe=k?K.future:K.past;return typeof fe=="function"?fe(L):fe.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)}}})})(dCe);var jvi=dCe.exports;const Uvi=Wa(jvi);var uCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,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},V=function(de){return de instanceof re},$=function(de,le,fe){return new re(de,fe,le.$l)},L=function(de){return n.p(de)+"s"},k=function(de){return de<0},K=function(de){return k(de)?Math.ceil(de):Math.floor(de)},S=function(de){return Math.abs(de)},Y=function(de,le){return de?k(de)?{negative:!0,format:""+S(de)+le}:{negative:!1,format:""+de+le}:{negative:!1,format:""}},re=function(){function de(fe,ve,ue){var ye=this;if(this.$d={},this.$l=ue,fe===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ve)return $(fe*w[L(ve)],this);if(typeof fe=="number")return this.$ms=fe,this.parseFromMilliseconds(),this;if(typeof fe=="object")return Object.keys(fe).forEach(function($e){ye.$d[L($e)]=fe[$e]}),this.calMilliseconds(),this;if(typeof fe=="string"){var Ve=fe.match(b);if(Ve){var _e=Ve.slice(2).map(function($e){return $e!=null?Number($e):0});return this.$d.years=_e[0],this.$d.months=_e[1],this.$d.weeks=_e[2],this.$d.days=_e[3],this.$d.hours=_e[4],this.$d.minutes=_e[5],this.$d.seconds=_e[6],this.calMilliseconds(),this}}return this}var le=de.prototype;return le.calMilliseconds=function(){var fe=this;this.$ms=Object.keys(this.$d).reduce(function(ve,ue){return ve+(fe.$d[ue]||0)*w[ue]},0)},le.parseFromMilliseconds=function(){var fe=this.$ms;this.$d.years=K(fe/v),fe%=v,this.$d.months=K(fe/E),fe%=E,this.$d.days=K(fe/y),fe%=y,this.$d.hours=K(fe/e),fe%=e,this.$d.minutes=K(fe/c),fe%=c,this.$d.seconds=K(fe/s),fe%=s,this.$d.milliseconds=fe},le.toISOString=function(){var fe=Y(this.$d.years,"Y"),ve=Y(this.$d.months,"M"),ue=+this.$d.days||0;this.$d.weeks&&(ue+=7*this.$d.weeks);var ye=Y(ue,"D"),Ve=Y(this.$d.hours,"H"),_e=Y(this.$d.minutes,"M"),$e=this.$d.seconds||0;this.$d.milliseconds&&($e+=this.$d.milliseconds/1e3,$e=Math.round(1e3*$e)/1e3);var Ne=Y($e,"S"),Be=fe.negative||ve.negative||ye.negative||Ve.negative||_e.negative||Ne.negative,Se=Ve.format||_e.format||Ne.format?"T":"",je=(Be?"-":"")+"P"+fe.format+ve.format+ye.format+Se+Ve.format+_e.format+Ne.format;return je==="P"||je==="-P"?"P0D":je},le.toJSON=function(){return this.toISOString()},le.format=function(fe){var ve=fe||"YYYY-MM-DDTHH:mm:ss",ue={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 ve.replace(m,function(ye,Ve){return Ve||String(ue[ye])})},le.as=function(fe){return this.$ms/w[L(fe)]},le.get=function(fe){var ve=this.$ms,ue=L(fe);return ue==="milliseconds"?ve%=1e3:ve=ue==="weeks"?K(ve/w[ue]):this.$d[ue],ve||0},le.add=function(fe,ve,ue){var ye;return ye=ve?fe*w[L(ve)]:V(fe)?fe.$ms:$(fe,this).$ms,$(this.$ms+ye*(ue?-1:1),this)},le.subtract=function(fe,ve){return this.add(fe,ve,!0)},le.locale=function(fe){var ve=this.clone();return ve.$l=fe,ve},le.clone=function(){return $(this.$ms,this)},le.humanize=function(fe){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!fe)},le.valueOf=function(){return this.asMilliseconds()},le.milliseconds=function(){return this.get("milliseconds")},le.asMilliseconds=function(){return this.as("milliseconds")},le.seconds=function(){return this.get("seconds")},le.asSeconds=function(){return this.as("seconds")},le.minutes=function(){return this.get("minutes")},le.asMinutes=function(){return this.as("minutes")},le.hours=function(){return this.get("hours")},le.asHours=function(){return this.as("hours")},le.days=function(){return this.get("days")},le.asDays=function(){return this.as("days")},le.weeks=function(){return this.get("weeks")},le.asWeeks=function(){return this.as("weeks")},le.months=function(){return this.get("months")},le.asMonths=function(){return this.as("months")},le.years=function(){return this.get("years")},le.asYears=function(){return this.as("years")},de}(),ee=function(de,le,fe){return de.add(le.years()*fe,"y").add(le.months()*fe,"M").add(le.days()*fe,"d").add(le.hours()*fe,"h").add(le.minutes()*fe,"m").add(le.seconds()*fe,"s").add(le.milliseconds()*fe,"ms")};return function(de,le,fe){i=fe,n=fe().$utils(),fe.duration=function(ye,Ve){var _e=fe.locale();return $(ye,{$l:_e},Ve)},fe.isDuration=V;var ve=le.prototype.add,ue=le.prototype.subtract;le.prototype.add=function(ye,Ve){return V(ye)?ee(this,ye,1):ve.bind(this)(ye,Ve)},le.prototype.subtract=function(ye,Ve){return V(ye)?ee(this,ye,-1):ue.bind(this)(ye,Ve)}}})})(uCe);var Kvi=uCe.exports;const Fvi=Wa(Kvi);var pCe={exports:{}};(function(o,p){(function(i,n){o.exports=n()})(Nr,function(){return function(i,n){n.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})})(pCe);var Svi=pCe.exports;const qvi=Wa(Svi);M.extend(Ivi);M.extend(Dvi);M.extend(Ovi);M.extend(_vi);M.extend(Pvi);M.extend(xvi);M.extend(Lvi);M.extend(Bvi);M.extend(kvi);M.extend(Uvi);M.extend(Fvi);M.extend(qvi);const At=o=>M(o),ir=o=>o.toISOString();function cCe(){return ir(M())}function fCe(o,p){return At(o).format(p)}function yCe(o){return ir(M(o))}function hCe(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 mCe(o,p,i){return ir(At(o).add(p,i))}function TCe(o,p,i){return ir(At(o).subtract(p,i))}function vCe(o,p,i,n=!1){return At(o).diff(At(p),i,n)}function ECe(o){return At(o).unix()}function bCe(o){return ir(M.unix(o))}function ACe(o){return ir(At(o))}function gCe(o){return At(o).year()}function ICe(o){return At(o).month()}function RCe(o){return At(o).date()}function DCe(o){return At(o).hour()}function wCe(o){return At(o).minute()}function OCe(o){return At(o).second()}function CCe(o){return At(o).millisecond()}function _Ce(o){return At(o).isoWeekday()}function VCe(o){return At(o).week()}function PCe(o){return At(o).quarter()}function NCe(o){return At(o).dayOfYear()}function xCe(o){return At(o).daysInMonth()}function $Ce(o,p){return ir(At(o).year(p))}function LCe(o,p){return ir(At(o).month(p))}function MCe(o,p){return ir(At(o).date(p))}function BCe(o,p){return ir(At(o).hour(p))}function GCe(o,p){return ir(At(o).minute(p))}function kCe(o,p){return ir(At(o).second(p))}function jCe(o,p){return ir(At(o).millisecond(p))}function UCe(o,p){return ir(At(o).isoWeekday(p))}function KCe(o,p){return ir(At(o).quarter(p))}function FCe(o,p){return ir(At(o).startOf(p))}function SCe(o,p){return ir(At(o).endOf(p))}function qCe(o,p){const i=At(o),n=i.startOf(p),s=i.endOf(p),c=n.valueOf()+(s.valueOf()-n.valueOf())/2;return ir(i.valueOf()<c?n:s)}function ZCe(o,p,i){return At(o).isBefore(At(p),i)}function HCe(o,p,i){return At(o).isAfter(At(p),i)}function WCe(o,p,i){return At(o).isSame(At(p),i)}function zCe(o,p,i){return At(o).isSameOrBefore(At(p),i)}function JCe(o,p,i){return At(o).isSameOrAfter(At(p),i)}function YCe(o,p,i,n,s="()"){return At(o).isBetween(At(p),At(i),n,s)}function XCe(o){return M(o).isValid()}function QCe(o){return At(o).isLeapYear()}function e_e(o,p,i){const n=At(o);return n.isBefore(p)?ir(At(p)):n.isAfter(i)?ir(At(i)):ir(n)}function t_e(o){if(o.length===0)throw new Error("minOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const n=At(o[i]);n.isBefore(p)&&(p=n)}return ir(p)}function i_e(o){if(o.length===0)throw new Error("maxOf requires at least one date");let p=At(o[0]);for(let i=1;i<o.length;i++){const n=At(o[i]);n.isAfter(p)&&(p=n)}return ir(p)}function r_e(o,p=!1){return At(o).fromNow(p)}function n_e(o,p=!1){return At(o).toNow(p)}function a_e(o,p,i=!0){const n=At(o).diff(At(p),"millisecond",!0),s=Math.abs(n),e=M.duration(s,"milliseconds").humanize();return i?n>=0?`in ${e}`:`${e} ago`:e}function s_e(o,p,i=["6","7"],n=[]){const s=v=>n.some(E=>At(E).isSame(v,"day")),c=v=>((v.day()+6)%7+1).toString();let e=At(o);const y=p>=0?1:-1;let m=Math.abs(p);for(;m>0;){e=e.add(y,"day");const v=c(e);!i.includes(v)&&!s(e)&&m--}return ir(e)}function l_e(o,p){let i=At(o);const n=p;for(let s=0;s<7;s++)if(i=i.add(1,"day"),i.isoWeekday()===n)return ir(i);return ir(i)}function o_e(o,p){let i=At(o);const n=p;for(let s=0;s<7;s++)if(i=i.subtract(1,"day"),i.isoWeekday()===n)return ir(i);return ir(i)}const d_e="Local";function YP(){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 XP(){const o=YP();if(o)return o;throw new Error("Unable to detect current IANA timezone from host environment.")}function u_e(o,p,i=!1){let n=p;if(n===d_e){const e=YP();if(!e)throw new Error("Unable to detect current timezone from host environment.");n=e}const s=n?M.tz(o,n):At(o),c=i?s.utc(!0):s.utc();return ir(c)}function p_e(o,p,i=!1){const n=At(o);return ir(i?n.tz(p,!0):n.tz(p))}function c_e(o,p){const i=o===d_e?XP():o;return At(p).tz(i).utcOffset()}function f_e(o,p,i=!1){return ir(At(o).utcOffset(p,i))}class y_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=cCe();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 h_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 m_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=yCe(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 T_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SUBTRACT_FROM_DATE,version:"1.0.0",description:"Date subtract-from-date operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=TCe(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 E_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=vCe(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 Zvi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_DATE,version:"1.0.0",description:"Date to-date operation implementation module (coerce to ISO 8601 string)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=hCe(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 b_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_FROM_UNIX,version:"1.0.0",description:"Date from-unix operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_TO_ISO_STRING,version:"1.0.0",description:"Date to-iso-string operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=ACe(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 I_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MONTH,version:"1.0.0",description:"Date get-month (0-based) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DATE,version:"1.0.0",description:"Date get-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_HOUR,version:"1.0.0",description:"Date get-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MINUTE,version:"1.0.0",description:"Date get-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SECOND,version:"1.0.0",description:"Date get-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MILLISECOND,version:"1.0.0",description:"Date get-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 V_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=_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 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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 N_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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 x_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DAYS_IN_MONTH,version:"1.0.0",description:"Date get-days-in-month operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 L_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=XP();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 M_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=$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_MONTH,version:"1.0.0",description:"Date set-month operation implementation module (0-based month)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_DATE,version:"1.0.0",description:"Date set-date (day of month) operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_HOUR,version:"1.0.0",description:"Date set-hour operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MINUTE,version:"1.0.0",description:"Date set-minute operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SECOND,version:"1.0.0",description:"Date set-second operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_MILLISECOND,version:"1.0.0",description:"Date set-millisecond operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_ISO_WEEKDAY,version:"1.0.0",description:"Date set-iso-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SET_QUARTER,version:"1.0.0",description:"Date set-quarter operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_START_OF,version:"1.0.0",description:"Date start-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_END_OF,version:"1.0.0",description:"Date end-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_ROUND_TO,version:"1.0.0",description:"Date round-to operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=qCe(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 W_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_AFTER,version:"1.0.0",description:"Date is-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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,version:"1.0.0",description:"Date is-same operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_BEFORE,version:"1.0.0",description:"Date is-same-or-before operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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_SAME_OR_AFTER,version:"1.0.0",description:"Date is-same-or-after operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=JCe(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 Q_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:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)}),c=s[0],e=s[1],y=s[2],m=s[3],v=s[4],E=YCe(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 eVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_VALID,version:"1.0.0",description:"Date is-valid operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 tVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_IS_LEAP_YEAR,version:"1.0.0",description:"Date is-leap-year operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=QCe(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__DATE_CLAMP_TO_RANGE,version:"1.0.0",description:"Date clamp-to-range operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=e_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 rVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MIN_OF,version:"1.0.0",description:"Date min-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 nVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_MAX_OF,version:"1.0.0",description:"Date max-of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=i_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 aVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_FROM_NOW,version:"1.0.0",description:"Date from-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 sVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_NOW,version:"1.0.0",description:"Date to-now operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=n_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 lVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_HUMANIZE_DIFF,version:"1.0.0",description:"Date humanize-diff operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=a_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 oVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_ADD_BUSINESS_DAYS,version:"1.1.0",description:"Date add-business-days operation implementation module (ISO-weekend strings)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=s_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 dVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_NEXT_WEEKDAY,version:"1.0.0",description:"Date next-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=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 uVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_PREVIOUS_WEEKDAY,version:"1.0.0",description:"Date previous-weekday operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=o_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 pVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_TO_UTC,version:"1.1.0",description:"Date to-utc operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=u_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 cVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_CONVERT_TIMEZONE,version:"1.0.0",description:"Date convert-timezone operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=p_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 fVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_GET_TIMEZONE_OFFSET,version:"1.0.0",description:"Date get-timezone-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=c_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 yVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__DATE_SET_UTC_OFFSET,version:"1.0.0",description:"Date set-utc-offset operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=f_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 hVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL,version:"1.0.0",description:"Execution parallel operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.Parallel);s&&(s.implementation=this.module.main)}},main:async(i,n)=>{try{const c=n.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)||((V=b.value)==null?void 0:V.value)})[0];if(!c)return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"No list of action entities provided",result:null};if(!Array.isArray(c))return{value:i.catchesError||i.errorCalls.length?G.CaughtError:G.UnhandledError,error:"Invalid input value. Expected a list of action entities",result:null};const y=this.extensionsRegistry.requestContexts(this,[X.Editor])[0],v=c.map(b=>{const w=new Iu(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 mVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL,version:"1.0.0",description:"Execution sequential operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.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,[X.Editor])[0],b=new Iu(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 TVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT,version:"1.0.0",description:"Execution wait operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(Ki.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 Hvi=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/,QP=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 eN(o){return Array.isArray(o)?o:[]}function os(o){return Number(o)}function vVe(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 EVe(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 bVe(o,p){const i=Yl(o),n=os(p);return[i.slice(0,n),i.slice(n)]}function AVe(o){return Yl(o).slice().reverse()}function gVe(o){return Yl(o).slice(0,-1)}function IVe(o){return Yl(o).slice(1)}function RVe(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 DVe(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 wVe(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 OVe(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 CVe(o,p,i){return Yl(o).map(s=>s===p?i:s)}function _Ve(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 VVe(o){return Yl(o)[0]}function PVe(o){const p=Yl(o);return p[p.length-1]}function NVe(o,p,...i){return[...Cn(o),p,...i]}function xVe(o,p){const i=Cn(o);return[p,...i]}function $Ve(o){return Cn(o).length}function LVe(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 MVe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return i.slice(0,n)}function BVe(o,p){const i=Cn(o),n=Math.max(0,os(p)??0);return n===0?[]:i.slice(-n)}function GVe(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 kVe(o,p){return Cn(o).indexOf(p)}function jVe(o,p){return Cn(o).lastIndexOf(p)}function UVe(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 KVe(o){return Cn(o).reduce((i,n)=>i.concat(n),[])}function FVe(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=>Hvi.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 SVe(o){const i=[...Cn(o)];for(let n=i.length-1;n>0;n--){const s=Math.floor(KI()*(n+1));[i[n],i[s]]=[i[s],i[n]]}return i}function qVe(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 ZVe(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 HVe(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 WVe(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 zVe(o,p){if(!QP(p))throw new TypeError("Contains expects the needle to be a primitive (string | number | boolean | null).");return eN(o).some(n=>n===p)}function JVe(o,p){const i=eN(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(QP))throw new TypeError("ContainsAll expects all needles to be primitives (string | number | boolean | null).");return n.every(s=>i.includes(s))}function YVe(o,p){const i=eN(o),n=Array.isArray(p)?p:[p];if(n.length===0)return!1;if(!n.every(QP))throw new TypeError("ContainsAny expects all needles to be primitives (string | number | boolean | null).");return n.some(s=>i.includes(s))}class XVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN,version:"1.0.0",description:"List join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=vVe(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 QVe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT,version:"1.0.0",description:"List split operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=bVe(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 ePe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE,version:"1.0.0",description:"List reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=AVe(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 tPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST_N_ITEMS,version:"1.0.0",description:"List delete last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=gVe(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 iPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST_N_ITEMS,version:"1.0.0",description:"List delete first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=IVe(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__LIST_ADD_AT_INDEX,version:"1.0.0",description:"List add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=RVe(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 nPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_AT_INDEX,version:"1.0.0",description:"List replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=DVe(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 aPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST_N_ITEMS,version:"1.0.0",description:"List replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=wVe(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 sPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST_N_ITEMS,version:"1.0.0",description:"List replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=OVe(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 lPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_ALL,version:"1.0.0",description:"List replace all operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=CVe(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 oPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM,version:"1.0.0",description:"List get index item operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=_Ve(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 dPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST,version:"1.0.0",description:"List get first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=VVe(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__LIST_GET_LAST,version:"1.0.0",description:"List get last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=PVe(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 pPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND,version:"1.0.0",description:"List append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=NVe(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 cPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND,version:"1.0.0",description:"List prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=xVe(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 fPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LENGTH,version:"1.0.0",description:"List get length",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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:$Ve(s)}}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__LIST_DELETE_AT_INDEX,version:"1.0.0",description:"List delete one item at index (non-mutating)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=LVe(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 hPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST_N_ITEMS,version:"1.0.0",description:"List get first N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=MVe(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 mPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_N_ITEMS,version:"1.0.0",description:"List get last N items",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=BVe(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 TPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SLICE,version:"1.0.0",description:"List slice(start, end)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=GVe(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 vPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONCAT,version:"1.0.0",description:"List concat(base, ...others)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=EVe(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 EPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_OF,version:"1.0.0",description:"List listGetIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=kVe(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 bPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST_INDEX_OF,version:"1.0.0",description:"List listGetLastIndexOf(value)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=jVe(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 APe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_UNIQUE,version:"1.0.0",description:"List unique (stable, by reference/===)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=UVe(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 gPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_FLATTEN,version:"1.0.0",description:"List flatten one level",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=KVe(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 IPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SORT,version:"1.0.0",description:"List sort (non-mutating). Supports lists of strings (alphabetic), numbers (numeric), or ISO date strings (chronological).",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=FVe(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 RPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SHUFFLE,version:"1.0.0",description:"List shuffle (Fisher–Yates, secure RNG helper)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=SVe(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 DPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CHUNK,version:"1.0.0",description:"List chunk(size) -> list of lists",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=qVe(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 wPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_START,version:"1.0.0",description:"List padStart(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=ZVe(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 OPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PAD_END,version:"1.0.0",description:"List padEnd(targetLength, padValue)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=HVe(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 CPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPEAT,version:"1.0.0",description:"List repeat(count)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=WVe(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 _Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS,version:"1.0.0",description:"List contains (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=zVe(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 VPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ALL,version:"1.0.0",description:"List contains all (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=JVe(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 PPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_CONTAINS_ANY,version:"1.0.0",description:"List contains any (primitive needles)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=YVe(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 Wvi extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LENGTH,version:"1.0.0",description:"Returns the number of characters in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 NPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN,version:"1.0.0",description:"String join operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.Join);s&&(s.autoexecutable=!0,s.implementation=this.module.main)}},main:async(i,n)=>{var s,c,e;try{const y=n.find(k=>{var K,S;return((S=(K=k.valueOwner)==null?void 0:K.declaration)==null?void 0:S.id)===Q.operation[q.Join].inputs.separator.id}),m=((s=y==null?void 0:y.value)==null?void 0:s.value)||"",v=n.find(k=>{var K,S;return((S=(K=k.valueOwner)==null?void 0:K.declaration)==null?void 0:S.id)===Q.operation[q.Join].inputs.first.id}),E=((c=v==null?void 0:v.value)==null?void 0:c.value)||"",b=n.find(k=>{var K,S;return((S=(K=k.valueOwner)==null?void 0:K.declaration)==null?void 0:S.id)===Q.operation[q.Join].inputs.second.id}),w=((e=b==null?void 0:b.value)==null?void 0:e.value)||"",$=n.filter(k=>{var K,S;return((S=(K=k.valueOwner)==null?void 0:K.declaration)==null?void 0:S.id)===Q.operation[q.Join].inputs.dynamicString.id}).map(k=>{var K,S;return((K=k.value)==null?void 0:K.valueAsType)||((S=k.value)==null?void 0:S.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 xPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_INDEX,version:"1.0.0",description:"String split at index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 $Pe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_ALL_SEPARATORS,version:"1.0.0",description:"String split at all the occurrences of separators operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 LPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_FIRST_SEPARATOR,version:"1.0.0",description:"String split at the first occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 MPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT_AT_LAST_SEPARATOR,version:"1.0.0",description:"String split at the last occurrence of a separator operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 BPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST_N_CHARS,version:"1.0.0",description:"String delete last number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 GPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST_N_CHARS,version:"1.0.0",description:"String delete first number of characters operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 kPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE,version:"1.0.0",description:"String reverse operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 jPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE,version:"1.0.0",description:"String to lower case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 UPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE,version:"1.0.0",description:"String to upper case operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 KPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_AT_INDEX,version:"1.0.0",description:"String delete index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 FPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_AT_INDEX,version:"1.0.0",description:"String add index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 SPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_N_CHARS,version:"1.0.0",description:"String replace first operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 qPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_N_CHARS,version:"1.0.0",description:"String replace last operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 ZPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_AT_INDEX,version:"1.0.0",description:"String replace index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 HPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 WPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST_MATCH,version:"1.0.0",description:"String replace single match operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 zPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES,version:"1.0.0",description:"String replace all matches operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 JPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM,version:"1.0.0",description:"String get index operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 YPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_N_CHARS,version:"1.0.0",description:"String get last N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 XPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST_N_CHARS,version:"1.0.0",description:"String get first N chars operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 QPe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF,version:"1.0.0",description:"String get index of operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 eNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND,version:"1.0.0",description:"String append operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 tNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND,version:"1.0.0",description:"String prepend operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.Logic);if(n){const s=n.get(q.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 iNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM,version:"1.0.0",description:"String trim implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 rNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_START,version:"1.0.0",description:"String trimStart implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 nNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TRIM_END,version:"1.0.0",description:"String trimEnd implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 aNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SUBSTRING,version:"1.0.0",description:"String substring(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 sNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SLICE,version:"1.0.0",description:"String slice(start, end?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 lNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST_INDEX_OF,version:"1.0.0",description:"String lastIndexOf(search, fromIndex?) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 oNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_START,version:"1.0.0",description:"String padStart(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 dNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PAD_END,version:"1.0.0",description:"String padEnd(targetLength, padString?) implementation",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 uNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPEAT,version:"1.0.0",description:"String repeat(count) implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 pNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_REGEX,version:"1.0.0",description:"String match(regex) -> first match array or null",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 cNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCH_ALL_REGEX,version:"1.0.0",description:"String matchAll(regex) -> array of matches",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.MatchAllRegex);s&&(s.autoexecutable=!0,s.implementation=this.module.main)},main:async(i,n)=>{try{const[s,c,e]=n.map(b=>{var w,V;return((w=b.value)==null?void 0:w.valueAsType)??((V=b.value)==null?void 0:V.value)}),y=e?String(e):"",m=y.includes("g")?y:y+"g",v=new RegExp(String(c??""),m),E=Array.from(String(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 fNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SEARCH_REGEX,version:"1.0.0",description:"String search(regex) -> index or -1",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 yNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_REGEX,version:"1.0.0",description:"String replace using RegExp (pattern, replacement, flags?)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 hNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_NORMALIZE_UNICODE,version:"1.0.0",description:"String normalize(form?) implementation module (NFC by default)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 MA=class MA extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_DIACRITICS,version:"1.0.0",description:"Remove diacritics via NFD decomposition + strip combining marks",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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(MA.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(MA,"COMBINING_MARKS",/[\u0300-\u036f]/g);let yA=MA;class mNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_COUNT_OCCURRENCES,version:"1.0.0",description:"Count literal substring occurrences in a string",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 TNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_PREFIX,version:"1.0.0",description:"Ensure string starts with given prefix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 vNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENSURE_SUFFIX,version:"1.0.0",description:"Ensure string ends with given suffix (add if missing)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 ENe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_PREFIX,version:"1.0.0",description:"Remove prefix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 bNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REMOVE_SUFFIX,version:"1.0.0",description:"Remove suffix if present",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 ANe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_STARTS_WITH,version:"1.0.0",description:"String startsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 gNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ENDS_WITH,version:"1.0.0",description:"String endsWith(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 INe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_CONTAINS,version:"1.0.0",description:"String includes(needle) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 RNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_MATCHES_REGEX,version:"1.0.0",description:"Regex test: new RegExp(pattern, flags?).test(src) -> boolean",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.Logic),s=n==null?void 0:n.get(q.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 DNe(o,p){const i=Number(o),s=10**Math.max(0,Number(p)||0);return Math.round(i*s)/s}function wNe(o,p){const i=Number(o),n=Math.abs(Number(p)||0);return n===0?i:Math.round(i/n)*n}function ONe(o,p,i){const n=Number(o),s=Number(p),c=Number(i);return Math.min(Math.max(n,s),c)}function CNe(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 _Ne(...o){const p=o.map(n=>Number(n));return p.length===0?0:p.reduce((n,s)=>n+s,0)/p.length}function VNe(...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 NNe(o,p){const i=Number(o),n=Number(p);return i===0?1/0:(n-i)/i*100}const oi=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 xNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION,version:"1.0.0",description:"Number addition operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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_SUBTRACTION,version:"1.0.0",description:"Number subtraction operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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 LNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION,version:"1.0.0",description:"Number multiplication operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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=oi(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 MNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION,version:"1.0.0",description:"Number division operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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_REMAINDER,version:"1.0.0",description:"Number remainder operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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 GNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION,version:"1.0.0",description:"Number exponentiation operation implementation module",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(s=>s.contextType===X.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]=oi(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 kNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_NEGATE,version:"1.0.0",description:"Number negate (unary -x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 jNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ABSOLUTE,version:"1.0.0",description:"Number absolute (|x|)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 UNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIGN,version:"1.0.0",description:"Number sign (-1 | 0 | 1)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 KNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ROUND,version:"1.0.0",description:"Number round to nearest integer",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.round(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_FLOOR,version:"1.0.0",description:"Number floor (⌊x⌋)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.floor(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_CEIL,version:"1.0.0",description:"Number ceil (⌈x⌉)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.ceil(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_TRUNC,version:"1.0.0",description:"Number truncation (drop fractional part)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.trunc(Number(s))}}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_ROUND_TO_DECIMALS,version:"1.0.0",description:"Round to N decimals",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_SNAP_TO_STEP,version:"1.0.0",description:"Snap a number to the nearest multiple of step (>=0 step)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=wNe(s,c);return{value:G.Success,error:null,result:e}}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_CLAMP,version:"1.0.0",description:"Clamp value to [min, max]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),y=ONe(s,c,e);return{value:G.Success,error:null,result:y}}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_MAP_RANGE,version:"1.0.0",description:"Map value from [inMin,inMax] to [outMin,outMax]",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),v=CNe(s,c,e,y,m);return{value:G.Success,error:null,result:v}}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_AVERAGE,version:"1.0.0",description:"Average(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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_MEDIAN,version:"1.0.0",description:"Median(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(n),c=VNe(...s);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_MIN_OF,version:"1.0.0",description:"Min(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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 QNe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MAX_OF,version:"1.0.0",description:"Max(numbers...)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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=oi(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 exe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SQUARE_ROOT,version:"1.0.0",description:"Square root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.sqrt(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_CUBE_ROOT,version:"1.0.0",description:"Cube root",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.cbrt(Number(s))}}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_NTH_ROOT,version:"1.0.0",description:"Nth root (value, n)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=PNe(s,c);return{value:G.Success,error:null,result:e}}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_EXP,version:"1.0.0",description:"e^x",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.exp(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_LOG_NATURAL,version:"1.0.0",description:"Natural log ln(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.log(Number(s))}}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_LOG10,version:"1.0.0",description:"Log base 10",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 sxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SIN,version:"1.0.0",description:"sin(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.sin(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_COS,version:"1.0.0",description:"cos(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.cos(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_TAN,version:"1.0.0",description:"tan(x in radians)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.tan(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_ASIN,version:"1.0.0",description:"asin(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.asin(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_ACOS,version:"1.0.0",description:"acos(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.acos(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_ATAN,version:"1.0.0",description:"atan(x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Math.atan(Number(s))}}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_ATAN2,version:"1.0.0",description:"atan2(y, x)",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 fxe extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_TO_RADIANS,version:"1.0.0",description:"deg → rad",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Number(s)*Math.PI/180}}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_TO_DEGREES,version:"1.0.0",description:"rad → deg",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:Number(s)*180/Math.PI}}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_PERCENT_OF,version:"1.0.0",description:"x percent of y",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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 JO extends ge{constructor(){super(...arguments);I(this,"manifest",{id:Ae.BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_PERCENTAGE_CHANGE,version:"1.0.0",description:"((new-old)/old)*100",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n),e=NNe(s,c);return{value:G.Success,error:null,result:e}}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_LESS_THAN,version:"1.0.0",description:"a < b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_MORE_THAN,version:"1.0.0",description:"a > b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(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_LESS_THAN_OR_EQUAL,version:"1.0.0",description:"a <= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:s<=c}}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_MORE_THAN_OR_EQUAL,version:"1.0.0",description:"a >= b",initPriority:Ee.High,permissions:[be.All],contexts:[X.Logic]});I(this,"module",{init:i=>{const n=i.find(c=>c.contextType===X.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]=oi(n);return{value:G.Success,error:null,result:s>=c}}catch(s){return{value:G.UnhandledError,error:s,result:null}}}})}}function bxe(o,p){return function(){return o.apply(p,arguments)}}const{toString:zvi}=Object.prototype,{getPrototypeOf:tN}=Object,{iterator:qI,toStringTag:Axe}=Symbol,ZI=(o=>p=>{const i=zvi.call(p);return o[i]||(o[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Xl=o=>(o=o.toLowerCase(),p=>ZI(p)===o),HI=o=>p=>typeof p===o,{isArray:Lh}=Array,wy=HI("undefined");function lv(o){return o!==null&&!wy(o)&&o.constructor!==null&&!wy(o.constructor)&&Ga(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const gxe=Xl("ArrayBuffer");function Jvi(o){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(o):p=o&&o.buffer&&gxe(o.buffer),p}const Yvi=HI("string"),Ga=HI("function"),Ixe=HI("number"),ov=o=>o!==null&&typeof o=="object",Xvi=o=>o===!0||o===!1,Kb=o=>{if(ZI(o)!=="object")return!1;const p=tN(o);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(Axe in o)&&!(qI in o)},Qvi=o=>{if(!ov(o)||lv(o))return!1;try{return Object.keys(o).length===0&&Object.getPrototypeOf(o)===Object.prototype}catch{return!1}},eEi=Xl("Date"),tEi=Xl("File"),iEi=Xl("Blob"),rEi=Xl("FileList"),nEi=o=>ov(o)&&Ga(o.pipe),aEi=o=>{let p;return o&&(typeof FormData=="function"&&o instanceof FormData||Ga(o.append)&&((p=ZI(o))==="formdata"||p==="object"&&Ga(o.toString)&&o.toString()==="[object FormData]"))},sEi=Xl("URLSearchParams"),[lEi,oEi,dEi,uEi]=["ReadableStream","Request","Response","Headers"].map(Xl),pEi=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dv(o,p,{allOwnKeys:i=!1}={}){if(o===null||typeof o>"u")return;let n,s;if(typeof o!="object"&&(o=[o]),Lh(o))for(n=0,s=o.length;n<s;n++)p.call(null,o[n],n,o);else{if(lv(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 Rxe(o,p){if(lv(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 Ac=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Dxe=o=>!wy(o)&&o!==Ac;function YO(){const{caseless:o,skipUndefined:p}=Dxe(this)&&this||{},i={},n=(s,c)=>{const e=o&&Rxe(i,c)||c;Kb(i[e])&&Kb(s)?i[e]=YO(i[e],s):Kb(s)?i[e]=YO({},s):Lh(s)?i[e]=s.slice():(!p||!wy(s))&&(i[e]=s)};for(let s=0,c=arguments.length;s<c;s++)arguments[s]&&dv(arguments[s],n);return i}const cEi=(o,p,i,{allOwnKeys:n}={})=>(dv(p,(s,c)=>{i&&Ga(s)?o[c]=bxe(s,i):o[c]=s},{allOwnKeys:n}),o),fEi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),yEi=(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)},hEi=(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&&tN(o)}while(o&&(!i||i(o,p))&&o!==Object.prototype);return p},mEi=(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},TEi=o=>{if(!o)return null;if(Lh(o))return o;let p=o.length;if(!Ixe(p))return null;const i=new Array(p);for(;p-- >0;)i[p]=o[p];return i},vEi=(o=>p=>o&&p instanceof o)(typeof Uint8Array<"u"&&tN(Uint8Array)),EEi=(o,p)=>{const n=(o&&o[qI]).call(o);let s;for(;(s=n.next())&&!s.done;){const c=s.value;p.call(o,c[0],c[1])}},bEi=(o,p)=>{let i;const n=[];for(;(i=o.exec(p))!==null;)n.push(i);return n},AEi=Xl("HTMLFormElement"),gEi=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,n,s){return n.toUpperCase()+s}),b4=(({hasOwnProperty:o})=>(p,i)=>o.call(p,i))(Object.prototype),IEi=Xl("RegExp"),wxe=(o,p)=>{const i=Object.getOwnPropertyDescriptors(o),n={};dv(i,(s,c)=>{let e;(e=p(s,c,o))!==!1&&(n[c]=e||s)}),Object.defineProperties(o,n)},REi=o=>{wxe(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+"'")})}})},DEi=(o,p)=>{const i={},n=s=>{s.forEach(c=>{i[c]=!0})};return Lh(o)?n(o):n(String(o).split(p)),i},wEi=()=>{},OEi=(o,p)=>o!=null&&Number.isFinite(o=+o)?o:p;function CEi(o){return!!(o&&Ga(o.append)&&o[Axe]==="FormData"&&o[qI])}const _Ei=o=>{const p=new Array(10),i=(n,s)=>{if(ov(n)){if(p.indexOf(n)>=0)return;if(lv(n))return n;if(!("toJSON"in n)){p[s]=n;const c=Lh(n)?[]:{};return dv(n,(e,y)=>{const m=i(e,s+1);!wy(m)&&(c[y]=m)}),p[s]=void 0,c}}return n};return i(o,0)},VEi=Xl("AsyncFunction"),PEi=o=>o&&(ov(o)||Ga(o))&&Ga(o.then)&&Ga(o.catch),Oxe=((o,p)=>o?setImmediate:p?((i,n)=>(Ac.addEventListener("message",({source:s,data:c})=>{s===Ac&&c===i&&n.length&&n.shift()()},!1),s=>{n.push(s),Ac.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ga(Ac.postMessage)),NEi=typeof queueMicrotask<"u"?queueMicrotask.bind(Ac):typeof process<"u"&&process.nextTick||Oxe,xEi=o=>o!=null&&Ga(o[qI]),Ue={isArray:Lh,isArrayBuffer:gxe,isBuffer:lv,isFormData:aEi,isArrayBufferView:Jvi,isString:Yvi,isNumber:Ixe,isBoolean:Xvi,isObject:ov,isPlainObject:Kb,isEmptyObject:Qvi,isReadableStream:lEi,isRequest:oEi,isResponse:dEi,isHeaders:uEi,isUndefined:wy,isDate:eEi,isFile:tEi,isBlob:iEi,isRegExp:IEi,isFunction:Ga,isStream:nEi,isURLSearchParams:sEi,isTypedArray:vEi,isFileList:rEi,forEach:dv,merge:YO,extend:cEi,trim:pEi,stripBOM:fEi,inherits:yEi,toFlatObject:hEi,kindOf:ZI,kindOfTest:Xl,endsWith:mEi,toArray:TEi,forEachEntry:EEi,matchAll:bEi,isHTMLForm:AEi,hasOwnProperty:b4,hasOwnProp:b4,reduceDescriptors:wxe,freezeMethods:REi,toObjectSet:DEi,toCamelCase:gEi,noop:wEi,toFiniteNumber:OEi,findKey:Rxe,global:Ac,isContextDefined:Dxe,isSpecCompliantForm:CEi,toJSONObject:_Ei,isAsyncFn:VEi,isThenable:PEi,setImmediate:Oxe,asap:NEi,isIterable:xEi};function ai(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(ai,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 Cxe=ai.prototype,_xe={};["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=>{_xe[o]={value:o}});Object.defineProperties(ai,_xe);Object.defineProperty(Cxe,"isAxiosError",{value:!0});ai.from=(o,p,i,n,s,c)=>{const e=Object.create(Cxe);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 ai.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 XO(o){return Ue.isPlainObject(o)||Ue.isArray(o)}function Vxe(o){return Ue.endsWith(o,"[]")?o.slice(0,-2):o}function A4(o,p,i){return o?o.concat(p).map(function(s,c){return s=Vxe(s),!i&&c?"["+s+"]":s}).join(i?".":""):p}function LEi(o){return Ue.isArray(o)&&!o.some(XO)}const MEi=Ue.toFlatObject(Ue,{},null,function(p){return/^is[A-Z]/.test(p)});function WI(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,k){return!Ue.isUndefined(k[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 ai("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer($)||Ue.isTypedArray($)?m&&typeof Blob=="function"?new Blob([$]):Buffer.from($):$}function E($,L,k){let K=$;if($&&!k&&typeof $=="object"){if(Ue.endsWith(L,"{}"))L=n?L:L.slice(0,-2),$=JSON.stringify($);else if(Ue.isArray($)&&LEi($)||(Ue.isFileList($)||Ue.endsWith(L,"[]"))&&(K=Ue.toArray($)))return L=Vxe(L),K.forEach(function(Y,re){!(Ue.isUndefined(Y)||Y===null)&&p.append(e===!0?A4([L],re,c):e===null?L:L+"[]",v(Y))}),!1}return XO($)?!0:(p.append(A4(k,L,c),v($)),!1)}const b=[],w=Object.assign(MEi,{defaultVisitor:E,convertValue:v,isVisitable:XO});function V($,L){if(!Ue.isUndefined($)){if(b.indexOf($)!==-1)throw Error("Circular reference detected in "+L.join("."));b.push($),Ue.forEach($,function(K,S){(!(Ue.isUndefined(K)||K===null)&&s.call(p,K,Ue.isString(S)?S.trim():S,L,w))===!0&&V(K,L?L.concat(S):[S])}),b.pop()}}if(!Ue.isObject(o))throw new TypeError("data must be an object");return V(o),p}function g4(o){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(n){return p[n]})}function iN(o,p){this._pairs=[],o&&WI(o,this,p)}const Pxe=iN.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,g4)}:g4;return this._pairs.map(function(s){return i(s[0])+"="+i(s[1])},"").join("&")};function BEi(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nxe(o,p,i){if(!p)return o;const n=i&&i.encode||BEi;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 iN(p,i).toString(n),c){const e=o.indexOf("#");e!==-1&&(o=o.slice(0,e)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class GEi{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 I4=GEi,xxe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kEi=typeof URLSearchParams<"u"?URLSearchParams:iN,jEi=typeof FormData<"u"?FormData:null,UEi=typeof Blob<"u"?Blob:null,KEi={isBrowser:!0,classes:{URLSearchParams:kEi,FormData:jEi,Blob:UEi},protocols:["http","https","file","blob","url","data"]},rN=typeof window<"u"&&typeof document<"u",QO=typeof navigator=="object"&&navigator||void 0,FEi=rN&&(!QO||["ReactNative","NativeScript","NS"].indexOf(QO.product)<0),SEi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),qEi=rN&&window.location.href||"http://localhost",ZEi=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rN,hasStandardBrowserEnv:FEi,hasStandardBrowserWebWorkerEnv:SEi,navigator:QO,origin:qEi},Symbol.toStringTag,{value:"Module"})),na={...ZEi,...KEi};function HEi(o,p){return WI(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 WEi(o){return Ue.matchAll(/\w+|\[(\w*)]/g,o).map(p=>p[0]==="[]"?"":p[1]||p[0])}function zEi(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 $xe(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]=zEi(s[e])),!y)}if(Ue.isFormData(o)&&Ue.isFunction(o.entries)){const i={};return Ue.forEachEntry(o,(n,s)=>{p(WEi(n),s,i,0)}),i}return null}function JEi(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 nN={transitional:xxe,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($xe(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 HEi(p,this.formSerializer).toString();if((y=Ue.isFileList(p))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return WI(y?{"files[]":p}:p,m&&new m,this.formSerializer)}}return c||s?(i.setContentType("application/json",!1),JEi(p)):p}],transformResponse:[function(p){const i=this.transitional||nN.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"?ai.from(y,ai.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=>{nN.headers[o]={}});const aN=nN,YEi=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"]),XEi=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]&&YEi[i])&&(i==="set-cookie"?p[i]?p[i].push(n):p[i]=[n]:p[i]=p[i]?p[i]+", "+n:n)}),p},R4=Symbol("internals");function j0(o){return o&&String(o).trim().toLowerCase()}function Fb(o){return o===!1||o==null?o:Ue.isArray(o)?o.map(Fb):String(o)}function QEi(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 ebi=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function TO(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 tbi(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(p,i,n)=>i.toUpperCase()+n)}function ibi(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 zI{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]=Fb(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())&&!ebi(p))e(XEi(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 QEi(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||TO(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||TO(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||TO(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]=Fb(s),delete i[c];return}const y=p?tbi(c):String(c).trim();y!==c&&delete i[c],i[y]=Fb(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[R4]=this[R4]={accessors:{}}).accessors,s=this.prototype;function c(e){const y=j0(e);n[y]||(ibi(s,e),n[y]=!0)}return Ue.isArray(p)?p.forEach(c):c(p),this}}zI.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ue.reduceDescriptors(zI.prototype,({value:o},p)=>{let i=p[0].toUpperCase()+p.slice(1);return{get:()=>o,set(n){this[i]=n}}});Ue.freezeMethods(zI);const El=zI;function vO(o,p){const i=this||aN,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 Lxe(o){return!!(o&&o.__CANCEL__)}function Mh(o,p,i){ai.call(this,o??"canceled",ai.ERR_CANCELED,p,i),this.name="CanceledError"}Ue.inherits(Mh,ai,{__CANCEL__:!0});function Mxe(o,p,i){const n=i.config.validateStatus;!i.status||!n||n(i.status)?o(i):p(new ai("Request failed with status code "+i.status,[ai.ERR_BAD_REQUEST,ai.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function rbi(o){const p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return p&&p[1]||""}function nbi(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 V=E&&v-E;return V?Math.round(w*1e3/V):void 0}}function abi(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 hA=(o,p,i=3)=>{let n=0;const s=nbi(50,250);return abi(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)},D4=(o,p)=>{const i=o!=null;return[n=>p[0]({lengthComputable:i,total:o,loaded:n}),p[1]]},w4=o=>(...p)=>Ue.asap(()=>o(...p)),sbi=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,lbi=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 obi(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function dbi(o,p){return p?o.replace(/\/?\/$/,"")+"/"+p.replace(/^\/+/,""):o}function Bxe(o,p,i){let n=!obi(p);return o&&(n||i==!1)?dbi(o,p):p}const O4=o=>o instanceof El?{...o}:o;function Cc(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(O4(v),O4(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 Gxe=o=>{const p=Cc({},o);let{data:i,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:c,headers:e,auth:y}=p;if(p.headers=e=El.from(e),p.url=Nxe(Bxe(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&&sbi(p.url))){const m=s&&c&&lbi.read(c);m&&e.set(s,m)}return p},ubi=typeof XMLHttpRequest<"u",pbi=ubi&&function(o){return new Promise(function(i,n){const s=Gxe(o);let c=s.data;const e=El.from(s.headers).normalize();let{responseType:y,onUploadProgress:m,onDownloadProgress:v}=s,E,b,w,V,$;function L(){V&&V(),$&&$(),s.cancelToken&&s.cancelToken.unsubscribe(E),s.signal&&s.signal.removeEventListener("abort",E)}let k=new XMLHttpRequest;k.open(s.method.toUpperCase(),s.url,!0),k.timeout=s.timeout;function K(){if(!k)return;const Y=El.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),ee={data:!y||y==="text"||y==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:Y,config:o,request:k};Mxe(function(le){i(le),L()},function(le){n(le),L()},ee),k=null}"onloadend"in k?k.onloadend=K:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(K)},k.onabort=function(){k&&(n(new ai("Request aborted",ai.ECONNABORTED,o,k)),k=null)},k.onerror=function(re){const ee=re&&re.message?re.message:"Network Error",de=new ai(ee,ai.ERR_NETWORK,o,k);de.event=re||null,n(de),k=null},k.ontimeout=function(){let re=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const ee=s.transitional||xxe;s.timeoutErrorMessage&&(re=s.timeoutErrorMessage),n(new ai(re,ee.clarifyTimeoutError?ai.ETIMEDOUT:ai.ECONNABORTED,o,k)),k=null},c===void 0&&e.setContentType(null),"setRequestHeader"in k&&Ue.forEach(e.toJSON(),function(re,ee){k.setRequestHeader(ee,re)}),Ue.isUndefined(s.withCredentials)||(k.withCredentials=!!s.withCredentials),y&&y!=="json"&&(k.responseType=s.responseType),v&&([w,$]=hA(v,!0),k.addEventListener("progress",w)),m&&k.upload&&([b,V]=hA(m),k.upload.addEventListener("progress",b),k.upload.addEventListener("loadend",V)),(s.cancelToken||s.signal)&&(E=Y=>{k&&(n(!Y||Y.type?new Mh(null,o,k):Y),k.abort(),k=null)},s.cancelToken&&s.cancelToken.subscribe(E),s.signal&&(s.signal.aborted?E():s.signal.addEventListener("abort",E)));const S=rbi(s.url);if(S&&na.protocols.indexOf(S)===-1){n(new ai("Unsupported protocol "+S+":",ai.ERR_BAD_REQUEST,o));return}k.send(c||null)})},cbi=(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 ai?E:new Mh(E instanceof Error?E.message:E))}};let e=p&&setTimeout(()=>{e=null,c(new ai(`timeout ${p} of ms exceeded`,ai.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}},fbi=cbi,ybi=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},hbi=async function*(o,p){for await(const i of mbi(o))yield*ybi(i,p)},mbi=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()}},C4=(o,p,i,n)=>{const s=hbi(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})},_4=64*1024,{isFunction:$b}=Ue,Tbi=(({Request:o,Response:p})=>({Request:o,Response:p}))(Ue.global),{ReadableStream:V4,TextEncoder:P4}=Ue.global,N4=(o,...p)=>{try{return!!o(...p)}catch{return!1}},vbi=o=>{o=Ue.merge.call({skipUndefined:!0},Tbi,o);const{fetch:p,Request:i,Response:n}=o,s=p?$b(p):typeof fetch=="function",c=$b(i),e=$b(n);if(!s)return!1;const y=s&&$b(V4),m=s&&(typeof P4=="function"?($=>L=>$.encode(L))(new P4):async $=>new Uint8Array(await new i($).arrayBuffer())),v=c&&y&&N4(()=>{let $=!1;const L=new i(na.origin,{body:new V4,method:"POST",get duplex(){return $=!0,"half"}}).headers.has("Content-Type");return $&&!L}),E=e&&y&&N4(()=>Ue.isReadableStream(new n("").body)),b={stream:E&&($=>$.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach($=>{!b[$]&&(b[$]=(L,k)=>{let K=L&&L[$];if(K)return K.call(L);throw new ai(`Response type '${$}' is not supported`,ai.ERR_NOT_SUPPORT,k)})});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},V=async($,L)=>{const k=Ue.toFiniteNumber($.getContentLength());return k??w(L)};return async $=>{let{url:L,method:k,data:K,signal:S,cancelToken:Y,timeout:re,onDownloadProgress:ee,onUploadProgress:de,responseType:le,headers:fe,withCredentials:ve="same-origin",fetchOptions:ue}=Gxe($),ye=p||fetch;le=le?(le+"").toLowerCase():"text";let Ve=fbi([S,Y&&Y.toAbortSignal()],re),_e=null;const $e=Ve&&Ve.unsubscribe&&(()=>{Ve.unsubscribe()});let Ne;try{if(de&&v&&k!=="get"&&k!=="head"&&(Ne=await V(fe,K))!==0){let lt=new i(L,{method:"POST",body:K,duplex:"half"}),ot;if(Ue.isFormData(K)&&(ot=lt.headers.get("content-type"))&&fe.setContentType(ot),lt.body){const[Rt,Pt]=D4(Ne,hA(w4(de)));K=C4(lt.body,_4,Rt,Pt)}}Ue.isString(ve)||(ve=ve?"include":"omit");const Be=c&&"credentials"in i.prototype,Se={...ue,signal:Ve,method:k.toUpperCase(),headers:fe.normalize().toJSON(),body:K,duplex:"half",credentials:Be?ve:void 0};_e=c&&new i(L,Se);let je=await(c?ye(_e,ue):ye(L,Se));const Ze=E&&(le==="stream"||le==="response");if(E&&(ee||Ze&&$e)){const lt={};["status","statusText","headers"].forEach(Di=>{lt[Di]=je[Di]});const ot=Ue.toFiniteNumber(je.headers.get("content-length")),[Rt,Pt]=ee&&D4(ot,hA(w4(ee),!0))||[];je=new n(C4(je.body,_4,Rt,()=>{Pt&&Pt(),$e&&$e()}),lt)}le=le||"text";let Ye=await b[Ue.findKey(b,le)||"text"](je,$);return!Ze&&$e&&$e(),await new Promise((lt,ot)=>{Mxe(lt,ot,{data:Ye,headers:El.from(je.headers),status:je.status,statusText:je.statusText,config:$,request:_e})})}catch(Be){throw $e&&$e(),Be&&Be.name==="TypeError"&&/Load failed|fetch/i.test(Be.message)?Object.assign(new ai("Network Error",ai.ERR_NETWORK,$,_e),{cause:Be.cause||Be}):ai.from(Be,Be&&Be.code,$,_e)}}},Ebi=new Map,kxe=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=Ebi;for(;y--;)m=c[y],v=E.get(m),v===void 0&&E.set(m,v=y?new Map:vbi(p)),E=v;return v};kxe();const sN={http:$Ei,xhr:pbi,fetch:{get:kxe}};Ue.forEach(sN,(o,p)=>{if(o){try{Object.defineProperty(o,"name",{value:p})}catch{}Object.defineProperty(o,"adapterName",{value:p})}});const x4=o=>`- ${o}`,bbi=o=>Ue.isFunction(o)||o===null||o===!1;function Abi(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,!bbi(n)&&(s=sN[(y=String(n)).toLowerCase()],s===void 0))throw new ai(`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(x4).join(`
|