function e(e,t){return{nodes:e.map(e=>({id:e.id,type:e.step_type,label:e.step_name,data:e})),edges:t.map(e=>({id:e.id,source:e.from_step,target:e.to_step,label:e.transition_name,data:e}))}}function t(e){let t=e.workflow_definition;return t?.nodes&&t.nodes.length>0?{steps:t.nodes.map(e=>{let t=e.data||e;return{...t,id:e.id||t.id,position:t.position||{x:0,y:0}}}),transitions:(t.edges||[]).map(e=>{let t=e.data||e;return{...t,id:e.id||t.id,from_step:e.source||t.from_step,to_step:e.target||t.to_step}})}:{steps:e.steps??[],transitions:e.transitions??[]}}export{t as n,e as t};