@bkm016/basalt 0.1.4 → 0.1.6
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 +61 -11
- package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
- package/{chunk-rmj5b73e.js → chunk-053vb71h.js} +1 -1
- package/{chunk-whvj83b7.js → chunk-063vbmtp.js} +2 -2
- package/{chunk-7tbya5b5.js → chunk-0javrjcm.js} +22 -22
- package/{chunk-y7nma9rk.js → chunk-10p3mb40.js} +2 -2
- package/{chunk-jk25nt60.js → chunk-39vwrg8n.js} +2 -2
- package/chunk-3k627vf2.js +3 -0
- package/{chunk-q7t30zz2.js → chunk-6kdgk70p.js} +5 -5
- package/{chunk-3x94302m.js → chunk-6ptv4g5e.js} +3 -3
- package/chunk-75434aay.js +2 -0
- package/{chunk-2zp1mv3q.js → chunk-7hr6zw2m.js} +1 -1
- package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
- package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
- package/{chunk-k23t7vhs.js → chunk-8gw5bvh3.js} +5 -5
- package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
- package/{chunk-zggzfa7j.js → chunk-8saewt61.js} +2 -2
- package/{chunk-362g64pd.js → chunk-8wj32837.js} +1 -1
- package/{chunk-fjtvjrkg.js → chunk-8wv5t0w6.js} +5 -5
- package/{chunk-vk1gxk1t.js → chunk-8x21n7y9.js} +1 -1
- package/chunk-a0c989ky.js +2 -0
- package/{chunk-4w17tzp5.js → chunk-a5apjjcn.js} +12 -12
- package/chunk-a81p46j7.js +2 -0
- package/chunk-agsfy9w7.js +2 -0
- package/{chunk-fw2bpqmw.js → chunk-arcqjt91.js} +1 -1
- package/chunk-bdy4jksd.js +2 -0
- package/{chunk-qe0teyn1.js → chunk-benrzwea.js} +1 -1
- package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
- package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
- package/{chunk-981f9dw8.js → chunk-c7rcw9fb.js} +6 -6
- package/{chunk-cjc90f84.js → chunk-ca982n62.js} +3 -3
- package/chunk-d20p02ny.js +2 -0
- package/{chunk-97rzj7f6.js → chunk-d6p2hgxh.js} +1 -1
- package/{chunk-k6w6y71k.js → chunk-dnx91jrd.js} +2 -2
- package/{chunk-8d46jtbj.js → chunk-dpz4hwqb.js} +2 -2
- package/{chunk-aky4tztg.js → chunk-ebpyvs1d.js} +2 -2
- package/{chunk-m40gxwq4.js → chunk-ecf896fz.js} +3 -3
- package/{chunk-pjyn2s97.js → chunk-ejsneb6f.js} +1 -1
- package/{chunk-pbcy6zdt.js → chunk-ey15ye2h.js} +1 -1
- package/{chunk-kp22kaez.js → chunk-f156y565.js} +2 -2
- package/{chunk-9rmqgc3c.js → chunk-f544p9rh.js} +15 -15
- package/chunk-fmq3zwzk.js +2 -0
- package/{chunk-em187cy3.js → chunk-fx7f4m3c.js} +2 -2
- package/{chunk-r7fpkb49.js → chunk-g0t9c3gv.js} +1 -1
- package/{chunk-mvfsxdx6.js → chunk-gv7wqkey.js} +10 -10
- package/chunk-hksqjts3.js +3884 -0
- package/{chunk-ztsjgssj.js → chunk-j7yvh0ae.js} +1 -1
- package/chunk-kns4kv7b.js +3 -0
- package/{chunk-nmca5h6m.js → chunk-n85qs7cs.js} +1 -1
- package/{chunk-8wc8qdx8.js → chunk-n981vx1t.js} +6 -6
- package/{chunk-3ct2tkr8.js → chunk-npez1492.js} +2 -2
- package/{chunk-t6zs4kw0.js → chunk-peja51xv.js} +2 -2
- package/{chunk-r0scgfwx.js → chunk-pg5nkf1y.js} +2 -2
- package/{chunk-7afmgncg.js → chunk-prgm07j4.js} +1 -1
- package/{chunk-jwdb0ccj.js → chunk-q9dd6fhj.js} +3 -3
- package/{chunk-ykens1hy.js → chunk-r8vvcp6c.js} +1 -1
- package/chunk-rfb85nj7.js +2 -0
- package/{chunk-ev6yvy5y.js → chunk-rfdt992v.js} +15 -15
- package/{chunk-xfvvh1s5.js → chunk-s6dejhfj.js} +1 -1
- package/{chunk-xh3vr5vz.js → chunk-s7skpgm2.js} +1 -1
- package/chunk-tgfbtehh.js +480 -0
- package/{chunk-m8vkwdgr.js → chunk-w67dvqtb.js} +4 -4
- package/{chunk-f3xadvab.js → chunk-whj87h4r.js} +2 -2
- package/{chunk-2hbfk5xd.js → chunk-wnzvnskb.js} +2 -2
- package/{chunk-vexrrw1b.js → chunk-xtq1xpq0.js} +2 -2
- package/{chunk-1vd0f74z.js → chunk-y8dkfpmj.js} +5 -5
- package/{chunk-shadcb9z.js → chunk-z02sj1je.js} +2 -2
- package/{chunk-akr0a8nc.js → chunk-zxkq9m8e.js} +1 -1
- package/compiled.js +12 -12
- package/package.json +1 -1
- package/ui-test-worker.js +32 -32
- package/web/{chunk-t4c8xavd.js → chunk-03dmzvaq.js} +7 -7
- package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
- package/web/chunk-0fgaepwm.js +3 -0
- package/web/chunk-0gg00f86.js +292 -0
- package/web/chunk-0pecj6d7.js +1 -0
- package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
- package/web/chunk-0wt1dgny.js +1 -0
- package/web/{chunk-sfg2wkhe.js → chunk-12xxh71x.js} +6 -6
- package/web/chunk-1ves7sq5.js +1 -0
- package/web/chunk-1yj79b48.js +1 -0
- package/web/chunk-296hgy6k.js +370 -0
- package/web/{chunk-f4tacm06.js → chunk-2bmq1whf.js} +1 -1
- package/web/chunk-2wqxhqr9.js +1 -0
- package/web/{chunk-2j4m0bh1.js → chunk-30b33r2w.js} +2 -2
- package/web/{chunk-sspfxp5e.js → chunk-30zfw7zg.js} +1 -1
- package/web/chunk-39ng8zwx.css +1 -0
- package/web/chunk-3de552rg.js +70 -0
- package/web/chunk-3nbzj48p.js +36 -0
- package/web/{chunk-0z0y25zf.js → chunk-3zebd9fq.js} +3 -3
- package/web/chunk-4r1n98zx.js +2 -0
- package/web/chunk-59678wmg.js +1 -0
- package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
- package/web/chunk-5v44qv67.js +303 -0
- package/web/chunk-5wdk97mk.js +4 -0
- package/web/chunk-64rafq66.js +78 -0
- package/web/chunk-6bwgdvf6.js +1 -0
- package/web/chunk-6kkw9ptc.js +1 -0
- package/web/chunk-718mr5gc.js +2 -0
- package/web/chunk-7hs57qdr.js +1 -0
- package/web/chunk-7kp237t3.js +106 -0
- package/web/chunk-86p42kym.js +1 -0
- package/web/chunk-8n79cqyd.js +1 -0
- package/web/chunk-8r0s8tx7.js +1 -0
- package/web/chunk-96v2avmw.js +40 -0
- package/web/chunk-9an6wcnr.js +1 -0
- package/web/{chunk-5z4jcqct.js → chunk-9c1yt2ex.js} +20 -20
- package/web/chunk-9w5tf22s.js +1 -0
- package/web/{chunk-pws2seas.js → chunk-a7gtb4kg.js} +19 -19
- package/web/chunk-ahztazsg.js +1 -0
- package/web/chunk-b985y17w.js +2 -0
- package/web/chunk-bz2v64xe.js +1 -0
- package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
- package/web/chunk-c3nn0vvc.js +1 -0
- package/web/chunk-cb2rxtq9.js +2 -0
- package/web/{chunk-b1bgzz66.js → chunk-ck8rr0sr.js} +1 -1
- package/web/{chunk-aqfpnhmt.js → chunk-cktmyc13.js} +19 -19
- package/web/{chunk-rvrf0f3h.js → chunk-cm92fyr3.js} +2 -2
- package/web/chunk-cwtn2kdm.js +1 -0
- package/web/chunk-czq1yz51.js +99 -0
- package/web/chunk-d22wq71s.js +1 -0
- package/web/{chunk-pjkdrgm0.js → chunk-d4z2rgpx.js} +1 -1
- package/web/{chunk-hvw3gn2a.js → chunk-d6tbw8br.js} +20 -20
- package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
- package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
- package/web/chunk-dpkyygej.js +1 -0
- package/web/{chunk-0b47eyrf.js → chunk-dwajwrpk.js} +1 -1
- package/web/chunk-et5ess72.js +1 -0
- package/web/chunk-ez8b6neq.js +1 -0
- package/web/{chunk-bhsaj6qq.js → chunk-f5txt81n.js} +1 -1
- package/web/chunk-fd1kqwe3.js +1 -0
- package/web/chunk-fmthkpff.js +1 -0
- package/web/chunk-fp48zz2e.js +2 -0
- package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
- package/web/chunk-fx0n2g22.js +89 -0
- package/web/{chunk-9cx1be43.js → chunk-fxs4nb93.js} +16 -16
- package/web/chunk-g6k9z8zt.js +1 -0
- package/web/{chunk-42e3b9hv.js → chunk-g81h1e6n.js} +19 -19
- package/web/{chunk-pz9ps2jm.js → chunk-gsh80797.js} +12 -12
- package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
- package/web/chunk-h0c42zy3.js +1 -0
- package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
- package/web/chunk-hs5x78fb.js +1 -0
- package/web/{chunk-zx8zec24.js → chunk-ht1dzftc.js} +56 -56
- package/web/{chunk-d11v5s7w.js → chunk-hy4m34qp.js} +6 -6
- package/web/chunk-hyd5hzpa.js +1 -0
- package/web/chunk-hyt1nkaw.js +1 -0
- package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
- package/web/chunk-j6a4z530.js +1139 -0
- package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
- package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
- package/web/chunk-jfvxxp5c.js +1 -0
- package/web/{chunk-kmr7r9xj.js → chunk-jve1zc80.js} +2 -2
- package/web/chunk-kegv14sg.js +2 -0
- package/web/chunk-kw9emsqw.js +1 -0
- package/web/{chunk-df5zx17h.js → chunk-kyawkpv2.js} +1 -1
- package/web/chunk-m2prjwk3.js +4 -0
- package/web/chunk-m9bzz9m0.js +19 -0
- package/web/chunk-mqsyzzgt.js +30 -0
- package/web/chunk-mz9b5bsa.js +1 -0
- package/web/chunk-n1jpg57t.js +169 -0
- package/web/{chunk-ybrf9mhz.js → chunk-nyn9tghz.js} +4 -4
- package/web/{chunk-1eg9sbbt.js → chunk-nywdeb4m.js} +2 -2
- package/web/chunk-prvh9syp.js +324 -0
- package/web/chunk-pxkhm40r.js +2 -0
- package/web/{chunk-6cnek1xh.js → chunk-q9ekgjh6.js} +1 -1
- package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
- package/web/chunk-r3mj50zs.js +1 -0
- package/web/{chunk-wnskxerq.js → chunk-rf9dt6bg.js} +5 -5
- package/web/{chunk-nvhmq4z5.js → chunk-s2920f21.js} +6 -6
- package/web/chunk-sc0ghp25.js +24 -0
- package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
- package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
- package/web/{chunk-4gavbw65.js → chunk-sy7e4dmq.js} +1 -1
- package/web/chunk-t74r2n8h.js +1 -0
- package/web/{chunk-0h0vb6gt.js → chunk-t851gdjh.js} +4 -4
- package/web/{chunk-a408enpy.js → chunk-t9mvsgt9.js} +1 -1
- package/web/chunk-thbqwq6b.js +1 -0
- package/web/{chunk-v5cnt7c8.js → chunk-twdy2f67.js} +1 -1
- package/web/chunk-v4yqrx5y.js +140 -0
- package/web/{chunk-b53bfkys.js → chunk-vf4vkcf9.js} +1 -1
- package/web/chunk-vnt34mkb.js +1 -0
- package/web/chunk-vtxw9rmr.js +1 -0
- package/web/{chunk-92ssjk2y.js → chunk-vw1pbv1x.js} +40 -40
- package/web/chunk-x19v2sxv.js +1 -0
- package/web/{chunk-3re8y26v.js → chunk-x5s7zr5f.js} +7 -7
- package/web/chunk-xc2sq3t5.js +2 -0
- package/web/chunk-xce8n339.js +1 -0
- package/web/chunk-xtss82z2.js +1 -0
- package/web/chunk-xvcfp1zh.js +2 -0
- package/web/chunk-y21zy3eh.js +1 -0
- package/web/chunk-ya3ghn3n.js +2 -0
- package/web/chunk-yd74yxzt.js +8 -0
- package/web/{chunk-74j07k8k.js → chunk-z1geewdf.js} +2 -2
- package/web/chunk-z4ha8181.js +1 -0
- package/web/chunk-z8rarqe6.js +1 -0
- package/web/{chunk-kwccs9f6.js → chunk-zp3qrrkb.js} +11 -11
- package/web/chunk-zsxw5fj7.js +39 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-06hdzq5n.js +0 -2
- package/chunk-5dfbezv9.js +0 -2
- package/chunk-5x1sankd.js +0 -3753
- package/chunk-71h08f4g.js +0 -2
- package/chunk-7nzhdrv9.js +0 -2
- package/chunk-7q51n619.js +0 -2
- package/chunk-9mmz6wt3.js +0 -2
- package/chunk-fvn32nzj.js +0 -478
- package/chunk-n6e43rvk.js +0 -3
- package/chunk-ry0z4ev6.js +0 -2
- package/chunk-vkpvcxjr.js +0 -2
- package/web/chunk-0rmkpsgp.js +0 -1
- package/web/chunk-0s80zw00.js +0 -1
- package/web/chunk-0xkyryrq.js +0 -1
- package/web/chunk-1gbd61z0.js +0 -2
- package/web/chunk-2s0bmrkv.js +0 -39
- package/web/chunk-2z1rwr28.js +0 -2
- package/web/chunk-344bq59c.js +0 -89
- package/web/chunk-3t0211rw.js +0 -1
- package/web/chunk-44rmrmcn.js +0 -1
- package/web/chunk-4bzqrwr0.js +0 -1139
- package/web/chunk-4d3a7xs2.js +0 -1
- package/web/chunk-4jmazh6x.js +0 -370
- package/web/chunk-4re74xwm.js +0 -140
- package/web/chunk-4rm1vy7w.js +0 -1
- package/web/chunk-59kqahb3.js +0 -1
- package/web/chunk-5qtyq3ce.js +0 -292
- package/web/chunk-5z6x2n5h.js +0 -1
- package/web/chunk-6beqrmtq.js +0 -1
- package/web/chunk-6f5ke0x9.js +0 -1
- package/web/chunk-6xaqxcq8.js +0 -1
- package/web/chunk-7q6wvv2x.js +0 -1
- package/web/chunk-7qsa4p8h.js +0 -1
- package/web/chunk-8nja0ygy.js +0 -1
- package/web/chunk-8y64fkpz.js +0 -24
- package/web/chunk-9ad7v7bm.js +0 -8
- package/web/chunk-9dzxv335.js +0 -4
- package/web/chunk-9t5dnjaz.js +0 -19
- package/web/chunk-a497tykb.js +0 -70
- package/web/chunk-b6k9w215.js +0 -2
- package/web/chunk-cjfssg3m.js +0 -2
- package/web/chunk-cqp1d4p0.js +0 -1
- package/web/chunk-dy2gm1fs.js +0 -1
- package/web/chunk-e0zre35a.js +0 -1
- package/web/chunk-e9twvs9n.js +0 -3
- package/web/chunk-f2kgtyfp.js +0 -1
- package/web/chunk-f8bn5tzf.js +0 -1
- package/web/chunk-f91wzwtk.js +0 -1
- package/web/chunk-fdp9bsj7.js +0 -1
- package/web/chunk-fh2vj0wv.js +0 -2
- package/web/chunk-g1ev11wx.js +0 -1
- package/web/chunk-gmzqdm7v.js +0 -1
- package/web/chunk-hfaffkrh.js +0 -1
- package/web/chunk-j2vt8c8v.js +0 -1
- package/web/chunk-ka3q31t1.js +0 -1
- package/web/chunk-khxcn8tt.js +0 -106
- package/web/chunk-kqqmp1am.js +0 -1
- package/web/chunk-m2d1sp30.js +0 -1
- package/web/chunk-nbgqbxcy.js +0 -1
- package/web/chunk-ncpnpe9w.js +0 -99
- package/web/chunk-ne0v8mfb.js +0 -2
- package/web/chunk-ngx2cp8x.js +0 -2
- package/web/chunk-nxcgf7ec.js +0 -1
- package/web/chunk-p0kvmf28.js +0 -2
- package/web/chunk-p3k7m5nr.js +0 -1
- package/web/chunk-pggaffrh.js +0 -169
- package/web/chunk-pxe3vna4.js +0 -1
- package/web/chunk-qh15dxav.css +0 -1
- package/web/chunk-qpmbxhh6.js +0 -1
- package/web/chunk-r0rctnxz.js +0 -1
- package/web/chunk-rn3dnqm8.js +0 -1
- package/web/chunk-rtf2zzzv.js +0 -1
- package/web/chunk-srrfphes.js +0 -1
- package/web/chunk-tdr6x2xc.js +0 -1
- package/web/chunk-tncvg1nn.js +0 -1
- package/web/chunk-vyp0ns1f.js +0 -2
- package/web/chunk-wvdehm9y.js +0 -303
- package/web/chunk-x7ahcpj7.js +0 -1
- package/web/chunk-y38bf0wm.js +0 -1
- package/web/chunk-y56aaba5.js +0 -2
- package/web/chunk-ye58t45p.js +0 -4
- package/web/chunk-yqbnps3a.js +0 -1
- package/web/chunk-z1h20s8c.js +0 -78
- package/web/chunk-zj4q9jth.js +0 -36
- package/web/chunk-zj5k94dk.js +0 -40
- package/web/chunk-zqch0sc8.js +0 -30
- package/web/install.ps1 +0 -91
- package/web/install.sh +0 -177
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{e,a,ke,b,O,B,C,l,V}from"./chunk-5v44qv67.js";var M="",D="",E="",W=[],N=new Map,S=e((t)=>O(t,l()),"sanitizeText"),R=e((t)=>{switch(t.type){case"terminal":return{...t,value:S(t.value)};case"nonterminal":return{...t,name:S(t.name)};case"sequence":return{...t,elements:t.elements.map(R)};case"choice":return{...t,alternatives:t.alternatives.map(R)};case"optional":return{...t,element:R(t.element)};case"repetition":return{...t,element:R(t.element),separator:t.separator?R(t.separator):void 0};case"special":return{...t,text:S(t.text)}}},"sanitizeAstNode"),G=e(()=>{M="",D="",E="",W.length=0,N.clear(),C(),a.debug("[Railroad] Database cleared")},"clear"),L=e((t)=>{M=S(t),a.debug("[Railroad] Title set:",t)},"setTitle"),I=e(()=>M,"getTitle"),U=e((t)=>{let n={...t,name:S(t.name),definition:R(t.definition),comment:t.comment?S(t.comment):void 0};if(a.debug("[Railroad] Adding rule:",n.name),N.has(n.name))a.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`);W.push(n),N.set(n.name,n)},"addRule"),j=e(()=>W,"getRules"),J=e((t)=>N.get(t),"getRule"),Q=e((t)=>{D=S(t).replace(/^\s+/g,""),a.debug("[Railroad] Accessibility title set:",t)},"setAccTitle"),Z=e(()=>D,"getAccTitle"),ee=e((t)=>{E=S(t).replace(/\n\s+/g,`
|
|
2
|
+
`),a.debug("[Railroad] Accessibility description set:",t)},"setAccDescription"),te=e(()=>E,"getAccDescription"),re=L,ie=I,K={clear:G,setTitle:L,getTitle:I,addRule:U,getRules:j,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:ee,getAccDescription:te,setDiagramTitle:re,getDiagramTitle:ie},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),X=e((t)=>{if(!t)return!1;return Object.keys(t).every((n)=>n==="railroad"||oe.has(n))},"isRailroadStyleOptions"),le=e((t)=>{if(!t)return{};if("railroad"in t&&t.railroad)return t.railroad;return X(t)?t:{}},"extractRailroadOverrides"),se=e((t)=>{if(!t||X(t))return{};let{railroad:n,svgId:s,theme:i,look:r,...o}=t;return o},"extractThemeOverrides"),u=e((t,n)=>{if(typeof t!=="string")return n;let s=t.trim();return ne.test(s)?s:n},"sanitizeColorValue"),H=e((t,n)=>{if(typeof t!=="string")return n;let s=t.trim();return ae.test(s)?s:n},"sanitizeFontFamilyValue"),y=e((t,n)=>{let s=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(s)&&s>=0?s:n},"sanitizeNumberValue"),de=e((t)=>{let n=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(n)&&n>0?n:void 0},"parseThemeFontSize"),ce=e((t)=>{let n=H(t.fontFamily,T.fontFamily),s=de(t.fontSize)??T.fontSize;return{...T,fontFamily:n,fontSize:s,terminalFill:u(t.secondBkg??t.secondaryColor,T.terminalFill),terminalStroke:u(t.secondaryBorderColor??t.lineColor,T.terminalStroke),terminalTextColor:u(t.secondaryTextColor??t.textColor,T.terminalTextColor),nonTerminalFill:u(t.mainBkg??t.background,T.nonTerminalFill),nonTerminalStroke:u(t.primaryBorderColor??t.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(t.primaryTextColor??t.textColor,T.nonTerminalTextColor),lineColor:u(t.lineColor,T.lineColor),markerFill:u(t.lineColor,T.markerFill),commentFill:u(t.labelBackground??t.tertiaryColor,T.commentFill),commentStroke:u(t.tertiaryBorderColor??t.lineColor,T.commentStroke),commentTextColor:u(t.tertiaryTextColor??t.textColor,T.commentTextColor),specialFill:u(t.tertiaryColor??t.secondaryColor,T.specialFill),specialStroke:u(t.tertiaryBorderColor??t.secondaryBorderColor,T.specialStroke),ruleNameColor:u(t.titleColor??t.textColor,T.ruleNameColor)}},"buildThemeDefaults"),_=e((t)=>{let n=b(),s={...ke(),...n.themeVariables??{},...se(t)},i=ce(s),r={...n.railroad??{},...le(t)};return{compactMode:r.compactMode??i.compactMode,padding:y(r.padding,i.padding),verticalSeparation:y(r.verticalSeparation,i.verticalSeparation),horizontalSeparation:y(r.horizontalSeparation,i.horizontalSeparation),arcRadius:y(r.arcRadius,i.arcRadius),fontSize:y(r.fontSize,i.fontSize),fontFamily:H(r.fontFamily,i.fontFamily),terminalFill:u(r.terminalFill,i.terminalFill),terminalStroke:u(r.terminalStroke,i.terminalStroke),terminalTextColor:u(r.terminalTextColor,i.terminalTextColor),nonTerminalFill:u(r.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:u(r.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:u(r.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:u(r.lineColor,i.lineColor),strokeWidth:y(r.strokeWidth,i.strokeWidth),markerFill:u(r.markerFill,i.markerFill),commentFill:u(r.commentFill,i.commentFill),commentStroke:u(r.commentStroke,i.commentStroke),commentTextColor:u(r.commentTextColor,i.commentTextColor),specialFill:u(r.specialFill,i.specialFill),specialStroke:u(r.specialStroke,i.specialStroke),ruleNameColor:u(r.ruleNameColor,i.ruleNameColor),showMarkers:r.showMarkers??i.showMarkers,markerRadius:y(r.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),Dt=e((t)=>{let{fontFamily:n,fontSize:s,terminalFill:i,terminalStroke:r,terminalTextColor:o,nonTerminalFill:g,nonTerminalStroke:m,nonTerminalTextColor:d,lineColor:f,strokeWidth:p,markerFill:h,commentFill:k,commentStroke:c,commentTextColor:x,specialFill:z,specialStroke:F,ruleNameColor:v}=_(t);return`
|
|
3
|
+
.railroad-diagram {
|
|
4
|
+
font-family: ${n};
|
|
5
|
+
font-size: ${s}px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.railroad-terminal rect {
|
|
9
|
+
fill: ${i};
|
|
10
|
+
stroke: ${r};
|
|
11
|
+
stroke-width: ${p}px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.railroad-terminal text {
|
|
15
|
+
fill: ${o};
|
|
16
|
+
font-family: ${n};
|
|
17
|
+
font-size: ${s}px;
|
|
18
|
+
text-anchor: middle;
|
|
19
|
+
dominant-baseline: middle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.railroad-nonterminal rect {
|
|
23
|
+
fill: ${g};
|
|
24
|
+
stroke: ${m};
|
|
25
|
+
stroke-width: ${p}px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.railroad-nonterminal text {
|
|
29
|
+
fill: ${d};
|
|
30
|
+
font-family: ${n};
|
|
31
|
+
font-size: ${s}px;
|
|
32
|
+
text-anchor: middle;
|
|
33
|
+
dominant-baseline: middle;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.railroad-line {
|
|
37
|
+
stroke: ${f};
|
|
38
|
+
stroke-width: ${p}px;
|
|
39
|
+
fill: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.railroad-start circle,
|
|
43
|
+
.railroad-end circle {
|
|
44
|
+
fill: ${h};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.railroad-comment ellipse {
|
|
48
|
+
fill: ${k};
|
|
49
|
+
stroke: ${c};
|
|
50
|
+
stroke-width: ${p}px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.railroad-comment text {
|
|
54
|
+
fill: ${x};
|
|
55
|
+
font-style: italic;
|
|
56
|
+
font-family: ${n};
|
|
57
|
+
font-size: ${s}px;
|
|
58
|
+
text-anchor: middle;
|
|
59
|
+
dominant-baseline: middle;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.railroad-special rect {
|
|
63
|
+
fill: ${z};
|
|
64
|
+
stroke: ${F};
|
|
65
|
+
stroke-width: ${p}px;
|
|
66
|
+
stroke-dasharray: 5,3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.railroad-special text {
|
|
70
|
+
fill: ${d};
|
|
71
|
+
font-family: ${n};
|
|
72
|
+
font-size: ${s}px;
|
|
73
|
+
text-anchor: middle;
|
|
74
|
+
dominant-baseline: middle;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.railroad-rule-name {
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
fill: ${v};
|
|
80
|
+
font-family: ${n};
|
|
81
|
+
font-size: ${s}px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.railroad-group {
|
|
85
|
+
/* Grouping container, no specific styles */
|
|
86
|
+
}
|
|
87
|
+
`},"getStyles"),w=class{constructor(){this.d=""}static{e(this,"PathBuilder")}moveTo(t,n){return this.d+=`M ${t} ${n} `,this}lineTo(t,n){return this.d+=`L ${t} ${n} `,this}horizontalTo(t){return this.d+=`H ${t} `,this}verticalTo(t){return this.d+=`V ${t} `,this}arcTo(t,n,s,i,r,o,g){return this.d+=`A ${t} ${n} ${s} ${i?1:0} ${r?1:0} ${o} ${g} `,this}build(){return this.d.trim()}},me=class{constructor(t,n=_()){this.textCache=new Map,this.svg=t,this.config=n}static{e(this,"RailroadRenderer")}measureText(t){if(this.textCache.has(t))return this.textCache.get(t);let n=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(t),s=n.node().getBBox(),i={width:s.width,height:s.height};return n.remove(),this.textCache.set(t,i),i}renderTerminal(t,n){let s=this.measureText(n),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=t.append("g").attr("class","railroad-terminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r).attr("rx",10).attr("ry",10),o.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderNonTerminal(t,n){let s=this.measureText(n),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=t.append("g").attr("class","railroad-nonterminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),o.append("text").attr("x",i/2).attr("y",r/2).text(n),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderSequence(t,n){let s=n.map((d)=>this.renderExpression(t,d)),i=0,r=0,o=0;for(let d of s)i+=d.dimensions.width,r=Math.max(r,d.dimensions.up),o=Math.max(o,d.dimensions.down);i+=(s.length-1)*this.config.horizontalSeparation;let g=t.append("g").attr("class","railroad-sequence"),m=0;for(let d=0;d<s.length;d++){let f=s[d],p=r-f.dimensions.up;if(g.node().appendChild(f.element).setAttribute("transform",`translate(${m}, ${p})`),d<s.length-1){let k=m+f.dimensions.width,c=k+this.config.horizontalSeparation,x=r;g.append("path").attr("class","railroad-line").attr("d",new w().moveTo(k,x).lineTo(c,x).build())}m+=f.dimensions.width+this.config.horizontalSeparation}return{element:g.node(),dimensions:{width:i,height:r+o,up:r,down:o}}}renderChoice(t,n){let s=n.map((h)=>this.renderExpression(t,h)),i=0,r=0;for(let h of s)i=Math.max(i,h.dimensions.width),r+=h.dimensions.height;r+=(s.length-1)*this.config.verticalSeparation;let o=this.config.arcRadius,g=o*4,m=i+g,d=t.append("g").attr("class","railroad-choice"),f=0,p=r/2;for(let h of s){let k=f,c=k+h.dimensions.up,x=o*2+(i-h.dimensions.width)/2;d.node().appendChild(h.element).setAttribute("transform",`translate(${x}, ${k})`);let F=new w,v=c>p;if(c===p)F.moveTo(0,p).lineTo(x,c);else F.moveTo(0,p).arcTo(o,o,0,!1,v,o,p+(v?o:-o)).lineTo(o,c-(v?o:-o)).arcTo(o,o,0,!1,!v,o*2,c).lineTo(x,c);d.append("path").attr("class","railroad-line").attr("d",F.build());let A=new w,Y=x+h.dimensions.width,q=m-o*2;if(c===p)A.moveTo(Y,c).lineTo(m,p);else A.moveTo(Y,c).lineTo(q,c).arcTo(o,o,0,!1,!v,m-o,c+(v?-o:o)).lineTo(m-o,p+(v?o:-o)).arcTo(o,o,0,!1,v,m,p);d.append("path").attr("class","railroad-line").attr("d",A.build()),f+=h.dimensions.height+this.config.verticalSeparation}return{element:d.node(),dimensions:{width:m,height:r,up:p,down:r-p}}}renderOptional(t,n){let s=this.renderExpression(t,n),i=this.config.arcRadius,r=i*2,o=s.dimensions.width+i*4,g=s.dimensions.height+r,m=t.append("g").attr("class","railroad-optional"),d=i*2,f=r;m.node().appendChild(s.element).setAttribute("transform",`translate(${d}, ${f})`);let h=f+s.dimensions.up,k=new w().moveTo(0,h).lineTo(i*2,h);m.append("path").attr("class","railroad-line").attr("d",k.build());let c=new w().moveTo(d+s.dimensions.width,h).lineTo(o,h);m.append("path").attr("class","railroad-line").attr("d",c.build());let x=new w().moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);return m.append("path").attr("class","railroad-line").attr("d",x.build()),{element:m.node(),dimensions:{width:o,height:g,up:h,down:g-h}}}renderRepetition(t,n,s){let i=this.renderExpression(t,n),r=this.config.arcRadius,o=r*2,g=i.dimensions.width+r*4,m=s===0,d=i.dimensions.height+o+(m?o:0),f=t.append("g").attr("class","railroad-repetition"),p=r*2,h=m?o:0;f.node().appendChild(i.element).setAttribute("transform",`translate(${p}, ${h})`);let c=h+i.dimensions.up;f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(0,c).lineTo(r*2,c).build()),f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(p+i.dimensions.width,c).lineTo(g,c).build());let x=h+i.dimensions.height+r,z=new w().moveTo(p+i.dimensions.width,c).arcTo(r,r,0,!1,!0,p+i.dimensions.width+r,c+r).lineTo(p+i.dimensions.width+r,x).arcTo(r,r,0,!1,!0,p+i.dimensions.width,x+r).lineTo(r*2,x+r).arcTo(r,r,0,!1,!0,r,x).lineTo(r,c+r).arcTo(r,r,0,!1,!0,r*2,c);if(f.append("path").attr("class","railroad-line").attr("d",z.build()),m){let F=new w().moveTo(0,c).arcTo(r,r,0,!1,!1,r,c-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(g-r*2,0).arcTo(r,r,0,!1,!0,g-r,r).lineTo(g-r,c-r).arcTo(r,r,0,!1,!1,g,c);f.append("path").attr("class","railroad-line").attr("d",F.build())}return{element:f.node(),dimensions:{width:g,height:d,up:c,down:d-c}}}renderSpecial(t,n){let s=this.measureText("? "+n+" ?"),i=s.width+this.config.padding*2,r=s.height+this.config.padding*2,o=t.append("g").attr("class","railroad-special");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",r),o.append("text").attr("x",i/2).attr("y",r/2).text("? "+n+" ?"),{element:o.node(),dimensions:{width:i,height:r,up:r/2,down:r/2}}}renderExpression(t,n){switch(n.type){case"terminal":return this.renderTerminal(t,n.value);case"nonterminal":return this.renderNonTerminal(t,n.name);case"sequence":return this.renderSequence(t,n.elements);case"choice":return this.renderChoice(t,n.alternatives);case"optional":return this.renderOptional(t,n.element);case"repetition":return this.renderRepetition(t,n.element,n.min);case"special":return this.renderSpecial(t,n.text);default:throw Error(`Unknown node type: ${n.type}`)}}renderRule(t,n){let s=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${n})`),i=t.name+" =",r=this.measureText(i).width+20,o=r+20,g=s.append("g"),m=this.renderExpression(g,t.definition),d=Math.max(20,m.dimensions.up),f=d-m.dimensions.up;return g.attr("transform",`translate(${o}, ${f})`),s.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",d).text(i),s.append("g").attr("class","railroad-start").append("circle").attr("cx",r).attr("cy",d).attr("r",this.config.markerRadius),s.append("g").attr("class","railroad-end").append("circle").attr("cx",o+m.dimensions.width+10).attr("cy",d).attr("r",this.config.markerRadius),s.append("path").attr("class","railroad-line").attr("d",new w().moveTo(r+this.config.markerRadius,d).lineTo(o,d).build()),s.append("path").attr("class","railroad-line").attr("d",new w().moveTo(o+m.dimensions.width,d).lineTo(o+m.dimensions.width+10-this.config.markerRadius,d).build()),{height:Math.max(40,f+m.dimensions.height+this.config.padding*2),width:o+m.dimensions.width+10+this.config.markerRadius}}renderDiagram(t){let n=this.config.padding,s=0;for(let i of t){let r=this.renderRule(i,n);n+=r.height+this.config.verticalSeparation,s=Math.max(s,r.width)}return{width:s+this.config.padding*2,height:n+this.config.padding}}},P=e((t,n,s)=>{B(t,n.height,n.width,s),t.attr("viewBox",`0 0 ${n.width} ${n.height}`)},"configureRailroadSvgSize"),he=e((t,n,s)=>{a.debug(`[Railroad] Rendering diagram
|
|
88
|
+
`+t);try{let i=V(n);i.attr("class","railroad-diagram");let o=b().railroad?.useMaxWidth??!0,g=K.getRules();if(a.debug(`[Railroad] Rendering ${g.length} rules`),g.length===0){a.warn("[Railroad] No rules to render"),P(i,{height:100,width:200},o);return}let d=new me(i,_()).renderDiagram(g);P(i,d,o),a.debug("[Railroad] Render complete")}catch(i){throw a.error("[Railroad] Render error:",i),i}},"draw"),Mt={draw:he};
|
|
89
|
+
export{K,Dt,Mt};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{e,Zt,r,b,C,S,E,T,A,I,L,s,N,ce,ae,ie,ft,ge,ye}from"./chunk-wvdehm9y.js";import{he}from"./chunk-bhsaj6qq.js";import{se}from"./chunk-p0kvmf28.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],re=[1,106],ne=[1,107],le=[1,108],oe=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:re,34:ne,36:le,38:oe,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:re,34:ne,36:le,38:oe,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:re,34:ne,36:le,38:oe,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:160,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:161,31:re,34:ne,36:le,38:oe,40:ue},{5:te,28:162,31:re,34:ne,36:le,38:oe,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,fe,O,gt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])O=this.defaultActions[fe];else{if(x===null||typeof x>"u")x=nt();O=Le[fe]&&Le[fe][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
|
|
2
|
-
`+
|
|
3
|
-
Expecting `+Fe.join(", ")+", got '"+(this.terminals_[
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(
|
|
5
|
-
`+o+"^"},"showPosition"),test_match:e(function(
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`<<${a.type}>>`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=ce(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
|
|
1
|
+
import{e,Qt,a,b,C,S,E,T,A,R,L,l,M,ue,oe,se,gt,ge,ye}from"./chunk-5v44qv67.js";import{he}from"./chunk-f5txt81n.js";import{le}from"./chunk-718mr5gc.js";var He=function(){var t=e(function(X,n,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=n);return o},"o"),d=[1,3],f=[1,4],m=[1,5],r=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,22],x=[2,7],k=[1,26],q=[1,27],V=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],y=[1,39],_=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],de=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],Ee=[1,83],Z=[1,80],be=[1,84],Re=[1,85],ke=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],ie=[1,106],re=[1,107],ne=[1,108],ae=[1,109],ce=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(n,o,h,i,p,s,Le){var c=s.length-1;switch(p){case 4:this.$=s[c].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=s[c].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(s[c-3],s[c-4]);break;case 22:i.addRequirement(s[c-5],s[c-6]),i.setClass([s[c-5]],s[c-3]);break;case 23:i.setNewReqId(s[c-2]);break;case 24:i.setNewReqText(s[c-2]);break;case 25:i.setNewReqRisk(s[c-2]);break;case 26:i.setNewReqVerifyMethod(s[c-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(s[c-3]);break;case 43:i.addElement(s[c-5]),i.setClass([s[c-5]],s[c-3]);break;case 44:i.setNewElementType(s[c-2]);break;case 45:i.setNewElementDocRef(s[c-2]);break;case 48:i.addRelationship(s[c-2],s[c],s[c-4]);break;case 49:i.addRelationship(s[c-2],s[c-4],s[c]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=s[c-2],i.defineClass(s[c-1],s[c]);break;case 58:i.setClass(s[c-1],s[c]);break;case 59:i.setClass([s[c-2]],s[c]);break;case 60:case 62:this.$=[s[c]];break;case 61:case 63:this.$=s[c-2].concat([s[c]]);break;case 64:this.$=s[c-2],i.setCssStyle(s[c-1],s[c]);break;case 65:this.$=[s[c]];break;case 66:s[c-2].push(s[c]),this.$=s[c-2];break;case 68:this.$=s[c-1]+s[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:r},{1:[2,2]},{4:17,5:N,7:13,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:N,7:42,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:43,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:44,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:45,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:46,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:47,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:48,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:49,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{4:17,5:N,7:50,8:x,9:f,11:m,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:k,22:q,23:V,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:y,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(g,[2,17]),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),{30:60,33:62,75:J,89:y,90:_},{30:63,33:62,75:J,89:y,90:_},{30:64,33:62,75:J,89:y,90:_},t(de,[2,29]),t(de,[2,30]),t(de,[2,31]),t(de,[2,32]),t(de,[2,33]),t(de,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:y,90:_},{73:79,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:Ee,76:Z,78:81,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:y,90:_},{5:[1,95]},{30:96,33:62,75:J,89:y,90:_},{5:[1,97]},{30:98,33:62,75:J,89:y,90:_},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(g,[2,59],{76:Z}),t(g,[2,64],{76:et}),{33:103,75:[1,102],89:y,90:_},t(tt,[2,65],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(w,[2,67]),t(w,[2,69]),t(w,[2,70]),t(w,[2,71]),t(w,[2,72]),t(w,[2,73]),t(w,[2,74]),t(w,[2,75]),t(w,[2,76]),t(w,[2,77]),t(w,[2,78]),t(g,[2,57],{76:et}),t(g,[2,58],{76:Z}),{5:te,28:105,31:ie,34:re,36:ne,38:ae,40:ce},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:y,90:_},{33:120,89:y,90:_},{75:Ee,78:121,79:82,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(w,[2,68]),t(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:ie,34:re,36:ne,38:ae,40:ce},t(g,[2,28]),{5:[1,127]},t(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(g,[2,47]),{5:[1,131]},t(g,[2,48]),t(g,[2,49]),t(tt,[2,66],{79:104,75:Ee,80:be,81:Re,82:ke,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:y,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(g,[2,27]),{5:te,28:145,31:ie,34:re,36:ne,38:ae,40:ce},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(g,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(g,[2,43]),{5:te,28:159,31:ie,34:re,36:ne,38:ae,40:ce},{5:te,28:160,31:ie,34:re,36:ne,38:ae,40:ce},{5:te,28:161,31:ie,34:re,36:ne,38:ae,40:ce},{5:te,28:162,31:ie,34:re,36:ne,38:ae,40:ce},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,44]),t(g,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(n,o){if(o.recoverable)this.trace(n);else{var h=Error(n);throw h.hash=o,h}},"parseError"),parse:e(function(n){var o=this,h=[0],i=[],p=[null],s=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=s.slice.call(arguments,1),I=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(I.setInput(n,me.yy),me.yy.lexer=I,me.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var Ue=I.yylloc;s.push(Ue);var ut=I.options&&I.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(O){h.length=h.length-2*O,p.length=p.length-O,s.length=s.length-O}e(mt,"popStack");function nt(){var O=i.pop()||I.lex()||rt;if(typeof O!=="number"){if(O instanceof Array)i=O,O=i.pop();O=o.symbols_[O]||O}return O}e(nt,"lex");var v,Ye,fe,D,kt,Be,pe={},Me,z,at,Fe;while(!0){if(fe=h[h.length-1],this.defaultActions[fe])D=this.defaultActions[fe];else{if(v===null||typeof v>"u")v=nt();D=Le[fe]&&Le[fe][v]}if(typeof D>"u"||!D.length||!D[0]){var Qe="";Fe=[];for(Me in Le[fe])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(I.showPosition)Qe="Parse error on line "+(Oe+1)+`:
|
|
2
|
+
`+I.showPosition()+`
|
|
3
|
+
Expecting `+Fe.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(v==rt?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(Qe,{text:I.match,token:this.terminals_[v]||v,line:I.yylineno,loc:Ue,expected:Fe})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+fe+", token: "+v);switch(D[0]){case 1:if(h.push(v),p.push(I.yytext),s.push(I.yylloc),h.push(D[1]),v=null,!Ye){if(st=I.yyleng,c=I.yytext,Oe=I.yylineno,Ue=I.yylloc,it>0)it--}else v=Ye,Ye=null;break;case 2:if(z=this.productions_[D[1]][1],pe.$=p[p.length-z],pe._$={first_line:s[s.length-(z||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(z||1)].first_column,last_column:s[s.length-1].last_column},ut)pe._$.range=[s[s.length-(z||1)].range[0],s[s.length-1].range[1]];if(Be=this.performAction.apply(pe,[c,st,Oe,me.yy,D[1],p,s].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),s=s.slice(0,-1*z);h.push(this.productions_[D[1]][0]),p.push(pe.$),s.push(pe._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(n,o){if(this.yy=o||this.yy||{},this._input=n,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:e(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var o=n.match(/(?:\r\n?|\n).*/g);if(o)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),n},"input"),unput:e(function(n){var o=n.length,h=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var i=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),h.length-1)this.yylineno-=h.length-1;var p=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:h?(h.length===i.length?this.yylloc.first_column:0)+i[i.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(n){this.unput(this.match.slice(n))},"less"),pastInput:e(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var n=this.match;if(n.length<20)n+=this._input.substr(0,20-n.length);return(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var n=this.pastInput(),o=Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:e(function(n,o){var h,i,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(i=n[0].match(/(?:\r\n?|\n).*/g),i)this.yylineno+=i.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in p)this[s]=p[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var n,o,h,i;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var s=0;s<p.length;s++)if(h=this._input.match(this.rules[p[s]]),h&&(!o||h[0].length>o[0].length)){if(o=h,i=s,this.options.backtrack_lexer)if(n=this.test_match(h,p[s]),n!==!1)return n;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(n=this.test_match(o,p[i]),n!==!1)return n;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:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,i,p){var s=p;switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var ft=He,dt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getConfig=e(()=>l().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),a.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let r of d)if(r.includes(","))m.cssStyles.push(...r.split(","));else m.cssStyles.push(r)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let r of d){m.classes.push(r);let u=this.classes.get(r)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(r){if(/color/.exec(r)){let u=r.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(r)});this.requirements.forEach((r)=>{if(r.classes.includes(f))r.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((r)=>{if(r.classes.includes(f))r.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=l(),d=[],f=[];for(let r of this.requirements.values()){let u=r;u.id=r.name,u.cssStyles=r.cssStyles,u.cssClasses=r.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let r of this.elements.values()){let u=r;u.shape="requirementBox",u.look=t.look,u.id=r.name,u.cssStyles=r.cssStyles,u.cssClasses=r.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let r of this.relations){let u=r.type===this.Relationships.CONTAINS,N={id:`${r.src}-${r.dst}-${m++}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(N)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},pt=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:r}=f;if(!oe(d,r))return"";let u=se(t.look),N="",x=ue(m);for(let k=0;k<gt(r);k++){let q=r[k],V=x?`fill: ${m[k%m.length]};`:"";N+=`
|
|
7
7
|
|
|
8
|
-
[data-look="${u}"][data-color-id="color-${
|
|
9
|
-
stroke: ${
|
|
10
|
-
${
|
|
8
|
+
[data-look="${u}"][data-color-id="color-${k}"].node path {
|
|
9
|
+
stroke: ${q};
|
|
10
|
+
${V}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
[data-look="${u}"][data-color-id="color-${
|
|
14
|
-
stroke: ${
|
|
15
|
-
${
|
|
13
|
+
[data-look="${u}"][data-color-id="color-${k}"].node rect {
|
|
14
|
+
stroke: ${q};
|
|
15
|
+
${V}
|
|
16
16
|
}
|
|
17
|
-
`}return
|
|
18
|
-
${
|
|
17
|
+
`}return N},"genColor"),Et=e((t)=>{let d=b(),{look:f,themeVariables:m}=d,{requirementEdgeLabelBackground:r}=m;return`
|
|
18
|
+
${pt()}
|
|
19
19
|
marker {
|
|
20
20
|
fill: ${t.relationColor};
|
|
21
21
|
stroke: ${t.relationColor};
|
|
@@ -78,7 +78,7 @@ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse e
|
|
|
78
78
|
color: ${t.nodeTextColor||t.textColor};
|
|
79
79
|
}
|
|
80
80
|
.labelBkg {
|
|
81
|
-
background-color: ${
|
|
81
|
+
background-color: ${r??t.edgeLabelBackground};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
`},"getStyles"),
|
|
84
|
+
`},"getStyles"),bt=Et,lt={};Qt(lt,{draw:()=>Rt});var Rt=e(async function(t,d,f,m){a.info("REF0:"),a.info("Drawing requirement diagram (unified)",d);let{securityLevel:r,state:u,layout:N,look:x}=l(),k=m.db.getData(),q=he(d,r);k.type=m.type,k.layoutAlgorithm=ye(N),k.nodeSpacing=u?.nodeSpacing??50,k.rankSpacing=u?.rankSpacing??50,k.markers=x==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],k.diagramId=d,await ge(k,q);let V=8;M.insertTitle(q,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),le(q,V,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:ft,get db(){return new dt},renderer:lt,styles:bt};export{Mt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,a}from"./chunk-5v44qv67.js";import{K,Dt,Mt}from"./chunk-fx0n2g22.js";import{G}from"./chunk-ya3ghn3n.js";import{sr,kt}from"./chunk-cktmyc13.js";var i=sr().RailroadPeg.parser.LangiumParser,s=e((r)=>{let t=r.alternatives.map(l);if(t.length===1)return t[0];return{type:"choice",alternatives:t}},"transformOrderedChoice"),l=e((r)=>{let t=r.elements.map(m);if(t.length===1)return t[0];return{type:"sequence",elements:t}},"transformSequence"),m=e((r)=>{let t=p(r.suffix);if(!r.operator)return t;return{type:"special",text:r.operator==="&"?`&${o(t)}`:`!${o(t)}`}},"transformPrefix"),o=e((r)=>{switch(r.type){case"terminal":return`"${r.value}"`;case"nonterminal":return r.name;case"special":return r.text;default:return"(...)"}},"nodeToLabel"),p=e((r)=>{let t=u(r.primary);if(!r.operator)return t;switch(r.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${r.operator}`)}},"transformSuffix"),u=e((r)=>{switch(r.$type){case"PegLiteral":return{type:"terminal",value:r.value};case"PegIdentifier":return{type:"nonterminal",name:r.name};case"PegGroup":return s(r.element);case"PegAny":return{type:"special",text:r.dot};default:throw Error(`Unsupported PEG primary node: ${r.$type}`)}},"transformPrimary"),c=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),f=e((r)=>{if(G(r,K),r.title)K.setTitle(r.title);r.rules.map((t)=>K.addRule(c(t)))},"populateDb"),d={parse:e((r)=>{K.clear(),a.debug("[PEG Parser] Starting Langium parse");let t=i.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new kt(t);let n=t.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:K}},w={parser:d,db:K,renderer:Mt,styles:Dt};export{w as diagram};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import{e,
|
|
1
|
+
import{e,a,Y,u,d,D,O,ht,l,V,et,tt,Et,yt,tn}from"./chunk-5v44qv67.js";import{je}from"./chunk-dwajwrpk.js";var ae=function(){var t=e(function(R,r,i,o){for(i=i||{},o=R.length;o--;i[R[o]]=r);return i},"o"),f=[1,4],m=[1,13],s=[1,12],y=[1,15],N=[1,16],S=[1,20],g=[1,19],A=[6,7,8],P=[1,26],b=[1,24],j=[1,25],x=[6,7,11],K=[1,31],L=[6,7,11,24],W=[1,6,13,16,17,20,23],k=[1,35],F=[1,36],T=[1,6,7,11,13,16,17,20,23],J=[1,38],G={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(r,i,o,c,p,n,M){var h=n.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",n[h-1].id),c.addNode(n[h-2].length,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 16:c.getLogger().info("Node: ",n[h].id),c.addNode(n[h-1].length,n[h].id,n[h].descr,n[h].type);break;case 17:c.getLogger().trace("Icon: ",n[h]),c.decorateNode({icon:n[h]});break;case 18:case 23:c.decorateNode({class:n[h]});break;case 19:c.getLogger().trace("SPACELIST");break;case 20:c.getLogger().trace("Node: ",n[h-1].id),c.addNode(0,n[h-1].id,n[h-1].descr,n[h-1].type,n[h]);break;case 21:c.getLogger().trace("Node: ",n[h].id),c.addNode(0,n[h].id,n[h].descr,n[h].type);break;case 22:c.decorateNode({icon:n[h]});break;case 27:c.getLogger().trace("node found ..",n[h-2]),this.$={id:n[h-1],descr:n[h-1],type:c.getType(n[h-2],n[h])};break;case 28:this.$={id:n[h],descr:n[h],type:0};break;case 29:c.getLogger().trace("node found ..",n[h-3]),this.$={id:n[h-3],descr:n[h-1],type:c.getType(n[h-2],n[h])};break;case 30:this.$=n[h-1]+n[h];break;case 31:this.$=n[h];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:m,7:[1,10],9:9,12:11,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(A,[2,3]),{1:[2,2]},t(A,[2,4]),t(A,[2,5]),{1:[2,6],6:m,12:21,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:m,9:22,12:11,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},{6:P,7:b,10:23,11:j},t(x,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:S,23:g}),t(x,[2,19]),t(x,[2,21],{15:30,24:K}),t(x,[2,22]),t(x,[2,23]),t(L,[2,25]),t(L,[2,26]),t(L,[2,28],{20:[1,32]}),{21:[1,33]},{6:P,7:b,10:34,11:j},{1:[2,7],6:m,12:21,13:s,14:14,16:y,17:N,18:17,19:18,20:S,23:g},t(W,[2,14],{7:k,11:F}),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(x,[2,16],{15:37,24:K}),t(x,[2,17]),t(x,[2,18]),t(x,[2,20],{24:J}),t(L,[2,31]),{21:[1,39]},{22:[1,40]},t(W,[2,13],{7:k,11:F}),t(T,[2,11]),t(T,[2,12]),t(x,[2,15],{24:J}),t(L,[2,30]),{22:[1,41]},t(L,[2,27]),t(L,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(r,i){if(i.recoverable)this.trace(r);else{var o=Error(r);throw o.hash=i,o}},"parseError"),parse:e(function(r){var i=this,o=[0],c=[],p=[null],n=[],M=this.table,h="",q=0,he=0,ue=0,be=2,ge=1,ye=n.slice.call(arguments,1),_=Object.create(this.lexer),U={yy:{}};for(var te in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,te))U.yy[te]=this.yy[te];if(_.setInput(r,U.yy),U.yy.lexer=_,U.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var ne=_.yylloc;n.push(ne);var me=_.options&&_.options.ranges;if(typeof U.yy.parseError==="function")this.parseError=U.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(C){o.length=o.length-2*C,p.length=p.length-C,n.length=n.length-C}e(ke,"popStack");function de(){var C=c.pop()||_.lex()||ge;if(typeof C!=="number"){if(C instanceof Array)c=C,C=c.pop();C=i.symbols_[C]||C}return C}e(de,"lex");var v,ie,H,I,Fe,re,X={},Q,B,pe,Z;while(!0){if(H=o[o.length-1],this.defaultActions[H])I=this.defaultActions[H];else{if(v===null||typeof v>"u")v=de();I=M[H]&&M[H][v]}if(typeof I>"u"||!I.length||!I[0]){var se="";Z=[];for(Q in M[H])if(this.terminals_[Q]&&Q>be)Z.push("'"+this.terminals_[Q]+"'");if(_.showPosition)se="Parse error on line "+(q+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+Z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else se="Parse error on line "+(q+1)+": Unexpected "+(v==ge?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(se,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+H+", token: "+v);switch(I[0]){case 1:if(
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(
|
|
5
|
-
`+i+"^"},"showPosition"),test_match:e(function(
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var i=this.next();if(i)return i;else return this.lex()},"lex"),begin:e(function(i){this.conditionStack.push(i)},"begin"),popState:e(function(){var i=this.conditionStack.length-1;if(i>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(i){if(i=this.conditionStack.length-1-Math.abs(i||0),i>=0)return this.conditionStack[i];else return"INITIAL"},"topState"),pushState:e(function(i){this.begin(i)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(i,c,
|
|
3
|
+
Expecting `+Z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else se="Parse error on line "+(q+1)+": Unexpected "+(v==ge?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(se,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:ne,expected:Z})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+H+", token: "+v);switch(I[0]){case 1:if(o.push(v),p.push(_.yytext),n.push(_.yylloc),o.push(I[1]),v=null,!ie){if(he=_.yyleng,h=_.yytext,q=_.yylineno,ne=_.yylloc,ue>0)ue--}else v=ie,ie=null;break;case 2:if(B=this.productions_[I[1]][1],X.$=p[p.length-B],X._$={first_line:n[n.length-(B||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(B||1)].first_column,last_column:n[n.length-1].last_column},me)X._$.range=[n[n.length-(B||1)].range[0],n[n.length-1].range[1]];if(re=this.performAction.apply(X,[h,he,q,U.yy,I[1],p,n].concat(ye)),typeof re<"u")return re;if(B)o=o.slice(0,-1*B*2),p=p.slice(0,-1*B),n=n.slice(0,-1*B);o.push(this.productions_[I[1]][0]),p.push(X.$),n.push(X._$),pe=M[o[o.length-2]][o[o.length-1]],o.push(pe);break;case 3:return!0}}return!0},"parse")},ee=function(){var R={EOF:1,parseError:e(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw Error(i)},"parseError"),setInput:e(function(r,i){if(this.yy=i||this.yy||{},this._input=r,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:e(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var i=r.match(/(?:\r\n?|\n).*/g);if(i)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),r},"input"),unput:e(function(r){var i=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;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),o.length-1)this.yylineno-=o.length-1;var p=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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-i];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(r){this.unput(this.match.slice(r))},"less"),pastInput:e(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var r=this.pastInput(),i=Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:e(function(r,i){var o,c,p;if(this.options.backtrack_lexer){if(p={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)p.yylloc.range=this.yylloc.range.slice(0)}if(c=r[0].match(/(?:\r\n?|\n).*/g),c)this.yylineno+=c.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(o)return o;else if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,i,o,c;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var n=0;n<p.length;n++)if(o=this._input.match(this.rules[p[n]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=n,this.options.backtrack_lexer)if(r=this.test_match(o,p[n]),r!==!1)return r;else if(this._backtrack){i=!1;continue}else return!1;else if(!this.options.flex)break}if(i){if(r=this.test_match(i,p[c]),r!==!1)return r;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:e(function(){var i=this.next();if(i)return i;else return this.lex()},"lex"),begin:e(function(i){this.conditionStack.push(i)},"begin"),popState:e(function(){var i=this.conditionStack.length-1;if(i>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(i){if(i=this.conditionStack.length-1-Math.abs(i||0),i>=0)return this.conditionStack[i];else return"INITIAL"},"topState"),pushState:e(function(i){this.begin(i)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(i,o,c,p){var n=p;switch(c){case 0:return this.pushState("shapeData"),o.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let M=/\n\s*/g;return o.yytext=o.yytext.replace(M,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return i.getLogger().trace("Found comment",o.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return i.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:i.getLogger().trace("end icon"),this.popState();break;case 16:return i.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return i.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 36:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return i.getLogger().trace("Long description:",o.yytext),21;break;case 42:return i.getLogger().trace("Long description:",o.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return R}();G.lexer=ee;function z(){this.yy={}}return e(z,"Parser"),z.prototype=G,G.Parser=z,new z}();ae.parser=ae;var Ee=ae,w=[],ce=[],oe=0,le={},_e=e(()=>{w=[],ce=[],oe=0,le={}},"clear"),Se=e((t)=>{if(w.length===0)return null;let f=w[0].level,m=null;for(let s=w.length-1;s>=0;s--){if(w[s].level===f&&!m)m=w[s];if(w[s].level<f)throw Error('Items without section detected, found section ("'+w[s].label+'")')}if(t===m?.level)return null;return m},"getSection"),fe=e(function(){return ce},"getSections"),Ne=e(function(){let t=[],f=[],m=fe(),s=l();for(let y of m){let N={id:y.id,label:O(y.label??"",s),labelType:"markdown",isGroup:!0,ticket:y.ticket,shape:"kanbanSection",level:y.level,look:s.look};f.push(N);let S=w.filter((g)=>g.parentId===y.id);for(let g of S){let A={id:g.id,parentId:y.id,label:O(g.label??"",s),labelType:"markdown",isGroup:!1,ticket:g?.ticket,priority:g?.priority,assigned:g?.assigned,icon:g?.icon,shape:"kanbanItem",level:g.level,rx:5,ry:5,cssStyles:["text-align: left"]};f.push(A)}}return{nodes:f,edges:t,other:{},config:l()}},"getData"),xe=e((t,f,m,s,y)=>{let N=l(),S=N.mindmap?.padding??D.mindmap.padding;switch(s){case E.ROUNDED_RECT:case E.RECT:case E.HEXAGON:S*=2}let g={id:O(f,N)||"kbn"+oe++,level:t,label:O(m,N),width:N.mindmap?.maxNodeWidth??D.mindmap.maxNodeWidth,padding:S,isGroup:!1};if(y!==void 0){let P;if(!y.includes(`
|
|
7
7
|
`))P=`{
|
|
8
8
|
`+y+`
|
|
9
9
|
}`;else P=y+`
|
|
10
|
-
`;let b=tt(P,{schema:et});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")g.shape=b?.shape;if(b?.label)g.label=b?.label;if(b?.icon)g.icon=b?.icon.toString();if(b?.assigned)g.assigned=b?.assigned.toString();if(b?.ticket)g.ticket=b?.ticket.toString();if(b?.priority)g.priority=b?.priority}let A=Se(t);if(A)g.parentId=A.id||"kbn"+oe++;else ce.push(g);w.push(g)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=e((t,f)=>{switch(
|
|
11
|
-
`+t);let N=
|
|
12
|
-
.section-${
|
|
13
|
-
fill: ${m(t["cScale"+
|
|
14
|
-
stroke: ${m(t["cScale"+
|
|
10
|
+
`;let b=tt(P,{schema:et});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);if(b?.shape&&b.shape==="kanbanItem")g.shape=b?.shape;if(b?.label)g.label=b?.label;if(b?.icon)g.icon=b?.icon.toString();if(b?.assigned)g.assigned=b?.assigned.toString();if(b?.ticket)g.ticket=b?.ticket.toString();if(b?.priority)g.priority=b?.priority}let A=Se(t);if(A)g.parentId=A.id||"kbn"+oe++;else ce.push(g);w.push(g)},"addNode"),E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ve=e((t,f)=>{switch(a.debug("In get type",t,f),t){case"[":return E.RECT;case"(":return f===")"?E.ROUNDED_RECT:E.CLOUD;case"((":return E.CIRCLE;case")":return E.CLOUD;case"))":return E.BANG;case"{{":return E.HEXAGON;default:return E.DEFAULT}},"getType"),De=e((t,f)=>{le[t]=f},"setElementForId"),Le=e((t)=>{if(!t)return;let f=l(),m=w[w.length-1];if(t.icon)m.icon=O(t.icon,f);if(t.class)m.cssClasses=O(t.class,f)},"decorateNode"),Oe=e((t)=>{switch(t){case E.DEFAULT:return"no-border";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded-rect";case E.CIRCLE:return"circle";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ie=e(()=>a,"getLogger"),Ce=e((t)=>le[t],"getElementById"),we={clear:_e,addNode:xe,getSections:fe,getData:Ne,nodeType:E,getType:ve,setElementForId:De,decorateNode:Le,type2Str:Oe,getLogger:Ie,getElementById:Ce},Ae=we,Te=e(async(t,f,m,s)=>{a.debug(`Rendering kanban diagram
|
|
11
|
+
`+t);let N=s.db.getData(),S=l();S.htmlLabels=!1;let g=V(f);for(let k of N.nodes)k.domId=`${f}-${k.id}`;let A=g.append("g");A.attr("class","sections");let P=g.append("g");P.attr("class","items");let b=N.nodes.filter((k)=>k.isGroup),j=0,x=10,K=[],L=25;for(let k of b){let F=S?.kanban?.sectionWidth||200;j=j+1,k.x=F*j+(j-1)*x/2,k.width=F,k.y=0,k.height=F*3,k.rx=5,k.ry=5,k.cssClasses=k.cssClasses+" section-"+j;let T=await tn(A,k);L=Math.max(L,T?.labelBBox?.height),K.push(T)}let W=0;for(let k of b){let F=K[W];W=W+1;let T=S?.kanban?.sectionWidth||200,J=-T*3/2+L,G=J,ee=N.nodes.filter((r)=>r.parentId===k.id);for(let r of ee){if(r.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");r.x=k.x,r.width=T-1.5*x;let o=(await Et(P,r,{config:S})).node().getBBox();r.y=G+o.height/2,await yt(r),G=r.y+o.height/2+x/2}let z=F.cluster.select("rect"),R=Math.max(G-J+3*x,50)+(L-25);z.attr("height",R)}ht(void 0,g,S.mindmap?.padding??D.kanban.padding,S.mindmap?.useMaxWidth??D.kanban.useMaxWidth)},"draw"),Re={draw:Te},Pe=e((t)=>{let f="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)if(t["lineColor"+s]=t["lineColor"+s]||t["cScaleInv"+s],Y(t["lineColor"+s]))t["lineColor"+s]=u(t["lineColor"+s],20);else t["lineColor"+s]=d(t["lineColor"+s],20);let m=e((s,y)=>t.darkMode?d(s,y):u(s,y),"adjuster");for(let s=0;s<t.THEME_COLOR_LIMIT;s++){let y=""+(17-3*s);f+=`
|
|
12
|
+
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
|
13
|
+
fill: ${m(t["cScale"+s],10)};
|
|
14
|
+
stroke: ${m(t["cScale"+s],10)};
|
|
15
15
|
|
|
16
16
|
}
|
|
17
|
-
.section-${
|
|
18
|
-
fill: ${t["cScaleLabel"+
|
|
17
|
+
.section-${s-1} text {
|
|
18
|
+
fill: ${t["cScaleLabel"+s]};
|
|
19
19
|
}
|
|
20
|
-
.node-icon-${
|
|
20
|
+
.node-icon-${s-1} {
|
|
21
21
|
font-size: 40px;
|
|
22
|
-
color: ${t["cScaleLabel"+
|
|
22
|
+
color: ${t["cScaleLabel"+s]};
|
|
23
23
|
}
|
|
24
|
-
.section-edge-${
|
|
25
|
-
stroke: ${t["cScale"+
|
|
24
|
+
.section-edge-${s-1}{
|
|
25
|
+
stroke: ${t["cScale"+s]};
|
|
26
26
|
}
|
|
27
|
-
.edge-depth-${
|
|
27
|
+
.edge-depth-${s-1}{
|
|
28
28
|
stroke-width: ${y};
|
|
29
29
|
}
|
|
30
|
-
.section-${
|
|
31
|
-
stroke: ${t["cScaleInv"+
|
|
30
|
+
.section-${s-1} line {
|
|
31
|
+
stroke: ${t["cScaleInv"+s]} ;
|
|
32
32
|
stroke-width: 3;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{G}from"./chunk-ya3ghn3n.js";import{e,a,ke,D,b,B,C,S,E,T,A,R,L,V,U}from"./chunk-5v44qv67.js";import{X}from"./chunk-cktmyc13.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},M=32,k={axes:[],curves:[],options:h},x=structuredClone(k),H=D.radar,j=e(()=>U({...H,...b().radar}),"getConfig"),O=e(()=>x.axes,"getAxes"),K=e(()=>x.curves,"getCurves"),N=e(()=>x.options,"getOptions"),Y=e((n)=>{x.axes=n.map((t)=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=e((n)=>{x.curves=n.map((t)=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=e((n)=>{if(n[0].axis==null)return n.map((r)=>r.value);let t=O();if(t.length===0)throw Error("Axes must be populated before curves for reference entries");return t.map((r)=>{let s=n.find((o)=>o.axis?.$refText===r.name);if(s===void 0)throw Error("Missing entry for axis "+r.label);return s.value})},"computeCurveEntries"),J=e((n)=>{let t=n.reduce((r,s)=>(r[s.name]=s,r),{});if(x.options={showLegend:t.showLegend?.value??h.showLegend,ticks:t.ticks?.value??h.ticks,max:t.max?.value??h.max,min:t.min?.value??h.min,graticule:t.graticule?.value??h.graticule},x.options.ticks>M)a.warn(`Radar diagram ticks (${x.options.ticks}) exceeds maximum allowed (${M}). Using ${M} instead.`),x.options.ticks=M},"setOptions"),Q=e(()=>{C(),x=structuredClone(k)},"clear"),y={getAxes:O,getCurves:K,getOptions:N,setAxes:Y,setCurves:Z,setOptions:J,getConfig:j,clear:Q,setAccTitle:S,getAccTitle:E,setDiagramTitle:R,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},tt=e((n)=>{G(n,y);let{axes:t,curves:r,options:s}=n;y.setAxes(t),y.setCurves(r),y.setOptions(s)},"populate"),et={parse:e(async(n)=>{let t=await X("radar",n);a.debug(t),tt(t)},"parse")},at=e((n,t,r,s)=>{let o=s.db,c=o.getAxes(),d=o.getCurves(),i=o.getOptions(),l=o.getConfig(),u=o.getDiagramTitle(),m=V(t),p=rt(m,l),g=i.max??Math.max(...d.map((w)=>Math.max(...w.entries))),v=i.min,f=Math.min(l.width,l.height)/2;nt(p,c,f,i.ticks,i.graticule),st(p,c,f,l),I(p,c,d,v,g,i.graticule,l),P(p,d,i.showLegend,l),p.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),rt=e((n,t)=>{let r=t.width+t.marginLeft+t.marginRight,s=t.height+t.marginTop+t.marginBottom,o={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(n,s,r,t.useMaxWidth??!0),n.attr("viewBox",`0 0 ${r} ${s}`).attr("overflow","visible"),n.append("g").attr("transform",`translate(${o.x}, ${o.y})`)},"drawFrame"),nt=e((n,t,r,s,o)=>{if(o==="circle")for(let c=0;c<s;c++){let d=r*(c+1)/s;n.append("circle").attr("r",d).attr("class","radarGraticule")}else if(o==="polygon"){let c=t.length;for(let d=0;d<s;d++){let i=r*(d+1)/s,l=t.map((u,m)=>{let p=2*m*Math.PI/c-Math.PI/2,g=i*Math.cos(p),v=i*Math.sin(p);return`${g},${v}`}).join(" ");n.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),st=e((n,t,r,s)=>{let o=t.length;for(let c=0;c<o;c++){let d=t[c].label,i=2*c*Math.PI/o-Math.PI/2,l=Math.cos(i),u=Math.sin(i);n.append("line").attr("x1",0).attr("y1",0).attr("x2",r*s.axisScaleFactor*l).attr("y2",r*s.axisScaleFactor*u).attr("class","radarAxisLine");let m=l>0.01?"start":l<-0.01?"end":"middle",p=u>0.01?"hanging":u<-0.01?"auto":"central",g=4;n.append("text").text(d).attr("x",r*s.axisLabelFactor*l+g*l).attr("y",r*s.axisLabelFactor*u+g*u).attr("text-anchor",m).attr("dominant-baseline",p).attr("class","radarAxisLabel")}},"drawAxes");function I(n,t,r,s,o,c,d){let i=t.length,l=Math.min(d.width,d.height)/2;r.forEach((u,m)=>{if(u.entries.length!==i)return;let p=u.entries.map((g,v)=>{let f=2*Math.PI*v/i-Math.PI/2,w=_(g,s,o,l),z=w*Math.cos(f),W=w*Math.sin(f);return{x:z,y:W}});if(c==="circle")n.append("path").attr("d",F(p,d.curveTension)).attr("class",`radarCurve-${m}`);else if(c==="polygon")n.append("polygon").attr("points",p.map((g)=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${m}`)})}e(I,"drawCurves");function _(n,t,r,s){let o=Math.min(Math.max(n,t),r);return s*(o-t)/(r-t)}e(_,"relativeRadius");function F(n,t){let r=n.length,s=`M${n[0].x},${n[0].y}`;for(let o=0;o<r;o++){let c=n[(o-1+r)%r],d=n[o],i=n[(o+1)%r],l=n[(o+2)%r],u={x:d.x+(i.x-c.x)*t,y:d.y+(i.y-c.y)*t},m={x:i.x-(l.x-d.x)*t,y:i.y-(l.y-d.y)*t};s+=` C${u.x},${u.y} ${m.x},${m.y} ${i.x},${i.y}`}return`${s} Z`}e(F,"closedRoundCurve");function P(n,t,r,s){if(!r)return;let o=(s.width/2+s.marginRight)*3/4,c=-(s.height/2+s.marginTop)*3/4,d=20;t.forEach((i,l)=>{let u=n.append("g").attr("transform",`translate(${o}, ${c+l*d})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(i.label)})}e(P,"drawLegend");var ot={draw:at},it=e((n,t)=>{let r="";for(let s=0;s<n.THEME_COLOR_LIMIT;s++){let o=n[`cScale${s}`];r+=`
|
|
2
2
|
.radarCurve-${s} {
|
|
3
3
|
color: ${o};
|
|
4
4
|
fill: ${o};
|
|
@@ -11,7 +11,7 @@ import{W}from"./chunk-y56aaba5.js";import{e,r,we,D,b,B,C,S,E,T,A,I,L,V,U}from"./
|
|
|
11
11
|
fill-opacity: ${t.curveOpacity};
|
|
12
12
|
stroke: ${o};
|
|
13
13
|
}
|
|
14
|
-
`}return
|
|
14
|
+
`}return r},"genIndexStyles"),lt=e((n)=>{let t=ke(),r=b(),s=U(t,r.themeVariables),o=U(s.radar,n);return{themeVariables:s,radarOptions:o}},"buildRadarStyleOptions"),ct=e(({radar:n}={})=>{let{themeVariables:t,radarOptions:r}=lt(n);return`
|
|
15
15
|
.radarTitle {
|
|
16
16
|
font-size: ${t.fontSize};
|
|
17
17
|
color: ${t.titleColor};
|
|
@@ -19,23 +19,23 @@ import{W}from"./chunk-y56aaba5.js";import{e,r,we,D,b,B,C,S,E,T,A,I,L,V,U}from"./
|
|
|
19
19
|
text-anchor: middle;
|
|
20
20
|
}
|
|
21
21
|
.radarAxisLine {
|
|
22
|
-
stroke: ${
|
|
23
|
-
stroke-width: ${
|
|
22
|
+
stroke: ${r.axisColor};
|
|
23
|
+
stroke-width: ${r.axisStrokeWidth};
|
|
24
24
|
}
|
|
25
25
|
.radarAxisLabel {
|
|
26
|
-
font-size: ${
|
|
27
|
-
color: ${
|
|
26
|
+
font-size: ${r.axisLabelFontSize}px;
|
|
27
|
+
color: ${r.axisColor};
|
|
28
28
|
}
|
|
29
29
|
.radarGraticule {
|
|
30
|
-
fill: ${
|
|
31
|
-
fill-opacity: ${
|
|
32
|
-
stroke: ${
|
|
33
|
-
stroke-width: ${
|
|
30
|
+
fill: ${r.graticuleColor};
|
|
31
|
+
fill-opacity: ${r.graticuleOpacity};
|
|
32
|
+
stroke: ${r.graticuleColor};
|
|
33
|
+
stroke-width: ${r.graticuleStrokeWidth};
|
|
34
34
|
}
|
|
35
35
|
.radarLegendText {
|
|
36
36
|
text-anchor: start;
|
|
37
|
-
font-size: ${
|
|
37
|
+
font-size: ${r.legendFontSize}px;
|
|
38
38
|
dominant-baseline: hanging;
|
|
39
39
|
}
|
|
40
|
-
${it(t,
|
|
40
|
+
${it(t,r)}
|
|
41
41
|
`},"styles"),vt={parser:et,db:y,renderer:ot,styles:ct};export{vt as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ai}from"./chunk-c01176kn.js";var e=Object.freeze(JSON.parse('{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}')),Jn=[...ai,e];
|
|
2
|
+
export{Jn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function Ot(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{Ot};
|