import{b as l,g as e}from"./KHR_interactivity-DRPs30Rf.js";import{R as p,b as h,i as m,F as o}from"./declarationMapper-CGPHX8aB.js";import{R as u}from"./index-6jOCfdig.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_async.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./objectModelMapping-DT0r674A.js";class r extends l{constructor(t){super(t),this.startIndex=this.registerDataInput("startIndex",p,0),this.endIndex=this.registerDataInput("endIndex",p),this.step=this.registerDataInput("step",h,1),this.index=this.registerDataOutput("index",m,new o(e(t?.initialIndex??0))),this.executionFlow=this._registerSignalOutput("executionFlow"),this.completed=this._registerSignalOutput("completed"),this._unregisterSignalOutput("out")}_execute(t){const n=e(this.startIndex.getValue(t)),s=this.step.getValue(t);let a=e(this.endIndex.getValue(t));for(let i=n;i<a&&(this.index.setValue(new o(i),t),this.executionFlow._activateSignal(t),a=e(this.endIndex.getValue(t)),!(i>r.MaxLoopIterations*s));i+=s);this.config?.incrementIndexWhenLoopDone&&this.index.setValue(new o(e(this.index.getValue(t))+s),t),this.completed._activateSignal(t)}getClassName(){return"FlowGraphForLoopBlock"}}r.MaxLoopIterations=1e3;u("FlowGraphForLoopBlock",r);export{r as FlowGraphForLoopBlock};
