@copilotkitnext/react 0.0.22-alpha.7 → 0.0.22-alpha.8
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/package.json +4 -4
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/angular-html-LD6QEAZE.mjs +0 -7
- package/dist/angular-html-LD6QEAZE.mjs.map +0 -1
- package/dist/angular-ts-FGK7I2F5.mjs +0 -37
- package/dist/angular-ts-FGK7I2F5.mjs.map +0 -1
- package/dist/angular-ts-XZTE5LQS.mjs +0 -37
- package/dist/angular-ts-XZTE5LQS.mjs.map +0 -1
- package/dist/apl-VB2EG5RZ.mjs +0 -22
- package/dist/apl-VB2EG5RZ.mjs.map +0 -1
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs +0 -8712
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs.map +0 -1
- package/dist/blade-EZDWULER.mjs +0 -26
- package/dist/blade-EZDWULER.mjs.map +0 -1
- package/dist/blade-HS4Z7O3Y.mjs +0 -26
- package/dist/blade-HS4Z7O3Y.mjs.map +0 -1
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs +0 -3618
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs.map +0 -1
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs +0 -2495
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map +0 -1
- package/dist/chunk-2BAFECUC.mjs +0 -28
- package/dist/chunk-2BAFECUC.mjs.map +0 -1
- package/dist/chunk-BF5LDW2L.mjs +0 -65
- package/dist/chunk-BF5LDW2L.mjs.map +0 -1
- package/dist/chunk-BUEC2HNL.mjs +0 -762
- package/dist/chunk-BUEC2HNL.mjs.map +0 -1
- package/dist/chunk-CRGJ2YCV.mjs +0 -109
- package/dist/chunk-CRGJ2YCV.mjs.map +0 -1
- package/dist/chunk-DKZXT4VQ.mjs +0 -19
- package/dist/chunk-DKZXT4VQ.mjs.map +0 -1
- package/dist/chunk-DYQXFOGA.mjs +0 -34
- package/dist/chunk-DYQXFOGA.mjs.map +0 -1
- package/dist/chunk-ENI667QL.mjs +0 -806
- package/dist/chunk-ENI667QL.mjs.map +0 -1
- package/dist/chunk-GEUZOPED.mjs +0 -1834
- package/dist/chunk-GEUZOPED.mjs.map +0 -1
- package/dist/chunk-GU7334FJ.mjs +0 -538
- package/dist/chunk-GU7334FJ.mjs.map +0 -1
- package/dist/chunk-HNKEYT4A.mjs +0 -4693
- package/dist/chunk-HNKEYT4A.mjs.map +0 -1
- package/dist/chunk-HTMHAYGC.mjs +0 -14
- package/dist/chunk-HTMHAYGC.mjs.map +0 -1
- package/dist/chunk-JRLFMJ6U.mjs +0 -1923
- package/dist/chunk-JRLFMJ6U.mjs.map +0 -1
- package/dist/chunk-JYRND4DC.mjs +0 -22
- package/dist/chunk-JYRND4DC.mjs.map +0 -1
- package/dist/chunk-KFEPUFID.mjs +0 -52
- package/dist/chunk-KFEPUFID.mjs.map +0 -1
- package/dist/chunk-M3UH7XZX.mjs +0 -6222
- package/dist/chunk-M3UH7XZX.mjs.map +0 -1
- package/dist/chunk-ND4RYWG7.mjs +0 -12
- package/dist/chunk-ND4RYWG7.mjs.map +0 -1
- package/dist/chunk-VLSLBZME.mjs +0 -51
- package/dist/chunk-VLSLBZME.mjs.map +0 -1
- package/dist/chunk-WJBV3P3K.mjs +0 -55
- package/dist/chunk-WJBV3P3K.mjs.map +0 -1
- package/dist/chunk-X2TQ2HDS.mjs +0 -44
- package/dist/chunk-X2TQ2HDS.mjs.map +0 -1
- package/dist/chunk-YIDZOZG3.mjs +0 -103
- package/dist/chunk-YIDZOZG3.mjs.map +0 -1
- package/dist/chunk-YLW7IP7V.mjs +0 -14525
- package/dist/chunk-YLW7IP7V.mjs.map +0 -1
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs +0 -38
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs.map +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs +0 -38
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs.map +0 -1
- package/dist/cobol-PNTKRG5I.mjs +0 -17
- package/dist/cobol-PNTKRG5I.mjs.map +0 -1
- package/dist/crystal-BSMHK65A.mjs +0 -23
- package/dist/crystal-BSMHK65A.mjs.map +0 -1
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs +0 -710
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs.map +0 -1
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs +0 -538
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs.map +0 -1
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs +0 -319
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs.map +0 -1
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs +0 -231
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs.map +0 -1
- package/dist/edge-JOI74UJM.mjs +0 -19
- package/dist/edge-JOI74UJM.mjs.map +0 -1
- package/dist/elixir-FEL6DDPJ.mjs +0 -15
- package/dist/elixir-FEL6DDPJ.mjs.map +0 -1
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs +0 -1175
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map +0 -1
- package/dist/erb-Q2D6FWX3.mjs +0 -32
- package/dist/erb-Q2D6FWX3.mjs.map +0 -1
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs +0 -2349
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs.map +0 -1
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs +0 -2344
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs.map +0 -1
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs +0 -1221
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs.map +0 -1
- package/dist/glimmer-js-B32LCGFA.mjs +0 -19
- package/dist/glimmer-js-B32LCGFA.mjs.map +0 -1
- package/dist/glimmer-ts-4PHFAQCG.mjs +0 -19
- package/dist/glimmer-ts-4PHFAQCG.mjs.map +0 -1
- package/dist/hack-3ZNSL4KD.mjs +0 -17
- package/dist/hack-3ZNSL4KD.mjs.map +0 -1
- package/dist/handlebars-ICBC3AZK.mjs +0 -19
- package/dist/handlebars-ICBC3AZK.mjs.map +0 -1
- package/dist/html-BGY5P773.mjs +0 -6
- package/dist/html-BGY5P773.mjs.map +0 -1
- package/dist/html-derivative-3HGXHHFE.mjs +0 -7
- package/dist/html-derivative-3HGXHHFE.mjs.map +0 -1
- package/dist/index.css +0 -2385
- package/dist/index.css.map +0 -1
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs +0 -49
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs.map +0 -1
- package/dist/jinja-WL6HNMB5.mjs +0 -22
- package/dist/jinja-WL6HNMB5.mjs.map +0 -1
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs +0 -1259
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs.map +0 -1
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs +0 -1062
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs.map +0 -1
- package/dist/katex-4R42CMCB.mjs +0 -4
- package/dist/katex-4R42CMCB.mjs.map +0 -1
- package/dist/liquid-YS3YPW54.mjs +0 -19
- package/dist/liquid-YS3YPW54.mjs.map +0 -1
- package/dist/logo-mark-OHF64HAY.svg +0 -8
- package/dist/mdc-A66KLOT4.mjs +0 -20
- package/dist/mdc-A66KLOT4.mjs.map +0 -1
- package/dist/mermaid.core-4OWTNZSL.mjs +0 -1587
- package/dist/mermaid.core-4OWTNZSL.mjs.map +0 -1
- package/dist/mermaid.core-7AUE4M6E.mjs +0 -1587
- package/dist/mermaid.core-7AUE4M6E.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs.map +0 -1
- package/dist/nim-HUBKBJHZ.mjs +0 -26
- package/dist/nim-HUBKBJHZ.mjs.map +0 -1
- package/dist/perl-QHAMWWQ5.mjs +0 -22
- package/dist/perl-QHAMWWQ5.mjs.map +0 -1
- package/dist/php-FS5GKSPN.mjs +0 -11
- package/dist/php-FS5GKSPN.mjs.map +0 -1
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs +0 -200
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs.map +0 -1
- package/dist/pug-WTY5FMEA.mjs +0 -17
- package/dist/pug-WTY5FMEA.mjs.map +0 -1
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs +0 -1344
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs.map +0 -1
- package/dist/razor-BAB7LFWZ.mjs +0 -17
- package/dist/razor-BAB7LFWZ.mjs.map +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs +0 -1179
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs.map +0 -1
- package/dist/rst-AY7U27YM.mjs +0 -41
- package/dist/rst-AY7U27YM.mjs.map +0 -1
- package/dist/rst-Y2VLYMJI.mjs +0 -41
- package/dist/rst-Y2VLYMJI.mjs.map +0 -1
- package/dist/ruby-K4BNEYWG.mjs +0 -22
- package/dist/ruby-K4BNEYWG.mjs.map +0 -1
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs +0 -1230
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map +0 -1
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs +0 -3885
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs.map +0 -1
- package/dist/soy-5QMQV2KL.mjs +0 -15
- package/dist/soy-5QMQV2KL.mjs.map +0 -1
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs +0 -467
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs.map +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs +0 -37
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs.map +0 -1
- package/dist/templ-VSARRSO2.mjs +0 -17
- package/dist/templ-VSARRSO2.mjs.map +0 -1
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs +0 -1226
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs.map +0 -1
- package/dist/ts-tags-YK3Q2LIW.mjs +0 -68
- package/dist/ts-tags-YK3Q2LIW.mjs.map +0 -1
- package/dist/twig-HNMWLN6H.mjs +0 -40
- package/dist/twig-HNMWLN6H.mjs.map +0 -1
- package/dist/vue-7OSX6ZY5.mjs +0 -10
- package/dist/vue-7OSX6ZY5.mjs.map +0 -1
- package/dist/vue-html-AQH2V2EU.mjs +0 -20
- package/dist/vue-html-AQH2V2EU.mjs.map +0 -1
- package/dist/vue-vine-GCYT2IGV.mjs +0 -29
- package/dist/vue-vine-GCYT2IGV.mjs.map +0 -1
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs +0 -1865
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs.map +0 -1
|
@@ -1,2495 +0,0 @@
|
|
|
1
|
-
import { getNoteRect, drawRect } from './chunk-CRGJ2YCV.mjs';
|
|
2
|
-
import { wrapLabel, calculateTextHeight, calculateTextWidth } from './chunk-GU7334FJ.mjs';
|
|
3
|
-
import { require_dist } from './chunk-ZGPFSRJJ.mjs';
|
|
4
|
-
import { setAccDescription, getAccDescription, getAccTitle, setAccTitle, assignWithDepth_default, getConfig2, sanitizeText, common_default, configureSvgSize } from './chunk-HNKEYT4A.mjs';
|
|
5
|
-
import './chunk-7O6EKIFY.mjs';
|
|
6
|
-
import { __name, select_default, log } from './chunk-WHXHCOFP.mjs';
|
|
7
|
-
import { __toESM } from './chunk-SH6YXSHR.mjs';
|
|
8
|
-
|
|
9
|
-
// ../../node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.mjs
|
|
10
|
-
var import_sanitize_url = __toESM(require_dist(), 1);
|
|
11
|
-
var parser = function() {
|
|
12
|
-
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
13
|
-
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
14
|
-
return o2;
|
|
15
|
-
}, "o"), $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74];
|
|
16
|
-
var parser2 = {
|
|
17
|
-
trace: /* @__PURE__ */ __name(function trace() {
|
|
18
|
-
}, "trace"),
|
|
19
|
-
yy: {},
|
|
20
|
-
symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 },
|
|
21
|
-
terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
|
|
22
|
-
productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
|
|
23
|
-
performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
24
|
-
var $0 = $$.length - 1;
|
|
25
|
-
switch (yystate) {
|
|
26
|
-
case 3:
|
|
27
|
-
yy.setDirection("TB");
|
|
28
|
-
break;
|
|
29
|
-
case 4:
|
|
30
|
-
yy.setDirection("BT");
|
|
31
|
-
break;
|
|
32
|
-
case 5:
|
|
33
|
-
yy.setDirection("RL");
|
|
34
|
-
break;
|
|
35
|
-
case 6:
|
|
36
|
-
yy.setDirection("LR");
|
|
37
|
-
break;
|
|
38
|
-
case 8:
|
|
39
|
-
case 9:
|
|
40
|
-
case 10:
|
|
41
|
-
case 11:
|
|
42
|
-
case 12:
|
|
43
|
-
yy.setC4Type($$[$0 - 3]);
|
|
44
|
-
break;
|
|
45
|
-
case 19:
|
|
46
|
-
yy.setTitle($$[$0].substring(6));
|
|
47
|
-
this.$ = $$[$0].substring(6);
|
|
48
|
-
break;
|
|
49
|
-
case 20:
|
|
50
|
-
yy.setAccDescription($$[$0].substring(15));
|
|
51
|
-
this.$ = $$[$0].substring(15);
|
|
52
|
-
break;
|
|
53
|
-
case 21:
|
|
54
|
-
this.$ = $$[$0].trim();
|
|
55
|
-
yy.setTitle(this.$);
|
|
56
|
-
break;
|
|
57
|
-
case 22:
|
|
58
|
-
case 23:
|
|
59
|
-
this.$ = $$[$0].trim();
|
|
60
|
-
yy.setAccDescription(this.$);
|
|
61
|
-
break;
|
|
62
|
-
case 28:
|
|
63
|
-
$$[$0].splice(2, 0, "ENTERPRISE");
|
|
64
|
-
yy.addPersonOrSystemBoundary(...$$[$0]);
|
|
65
|
-
this.$ = $$[$0];
|
|
66
|
-
break;
|
|
67
|
-
case 29:
|
|
68
|
-
$$[$0].splice(2, 0, "SYSTEM");
|
|
69
|
-
yy.addPersonOrSystemBoundary(...$$[$0]);
|
|
70
|
-
this.$ = $$[$0];
|
|
71
|
-
break;
|
|
72
|
-
case 30:
|
|
73
|
-
yy.addPersonOrSystemBoundary(...$$[$0]);
|
|
74
|
-
this.$ = $$[$0];
|
|
75
|
-
break;
|
|
76
|
-
case 31:
|
|
77
|
-
$$[$0].splice(2, 0, "CONTAINER");
|
|
78
|
-
yy.addContainerBoundary(...$$[$0]);
|
|
79
|
-
this.$ = $$[$0];
|
|
80
|
-
break;
|
|
81
|
-
case 32:
|
|
82
|
-
yy.addDeploymentNode("node", ...$$[$0]);
|
|
83
|
-
this.$ = $$[$0];
|
|
84
|
-
break;
|
|
85
|
-
case 33:
|
|
86
|
-
yy.addDeploymentNode("nodeL", ...$$[$0]);
|
|
87
|
-
this.$ = $$[$0];
|
|
88
|
-
break;
|
|
89
|
-
case 34:
|
|
90
|
-
yy.addDeploymentNode("nodeR", ...$$[$0]);
|
|
91
|
-
this.$ = $$[$0];
|
|
92
|
-
break;
|
|
93
|
-
case 35:
|
|
94
|
-
yy.popBoundaryParseStack();
|
|
95
|
-
break;
|
|
96
|
-
case 39:
|
|
97
|
-
yy.addPersonOrSystem("person", ...$$[$0]);
|
|
98
|
-
this.$ = $$[$0];
|
|
99
|
-
break;
|
|
100
|
-
case 40:
|
|
101
|
-
yy.addPersonOrSystem("external_person", ...$$[$0]);
|
|
102
|
-
this.$ = $$[$0];
|
|
103
|
-
break;
|
|
104
|
-
case 41:
|
|
105
|
-
yy.addPersonOrSystem("system", ...$$[$0]);
|
|
106
|
-
this.$ = $$[$0];
|
|
107
|
-
break;
|
|
108
|
-
case 42:
|
|
109
|
-
yy.addPersonOrSystem("system_db", ...$$[$0]);
|
|
110
|
-
this.$ = $$[$0];
|
|
111
|
-
break;
|
|
112
|
-
case 43:
|
|
113
|
-
yy.addPersonOrSystem("system_queue", ...$$[$0]);
|
|
114
|
-
this.$ = $$[$0];
|
|
115
|
-
break;
|
|
116
|
-
case 44:
|
|
117
|
-
yy.addPersonOrSystem("external_system", ...$$[$0]);
|
|
118
|
-
this.$ = $$[$0];
|
|
119
|
-
break;
|
|
120
|
-
case 45:
|
|
121
|
-
yy.addPersonOrSystem("external_system_db", ...$$[$0]);
|
|
122
|
-
this.$ = $$[$0];
|
|
123
|
-
break;
|
|
124
|
-
case 46:
|
|
125
|
-
yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
|
|
126
|
-
this.$ = $$[$0];
|
|
127
|
-
break;
|
|
128
|
-
case 47:
|
|
129
|
-
yy.addContainer("container", ...$$[$0]);
|
|
130
|
-
this.$ = $$[$0];
|
|
131
|
-
break;
|
|
132
|
-
case 48:
|
|
133
|
-
yy.addContainer("container_db", ...$$[$0]);
|
|
134
|
-
this.$ = $$[$0];
|
|
135
|
-
break;
|
|
136
|
-
case 49:
|
|
137
|
-
yy.addContainer("container_queue", ...$$[$0]);
|
|
138
|
-
this.$ = $$[$0];
|
|
139
|
-
break;
|
|
140
|
-
case 50:
|
|
141
|
-
yy.addContainer("external_container", ...$$[$0]);
|
|
142
|
-
this.$ = $$[$0];
|
|
143
|
-
break;
|
|
144
|
-
case 51:
|
|
145
|
-
yy.addContainer("external_container_db", ...$$[$0]);
|
|
146
|
-
this.$ = $$[$0];
|
|
147
|
-
break;
|
|
148
|
-
case 52:
|
|
149
|
-
yy.addContainer("external_container_queue", ...$$[$0]);
|
|
150
|
-
this.$ = $$[$0];
|
|
151
|
-
break;
|
|
152
|
-
case 53:
|
|
153
|
-
yy.addComponent("component", ...$$[$0]);
|
|
154
|
-
this.$ = $$[$0];
|
|
155
|
-
break;
|
|
156
|
-
case 54:
|
|
157
|
-
yy.addComponent("component_db", ...$$[$0]);
|
|
158
|
-
this.$ = $$[$0];
|
|
159
|
-
break;
|
|
160
|
-
case 55:
|
|
161
|
-
yy.addComponent("component_queue", ...$$[$0]);
|
|
162
|
-
this.$ = $$[$0];
|
|
163
|
-
break;
|
|
164
|
-
case 56:
|
|
165
|
-
yy.addComponent("external_component", ...$$[$0]);
|
|
166
|
-
this.$ = $$[$0];
|
|
167
|
-
break;
|
|
168
|
-
case 57:
|
|
169
|
-
yy.addComponent("external_component_db", ...$$[$0]);
|
|
170
|
-
this.$ = $$[$0];
|
|
171
|
-
break;
|
|
172
|
-
case 58:
|
|
173
|
-
yy.addComponent("external_component_queue", ...$$[$0]);
|
|
174
|
-
this.$ = $$[$0];
|
|
175
|
-
break;
|
|
176
|
-
case 60:
|
|
177
|
-
yy.addRel("rel", ...$$[$0]);
|
|
178
|
-
this.$ = $$[$0];
|
|
179
|
-
break;
|
|
180
|
-
case 61:
|
|
181
|
-
yy.addRel("birel", ...$$[$0]);
|
|
182
|
-
this.$ = $$[$0];
|
|
183
|
-
break;
|
|
184
|
-
case 62:
|
|
185
|
-
yy.addRel("rel_u", ...$$[$0]);
|
|
186
|
-
this.$ = $$[$0];
|
|
187
|
-
break;
|
|
188
|
-
case 63:
|
|
189
|
-
yy.addRel("rel_d", ...$$[$0]);
|
|
190
|
-
this.$ = $$[$0];
|
|
191
|
-
break;
|
|
192
|
-
case 64:
|
|
193
|
-
yy.addRel("rel_l", ...$$[$0]);
|
|
194
|
-
this.$ = $$[$0];
|
|
195
|
-
break;
|
|
196
|
-
case 65:
|
|
197
|
-
yy.addRel("rel_r", ...$$[$0]);
|
|
198
|
-
this.$ = $$[$0];
|
|
199
|
-
break;
|
|
200
|
-
case 66:
|
|
201
|
-
yy.addRel("rel_b", ...$$[$0]);
|
|
202
|
-
this.$ = $$[$0];
|
|
203
|
-
break;
|
|
204
|
-
case 67:
|
|
205
|
-
$$[$0].splice(0, 1);
|
|
206
|
-
yy.addRel("rel", ...$$[$0]);
|
|
207
|
-
this.$ = $$[$0];
|
|
208
|
-
break;
|
|
209
|
-
case 68:
|
|
210
|
-
yy.updateElStyle("update_el_style", ...$$[$0]);
|
|
211
|
-
this.$ = $$[$0];
|
|
212
|
-
break;
|
|
213
|
-
case 69:
|
|
214
|
-
yy.updateRelStyle("update_rel_style", ...$$[$0]);
|
|
215
|
-
this.$ = $$[$0];
|
|
216
|
-
break;
|
|
217
|
-
case 70:
|
|
218
|
-
yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
|
|
219
|
-
this.$ = $$[$0];
|
|
220
|
-
break;
|
|
221
|
-
case 71:
|
|
222
|
-
this.$ = [$$[$0]];
|
|
223
|
-
break;
|
|
224
|
-
case 72:
|
|
225
|
-
$$[$0].unshift($$[$0 - 1]);
|
|
226
|
-
this.$ = $$[$0];
|
|
227
|
-
break;
|
|
228
|
-
case 73:
|
|
229
|
-
case 75:
|
|
230
|
-
this.$ = $$[$0].trim();
|
|
231
|
-
break;
|
|
232
|
-
case 74:
|
|
233
|
-
let kv = {};
|
|
234
|
-
kv[$$[$0 - 1].trim()] = $$[$0].trim();
|
|
235
|
-
this.$ = kv;
|
|
236
|
-
break;
|
|
237
|
-
case 76:
|
|
238
|
-
this.$ = "";
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
}, "anonymous"),
|
|
242
|
-
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])],
|
|
243
|
-
defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
|
|
244
|
-
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
245
|
-
if (hash.recoverable) {
|
|
246
|
-
this.trace(str);
|
|
247
|
-
} else {
|
|
248
|
-
var error = new Error(str);
|
|
249
|
-
error.hash = hash;
|
|
250
|
-
throw error;
|
|
251
|
-
}
|
|
252
|
-
}, "parseError"),
|
|
253
|
-
parse: /* @__PURE__ */ __name(function parse(input) {
|
|
254
|
-
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
255
|
-
var args = lstack.slice.call(arguments, 1);
|
|
256
|
-
var lexer2 = Object.create(this.lexer);
|
|
257
|
-
var sharedState = { yy: {} };
|
|
258
|
-
for (var k in this.yy) {
|
|
259
|
-
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
260
|
-
sharedState.yy[k] = this.yy[k];
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
lexer2.setInput(input, sharedState.yy);
|
|
264
|
-
sharedState.yy.lexer = lexer2;
|
|
265
|
-
sharedState.yy.parser = this;
|
|
266
|
-
if (typeof lexer2.yylloc == "undefined") {
|
|
267
|
-
lexer2.yylloc = {};
|
|
268
|
-
}
|
|
269
|
-
var yyloc = lexer2.yylloc;
|
|
270
|
-
lstack.push(yyloc);
|
|
271
|
-
var ranges = lexer2.options && lexer2.options.ranges;
|
|
272
|
-
if (typeof sharedState.yy.parseError === "function") {
|
|
273
|
-
this.parseError = sharedState.yy.parseError;
|
|
274
|
-
} else {
|
|
275
|
-
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
276
|
-
}
|
|
277
|
-
function popStack(n) {
|
|
278
|
-
stack.length = stack.length - 2 * n;
|
|
279
|
-
vstack.length = vstack.length - n;
|
|
280
|
-
lstack.length = lstack.length - n;
|
|
281
|
-
}
|
|
282
|
-
__name(popStack, "popStack");
|
|
283
|
-
function lex() {
|
|
284
|
-
var token;
|
|
285
|
-
token = tstack.pop() || lexer2.lex() || EOF;
|
|
286
|
-
if (typeof token !== "number") {
|
|
287
|
-
if (token instanceof Array) {
|
|
288
|
-
tstack = token;
|
|
289
|
-
token = tstack.pop();
|
|
290
|
-
}
|
|
291
|
-
token = self.symbols_[token] || token;
|
|
292
|
-
}
|
|
293
|
-
return token;
|
|
294
|
-
}
|
|
295
|
-
__name(lex, "lex");
|
|
296
|
-
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
297
|
-
while (true) {
|
|
298
|
-
state = stack[stack.length - 1];
|
|
299
|
-
if (this.defaultActions[state]) {
|
|
300
|
-
action = this.defaultActions[state];
|
|
301
|
-
} else {
|
|
302
|
-
if (symbol === null || typeof symbol == "undefined") {
|
|
303
|
-
symbol = lex();
|
|
304
|
-
}
|
|
305
|
-
action = table[state] && table[state][symbol];
|
|
306
|
-
}
|
|
307
|
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
308
|
-
var errStr = "";
|
|
309
|
-
expected = [];
|
|
310
|
-
for (p in table[state]) {
|
|
311
|
-
if (this.terminals_[p] && p > TERROR) {
|
|
312
|
-
expected.push("'" + this.terminals_[p] + "'");
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
if (lexer2.showPosition) {
|
|
316
|
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
317
|
-
} else {
|
|
318
|
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
319
|
-
}
|
|
320
|
-
this.parseError(errStr, {
|
|
321
|
-
text: lexer2.match,
|
|
322
|
-
token: this.terminals_[symbol] || symbol,
|
|
323
|
-
line: lexer2.yylineno,
|
|
324
|
-
loc: yyloc,
|
|
325
|
-
expected
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
if (action[0] instanceof Array && action.length > 1) {
|
|
329
|
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
330
|
-
}
|
|
331
|
-
switch (action[0]) {
|
|
332
|
-
case 1:
|
|
333
|
-
stack.push(symbol);
|
|
334
|
-
vstack.push(lexer2.yytext);
|
|
335
|
-
lstack.push(lexer2.yylloc);
|
|
336
|
-
stack.push(action[1]);
|
|
337
|
-
symbol = null;
|
|
338
|
-
{
|
|
339
|
-
yyleng = lexer2.yyleng;
|
|
340
|
-
yytext = lexer2.yytext;
|
|
341
|
-
yylineno = lexer2.yylineno;
|
|
342
|
-
yyloc = lexer2.yylloc;
|
|
343
|
-
}
|
|
344
|
-
break;
|
|
345
|
-
case 2:
|
|
346
|
-
len = this.productions_[action[1]][1];
|
|
347
|
-
yyval.$ = vstack[vstack.length - len];
|
|
348
|
-
yyval._$ = {
|
|
349
|
-
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
350
|
-
last_line: lstack[lstack.length - 1].last_line,
|
|
351
|
-
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
352
|
-
last_column: lstack[lstack.length - 1].last_column
|
|
353
|
-
};
|
|
354
|
-
if (ranges) {
|
|
355
|
-
yyval._$.range = [
|
|
356
|
-
lstack[lstack.length - (len || 1)].range[0],
|
|
357
|
-
lstack[lstack.length - 1].range[1]
|
|
358
|
-
];
|
|
359
|
-
}
|
|
360
|
-
r = this.performAction.apply(yyval, [
|
|
361
|
-
yytext,
|
|
362
|
-
yyleng,
|
|
363
|
-
yylineno,
|
|
364
|
-
sharedState.yy,
|
|
365
|
-
action[1],
|
|
366
|
-
vstack,
|
|
367
|
-
lstack
|
|
368
|
-
].concat(args));
|
|
369
|
-
if (typeof r !== "undefined") {
|
|
370
|
-
return r;
|
|
371
|
-
}
|
|
372
|
-
if (len) {
|
|
373
|
-
stack = stack.slice(0, -1 * len * 2);
|
|
374
|
-
vstack = vstack.slice(0, -1 * len);
|
|
375
|
-
lstack = lstack.slice(0, -1 * len);
|
|
376
|
-
}
|
|
377
|
-
stack.push(this.productions_[action[1]][0]);
|
|
378
|
-
vstack.push(yyval.$);
|
|
379
|
-
lstack.push(yyval._$);
|
|
380
|
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
381
|
-
stack.push(newState);
|
|
382
|
-
break;
|
|
383
|
-
case 3:
|
|
384
|
-
return true;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
return true;
|
|
388
|
-
}, "parse")
|
|
389
|
-
};
|
|
390
|
-
var lexer = /* @__PURE__ */ function() {
|
|
391
|
-
var lexer2 = {
|
|
392
|
-
EOF: 1,
|
|
393
|
-
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
394
|
-
if (this.yy.parser) {
|
|
395
|
-
this.yy.parser.parseError(str, hash);
|
|
396
|
-
} else {
|
|
397
|
-
throw new Error(str);
|
|
398
|
-
}
|
|
399
|
-
}, "parseError"),
|
|
400
|
-
// resets the lexer, sets new input
|
|
401
|
-
setInput: /* @__PURE__ */ __name(function(input, yy) {
|
|
402
|
-
this.yy = yy || this.yy || {};
|
|
403
|
-
this._input = input;
|
|
404
|
-
this._more = this._backtrack = this.done = false;
|
|
405
|
-
this.yylineno = this.yyleng = 0;
|
|
406
|
-
this.yytext = this.matched = this.match = "";
|
|
407
|
-
this.conditionStack = ["INITIAL"];
|
|
408
|
-
this.yylloc = {
|
|
409
|
-
first_line: 1,
|
|
410
|
-
first_column: 0,
|
|
411
|
-
last_line: 1,
|
|
412
|
-
last_column: 0
|
|
413
|
-
};
|
|
414
|
-
if (this.options.ranges) {
|
|
415
|
-
this.yylloc.range = [0, 0];
|
|
416
|
-
}
|
|
417
|
-
this.offset = 0;
|
|
418
|
-
return this;
|
|
419
|
-
}, "setInput"),
|
|
420
|
-
// consumes and returns one char from the input
|
|
421
|
-
input: /* @__PURE__ */ __name(function() {
|
|
422
|
-
var ch = this._input[0];
|
|
423
|
-
this.yytext += ch;
|
|
424
|
-
this.yyleng++;
|
|
425
|
-
this.offset++;
|
|
426
|
-
this.match += ch;
|
|
427
|
-
this.matched += ch;
|
|
428
|
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
429
|
-
if (lines) {
|
|
430
|
-
this.yylineno++;
|
|
431
|
-
this.yylloc.last_line++;
|
|
432
|
-
} else {
|
|
433
|
-
this.yylloc.last_column++;
|
|
434
|
-
}
|
|
435
|
-
if (this.options.ranges) {
|
|
436
|
-
this.yylloc.range[1]++;
|
|
437
|
-
}
|
|
438
|
-
this._input = this._input.slice(1);
|
|
439
|
-
return ch;
|
|
440
|
-
}, "input"),
|
|
441
|
-
// unshifts one char (or a string) into the input
|
|
442
|
-
unput: /* @__PURE__ */ __name(function(ch) {
|
|
443
|
-
var len = ch.length;
|
|
444
|
-
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
445
|
-
this._input = ch + this._input;
|
|
446
|
-
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
447
|
-
this.offset -= len;
|
|
448
|
-
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
449
|
-
this.match = this.match.substr(0, this.match.length - 1);
|
|
450
|
-
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
451
|
-
if (lines.length - 1) {
|
|
452
|
-
this.yylineno -= lines.length - 1;
|
|
453
|
-
}
|
|
454
|
-
var r = this.yylloc.range;
|
|
455
|
-
this.yylloc = {
|
|
456
|
-
first_line: this.yylloc.first_line,
|
|
457
|
-
last_line: this.yylineno + 1,
|
|
458
|
-
first_column: this.yylloc.first_column,
|
|
459
|
-
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
460
|
-
};
|
|
461
|
-
if (this.options.ranges) {
|
|
462
|
-
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
463
|
-
}
|
|
464
|
-
this.yyleng = this.yytext.length;
|
|
465
|
-
return this;
|
|
466
|
-
}, "unput"),
|
|
467
|
-
// When called from action, caches matched text and appends it on next action
|
|
468
|
-
more: /* @__PURE__ */ __name(function() {
|
|
469
|
-
this._more = true;
|
|
470
|
-
return this;
|
|
471
|
-
}, "more"),
|
|
472
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
473
|
-
reject: /* @__PURE__ */ __name(function() {
|
|
474
|
-
if (this.options.backtrack_lexer) {
|
|
475
|
-
this._backtrack = true;
|
|
476
|
-
} else {
|
|
477
|
-
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).\n" + this.showPosition(), {
|
|
478
|
-
text: "",
|
|
479
|
-
token: null,
|
|
480
|
-
line: this.yylineno
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
return this;
|
|
484
|
-
}, "reject"),
|
|
485
|
-
// retain first n characters of the match
|
|
486
|
-
less: /* @__PURE__ */ __name(function(n) {
|
|
487
|
-
this.unput(this.match.slice(n));
|
|
488
|
-
}, "less"),
|
|
489
|
-
// displays already matched input, i.e. for error messages
|
|
490
|
-
pastInput: /* @__PURE__ */ __name(function() {
|
|
491
|
-
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
492
|
-
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
493
|
-
}, "pastInput"),
|
|
494
|
-
// displays upcoming input, i.e. for error messages
|
|
495
|
-
upcomingInput: /* @__PURE__ */ __name(function() {
|
|
496
|
-
var next = this.match;
|
|
497
|
-
if (next.length < 20) {
|
|
498
|
-
next += this._input.substr(0, 20 - next.length);
|
|
499
|
-
}
|
|
500
|
-
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
501
|
-
}, "upcomingInput"),
|
|
502
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
503
|
-
showPosition: /* @__PURE__ */ __name(function() {
|
|
504
|
-
var pre = this.pastInput();
|
|
505
|
-
var c2 = new Array(pre.length + 1).join("-");
|
|
506
|
-
return pre + this.upcomingInput() + "\n" + c2 + "^";
|
|
507
|
-
}, "showPosition"),
|
|
508
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
509
|
-
test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
|
|
510
|
-
var token, lines, backup;
|
|
511
|
-
if (this.options.backtrack_lexer) {
|
|
512
|
-
backup = {
|
|
513
|
-
yylineno: this.yylineno,
|
|
514
|
-
yylloc: {
|
|
515
|
-
first_line: this.yylloc.first_line,
|
|
516
|
-
last_line: this.last_line,
|
|
517
|
-
first_column: this.yylloc.first_column,
|
|
518
|
-
last_column: this.yylloc.last_column
|
|
519
|
-
},
|
|
520
|
-
yytext: this.yytext,
|
|
521
|
-
match: this.match,
|
|
522
|
-
matches: this.matches,
|
|
523
|
-
matched: this.matched,
|
|
524
|
-
yyleng: this.yyleng,
|
|
525
|
-
offset: this.offset,
|
|
526
|
-
_more: this._more,
|
|
527
|
-
_input: this._input,
|
|
528
|
-
yy: this.yy,
|
|
529
|
-
conditionStack: this.conditionStack.slice(0),
|
|
530
|
-
done: this.done
|
|
531
|
-
};
|
|
532
|
-
if (this.options.ranges) {
|
|
533
|
-
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
537
|
-
if (lines) {
|
|
538
|
-
this.yylineno += lines.length;
|
|
539
|
-
}
|
|
540
|
-
this.yylloc = {
|
|
541
|
-
first_line: this.yylloc.last_line,
|
|
542
|
-
last_line: this.yylineno + 1,
|
|
543
|
-
first_column: this.yylloc.last_column,
|
|
544
|
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
545
|
-
};
|
|
546
|
-
this.yytext += match[0];
|
|
547
|
-
this.match += match[0];
|
|
548
|
-
this.matches = match;
|
|
549
|
-
this.yyleng = this.yytext.length;
|
|
550
|
-
if (this.options.ranges) {
|
|
551
|
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
552
|
-
}
|
|
553
|
-
this._more = false;
|
|
554
|
-
this._backtrack = false;
|
|
555
|
-
this._input = this._input.slice(match[0].length);
|
|
556
|
-
this.matched += match[0];
|
|
557
|
-
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
558
|
-
if (this.done && this._input) {
|
|
559
|
-
this.done = false;
|
|
560
|
-
}
|
|
561
|
-
if (token) {
|
|
562
|
-
return token;
|
|
563
|
-
} else if (this._backtrack) {
|
|
564
|
-
for (var k in backup) {
|
|
565
|
-
this[k] = backup[k];
|
|
566
|
-
}
|
|
567
|
-
return false;
|
|
568
|
-
}
|
|
569
|
-
return false;
|
|
570
|
-
}, "test_match"),
|
|
571
|
-
// return next match in input
|
|
572
|
-
next: /* @__PURE__ */ __name(function() {
|
|
573
|
-
if (this.done) {
|
|
574
|
-
return this.EOF;
|
|
575
|
-
}
|
|
576
|
-
if (!this._input) {
|
|
577
|
-
this.done = true;
|
|
578
|
-
}
|
|
579
|
-
var token, match, tempMatch, index;
|
|
580
|
-
if (!this._more) {
|
|
581
|
-
this.yytext = "";
|
|
582
|
-
this.match = "";
|
|
583
|
-
}
|
|
584
|
-
var rules = this._currentRules();
|
|
585
|
-
for (var i = 0; i < rules.length; i++) {
|
|
586
|
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
587
|
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
588
|
-
match = tempMatch;
|
|
589
|
-
index = i;
|
|
590
|
-
if (this.options.backtrack_lexer) {
|
|
591
|
-
token = this.test_match(tempMatch, rules[i]);
|
|
592
|
-
if (token !== false) {
|
|
593
|
-
return token;
|
|
594
|
-
} else if (this._backtrack) {
|
|
595
|
-
match = false;
|
|
596
|
-
continue;
|
|
597
|
-
} else {
|
|
598
|
-
return false;
|
|
599
|
-
}
|
|
600
|
-
} else if (!this.options.flex) {
|
|
601
|
-
break;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
if (match) {
|
|
606
|
-
token = this.test_match(match, rules[index]);
|
|
607
|
-
if (token !== false) {
|
|
608
|
-
return token;
|
|
609
|
-
}
|
|
610
|
-
return false;
|
|
611
|
-
}
|
|
612
|
-
if (this._input === "") {
|
|
613
|
-
return this.EOF;
|
|
614
|
-
} else {
|
|
615
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
616
|
-
text: "",
|
|
617
|
-
token: null,
|
|
618
|
-
line: this.yylineno
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
}, "next"),
|
|
622
|
-
// return next match that has a token
|
|
623
|
-
lex: /* @__PURE__ */ __name(function lex() {
|
|
624
|
-
var r = this.next();
|
|
625
|
-
if (r) {
|
|
626
|
-
return r;
|
|
627
|
-
} else {
|
|
628
|
-
return this.lex();
|
|
629
|
-
}
|
|
630
|
-
}, "lex"),
|
|
631
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
632
|
-
begin: /* @__PURE__ */ __name(function begin(condition) {
|
|
633
|
-
this.conditionStack.push(condition);
|
|
634
|
-
}, "begin"),
|
|
635
|
-
// pop the previously active lexer condition state off the condition stack
|
|
636
|
-
popState: /* @__PURE__ */ __name(function popState() {
|
|
637
|
-
var n = this.conditionStack.length - 1;
|
|
638
|
-
if (n > 0) {
|
|
639
|
-
return this.conditionStack.pop();
|
|
640
|
-
} else {
|
|
641
|
-
return this.conditionStack[0];
|
|
642
|
-
}
|
|
643
|
-
}, "popState"),
|
|
644
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
645
|
-
_currentRules: /* @__PURE__ */ __name(function _currentRules() {
|
|
646
|
-
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
647
|
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
648
|
-
} else {
|
|
649
|
-
return this.conditions["INITIAL"].rules;
|
|
650
|
-
}
|
|
651
|
-
}, "_currentRules"),
|
|
652
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
653
|
-
topState: /* @__PURE__ */ __name(function topState(n) {
|
|
654
|
-
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
655
|
-
if (n >= 0) {
|
|
656
|
-
return this.conditionStack[n];
|
|
657
|
-
} else {
|
|
658
|
-
return "INITIAL";
|
|
659
|
-
}
|
|
660
|
-
}, "topState"),
|
|
661
|
-
// alias for begin(condition)
|
|
662
|
-
pushState: /* @__PURE__ */ __name(function pushState(condition) {
|
|
663
|
-
this.begin(condition);
|
|
664
|
-
}, "pushState"),
|
|
665
|
-
// return the number of states currently on the stack
|
|
666
|
-
stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
|
|
667
|
-
return this.conditionStack.length;
|
|
668
|
-
}, "stateStackSize"),
|
|
669
|
-
options: {},
|
|
670
|
-
performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
671
|
-
switch ($avoiding_name_collisions) {
|
|
672
|
-
case 0:
|
|
673
|
-
return 6;
|
|
674
|
-
case 1:
|
|
675
|
-
return 7;
|
|
676
|
-
case 2:
|
|
677
|
-
return 8;
|
|
678
|
-
case 3:
|
|
679
|
-
return 9;
|
|
680
|
-
case 4:
|
|
681
|
-
return 22;
|
|
682
|
-
case 5:
|
|
683
|
-
return 23;
|
|
684
|
-
case 6:
|
|
685
|
-
this.begin("acc_title");
|
|
686
|
-
return 24;
|
|
687
|
-
case 7:
|
|
688
|
-
this.popState();
|
|
689
|
-
return "acc_title_value";
|
|
690
|
-
case 8:
|
|
691
|
-
this.begin("acc_descr");
|
|
692
|
-
return 26;
|
|
693
|
-
case 9:
|
|
694
|
-
this.popState();
|
|
695
|
-
return "acc_descr_value";
|
|
696
|
-
case 10:
|
|
697
|
-
this.begin("acc_descr_multiline");
|
|
698
|
-
break;
|
|
699
|
-
case 11:
|
|
700
|
-
this.popState();
|
|
701
|
-
break;
|
|
702
|
-
case 12:
|
|
703
|
-
return "acc_descr_multiline_value";
|
|
704
|
-
case 13:
|
|
705
|
-
break;
|
|
706
|
-
case 14:
|
|
707
|
-
c;
|
|
708
|
-
break;
|
|
709
|
-
case 15:
|
|
710
|
-
return 12;
|
|
711
|
-
case 16:
|
|
712
|
-
break;
|
|
713
|
-
case 17:
|
|
714
|
-
return 11;
|
|
715
|
-
case 18:
|
|
716
|
-
return 15;
|
|
717
|
-
case 19:
|
|
718
|
-
return 16;
|
|
719
|
-
case 20:
|
|
720
|
-
return 17;
|
|
721
|
-
case 21:
|
|
722
|
-
return 18;
|
|
723
|
-
case 22:
|
|
724
|
-
this.begin("person_ext");
|
|
725
|
-
return 45;
|
|
726
|
-
case 23:
|
|
727
|
-
this.begin("person");
|
|
728
|
-
return 44;
|
|
729
|
-
case 24:
|
|
730
|
-
this.begin("system_ext_queue");
|
|
731
|
-
return 51;
|
|
732
|
-
case 25:
|
|
733
|
-
this.begin("system_ext_db");
|
|
734
|
-
return 50;
|
|
735
|
-
case 26:
|
|
736
|
-
this.begin("system_ext");
|
|
737
|
-
return 49;
|
|
738
|
-
case 27:
|
|
739
|
-
this.begin("system_queue");
|
|
740
|
-
return 48;
|
|
741
|
-
case 28:
|
|
742
|
-
this.begin("system_db");
|
|
743
|
-
return 47;
|
|
744
|
-
case 29:
|
|
745
|
-
this.begin("system");
|
|
746
|
-
return 46;
|
|
747
|
-
case 30:
|
|
748
|
-
this.begin("boundary");
|
|
749
|
-
return 37;
|
|
750
|
-
case 31:
|
|
751
|
-
this.begin("enterprise_boundary");
|
|
752
|
-
return 34;
|
|
753
|
-
case 32:
|
|
754
|
-
this.begin("system_boundary");
|
|
755
|
-
return 36;
|
|
756
|
-
case 33:
|
|
757
|
-
this.begin("container_ext_queue");
|
|
758
|
-
return 57;
|
|
759
|
-
case 34:
|
|
760
|
-
this.begin("container_ext_db");
|
|
761
|
-
return 56;
|
|
762
|
-
case 35:
|
|
763
|
-
this.begin("container_ext");
|
|
764
|
-
return 55;
|
|
765
|
-
case 36:
|
|
766
|
-
this.begin("container_queue");
|
|
767
|
-
return 54;
|
|
768
|
-
case 37:
|
|
769
|
-
this.begin("container_db");
|
|
770
|
-
return 53;
|
|
771
|
-
case 38:
|
|
772
|
-
this.begin("container");
|
|
773
|
-
return 52;
|
|
774
|
-
case 39:
|
|
775
|
-
this.begin("container_boundary");
|
|
776
|
-
return 38;
|
|
777
|
-
case 40:
|
|
778
|
-
this.begin("component_ext_queue");
|
|
779
|
-
return 63;
|
|
780
|
-
case 41:
|
|
781
|
-
this.begin("component_ext_db");
|
|
782
|
-
return 62;
|
|
783
|
-
case 42:
|
|
784
|
-
this.begin("component_ext");
|
|
785
|
-
return 61;
|
|
786
|
-
case 43:
|
|
787
|
-
this.begin("component_queue");
|
|
788
|
-
return 60;
|
|
789
|
-
case 44:
|
|
790
|
-
this.begin("component_db");
|
|
791
|
-
return 59;
|
|
792
|
-
case 45:
|
|
793
|
-
this.begin("component");
|
|
794
|
-
return 58;
|
|
795
|
-
case 46:
|
|
796
|
-
this.begin("node");
|
|
797
|
-
return 39;
|
|
798
|
-
case 47:
|
|
799
|
-
this.begin("node");
|
|
800
|
-
return 39;
|
|
801
|
-
case 48:
|
|
802
|
-
this.begin("node_l");
|
|
803
|
-
return 40;
|
|
804
|
-
case 49:
|
|
805
|
-
this.begin("node_r");
|
|
806
|
-
return 41;
|
|
807
|
-
case 50:
|
|
808
|
-
this.begin("rel");
|
|
809
|
-
return 64;
|
|
810
|
-
case 51:
|
|
811
|
-
this.begin("birel");
|
|
812
|
-
return 65;
|
|
813
|
-
case 52:
|
|
814
|
-
this.begin("rel_u");
|
|
815
|
-
return 66;
|
|
816
|
-
case 53:
|
|
817
|
-
this.begin("rel_u");
|
|
818
|
-
return 66;
|
|
819
|
-
case 54:
|
|
820
|
-
this.begin("rel_d");
|
|
821
|
-
return 67;
|
|
822
|
-
case 55:
|
|
823
|
-
this.begin("rel_d");
|
|
824
|
-
return 67;
|
|
825
|
-
case 56:
|
|
826
|
-
this.begin("rel_l");
|
|
827
|
-
return 68;
|
|
828
|
-
case 57:
|
|
829
|
-
this.begin("rel_l");
|
|
830
|
-
return 68;
|
|
831
|
-
case 58:
|
|
832
|
-
this.begin("rel_r");
|
|
833
|
-
return 69;
|
|
834
|
-
case 59:
|
|
835
|
-
this.begin("rel_r");
|
|
836
|
-
return 69;
|
|
837
|
-
case 60:
|
|
838
|
-
this.begin("rel_b");
|
|
839
|
-
return 70;
|
|
840
|
-
case 61:
|
|
841
|
-
this.begin("rel_index");
|
|
842
|
-
return 71;
|
|
843
|
-
case 62:
|
|
844
|
-
this.begin("update_el_style");
|
|
845
|
-
return 72;
|
|
846
|
-
case 63:
|
|
847
|
-
this.begin("update_rel_style");
|
|
848
|
-
return 73;
|
|
849
|
-
case 64:
|
|
850
|
-
this.begin("update_layout_config");
|
|
851
|
-
return 74;
|
|
852
|
-
case 65:
|
|
853
|
-
return "EOF_IN_STRUCT";
|
|
854
|
-
case 66:
|
|
855
|
-
this.begin("attribute");
|
|
856
|
-
return "ATTRIBUTE_EMPTY";
|
|
857
|
-
case 67:
|
|
858
|
-
this.begin("attribute");
|
|
859
|
-
break;
|
|
860
|
-
case 68:
|
|
861
|
-
this.popState();
|
|
862
|
-
this.popState();
|
|
863
|
-
break;
|
|
864
|
-
case 69:
|
|
865
|
-
return 80;
|
|
866
|
-
case 70:
|
|
867
|
-
break;
|
|
868
|
-
case 71:
|
|
869
|
-
return 80;
|
|
870
|
-
case 72:
|
|
871
|
-
this.begin("string");
|
|
872
|
-
break;
|
|
873
|
-
case 73:
|
|
874
|
-
this.popState();
|
|
875
|
-
break;
|
|
876
|
-
case 74:
|
|
877
|
-
return "STR";
|
|
878
|
-
case 75:
|
|
879
|
-
this.begin("string_kv");
|
|
880
|
-
break;
|
|
881
|
-
case 76:
|
|
882
|
-
this.begin("string_kv_key");
|
|
883
|
-
return "STR_KEY";
|
|
884
|
-
case 77:
|
|
885
|
-
this.popState();
|
|
886
|
-
this.begin("string_kv_value");
|
|
887
|
-
break;
|
|
888
|
-
case 78:
|
|
889
|
-
return "STR_VALUE";
|
|
890
|
-
case 79:
|
|
891
|
-
this.popState();
|
|
892
|
-
this.popState();
|
|
893
|
-
break;
|
|
894
|
-
case 80:
|
|
895
|
-
return "STR";
|
|
896
|
-
case 81:
|
|
897
|
-
return "LBRACE";
|
|
898
|
-
case 82:
|
|
899
|
-
return "RBRACE";
|
|
900
|
-
case 83:
|
|
901
|
-
return "SPACE";
|
|
902
|
-
case 84:
|
|
903
|
-
return "EOL";
|
|
904
|
-
case 85:
|
|
905
|
-
return 14;
|
|
906
|
-
}
|
|
907
|
-
}, "anonymous"),
|
|
908
|
-
rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
|
|
909
|
-
conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 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, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } }
|
|
910
|
-
};
|
|
911
|
-
return lexer2;
|
|
912
|
-
}();
|
|
913
|
-
parser2.lexer = lexer;
|
|
914
|
-
function Parser() {
|
|
915
|
-
this.yy = {};
|
|
916
|
-
}
|
|
917
|
-
__name(Parser, "Parser");
|
|
918
|
-
Parser.prototype = parser2;
|
|
919
|
-
parser2.Parser = Parser;
|
|
920
|
-
return new Parser();
|
|
921
|
-
}();
|
|
922
|
-
parser.parser = parser;
|
|
923
|
-
var c4Diagram_default = parser;
|
|
924
|
-
var c4ShapeArray = [];
|
|
925
|
-
var boundaryParseStack = [""];
|
|
926
|
-
var currentBoundaryParse = "global";
|
|
927
|
-
var parentBoundaryParse = "";
|
|
928
|
-
var boundaries = [
|
|
929
|
-
{
|
|
930
|
-
alias: "global",
|
|
931
|
-
label: { text: "global" },
|
|
932
|
-
type: { text: "global" },
|
|
933
|
-
tags: null,
|
|
934
|
-
link: null,
|
|
935
|
-
parentBoundary: ""
|
|
936
|
-
}
|
|
937
|
-
];
|
|
938
|
-
var rels = [];
|
|
939
|
-
var title = "";
|
|
940
|
-
var wrapEnabled = false;
|
|
941
|
-
var c4ShapeInRow = 4;
|
|
942
|
-
var c4BoundaryInRow = 2;
|
|
943
|
-
var c4Type;
|
|
944
|
-
var getC4Type = /* @__PURE__ */ __name(function() {
|
|
945
|
-
return c4Type;
|
|
946
|
-
}, "getC4Type");
|
|
947
|
-
var setC4Type = /* @__PURE__ */ __name(function(c4TypeParam) {
|
|
948
|
-
let sanitizedText = sanitizeText(c4TypeParam, getConfig2());
|
|
949
|
-
c4Type = sanitizedText;
|
|
950
|
-
}, "setC4Type");
|
|
951
|
-
var addRel = /* @__PURE__ */ __name(function(type, from, to, label, techn, descr, sprite, tags, link) {
|
|
952
|
-
if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {
|
|
953
|
-
return;
|
|
954
|
-
}
|
|
955
|
-
let rel = {};
|
|
956
|
-
const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
|
|
957
|
-
if (old) {
|
|
958
|
-
rel = old;
|
|
959
|
-
} else {
|
|
960
|
-
rels.push(rel);
|
|
961
|
-
}
|
|
962
|
-
rel.type = type;
|
|
963
|
-
rel.from = from;
|
|
964
|
-
rel.to = to;
|
|
965
|
-
rel.label = { text: label };
|
|
966
|
-
if (techn === void 0 || techn === null) {
|
|
967
|
-
rel.techn = { text: "" };
|
|
968
|
-
} else {
|
|
969
|
-
if (typeof techn === "object") {
|
|
970
|
-
let [key, value] = Object.entries(techn)[0];
|
|
971
|
-
rel[key] = { text: value };
|
|
972
|
-
} else {
|
|
973
|
-
rel.techn = { text: techn };
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
if (descr === void 0 || descr === null) {
|
|
977
|
-
rel.descr = { text: "" };
|
|
978
|
-
} else {
|
|
979
|
-
if (typeof descr === "object") {
|
|
980
|
-
let [key, value] = Object.entries(descr)[0];
|
|
981
|
-
rel[key] = { text: value };
|
|
982
|
-
} else {
|
|
983
|
-
rel.descr = { text: descr };
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
if (typeof sprite === "object") {
|
|
987
|
-
let [key, value] = Object.entries(sprite)[0];
|
|
988
|
-
rel[key] = value;
|
|
989
|
-
} else {
|
|
990
|
-
rel.sprite = sprite;
|
|
991
|
-
}
|
|
992
|
-
if (typeof tags === "object") {
|
|
993
|
-
let [key, value] = Object.entries(tags)[0];
|
|
994
|
-
rel[key] = value;
|
|
995
|
-
} else {
|
|
996
|
-
rel.tags = tags;
|
|
997
|
-
}
|
|
998
|
-
if (typeof link === "object") {
|
|
999
|
-
let [key, value] = Object.entries(link)[0];
|
|
1000
|
-
rel[key] = value;
|
|
1001
|
-
} else {
|
|
1002
|
-
rel.link = link;
|
|
1003
|
-
}
|
|
1004
|
-
rel.wrap = autoWrap();
|
|
1005
|
-
}, "addRel");
|
|
1006
|
-
var addPersonOrSystem = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, descr, sprite, tags, link) {
|
|
1007
|
-
if (alias === null || label === null) {
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
let personOrSystem = {};
|
|
1011
|
-
const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
|
|
1012
|
-
if (old && alias === old.alias) {
|
|
1013
|
-
personOrSystem = old;
|
|
1014
|
-
} else {
|
|
1015
|
-
personOrSystem.alias = alias;
|
|
1016
|
-
c4ShapeArray.push(personOrSystem);
|
|
1017
|
-
}
|
|
1018
|
-
if (label === void 0 || label === null) {
|
|
1019
|
-
personOrSystem.label = { text: "" };
|
|
1020
|
-
} else {
|
|
1021
|
-
personOrSystem.label = { text: label };
|
|
1022
|
-
}
|
|
1023
|
-
if (descr === void 0 || descr === null) {
|
|
1024
|
-
personOrSystem.descr = { text: "" };
|
|
1025
|
-
} else {
|
|
1026
|
-
if (typeof descr === "object") {
|
|
1027
|
-
let [key, value] = Object.entries(descr)[0];
|
|
1028
|
-
personOrSystem[key] = { text: value };
|
|
1029
|
-
} else {
|
|
1030
|
-
personOrSystem.descr = { text: descr };
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
if (typeof sprite === "object") {
|
|
1034
|
-
let [key, value] = Object.entries(sprite)[0];
|
|
1035
|
-
personOrSystem[key] = value;
|
|
1036
|
-
} else {
|
|
1037
|
-
personOrSystem.sprite = sprite;
|
|
1038
|
-
}
|
|
1039
|
-
if (typeof tags === "object") {
|
|
1040
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1041
|
-
personOrSystem[key] = value;
|
|
1042
|
-
} else {
|
|
1043
|
-
personOrSystem.tags = tags;
|
|
1044
|
-
}
|
|
1045
|
-
if (typeof link === "object") {
|
|
1046
|
-
let [key, value] = Object.entries(link)[0];
|
|
1047
|
-
personOrSystem[key] = value;
|
|
1048
|
-
} else {
|
|
1049
|
-
personOrSystem.link = link;
|
|
1050
|
-
}
|
|
1051
|
-
personOrSystem.typeC4Shape = { text: typeC4Shape };
|
|
1052
|
-
personOrSystem.parentBoundary = currentBoundaryParse;
|
|
1053
|
-
personOrSystem.wrap = autoWrap();
|
|
1054
|
-
}, "addPersonOrSystem");
|
|
1055
|
-
var addContainer = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
|
|
1056
|
-
if (alias === null || label === null) {
|
|
1057
|
-
return;
|
|
1058
|
-
}
|
|
1059
|
-
let container = {};
|
|
1060
|
-
const old = c4ShapeArray.find((container2) => container2.alias === alias);
|
|
1061
|
-
if (old && alias === old.alias) {
|
|
1062
|
-
container = old;
|
|
1063
|
-
} else {
|
|
1064
|
-
container.alias = alias;
|
|
1065
|
-
c4ShapeArray.push(container);
|
|
1066
|
-
}
|
|
1067
|
-
if (label === void 0 || label === null) {
|
|
1068
|
-
container.label = { text: "" };
|
|
1069
|
-
} else {
|
|
1070
|
-
container.label = { text: label };
|
|
1071
|
-
}
|
|
1072
|
-
if (techn === void 0 || techn === null) {
|
|
1073
|
-
container.techn = { text: "" };
|
|
1074
|
-
} else {
|
|
1075
|
-
if (typeof techn === "object") {
|
|
1076
|
-
let [key, value] = Object.entries(techn)[0];
|
|
1077
|
-
container[key] = { text: value };
|
|
1078
|
-
} else {
|
|
1079
|
-
container.techn = { text: techn };
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
if (descr === void 0 || descr === null) {
|
|
1083
|
-
container.descr = { text: "" };
|
|
1084
|
-
} else {
|
|
1085
|
-
if (typeof descr === "object") {
|
|
1086
|
-
let [key, value] = Object.entries(descr)[0];
|
|
1087
|
-
container[key] = { text: value };
|
|
1088
|
-
} else {
|
|
1089
|
-
container.descr = { text: descr };
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
if (typeof sprite === "object") {
|
|
1093
|
-
let [key, value] = Object.entries(sprite)[0];
|
|
1094
|
-
container[key] = value;
|
|
1095
|
-
} else {
|
|
1096
|
-
container.sprite = sprite;
|
|
1097
|
-
}
|
|
1098
|
-
if (typeof tags === "object") {
|
|
1099
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1100
|
-
container[key] = value;
|
|
1101
|
-
} else {
|
|
1102
|
-
container.tags = tags;
|
|
1103
|
-
}
|
|
1104
|
-
if (typeof link === "object") {
|
|
1105
|
-
let [key, value] = Object.entries(link)[0];
|
|
1106
|
-
container[key] = value;
|
|
1107
|
-
} else {
|
|
1108
|
-
container.link = link;
|
|
1109
|
-
}
|
|
1110
|
-
container.wrap = autoWrap();
|
|
1111
|
-
container.typeC4Shape = { text: typeC4Shape };
|
|
1112
|
-
container.parentBoundary = currentBoundaryParse;
|
|
1113
|
-
}, "addContainer");
|
|
1114
|
-
var addComponent = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
|
|
1115
|
-
if (alias === null || label === null) {
|
|
1116
|
-
return;
|
|
1117
|
-
}
|
|
1118
|
-
let component = {};
|
|
1119
|
-
const old = c4ShapeArray.find((component2) => component2.alias === alias);
|
|
1120
|
-
if (old && alias === old.alias) {
|
|
1121
|
-
component = old;
|
|
1122
|
-
} else {
|
|
1123
|
-
component.alias = alias;
|
|
1124
|
-
c4ShapeArray.push(component);
|
|
1125
|
-
}
|
|
1126
|
-
if (label === void 0 || label === null) {
|
|
1127
|
-
component.label = { text: "" };
|
|
1128
|
-
} else {
|
|
1129
|
-
component.label = { text: label };
|
|
1130
|
-
}
|
|
1131
|
-
if (techn === void 0 || techn === null) {
|
|
1132
|
-
component.techn = { text: "" };
|
|
1133
|
-
} else {
|
|
1134
|
-
if (typeof techn === "object") {
|
|
1135
|
-
let [key, value] = Object.entries(techn)[0];
|
|
1136
|
-
component[key] = { text: value };
|
|
1137
|
-
} else {
|
|
1138
|
-
component.techn = { text: techn };
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
if (descr === void 0 || descr === null) {
|
|
1142
|
-
component.descr = { text: "" };
|
|
1143
|
-
} else {
|
|
1144
|
-
if (typeof descr === "object") {
|
|
1145
|
-
let [key, value] = Object.entries(descr)[0];
|
|
1146
|
-
component[key] = { text: value };
|
|
1147
|
-
} else {
|
|
1148
|
-
component.descr = { text: descr };
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
if (typeof sprite === "object") {
|
|
1152
|
-
let [key, value] = Object.entries(sprite)[0];
|
|
1153
|
-
component[key] = value;
|
|
1154
|
-
} else {
|
|
1155
|
-
component.sprite = sprite;
|
|
1156
|
-
}
|
|
1157
|
-
if (typeof tags === "object") {
|
|
1158
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1159
|
-
component[key] = value;
|
|
1160
|
-
} else {
|
|
1161
|
-
component.tags = tags;
|
|
1162
|
-
}
|
|
1163
|
-
if (typeof link === "object") {
|
|
1164
|
-
let [key, value] = Object.entries(link)[0];
|
|
1165
|
-
component[key] = value;
|
|
1166
|
-
} else {
|
|
1167
|
-
component.link = link;
|
|
1168
|
-
}
|
|
1169
|
-
component.wrap = autoWrap();
|
|
1170
|
-
component.typeC4Shape = { text: typeC4Shape };
|
|
1171
|
-
component.parentBoundary = currentBoundaryParse;
|
|
1172
|
-
}, "addComponent");
|
|
1173
|
-
var addPersonOrSystemBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {
|
|
1174
|
-
if (alias === null || label === null) {
|
|
1175
|
-
return;
|
|
1176
|
-
}
|
|
1177
|
-
let boundary = {};
|
|
1178
|
-
const old = boundaries.find((boundary2) => boundary2.alias === alias);
|
|
1179
|
-
if (old && alias === old.alias) {
|
|
1180
|
-
boundary = old;
|
|
1181
|
-
} else {
|
|
1182
|
-
boundary.alias = alias;
|
|
1183
|
-
boundaries.push(boundary);
|
|
1184
|
-
}
|
|
1185
|
-
if (label === void 0 || label === null) {
|
|
1186
|
-
boundary.label = { text: "" };
|
|
1187
|
-
} else {
|
|
1188
|
-
boundary.label = { text: label };
|
|
1189
|
-
}
|
|
1190
|
-
if (type === void 0 || type === null) {
|
|
1191
|
-
boundary.type = { text: "system" };
|
|
1192
|
-
} else {
|
|
1193
|
-
if (typeof type === "object") {
|
|
1194
|
-
let [key, value] = Object.entries(type)[0];
|
|
1195
|
-
boundary[key] = { text: value };
|
|
1196
|
-
} else {
|
|
1197
|
-
boundary.type = { text: type };
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
if (typeof tags === "object") {
|
|
1201
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1202
|
-
boundary[key] = value;
|
|
1203
|
-
} else {
|
|
1204
|
-
boundary.tags = tags;
|
|
1205
|
-
}
|
|
1206
|
-
if (typeof link === "object") {
|
|
1207
|
-
let [key, value] = Object.entries(link)[0];
|
|
1208
|
-
boundary[key] = value;
|
|
1209
|
-
} else {
|
|
1210
|
-
boundary.link = link;
|
|
1211
|
-
}
|
|
1212
|
-
boundary.parentBoundary = currentBoundaryParse;
|
|
1213
|
-
boundary.wrap = autoWrap();
|
|
1214
|
-
parentBoundaryParse = currentBoundaryParse;
|
|
1215
|
-
currentBoundaryParse = alias;
|
|
1216
|
-
boundaryParseStack.push(parentBoundaryParse);
|
|
1217
|
-
}, "addPersonOrSystemBoundary");
|
|
1218
|
-
var addContainerBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {
|
|
1219
|
-
if (alias === null || label === null) {
|
|
1220
|
-
return;
|
|
1221
|
-
}
|
|
1222
|
-
let boundary = {};
|
|
1223
|
-
const old = boundaries.find((boundary2) => boundary2.alias === alias);
|
|
1224
|
-
if (old && alias === old.alias) {
|
|
1225
|
-
boundary = old;
|
|
1226
|
-
} else {
|
|
1227
|
-
boundary.alias = alias;
|
|
1228
|
-
boundaries.push(boundary);
|
|
1229
|
-
}
|
|
1230
|
-
if (label === void 0 || label === null) {
|
|
1231
|
-
boundary.label = { text: "" };
|
|
1232
|
-
} else {
|
|
1233
|
-
boundary.label = { text: label };
|
|
1234
|
-
}
|
|
1235
|
-
if (type === void 0 || type === null) {
|
|
1236
|
-
boundary.type = { text: "container" };
|
|
1237
|
-
} else {
|
|
1238
|
-
if (typeof type === "object") {
|
|
1239
|
-
let [key, value] = Object.entries(type)[0];
|
|
1240
|
-
boundary[key] = { text: value };
|
|
1241
|
-
} else {
|
|
1242
|
-
boundary.type = { text: type };
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
if (typeof tags === "object") {
|
|
1246
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1247
|
-
boundary[key] = value;
|
|
1248
|
-
} else {
|
|
1249
|
-
boundary.tags = tags;
|
|
1250
|
-
}
|
|
1251
|
-
if (typeof link === "object") {
|
|
1252
|
-
let [key, value] = Object.entries(link)[0];
|
|
1253
|
-
boundary[key] = value;
|
|
1254
|
-
} else {
|
|
1255
|
-
boundary.link = link;
|
|
1256
|
-
}
|
|
1257
|
-
boundary.parentBoundary = currentBoundaryParse;
|
|
1258
|
-
boundary.wrap = autoWrap();
|
|
1259
|
-
parentBoundaryParse = currentBoundaryParse;
|
|
1260
|
-
currentBoundaryParse = alias;
|
|
1261
|
-
boundaryParseStack.push(parentBoundaryParse);
|
|
1262
|
-
}, "addContainerBoundary");
|
|
1263
|
-
var addDeploymentNode = /* @__PURE__ */ __name(function(nodeType, alias, label, type, descr, sprite, tags, link) {
|
|
1264
|
-
if (alias === null || label === null) {
|
|
1265
|
-
return;
|
|
1266
|
-
}
|
|
1267
|
-
let boundary = {};
|
|
1268
|
-
const old = boundaries.find((boundary2) => boundary2.alias === alias);
|
|
1269
|
-
if (old && alias === old.alias) {
|
|
1270
|
-
boundary = old;
|
|
1271
|
-
} else {
|
|
1272
|
-
boundary.alias = alias;
|
|
1273
|
-
boundaries.push(boundary);
|
|
1274
|
-
}
|
|
1275
|
-
if (label === void 0 || label === null) {
|
|
1276
|
-
boundary.label = { text: "" };
|
|
1277
|
-
} else {
|
|
1278
|
-
boundary.label = { text: label };
|
|
1279
|
-
}
|
|
1280
|
-
if (type === void 0 || type === null) {
|
|
1281
|
-
boundary.type = { text: "node" };
|
|
1282
|
-
} else {
|
|
1283
|
-
if (typeof type === "object") {
|
|
1284
|
-
let [key, value] = Object.entries(type)[0];
|
|
1285
|
-
boundary[key] = { text: value };
|
|
1286
|
-
} else {
|
|
1287
|
-
boundary.type = { text: type };
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
if (descr === void 0 || descr === null) {
|
|
1291
|
-
boundary.descr = { text: "" };
|
|
1292
|
-
} else {
|
|
1293
|
-
if (typeof descr === "object") {
|
|
1294
|
-
let [key, value] = Object.entries(descr)[0];
|
|
1295
|
-
boundary[key] = { text: value };
|
|
1296
|
-
} else {
|
|
1297
|
-
boundary.descr = { text: descr };
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
if (typeof tags === "object") {
|
|
1301
|
-
let [key, value] = Object.entries(tags)[0];
|
|
1302
|
-
boundary[key] = value;
|
|
1303
|
-
} else {
|
|
1304
|
-
boundary.tags = tags;
|
|
1305
|
-
}
|
|
1306
|
-
if (typeof link === "object") {
|
|
1307
|
-
let [key, value] = Object.entries(link)[0];
|
|
1308
|
-
boundary[key] = value;
|
|
1309
|
-
} else {
|
|
1310
|
-
boundary.link = link;
|
|
1311
|
-
}
|
|
1312
|
-
boundary.nodeType = nodeType;
|
|
1313
|
-
boundary.parentBoundary = currentBoundaryParse;
|
|
1314
|
-
boundary.wrap = autoWrap();
|
|
1315
|
-
parentBoundaryParse = currentBoundaryParse;
|
|
1316
|
-
currentBoundaryParse = alias;
|
|
1317
|
-
boundaryParseStack.push(parentBoundaryParse);
|
|
1318
|
-
}, "addDeploymentNode");
|
|
1319
|
-
var popBoundaryParseStack = /* @__PURE__ */ __name(function() {
|
|
1320
|
-
currentBoundaryParse = parentBoundaryParse;
|
|
1321
|
-
boundaryParseStack.pop();
|
|
1322
|
-
parentBoundaryParse = boundaryParseStack.pop();
|
|
1323
|
-
boundaryParseStack.push(parentBoundaryParse);
|
|
1324
|
-
}, "popBoundaryParseStack");
|
|
1325
|
-
var updateElStyle = /* @__PURE__ */ __name(function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
|
|
1326
|
-
let old = c4ShapeArray.find((element) => element.alias === elementName);
|
|
1327
|
-
if (old === void 0) {
|
|
1328
|
-
old = boundaries.find((element) => element.alias === elementName);
|
|
1329
|
-
if (old === void 0) {
|
|
1330
|
-
return;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
if (bgColor !== void 0 && bgColor !== null) {
|
|
1334
|
-
if (typeof bgColor === "object") {
|
|
1335
|
-
let [key, value] = Object.entries(bgColor)[0];
|
|
1336
|
-
old[key] = value;
|
|
1337
|
-
} else {
|
|
1338
|
-
old.bgColor = bgColor;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
if (fontColor !== void 0 && fontColor !== null) {
|
|
1342
|
-
if (typeof fontColor === "object") {
|
|
1343
|
-
let [key, value] = Object.entries(fontColor)[0];
|
|
1344
|
-
old[key] = value;
|
|
1345
|
-
} else {
|
|
1346
|
-
old.fontColor = fontColor;
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
if (borderColor !== void 0 && borderColor !== null) {
|
|
1350
|
-
if (typeof borderColor === "object") {
|
|
1351
|
-
let [key, value] = Object.entries(borderColor)[0];
|
|
1352
|
-
old[key] = value;
|
|
1353
|
-
} else {
|
|
1354
|
-
old.borderColor = borderColor;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
if (shadowing !== void 0 && shadowing !== null) {
|
|
1358
|
-
if (typeof shadowing === "object") {
|
|
1359
|
-
let [key, value] = Object.entries(shadowing)[0];
|
|
1360
|
-
old[key] = value;
|
|
1361
|
-
} else {
|
|
1362
|
-
old.shadowing = shadowing;
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
if (shape !== void 0 && shape !== null) {
|
|
1366
|
-
if (typeof shape === "object") {
|
|
1367
|
-
let [key, value] = Object.entries(shape)[0];
|
|
1368
|
-
old[key] = value;
|
|
1369
|
-
} else {
|
|
1370
|
-
old.shape = shape;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
if (sprite !== void 0 && sprite !== null) {
|
|
1374
|
-
if (typeof sprite === "object") {
|
|
1375
|
-
let [key, value] = Object.entries(sprite)[0];
|
|
1376
|
-
old[key] = value;
|
|
1377
|
-
} else {
|
|
1378
|
-
old.sprite = sprite;
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
if (techn !== void 0 && techn !== null) {
|
|
1382
|
-
if (typeof techn === "object") {
|
|
1383
|
-
let [key, value] = Object.entries(techn)[0];
|
|
1384
|
-
old[key] = value;
|
|
1385
|
-
} else {
|
|
1386
|
-
old.techn = techn;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
if (legendText !== void 0 && legendText !== null) {
|
|
1390
|
-
if (typeof legendText === "object") {
|
|
1391
|
-
let [key, value] = Object.entries(legendText)[0];
|
|
1392
|
-
old[key] = value;
|
|
1393
|
-
} else {
|
|
1394
|
-
old.legendText = legendText;
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
if (legendSprite !== void 0 && legendSprite !== null) {
|
|
1398
|
-
if (typeof legendSprite === "object") {
|
|
1399
|
-
let [key, value] = Object.entries(legendSprite)[0];
|
|
1400
|
-
old[key] = value;
|
|
1401
|
-
} else {
|
|
1402
|
-
old.legendSprite = legendSprite;
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}, "updateElStyle");
|
|
1406
|
-
var updateRelStyle = /* @__PURE__ */ __name(function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
|
|
1407
|
-
const old = rels.find((rel) => rel.from === from && rel.to === to);
|
|
1408
|
-
if (old === void 0) {
|
|
1409
|
-
return;
|
|
1410
|
-
}
|
|
1411
|
-
if (textColor !== void 0 && textColor !== null) {
|
|
1412
|
-
if (typeof textColor === "object") {
|
|
1413
|
-
let [key, value] = Object.entries(textColor)[0];
|
|
1414
|
-
old[key] = value;
|
|
1415
|
-
} else {
|
|
1416
|
-
old.textColor = textColor;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
if (lineColor !== void 0 && lineColor !== null) {
|
|
1420
|
-
if (typeof lineColor === "object") {
|
|
1421
|
-
let [key, value] = Object.entries(lineColor)[0];
|
|
1422
|
-
old[key] = value;
|
|
1423
|
-
} else {
|
|
1424
|
-
old.lineColor = lineColor;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
if (offsetX !== void 0 && offsetX !== null) {
|
|
1428
|
-
if (typeof offsetX === "object") {
|
|
1429
|
-
let [key, value] = Object.entries(offsetX)[0];
|
|
1430
|
-
old[key] = parseInt(value);
|
|
1431
|
-
} else {
|
|
1432
|
-
old.offsetX = parseInt(offsetX);
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
if (offsetY !== void 0 && offsetY !== null) {
|
|
1436
|
-
if (typeof offsetY === "object") {
|
|
1437
|
-
let [key, value] = Object.entries(offsetY)[0];
|
|
1438
|
-
old[key] = parseInt(value);
|
|
1439
|
-
} else {
|
|
1440
|
-
old.offsetY = parseInt(offsetY);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
}, "updateRelStyle");
|
|
1444
|
-
var updateLayoutConfig = /* @__PURE__ */ __name(function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
|
|
1445
|
-
let c4ShapeInRowValue = c4ShapeInRow;
|
|
1446
|
-
let c4BoundaryInRowValue = c4BoundaryInRow;
|
|
1447
|
-
if (typeof c4ShapeInRowParam === "object") {
|
|
1448
|
-
const value = Object.values(c4ShapeInRowParam)[0];
|
|
1449
|
-
c4ShapeInRowValue = parseInt(value);
|
|
1450
|
-
} else {
|
|
1451
|
-
c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
|
|
1452
|
-
}
|
|
1453
|
-
if (typeof c4BoundaryInRowParam === "object") {
|
|
1454
|
-
const value = Object.values(c4BoundaryInRowParam)[0];
|
|
1455
|
-
c4BoundaryInRowValue = parseInt(value);
|
|
1456
|
-
} else {
|
|
1457
|
-
c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
|
|
1458
|
-
}
|
|
1459
|
-
if (c4ShapeInRowValue >= 1) {
|
|
1460
|
-
c4ShapeInRow = c4ShapeInRowValue;
|
|
1461
|
-
}
|
|
1462
|
-
if (c4BoundaryInRowValue >= 1) {
|
|
1463
|
-
c4BoundaryInRow = c4BoundaryInRowValue;
|
|
1464
|
-
}
|
|
1465
|
-
}, "updateLayoutConfig");
|
|
1466
|
-
var getC4ShapeInRow = /* @__PURE__ */ __name(function() {
|
|
1467
|
-
return c4ShapeInRow;
|
|
1468
|
-
}, "getC4ShapeInRow");
|
|
1469
|
-
var getC4BoundaryInRow = /* @__PURE__ */ __name(function() {
|
|
1470
|
-
return c4BoundaryInRow;
|
|
1471
|
-
}, "getC4BoundaryInRow");
|
|
1472
|
-
var getCurrentBoundaryParse = /* @__PURE__ */ __name(function() {
|
|
1473
|
-
return currentBoundaryParse;
|
|
1474
|
-
}, "getCurrentBoundaryParse");
|
|
1475
|
-
var getParentBoundaryParse = /* @__PURE__ */ __name(function() {
|
|
1476
|
-
return parentBoundaryParse;
|
|
1477
|
-
}, "getParentBoundaryParse");
|
|
1478
|
-
var getC4ShapeArray = /* @__PURE__ */ __name(function(parentBoundary) {
|
|
1479
|
-
if (parentBoundary === void 0 || parentBoundary === null) {
|
|
1480
|
-
return c4ShapeArray;
|
|
1481
|
-
} else {
|
|
1482
|
-
return c4ShapeArray.filter((personOrSystem) => {
|
|
1483
|
-
return personOrSystem.parentBoundary === parentBoundary;
|
|
1484
|
-
});
|
|
1485
|
-
}
|
|
1486
|
-
}, "getC4ShapeArray");
|
|
1487
|
-
var getC4Shape = /* @__PURE__ */ __name(function(alias) {
|
|
1488
|
-
return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
|
|
1489
|
-
}, "getC4Shape");
|
|
1490
|
-
var getC4ShapeKeys = /* @__PURE__ */ __name(function(parentBoundary) {
|
|
1491
|
-
return Object.keys(getC4ShapeArray(parentBoundary));
|
|
1492
|
-
}, "getC4ShapeKeys");
|
|
1493
|
-
var getBoundaries = /* @__PURE__ */ __name(function(parentBoundary) {
|
|
1494
|
-
if (parentBoundary === void 0 || parentBoundary === null) {
|
|
1495
|
-
return boundaries;
|
|
1496
|
-
} else {
|
|
1497
|
-
return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);
|
|
1498
|
-
}
|
|
1499
|
-
}, "getBoundaries");
|
|
1500
|
-
var getBoundarys = getBoundaries;
|
|
1501
|
-
var getRels = /* @__PURE__ */ __name(function() {
|
|
1502
|
-
return rels;
|
|
1503
|
-
}, "getRels");
|
|
1504
|
-
var getTitle = /* @__PURE__ */ __name(function() {
|
|
1505
|
-
return title;
|
|
1506
|
-
}, "getTitle");
|
|
1507
|
-
var setWrap = /* @__PURE__ */ __name(function(wrapSetting) {
|
|
1508
|
-
wrapEnabled = wrapSetting;
|
|
1509
|
-
}, "setWrap");
|
|
1510
|
-
var autoWrap = /* @__PURE__ */ __name(function() {
|
|
1511
|
-
return wrapEnabled;
|
|
1512
|
-
}, "autoWrap");
|
|
1513
|
-
var clear = /* @__PURE__ */ __name(function() {
|
|
1514
|
-
c4ShapeArray = [];
|
|
1515
|
-
boundaries = [
|
|
1516
|
-
{
|
|
1517
|
-
alias: "global",
|
|
1518
|
-
label: { text: "global" },
|
|
1519
|
-
type: { text: "global" },
|
|
1520
|
-
tags: null,
|
|
1521
|
-
link: null,
|
|
1522
|
-
parentBoundary: ""
|
|
1523
|
-
}
|
|
1524
|
-
];
|
|
1525
|
-
parentBoundaryParse = "";
|
|
1526
|
-
currentBoundaryParse = "global";
|
|
1527
|
-
boundaryParseStack = [""];
|
|
1528
|
-
rels = [];
|
|
1529
|
-
boundaryParseStack = [""];
|
|
1530
|
-
title = "";
|
|
1531
|
-
wrapEnabled = false;
|
|
1532
|
-
c4ShapeInRow = 4;
|
|
1533
|
-
c4BoundaryInRow = 2;
|
|
1534
|
-
}, "clear");
|
|
1535
|
-
var LINETYPE = {
|
|
1536
|
-
SOLID: 0,
|
|
1537
|
-
DOTTED: 1,
|
|
1538
|
-
NOTE: 2,
|
|
1539
|
-
SOLID_CROSS: 3,
|
|
1540
|
-
DOTTED_CROSS: 4,
|
|
1541
|
-
SOLID_OPEN: 5,
|
|
1542
|
-
DOTTED_OPEN: 6,
|
|
1543
|
-
LOOP_START: 10,
|
|
1544
|
-
LOOP_END: 11,
|
|
1545
|
-
ALT_START: 12,
|
|
1546
|
-
ALT_ELSE: 13,
|
|
1547
|
-
ALT_END: 14,
|
|
1548
|
-
OPT_START: 15,
|
|
1549
|
-
OPT_END: 16,
|
|
1550
|
-
ACTIVE_START: 17,
|
|
1551
|
-
ACTIVE_END: 18,
|
|
1552
|
-
PAR_START: 19,
|
|
1553
|
-
PAR_AND: 20,
|
|
1554
|
-
PAR_END: 21,
|
|
1555
|
-
RECT_START: 22,
|
|
1556
|
-
RECT_END: 23,
|
|
1557
|
-
SOLID_POINT: 24,
|
|
1558
|
-
DOTTED_POINT: 25
|
|
1559
|
-
};
|
|
1560
|
-
var ARROWTYPE = {
|
|
1561
|
-
FILLED: 0,
|
|
1562
|
-
OPEN: 1
|
|
1563
|
-
};
|
|
1564
|
-
var PLACEMENT = {
|
|
1565
|
-
LEFTOF: 0,
|
|
1566
|
-
RIGHTOF: 1,
|
|
1567
|
-
OVER: 2
|
|
1568
|
-
};
|
|
1569
|
-
var setTitle = /* @__PURE__ */ __name(function(txt) {
|
|
1570
|
-
let sanitizedText = sanitizeText(txt, getConfig2());
|
|
1571
|
-
title = sanitizedText;
|
|
1572
|
-
}, "setTitle");
|
|
1573
|
-
var c4Db_default = {
|
|
1574
|
-
addPersonOrSystem,
|
|
1575
|
-
addPersonOrSystemBoundary,
|
|
1576
|
-
addContainer,
|
|
1577
|
-
addContainerBoundary,
|
|
1578
|
-
addComponent,
|
|
1579
|
-
addDeploymentNode,
|
|
1580
|
-
popBoundaryParseStack,
|
|
1581
|
-
addRel,
|
|
1582
|
-
updateElStyle,
|
|
1583
|
-
updateRelStyle,
|
|
1584
|
-
updateLayoutConfig,
|
|
1585
|
-
autoWrap,
|
|
1586
|
-
setWrap,
|
|
1587
|
-
getC4ShapeArray,
|
|
1588
|
-
getC4Shape,
|
|
1589
|
-
getC4ShapeKeys,
|
|
1590
|
-
getBoundaries,
|
|
1591
|
-
getBoundarys,
|
|
1592
|
-
getCurrentBoundaryParse,
|
|
1593
|
-
getParentBoundaryParse,
|
|
1594
|
-
getRels,
|
|
1595
|
-
getTitle,
|
|
1596
|
-
getC4Type,
|
|
1597
|
-
getC4ShapeInRow,
|
|
1598
|
-
getC4BoundaryInRow,
|
|
1599
|
-
setAccTitle,
|
|
1600
|
-
getAccTitle,
|
|
1601
|
-
getAccDescription,
|
|
1602
|
-
setAccDescription,
|
|
1603
|
-
getConfig: /* @__PURE__ */ __name(() => getConfig2().c4, "getConfig"),
|
|
1604
|
-
clear,
|
|
1605
|
-
LINETYPE,
|
|
1606
|
-
ARROWTYPE,
|
|
1607
|
-
PLACEMENT,
|
|
1608
|
-
setTitle,
|
|
1609
|
-
setC4Type
|
|
1610
|
-
// apply,
|
|
1611
|
-
};
|
|
1612
|
-
var drawRect2 = /* @__PURE__ */ __name(function(elem, rectData) {
|
|
1613
|
-
return drawRect(elem, rectData);
|
|
1614
|
-
}, "drawRect");
|
|
1615
|
-
var drawImage = /* @__PURE__ */ __name(function(elem, width, height, x, y, link) {
|
|
1616
|
-
const imageElem = elem.append("image");
|
|
1617
|
-
imageElem.attr("width", width);
|
|
1618
|
-
imageElem.attr("height", height);
|
|
1619
|
-
imageElem.attr("x", x);
|
|
1620
|
-
imageElem.attr("y", y);
|
|
1621
|
-
let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0, import_sanitize_url.sanitizeUrl)(link);
|
|
1622
|
-
imageElem.attr("xlink:href", sanitizedLink);
|
|
1623
|
-
}, "drawImage");
|
|
1624
|
-
var drawRels = /* @__PURE__ */ __name((elem, rels2, conf2) => {
|
|
1625
|
-
const relsElem = elem.append("g");
|
|
1626
|
-
let i = 0;
|
|
1627
|
-
for (let rel of rels2) {
|
|
1628
|
-
let textColor = rel.textColor ? rel.textColor : "#444444";
|
|
1629
|
-
let strokeColor = rel.lineColor ? rel.lineColor : "#444444";
|
|
1630
|
-
let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;
|
|
1631
|
-
let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;
|
|
1632
|
-
let url = "";
|
|
1633
|
-
if (i === 0) {
|
|
1634
|
-
let line = relsElem.append("line");
|
|
1635
|
-
line.attr("x1", rel.startPoint.x);
|
|
1636
|
-
line.attr("y1", rel.startPoint.y);
|
|
1637
|
-
line.attr("x2", rel.endPoint.x);
|
|
1638
|
-
line.attr("y2", rel.endPoint.y);
|
|
1639
|
-
line.attr("stroke-width", "1");
|
|
1640
|
-
line.attr("stroke", strokeColor);
|
|
1641
|
-
line.style("fill", "none");
|
|
1642
|
-
if (rel.type !== "rel_b") {
|
|
1643
|
-
line.attr("marker-end", "url(" + url + "#arrowhead)");
|
|
1644
|
-
}
|
|
1645
|
-
if (rel.type === "birel" || rel.type === "rel_b") {
|
|
1646
|
-
line.attr("marker-start", "url(" + url + "#arrowend)");
|
|
1647
|
-
}
|
|
1648
|
-
i = -1;
|
|
1649
|
-
} else {
|
|
1650
|
-
let line = relsElem.append("path");
|
|
1651
|
-
line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr(
|
|
1652
|
-
"d",
|
|
1653
|
-
"Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll(
|
|
1654
|
-
"controlx",
|
|
1655
|
-
rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4
|
|
1656
|
-
).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)
|
|
1657
|
-
);
|
|
1658
|
-
if (rel.type !== "rel_b") {
|
|
1659
|
-
line.attr("marker-end", "url(" + url + "#arrowhead)");
|
|
1660
|
-
}
|
|
1661
|
-
if (rel.type === "birel" || rel.type === "rel_b") {
|
|
1662
|
-
line.attr("marker-start", "url(" + url + "#arrowend)");
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
let messageConf = conf2.messageFont();
|
|
1666
|
-
_drawTextCandidateFunc(conf2)(
|
|
1667
|
-
rel.label.text,
|
|
1668
|
-
relsElem,
|
|
1669
|
-
Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
|
|
1670
|
-
Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,
|
|
1671
|
-
rel.label.width,
|
|
1672
|
-
rel.label.height,
|
|
1673
|
-
{ fill: textColor },
|
|
1674
|
-
messageConf
|
|
1675
|
-
);
|
|
1676
|
-
if (rel.techn && rel.techn.text !== "") {
|
|
1677
|
-
messageConf = conf2.messageFont();
|
|
1678
|
-
_drawTextCandidateFunc(conf2)(
|
|
1679
|
-
"[" + rel.techn.text + "]",
|
|
1680
|
-
relsElem,
|
|
1681
|
-
Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
|
|
1682
|
-
Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,
|
|
1683
|
-
Math.max(rel.label.width, rel.techn.width),
|
|
1684
|
-
rel.techn.height,
|
|
1685
|
-
{ fill: textColor, "font-style": "italic" },
|
|
1686
|
-
messageConf
|
|
1687
|
-
);
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
}, "drawRels");
|
|
1691
|
-
var drawBoundary = /* @__PURE__ */ __name(function(elem, boundary, conf2) {
|
|
1692
|
-
const boundaryElem = elem.append("g");
|
|
1693
|
-
let fillColor = boundary.bgColor ? boundary.bgColor : "none";
|
|
1694
|
-
let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
|
|
1695
|
-
let fontColor = boundary.fontColor ? boundary.fontColor : "black";
|
|
1696
|
-
let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
|
|
1697
|
-
if (boundary.nodeType) {
|
|
1698
|
-
attrsValue = { "stroke-width": 1 };
|
|
1699
|
-
}
|
|
1700
|
-
let rectData = {
|
|
1701
|
-
x: boundary.x,
|
|
1702
|
-
y: boundary.y,
|
|
1703
|
-
fill: fillColor,
|
|
1704
|
-
stroke: strokeColor,
|
|
1705
|
-
width: boundary.width,
|
|
1706
|
-
height: boundary.height,
|
|
1707
|
-
rx: 2.5,
|
|
1708
|
-
ry: 2.5,
|
|
1709
|
-
attrs: attrsValue
|
|
1710
|
-
};
|
|
1711
|
-
drawRect2(boundaryElem, rectData);
|
|
1712
|
-
let boundaryConf = conf2.boundaryFont();
|
|
1713
|
-
boundaryConf.fontWeight = "bold";
|
|
1714
|
-
boundaryConf.fontSize = boundaryConf.fontSize + 2;
|
|
1715
|
-
boundaryConf.fontColor = fontColor;
|
|
1716
|
-
_drawTextCandidateFunc(conf2)(
|
|
1717
|
-
boundary.label.text,
|
|
1718
|
-
boundaryElem,
|
|
1719
|
-
boundary.x,
|
|
1720
|
-
boundary.y + boundary.label.Y,
|
|
1721
|
-
boundary.width,
|
|
1722
|
-
boundary.height,
|
|
1723
|
-
{ fill: "#444444" },
|
|
1724
|
-
boundaryConf
|
|
1725
|
-
);
|
|
1726
|
-
if (boundary.type && boundary.type.text !== "") {
|
|
1727
|
-
boundaryConf = conf2.boundaryFont();
|
|
1728
|
-
boundaryConf.fontColor = fontColor;
|
|
1729
|
-
_drawTextCandidateFunc(conf2)(
|
|
1730
|
-
boundary.type.text,
|
|
1731
|
-
boundaryElem,
|
|
1732
|
-
boundary.x,
|
|
1733
|
-
boundary.y + boundary.type.Y,
|
|
1734
|
-
boundary.width,
|
|
1735
|
-
boundary.height,
|
|
1736
|
-
{ fill: "#444444" },
|
|
1737
|
-
boundaryConf
|
|
1738
|
-
);
|
|
1739
|
-
}
|
|
1740
|
-
if (boundary.descr && boundary.descr.text !== "") {
|
|
1741
|
-
boundaryConf = conf2.boundaryFont();
|
|
1742
|
-
boundaryConf.fontSize = boundaryConf.fontSize - 2;
|
|
1743
|
-
boundaryConf.fontColor = fontColor;
|
|
1744
|
-
_drawTextCandidateFunc(conf2)(
|
|
1745
|
-
boundary.descr.text,
|
|
1746
|
-
boundaryElem,
|
|
1747
|
-
boundary.x,
|
|
1748
|
-
boundary.y + boundary.descr.Y,
|
|
1749
|
-
boundary.width,
|
|
1750
|
-
boundary.height,
|
|
1751
|
-
{ fill: "#444444" },
|
|
1752
|
-
boundaryConf
|
|
1753
|
-
);
|
|
1754
|
-
}
|
|
1755
|
-
}, "drawBoundary");
|
|
1756
|
-
var drawC4Shape = /* @__PURE__ */ __name(function(elem, c4Shape, conf2) {
|
|
1757
|
-
let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"];
|
|
1758
|
-
let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"];
|
|
1759
|
-
let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF";
|
|
1760
|
-
let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
|
|
1761
|
-
switch (c4Shape.typeC4Shape.text) {
|
|
1762
|
-
case "person":
|
|
1763
|
-
personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
|
|
1764
|
-
break;
|
|
1765
|
-
case "external_person":
|
|
1766
|
-
personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
|
|
1767
|
-
break;
|
|
1768
|
-
}
|
|
1769
|
-
const c4ShapeElem = elem.append("g");
|
|
1770
|
-
c4ShapeElem.attr("class", "person-man");
|
|
1771
|
-
const rect = getNoteRect();
|
|
1772
|
-
switch (c4Shape.typeC4Shape.text) {
|
|
1773
|
-
case "person":
|
|
1774
|
-
case "external_person":
|
|
1775
|
-
case "system":
|
|
1776
|
-
case "external_system":
|
|
1777
|
-
case "container":
|
|
1778
|
-
case "external_container":
|
|
1779
|
-
case "component":
|
|
1780
|
-
case "external_component":
|
|
1781
|
-
rect.x = c4Shape.x;
|
|
1782
|
-
rect.y = c4Shape.y;
|
|
1783
|
-
rect.fill = fillColor;
|
|
1784
|
-
rect.width = c4Shape.width;
|
|
1785
|
-
rect.height = c4Shape.height;
|
|
1786
|
-
rect.stroke = strokeColor;
|
|
1787
|
-
rect.rx = 2.5;
|
|
1788
|
-
rect.ry = 2.5;
|
|
1789
|
-
rect.attrs = { "stroke-width": 0.5 };
|
|
1790
|
-
drawRect2(c4ShapeElem, rect);
|
|
1791
|
-
break;
|
|
1792
|
-
case "system_db":
|
|
1793
|
-
case "external_system_db":
|
|
1794
|
-
case "container_db":
|
|
1795
|
-
case "external_container_db":
|
|
1796
|
-
case "component_db":
|
|
1797
|
-
case "external_component_db":
|
|
1798
|
-
c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
|
|
1799
|
-
"d",
|
|
1800
|
-
"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height)
|
|
1801
|
-
);
|
|
1802
|
-
c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
|
|
1803
|
-
"d",
|
|
1804
|
-
"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2)
|
|
1805
|
-
);
|
|
1806
|
-
break;
|
|
1807
|
-
case "system_queue":
|
|
1808
|
-
case "external_system_queue":
|
|
1809
|
-
case "container_queue":
|
|
1810
|
-
case "external_container_queue":
|
|
1811
|
-
case "component_queue":
|
|
1812
|
-
case "external_component_queue":
|
|
1813
|
-
c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
|
|
1814
|
-
"d",
|
|
1815
|
-
"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2)
|
|
1816
|
-
);
|
|
1817
|
-
c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
|
|
1818
|
-
"d",
|
|
1819
|
-
"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2)
|
|
1820
|
-
);
|
|
1821
|
-
break;
|
|
1822
|
-
}
|
|
1823
|
-
let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);
|
|
1824
|
-
c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>");
|
|
1825
|
-
switch (c4Shape.typeC4Shape.text) {
|
|
1826
|
-
case "person":
|
|
1827
|
-
case "external_person":
|
|
1828
|
-
drawImage(
|
|
1829
|
-
c4ShapeElem,
|
|
1830
|
-
48,
|
|
1831
|
-
48,
|
|
1832
|
-
c4Shape.x + c4Shape.width / 2 - 24,
|
|
1833
|
-
c4Shape.y + c4Shape.image.Y,
|
|
1834
|
-
personImg
|
|
1835
|
-
);
|
|
1836
|
-
break;
|
|
1837
|
-
}
|
|
1838
|
-
let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
|
|
1839
|
-
textFontConf.fontWeight = "bold";
|
|
1840
|
-
textFontConf.fontSize = textFontConf.fontSize + 2;
|
|
1841
|
-
textFontConf.fontColor = fontColor;
|
|
1842
|
-
_drawTextCandidateFunc(conf2)(
|
|
1843
|
-
c4Shape.label.text,
|
|
1844
|
-
c4ShapeElem,
|
|
1845
|
-
c4Shape.x,
|
|
1846
|
-
c4Shape.y + c4Shape.label.Y,
|
|
1847
|
-
c4Shape.width,
|
|
1848
|
-
c4Shape.height,
|
|
1849
|
-
{ fill: fontColor },
|
|
1850
|
-
textFontConf
|
|
1851
|
-
);
|
|
1852
|
-
textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
|
|
1853
|
-
textFontConf.fontColor = fontColor;
|
|
1854
|
-
if (c4Shape.techn && c4Shape.techn?.text !== "") {
|
|
1855
|
-
_drawTextCandidateFunc(conf2)(
|
|
1856
|
-
c4Shape.techn.text,
|
|
1857
|
-
c4ShapeElem,
|
|
1858
|
-
c4Shape.x,
|
|
1859
|
-
c4Shape.y + c4Shape.techn.Y,
|
|
1860
|
-
c4Shape.width,
|
|
1861
|
-
c4Shape.height,
|
|
1862
|
-
{ fill: fontColor, "font-style": "italic" },
|
|
1863
|
-
textFontConf
|
|
1864
|
-
);
|
|
1865
|
-
} else if (c4Shape.type && c4Shape.type.text !== "") {
|
|
1866
|
-
_drawTextCandidateFunc(conf2)(
|
|
1867
|
-
c4Shape.type.text,
|
|
1868
|
-
c4ShapeElem,
|
|
1869
|
-
c4Shape.x,
|
|
1870
|
-
c4Shape.y + c4Shape.type.Y,
|
|
1871
|
-
c4Shape.width,
|
|
1872
|
-
c4Shape.height,
|
|
1873
|
-
{ fill: fontColor, "font-style": "italic" },
|
|
1874
|
-
textFontConf
|
|
1875
|
-
);
|
|
1876
|
-
}
|
|
1877
|
-
if (c4Shape.descr && c4Shape.descr.text !== "") {
|
|
1878
|
-
textFontConf = conf2.personFont();
|
|
1879
|
-
textFontConf.fontColor = fontColor;
|
|
1880
|
-
_drawTextCandidateFunc(conf2)(
|
|
1881
|
-
c4Shape.descr.text,
|
|
1882
|
-
c4ShapeElem,
|
|
1883
|
-
c4Shape.x,
|
|
1884
|
-
c4Shape.y + c4Shape.descr.Y,
|
|
1885
|
-
c4Shape.width,
|
|
1886
|
-
c4Shape.height,
|
|
1887
|
-
{ fill: fontColor },
|
|
1888
|
-
textFontConf
|
|
1889
|
-
);
|
|
1890
|
-
}
|
|
1891
|
-
return c4Shape.height;
|
|
1892
|
-
}, "drawC4Shape");
|
|
1893
|
-
var insertDatabaseIcon = /* @__PURE__ */ __name(function(elem) {
|
|
1894
|
-
elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
|
1895
|
-
"d",
|
|
1896
|
-
"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
|
|
1897
|
-
);
|
|
1898
|
-
}, "insertDatabaseIcon");
|
|
1899
|
-
var insertComputerIcon = /* @__PURE__ */ __name(function(elem) {
|
|
1900
|
-
elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1901
|
-
"d",
|
|
1902
|
-
"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
|
|
1903
|
-
);
|
|
1904
|
-
}, "insertComputerIcon");
|
|
1905
|
-
var insertClockIcon = /* @__PURE__ */ __name(function(elem) {
|
|
1906
|
-
elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
|
1907
|
-
"d",
|
|
1908
|
-
"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
|
|
1909
|
-
);
|
|
1910
|
-
}, "insertClockIcon");
|
|
1911
|
-
var insertArrowHead = /* @__PURE__ */ __name(function(elem) {
|
|
1912
|
-
elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
|
|
1913
|
-
}, "insertArrowHead");
|
|
1914
|
-
var insertArrowEnd = /* @__PURE__ */ __name(function(elem) {
|
|
1915
|
-
elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
|
|
1916
|
-
}, "insertArrowEnd");
|
|
1917
|
-
var insertArrowFilledHead = /* @__PURE__ */ __name(function(elem) {
|
|
1918
|
-
elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1919
|
-
}, "insertArrowFilledHead");
|
|
1920
|
-
var insertDynamicNumber = /* @__PURE__ */ __name(function(elem) {
|
|
1921
|
-
elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
|
|
1922
|
-
}, "insertDynamicNumber");
|
|
1923
|
-
var insertArrowCrossHead = /* @__PURE__ */ __name(function(elem) {
|
|
1924
|
-
const defs = elem.append("defs");
|
|
1925
|
-
const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
|
|
1926
|
-
marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z");
|
|
1927
|
-
marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
|
|
1928
|
-
}, "insertArrowCrossHead");
|
|
1929
|
-
var getC4ShapeFont = /* @__PURE__ */ __name((cnf, typeC4Shape) => {
|
|
1930
|
-
return {
|
|
1931
|
-
fontFamily: cnf[typeC4Shape + "FontFamily"],
|
|
1932
|
-
fontSize: cnf[typeC4Shape + "FontSize"],
|
|
1933
|
-
fontWeight: cnf[typeC4Shape + "FontWeight"]
|
|
1934
|
-
};
|
|
1935
|
-
}, "getC4ShapeFont");
|
|
1936
|
-
var _drawTextCandidateFunc = /* @__PURE__ */ function() {
|
|
1937
|
-
function byText(content, g, x, y, width, height, textAttrs) {
|
|
1938
|
-
const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
|
|
1939
|
-
_setTextAttrs(text, textAttrs);
|
|
1940
|
-
}
|
|
1941
|
-
__name(byText, "byText");
|
|
1942
|
-
function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
|
|
1943
|
-
const { fontSize, fontFamily, fontWeight } = conf2;
|
|
1944
|
-
const lines = content.split(common_default.lineBreakRegex);
|
|
1945
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1946
|
-
const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
|
|
1947
|
-
const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily);
|
|
1948
|
-
text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
|
|
1949
|
-
_setTextAttrs(text, textAttrs);
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
__name(byTspan, "byTspan");
|
|
1953
|
-
function byFo(content, g, x, y, width, height, textAttrs, conf2) {
|
|
1954
|
-
const s = g.append("switch");
|
|
1955
|
-
const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
|
|
1956
|
-
const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
1957
|
-
text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
|
|
1958
|
-
byTspan(content, s, x, y, width, height, textAttrs, conf2);
|
|
1959
|
-
_setTextAttrs(text, textAttrs);
|
|
1960
|
-
}
|
|
1961
|
-
__name(byFo, "byFo");
|
|
1962
|
-
function _setTextAttrs(toText, fromTextAttrsDict) {
|
|
1963
|
-
for (const key in fromTextAttrsDict) {
|
|
1964
|
-
if (fromTextAttrsDict.hasOwnProperty(key)) {
|
|
1965
|
-
toText.attr(key, fromTextAttrsDict[key]);
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
__name(_setTextAttrs, "_setTextAttrs");
|
|
1970
|
-
return function(conf2) {
|
|
1971
|
-
return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
|
|
1972
|
-
};
|
|
1973
|
-
}();
|
|
1974
|
-
var svgDraw_default = {
|
|
1975
|
-
drawRect: drawRect2,
|
|
1976
|
-
drawBoundary,
|
|
1977
|
-
drawC4Shape,
|
|
1978
|
-
drawRels,
|
|
1979
|
-
drawImage,
|
|
1980
|
-
insertArrowHead,
|
|
1981
|
-
insertArrowEnd,
|
|
1982
|
-
insertArrowFilledHead,
|
|
1983
|
-
insertDynamicNumber,
|
|
1984
|
-
insertArrowCrossHead,
|
|
1985
|
-
insertDatabaseIcon,
|
|
1986
|
-
insertComputerIcon,
|
|
1987
|
-
insertClockIcon
|
|
1988
|
-
};
|
|
1989
|
-
var globalBoundaryMaxX = 0;
|
|
1990
|
-
var globalBoundaryMaxY = 0;
|
|
1991
|
-
var c4ShapeInRow2 = 4;
|
|
1992
|
-
var c4BoundaryInRow2 = 2;
|
|
1993
|
-
parser.yy = c4Db_default;
|
|
1994
|
-
var conf = {};
|
|
1995
|
-
var Bounds = class {
|
|
1996
|
-
static {
|
|
1997
|
-
__name(this, "Bounds");
|
|
1998
|
-
}
|
|
1999
|
-
constructor(diagObj) {
|
|
2000
|
-
this.name = "";
|
|
2001
|
-
this.data = {};
|
|
2002
|
-
this.data.startx = void 0;
|
|
2003
|
-
this.data.stopx = void 0;
|
|
2004
|
-
this.data.starty = void 0;
|
|
2005
|
-
this.data.stopy = void 0;
|
|
2006
|
-
this.data.widthLimit = void 0;
|
|
2007
|
-
this.nextData = {};
|
|
2008
|
-
this.nextData.startx = void 0;
|
|
2009
|
-
this.nextData.stopx = void 0;
|
|
2010
|
-
this.nextData.starty = void 0;
|
|
2011
|
-
this.nextData.stopy = void 0;
|
|
2012
|
-
this.nextData.cnt = 0;
|
|
2013
|
-
setConf(diagObj.db.getConfig());
|
|
2014
|
-
}
|
|
2015
|
-
setData(startx, stopx, starty, stopy) {
|
|
2016
|
-
this.nextData.startx = this.data.startx = startx;
|
|
2017
|
-
this.nextData.stopx = this.data.stopx = stopx;
|
|
2018
|
-
this.nextData.starty = this.data.starty = starty;
|
|
2019
|
-
this.nextData.stopy = this.data.stopy = stopy;
|
|
2020
|
-
}
|
|
2021
|
-
updateVal(obj, key, val, fun) {
|
|
2022
|
-
if (obj[key] === void 0) {
|
|
2023
|
-
obj[key] = val;
|
|
2024
|
-
} else {
|
|
2025
|
-
obj[key] = fun(val, obj[key]);
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
insert(c4Shape) {
|
|
2029
|
-
this.nextData.cnt = this.nextData.cnt + 1;
|
|
2030
|
-
let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;
|
|
2031
|
-
let _stopx = _startx + c4Shape.width;
|
|
2032
|
-
let _starty = this.nextData.starty + c4Shape.margin * 2;
|
|
2033
|
-
let _stopy = _starty + c4Shape.height;
|
|
2034
|
-
if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow2) {
|
|
2035
|
-
_startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
|
|
2036
|
-
_starty = this.nextData.stopy + c4Shape.margin * 2;
|
|
2037
|
-
this.nextData.stopx = _stopx = _startx + c4Shape.width;
|
|
2038
|
-
this.nextData.starty = this.nextData.stopy;
|
|
2039
|
-
this.nextData.stopy = _stopy = _starty + c4Shape.height;
|
|
2040
|
-
this.nextData.cnt = 1;
|
|
2041
|
-
}
|
|
2042
|
-
c4Shape.x = _startx;
|
|
2043
|
-
c4Shape.y = _starty;
|
|
2044
|
-
this.updateVal(this.data, "startx", _startx, Math.min);
|
|
2045
|
-
this.updateVal(this.data, "starty", _starty, Math.min);
|
|
2046
|
-
this.updateVal(this.data, "stopx", _stopx, Math.max);
|
|
2047
|
-
this.updateVal(this.data, "stopy", _stopy, Math.max);
|
|
2048
|
-
this.updateVal(this.nextData, "startx", _startx, Math.min);
|
|
2049
|
-
this.updateVal(this.nextData, "starty", _starty, Math.min);
|
|
2050
|
-
this.updateVal(this.nextData, "stopx", _stopx, Math.max);
|
|
2051
|
-
this.updateVal(this.nextData, "stopy", _stopy, Math.max);
|
|
2052
|
-
}
|
|
2053
|
-
init(diagObj) {
|
|
2054
|
-
this.name = "";
|
|
2055
|
-
this.data = {
|
|
2056
|
-
startx: void 0,
|
|
2057
|
-
stopx: void 0,
|
|
2058
|
-
starty: void 0,
|
|
2059
|
-
stopy: void 0,
|
|
2060
|
-
widthLimit: void 0
|
|
2061
|
-
};
|
|
2062
|
-
this.nextData = {
|
|
2063
|
-
startx: void 0,
|
|
2064
|
-
stopx: void 0,
|
|
2065
|
-
starty: void 0,
|
|
2066
|
-
stopy: void 0,
|
|
2067
|
-
cnt: 0
|
|
2068
|
-
};
|
|
2069
|
-
setConf(diagObj.db.getConfig());
|
|
2070
|
-
}
|
|
2071
|
-
bumpLastMargin(margin) {
|
|
2072
|
-
this.data.stopx += margin;
|
|
2073
|
-
this.data.stopy += margin;
|
|
2074
|
-
}
|
|
2075
|
-
};
|
|
2076
|
-
var setConf = /* @__PURE__ */ __name(function(cnf) {
|
|
2077
|
-
assignWithDepth_default(conf, cnf);
|
|
2078
|
-
if (cnf.fontFamily) {
|
|
2079
|
-
conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
|
|
2080
|
-
}
|
|
2081
|
-
if (cnf.fontSize) {
|
|
2082
|
-
conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
|
|
2083
|
-
}
|
|
2084
|
-
if (cnf.fontWeight) {
|
|
2085
|
-
conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
|
|
2086
|
-
}
|
|
2087
|
-
}, "setConf");
|
|
2088
|
-
var c4ShapeFont = /* @__PURE__ */ __name((cnf, typeC4Shape) => {
|
|
2089
|
-
return {
|
|
2090
|
-
fontFamily: cnf[typeC4Shape + "FontFamily"],
|
|
2091
|
-
fontSize: cnf[typeC4Shape + "FontSize"],
|
|
2092
|
-
fontWeight: cnf[typeC4Shape + "FontWeight"]
|
|
2093
|
-
};
|
|
2094
|
-
}, "c4ShapeFont");
|
|
2095
|
-
var boundaryFont = /* @__PURE__ */ __name((cnf) => {
|
|
2096
|
-
return {
|
|
2097
|
-
fontFamily: cnf.boundaryFontFamily,
|
|
2098
|
-
fontSize: cnf.boundaryFontSize,
|
|
2099
|
-
fontWeight: cnf.boundaryFontWeight
|
|
2100
|
-
};
|
|
2101
|
-
}, "boundaryFont");
|
|
2102
|
-
var messageFont = /* @__PURE__ */ __name((cnf) => {
|
|
2103
|
-
return {
|
|
2104
|
-
fontFamily: cnf.messageFontFamily,
|
|
2105
|
-
fontSize: cnf.messageFontSize,
|
|
2106
|
-
fontWeight: cnf.messageFontWeight
|
|
2107
|
-
};
|
|
2108
|
-
}, "messageFont");
|
|
2109
|
-
function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
|
|
2110
|
-
if (!c4Shape[textType].width) {
|
|
2111
|
-
if (c4ShapeTextWrap) {
|
|
2112
|
-
c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);
|
|
2113
|
-
c4Shape[textType].textLines = c4Shape[textType].text.split(common_default.lineBreakRegex).length;
|
|
2114
|
-
c4Shape[textType].width = textLimitWidth;
|
|
2115
|
-
c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);
|
|
2116
|
-
} else {
|
|
2117
|
-
let lines = c4Shape[textType].text.split(common_default.lineBreakRegex);
|
|
2118
|
-
c4Shape[textType].textLines = lines.length;
|
|
2119
|
-
let lineHeight = 0;
|
|
2120
|
-
c4Shape[textType].height = 0;
|
|
2121
|
-
c4Shape[textType].width = 0;
|
|
2122
|
-
for (const line of lines) {
|
|
2123
|
-
c4Shape[textType].width = Math.max(
|
|
2124
|
-
calculateTextWidth(line, textConf),
|
|
2125
|
-
c4Shape[textType].width
|
|
2126
|
-
);
|
|
2127
|
-
lineHeight = calculateTextHeight(line, textConf);
|
|
2128
|
-
c4Shape[textType].height = c4Shape[textType].height + lineHeight;
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
__name(calcC4ShapeTextWH, "calcC4ShapeTextWH");
|
|
2134
|
-
var drawBoundary2 = /* @__PURE__ */ __name(function(diagram2, boundary, bounds) {
|
|
2135
|
-
boundary.x = bounds.data.startx;
|
|
2136
|
-
boundary.y = bounds.data.starty;
|
|
2137
|
-
boundary.width = bounds.data.stopx - bounds.data.startx;
|
|
2138
|
-
boundary.height = bounds.data.stopy - bounds.data.starty;
|
|
2139
|
-
boundary.label.y = conf.c4ShapeMargin - 35;
|
|
2140
|
-
let boundaryTextWrap = boundary.wrap && conf.wrap;
|
|
2141
|
-
let boundaryLabelConf = boundaryFont(conf);
|
|
2142
|
-
boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
|
|
2143
|
-
boundaryLabelConf.fontWeight = "bold";
|
|
2144
|
-
let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);
|
|
2145
|
-
calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);
|
|
2146
|
-
svgDraw_default.drawBoundary(diagram2, boundary, conf);
|
|
2147
|
-
}, "drawBoundary");
|
|
2148
|
-
var drawC4ShapeArray = /* @__PURE__ */ __name(function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
|
|
2149
|
-
let Y = 0;
|
|
2150
|
-
for (const c4ShapeKey of c4ShapeKeys) {
|
|
2151
|
-
Y = 0;
|
|
2152
|
-
const c4Shape = c4ShapeArray2[c4ShapeKey];
|
|
2153
|
-
let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
|
|
2154
|
-
c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;
|
|
2155
|
-
c4Shape.typeC4Shape.width = calculateTextWidth(
|
|
2156
|
-
"\xAB" + c4Shape.typeC4Shape.text + "\xBB",
|
|
2157
|
-
c4ShapeTypeConf
|
|
2158
|
-
);
|
|
2159
|
-
c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;
|
|
2160
|
-
c4Shape.typeC4Shape.Y = conf.c4ShapePadding;
|
|
2161
|
-
Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;
|
|
2162
|
-
c4Shape.image = { width: 0, height: 0, Y: 0 };
|
|
2163
|
-
switch (c4Shape.typeC4Shape.text) {
|
|
2164
|
-
case "person":
|
|
2165
|
-
case "external_person":
|
|
2166
|
-
c4Shape.image.width = 48;
|
|
2167
|
-
c4Shape.image.height = 48;
|
|
2168
|
-
c4Shape.image.Y = Y;
|
|
2169
|
-
Y = c4Shape.image.Y + c4Shape.image.height;
|
|
2170
|
-
break;
|
|
2171
|
-
}
|
|
2172
|
-
if (c4Shape.sprite) {
|
|
2173
|
-
c4Shape.image.width = 48;
|
|
2174
|
-
c4Shape.image.height = 48;
|
|
2175
|
-
c4Shape.image.Y = Y;
|
|
2176
|
-
Y = c4Shape.image.Y + c4Shape.image.height;
|
|
2177
|
-
}
|
|
2178
|
-
let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;
|
|
2179
|
-
let textLimitWidth = conf.width - conf.c4ShapePadding * 2;
|
|
2180
|
-
let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
|
|
2181
|
-
c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;
|
|
2182
|
-
c4ShapeLabelConf.fontWeight = "bold";
|
|
2183
|
-
calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);
|
|
2184
|
-
c4Shape.label.Y = Y + 8;
|
|
2185
|
-
Y = c4Shape.label.Y + c4Shape.label.height;
|
|
2186
|
-
if (c4Shape.type && c4Shape.type.text !== "") {
|
|
2187
|
-
c4Shape.type.text = "[" + c4Shape.type.text + "]";
|
|
2188
|
-
let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
|
|
2189
|
-
calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);
|
|
2190
|
-
c4Shape.type.Y = Y + 5;
|
|
2191
|
-
Y = c4Shape.type.Y + c4Shape.type.height;
|
|
2192
|
-
} else if (c4Shape.techn && c4Shape.techn.text !== "") {
|
|
2193
|
-
c4Shape.techn.text = "[" + c4Shape.techn.text + "]";
|
|
2194
|
-
let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);
|
|
2195
|
-
calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);
|
|
2196
|
-
c4Shape.techn.Y = Y + 5;
|
|
2197
|
-
Y = c4Shape.techn.Y + c4Shape.techn.height;
|
|
2198
|
-
}
|
|
2199
|
-
let rectHeight = Y;
|
|
2200
|
-
let rectWidth = c4Shape.label.width;
|
|
2201
|
-
if (c4Shape.descr && c4Shape.descr.text !== "") {
|
|
2202
|
-
let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
|
|
2203
|
-
calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);
|
|
2204
|
-
c4Shape.descr.Y = Y + 20;
|
|
2205
|
-
Y = c4Shape.descr.Y + c4Shape.descr.height;
|
|
2206
|
-
rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);
|
|
2207
|
-
rectHeight = Y - c4Shape.descr.textLines * 5;
|
|
2208
|
-
}
|
|
2209
|
-
rectWidth = rectWidth + conf.c4ShapePadding;
|
|
2210
|
-
c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);
|
|
2211
|
-
c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);
|
|
2212
|
-
c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;
|
|
2213
|
-
currentBounds.insert(c4Shape);
|
|
2214
|
-
svgDraw_default.drawC4Shape(diagram2, c4Shape, conf);
|
|
2215
|
-
}
|
|
2216
|
-
currentBounds.bumpLastMargin(conf.c4ShapeMargin);
|
|
2217
|
-
}, "drawC4ShapeArray");
|
|
2218
|
-
var Point = class {
|
|
2219
|
-
static {
|
|
2220
|
-
__name(this, "Point");
|
|
2221
|
-
}
|
|
2222
|
-
constructor(x, y) {
|
|
2223
|
-
this.x = x;
|
|
2224
|
-
this.y = y;
|
|
2225
|
-
}
|
|
2226
|
-
};
|
|
2227
|
-
var getIntersectPoint = /* @__PURE__ */ __name(function(fromNode, endPoint) {
|
|
2228
|
-
let x1 = fromNode.x;
|
|
2229
|
-
let y1 = fromNode.y;
|
|
2230
|
-
let x2 = endPoint.x;
|
|
2231
|
-
let y2 = endPoint.y;
|
|
2232
|
-
let fromCenterX = x1 + fromNode.width / 2;
|
|
2233
|
-
let fromCenterY = y1 + fromNode.height / 2;
|
|
2234
|
-
let dx = Math.abs(x1 - x2);
|
|
2235
|
-
let dy = Math.abs(y1 - y2);
|
|
2236
|
-
let tanDYX = dy / dx;
|
|
2237
|
-
let fromDYX = fromNode.height / fromNode.width;
|
|
2238
|
-
let returnPoint = null;
|
|
2239
|
-
if (y1 == y2 && x1 < x2) {
|
|
2240
|
-
returnPoint = new Point(x1 + fromNode.width, fromCenterY);
|
|
2241
|
-
} else if (y1 == y2 && x1 > x2) {
|
|
2242
|
-
returnPoint = new Point(x1, fromCenterY);
|
|
2243
|
-
} else if (x1 == x2 && y1 < y2) {
|
|
2244
|
-
returnPoint = new Point(fromCenterX, y1 + fromNode.height);
|
|
2245
|
-
} else if (x1 == x2 && y1 > y2) {
|
|
2246
|
-
returnPoint = new Point(fromCenterX, y1);
|
|
2247
|
-
}
|
|
2248
|
-
if (x1 > x2 && y1 < y2) {
|
|
2249
|
-
if (fromDYX >= tanDYX) {
|
|
2250
|
-
returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);
|
|
2251
|
-
} else {
|
|
2252
|
-
returnPoint = new Point(
|
|
2253
|
-
fromCenterX - dx / dy * fromNode.height / 2,
|
|
2254
|
-
y1 + fromNode.height
|
|
2255
|
-
);
|
|
2256
|
-
}
|
|
2257
|
-
} else if (x1 < x2 && y1 < y2) {
|
|
2258
|
-
if (fromDYX >= tanDYX) {
|
|
2259
|
-
returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);
|
|
2260
|
-
} else {
|
|
2261
|
-
returnPoint = new Point(
|
|
2262
|
-
fromCenterX + dx / dy * fromNode.height / 2,
|
|
2263
|
-
y1 + fromNode.height
|
|
2264
|
-
);
|
|
2265
|
-
}
|
|
2266
|
-
} else if (x1 < x2 && y1 > y2) {
|
|
2267
|
-
if (fromDYX >= tanDYX) {
|
|
2268
|
-
returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);
|
|
2269
|
-
} else {
|
|
2270
|
-
returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);
|
|
2271
|
-
}
|
|
2272
|
-
} else if (x1 > x2 && y1 > y2) {
|
|
2273
|
-
if (fromDYX >= tanDYX) {
|
|
2274
|
-
returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);
|
|
2275
|
-
} else {
|
|
2276
|
-
returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
return returnPoint;
|
|
2280
|
-
}, "getIntersectPoint");
|
|
2281
|
-
var getIntersectPoints = /* @__PURE__ */ __name(function(fromNode, endNode) {
|
|
2282
|
-
let endIntersectPoint = { x: 0, y: 0 };
|
|
2283
|
-
endIntersectPoint.x = endNode.x + endNode.width / 2;
|
|
2284
|
-
endIntersectPoint.y = endNode.y + endNode.height / 2;
|
|
2285
|
-
let startPoint = getIntersectPoint(fromNode, endIntersectPoint);
|
|
2286
|
-
endIntersectPoint.x = fromNode.x + fromNode.width / 2;
|
|
2287
|
-
endIntersectPoint.y = fromNode.y + fromNode.height / 2;
|
|
2288
|
-
let endPoint = getIntersectPoint(endNode, endIntersectPoint);
|
|
2289
|
-
return { startPoint, endPoint };
|
|
2290
|
-
}, "getIntersectPoints");
|
|
2291
|
-
var drawRels2 = /* @__PURE__ */ __name(function(diagram2, rels2, getC4ShapeObj, diagObj) {
|
|
2292
|
-
let i = 0;
|
|
2293
|
-
for (let rel of rels2) {
|
|
2294
|
-
i = i + 1;
|
|
2295
|
-
let relTextWrap = rel.wrap && conf.wrap;
|
|
2296
|
-
let relConf = messageFont(conf);
|
|
2297
|
-
let diagramType = diagObj.db.getC4Type();
|
|
2298
|
-
if (diagramType === "C4Dynamic") {
|
|
2299
|
-
rel.label.text = i + ": " + rel.label.text;
|
|
2300
|
-
}
|
|
2301
|
-
let textLimitWidth = calculateTextWidth(rel.label.text, relConf);
|
|
2302
|
-
calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
|
|
2303
|
-
if (rel.techn && rel.techn.text !== "") {
|
|
2304
|
-
textLimitWidth = calculateTextWidth(rel.techn.text, relConf);
|
|
2305
|
-
calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
|
|
2306
|
-
}
|
|
2307
|
-
if (rel.descr && rel.descr.text !== "") {
|
|
2308
|
-
textLimitWidth = calculateTextWidth(rel.descr.text, relConf);
|
|
2309
|
-
calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
|
|
2310
|
-
}
|
|
2311
|
-
let fromNode = getC4ShapeObj(rel.from);
|
|
2312
|
-
let endNode = getC4ShapeObj(rel.to);
|
|
2313
|
-
let points = getIntersectPoints(fromNode, endNode);
|
|
2314
|
-
rel.startPoint = points.startPoint;
|
|
2315
|
-
rel.endPoint = points.endPoint;
|
|
2316
|
-
}
|
|
2317
|
-
svgDraw_default.drawRels(diagram2, rels2, conf);
|
|
2318
|
-
}, "drawRels");
|
|
2319
|
-
function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
|
|
2320
|
-
let currentBounds = new Bounds(diagObj);
|
|
2321
|
-
currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow2, currentBoundaries.length);
|
|
2322
|
-
for (let [i, currentBoundary] of currentBoundaries.entries()) {
|
|
2323
|
-
let Y = 0;
|
|
2324
|
-
currentBoundary.image = { width: 0, height: 0, Y: 0 };
|
|
2325
|
-
if (currentBoundary.sprite) {
|
|
2326
|
-
currentBoundary.image.width = 48;
|
|
2327
|
-
currentBoundary.image.height = 48;
|
|
2328
|
-
currentBoundary.image.Y = Y;
|
|
2329
|
-
Y = currentBoundary.image.Y + currentBoundary.image.height;
|
|
2330
|
-
}
|
|
2331
|
-
let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
|
|
2332
|
-
let currentBoundaryLabelConf = boundaryFont(conf);
|
|
2333
|
-
currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
|
|
2334
|
-
currentBoundaryLabelConf.fontWeight = "bold";
|
|
2335
|
-
calcC4ShapeTextWH(
|
|
2336
|
-
"label",
|
|
2337
|
-
currentBoundary,
|
|
2338
|
-
currentBoundaryTextWrap,
|
|
2339
|
-
currentBoundaryLabelConf,
|
|
2340
|
-
currentBounds.data.widthLimit
|
|
2341
|
-
);
|
|
2342
|
-
currentBoundary.label.Y = Y + 8;
|
|
2343
|
-
Y = currentBoundary.label.Y + currentBoundary.label.height;
|
|
2344
|
-
if (currentBoundary.type && currentBoundary.type.text !== "") {
|
|
2345
|
-
currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
|
|
2346
|
-
let currentBoundaryTypeConf = boundaryFont(conf);
|
|
2347
|
-
calcC4ShapeTextWH(
|
|
2348
|
-
"type",
|
|
2349
|
-
currentBoundary,
|
|
2350
|
-
currentBoundaryTextWrap,
|
|
2351
|
-
currentBoundaryTypeConf,
|
|
2352
|
-
currentBounds.data.widthLimit
|
|
2353
|
-
);
|
|
2354
|
-
currentBoundary.type.Y = Y + 5;
|
|
2355
|
-
Y = currentBoundary.type.Y + currentBoundary.type.height;
|
|
2356
|
-
}
|
|
2357
|
-
if (currentBoundary.descr && currentBoundary.descr.text !== "") {
|
|
2358
|
-
let currentBoundaryDescrConf = boundaryFont(conf);
|
|
2359
|
-
currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
|
|
2360
|
-
calcC4ShapeTextWH(
|
|
2361
|
-
"descr",
|
|
2362
|
-
currentBoundary,
|
|
2363
|
-
currentBoundaryTextWrap,
|
|
2364
|
-
currentBoundaryDescrConf,
|
|
2365
|
-
currentBounds.data.widthLimit
|
|
2366
|
-
);
|
|
2367
|
-
currentBoundary.descr.Y = Y + 20;
|
|
2368
|
-
Y = currentBoundary.descr.Y + currentBoundary.descr.height;
|
|
2369
|
-
}
|
|
2370
|
-
if (i == 0 || i % c4BoundaryInRow2 === 0) {
|
|
2371
|
-
let _x = parentBounds.data.startx + conf.diagramMarginX;
|
|
2372
|
-
let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
|
|
2373
|
-
currentBounds.setData(_x, _x, _y, _y);
|
|
2374
|
-
} else {
|
|
2375
|
-
let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
|
|
2376
|
-
let _y = currentBounds.data.starty;
|
|
2377
|
-
currentBounds.setData(_x, _x, _y, _y);
|
|
2378
|
-
}
|
|
2379
|
-
currentBounds.name = currentBoundary.alias;
|
|
2380
|
-
let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);
|
|
2381
|
-
let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);
|
|
2382
|
-
if (currentPersonOrSystemKeys.length > 0) {
|
|
2383
|
-
drawC4ShapeArray(
|
|
2384
|
-
currentBounds,
|
|
2385
|
-
diagram2,
|
|
2386
|
-
currentPersonOrSystemArray,
|
|
2387
|
-
currentPersonOrSystemKeys
|
|
2388
|
-
);
|
|
2389
|
-
}
|
|
2390
|
-
parentBoundaryAlias = currentBoundary.alias;
|
|
2391
|
-
let nextCurrentBoundaries = diagObj.db.getBoundaries(parentBoundaryAlias);
|
|
2392
|
-
if (nextCurrentBoundaries.length > 0) {
|
|
2393
|
-
drawInsideBoundary(
|
|
2394
|
-
diagram2,
|
|
2395
|
-
parentBoundaryAlias,
|
|
2396
|
-
currentBounds,
|
|
2397
|
-
nextCurrentBoundaries,
|
|
2398
|
-
diagObj
|
|
2399
|
-
);
|
|
2400
|
-
}
|
|
2401
|
-
if (currentBoundary.alias !== "global") {
|
|
2402
|
-
drawBoundary2(diagram2, currentBoundary, currentBounds);
|
|
2403
|
-
}
|
|
2404
|
-
parentBounds.data.stopy = Math.max(
|
|
2405
|
-
currentBounds.data.stopy + conf.c4ShapeMargin,
|
|
2406
|
-
parentBounds.data.stopy
|
|
2407
|
-
);
|
|
2408
|
-
parentBounds.data.stopx = Math.max(
|
|
2409
|
-
currentBounds.data.stopx + conf.c4ShapeMargin,
|
|
2410
|
-
parentBounds.data.stopx
|
|
2411
|
-
);
|
|
2412
|
-
globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
|
|
2413
|
-
globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
__name(drawInsideBoundary, "drawInsideBoundary");
|
|
2417
|
-
var draw = /* @__PURE__ */ __name(function(_text, id, _version, diagObj) {
|
|
2418
|
-
conf = getConfig2().c4;
|
|
2419
|
-
const securityLevel = getConfig2().securityLevel;
|
|
2420
|
-
let sandboxElement;
|
|
2421
|
-
if (securityLevel === "sandbox") {
|
|
2422
|
-
sandboxElement = select_default("#i" + id);
|
|
2423
|
-
}
|
|
2424
|
-
const root = securityLevel === "sandbox" ? select_default(sandboxElement.nodes()[0].contentDocument.body) : select_default("body");
|
|
2425
|
-
let db = diagObj.db;
|
|
2426
|
-
diagObj.db.setWrap(conf.wrap);
|
|
2427
|
-
c4ShapeInRow2 = db.getC4ShapeInRow();
|
|
2428
|
-
c4BoundaryInRow2 = db.getC4BoundaryInRow();
|
|
2429
|
-
log.debug(`C:${JSON.stringify(conf, null, 2)}`);
|
|
2430
|
-
const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select_default(`[id="${id}"]`);
|
|
2431
|
-
svgDraw_default.insertComputerIcon(diagram2);
|
|
2432
|
-
svgDraw_default.insertDatabaseIcon(diagram2);
|
|
2433
|
-
svgDraw_default.insertClockIcon(diagram2);
|
|
2434
|
-
let screenBounds = new Bounds(diagObj);
|
|
2435
|
-
screenBounds.setData(
|
|
2436
|
-
conf.diagramMarginX,
|
|
2437
|
-
conf.diagramMarginX,
|
|
2438
|
-
conf.diagramMarginY,
|
|
2439
|
-
conf.diagramMarginY
|
|
2440
|
-
);
|
|
2441
|
-
screenBounds.data.widthLimit = screen.availWidth;
|
|
2442
|
-
globalBoundaryMaxX = conf.diagramMarginX;
|
|
2443
|
-
globalBoundaryMaxY = conf.diagramMarginY;
|
|
2444
|
-
const title2 = diagObj.db.getTitle();
|
|
2445
|
-
let currentBoundaries = diagObj.db.getBoundaries("");
|
|
2446
|
-
drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj);
|
|
2447
|
-
svgDraw_default.insertArrowHead(diagram2);
|
|
2448
|
-
svgDraw_default.insertArrowEnd(diagram2);
|
|
2449
|
-
svgDraw_default.insertArrowCrossHead(diagram2);
|
|
2450
|
-
svgDraw_default.insertArrowFilledHead(diagram2);
|
|
2451
|
-
drawRels2(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);
|
|
2452
|
-
screenBounds.data.stopx = globalBoundaryMaxX;
|
|
2453
|
-
screenBounds.data.stopy = globalBoundaryMaxY;
|
|
2454
|
-
const box = screenBounds.data;
|
|
2455
|
-
let boxHeight = box.stopy - box.starty;
|
|
2456
|
-
let height = boxHeight + 2 * conf.diagramMarginY;
|
|
2457
|
-
let boxWidth = box.stopx - box.startx;
|
|
2458
|
-
const width = boxWidth + 2 * conf.diagramMarginX;
|
|
2459
|
-
if (title2) {
|
|
2460
|
-
diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY);
|
|
2461
|
-
}
|
|
2462
|
-
configureSvgSize(diagram2, height, width, conf.useMaxWidth);
|
|
2463
|
-
const extraVertForTitle = title2 ? 60 : 0;
|
|
2464
|
-
diagram2.attr(
|
|
2465
|
-
"viewBox",
|
|
2466
|
-
box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
|
|
2467
|
-
);
|
|
2468
|
-
log.debug(`models:`, box);
|
|
2469
|
-
}, "draw");
|
|
2470
|
-
var c4Renderer_default = {
|
|
2471
|
-
drawPersonOrSystemArray: drawC4ShapeArray,
|
|
2472
|
-
drawBoundary: drawBoundary2,
|
|
2473
|
-
setConf,
|
|
2474
|
-
draw
|
|
2475
|
-
};
|
|
2476
|
-
var getStyles = /* @__PURE__ */ __name((options) => `.person {
|
|
2477
|
-
stroke: ${options.personBorder};
|
|
2478
|
-
fill: ${options.personBkg};
|
|
2479
|
-
}
|
|
2480
|
-
`, "getStyles");
|
|
2481
|
-
var styles_default = getStyles;
|
|
2482
|
-
var diagram = {
|
|
2483
|
-
parser: c4Diagram_default,
|
|
2484
|
-
db: c4Db_default,
|
|
2485
|
-
renderer: c4Renderer_default,
|
|
2486
|
-
styles: styles_default,
|
|
2487
|
-
init: /* @__PURE__ */ __name(({ c4, wrap }) => {
|
|
2488
|
-
c4Renderer_default.setConf(c4);
|
|
2489
|
-
c4Db_default.setWrap(wrap);
|
|
2490
|
-
}, "init")
|
|
2491
|
-
};
|
|
2492
|
-
|
|
2493
|
-
export { diagram };
|
|
2494
|
-
//# sourceMappingURL=c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map
|
|
2495
|
-
//# sourceMappingURL=c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map
|