import{c as r}from"./declarationMapper-CGPHX8aB.js";import{L as p,R as a}from"./index-6jOCfdig.js";import{b as l}from"./KHR_interactivity-DRPs30Rf.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 t extends l{constructor(i){super(i),this.config=i,this.condition=this.registerDataInput("condition",r),this.executionFlow=this._registerSignalOutput("executionFlow"),this.completed=this._registerSignalOutput("completed"),this._unregisterSignalOutput("out")}_execute(i,n){let o=this.condition.getValue(i);this.config?.doWhile&&!o&&this.executionFlow._activateSignal(i);let e=0;for(;o;){if(this.executionFlow._activateSignal(i),++e,e>=t.MaxLoopCount){p.Warn("FlowGraphWhileLoopBlock: Max loop count reached. Breaking.");break}o=this.condition.getValue(i)}this.completed._activateSignal(i)}getClassName(){return"FlowGraphWhileLoopBlock"}}t.MaxLoopCount=1e3;a("FlowGraphWhileLoopBlock",t);export{t as FlowGraphWhileLoopBlock};
