import{w as e,g as a}from"./DF7JV_1b.js";function o(t){try{return structuredClone(t)}catch{return JSON.parse(JSON.stringify(t))}}const i=e([]),c=e([]),x=e([]),b=e("conceptual"),C=e("entity_model"),S=e(null),I=e([]),L=e([]),T=e([]),w=e({}),E=e([]),D=e([]),O=e(null),R=e(null),A=e(!0),B=e([]),H=e([]),P=e(null),U=e(null),d=e({open:!1,modelId:null});function v(t){d.set({open:!0,modelId:t})}function J(){d.set({open:!1,modelId:null})}const f=e({open:!1,entityLabel:"",entityId:"",sources:[]});function N(t,g,y){f.set({open:!0,entityLabel:t,entityId:g,sources:y})}function _(){f.set({open:!1,entityLabel:"",entityId:"",sources:[]})}const p=e({open:!1,entityLabel:""});function k(t){p.set({open:!0,entityLabel:t})}function q(){p.set({open:!1,entityLabel:""})}const m=50;let n=[],s=-1,l=!1,u=null;const h=e(!1),M=e(!1);function r(){h.set(s>0),M.set(s<n.length-1)}function z(){l||(u&&clearTimeout(u),u=setTimeout(()=>{const t={nodes:o(a(i)),edges:o(a(c))};s<n.length-1&&(n=n.slice(0,s+1)),n.push(t),n.length>m?n.shift():s++,r()},300))}function X(){n=[{nodes:o(a(i)),edges:o(a(c))}],s=0,r()}function Y(){if(s<=0)return;l=!0,s--;const t=n[s];i.set(o(t.nodes)),c.set(o(t.edges)),r(),l=!1}function j(){if(s>=n.length-1)return;l=!0,s++;const t=n[s];i.set(o(t.nodes)),c.set(o(t.edges)),r(),l=!1}export{Y as A,q as B,_ as C,A as D,p as E,d as F,B as a,H as b,S as c,c as d,P as e,E as f,x as g,T as h,L as i,v as j,N as k,I as l,C as m,i as n,k as o,U as p,O as q,R as r,w as s,D as t,J as u,b as v,z as w,f as x,X as y,j as z};
