@bkm016/basalt 0.1.13 → 0.1.15
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/README.md +3 -2
- package/{chunk-bng72094.js → chunk-03wzwnn6.js} +1 -1
- package/{chunk-9e8vhzy7.js → chunk-0crbhhna.js} +1 -1
- package/{chunk-h9zxqeqr.js → chunk-0rasqm8y.js} +2 -2
- package/{chunk-0x9netvr.js → chunk-1w4nh5t6.js} +1 -1
- package/{chunk-dk6fgprw.js → chunk-2eaehpp6.js} +1 -1
- package/{chunk-6sea12mw.js → chunk-30dxcr91.js} +1 -1
- package/{chunk-2zbj8ny6.js → chunk-343jsm46.js} +2 -2
- package/chunk-38g4jd6v.js +5 -0
- package/{chunk-zx75vnw8.js → chunk-39mh7h58.js} +22 -22
- package/chunk-44b9yx79.js +2 -0
- package/{chunk-r1jn77q6.js → chunk-4f6p4n7k.js} +2 -2
- package/{chunk-sgz87ht5.js → chunk-4w8j6n7z.js} +1 -1
- package/{chunk-szj85dqe.js → chunk-4yxd2kg1.js} +2 -2
- package/{chunk-bp61xdsc.js → chunk-59hg9a84.js} +1 -1
- package/{chunk-yy1f9jxc.js → chunk-5n1qra6k.js} +429 -310
- package/{chunk-bq54argx.js → chunk-62ebm0bn.js} +1 -1
- package/{chunk-6d9r9p91.js → chunk-6ef085c1.js} +4 -4
- package/{chunk-zk91579b.js → chunk-6hx9y86d.js} +2 -2
- package/chunk-73t051r6.js +2 -0
- package/{chunk-pryvvs96.js → chunk-7mgkpn94.js} +22 -22
- package/{chunk-2q56egb8.js → chunk-81x8r8w4.js} +1 -1
- package/{chunk-rn3jwyh1.js → chunk-8np9b2y8.js} +2 -2
- package/{chunk-1q6e3mj7.js → chunk-9ew8cap5.js} +2 -2
- package/chunk-9v3b7jjv.js +2 -0
- package/{chunk-tjg0gcks.js → chunk-9vam83py.js} +1 -1
- package/{chunk-ct77cdg7.js → chunk-9xjecw6c.js} +1 -1
- package/{chunk-8cgz8xv7.js → chunk-b2wpj81x.js} +2 -2
- package/{chunk-302n9g7p.js → chunk-bjvv3403.js} +1 -1
- package/{chunk-tfhze1vq.js → chunk-c8g9jjqs.js} +2 -2
- package/{chunk-0a7ft50x.js → chunk-cs91rmbf.js} +8 -8
- package/{chunk-gpnqmtbk.js → chunk-edcf97ka.js} +1 -1
- package/{chunk-74wwdx3y.js → chunk-en7z6ne5.js} +2 -2
- package/{chunk-f0h2bv11.js → chunk-evnqkyt7.js} +10 -10
- package/{chunk-4rnmxtpx.js → chunk-ge38dhv9.js} +2 -2
- package/chunk-hggam3je.js +2 -0
- package/{chunk-mf04h0yy.js → chunk-k38jaz6c.js} +4 -4
- package/{chunk-jjtt9aq8.js → chunk-kcn05erf.js} +3 -3
- package/{chunk-y23dpz5e.js → chunk-m5km74eq.js} +2 -2
- package/{chunk-095adzn5.js → chunk-mfb3dgs8.js} +2 -2
- package/{chunk-0nedq669.js → chunk-mh4bjtfs.js} +3 -3
- package/{chunk-bja7p3em.js → chunk-p886jr17.js} +13 -13
- package/{chunk-xvm0y99b.js → chunk-pdt65s31.js} +2 -2
- package/{chunk-ymg7mtcx.js → chunk-pjgt1bdx.js} +2 -2
- package/{chunk-959z9efn.js → chunk-pyj6avd5.js} +2 -2
- package/chunk-qd2enpr2.js +3 -0
- package/{chunk-tnj2kqb8.js → chunk-qe76naq9.js} +1 -1
- package/{chunk-z0c8ek0j.js → chunk-qjnx4fsn.js} +2 -2
- package/{chunk-2tf7qfbx.js → chunk-qs161f2q.js} +2 -2
- package/{chunk-nbjnwd54.js → chunk-rghqprav.js} +1 -1
- package/{chunk-7chv3knf.js → chunk-t33bm5aa.js} +1 -1
- package/chunk-tszctb17.js +482 -0
- package/chunk-vd5332ps.js +2 -0
- package/{chunk-22az84sh.js → chunk-w55cnj0f.js} +2 -2
- package/{chunk-4k9t9jvx.js → chunk-wnd3y4c0.js} +1 -1
- package/{chunk-snz19yc2.js → chunk-xafx1p7z.js} +2 -2
- package/{chunk-15ve3nmv.js → chunk-xf7zw32f.js} +12 -12
- package/{chunk-kbpbrr11.js → chunk-xq74x4gc.js} +2 -2
- package/{chunk-mdkfm1ak.js → chunk-y0274xr2.js} +3 -3
- package/{chunk-y4pvhes1.js → chunk-z9p6s986.js} +6 -6
- package/{chunk-41das1ty.js → chunk-zcwz44db.js} +1 -1
- package/{chunk-77c2cqp2.js → chunk-zhyzhekt.js} +1 -1
- package/compiled.js +12 -12
- package/package.json +1 -1
- package/ui-test-worker.js +51 -51
- package/web/chunk-00swes3c.js +1 -0
- package/web/{chunk-s935z8er.js → chunk-01nbc18z.js} +2 -2
- package/web/chunk-0e995hjg.js +1 -0
- package/web/{chunk-16jc5m0f.js → chunk-17wwzrp4.js} +1 -1
- package/web/{chunk-8j4tzff5.js → chunk-1bhpfsvr.js} +3 -3
- package/web/{chunk-qb8mbptk.js → chunk-1v6hhgc6.js} +1 -1
- package/web/chunk-1y387f45.js +1 -0
- package/web/{chunk-ddg8rz82.js → chunk-251yw6f2.js} +1 -1
- package/web/{chunk-mykrm8ba.js → chunk-25sn840r.js} +2 -2
- package/web/{chunk-b4gcpsbg.js → chunk-27cntdyk.js} +5 -5
- package/web/chunk-2tm4xe0j.js +2 -0
- package/web/chunk-3egthz5k.js +2 -0
- package/web/{chunk-p7pa02k9.js → chunk-3f8fjee5.js} +2 -2
- package/web/chunk-3fjzgpaw.js +1 -0
- package/web/{chunk-zqcg6frm.js → chunk-3hy2gsgf.js} +1 -1
- package/web/chunk-3mgzqbc8.js +1 -0
- package/web/chunk-3yvanftw.js +1 -0
- package/web/{chunk-xk1vkcj4.js → chunk-3zs2v6b4.js} +4 -4
- package/web/{chunk-9k7fkx80.js → chunk-43194184.js} +1 -1
- package/web/{chunk-vk7ch6fh.js → chunk-43bczb21.js} +2 -2
- package/web/{chunk-0rhx7qb8.js → chunk-4m9mgdaa.js} +1 -1
- package/web/{chunk-jpem3qvs.js → chunk-4q2jtvwn.js} +5 -5
- package/web/{chunk-w28dn4dw.js → chunk-4tbhxtnm.js} +1 -1
- package/web/{chunk-q4vy3dkk.js → chunk-50vgq2nk.js} +2 -2
- package/web/{chunk-atppv8fk.js → chunk-57b8j192.js} +1 -1
- package/web/{chunk-h6k1x096.js → chunk-5d9veaef.js} +2 -2
- package/web/chunk-5fzmk43v.js +1 -0
- package/web/{chunk-97t3ngqf.js → chunk-5rwg3qqd.js} +7 -7
- package/web/{chunk-xe121vg7.js → chunk-62gj74fq.js} +1 -1
- package/web/chunk-64h7k870.js +1 -0
- package/web/{chunk-3p9w8sg5.js → chunk-65ay0j1t.js} +3 -3
- package/web/{chunk-mkxeenph.js → chunk-66164wmv.js} +1 -1
- package/web/chunk-6ehecat3.js +1 -0
- package/web/{chunk-a6g3nqp0.js → chunk-6s1vjny7.js} +2 -2
- package/web/{chunk-ga07tv37.js → chunk-6x1hfjb9.js} +1 -1
- package/web/{chunk-dmha2y9c.js → chunk-6xfbh4z5.js} +18 -18
- package/web/chunk-73941p08.js +1 -0
- package/web/{chunk-t82sngk9.js → chunk-7frnjms9.js} +7 -7
- package/web/chunk-7jh6zxg3.js +1 -0
- package/web/chunk-7mgwejn4.js +1 -0
- package/web/chunk-7qq1ypvj.js +1 -0
- package/web/{chunk-awkdw9rw.js → chunk-7wzszsf5.js} +2 -2
- package/web/{chunk-c57f714b.js → chunk-7zfqppsx.js} +2 -2
- package/web/{chunk-wpxtkxjt.js → chunk-8nm0mghm.js} +2 -2
- package/web/{chunk-980zhtht.js → chunk-8qzsxg1q.js} +1 -1
- package/web/chunk-8zg89764.js +1 -0
- package/web/{chunk-sq75q603.js → chunk-937ndmh1.js} +6 -6
- package/web/chunk-95gbcs8j.js +1 -0
- package/web/{chunk-eqxy6535.js → chunk-a205cj09.js} +2 -2
- package/web/chunk-at0xtfhy.js +1 -0
- package/web/{chunk-jh3k7xex.js → chunk-aw6wg8fe.js} +3 -3
- package/web/{chunk-g0be12na.js → chunk-b323qea5.js} +1 -1
- package/web/{chunk-3ctmehg4.js → chunk-bcx7xges.js} +1 -1
- package/web/{chunk-ke8dffnk.js → chunk-bzdn9sxz.js} +2 -2
- package/web/{chunk-w4tfad6c.js → chunk-cq1f20k6.js} +1 -1
- package/web/{chunk-zb61mf0a.js → chunk-dde64qjd.js} +1 -1
- package/web/{chunk-a9er7a7c.js → chunk-dgepxev9.js} +19 -19
- package/web/{chunk-6rsr2cyw.js → chunk-djnq1w1e.js} +8 -8
- package/web/{chunk-2y1avvqj.js → chunk-ea6b8b50.js} +3 -3
- package/web/{chunk-xxmaqj1m.js → chunk-ed5xfgxb.js} +2 -2
- package/web/{chunk-0jbf73pr.js → chunk-ehz9m6g4.js} +3 -3
- package/web/chunk-evp6t44y.js +8 -0
- package/web/chunk-eyg28s83.js +1 -0
- package/web/{chunk-mnf4ngj9.js → chunk-fttdbcqv.js} +2 -2
- package/web/chunk-g7bcntpm.js +1 -0
- package/web/chunk-g9bqacq1.js +1 -0
- package/web/chunk-gh8kjzdj.js +1 -0
- package/web/{chunk-2sef2wft.js → chunk-hbwxtbq3.js} +2 -2
- package/web/{chunk-6e87m0nm.js → chunk-hdtvrh0f.js} +2 -2
- package/web/chunk-j031r08w.js +1 -0
- package/web/{chunk-zh7193nq.js → chunk-jab2p5zv.js} +2 -2
- package/web/{chunk-2x7vmhm0.js → chunk-jca9xbe0.js} +3 -3
- package/web/{chunk-jccz14ye.js → chunk-jdx7qp2w.js} +2 -2
- package/web/chunk-jpf8x9tm.js +1 -0
- package/web/{chunk-5cwxhhae.js → chunk-jx3z63tq.js} +2 -2
- package/web/chunk-jy448465.js +1142 -0
- package/web/chunk-jy8zat04.js +1 -0
- package/web/{chunk-b9jry5a3.js → chunk-k3ah0513.js} +1 -1
- package/web/{chunk-qq6m2my8.js → chunk-k4qrqmdk.js} +2 -2
- package/web/chunk-k8s7kye3.js +1 -0
- package/web/chunk-k9zn1n6d.js +1 -0
- package/web/{chunk-v4cqc9f9.js → chunk-ksnsfqrn.js} +1 -1
- package/web/{chunk-cr04125j.js → chunk-kxr473dw.js} +12 -12
- package/web/{chunk-3wpxymxa.js → chunk-m5psa69k.js} +3 -3
- package/web/chunk-md9j949p.js +1 -0
- package/web/{chunk-4py9sndw.js → chunk-mss6eg27.js} +6 -6
- package/web/{chunk-3jjksgze.js → chunk-mv9q8jrm.js} +1 -1
- package/web/{chunk-ze6azq7z.js → chunk-n0ezfa12.js} +4 -4
- package/web/chunk-nbcpbqq4.js +1 -0
- package/web/{chunk-qq06x2ce.js → chunk-p1bb9xp8.js} +2 -2
- package/web/{chunk-14vmr99v.js → chunk-pa82db2e.js} +3 -3
- package/web/{chunk-frnh4zqf.js → chunk-pafw34vg.js} +2 -2
- package/web/{chunk-1xm9x7d6.js → chunk-pdmcr6d4.js} +2 -2
- package/web/{chunk-ct90yf8z.js → chunk-pf65cank.js} +2 -2
- package/web/{chunk-jh33m2mq.js → chunk-phj4pcx4.js} +3 -3
- package/web/{chunk-fnvgdvrg.js → chunk-pma5pats.js} +4 -4
- package/web/{chunk-g7hqafb8.js → chunk-pmghe7rh.js} +1 -1
- package/web/{chunk-xcyqd7cn.js → chunk-ppfhtyxt.js} +1 -1
- package/web/chunk-pze2v3v1.js +2 -0
- package/web/{chunk-e57h40qa.js → chunk-q6j2e8a1.js} +2 -2
- package/web/chunk-q6jf3zc1.js +1 -0
- package/web/{chunk-9wz8jne3.js → chunk-qdn3hmfy.js} +1 -1
- package/web/{chunk-cr05dttm.js → chunk-qdsg8wp0.js} +1 -1
- package/web/{chunk-yn4t5s9r.js → chunk-qf2kb7zj.js} +1 -1
- package/web/{chunk-eqndhs21.js → chunk-qv1w36ja.js} +2 -2
- package/web/{chunk-k0cg4n2k.js → chunk-s0xy00v5.js} +2 -2
- package/web/{chunk-zxrbbbtp.js → chunk-s6bc73n3.js} +2 -2
- package/web/{chunk-qh62nkem.js → chunk-sd3cdqcm.js} +2 -2
- package/web/chunk-sdtesqbb.js +1 -0
- package/web/chunk-t0z8ygx4.js +1 -0
- package/web/chunk-t2v01k4z.js +1 -0
- package/web/{chunk-c6m4vfn5.js → chunk-t5ke9cyg.js} +68 -68
- package/web/{chunk-5ym5ffd5.js → chunk-t72z2ww3.js} +2 -2
- package/web/{chunk-0rvwj2wh.js → chunk-t78qm9gs.js} +2 -2
- package/web/{chunk-xvm66b7v.js → chunk-te15yhn5.js} +4 -4
- package/web/{chunk-et1rsgmp.js → chunk-tvaxyhh0.js} +2 -2
- package/web/{chunk-pzg25qqe.js → chunk-vvvd3grf.js} +2 -2
- package/web/{chunk-ss96cz1f.js → chunk-vwv6pqy7.js} +1 -1
- package/web/{chunk-p6e2vr51.js → chunk-vypfy030.js} +6 -6
- package/web/chunk-w7cyrbk2.js +1 -0
- package/web/chunk-w9nkvcjr.js +1 -0
- package/web/{chunk-20jxvmbw.js → chunk-wfgrdabk.js} +1 -1
- package/web/chunk-x2f8bwd2.js +1 -0
- package/web/chunk-xq8x7dvr.js +1 -0
- package/web/chunk-xtss82z2.js +1 -0
- package/web/{chunk-ba9qy65y.js → chunk-yeh77fvq.js} +1 -1
- package/web/{chunk-y9waq403.js → chunk-ymtq18z6.js} +2 -2
- package/web/{chunk-h1k2kqbs.js → chunk-yzmrbssn.js} +4 -4
- package/web/{chunk-ct7z7bea.js → chunk-z5h046zm.js} +3 -3
- package/web/{chunk-qbmtah1x.js → chunk-zf4b8jb9.js} +1 -1
- package/web/index.html +1 -1
- package/web/sw.js +17 -1
- package/chunk-1dbfmejf.js +0 -2
- package/chunk-4w9zqv0k.js +0 -2
- package/chunk-6f4ht2hw.js +0 -2
- package/chunk-edbq461k.js +0 -5
- package/chunk-m71pj3g1.js +0 -2
- package/chunk-n22vd4at.js +0 -2
- package/chunk-sgrrxsnz.js +0 -482
- package/chunk-ydzag81d.js +0 -3
- package/web/chunk-12qf1r6m.js +0 -1
- package/web/chunk-1m6fx2h7.js +0 -2
- package/web/chunk-2n5xbnrt.js +0 -1
- package/web/chunk-36s08nye.js +0 -1
- package/web/chunk-4swea9sn.js +0 -1
- package/web/chunk-4zz5a483.js +0 -1
- package/web/chunk-6y55gk1n.js +0 -1
- package/web/chunk-7aep7k4v.js +0 -1
- package/web/chunk-8tgavnwx.js +0 -1
- package/web/chunk-a00vg115.js +0 -1
- package/web/chunk-a4gbxnm3.js +0 -1
- package/web/chunk-bq6mep6p.js +0 -2
- package/web/chunk-bwy3e58v.js +0 -1
- package/web/chunk-de29pe57.js +0 -1
- package/web/chunk-eeesa5q1.js +0 -1
- package/web/chunk-f7jpakwh.js +0 -1
- package/web/chunk-fp62avjh.js +0 -1
- package/web/chunk-gr163fex.js +0 -1
- package/web/chunk-gx340asc.js +0 -1
- package/web/chunk-gxtz10wf.js +0 -1
- package/web/chunk-k9qnvx86.js +0 -2
- package/web/chunk-kcnj0gan.js +0 -1
- package/web/chunk-kpp5xqsb.js +0 -1
- package/web/chunk-m33yted6.js +0 -1
- package/web/chunk-me5jqqn6.js +0 -1
- package/web/chunk-mzqqwbmr.js +0 -1
- package/web/chunk-mzzaet63.js +0 -1
- package/web/chunk-q34as3v6.js +0 -1
- package/web/chunk-q6c8p73w.js +0 -1
- package/web/chunk-qn93we3a.js +0 -1
- package/web/chunk-r1f1egve.js +0 -1
- package/web/chunk-tt9410zw.js +0 -8
- package/web/chunk-ve8gy05p.js +0 -1142
- package/web/chunk-vg1ebkce.js +0 -1
- package/web/chunk-vnt34mkb.js +0 -1
- package/web/chunk-xh4xn1az.js +0 -1
- package/web/chunk-xrk5ewsn.js +0 -1
- package/web/chunk-xzwxcxb4.js +0 -1
- package/web/chunk-ydhnkws0.js +0 -1
- package/web/chunk-ys2tns0p.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t,a,de,Re,b,C,S,E,T,A,L,R,l,
|
|
1
|
+
import{t,a,de,Re,b,C,S,E,T,A,L,R,l,ln,An,p,nt,rt,M,Fe,pe,le,ce,Ze,Pr,ge,ye}from"./chunk-t5ke9cyg.js";import{Ft}from"./chunk-bzdn9sxz.js";import{qe}from"./chunk-1v6hhgc6.js";import{Bt}from"./chunk-pze2v3v1.js";import{he}from"./chunk-66164wmv.js";import{ue}from"./chunk-k3ah0513.js";var Dt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},U1=new Set([Dt.SHAPE_UNSUPPORTED,Dt.SHAPE_REMOVED,Dt.CONTAINMENT_VIOLATION]),Ds=new Set(Object.values(Dt).filter((e)=>!U1.has(e))),j1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),z1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),W1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),xt="roundedRect";function Tt(e){if(!e)return e;return j1.get(e)??e}t(Tt,"resolveShapeAlias");function v1(e,r){for(let n of e){if(n.isGroup)continue;if(!n.shape||n.shape==="squareRect"||n.shape==="rect")n.shape=xt;if(z1.has(n.shape)){let o=`shape "${n.shape}" was removed in v0.8.1, using "${xt}"`;if(r?.emitError)r.emitError("SHAPE_REMOVED",o,{nodeId:n.id});else a.warn(`agentflow: ${o}`);n.shape=xt;continue}if(!W1.has(n.shape)){let o=`shape "${n.shape}" is not supported, using "${xt}"`;if(r?.emitWarning)r.emitWarning("SHAPE_UNSUPPORTED",o,{nodeId:n.id});else a.warn(`agentflow: ${o}`);n.shape=xt}}}t(v1,"normaliseNodeShapes");var i1=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),F1=i1.size,V1=t((e)=>`af-kind-${e}`,"kindClass"),K1=[...i1.keys()],I1=t((e)=>Math.max(1,e-F1),"containerSlotCount"),L1=t((e,r)=>{let n=F1+e%I1(r);return r>0?n%r:n},"containerSlot");function B1(e,r,n){let o=l().themeVariables?.borderColorArray,d=Array.isArray(o)?o.length:0,h=n.size;for(let u of e??[]){if(u.isGroup||u.shape==="collapsedGroup"){let x=n.get(String(u.id))??h++;u.colorIndex=L1(x,d);continue}let f=r(String(u.id));if(f&&i1.has(f))u.cssClasses=`${u.cssClasses??""} ${V1(f)}`.replace(/\s+/g," ").trim()}}t(B1,"assignColorSlots");var _1="agentflow-",c1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),H1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),Y1={flow:"flowGroup"};function s1(e){if(Array.isArray(e))return e.map((n)=>s1(n));if(e===null||typeof e!=="object")return e;let r={};for(let n of Object.keys(e)){if(n==="__proto__"||n==="constructor"||n==="prototype")continue;r[n]=s1(e[n])}return r}t(s1,"stripPrototypeKeys");function M1(e){let r=!1,n=!1,o=0,d,h=[];for(let u of e.split(`
|
|
2
2
|
`)){if(d!==void 0){let D=u.length-u.trimStart().length;if(u.trim()===""||D>d){h.push(u);continue}d=void 0}let f=-1;for(let D=0;D<u.length;D++){let v=u[D];if(n){if(v==="\\")D++;else if(v==='"')n=!1}else if(r){if(v==="'")r=!1}else if(v==='"')n=!0;else if(v==="'")r=!0;else if(v==="#"&&(D===0||u[D-1]===" "||u[D-1]==="\t")){f=D;break}else if(v==="["||v==="{")o++;else if(v==="]"||v==="}")o=Math.max(0,o-1)}if(r||n||o>0){h.push(u);continue}let x=f>=0?u.slice(0,f):u,m=f>=0?u.slice(f):"";if(/:\s*[>|][\d+-]*\s*$/.test(x)){d=u.length-u.trimStart().length,h.push(u);continue}h.push(x.replace(/,([\t ]*)$/,"$1")+m)}return h.join(`
|
|
3
3
|
`)}t(M1,"stripLineTrailingCommas");var q1=class{constructor(){this.vertexCounter=0,this.config=l(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=S,this.setAccDescription=T,this.setDiagramTitle=L,this.getAccTitle=E,this.getAccDescription=A,this.getDiagramTitle=R,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"AgentFlowDB")}sanitizeText(e){return b.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,n,o,d,h,u={},f,x){if(!e||e.trim().length===0)return;let m;if(f!==void 0){let _;if(!f.includes(`
|
|
4
4
|
`))_=`{
|
|
@@ -6,7 +6,7 @@ import{t,a,de,Re,b,C,S,E,T,A,L,R,l,sn,En,p,nt,rt,M,Fe,pe,le,ce,Ze,Nr,ge,ye}from"
|
|
|
6
6
|
}`;else _=f+`
|
|
7
7
|
`;try{m=rt(_,{schema:nt})??{}}catch(g){let k=f.includes(`
|
|
8
8
|
`)?M1(f):f;if(k!==f)try{m=rt(k+`
|
|
9
|
-
`,{schema:nt})??{}}catch{this.rethrowMetadataYamlError(g,f,x)}else this.rethrowMetadataYamlError(g,f,x)}m=s1(m)}let D;if(m&&typeof m.shape==="string"){let _=m;D=_.shape;let g=Tt(D);if(g&&g!==D)_.shape=g}let v=this.subGraphLookup.get(e);if(v&&m){v.metadata={...v.metadata,...m};return}let P=this.connectors.get(e);if(P&&m){P.metadata={...P.metadata,...m};return}if(e==="connectors")return;let B=this.edges.find((_)=>_.id===e);if(B){let _=m;if(_?.animate!==void 0)B.animate=_.animate;if(_?.animation!==void 0)B.animation=_.animation;if(_?.curve!==void 0)B.interpolate=_.curve;if(m)B.metadata={...B.metadata,...m};return}let W,w=this.vertices.get(e);if(w===void 0)w={id:e,labelType:"text",domId:_1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,w);if(this.vertexCounter++,r!==void 0){if(this.config=l(),W=this.sanitizeText(r.text.trim()),w.labelType=r.type,W.startsWith('"')&&W.endsWith('"'))W=W.substring(1,W.length-1);w.text=W}else if(w.text===void 0)w.text=e;if(n!==void 0)w.type=n;if(o!==void 0&&o!==null)o.forEach((_)=>{w.styles.push(_)});if(d!==void 0&&d!==null)d.forEach((_)=>{w.classes.push(_)});if(h!==void 0)w.dir=h;if(w.props===void 0)w.props=u;else if(u!==void 0)Object.assign(w.props,u);if(m){if(w.metadata={...w.metadata,...m},m.shape){let _=D??m.shape;if(typeof _!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(_)}.`,x);if(_!==_.toLowerCase()||_.includes("_"))throw this.positionedShapeError(`No such shape: ${_}. Shape names should be lowercase.`,x);else if(!
|
|
9
|
+
`,{schema:nt})??{}}catch{this.rethrowMetadataYamlError(g,f,x)}else this.rethrowMetadataYamlError(g,f,x)}m=s1(m)}let D;if(m&&typeof m.shape==="string"){let _=m;D=_.shape;let g=Tt(D);if(g&&g!==D)_.shape=g}let v=this.subGraphLookup.get(e);if(v&&m){v.metadata={...v.metadata,...m};return}let P=this.connectors.get(e);if(P&&m){P.metadata={...P.metadata,...m};return}if(e==="connectors")return;let B=this.edges.find((_)=>_.id===e);if(B){let _=m;if(_?.animate!==void 0)B.animate=_.animate;if(_?.animation!==void 0)B.animation=_.animation;if(_?.curve!==void 0)B.interpolate=_.curve;if(m)B.metadata={...B.metadata,...m};return}let W,w=this.vertices.get(e);if(w===void 0)w={id:e,labelType:"text",domId:_1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,w);if(this.vertexCounter++,r!==void 0){if(this.config=l(),W=this.sanitizeText(r.text.trim()),w.labelType=r.type,W.startsWith('"')&&W.endsWith('"'))W=W.substring(1,W.length-1);w.text=W}else if(w.text===void 0)w.text=e;if(n!==void 0)w.type=n;if(o!==void 0&&o!==null)o.forEach((_)=>{w.styles.push(_)});if(d!==void 0&&d!==null)d.forEach((_)=>{w.classes.push(_)});if(h!==void 0)w.dir=h;if(w.props===void 0)w.props=u;else if(u!==void 0)Object.assign(w.props,u);if(m){if(w.metadata={...w.metadata,...m},m.shape){let _=D??m.shape;if(typeof _!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(_)}.`,x);if(_!==_.toLowerCase()||_.includes("_"))throw this.positionedShapeError(`No such shape: ${_}. Shape names should be lowercase.`,x);else if(!Pr(m.shape))throw this.positionedShapeError(`No such shape: ${m.shape}.`,x);w.type=m?.shape}if(m?.label)w.text=this.sanitizeText(m.label),w.labelType=this.sanitizeNodeLabelType(m?.labelType)}}positionedShapeError(e,r){let n=Error(e);if(!r)return n;let o=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:o-1,loc:{first_line:o,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,r,n){let o=e;if(!o||o.name!=="YAMLException"||!o.mark||!n)throw e;let d;try{let h=!r.includes(`
|
|
10
10
|
`),u=h?`{
|
|
11
11
|
`+r+`
|
|
12
12
|
}`:r+`
|
|
@@ -19,7 +19,7 @@ ${w.join(`
|
|
|
19
19
|
|
|
20
20
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
21
21
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
22
|
-
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let o=this.isLinkData(n)?n.id.replace("@",""):void 0;a.info("addLink",e,r,o);for(let d of e)for(let h of r){let u=d===e[e.length-1],f=h===r[0];if(u&&f)this.addSingleLink(d,h,n,o);else this.addSingleLink(d,h,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((o)=>o?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((o)=>{let d=this.classes.get(o);if(d===void 0)d={id:o,styles:[],textStyles:[]},this.classes.set(o,d);if(n!==void 0&&n!==null)n.forEach((h)=>{if(/color/.exec(h)){let u=h.replace("fill","bgFill");d.textStyles.push(u)}d.styles.push(h)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let o=this.vertices.get(n);if(o)o.classes.push(r);let d=this.edges.find((u)=>u.id===n);if(d)d.classes.push(r);let h=this.subGraphLookup.get(n);if(h)h.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(l().securityLevel!=="loose")return;if(r===void 0)return;let o=[];if(typeof n==="string"){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<o.length;h++){let u=o[h].trim();if(u.startsWith('"')&&u.endsWith('"'))u=u.substr(1,u.length-2);o[h]=u}}if(o.length===0)o.push(e);let d=this.vertices.get(e);if(d)d.haveCallback=!0,this.funs.push(()=>{let h=this.lookUpDomId(e),u=document.querySelector(`[id="${h}"]`);if(u!==null)u.addEventListener("click",()=>{M.runFunc(r,...o)},!1)})}setLink(e,r,n){e.split(",").forEach((o)=>{let d=this.vertices.get(o);if(d!==void 0)d.link=M.formatUrl(r,this.config),d.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((o)=>{this.setClickFun(o,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return H1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=Ft();p(e).select("svg").selectAll("g.node").on("mouseover",(d)=>{let h=p(d.currentTarget),u=h.attr("title");if(u===null)return;let f=d.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(h.attr("title")).style("left",window.scrollX+f.left+(f.right-f.left)/2+"px").style("top",window.scrollY+f.bottom+"px"),r.html(Re.sanitize(u)),h.classed("hover",!0)}).on("mouseout",(d)=>{r.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=l(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,C()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,o){let d=e?.text?.trim(),h=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))d=void 0;let f=t((B)=>{let W={boolean:{},number:{},string:{}},w=[],_;return{nodeList:B.filter(function(k){let y=typeof k;if(k.stmt&&k.stmt==="dir")return _=k.value,!1;if(k.trim()==="")return!1;if(y in W)return W[y].hasOwnProperty(k)?!1:W[y][k]=!0;else return w.includes(k)?!1:w.push(k)}),dir:_}},"uniq")(r.flat()),{nodeList:x,dir:m}=f,D=l().flowchart??{};if(m=m??(D.inheritDir?this.getDirection()??l().direction??void 0:void 0),this.version==="gen-1")for(let B=0;B<x.length;B++)x[B]=this.lookUpDomId(x[B]);d=d??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;let v={id:d,nodes:x.filter((B)=>B!==d&&!this.globalNodes.has(B)),title:h.trim(),classes:[],dir:m,labelType:this.sanitizeNodeLabelType(n?.type),type:o??"flow"};a.info("Adding",v.id,v.nodes,v.dir),v.nodes=this.makeUniq(v,this.subGraphs).nodes;let P=this.getPosForId(d);if(P!==-1){let B=this.subGraphs[P];for(let W of v.nodes)if(!B.nodes.includes(W))B.nodes.push(W);if(v.title)B.title=v.title;if(v.dir)B.dir=v.dir;if(v.type)B.type=v.type;this.subGraphLookup.set(d,B)}else this.subGraphs.push(v),this.subGraphLookup.set(d,v);return d}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let o=0,d=1;while(o<n.length){let h=this.getPosForId(n[o]);if(h>=0){let u=this.indexNodes2(e,h);if(u.result)return{result:!0,count:d+u.count};else d=d+u.count}o=o+1}return{result:!1,count:d}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let o=r?.text?.trim()??"",d=o.length>0?this.sanitizeText(o):n,h=this.connectors.get(n);if(!h)h={id:n,labelType:"text",domId:_1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:d},this.connectors.set(n,h),this.vertices.set(n,h),this.vertexCounter++;else if(o.length>0)h.text=d;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",o="normal";if(r.includes("."))o="dotted";return{type:"arrow_open",stroke:o}}countChar(e,r){let n=r.length,o=0;for(let d=0;d<n;++d)if(r[d]===e)++o;return o}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross";break;case">":o="arrow_point";break;case"-":case".":o="arrow_open",n=r;break}let d="normal",h=n.length-1,u=this.countChar(".",n);if(u>0)d="dotted",h=u;return{type:o,stroke:d,length:h}}destructLink(e,r){let n=this.destructEndLink(e),o;if(r){if(o=this.destructStartLink(r),o.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return o.type=n.type,o.length=n.length,{...o,edgeSemantic:this.computeEdgeSemantic(o.type,o.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((o,d)=>{if(!this.exists(r,o))n.push(e.nodes[d])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?Tt(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,o,d,h){let u=n.get(e.id),f=o.get(e.id)??!1,x=this.findNode(r,e.id);if(x)x.cssStyles=e.styles,x.cssCompiledStyles=this.getCompiledStyles(e.classes),x.cssClasses=e.classes.join(" ");else{let m={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:u,padding:d.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:h,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(f)r.push({...m,isGroup:!0,shape:"rect"});else r.push({...m,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:d.agentflow?.wrappingWidth,minWidth:d.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let o=this.classes.get(n);if(o?.styles)r=[...r,...o.styles??[]].map((d)=>d.trim());if(o?.textStyles)r=[...r,...o.textStyles??[]].map((d)=>d.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=l(),r=[],n=[],o=this.getSubGraphs(),d=new Map,h=new Map,u=new Set,f=new Map,x=t((g,k,y=new Set)=>{if(y.has(g))return;y.add(g);let q=this.subGraphLookup.get(g);if(!q)return;for(let Ce of q.nodes){if(Ce===k||y.has(Ce))continue;u.add(Ce),f.set(Ce,k),x(Ce,k,y)}},"collectDescendants");for(let g of o)if(g.metadata?.view==="collapsed"&&!u.has(g.id))x(g.id,g.id);let m=t((g,k)=>{let y=new Set,q=k;while(q!==void 0&&!y.has(q)){if(q===g)return!0;y.add(q),q=d.get(q)}return!1},"wouldCloseContainmentCycle");for(let g=o.length-1;g>=0;g--){let k=o[g];if(u.has(k.id))continue;if(k.nodes.length>0)h.set(k.id,!0);for(let y of k.nodes){if(m(y,k.id)){this.emitWarning(Dt.CONTAINMENT_VIOLATION,`Container "${k.id}" cannot contain "${y}" because "${y}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:y});continue}d.set(y,k.id)}}for(let g=o.length-1;g>=0;g--){let k=o[g];if(u.has(k.id))continue;if(k.metadata?.view==="collapsed"){let q={...k.metadata,containerType:k.type};r.push({id:k.id,label:k.title,labelStyle:"",labelType:k.labelType,parentId:d.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:"collapsedGroup",dir:k.dir,isGroup:!1,look:e.look,metadata:q})}else r.push({id:k.id,label:k.title,labelStyle:"",labelType:k.labelType,parentId:d.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:Y1[k.type??"flow"],dir:k.dir,isGroup:!0,look:e.look,metadata:k.metadata})}this.getVertices().forEach((g)=>{if(u.has(g.id))return;this.addNodeFromVertex(g,r,d,h,e,e.look||"classic")});let v=this.getEdges();v.forEach((g,k)=>{let y=f.get(g.start)??g.start,q=f.get(g.end)??g.end;if(y===q&&g.start!==g.end)return;let{arrowTypeStart:Ce,arrowTypeEnd:Ie}=this.destructEdgeType(g.type),ve=[...v.defaultStyle??[]];if(g.style)ve.push(...g.style);let Le={id:Fe(y,q,{counter:k,prefix:"L"},g.id),isUserDefinedId:g.isUserDefinedId,start:y,end:q,type:g.type??"normal",label:g.text,labelType:g.labelType,labelpos:"c",thickness:g.stroke,minlen:g.length,classes:g?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ce,arrowTypeEnd:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ie,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(g.classes),labelStyle:ve,style:ve,pattern:g.stroke,look:e.look,animate:g.animate,animation:g.animation,curve:g.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:g.metadata};n.push(Le)}),v1(r,this);let P=new Map,B=new Map;for(let g of o){let k=d.get(g.id);if(k!==void 0)B.set(k,[...B.get(k)??[],g.id])}let W=0,w=t((g)=>{if(P.has(g))return;P.set(g,W++);for(let k of B.get(g)??[])w(k)},"walkContainers");for(let g of o)if(d.get(g.id)===void 0)w(g.id);let _=new Set(this.getConnectors().map((g)=>g.id));return B1(r,(g)=>{if(_.has(g))return"connector";let k=this.vertices.get(g);return k?this.deriveVertexKind(k,Tt(k.type)):void 0},P),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return En.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((u)=>u.id)),r=[],n=[];for(let[u,f]of this.vertices){if(e.has(u))continue;if(f.isConnector){let D={id:u};if(f.text!==void 0&&f.text!==u)D.title=f.text;if(f.metadata&&Object.keys(f.metadata).length>0){let v={};for(let[P,B]of Object.entries(f.metadata)){if(c1.has(P))continue;v[P]=B}if(Object.keys(v).length>0)D.metadata=v}n.push(D);continue}let x={id:u};if(f.text!==void 0)x.label=f.text;let m=typeof f.type==="string"?Tt(f.type):f.type;if(m!==void 0)x.shape=m;if(x.vertexKind=this.deriveVertexKind(f,m),f.metadata&&Object.keys(f.metadata).length>0){let D={};for(let[v,P]of Object.entries(f.metadata)){if(c1.has(v))continue;D[v]=P}if(Object.keys(D).length>0)x.metadata=D}r.push(x)}let o=this.edges.map((u)=>{let f={start:u.start,end:u.end};if(u.id!==void 0)f.id=u.id;if(typeof u.text==="string"&&u.text.length>0)f.label=u.text;if(u.type!==void 0)f.type=u.type;if(u.stroke!==void 0)f.stroke=u.stroke;if(u.edgeSemantic!==void 0)f.edgeSemantic=u.edgeSemantic;if(u.length!==void 0)f.length=u.length;if(u.metadata&&Object.keys(u.metadata).length>0)f.metadata={...u.metadata};return f}),d=this.subGraphs.map((u)=>{let f={id:u.id,nodes:[...u.nodes]};if(u.type!==void 0)f.type=u.type;if(u.title!==void 0)f.title=u.title;if(u.dir!==void 0)f.direction=u.dir;if(u.metadata&&Object.keys(u.metadata).length>0){let x={};for(let[m,D]of Object.entries(u.metadata)){if(c1.has(m))continue;x[m]=D}if(Object.keys(x).length>0)f.metadata=x}return f}),h={vertices:r,edges:o,subGraphs:d,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)h.direction=this.direction;return h}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,o=e?.last_line??r,d=e?.last_column??n,[h,u]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:o+this.frontmatterLineOffset,endColumn:d,startIndex:h,endIndex:u}}pushMapping(e,r,n){if(!e)return;let o={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(o),o}addVertexMapping(e,r,n,o){let d=this.pushMapping(e,"vertex",o);if(d&&n==null)this.bareVertexMappings.add(d)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let o=this.elementMappings.length-1;o>=0;o--){let d=this.elementMappings[o];if(d.type==="vertex"&&d.id===e){if(this.bareVertexMappings.has(d))d.type="attachment",this.bareVertexMappings.delete(d);if(n.endLine>d.position.endLine||n.endLine===d.position.endLine&&n.endColumn>d.position.endColumn)d.position.endLine=n.endLine,d.position.endColumn=n.endColumn,d.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,o){let d=Array.isArray(r)?r.map((u)=>typeof u==="string"?u:u?.id??"").filter(Boolean):[],h=d.length>0?d.join(">"):"edge";this.pushMapping(h,"edge",o)}addSubgraphMapping(e,r,n,o){let d=(typeof e==="string"?e:e?.text)??"",h=this.toElementPosition(n),u=o?this.toElementPosition(o):h;if(!d)return;this.elementMappings.push({id:d,type:"subgraph",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:u.endLine,endColumn:u.endColumn,startIndex:h.startIndex,endIndex:u.endIndex}})}addConnectorMapping(e,r,n,o){let d=e?.text?.trim()??"";if(!d)return;let h=this.toElementPosition(n),u=o?this.toElementPosition(o):h;this.elementMappings.push({id:d,type:"connector",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:u.endLine,endColumn:u.endColumn,startIndex:h.startIndex,endIndex:u.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((d)=>{let{startLine:h,startColumn:u,endLine:f,endColumn:x}=d.position;if(e<h||e>f)return!1;if(e===h&&r<u)return!1;if(e===f&&r>x)return!1;return!0});if(n.length===0)return;let o=t(({position:d})=>[d.endLine-d.startLine,d.endColumn-d.startColumn],"span");return n.reduce((d,h)=>{let[u,f]=o(d),[x,m]=o(h);if(x!==u)return x<u?h:d;return m<f?h:d})}getMappingStats(){let e=0,r=0,n=0,o=0,d=0;for(let h of this.elementMappings)if(h.type==="vertex")e++;else if(h.type==="edge")r++;else if(h.type==="subgraph")n++;else if(h.type==="connector")o++;else if(h.type==="attachment")d++;return{vertices:e,edges:r,subgraphs:n,connectors:o,attachments:d,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,o){let d=o?.nodeId??o?.edgeId,h=d?this.getElementById(d):void 0,u={id:e,severity:r,message:n,...o?.nodeId?{nodeId:o.nodeId}:{},...o?.edgeId&&!o?.nodeId?{edgeId:o.edgeId}:{},...h?{position:h.position}:{}};if(this.diagnostics.some((m)=>m.id===u.id&&m.severity===u.severity&&m.message===u.message&&m.nodeId===u.nodeId&&m.edgeId===u.edgeId))return;this.diagnostics.push(u);let x=`agentflow[${e}]: ${n}`;if(r==="error")a.error(x);else a.warn(x)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},X1=t(function(e,r){return r.db.getClasses()},"getClasses"),Q1=t(async function(e,r,n,o){a.debug("Drawing agentflow diagram",r);let{securityLevel:d,agentflow:h,layout:u}=l();o.db.setDiagramId(r),a.debug("Before getData: ");let f=o.db.getData();a.debug("Data: ",f);let x=he(r,d),m=o.db.getDirection();if(f.type=o.type,f.layoutAlgorithm=ye(u),f.layoutAlgorithm==="dagre"&&u==="elk")a.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");f.direction=m,f.nodeSpacing=h?.nodeSpacing||50,f.rankSpacing=h?.rankSpacing||50,f.markers=["point","circle","cross","hierarchy"],f.diagramId=r,a.debug("REF1:",f),await ge(f,x);let D=h?.diagramPadding??8;M.insertTitle(x,"agentflowTitleText",h?.titleTopMargin??0,o.db.getDiagramTitle()),ue(x,D,"agentflow",h?.useMaxWidth??!0)},"draw"),J1={getClasses:X1,draw:Q1},d1=function(){var e=t(function(Ke,F,V,I){for(V=V||{},I=Ke.length;I--;V[Ke[I]]=F);return V},"o"),r=[1,5],n=[1,4],o=[1,3],d=[1,6],h=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],u=[2,2],f=[1,15],x=[1,16],m=[1,17],D=[1,18],v=[1,19],P=[1,26],B=[1,27],W=[1,28],w=[1,30],_=[1,31],g=[1,32],k=[1,55],y=[1,54],q=[1,34],Ce=[1,35],Ie=[1,36],ve=[1,37],Le=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],He=[1,39],Ye=[1,40],Xe=[1,41],Qe=[1,42],Je=[1,43],ze=[1,64],N=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ke=[1,70],me=[1,68],Ae=[1,67],Ee=[1,69],st=[8,9,10,12,78,80,81],it=[1,88],at=[1,101],ot=[1,106],ut=[1,105],lt=[1,102],ct=[1,98],dt=[1,104],ht=[1,100],pt=[1,107],ft=[1,103],gt=[1,108],bt=[1,99],$e=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],xe=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],h1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],kt=[47,63,92,105,108,109,112,114,117,118,119],p1=[1,131],f1=[1,132],_t=[1,134],vt=[1,133],g1=[47,63,65,77,92,105,108,109,112,114,117,118,119],Vt=[1,143],It=[1,157],Lt=[1,158],Mt=[1,159],yt=[1,162],wt=[1,161],Nt=[1,160],Rt=[1,145],Ot=[1,147],Pt=[1,151],b1=[1,139],k1=[1,140],Gt=[1,152],Ut=[1,153],jt=[1,154],zt=[1,155],Wt=[1,156],Kt=[1,163],Ht=[1,164],Yt=[1,141],qt=[1,142],Xt=[1,149],Qt=[1,144],Jt=[1,148],Zt=[1,146],mt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],m1=[1,168],At=[1,170],X=[8,9,10,12],Te=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],G=[1,190],fe=[1,186],be=[1,187],U=[1,191],j=[1,188],z=[1,189],Et=[80,119,122],K=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],A1=[11,109],We=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Be=[1,269],Me=[1,267],we=[1,271],Ne=[1,265],Oe=[1,266],Pe=[1,268],Ge=[1,270],Ue=[1,272],Ct=[1,292],E1=[8,9,10,12,109],Ve=[8,9,10,11,12,63,87,108,109,112,113,114,115],r1={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(F,V,I,c,H,s,O){var i=s.length-1;switch(H){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:c.setDirection("TB"),this.$="TB";break;case 14:c.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-6],s[i-4],O[i-8],O[i]);break;case 39:if(this.$=c.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],O[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-7],s[i-5],O[i-9],O[i]);break;case 40:if(this.$=c.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-3],{text:"",type:"text"},O[i-5],O[i]);break;case 41:if(this.$=c.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],O[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-4],{text:"",type:"text"},O[i-6],O[i]);break;case 42:if(this.$=c.addSubGraph(void 0,s[i-1],void 0,"flow"),c.addSubgraphMapping)c.addSubgraphMapping(void 0,void 0,O[i-3],O[i]);break;case 43:c.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=c.addConnector(s[i-4],s[i-2]),c.addConnectorMapping)c.addConnectorMapping(s[i-4],s[i-2],O[i-6],O[i]);break;case 45:if(this.$=c.addConnector(s[i-5],s[i-3]),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],O[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-5],s[i-3],O[i-7],O[i]);break;case 46:if(this.$=c.addConnector(s[i-1],{text:"",type:"text"}),c.addConnectorMapping)c.addConnectorMapping(s[i-1],{text:"",type:"text"},O[i-3],O[i]);break;case 47:if(this.$=c.addConnector(s[i-2],{text:"",type:"text"}),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],O[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-2],{text:"",type:"text"},O[i-4],O[i]);break;case 49:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],O[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],O[i]);if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(c.addLink(s[i-2].stmt,s[i],s[i-1]),c.addEdgeMapping)c.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],O[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],O[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(c.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],O[i-4]),c.extendVertexMapping)c.extendVertexMapping(s[i-5][s[i-5].length-1],O[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),c.addVertexMapping)c.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],c.addVertex(s[i]),c.addVertexMapping)c.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1]};break;case 91:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic};break;case 97:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:o,13:d},{1:[3]},e(h,u,{5:7}),{4:8,8:r,10:n,11:o,13:d},{4:9,8:r,10:n,11:o,13:d},{4:10,8:r,10:n,11:o,13:d},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(h,[2,10]),e(h,[2,11]),e(h,[2,12]),e(h,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:ze,16:59,19:62},e(N,[2,3]),e(N,[2,4]),e(N,[2,5]),e(N,[2,6]),e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),{8:ke,9:me,10:Ae,12:Ee,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ke,9:me,10:Ae,12:Ee,22:75},{8:ke,9:me,10:Ae,12:Ee,22:76},{8:ke,9:me,10:Ae,12:Ee,22:77},{8:ke,9:me,10:Ae,12:Ee,22:78},{8:ke,9:me,10:Ae,12:Ee,22:79},{8:ke,9:me,10:Ae,11:[1,80],12:Ee,22:81},{8:ke,9:me,10:Ae,12:Ee,22:82},{11:[1,83]},e(N,[2,48]),{39:[1,84]},{41:[1,85]},e(N,[2,51]),e(st,[2,63],{19:86,34:87,11:ze,43:it}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:at,47:ot,63:ut,83:[1,96],92:lt,98:[1,93],100:[1,94],104:95,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},e(N,[2,200]),e(N,[2,201]),e(N,[2,202]),e(N,[2,203]),e(N,[2,204]),e($e,[2,64]),e($e,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:k,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:y,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(xe,[2,196]),e(xe,[2,157]),e(xe,[2,158]),e(xe,[2,159]),e(xe,[2,160]),e(xe,[2,161]),e(xe,[2,162]),e(xe,[2,163]),e(xe,[2,164]),e(xe,[2,165]),e(xe,[2,166]),e(xe,[2,167]),e(h,[2,14]),e(h,[2,20]),e(h,[2,21]),{10:[1,123]},e(h,[2,23]),e(h1,[2,31],{19:124,11:ze}),e(N,[2,32]),{45:125,46:44,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(N,[2,52]),e(N,[2,53]),e(N,[2,54]),e(N,[2,55]),e(kt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:p1,84:f1,119:_t,122:vt},{78:[1,135],80:[1,136]},e(g1,[2,96]),e(N,[2,33]),e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),{11:Vt,13:It,15:Lt,28:Mt,29:137,33:yt,35:wt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(mt,u,{5:165}),e(mt,u,{5:166}),{11:Vt,13:It,15:Lt,28:Mt,29:167,33:yt,35:wt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(N,[2,49]),e(N,[2,50]),e(st,[2,61],{47:m1}),e(st,[2,62],{19:169,11:ze,43:At}),e($e,[2,57]),{47:k,50:171,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:k,50:175,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:k,50:176,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,132],{11:[1,182]}),e(Te,[2,198]),e(Te,[2,185]),e(Te,[2,186]),e(Te,[2,187]),e(Te,[2,188]),e(Te,[2,189]),e(Te,[2,190]),e(Te,[2,191]),e(Te,[2,192]),e(Te,[2,193]),e(Te,[2,194]),e(Te,[2,195]),{47:k,50:183,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:192,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:194,53:[1,193],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:195,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:196,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:197,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{112:[1,198]},{31:199,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:200,68:[1,201],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:202,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:203,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:204,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(xe,[2,197]),e(h,[2,22]),e(h1,[2,30]),e(st,[2,59],{34:205,19:206,11:ze,43:it}),e(kt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{80:[1,210],82:211,119:_t,122:vt},e(Et,[2,92]),e(Et,[2,94]),e(Et,[2,95]),e(Et,[2,183]),e(Et,[2,184]),{79:212,82:130,83:p1,84:f1,119:_t,122:vt},e(g1,[2,97]),{8:ke,9:me,10:Ae,11:Vt,12:Ee,13:It,15:Lt,22:214,28:Mt,30:[1,213],33:yt,34:215,35:wt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(K,[2,116]),e(K,[2,118]),e(K,[2,119]),e(K,[2,172]),e(K,[2,173]),e(K,[2,174]),e(K,[2,175]),e(K,[2,176]),e(K,[2,177]),e(K,[2,178]),e(K,[2,179]),e(K,[2,180]),e(K,[2,181]),e(K,[2,182]),e(K,[2,103]),e(K,[2,104]),e(K,[2,105]),e(K,[2,106]),e(K,[2,107]),e(K,[2,108]),e(K,[2,109]),e(K,[2,110]),e(K,[2,111]),e(K,[2,112]),e(K,[2,113]),e(K,[2,114]),e(K,[2,115]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,217],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,218],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{8:ke,9:me,10:Ae,11:Vt,12:Ee,13:It,15:Lt,22:220,28:Mt,30:[1,219],33:yt,34:221,35:wt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},{11:ze,19:222},{47:[1,223]},e($e,[2,56]),{11:[1,224],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(A1,[2,143]),{11:[1,228],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(Te,[2,199]),{83:[1,234],101:[1,235]},e($e,[2,68],{116:122,47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:G,85:237,119:U,120:j,121:z},e(We,[2,99]),e(We,[2,101]),e(We,[2,102]),e(We,[2,168]),e(We,[2,169]),e(We,[2,170]),e(We,[2,171]),{52:[1,238],70:G,85:237,119:U,120:j,121:z},{31:239,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{54:[1,240],70:G,85:237,119:U,120:j,121:z},{56:[1,241],70:G,85:237,119:U,120:j,121:z},{58:[1,242],70:G,85:237,119:U,120:j,121:z},{60:[1,243],70:G,85:237,119:U,120:j,121:z},{63:[1,244]},{67:[1,245],70:G,85:237,119:U,120:j,121:z},{69:[1,246],70:G,85:237,119:U,120:j,121:z},{31:247,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{32:[1,248],70:G,85:237,119:U,120:j,121:z},{70:G,72:[1,249],74:[1,250],85:237,119:U,120:j,121:z},{70:G,72:[1,252],74:[1,251],85:237,119:U,120:j,121:z},e(st,[2,58],{19:169,11:ze,43:At}),e(st,[2,60],{47:m1}),e(kt,[2,88]),e(kt,[2,87]),{65:[1,253],70:G,85:237,119:U,120:j,121:z},e(kt,[2,90]),e(Et,[2,93]),{80:[1,254],82:211,119:_t,122:vt},{31:255,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(mt,u,{5:256}),{8:ke,9:me,10:Ae,12:Ee,22:257,43:At},e(K,[2,117]),e(N,[2,42]),e(N,[2,43]),{31:258,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(N,[2,46]),{8:ke,9:me,10:Ae,12:Ee,22:259,43:At},{46:260,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:ze,19:261},{11:Be,63:Me,87:we,95:262,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:273,107:[1,274],108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:275,107:[1,276],108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{108:[1,277]},{11:Be,63:Me,87:we,95:278,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{47:k,50:279,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(We,[2,100]),e(oe,[2,70]),{54:[1,284],70:G,85:237,119:U,120:j,121:z},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:G,85:237,119:U,120:j,121:z},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(kt,[2,91]),{32:[1,287],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,288],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(mt,u,{5:289}),{32:[1,290],70:G,85:237,119:U,120:j,121:z},e(N,[2,47]),e($e,[2,66]),{46:291,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:Ct}),e(E1,[2,145],{111:293,11:Be,63:Me,87:we,108:Ne,112:Oe,113:Pe,114:Ge,115:Ue}),e(Ve,[2,147]),e(Ve,[2,149]),e(Ve,[2,150]),e(Ve,[2,151]),e(Ve,[2,152]),e(Ve,[2,153]),e(Ve,[2,154]),e(Ve,[2,155]),e(Ve,[2,156]),e(X,[2,137],{109:Ct}),{11:[1,294]},e(X,[2,138],{109:Ct}),{11:[1,295]},e(A1,[2,144]),e(X,[2,120],{109:Ct}),e(X,[2,121],{116:122,47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ke,9:me,10:Ae,12:Ee,22:301,34:302,43:it},e(N,[2,40]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,303],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{8:ke,9:me,10:Ae,12:Ee,22:304,34:305,43:it},e($e,[2,65]),{11:Be,63:Me,87:we,108:Ne,110:306,111:264,112:Oe,113:Pe,114:Ge,115:Ue},e(Ve,[2,148]),{15:at,47:ot,63:ut,92:lt,104:307,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{15:at,47:ot,63:ut,92:lt,104:308,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(oe,[2,79]),e(mt,u,{5:311}),{8:ke,9:me,10:Ae,12:Ee,22:312,43:At},e(N,[2,41]),e(N,[2,44]),{8:ke,9:me,10:Ae,12:Ee,22:313,43:At},e(E1,[2,146],{111:293,11:Be,63:Me,87:we,108:Ne,112:Oe,113:Pe,114:Ge,115:Ue}),e(X,[2,141],{123:181,11:[1,314],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,142],{123:181,11:[1,315],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,129]),{32:[1,316],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,317],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(mt,u,{5:318}),e(N,[2,45]),{11:Be,63:Me,87:we,95:319,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:320,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},e(oe,[2,75]),e(N,[2,38]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,321],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(X,[2,139],{109:Ct}),e(X,[2,140],{109:Ct}),e(N,[2,39])],defaultActions:{},parseError:t(function(F,V){if(V.recoverable)this.trace(F);else{var I=Error(F);throw I.hash=V,I}},"parseError"),parse:t(function(F){var V=this,I=[0],c=[],H=[null],s=[],O=this.table,i="",Y=0,C1=0,S1=0,R1=2,x1=1,O1=s.slice.call(arguments,1),ae=Object.create(this.lexer),et={yy:{}};for(var n1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,n1))et.yy[n1]=this.yy[n1];if(ae.setInput(F,et.yy),et.yy.lexer=ae,et.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var a1=ae.yylloc;s.push(a1);var P1=ae.options&&ae.options.ranges;if(typeof et.yy.parseError==="function")this.parseError=et.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function G1(_e){I.length=I.length-2*_e,H.length=H.length-_e,s.length=s.length-_e}t(G1,"popStack");function T1(){var _e=c.pop()||ae.lex()||x1;if(typeof _e!=="number"){if(_e instanceof Array)c=_e,_e=c.pop();_e=V.symbols_[_e]||_e}return _e}t(T1,"lex");var Se,o1,tt,De,is,u1,St={},e1,je,D1,t1;while(!0){if(tt=I[I.length-1],this.defaultActions[tt])De=this.defaultActions[tt];else{if(Se===null||typeof Se>"u")Se=T1();De=O[tt]&&O[tt][Se]}if(typeof De>"u"||!De.length||!De[0]){var l1="";t1=[];for(e1 in O[tt])if(this.terminals_[e1]&&e1>R1)t1.push("'"+this.terminals_[e1]+"'");if(ae.showPosition)l1="Parse error on line "+(Y+1)+`:
|
|
22
|
+
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let o=this.isLinkData(n)?n.id.replace("@",""):void 0;a.info("addLink",e,r,o);for(let d of e)for(let h of r){let u=d===e[e.length-1],f=h===r[0];if(u&&f)this.addSingleLink(d,h,n,o);else this.addSingleLink(d,h,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((o)=>o?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((o)=>{let d=this.classes.get(o);if(d===void 0)d={id:o,styles:[],textStyles:[]},this.classes.set(o,d);if(n!==void 0&&n!==null)n.forEach((h)=>{if(/color/.exec(h)){let u=h.replace("fill","bgFill");d.textStyles.push(u)}d.styles.push(h)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let o=this.vertices.get(n);if(o)o.classes.push(r);let d=this.edges.find((u)=>u.id===n);if(d)d.classes.push(r);let h=this.subGraphLookup.get(n);if(h)h.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(l().securityLevel!=="loose")return;if(r===void 0)return;let o=[];if(typeof n==="string"){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h<o.length;h++){let u=o[h].trim();if(u.startsWith('"')&&u.endsWith('"'))u=u.substr(1,u.length-2);o[h]=u}}if(o.length===0)o.push(e);let d=this.vertices.get(e);if(d)d.haveCallback=!0,this.funs.push(()=>{let h=this.lookUpDomId(e),u=document.querySelector(`[id="${h}"]`);if(u!==null)u.addEventListener("click",()=>{M.runFunc(r,...o)},!1)})}setLink(e,r,n){e.split(",").forEach((o)=>{let d=this.vertices.get(o);if(d!==void 0)d.link=M.formatUrl(r,this.config),d.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((o)=>{this.setClickFun(o,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return H1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=Ft();p(e).select("svg").selectAll("g.node").on("mouseover",(d)=>{let h=p(d.currentTarget),u=h.attr("title");if(u===null)return;let f=d.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(h.attr("title")).style("left",window.scrollX+f.left+(f.right-f.left)/2+"px").style("top",window.scrollY+f.bottom+"px"),r.html(Re.sanitize(u)),h.classed("hover",!0)}).on("mouseout",(d)=>{r.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=l(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,C()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,o){let d=e?.text?.trim(),h=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))d=void 0;let f=t((B)=>{let W={boolean:{},number:{},string:{}},w=[],_;return{nodeList:B.filter(function(k){let y=typeof k;if(k.stmt&&k.stmt==="dir")return _=k.value,!1;if(k.trim()==="")return!1;if(y in W)return W[y].hasOwnProperty(k)?!1:W[y][k]=!0;else return w.includes(k)?!1:w.push(k)}),dir:_}},"uniq")(r.flat()),{nodeList:x,dir:m}=f,D=l().flowchart??{};if(m=m??(D.inheritDir?this.getDirection()??l().direction??void 0:void 0),this.version==="gen-1")for(let B=0;B<x.length;B++)x[B]=this.lookUpDomId(x[B]);d=d??"subGraph"+this.subCount,h=h||"",h=this.sanitizeText(h),this.subCount=this.subCount+1;let v={id:d,nodes:x.filter((B)=>B!==d&&!this.globalNodes.has(B)),title:h.trim(),classes:[],dir:m,labelType:this.sanitizeNodeLabelType(n?.type),type:o??"flow"};a.info("Adding",v.id,v.nodes,v.dir),v.nodes=this.makeUniq(v,this.subGraphs).nodes;let P=this.getPosForId(d);if(P!==-1){let B=this.subGraphs[P];for(let W of v.nodes)if(!B.nodes.includes(W))B.nodes.push(W);if(v.title)B.title=v.title;if(v.dir)B.dir=v.dir;if(v.type)B.type=v.type;this.subGraphLookup.set(d,B)}else this.subGraphs.push(v),this.subGraphLookup.set(d,v);return d}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let o=0,d=1;while(o<n.length){let h=this.getPosForId(n[o]);if(h>=0){let u=this.indexNodes2(e,h);if(u.result)return{result:!0,count:d+u.count};else d=d+u.count}o=o+1}return{result:!1,count:d}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let o=r?.text?.trim()??"",d=o.length>0?this.sanitizeText(o):n,h=this.connectors.get(n);if(!h)h={id:n,labelType:"text",domId:_1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:d},this.connectors.set(n,h),this.vertices.set(n,h),this.vertexCounter++;else if(o.length>0)h.text=d;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",o="normal";if(r.includes("."))o="dotted";return{type:"arrow_open",stroke:o}}countChar(e,r){let n=r.length,o=0;for(let d=0;d<n;++d)if(r[d]===e)++o;return o}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),o="arrow_open";switch(r.slice(-1)){case"x":o="arrow_cross";break;case">":o="arrow_point";break;case"-":case".":o="arrow_open",n=r;break}let d="normal",h=n.length-1,u=this.countChar(".",n);if(u>0)d="dotted",h=u;return{type:o,stroke:d,length:h}}destructLink(e,r){let n=this.destructEndLink(e),o;if(r){if(o=this.destructStartLink(r),o.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return o.type=n.type,o.length=n.length,{...o,edgeSemantic:this.computeEdgeSemantic(o.type,o.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((o,d)=>{if(!this.exists(r,o))n.push(e.nodes[d])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?Tt(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,o,d,h){let u=n.get(e.id),f=o.get(e.id)??!1,x=this.findNode(r,e.id);if(x)x.cssStyles=e.styles,x.cssCompiledStyles=this.getCompiledStyles(e.classes),x.cssClasses=e.classes.join(" ");else{let m={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:u,padding:d.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:h,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(f)r.push({...m,isGroup:!0,shape:"rect"});else r.push({...m,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:d.agentflow?.wrappingWidth,minWidth:d.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let o=this.classes.get(n);if(o?.styles)r=[...r,...o.styles??[]].map((d)=>d.trim());if(o?.textStyles)r=[...r,...o.textStyles??[]].map((d)=>d.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=l(),r=[],n=[],o=this.getSubGraphs(),d=new Map,h=new Map,u=new Set,f=new Map,x=t((g,k,y=new Set)=>{if(y.has(g))return;y.add(g);let q=this.subGraphLookup.get(g);if(!q)return;for(let Ce of q.nodes){if(Ce===k||y.has(Ce))continue;u.add(Ce),f.set(Ce,k),x(Ce,k,y)}},"collectDescendants");for(let g of o)if(g.metadata?.view==="collapsed"&&!u.has(g.id))x(g.id,g.id);let m=t((g,k)=>{let y=new Set,q=k;while(q!==void 0&&!y.has(q)){if(q===g)return!0;y.add(q),q=d.get(q)}return!1},"wouldCloseContainmentCycle");for(let g=o.length-1;g>=0;g--){let k=o[g];if(u.has(k.id))continue;if(k.nodes.length>0)h.set(k.id,!0);for(let y of k.nodes){if(m(y,k.id)){this.emitWarning(Dt.CONTAINMENT_VIOLATION,`Container "${k.id}" cannot contain "${y}" because "${y}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:y});continue}d.set(y,k.id)}}for(let g=o.length-1;g>=0;g--){let k=o[g];if(u.has(k.id))continue;if(k.metadata?.view==="collapsed"){let q={...k.metadata,containerType:k.type};r.push({id:k.id,label:k.title,labelStyle:"",labelType:k.labelType,parentId:d.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:"collapsedGroup",dir:k.dir,isGroup:!1,look:e.look,metadata:q})}else r.push({id:k.id,label:k.title,labelStyle:"",labelType:k.labelType,parentId:d.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:Y1[k.type??"flow"],dir:k.dir,isGroup:!0,look:e.look,metadata:k.metadata})}this.getVertices().forEach((g)=>{if(u.has(g.id))return;this.addNodeFromVertex(g,r,d,h,e,e.look||"classic")});let v=this.getEdges();v.forEach((g,k)=>{let y=f.get(g.start)??g.start,q=f.get(g.end)??g.end;if(y===q&&g.start!==g.end)return;let{arrowTypeStart:Ce,arrowTypeEnd:Ie}=this.destructEdgeType(g.type),ve=[...v.defaultStyle??[]];if(g.style)ve.push(...g.style);let Le={id:Fe(y,q,{counter:k,prefix:"L"},g.id),isUserDefinedId:g.isUserDefinedId,start:y,end:q,type:g.type??"normal",label:g.text,labelType:g.labelType,labelpos:"c",thickness:g.stroke,minlen:g.length,classes:g?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ce,arrowTypeEnd:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":Ie,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(g.classes),labelStyle:ve,style:ve,pattern:g.stroke,look:e.look,animate:g.animate,animation:g.animation,curve:g.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:g.metadata};n.push(Le)}),v1(r,this);let P=new Map,B=new Map;for(let g of o){let k=d.get(g.id);if(k!==void 0)B.set(k,[...B.get(k)??[],g.id])}let W=0,w=t((g)=>{if(P.has(g))return;P.set(g,W++);for(let k of B.get(g)??[])w(k)},"walkContainers");for(let g of o)if(d.get(g.id)===void 0)w(g.id);let _=new Set(this.getConnectors().map((g)=>g.id));return B1(r,(g)=>{if(_.has(g))return"connector";let k=this.vertices.get(g);return k?this.deriveVertexKind(k,Tt(k.type)):void 0},P),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return An.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((u)=>u.id)),r=[],n=[];for(let[u,f]of this.vertices){if(e.has(u))continue;if(f.isConnector){let D={id:u};if(f.text!==void 0&&f.text!==u)D.title=f.text;if(f.metadata&&Object.keys(f.metadata).length>0){let v={};for(let[P,B]of Object.entries(f.metadata)){if(c1.has(P))continue;v[P]=B}if(Object.keys(v).length>0)D.metadata=v}n.push(D);continue}let x={id:u};if(f.text!==void 0)x.label=f.text;let m=typeof f.type==="string"?Tt(f.type):f.type;if(m!==void 0)x.shape=m;if(x.vertexKind=this.deriveVertexKind(f,m),f.metadata&&Object.keys(f.metadata).length>0){let D={};for(let[v,P]of Object.entries(f.metadata)){if(c1.has(v))continue;D[v]=P}if(Object.keys(D).length>0)x.metadata=D}r.push(x)}let o=this.edges.map((u)=>{let f={start:u.start,end:u.end};if(u.id!==void 0)f.id=u.id;if(typeof u.text==="string"&&u.text.length>0)f.label=u.text;if(u.type!==void 0)f.type=u.type;if(u.stroke!==void 0)f.stroke=u.stroke;if(u.edgeSemantic!==void 0)f.edgeSemantic=u.edgeSemantic;if(u.length!==void 0)f.length=u.length;if(u.metadata&&Object.keys(u.metadata).length>0)f.metadata={...u.metadata};return f}),d=this.subGraphs.map((u)=>{let f={id:u.id,nodes:[...u.nodes]};if(u.type!==void 0)f.type=u.type;if(u.title!==void 0)f.title=u.title;if(u.dir!==void 0)f.direction=u.dir;if(u.metadata&&Object.keys(u.metadata).length>0){let x={};for(let[m,D]of Object.entries(u.metadata)){if(c1.has(m))continue;x[m]=D}if(Object.keys(x).length>0)f.metadata=x}return f}),h={vertices:r,edges:o,subGraphs:d,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)h.direction=this.direction;return h}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,o=e?.last_line??r,d=e?.last_column??n,[h,u]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:o+this.frontmatterLineOffset,endColumn:d,startIndex:h,endIndex:u}}pushMapping(e,r,n){if(!e)return;let o={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(o),o}addVertexMapping(e,r,n,o){let d=this.pushMapping(e,"vertex",o);if(d&&n==null)this.bareVertexMappings.add(d)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let o=this.elementMappings.length-1;o>=0;o--){let d=this.elementMappings[o];if(d.type==="vertex"&&d.id===e){if(this.bareVertexMappings.has(d))d.type="attachment",this.bareVertexMappings.delete(d);if(n.endLine>d.position.endLine||n.endLine===d.position.endLine&&n.endColumn>d.position.endColumn)d.position.endLine=n.endLine,d.position.endColumn=n.endColumn,d.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,o){let d=Array.isArray(r)?r.map((u)=>typeof u==="string"?u:u?.id??"").filter(Boolean):[],h=d.length>0?d.join(">"):"edge";this.pushMapping(h,"edge",o)}addSubgraphMapping(e,r,n,o){let d=(typeof e==="string"?e:e?.text)??"",h=this.toElementPosition(n),u=o?this.toElementPosition(o):h;if(!d)return;this.elementMappings.push({id:d,type:"subgraph",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:u.endLine,endColumn:u.endColumn,startIndex:h.startIndex,endIndex:u.endIndex}})}addConnectorMapping(e,r,n,o){let d=e?.text?.trim()??"";if(!d)return;let h=this.toElementPosition(n),u=o?this.toElementPosition(o):h;this.elementMappings.push({id:d,type:"connector",position:{startLine:h.startLine,startColumn:h.startColumn,endLine:u.endLine,endColumn:u.endColumn,startIndex:h.startIndex,endIndex:u.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((d)=>{let{startLine:h,startColumn:u,endLine:f,endColumn:x}=d.position;if(e<h||e>f)return!1;if(e===h&&r<u)return!1;if(e===f&&r>x)return!1;return!0});if(n.length===0)return;let o=t(({position:d})=>[d.endLine-d.startLine,d.endColumn-d.startColumn],"span");return n.reduce((d,h)=>{let[u,f]=o(d),[x,m]=o(h);if(x!==u)return x<u?h:d;return m<f?h:d})}getMappingStats(){let e=0,r=0,n=0,o=0,d=0;for(let h of this.elementMappings)if(h.type==="vertex")e++;else if(h.type==="edge")r++;else if(h.type==="subgraph")n++;else if(h.type==="connector")o++;else if(h.type==="attachment")d++;return{vertices:e,edges:r,subgraphs:n,connectors:o,attachments:d,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,o){let d=o?.nodeId??o?.edgeId,h=d?this.getElementById(d):void 0,u={id:e,severity:r,message:n,...o?.nodeId?{nodeId:o.nodeId}:{},...o?.edgeId&&!o?.nodeId?{edgeId:o.edgeId}:{},...h?{position:h.position}:{}};if(this.diagnostics.some((m)=>m.id===u.id&&m.severity===u.severity&&m.message===u.message&&m.nodeId===u.nodeId&&m.edgeId===u.edgeId))return;this.diagnostics.push(u);let x=`agentflow[${e}]: ${n}`;if(r==="error")a.error(x);else a.warn(x)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},X1=t(function(e,r){return r.db.getClasses()},"getClasses"),Q1=t(async function(e,r,n,o){a.debug("Drawing agentflow diagram",r);let{securityLevel:d,agentflow:h,layout:u}=l();o.db.setDiagramId(r),a.debug("Before getData: ");let f=o.db.getData();a.debug("Data: ",f);let x=he(r,d),m=o.db.getDirection();if(f.type=o.type,f.layoutAlgorithm=ye(u),f.layoutAlgorithm==="dagre"&&u==="elk")a.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");f.direction=m,f.nodeSpacing=h?.nodeSpacing||50,f.rankSpacing=h?.rankSpacing||50,f.markers=["point","circle","cross","hierarchy"],f.diagramId=r,a.debug("REF1:",f),await ge(f,x);let D=h?.diagramPadding??8;M.insertTitle(x,"agentflowTitleText",h?.titleTopMargin??0,o.db.getDiagramTitle()),ue(x,D,"agentflow",h?.useMaxWidth??!0)},"draw"),J1={getClasses:X1,draw:Q1},d1=function(){var e=t(function(Ke,F,V,I){for(V=V||{},I=Ke.length;I--;V[Ke[I]]=F);return V},"o"),r=[1,5],n=[1,4],o=[1,3],d=[1,6],h=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],u=[2,2],f=[1,15],x=[1,16],m=[1,17],D=[1,18],v=[1,19],P=[1,26],B=[1,27],W=[1,28],w=[1,30],_=[1,31],g=[1,32],k=[1,55],y=[1,54],q=[1,34],Ce=[1,35],Ie=[1,36],ve=[1,37],Le=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],He=[1,39],Ye=[1,40],Xe=[1,41],Qe=[1,42],Je=[1,43],ze=[1,64],N=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ke=[1,70],me=[1,68],Ae=[1,67],Ee=[1,69],st=[8,9,10,12,78,80,81],it=[1,88],at=[1,101],ot=[1,106],ut=[1,105],lt=[1,102],ct=[1,98],dt=[1,104],ht=[1,100],pt=[1,107],ft=[1,103],gt=[1,108],bt=[1,99],$e=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],xe=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],h1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],kt=[47,63,92,105,108,109,112,114,117,118,119],p1=[1,131],f1=[1,132],_t=[1,134],vt=[1,133],g1=[47,63,65,77,92,105,108,109,112,114,117,118,119],Vt=[1,143],It=[1,157],Lt=[1,158],Mt=[1,159],yt=[1,162],wt=[1,161],Nt=[1,160],Rt=[1,145],Ot=[1,147],Pt=[1,151],b1=[1,139],k1=[1,140],Gt=[1,152],Ut=[1,153],jt=[1,154],zt=[1,155],Wt=[1,156],Kt=[1,163],Ht=[1,164],Yt=[1,141],qt=[1,142],Xt=[1,149],Qt=[1,144],Jt=[1,148],Zt=[1,146],mt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],m1=[1,168],At=[1,170],X=[8,9,10,12],Te=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],G=[1,190],fe=[1,186],be=[1,187],U=[1,191],j=[1,188],z=[1,189],Et=[80,119,122],K=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],A1=[11,109],We=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Be=[1,269],Me=[1,267],we=[1,271],Ne=[1,265],Oe=[1,266],Pe=[1,268],Ge=[1,270],Ue=[1,272],Ct=[1,292],E1=[8,9,10,12,109],Ve=[8,9,10,11,12,63,87,108,109,112,113,114,115],r1={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(F,V,I,c,H,s,O){var i=s.length-1;switch(H){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:c.setDirection("TB"),this.$="TB";break;case 14:c.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=c.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-6],s[i-4],O[i-8],O[i]);break;case 39:if(this.$=c.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],O[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-7],s[i-5],O[i-9],O[i]);break;case 40:if(this.$=c.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),c.addSubgraphMapping)c.addSubgraphMapping(s[i-3],{text:"",type:"text"},O[i-5],O[i]);break;case 41:if(this.$=c.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],O[i-3]),c.addSubgraphMapping)c.addSubgraphMapping(s[i-4],{text:"",type:"text"},O[i-6],O[i]);break;case 42:if(this.$=c.addSubGraph(void 0,s[i-1],void 0,"flow"),c.addSubgraphMapping)c.addSubgraphMapping(void 0,void 0,O[i-3],O[i]);break;case 43:c.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=c.addConnector(s[i-4],s[i-2]),c.addConnectorMapping)c.addConnectorMapping(s[i-4],s[i-2],O[i-6],O[i]);break;case 45:if(this.$=c.addConnector(s[i-5],s[i-3]),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],O[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-5],s[i-3],O[i-7],O[i]);break;case 46:if(this.$=c.addConnector(s[i-1],{text:"",type:"text"}),c.addConnectorMapping)c.addConnectorMapping(s[i-1],{text:"",type:"text"},O[i-3],O[i]);break;case 47:if(this.$=c.addConnector(s[i-2],{text:"",type:"text"}),c.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],O[i-1]),c.addConnectorMapping)c.addConnectorMapping(s[i-2],{text:"",type:"text"},O[i-4],O[i]);break;case 49:this.$=s[i].trim(),c.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),c.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],O[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],O[i]);if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(c.addLink(s[i-2].stmt,s[i],s[i-1]),c.addEdgeMapping)c.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(c.addLink(s[i-3].stmt,s[i-1],s[i-2]),c.addEdgeMapping)c.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(c.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],O[i]),c.extendVertexMapping)c.extendVertexMapping(s[i-1][s[i-1].length-1],O[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(c.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],O[i-4]),c.extendVertexMapping)c.extendVertexMapping(s[i-5][s[i-5].length-1],O[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],c.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"square"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"doublecircle"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"circle"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"ellipse"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"stadium"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"subroutine"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],c.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),c.addVertexMapping)c.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"cylinder"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"round"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"diamond"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],c.addVertex(s[i-5],s[i-2],"hexagon"),c.addVertexMapping)c.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"odd"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"inv_trapezoid"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_right"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],c.addVertex(s[i-3],s[i-1],"lean_left"),c.addVertexMapping)c.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],c.addVertex(s[i]),c.addVertexMapping)c.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1]};break;case 91:var Y=c.destructLink(s[i],s[i-2]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic};break;case 97:var Y=c.destructLink(s[i]);this.$={type:Y.type,stroke:Y.stroke,length:Y.length,edgeSemantic:Y.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],c.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],c.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],c.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],c.setClickEvent(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],c.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],c.setClickEvent(s[i-4],s[i-3],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],c.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],c.setLink(s[i-4],s[i-2]),c.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],c.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],c.setLink(s[i-6],s[i-4],s[i]),c.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],c.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],c.setLink(s[i-3],s[i-2]),c.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],c.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],c.setLink(s[i-5],s[i-4],s[i]),c.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],c.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],c.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],c.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],c.updateLinkInterpolate([s[i-6]],s[i-2]),c.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],c.updateLinkInterpolate(s[i-6],s[i-2]),c.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],c.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],c.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:o,13:d},{1:[3]},e(h,u,{5:7}),{4:8,8:r,10:n,11:o,13:d},{4:9,8:r,10:n,11:o,13:d},{4:10,8:r,10:n,11:o,13:d},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(h,[2,10]),e(h,[2,11]),e(h,[2,12]),e(h,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:ze,16:59,19:62},e(N,[2,3]),e(N,[2,4]),e(N,[2,5]),e(N,[2,6]),e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),{8:ke,9:me,10:Ae,12:Ee,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ke,9:me,10:Ae,12:Ee,22:75},{8:ke,9:me,10:Ae,12:Ee,22:76},{8:ke,9:me,10:Ae,12:Ee,22:77},{8:ke,9:me,10:Ae,12:Ee,22:78},{8:ke,9:me,10:Ae,12:Ee,22:79},{8:ke,9:me,10:Ae,11:[1,80],12:Ee,22:81},{8:ke,9:me,10:Ae,12:Ee,22:82},{11:[1,83]},e(N,[2,48]),{39:[1,84]},{41:[1,85]},e(N,[2,51]),e(st,[2,63],{19:86,34:87,11:ze,43:it}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:at,47:ot,63:ut,83:[1,96],92:lt,98:[1,93],100:[1,94],104:95,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},e(N,[2,200]),e(N,[2,201]),e(N,[2,202]),e(N,[2,203]),e(N,[2,204]),e($e,[2,64]),e($e,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:k,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:y,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(xe,[2,196]),e(xe,[2,157]),e(xe,[2,158]),e(xe,[2,159]),e(xe,[2,160]),e(xe,[2,161]),e(xe,[2,162]),e(xe,[2,163]),e(xe,[2,164]),e(xe,[2,165]),e(xe,[2,166]),e(xe,[2,167]),e(h,[2,14]),e(h,[2,20]),e(h,[2,21]),{10:[1,123]},e(h,[2,23]),e(h1,[2,31],{19:124,11:ze}),e(N,[2,32]),{45:125,46:44,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(N,[2,52]),e(N,[2,53]),e(N,[2,54]),e(N,[2,55]),e(kt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:p1,84:f1,119:_t,122:vt},{78:[1,135],80:[1,136]},e(g1,[2,96]),e(N,[2,33]),e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),{11:Vt,13:It,15:Lt,28:Mt,29:137,33:yt,35:wt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(mt,u,{5:165}),e(mt,u,{5:166}),{11:Vt,13:It,15:Lt,28:Mt,29:167,33:yt,35:wt,36:Nt,47:Rt,63:Ot,78:Pt,83:b1,84:k1,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:138,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(N,[2,49]),e(N,[2,50]),e(st,[2,61],{47:m1}),e(st,[2,62],{19:169,11:ze,43:At}),e($e,[2,57]),{47:k,50:171,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:k,50:175,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:k,50:176,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,132],{11:[1,182]}),e(Te,[2,198]),e(Te,[2,185]),e(Te,[2,186]),e(Te,[2,187]),e(Te,[2,188]),e(Te,[2,189]),e(Te,[2,190]),e(Te,[2,191]),e(Te,[2,192]),e(Te,[2,193]),e(Te,[2,194]),e(Te,[2,195]),{47:k,50:183,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:192,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:194,53:[1,193],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:195,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:196,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:197,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{112:[1,198]},{31:199,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:200,68:[1,201],70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:202,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:203,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{31:204,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(xe,[2,197]),e(h,[2,22]),e(h1,[2,30]),e(st,[2,59],{34:205,19:206,11:ze,43:it}),e(kt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{80:[1,210],82:211,119:_t,122:vt},e(Et,[2,92]),e(Et,[2,94]),e(Et,[2,95]),e(Et,[2,183]),e(Et,[2,184]),{79:212,82:130,83:p1,84:f1,119:_t,122:vt},e(g1,[2,97]),{8:ke,9:me,10:Ae,11:Vt,12:Ee,13:It,15:Lt,22:214,28:Mt,30:[1,213],33:yt,34:215,35:wt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},e(K,[2,116]),e(K,[2,118]),e(K,[2,119]),e(K,[2,172]),e(K,[2,173]),e(K,[2,174]),e(K,[2,175]),e(K,[2,176]),e(K,[2,177]),e(K,[2,178]),e(K,[2,179]),e(K,[2,180]),e(K,[2,181]),e(K,[2,182]),e(K,[2,103]),e(K,[2,104]),e(K,[2,105]),e(K,[2,106]),e(K,[2,107]),e(K,[2,108]),e(K,[2,109]),e(K,[2,110]),e(K,[2,111]),e(K,[2,112]),e(K,[2,113]),e(K,[2,114]),e(K,[2,115]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,217],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,218],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{8:ke,9:me,10:Ae,11:Vt,12:Ee,13:It,15:Lt,22:220,28:Mt,30:[1,219],33:yt,34:221,35:wt,36:Nt,43:it,47:Rt,63:Ot,78:Pt,86:150,87:Gt,88:Ut,89:jt,90:zt,91:Wt,92:Kt,93:Ht,94:216,108:Yt,112:qt,114:Xt,117:Qt,118:Jt,119:Zt},{11:ze,19:222},{47:[1,223]},e($e,[2,56]),{11:[1,224],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(A1,[2,143]),{11:[1,228],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(Te,[2,199]),{83:[1,234],101:[1,235]},e($e,[2,68],{116:122,47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:G,85:237,119:U,120:j,121:z},e(We,[2,99]),e(We,[2,101]),e(We,[2,102]),e(We,[2,168]),e(We,[2,169]),e(We,[2,170]),e(We,[2,171]),{52:[1,238],70:G,85:237,119:U,120:j,121:z},{31:239,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{54:[1,240],70:G,85:237,119:U,120:j,121:z},{56:[1,241],70:G,85:237,119:U,120:j,121:z},{58:[1,242],70:G,85:237,119:U,120:j,121:z},{60:[1,243],70:G,85:237,119:U,120:j,121:z},{63:[1,244]},{67:[1,245],70:G,85:237,119:U,120:j,121:z},{69:[1,246],70:G,85:237,119:U,120:j,121:z},{31:247,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},{32:[1,248],70:G,85:237,119:U,120:j,121:z},{70:G,72:[1,249],74:[1,250],85:237,119:U,120:j,121:z},{70:G,72:[1,252],74:[1,251],85:237,119:U,120:j,121:z},e(st,[2,58],{19:169,11:ze,43:At}),e(st,[2,60],{47:m1}),e(kt,[2,88]),e(kt,[2,87]),{65:[1,253],70:G,85:237,119:U,120:j,121:z},e(kt,[2,90]),e(Et,[2,93]),{80:[1,254],82:211,119:_t,122:vt},{31:255,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(mt,u,{5:256}),{8:ke,9:me,10:Ae,12:Ee,22:257,43:At},e(K,[2,117]),e(N,[2,42]),e(N,[2,43]),{31:258,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(N,[2,46]),{8:ke,9:me,10:Ae,12:Ee,22:259,43:At},{46:260,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:ze,19:261},{11:Be,63:Me,87:we,95:262,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:273,107:[1,274],108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:275,107:[1,276],108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{108:[1,277]},{11:Be,63:Me,87:we,95:278,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{47:k,50:279,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(We,[2,100]),e(oe,[2,70]),{54:[1,284],70:G,85:237,119:U,120:j,121:z},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:G,85:237,119:U,120:j,121:z},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(kt,[2,91]),{32:[1,287],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,288],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(mt,u,{5:289}),{32:[1,290],70:G,85:237,119:U,120:j,121:z},e(N,[2,47]),e($e,[2,66]),{46:291,47:k,48:45,50:46,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:Ct}),e(E1,[2,145],{111:293,11:Be,63:Me,87:we,108:Ne,112:Oe,113:Pe,114:Ge,115:Ue}),e(Ve,[2,147]),e(Ve,[2,149]),e(Ve,[2,150]),e(Ve,[2,151]),e(Ve,[2,152]),e(Ve,[2,153]),e(Ve,[2,154]),e(Ve,[2,155]),e(Ve,[2,156]),e(X,[2,137],{109:Ct}),{11:[1,294]},e(X,[2,138],{109:Ct}),{11:[1,295]},e(A1,[2,144]),e(X,[2,120],{109:Ct}),e(X,[2,121],{116:122,47:k,63:y,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ke,9:me,10:Ae,12:Ee,22:301,34:302,43:it},e(N,[2,40]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,303],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},{8:ke,9:me,10:Ae,12:Ee,22:304,34:305,43:it},e($e,[2,65]),{11:Be,63:Me,87:we,108:Ne,110:306,111:264,112:Oe,113:Pe,114:Ge,115:Ue},e(Ve,[2,148]),{15:at,47:ot,63:ut,92:lt,104:307,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{15:at,47:ot,63:ut,92:lt,104:308,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:G,83:fe,84:be,85:185,119:U,120:j,121:z},e(oe,[2,79]),e(mt,u,{5:311}),{8:ke,9:me,10:Ae,12:Ee,22:312,43:At},e(N,[2,41]),e(N,[2,44]),{8:ke,9:me,10:Ae,12:Ee,22:313,43:At},e(E1,[2,146],{111:293,11:Be,63:Me,87:we,108:Ne,112:Oe,113:Pe,114:Ge,115:Ue}),e(X,[2,141],{123:181,11:[1,314],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,142],{123:181,11:[1,315],15:at,47:ot,63:ut,92:lt,108:ct,109:dt,112:ht,114:pt,117:ft,118:gt,119:bt}),e(X,[2,129]),{32:[1,316],70:G,85:237,119:U,120:j,121:z},{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,317],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(mt,u,{5:318}),e(N,[2,45]),{11:Be,63:Me,87:we,95:319,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},{11:Be,63:Me,87:we,95:320,108:Ne,110:263,111:264,112:Oe,113:Pe,114:Ge,115:Ue},e(oe,[2,75]),e(N,[2,38]),{6:13,7:14,8:f,9:x,10:m,11:D,12:v,21:20,23:21,24:22,25:23,26:24,27:25,28:P,33:[1,321],35:B,36:W,37:29,38:w,40:_,42:g,45:33,46:44,47:k,48:45,50:46,63:y,87:q,88:Ce,89:Ie,90:ve,91:Le,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:He,125:Ye,126:Xe,127:Qe,128:Je},e(X,[2,139],{109:Ct}),e(X,[2,140],{109:Ct}),e(N,[2,39])],defaultActions:{},parseError:t(function(F,V){if(V.recoverable)this.trace(F);else{var I=Error(F);throw I.hash=V,I}},"parseError"),parse:t(function(F){var V=this,I=[0],c=[],H=[null],s=[],O=this.table,i="",Y=0,C1=0,S1=0,R1=2,x1=1,O1=s.slice.call(arguments,1),ae=Object.create(this.lexer),et={yy:{}};for(var n1 in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,n1))et.yy[n1]=this.yy[n1];if(ae.setInput(F,et.yy),et.yy.lexer=ae,et.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var a1=ae.yylloc;s.push(a1);var P1=ae.options&&ae.options.ranges;if(typeof et.yy.parseError==="function")this.parseError=et.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function G1(_e){I.length=I.length-2*_e,H.length=H.length-_e,s.length=s.length-_e}t(G1,"popStack");function T1(){var _e=c.pop()||ae.lex()||x1;if(typeof _e!=="number"){if(_e instanceof Array)c=_e,_e=c.pop();_e=V.symbols_[_e]||_e}return _e}t(T1,"lex");var Se,o1,tt,De,is,u1,St={},e1,je,D1,t1;while(!0){if(tt=I[I.length-1],this.defaultActions[tt])De=this.defaultActions[tt];else{if(Se===null||typeof Se>"u")Se=T1();De=O[tt]&&O[tt][Se]}if(typeof De>"u"||!De.length||!De[0]){var l1="";t1=[];for(e1 in O[tt])if(this.terminals_[e1]&&e1>R1)t1.push("'"+this.terminals_[e1]+"'");if(ae.showPosition)l1="Parse error on line "+(Y+1)+`:
|
|
23
23
|
`+ae.showPosition()+`
|
|
24
24
|
Expecting `+t1.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'";else l1="Parse error on line "+(Y+1)+": Unexpected "+(Se==x1?"end of input":"'"+(this.terminals_[Se]||Se)+"'");this.parseError(l1,{text:ae.match,token:this.terminals_[Se]||Se,line:ae.yylineno,loc:a1,expected:t1})}if(De[0]instanceof Array&&De.length>1)throw Error("Parse Error: multiple actions possible at state: "+tt+", token: "+Se);switch(De[0]){case 1:if(I.push(Se),H.push(ae.yytext),s.push(ae.yylloc),I.push(De[1]),Se=null,!o1){if(C1=ae.yyleng,i=ae.yytext,Y=ae.yylineno,a1=ae.yylloc,S1>0)S1--}else Se=o1,o1=null;break;case 2:if(je=this.productions_[De[1]][1],St.$=H[H.length-je],St._$={first_line:s[s.length-(je||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(je||1)].first_column,last_column:s[s.length-1].last_column},P1)St._$.range=[s[s.length-(je||1)].range[0],s[s.length-1].range[1]];if(u1=this.performAction.apply(St,[i,C1,Y,et.yy,De[1],H,s].concat(O1)),typeof u1<"u")return u1;if(je)I=I.slice(0,-1*je*2),H=H.slice(0,-1*je),s=s.slice(0,-1*je);I.push(this.productions_[De[1]][0]),H.push(St.$),s.push(St._$),D1=O[I[I.length-2]][I[I.length-1]],I.push(D1);break;case 3:return!0}}return!0},"parse")},N1=function(){var Ke={EOF:1,parseError:t(function(V,I){if(this.yy.parser)this.yy.parser.parseError(V,I);else throw Error(V)},"parseError"),setInput:t(function(F,V){if(this.yy=V||this.yy||{},this._input=F,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var F=this._input[0];this.yytext+=F,this.yyleng++,this.offset++,this.match+=F,this.matched+=F;var V=F.match(/(?:\r\n?|\n).*/g);if(V)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),F},"input"),unput:t(function(F){var V=F.length,I=F.split(/(?:\r\n?|\n)/g);this._input=F+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1)this.yylineno-=I.length-1;var H=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===c.length?this.yylloc.first_column:0)+c[c.length-I.length].length-I[0].length:this.yylloc.first_column-V},this.options.ranges)this.yylloc.range=[H[0],H[0]+this.yyleng-V];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
25
25
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(F){this.unput(this.match.slice(F))},"less"),pastInput:t(function(){var F=this.matched.substr(0,this.matched.length-this.match.length);return(F.length>20?"...":"")+F.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var F=this.match;if(F.length<20)F+=this._input.substr(0,20-F.length);return(F.substr(0,20)+(F.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var F=this.pastInput(),V=Array(F.length+1).join("-");return F+this.upcomingInput()+`
|
|
@@ -197,4 +197,4 @@ Expecting `+t1.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'";else l1="Parse
|
|
|
197
197
|
text-align: center;
|
|
198
198
|
}
|
|
199
199
|
${qe()}
|
|
200
|
-
`,"getStyles"),ss=ts,vs={parser:Z1,get db(){return new q1},renderer:J1,styles:ss,init:t((e)=>{if(e.agentflow??={},e.layout)
|
|
200
|
+
`,"getStyles"),ss=ts,vs={parser:Z1,get db(){return new q1},renderer:J1,styles:ss,init:t((e)=>{if(e.agentflow??={},e.layout)ln({layout:e.layout});e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,ln({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")};export{vs as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,a}from"./chunk-
|
|
1
|
+
import{t,a}from"./chunk-t5ke9cyg.js";import{ee,Dt,Nt}from"./chunk-cq1f20k6.js";import{H}from"./chunk-yeh77fvq.js";import{sr,wt}from"./chunk-dgepxev9.js";var l=sr().RailroadAbnf.parser.LangiumParser,s=t((e)=>{let r=e.alternatives.map(p);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformAlternation"),p=t((e)=>{let r=e.elements.map(f);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformConcatenation"),u=t((e)=>{if(e.includes("*")){let[n,o]=e.split("*"),i=n?parseInt(n,10):0,m=o?parseInt(o,10):1/0;return{min:i,max:m}}let r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),f=t((e)=>{let r=c(e.primary);if(!e.repeat)return r;let{min:n,max:o}=u(e.repeat);if(n===0&&o===1)return{type:"optional",element:r};return{type:"repetition",element:r,min:n,max:o}},"transformElement"),c=t((e)=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return s(e.element);case"AbnfOptionalGroup":return{type:"optional",element:s(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),d=t((e)=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t((e)=>{if(H(e,ee),e.title)ee.setTitle(e.title);e.rules.map((r)=>ee.addRule(d(r)))},"populateDb"),g={parse:t((e)=>{ee.clear(),a.debug("[ABNF Parser] Starting Langium parse");let r=l.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new wt(r);let n=r.value;a.debug("[ABNF Parser] Parsed rules:",n.rules.length),v(n),a.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:ee}},E={parser:g,db:ee,renderer:Nt,styles:Dt};export{E as diagram};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{t,
|
|
1
|
+
import{t,Kt,a,X,u,d,x,yt,$a,C,l,p,V,Ge,le,Ze}from"./chunk-t5ke9cyg.js";import{_t}from"./chunk-01nbc18z.js";var ht=function(){var r=t(function(E,o,y,g){for(y=y||{},g=E.length;g--;y[E[g]]=o);return y},"o"),e=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],f=[1,15],h=[1,16],c=[1,19],_=[1,20],b={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(o,y,g,k,w,m,I){var T=m.length-1;switch(w){case 1:return m[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:m[T-1].push(m[T]),this.$=m[T-1];break;case 7:case 8:this.$=m[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(m[T].substr(6)),this.$=m[T].substr(6);break;case 12:this.$=m[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=m[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(m[T].substr(8)),this.$=m[T].substr(8);break;case 18:k.addTask(m[T],0,""),this.$=m[T];break;case 19:k.addEvent(m[T].substr(2)),this.$=m[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(e,[2,5],{5:6}),r(e,[2,2]),r(e,[2,3]),r(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(e,[2,10],{1:[2,1]}),r(e,[2,6]),{12:21,14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(e,[2,8]),r(e,[2,9]),r(e,[2,11]),{16:[1,22]},{18:[1,23]},r(e,[2,14]),r(e,[2,15]),r(e,[2,16]),r(e,[2,17]),r(e,[2,18]),r(e,[2,19]),r(e,[2,7]),r(e,[2,12]),r(e,[2,13])],defaultActions:{},parseError:t(function(o,y){if(y.recoverable)this.trace(o);else{var g=Error(o);throw g.hash=y,g}},"parseError"),parse:t(function(o){var y=this,g=[0],k=[],w=[null],m=[],I=this.table,T="",W=0,D=0,K=0,Q=2,B=1,G=m.slice.call(arguments,1),L=Object.create(this.lexer),z={yy:{}};for(var Z in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Z))z.yy[Z]=this.yy[Z];if(L.setInput(o,z.yy),z.yy.lexer=L,z.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Y=L.yylloc;m.push(Y);var A=L.options&&L.options.ranges;if(typeof z.yy.parseError==="function")this.parseError=z.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(U){g.length=g.length-2*U,w.length=w.length-U,m.length=m.length-U}t(N,"popStack");function M(){var U=k.pop()||L.lex()||B;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=y.symbols_[U]||U}return U}t(M,"lex");var H,P,F,R,lt,rt,J={},nt,j,kt,it;while(!0){if(F=g[g.length-1],this.defaultActions[F])R=this.defaultActions[F];else{if(H===null||typeof H>"u")H=M();R=I[F]&&I[F][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[F])if(this.terminals_[nt]&&nt>Q)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+L.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(H==B?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(ct,{text:L.match,token:this.terminals_[H]||H,line:L.yylineno,loc:Y,expected:it})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+F+", token: "+H);switch(R[0]){case 1:if(g.push(H),w.push(L.yytext),m.push(L.yylloc),g.push(R[1]),H=null,!P){if(D=L.yyleng,T=L.yytext,W=L.yylineno,Y=L.yylloc,K>0)K--}else H=P,P=null;break;case 2:if(j=this.productions_[R[1]][1],J.$=w[w.length-j],J._$={first_line:m[m.length-(j||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(j||1)].first_column,last_column:m[m.length-1].last_column},A)J._$.range=[m[m.length-(j||1)].range[0],m[m.length-1].range[1]];if(rt=this.performAction.apply(J,[T,D,W,z.yy,R[1],w,m].concat(G)),typeof rt<"u")return rt;if(j)g=g.slice(0,-1*j*2),w=w.slice(0,-1*j),m=m.slice(0,-1*j);g.push(this.productions_[R[1]][0]),w.push(J.$),m.push(J._$),kt=I[g[g.length-2]][g[g.length-1]],g.push(kt);break;case 3:return!0}}return!0},"parse")},S=function(){var E={EOF:1,parseError:t(function(y,g){if(this.yy.parser)this.yy.parser.parseError(y,g);else throw Error(y)},"parseError"),setInput:t(function(o,y){if(this.yy=y||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var y=o.match(/(?:\r\n?|\n).*/g);if(y)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),o},"input"),unput:t(function(o){var y=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1)this.yylineno-=g.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===k.length?this.yylloc.first_column:0)+k[k.length-g.length].length-g[0].length:this.yylloc.first_column-y},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-y];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(o){this.unput(this.match.slice(o))},"less"),pastInput:t(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var o=this.match;if(o.length<20)o+=this._input.substr(0,20-o.length);return(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var o=this.pastInput(),y=Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
5
|
`+y+"^"},"showPosition"),test_match:t(function(o,y){var g,k,w;if(this.options.backtrack_lexer){if(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)w.yylloc.range=this.yylloc.range.slice(0)}if(k=o[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],g=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(g)return g;else if(this._backtrack){for(var m in w)this[m]=w[m];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,y,g,k;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var m=0;m<w.length;m++)if(g=this._input.match(this.rules[w[m]]),g&&(!y||g[0].length>y[0].length)){if(y=g,k=m,this.options.backtrack_lexer)if(o=this.test_match(g,w[m]),o!==!1)return o;else if(this._backtrack){y=!1;continue}else return!1;else if(!this.options.flex)break}if(y){if(o=this.test_match(y,w[k]),o!==!1)return o;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var y=this.next();if(y)return y;else return this.lex()},"lex"),begin:t(function(y){this.conditionStack.push(y)},"begin"),popState:t(function(){var y=this.conditionStack.length-1;if(y>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(y){if(y=this.conditionStack.length-1-Math.abs(y||0),y>=0)return this.conditionStack[y];else return"INITIAL"},"topState"),pushState:t(function(y){this.begin(y)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(y,g,k,w){var m=w;switch(k){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return E}();b.lexer=S;function v(){this.yy={}}return t(v,"Parser"),v.prototype=b,b.Parser=v,new v}();ht.parser=ht;var Gt=ht,Et={};Xt(Et,{addEvent:()=>Rt,addSection:()=>Lt,addTask:()=>Ct,addTaskOrg:()=>Wt,clear:()=>Nt,default:()=>Dt,getCommonDb:()=>$t,getDirection:()=>Ht,getSections:()=>Mt,getTasks:()=>At,setDirection:()=>It});var tt="",Tt=0,ut="LR",pt=[],st=[],et=[],$t=t(()=>Pa,"getCommonDb"),Nt=t(function(){pt.length=0,st.length=0,tt="",et.length=0,ut="LR",C()},"clear"),It=t(function(r){ut=r},"setDirection"),Ht=t(function(){return ut},"getDirection"),Lt=t(function(r){tt=r,pt.push(r)},"addSection"),Mt=t(function(){return pt},"getSections"),At=t(function(){let r=bt(),e=100,s=0;while(!r&&s<e)r=bt(),s++;return st.push(...et),st},"getTasks"),Ct=t(function(r,e,s){let i={id:Tt++,section:tt,type:tt,task:r,score:e?e:0,events:s?[s]:[]};et.push(i)},"addTask"),Rt=t(function(r){et.find((s)=>s.id===Tt-1).events.push(r)},"addEvent"),Wt=t(function(r){let e={section:tt,type:tt,description:r,task:r,classes:[]};st.push(e)},"addTaskOrg"),bt=t(function(){let r=t(function(s){return et[s].processed},"compileTask"),e=!0;for(let[s,i]of et.entries())r(s),e=e&&i.processed;return e},"compileTasks"),Dt={clear:Nt,getCommonDb:$t,getDirection:Ht,setDirection:It,addSection:Lt,getSections:Mt,getTasks:At,addTask:Ct,addTaskOrg:Wt,addEvent:Rt},Pt=0,at=t(function(r,e){let s=r.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),s.attr("rx",e.rx),s.attr("ry",e.ry),e.class!==void 0)s.attr("class",e.class);return s},"drawRect"),Kt=t(function(r,e){let i=r.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function f(_){let b=xt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}t(f,"smile");function h(_){let b=xt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}t(h,"sad");function c(_){_.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(t(c,"ambivalent"),e.score>3)f(n);else if(e.score<3)h(n);else c(n);return i},"drawFace"),Ut=t(function(r,e){let s=r.append("circle");if(s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0)s.attr("class",s.class);if(e.title!==void 0)s.append("title").text(e.title);return s},"drawCircle"),Bt=t(function(r,e){let s=e.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0)i.attr("class",e.class);let n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(s),i},"drawText"),Zt=t(function(r,e){function s(n,f,h,c,_){return n+","+f+" "+(n+h)+","+f+" "+(n+h)+","+(f+c-_)+" "+(n+h-_*1.2)+","+(f+c)+" "+n+","+(f+c)}t(s,"genPoints");let i=r.append("polygon");i.attr("points",s(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+0.5*e.labelMargin,Bt(r,e)},"drawLabel"),jt=t(function(r,e,s){let i=r.append("g"),n=ft();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,at(i,n),Vt(s)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),dt=-1,qt=t(function(r,e,s,i){let n=e.x+s.width/2,f=r.append("g");dt++;let h=450;f.append("line").attr("id",i+"-task"+dt).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Kt(f,{cx:n,cy:300+(5-e.score)*30,score:e.score});let c=ft();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=s.width,c.height=s.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,at(f,c),Vt(s)(e.task,f,c.x,c.y,c.width,c.height,{class:"task"},s,e.colour)},"drawTask"),Jt=t(function(r,e){at(r,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Qt=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),ft=t(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Vt=function(){function r(n,f,h,c,_,b,S,v){let E=f.append("text").attr("x",h+_/2).attr("y",c+b/2+5).style("font-color",v).style("text-anchor","middle").text(n);i(E,S)}t(r,"byText");function e(n,f,h,c,_,b,S,v,E){let{taskFontSize:o,taskFontFamily:y}=v,g=n.split(/<br\s*\/?>/gi);for(let k=0;k<g.length;k++){let w=k*o-o*(g.length-1)/2,m=f.append("text").attr("x",h+_/2).attr("y",c).attr("fill",E).style("text-anchor","middle").style("font-size",o).style("font-family",y);m.append("tspan").attr("x",h+_/2).attr("dy",w).text(g[k]),m.attr("y",c+b/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(m,S)}}t(e,"byTspan");function s(n,f,h,c,_,b,S,v){let E=f.append("switch"),y=E.append("foreignObject").attr("x",h).attr("y",c).attr("width",_).attr("height",b).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,E,h,c,_,b,S,v),i(y,S)}t(s,"byFo");function i(n,f){for(let h in f)if(h in f)n.attr(h,f[h])}return t(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Yt=t(function(r,e){Pt=0,dt=-1,r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function yt(r,e){r.each(function(){var s=p(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,f=[],h=1.1,c=s.attr("y"),_=parseFloat(s.attr("dy")),b=s.text(null).append("tspan").attr("x",0).attr("y",c).attr("dy",_+"em");for(let S=0;S<i.length;S++)if(n=i[i.length-1-S],f.push(n),b.text(f.join(" ").trim()),b.node().getComputedTextLength()>e||n==="<br>"){if(f.pop(),b.text(f.join(" ").trim()),n==="<br>")f=[""];else f=[n];b=s.append("tspan").attr("x",0).attr("y",c).attr("dy",h+"em").text(n)}})}t(yt,"wrap");var te=t(function(r,e,s,i,n,f=!1){let{theme:h,look:c}=i,_=h?.includes("redux"),b=i?.themeVariables?.THEME_COLOR_LIMIT??12,S=s%b-1,v=r.append("g");e.section=S,v.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+S));let E=v.append("g"),o=v.append("g"),g=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,e.width).node().getBBox(),k=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+k*1.1*0.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),_)o.attr("transform",`translate(${e.width/2}, ${f?e.padding/2+3:e.padding})`);if(re(E,e,S,n,i),c==="neo"){if(v.attr("data-look","neo"),_){let w=h.includes("dark"),m=r.node()?.ownerSVGElement??r.node(),I=p(m),T=I.attr("id")??"",W=T?`${T}-drop-shadow`:"drop-shadow";if(I.select(`#${W}`).empty()){let D=I.select("defs");(D.empty()?I.append("defs"):D).append("filter").attr("id",W).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",w?"0.2":"0.06").attr("flood-color",w?"#FFFFFF":"#000000")}}}return e},"drawNode"),ee=t(function(r,e,s){let i=r.append("g"),f=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,e.width).node().getBBox(),h=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),f.height+h*1.1*0.5+e.padding},"getVirtualNodeHeight"),re=t(function(r,e,s,i,n){let{theme:f}=n,h=f?.includes("redux")?0:5,c=5,_=h>0?`M0 ${e.height-5} v${-e.height+10} q0,-${h},${h},-${h} h${e.width-10} q${h},0,${h},${h} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+Pt++).attr("class","node-bkg node-"+e.type).attr("d",_),!f?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),O={drawRect:at,drawCircle:Ut,drawSection:jt,drawText:Bt,drawLabel:Zt,drawTask:qt,drawBackgroundRect:Jt,getTextObj:Qt,getNoteRect:ft,initGraphics:Yt,drawNode:te,getVirtualNodeHeight:ee},ne=t(function(r,e,s,i){let n=l(),{look:f,theme:h,themeVariables:c}=n,{useGradient:_,gradientStart:b,gradientStop:S}=c,v=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let E=n.securityLevel,o;if(E==="sandbox")o=p("#i"+e);let g=(E==="sandbox"?p(o.nodes()[0].contentDocument.body):p("body")).select("#"+e);g.append("g");let k=i.db.getTasks(),w=i.db.getCommonDb().getDiagramTitle();a.debug("task",k),O.initGraphics(g,e);let m=i.db.getSections();a.debug("sections",m);let I=0,T=0,W=0,D=0,K=50+v,Q=50;D=50;let B=0,G=!0;m.forEach(function(A){let N={number:B,descr:A,section:B,width:150,padding:20,maxHeight:I},M=O.getVirtualNodeHeight(g,N,n);a.debug("sectionHeight before draw",M),I=Math.max(I,M+20)});let L=0,z=0;a.debug("tasks.length",k.length);for(let[A,N]of k.entries()){let M={number:A,descr:N,section:N.section,width:150,padding:20,maxHeight:T},H=O.getVirtualNodeHeight(g,M,n);a.debug("taskHeight before draw",H),T=Math.max(T,H+20),L=Math.max(L,N.events.length);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:150,padding:20,maxHeight:50};P+=O.getVirtualNodeHeight(g,R,n)}if(N.events.length>0)P+=(N.events.length-1)*10;z=Math.max(z,P)}if(a.debug("maxSectionHeight before draw",I),a.debug("maxTaskHeight before draw",T),m&&m.length>0)m.forEach((A)=>{let N=k.filter((F)=>F.section===A),M={number:B,descr:A,section:B,width:200*Math.max(N.length,1)-50,padding:20,maxHeight:I};a.debug("sectionNode",M);let H=g.append("g"),P=O.drawNode(H,M,B,n,e);if(a.debug("sectionNode output",P),H.attr("transform",`translate(${K}, ${D})`),Q+=I+50,N.length>0)vt(g,N,B,K,Q,T,n,L,z,I,!1,e);K+=200*Math.max(N.length,1),Q=D,B++});else G=!1,vt(g,k,B,K,Q,T,n,L,z,I,!0,e);let Z=g.node().getBBox();if(a.debug("bounds",Z),w)g.append("text").text(w).attr("x",f==="neo"?Z.x*2+v:Z.width/2-v).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(W=G?I+T+150:T+100,g.append("g").attr("class","lineWrapper").append("line").attr("x1",v).attr("y1",W).attr("x2",Z.width+3*v).attr("y2",W).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),f==="neo"&&_&&h!=="neutral"){let A=g.select("defs"),M=(A.empty()?g.append("defs"):A).append("linearGradient").attr("id",g.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");M.append("stop").attr("offset","0%").attr("stop-color",b).attr("stop-opacity",1),M.append("stop").attr("offset","100%").attr("stop-color",S).attr("stop-opacity",1)}gt(void 0,g,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),vt=t(function(r,e,s,i,n,f,h,c,_,b,S,v){for(let E of e){let o={descr:E.task,section:s,number:s,width:150,padding:20,maxHeight:f};a.debug("taskNode",o);let y=r.append("g").attr("class","taskWrapper"),k=O.drawNode(y,o,s,h,v).height;if(a.debug("taskHeight after draw",k),y.attr("transform",`translate(${i}, ${n})`),f=Math.max(f,k),E.events){let w=r.append("g").attr("class","lineWrapper"),m=f;n+=100,m=m+ie(r,E.events,s,i,n,h,v),n-=100,w.append("line").attr("x1",i+95).attr("y1",n+f).attr("x2",i+95).attr("y2",n+f+100+_+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${v}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,S&&!h.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),ie=t(function(r,e,s,i,n,f,h){let c=0,_=n;n=n+100;for(let b of e){let S={descr:b,section:s,number:s,width:150,padding:20,maxHeight:50};a.debug("eventNode",S);let v=r.append("g").attr("class","eventWrapper"),o=O.drawNode(v,S,s,f,h,!0).height;c=c+o,v.attr("transform",`translate(${i}, ${n})`),n=n+10+o}return n=_,c},"drawEvents"),se={setConf:t(()=>{},"setConf"),draw:ne},ot=200,q=5,ae=ot+q*2,mt=ot+100,oe=mt+q*2,Ft=10,ce=0,_t=20,zt=20,wt=30,Ot=50,he=t(function(r,e,s,i){let n=l(),f=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let h=V(e);h.append("g");let c=i.db.getTasks(),_=i.db.getCommonDb().getDiagramTitle();a.debug("task",c),O.initGraphics(h);let b=i.db.getSections();a.debug("sections",b);let S=0,v=0,E=50+f,o=50,y=o,g=E,k=ae+zt,w=oe+Ot,m=g+k,I=0,T=b&&b.length>0,W=T?m:E+k,D=Math.max(50,k+w-q*2);b.forEach(function(A){let N={number:I,descr:A,section:I,width:D,padding:q,maxHeight:S},M=O.getVirtualNodeHeight(h,N,n);a.debug("sectionHeight before draw",M),S=Math.max(S,M)});let K=0;a.debug("tasks.length",c.length);for(let[A,N]of c.entries()){let M={number:A,descr:N,section:N.section,width:ot,padding:q,maxHeight:v},H=O.getVirtualNodeHeight(h,M,n);a.debug("taskHeight before draw",H),v=Math.max(v,H);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:mt,padding:q,maxHeight:50};P+=O.getVirtualNodeHeight(h,R,n)}if(N.events.length>0)P+=(N.events.length-1)*Ft;K=Math.max(K,P)+ce}a.debug("maxSectionHeight before draw",S),a.debug("maxTaskHeight before draw",v);let B=Math.max(v,K)+wt;if(T)b.forEach((A)=>{let N=c.filter((J)=>J.section===A),M={number:I,descr:A,section:I,width:D,padding:q,maxHeight:S};a.debug("sectionNode",M);let H=h.append("g"),P=O.drawNode(H,M,I,n);a.debug("sectionNode output",P);let F=W-k;H.attr("transform",`translate(${F}, ${o})`);let R=o+P.height+_t;if(N.length>0)St(h,N,I,W,R,v,n,B,!1);let lt=N.length,rt=P.height+_t+B*Math.max(lt,1)-(lt>0?wt*2:0);o+=rt,I++});else St(h,c,I,W,o,v,n,B,!0);let G=h.node()?.getBBox();if(!G)throw Error("bbox not found");if(a.debug("bounds",G),_){if(h.append("text").text(_).attr("x",G.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),G=h.node()?.getBBox(),!G)throw Error("bbox not found");a.debug("bounds after title",G)}let[L]=We(n.fontSize),z=(L??16)*2,Z=(L??16)*0.5+20,Y=h.append("g").attr("class","lineWrapper");Y.append("line").attr("x1",W).attr("y1",y-z).attr("x2",W).attr("y2",G.y+G.height+Z).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Y.lower(),gt(void 0,h,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),St=t(function(r,e,s,i,n,f,h,c,_){for(let b of e){let S={descr:b.task,section:s,number:s,width:ot,padding:q,maxHeight:f};a.debug("taskNode",S);let v=r.append("g").attr("class","taskWrapper"),E=O.drawNode(v,S,s,h),o=E.height;a.debug("taskHeight after draw",o);let y=i-zt-E.width;if(v.attr("transform",`translate(${y}, ${n})`),f=Math.max(f,o),b.events&&b.events.length>0){let g=n,k=i+Ot;de(r,b.events,s,i,k,g,h)}if(n=n+c,_&&!h.timeline?.disableMulticolor)s++}},"drawTasks"),de=t(function(r,e,s,i,n,f,h){let c=f;for(let _ of e){let b={descr:_,section:s,number:s,width:mt,padding:q,maxHeight:0};a.debug("eventNode",b);let S=r.append("g").attr("class","eventWrapper"),E=O.drawNode(S,b,s,h).height;S.attr("transform",`translate(${n}, ${c})`);let o=r.append("g").attr("class","lineWrapper"),y=c+E/2;o.append("line").attr("x1",i).attr("y1",y).attr("x2",n).attr("y2",y).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+E+Ft}return c-f},"drawEvents"),ue={setConf:t(()=>{},"setConf"),draw:he},pe=t((r)=>{let{theme:e}=x(),s=e?.includes("dark"),i=le(e,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",f=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",h="";for(let c=0;c<Ze(r.THEME_COLOR_LIMIT);c++){let _=`${17-3*c}`,b=i?r.borderColorArray[c%r.borderColorArray.length]:void 0,S=b??r.mainBkg,v=b??r.nodeBorder;h+=`
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var y=this.next();if(y)return y;else return this.lex()},"lex"),begin:t(function(y){this.conditionStack.push(y)},"begin"),popState:t(function(){var y=this.conditionStack.length-1;if(y>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(y){if(y=this.conditionStack.length-1-Math.abs(y||0),y>=0)return this.conditionStack[y];else return"INITIAL"},"topState"),pushState:t(function(y){this.begin(y)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(y,g,k,w){var m=w;switch(k){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return E}();b.lexer=S;function v(){this.yy={}}return t(v,"Parser"),v.prototype=b,b.Parser=v,new v}();ht.parser=ht;var Gt=ht,Et={};Kt(Et,{addEvent:()=>Rt,addSection:()=>Lt,addTask:()=>Ct,addTaskOrg:()=>Wt,clear:()=>Nt,default:()=>Dt,getCommonDb:()=>$t,getDirection:()=>Ht,getSections:()=>Mt,getTasks:()=>At,setDirection:()=>It});var tt="",Tt=0,ut="LR",pt=[],st=[],et=[],$t=t(()=>$a,"getCommonDb"),Nt=t(function(){pt.length=0,st.length=0,tt="",et.length=0,ut="LR",C()},"clear"),It=t(function(r){ut=r},"setDirection"),Ht=t(function(){return ut},"getDirection"),Lt=t(function(r){tt=r,pt.push(r)},"addSection"),Mt=t(function(){return pt},"getSections"),At=t(function(){let r=xt(),e=100,s=0;while(!r&&s<e)r=xt(),s++;return st.push(...et),st},"getTasks"),Ct=t(function(r,e,s){let i={id:Tt++,section:tt,type:tt,task:r,score:e?e:0,events:s?[s]:[]};et.push(i)},"addTask"),Rt=t(function(r){et.find((s)=>s.id===Tt-1).events.push(r)},"addEvent"),Wt=t(function(r){let e={section:tt,type:tt,description:r,task:r,classes:[]};st.push(e)},"addTaskOrg"),xt=t(function(){let r=t(function(s){return et[s].processed},"compileTask"),e=!0;for(let[s,i]of et.entries())r(s),e=e&&i.processed;return e},"compileTasks"),Dt={clear:Nt,getCommonDb:$t,getDirection:Ht,setDirection:It,addSection:Lt,getSections:Mt,getTasks:At,addTask:Ct,addTaskOrg:Wt,addEvent:Rt},Pt=0,at=t(function(r,e){let s=r.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),s.attr("rx",e.rx),s.attr("ry",e.ry),e.class!==void 0)s.attr("class",e.class);return s},"drawRect"),Ut=t(function(r,e){let i=r.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function f(_){let b=_t().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}t(f,"smile");function h(_){let b=_t().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}t(h,"sad");function c(_){_.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(t(c,"ambivalent"),e.score>3)f(n);else if(e.score<3)h(n);else c(n);return i},"drawFace"),Xt=t(function(r,e){let s=r.append("circle");if(s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0)s.attr("class",s.class);if(e.title!==void 0)s.append("title").text(e.title);return s},"drawCircle"),Bt=t(function(r,e){let s=e.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0)i.attr("class",e.class);let n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(s),i},"drawText"),Zt=t(function(r,e){function s(n,f,h,c,_){return n+","+f+" "+(n+h)+","+f+" "+(n+h)+","+(f+c-_)+" "+(n+h-_*1.2)+","+(f+c)+" "+n+","+(f+c)}t(s,"genPoints");let i=r.append("polygon");i.attr("points",s(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+0.5*e.labelMargin,Bt(r,e)},"drawLabel"),jt=t(function(r,e,s){let i=r.append("g"),n=gt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,at(i,n),Vt(s)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),dt=-1,qt=t(function(r,e,s,i){let n=e.x+s.width/2,f=r.append("g");dt++;let h=450;f.append("line").attr("id",i+"-task"+dt).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ut(f,{cx:n,cy:300+(5-e.score)*30,score:e.score});let c=gt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=s.width,c.height=s.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,at(f,c),Vt(s)(e.task,f,c.x,c.y,c.width,c.height,{class:"task"},s,e.colour)},"drawTask"),Jt=t(function(r,e){at(r,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Qt=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),gt=t(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Vt=function(){function r(n,f,h,c,_,b,S,v){let E=f.append("text").attr("x",h+_/2).attr("y",c+b/2+5).style("font-color",v).style("text-anchor","middle").text(n);i(E,S)}t(r,"byText");function e(n,f,h,c,_,b,S,v,E){let{taskFontSize:o,taskFontFamily:y}=v,g=n.split(/<br\s*\/?>/gi);for(let k=0;k<g.length;k++){let w=k*o-o*(g.length-1)/2,m=f.append("text").attr("x",h+_/2).attr("y",c).attr("fill",E).style("text-anchor","middle").style("font-size",o).style("font-family",y);m.append("tspan").attr("x",h+_/2).attr("dy",w).text(g[k]),m.attr("y",c+b/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(m,S)}}t(e,"byTspan");function s(n,f,h,c,_,b,S,v){let E=f.append("switch"),y=E.append("foreignObject").attr("x",h).attr("y",c).attr("width",_).attr("height",b).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,E,h,c,_,b,S,v),i(y,S)}t(s,"byFo");function i(n,f){for(let h in f)if(h in f)n.attr(h,f[h])}return t(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Yt=t(function(r,e){Pt=0,dt=-1,r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function ft(r,e){r.each(function(){var s=p(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,f=[],h=1.1,c=s.attr("y"),_=parseFloat(s.attr("dy")),b=s.text(null).append("tspan").attr("x",0).attr("y",c).attr("dy",_+"em");for(let S=0;S<i.length;S++)if(n=i[i.length-1-S],f.push(n),b.text(f.join(" ").trim()),b.node().getComputedTextLength()>e||n==="<br>"){if(f.pop(),b.text(f.join(" ").trim()),n==="<br>")f=[""];else f=[n];b=s.append("tspan").attr("x",0).attr("y",c).attr("dy",h+"em").text(n)}})}t(ft,"wrap");var te=t(function(r,e,s,i,n,f=!1){let{theme:h,look:c}=i,_=h?.includes("redux"),b=i?.themeVariables?.THEME_COLOR_LIMIT??12,S=s%b-1,v=r.append("g");e.section=S,v.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+S));let E=v.append("g"),o=v.append("g"),g=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(ft,e.width).node().getBBox(),k=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+k*1.1*0.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),_)o.attr("transform",`translate(${e.width/2}, ${f?e.padding/2+3:e.padding})`);if(re(E,e,S,n,i),c==="neo"){if(v.attr("data-look","neo"),_){let w=h.includes("dark"),m=r.node()?.ownerSVGElement??r.node(),I=p(m),T=I.attr("id")??"",W=T?`${T}-drop-shadow`:"drop-shadow";if(I.select(`#${W}`).empty()){let D=I.select("defs");(D.empty()?I.append("defs"):D).append("filter").attr("id",W).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",w?"0.2":"0.06").attr("flood-color",w?"#FFFFFF":"#000000")}}}return e},"drawNode"),ee=t(function(r,e,s){let i=r.append("g"),f=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(ft,e.width).node().getBBox(),h=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),f.height+h*1.1*0.5+e.padding},"getVirtualNodeHeight"),re=t(function(r,e,s,i,n){let{theme:f}=n,h=f?.includes("redux")?0:5,c=5,_=h>0?`M0 ${e.height-5} v${-e.height+10} q0,-${h},${h},-${h} h${e.width-10} q${h},0,${h},${h} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+Pt++).attr("class","node-bkg node-"+e.type).attr("d",_),!f?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),O={drawRect:at,drawCircle:Xt,drawSection:jt,drawText:Bt,drawLabel:Zt,drawTask:qt,drawBackgroundRect:Jt,getTextObj:Qt,getNoteRect:gt,initGraphics:Yt,drawNode:te,getVirtualNodeHeight:ee},ne=t(function(r,e,s,i){let n=l(),{look:f,theme:h,themeVariables:c}=n,{useGradient:_,gradientStart:b,gradientStop:S}=c,v=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let E=n.securityLevel,o;if(E==="sandbox")o=p("#i"+e);let g=(E==="sandbox"?p(o.nodes()[0].contentDocument.body):p("body")).select("#"+e);g.append("g");let k=i.db.getTasks(),w=i.db.getCommonDb().getDiagramTitle();a.debug("task",k),O.initGraphics(g,e);let m=i.db.getSections();a.debug("sections",m);let I=0,T=0,W=0,D=0,K=50+v,Q=50;D=50;let B=0,G=!0;m.forEach(function(A){let N={number:B,descr:A,section:B,width:150,padding:20,maxHeight:I},M=O.getVirtualNodeHeight(g,N,n);a.debug("sectionHeight before draw",M),I=Math.max(I,M+20)});let L=0,z=0;a.debug("tasks.length",k.length);for(let[A,N]of k.entries()){let M={number:A,descr:N,section:N.section,width:150,padding:20,maxHeight:T},H=O.getVirtualNodeHeight(g,M,n);a.debug("taskHeight before draw",H),T=Math.max(T,H+20),L=Math.max(L,N.events.length);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:150,padding:20,maxHeight:50};P+=O.getVirtualNodeHeight(g,R,n)}if(N.events.length>0)P+=(N.events.length-1)*10;z=Math.max(z,P)}if(a.debug("maxSectionHeight before draw",I),a.debug("maxTaskHeight before draw",T),m&&m.length>0)m.forEach((A)=>{let N=k.filter((F)=>F.section===A),M={number:B,descr:A,section:B,width:200*Math.max(N.length,1)-50,padding:20,maxHeight:I};a.debug("sectionNode",M);let H=g.append("g"),P=O.drawNode(H,M,B,n,e);if(a.debug("sectionNode output",P),H.attr("transform",`translate(${K}, ${D})`),Q+=I+50,N.length>0)bt(g,N,B,K,Q,T,n,L,z,I,!1,e);K+=200*Math.max(N.length,1),Q=D,B++});else G=!1,bt(g,k,B,K,Q,T,n,L,z,I,!0,e);let Z=g.node().getBBox();if(a.debug("bounds",Z),w)g.append("text").text(w).attr("x",f==="neo"?Z.x*2+v:Z.width/2-v).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(W=G?I+T+150:T+100,g.append("g").attr("class","lineWrapper").append("line").attr("x1",v).attr("y1",W).attr("x2",Z.width+3*v).attr("y2",W).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),f==="neo"&&_&&h!=="neutral"){let A=g.select("defs"),M=(A.empty()?g.append("defs"):A).append("linearGradient").attr("id",g.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");M.append("stop").attr("offset","0%").attr("stop-color",b).attr("stop-opacity",1),M.append("stop").attr("offset","100%").attr("stop-color",S).attr("stop-opacity",1)}yt(void 0,g,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),bt=t(function(r,e,s,i,n,f,h,c,_,b,S,v){for(let E of e){let o={descr:E.task,section:s,number:s,width:150,padding:20,maxHeight:f};a.debug("taskNode",o);let y=r.append("g").attr("class","taskWrapper"),k=O.drawNode(y,o,s,h,v).height;if(a.debug("taskHeight after draw",k),y.attr("transform",`translate(${i}, ${n})`),f=Math.max(f,k),E.events){let w=r.append("g").attr("class","lineWrapper"),m=f;n+=100,m=m+ie(r,E.events,s,i,n,h,v),n-=100,w.append("line").attr("x1",i+95).attr("y1",n+f).attr("x2",i+95).attr("y2",n+f+100+_+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${v}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,S&&!h.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),ie=t(function(r,e,s,i,n,f,h){let c=0,_=n;n=n+100;for(let b of e){let S={descr:b,section:s,number:s,width:150,padding:20,maxHeight:50};a.debug("eventNode",S);let v=r.append("g").attr("class","eventWrapper"),o=O.drawNode(v,S,s,f,h,!0).height;c=c+o,v.attr("transform",`translate(${i}, ${n})`),n=n+10+o}return n=_,c},"drawEvents"),se={setConf:t(()=>{},"setConf"),draw:ne},ot=200,q=5,ae=ot+q*2,mt=ot+100,oe=mt+q*2,Ft=10,ce=0,vt=20,zt=20,wt=30,Ot=50,he=t(function(r,e,s,i){let n=l(),f=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let h=V(e);h.append("g");let c=i.db.getTasks(),_=i.db.getCommonDb().getDiagramTitle();a.debug("task",c),O.initGraphics(h);let b=i.db.getSections();a.debug("sections",b);let S=0,v=0,E=50+f,o=50,y=o,g=E,k=ae+zt,w=oe+Ot,m=g+k,I=0,T=b&&b.length>0,W=T?m:E+k,D=Math.max(50,k+w-q*2);b.forEach(function(A){let N={number:I,descr:A,section:I,width:D,padding:q,maxHeight:S},M=O.getVirtualNodeHeight(h,N,n);a.debug("sectionHeight before draw",M),S=Math.max(S,M)});let K=0;a.debug("tasks.length",c.length);for(let[A,N]of c.entries()){let M={number:A,descr:N,section:N.section,width:ot,padding:q,maxHeight:v},H=O.getVirtualNodeHeight(h,M,n);a.debug("taskHeight before draw",H),v=Math.max(v,H);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:mt,padding:q,maxHeight:50};P+=O.getVirtualNodeHeight(h,R,n)}if(N.events.length>0)P+=(N.events.length-1)*Ft;K=Math.max(K,P)+ce}a.debug("maxSectionHeight before draw",S),a.debug("maxTaskHeight before draw",v);let B=Math.max(v,K)+wt;if(T)b.forEach((A)=>{let N=c.filter((J)=>J.section===A),M={number:I,descr:A,section:I,width:D,padding:q,maxHeight:S};a.debug("sectionNode",M);let H=h.append("g"),P=O.drawNode(H,M,I,n);a.debug("sectionNode output",P);let F=W-k;H.attr("transform",`translate(${F}, ${o})`);let R=o+P.height+vt;if(N.length>0)St(h,N,I,W,R,v,n,B,!1);let lt=N.length,rt=P.height+vt+B*Math.max(lt,1)-(lt>0?wt*2:0);o+=rt,I++});else St(h,c,I,W,o,v,n,B,!0);let G=h.node()?.getBBox();if(!G)throw Error("bbox not found");if(a.debug("bounds",G),_){if(h.append("text").text(_).attr("x",G.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),G=h.node()?.getBBox(),!G)throw Error("bbox not found");a.debug("bounds after title",G)}let[L]=Ge(n.fontSize),z=(L??16)*2,Z=(L??16)*0.5+20,Y=h.append("g").attr("class","lineWrapper");Y.append("line").attr("x1",W).attr("y1",y-z).attr("x2",W).attr("y2",G.y+G.height+Z).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Y.lower(),yt(void 0,h,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),St=t(function(r,e,s,i,n,f,h,c,_){for(let b of e){let S={descr:b.task,section:s,number:s,width:ot,padding:q,maxHeight:f};a.debug("taskNode",S);let v=r.append("g").attr("class","taskWrapper"),E=O.drawNode(v,S,s,h),o=E.height;a.debug("taskHeight after draw",o);let y=i-zt-E.width;if(v.attr("transform",`translate(${y}, ${n})`),f=Math.max(f,o),b.events&&b.events.length>0){let g=n,k=i+Ot;de(r,b.events,s,i,k,g,h)}if(n=n+c,_&&!h.timeline?.disableMulticolor)s++}},"drawTasks"),de=t(function(r,e,s,i,n,f,h){let c=f;for(let _ of e){let b={descr:_,section:s,number:s,width:mt,padding:q,maxHeight:0};a.debug("eventNode",b);let S=r.append("g").attr("class","eventWrapper"),E=O.drawNode(S,b,s,h).height;S.attr("transform",`translate(${n}, ${c})`);let o=r.append("g").attr("class","lineWrapper"),y=c+E/2;o.append("line").attr("x1",i).attr("y1",y).attr("x2",n).attr("y2",y).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+E+Ft}return c-f},"drawEvents"),ue={setConf:t(()=>{},"setConf"),draw:he},pe=t((r)=>{let{theme:e}=x(),s=e?.includes("dark"),i=le(e,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",f=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",h="";for(let c=0;c<Ze(r.THEME_COLOR_LIMIT);c++){let _=`${17-3*c}`,b=i?r.borderColorArray[c%r.borderColorArray.length]:void 0,S=b??r.mainBkg,v=b??r.nodeBorder;h+=`
|
|
7
7
|
.section-${c-1} rect,
|
|
8
8
|
.section-${c-1} path,
|
|
9
9
|
.section-${c-1} circle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{G,e,n,y}from"./chunk-jy448465.js";import{qt,Pn}from"./chunk-fttdbcqv.js";import"./chunk-3egthz5k.js";function b({connection:p}){let{ModelSelector:d,Select:c,SettingGroup:s,SettingRow:l}=y(),m=G(),i=Pn({connection:p,endpoint:"/api/plugins/prompt-optimizer/settings",loadError:"读取优化插件设置失败",toBody:(o)=>({schemaVersion:1,revision:o.revision,primaryModel:o.primaryModel,maxClarificationRounds:o.maxClarificationRounds}),differs:(o,t)=>o.primaryModel?.providerID!==t.primaryModel?.providerID||o.primaryModel?.modelID!==t.primaryModel?.modelID||o.maxClarificationRounds!==t.maxClarificationRounds}),r=i.settings?.primaryModel??null,u=r?`${r.providerID}/${r.modelID}`:"";return n("form",{id:m,onSubmit:i.save,className:"min-w-0 space-y-5",children:[e(s,{title:"模型",children:e(l,{title:"优化模型",description:"未选择时拒绝改写,不会自动回退到其他模型",children:e("div",{className:"w-56",children:e(d,{variant:"field",models:i.modelList,value:u,onChange:(o)=>{let t=o.indexOf("/"),a=t<0?"":o.slice(0,t),g=t<0?o:o.slice(t+1);i.edit((f)=>({...f,primaryModel:{providerID:a,modelID:g}}))}})})})}),e(s,{title:"交互",children:e(l,{title:"澄清提问轮数",description:"草稿有关键歧义时,模型最多可反问几轮",children:e("div",{className:"w-56",children:e(c,{value:String(i.settings?.maxClarificationRounds??1),disabled:i.loading||i.saving,onValueChange:(o)=>{let t=o==="2"?2:1;i.edit((a)=>({...a,maxClarificationRounds:t}))},groups:[{options:[{value:"1",label:"单轮澄清(推荐)",description:"提问一次后直接输出改写结果"},{value:"2",label:"最多两轮澄清",description:"首轮澄清后可针对残留疑问追问一次"}]}]})})})}),e(qt,{formID:m,notice:i.notice,dirty:i.dirty,busy:i.loading||i.saving,saving:i.saving,onReset:i.reset})]})}export{b as PromptOptimizerSettingsSection};
|