@readme/markdown 9.3.0 → 9.3.2
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/dist/10.node.js +20064 -19229
- package/dist/10.node.js.map +1 -1
- package/dist/122.node.js +23 -0
- package/dist/122.node.js.map +1 -0
- package/dist/{17.node.js → 135.node.js} +109 -110
- package/dist/135.node.js.map +1 -0
- package/dist/136.node.js +23 -0
- package/dist/136.node.js.map +1 -0
- package/dist/{52.node.js → 188.node.js} +211 -196
- package/dist/188.node.js.map +1 -0
- package/dist/214.node.js +1280 -0
- package/dist/214.node.js.map +1 -0
- package/dist/23.node.js +2563 -0
- package/dist/23.node.js.map +1 -0
- package/dist/{867.node.js → 311.node.js} +95 -95
- package/dist/{867.node.js.map → 311.node.js.map} +1 -1
- package/dist/{940.node.js → 339.node.js} +3 -75
- package/dist/339.node.js.map +1 -0
- package/dist/354.node.js +23 -0
- package/dist/354.node.js.map +1 -0
- package/dist/359.node.js +2001 -0
- package/dist/359.node.js.map +1 -0
- package/dist/364.node.js +4435 -0
- package/dist/364.node.js.map +1 -0
- package/dist/{429.node.js → 371.node.js} +196 -139
- package/dist/371.node.js.map +1 -0
- package/dist/{687.node.js → 38.node.js} +761 -761
- package/dist/38.node.js.map +1 -0
- package/dist/391.node.js +522 -0
- package/dist/391.node.js.map +1 -0
- package/dist/462.node.js +23 -0
- package/dist/462.node.js.map +1 -0
- package/dist/48.node.js +57 -0
- package/dist/48.node.js.map +1 -0
- package/dist/486.node.js +16267 -14851
- package/dist/486.node.js.map +1 -1
- package/dist/537.node.js +59 -0
- package/dist/537.node.js.map +1 -0
- package/dist/550.node.js +201 -1408
- package/dist/550.node.js.map +1 -1
- package/dist/{403.node.js → 572.node.js} +118 -118
- package/dist/572.node.js.map +1 -0
- package/dist/580.node.js +1324 -0
- package/dist/580.node.js.map +1 -0
- package/dist/{952.node.js → 649.node.js} +39 -39
- package/dist/{952.node.js.map → 649.node.js.map} +1 -1
- package/dist/740.node.js +23 -0
- package/dist/740.node.js.map +1 -0
- package/dist/741.node.js +23 -0
- package/dist/741.node.js.map +1 -0
- package/dist/779.node.js +57 -0
- package/dist/779.node.js.map +1 -0
- package/dist/805.node.js +1355 -0
- package/dist/805.node.js.map +1 -0
- package/dist/{246.node.js → 855.node.js} +671 -495
- package/dist/855.node.js.map +1 -0
- package/dist/{11.node.js → 870.node.js} +70 -63
- package/dist/870.node.js.map +1 -0
- package/dist/874.node.js +57 -0
- package/dist/874.node.js.map +1 -0
- package/dist/881.node.js +1344 -720
- package/dist/881.node.js.map +1 -1
- package/dist/{906.node.js → 890.node.js} +147 -147
- package/dist/{906.node.js.map → 890.node.js.map} +1 -1
- package/dist/898.node.js +361 -0
- package/dist/898.node.js.map +1 -0
- package/dist/{551.node.js → 912.node.js} +133 -133
- package/dist/{551.node.js.map → 912.node.js.map} +1 -1
- package/dist/{745.node.js → 915.node.js} +86 -85
- package/dist/915.node.js.map +1 -0
- package/dist/982.node.js +1132 -0
- package/dist/982.node.js.map +1 -0
- package/dist/995.node.js +189 -159
- package/dist/995.node.js.map +1 -1
- package/dist/lib/plain.d.ts +1 -1
- package/dist/main.js +1883 -331
- package/dist/main.node.js +1874 -332
- package/dist/main.node.js.map +1 -1
- package/package.json +1 -2
- package/dist/11.node.js.map +0 -1
- package/dist/120.node.js +0 -23
- package/dist/120.node.js.map +0 -1
- package/dist/134.node.js +0 -23
- package/dist/134.node.js.map +0 -1
- package/dist/150.node.js +0 -1892
- package/dist/150.node.js.map +0 -1
- package/dist/17.node.js.map +0 -1
- package/dist/246.node.js.map +0 -1
- package/dist/351.node.js +0 -2404
- package/dist/351.node.js.map +0 -1
- package/dist/366.node.js +0 -1185
- package/dist/366.node.js.map +0 -1
- package/dist/403.node.js.map +0 -1
- package/dist/429.node.js.map +0 -1
- package/dist/485.node.js +0 -518
- package/dist/485.node.js.map +0 -1
- package/dist/488.node.js +0 -59
- package/dist/488.node.js.map +0 -1
- package/dist/510.node.js +0 -250
- package/dist/510.node.js.map +0 -1
- package/dist/52.node.js.map +0 -1
- package/dist/617.node.js +0 -23
- package/dist/617.node.js.map +0 -1
- package/dist/687.node.js.map +0 -1
- package/dist/745.node.js.map +0 -1
- package/dist/775.node.js +0 -1904
- package/dist/775.node.js.map +0 -1
- package/dist/788.node.js +0 -1025
- package/dist/788.node.js.map +0 -1
- package/dist/81.node.js +0 -386
- package/dist/81.node.js.map +0 -1
- package/dist/849.node.js +0 -2590
- package/dist/849.node.js.map +0 -1
- package/dist/863.node.js +0 -23
- package/dist/863.node.js.map +0 -1
- package/dist/885.node.js +0 -52
- package/dist/885.node.js.map +0 -1
- package/dist/896.node.js +0 -1617
- package/dist/896.node.js.map +0 -1
- package/dist/91.node.js +0 -23
- package/dist/91.node.js.map +0 -1
- package/dist/940.node.js.map +0 -1
package/dist/788.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"788.node.js","mappings":";;;;;;;;;;;;;;;;AAA+B;AACI;;AAEZ;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO,0DAAa;AACpB,iBAAiB,0DAAO;AACxB;AACA;AACA;;AAEA;AACA,SAAS,0DAAK;AACd;AACA;AACA,iBAAiB;AACjB,SAAS,0DAAa;AACtB;AACA;AACA,SAAS,0DAAa;AACtB;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,SAAS,0DAAK;AACd;AACA,iBAAiB;AACjB,SAAS,0DAAa;AACtB;AACA;AACA,SAAS,0DAAa;AACtB;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,gBAAgB,0CAA0C;AAC1D,GAAG;AACH;AACA;;;;;;;;;;;;;;;;;;;;;ACjD8B;AAKA;AAGA;AAGA;AAMA;AAQA;;AAE9B;AACoD;AACW;;AAE/D;AACuE;AACL;;AAElE;AACiE;AACH;AAC9D;AACA;AACA;AACA,6BAA6B,qEAAM;AACnC;AACA;AACA;AACA,CAAC;AACD,mCAAmC,qEAAM;AACzC,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA,CAAC;AACD,oCAAoC,qEAAM;AAC1C,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,CAAC;AACD,2BAA2B,qEAAM;AACjC,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM,8DAAG;AACT;AACA;AACA,QAAQ,8DAAG;AACX;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA,QAAQ;AACR,QAAQ,8DAAG;AACX,QAAQ,8DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA,QAAQ,8DAAG;AACX;AACA,QAAQ,8DAAG;AACX;AACA;AACA,YAAY,8DAAG;AACf;AACA,YAAY,8DAAG;AACf,YAAY;AACZ,YAAY,8DAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,UAAU,8DAAG;AACb;AACA,OAAO;AACP;AACA,IAAI,8DAAG;AACP;AACA,GAAG;AACH,CAAC;AACD,yCAAyC,qEAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0CAA0C,qEAAM;AAChD,EAAE,8DAAG;AACL;AACA,EAAE,8DAAG;AACL;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA,CAAC;AACD,kCAAkC,qEAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6CAA6C,qEAAM;AACnD;AACA,IAAI,8DAAG;AACP;AACA,IAAI;AACJ,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA,YAAY,8DAAG;AACf,YAAY,8DAAG;AACf;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN,MAAM,8DAAG;AACT;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA,GAAG;AACH,EAAE,8DAAG,wBAAwB,4EAAkB;AAC/C;AACA,EAAE,8DAAG;AACL,CAAC;AACD,gCAAgC,qEAAM;AACtC,EAAE,8DAAG,6BAA6B,4EAAkB;AACpD;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA,EAAE,8DAAG;AACL;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT,MAAM;AACN;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA,+BAA+B,6EAAc;AAC7C;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM,8DAAG,+BAA+B,4EAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM,8DAAG,iDAAiD,4EAAkB;AAC5E,MAAM,8DAAG,+BAA+B,4EAAkB;AAC1D,MAAM;AACN,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA,CAAC;AACD,6BAA6B,qEAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD,2CAA2C,qEAAM;;AAEjD;AAC4B;AAC5B,2BAA2B,qEAAM;AACjC,EAAE,8DAAG;AACL,qBAAqB,yEAAS;AAC9B;AACA;AACA,wBAAwB,uEAAQ;AAChC;AACA,+CAA+C,yEAAU,0BAA0B,uCAAuC,yCAAyC,kFAAmB;AACtL;AACA,MAAM,uEAAQ;AACd;AACA,eAAe,qDAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,EAAE,8DAAG;AACL;AACA,UAAU,yBAAyB,EAAE,qFAAuB;AAC5D;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB,IAAI,kDAAkD;AACjG;AACA,IAAI;AACJ;AACA;AACA;AACA,mBAAmB,OAAO,IAAI,kDAAkD;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qFAAsB;AACjC;AACA;AACA,CAAC;AACD,gCAAgC,qEAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qFAAsB;AACjC;AACA;AACA,CAAC;AACD,uCAAuC,qEAAM;AAC7C,qBAAqB,yEAAS;AAC9B;AACA;AACA;AACA;AACA,wCAAwC,kFAAmB;AAC3D;AACA,MAAM,uEAAQ;AACd;AACA,eAAe,qDAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,UAAU,yBAAyB,EAAE,qFAAuB;AAC5D;AACA;AACA,iBAAiB,wBAAwB,IAAI,+CAA+C,uEAAQ,oEAAoE;AACxK;AACA;AACA;AACA;AACA,WAAW,qFAAsB;AACjC;AACA;AACA,CAAC;AACD,8BAA8B,qEAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qFAAsB;AACjC;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA,oCAAoC,qEAAM;AAC1C,EAAE,8DAAG;AACL;AACA;AACA,CAAC;AACD,6BAA6B,qEAAM;AACnC;AACA,CAAC;;AAED;AACA,sCAAsC,qEAAM;AAC5C,EAAE,8DAAG,wCAAwC,4EAAmB;AAChE;AACA,EAAE,8DAAG;AACL;AACA;AACA,IAAI,8DAAG;AACP,IAAI;AACJ,IAAI,8DAAG;AACP;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA;AACA,UAAU,8DAAG;AACb;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA,QAAQ,8DAAG;AACX,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+EAAgB;AACxB;AACA,QAAQ,8DAAG;AACX,QAAQ,0EAAW;AACnB,QAAQ,8DAAG;AACX,QAAQ;AACR;AACA,UAAU,8DAAG;AACb,UAAU,8DAAG;AACb,iCAAiC;AACjC,UAAU;AACV,UAAU,8DAAG;AACb,gBAAgB,yEAAU,yBAAyB,yBAAyB;AAC5E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP,UAAU,8EAAe;AACzB,GAAG;AACH;AACA,IAAI,8DAAG;AACP,GAAG;AACH,EAAE,8DAAG,6CAA6C,4EAAmB;AACrE,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL,EAAE,gFAAW;AACb,EAAE,8DAAG,4CAA4C,4EAAmB;AACpE;AACA,UAAU,2BAA2B,EAAE,qFAAuB;AAC9D;AACA;AACA,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,2EAAY;AAClB,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ,2EAAY;AACpB;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI,8DAAG;AACP;AACA,kBAAkB,yEAAU;AAC5B,IAAI,gFAAiB;AACrB,GAAG;AACH;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,GAAG;AACH,WAAW;AACX,CAAC;AACD,6BAA6B,qEAAM;AACnC,EAAE,8EAAe;AACjB,EAAE,oEAAK;AACP,EAAE,qEAAM;AACR;AACA;AACA,EAAE,8DAAG,wCAAwC,4EAAmB;AAChE;AACA,EAAE,8DAAG,qCAAqC,4EAAmB;AAC7D,qBAAqB,yEAAS;AAC9B;AACA,CAAC;;AAED;AACA,mCAAmC,qEAAM,UAAU,yEAAc,mBAAmB,yEAAS;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qEAAM;AAC1C,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,eAAe,yEAAS,yBAAyB,yEAAS;AAC1D;AACA;AACA;AACA,IAAI,8DAAG;AACP,GAAG;AACH,CAAC;AACD,iCAAiC,qEAAM;AACvC,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL;AACA;AACA,mBAAmB,iFAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yEAAS,yBAAyB,yEAAS;AAC1D;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP,GAAG;AACH,CAAC;AACD,+BAA+B,qEAAM;AACrC,EAAE,8DAAG;AACL;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yEAAS,yBAAyB,yEAAS;AAC1D;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iFAAkB,aAAa,sDAAW;AACvD;AACA;AACA,GAAG;AACH,CAAC;AACD,mCAAmC,qEAAM;AACzC,gBAAgB,yEAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wEAAS;AACnB;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iFAAkB,eAAe,sDAAW;AACzD;AACA,IAAI,8DAAG;AACP;AACA,qBAAqB,iFAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,UAAU,yEAAS,4BAA4B,yEAAS;AACxD;AACA;AACA,QAAQ;AACR;AACA,2CAA2C,yEAAc;AACzD;AACA,4DAA4D,oBAAoB;AAChF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD,8BAA8B,qEAAM;AACpC;AACA;AACA;AACA;AACA,CAAC;AACD,2BAA2B,qEAAM;AACjC,EAAE,8DAAG;AACL,gBAAgB,yEAAS,gBAAgB,yEAAS;AAClD,wBAAwB,yEAAS;AACjC,EAAE,8DAAG;AACL;AACA;AACA,gBAAgB,6EAAe;AAC/B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qDAAO;AAC5B;AACA,6CAA6C,qDAAO,mDAAmD,qDAAO;AAC9G,kCAAkC,GAAG;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,wEAAa;AACf,EAAE,gFAAiB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,+EAAoB;AAC9B,MAAM,0EAAe;AACrB;AACA,UAAU,yEAAc;AACxB,wBAAwB,qEAAM;AAC9B;AACA;AACA;AACA;AACA,IAAI,0EAAe;AACnB,GAAG;AACH;AAGE","sources":["webpack://@readme/markdown/./node_modules/dagre-d3-es/src/graphlib/json.js","webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-C6QPLPW4.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear,\n clear2,\n createLabel_default,\n insertEdge,\n insertEdgeLabel,\n insertNode,\n intersect_rect_default,\n markers_default,\n positionEdgeLabel,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-REEJFE46.mjs\";\nimport {\n classDb_default,\n classDiagram_default,\n styles_default\n} from \"./chunk-NGC4727B.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-I3FGKTZ5.mjs\";\nimport {\n createText\n} from \"./chunk-U7L4IQIU.mjs\";\nimport {\n getEdgeId,\n getStylesFromArray,\n interpolateToCurve,\n utils_default\n} from \"./chunk-TLUHKHBO.mjs\";\nimport {\n __name,\n common_default,\n evaluate,\n getConfig2 as getConfig,\n log,\n setupGraphViewbox\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/diagrams/class/classRenderer-v2.ts\nimport { select as select2, curveLinear } from \"d3\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/dagre-wrapper/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\n\n// src/dagre-wrapper/mermaid-graphlib.js\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nvar clusterDb = {};\nvar descendants = {};\nvar parents = {};\nvar clear3 = /* @__PURE__ */ __name(() => {\n descendants = {};\n parents = {};\n clusterDb = {};\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", descendants[ancestorId].includes(id));\n if (descendants[ancestorId].includes(id)) {\n return true;\n }\n return false;\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n log.info(\"Descendants of \", clusterId, \" is \", descendants[clusterId]);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId) {\n return false;\n }\n if (edge.w === clusterId) {\n return false;\n }\n if (!descendants[clusterId]) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents[child] = id;\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph) => {\n log.trace(\"Searching\", id);\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n log.trace(\"This is a valid node\", id);\n return id;\n }\n for (const child of children) {\n const _id = findNonClusterChild(child, graph);\n if (_id) {\n log.trace(\"Found replacement for\", id, \" => \", _id);\n return _id;\n }\n }\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb[id]) {\n return id;\n }\n if (!clusterDb[id].externalConnections) {\n return id;\n }\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph)\n );\n descendants[id] = extractDescendants(id, graph);\n clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n if (edge.v !== id && edge.w !== id) {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants[id]);\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of Object.keys(clusterDb)) {\n const nonClusterChild = clusterDb[id].id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) {\n clusterDb[id].id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb[e.v],\n \" --- \",\n clusterDb[e.w]\n );\n if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {\n log.warn(\"Fixing and trixing link to self - removing XXX\", e.v, e.w, e.name);\n log.warn(\"Fixing and trixing - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId = e.w + \"---\" + e.v;\n graph.setNode(specialId, {\n domId: specialId,\n id: specialId,\n labelStyle: \"\",\n labelText: edge.label,\n padding: 0,\n shape: \"labelRect\",\n style: \"\"\n });\n const edge1 = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge2.label = \"\";\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n graph.setEdge(v, specialId, edge1, e.name + \"-cyclic-special\");\n graph.setEdge(specialId, w, edge2, e.name + \"-cyclic-special\");\n } else if (clusterDb[e.v] || clusterDb[e.w]) {\n log.warn(\"Fixing and trixing - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb[parent].externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb[parent].externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb[node] && !clusterDb[node].externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb[node]) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb[node].externalConnections && // !graph.parent(node) &&\n graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb[node]?.clusterData?.dir) {\n dir = clusterDb[node].clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb[node].clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb[node].clusterData,\n labelText: clusterDb[node].labelText,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb[node].externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign(nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/dagre-wrapper/clusters.js\nimport { select } from \"d3\";\nvar rect = /* @__PURE__ */ __name((parent, node) => {\n log.info(\"Creating subgraph rect for \", node.id, node);\n const siteConfig = getConfig();\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"cluster\" + (node.class ? \" \" + node.class : \"\")).attr(\"id\", node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"cluster-label\");\n const text = node.labelType === \"markdown\" ? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }, siteConfig) : label.node().appendChild(createLabel_default(node.labelText, node.labelStyle, void 0, true));\n let bbox = text.getBBox();\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n if (node.width <= bbox.width + padding) {\n node.diff = (bbox.width - node.width) / 2 - node.padding / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n log.trace(\"Data \", node, JSON.stringify(node));\n rect2.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", node.x - width / 2).attr(\"y\", node.y - node.height / 2 - halfPadding).attr(\"width\", width).attr(\"height\", node.height + padding);\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n if (useHtmlLabels) {\n label.attr(\n \"transform\",\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n } else {\n label.attr(\n \"transform\",\n // This puts the label on top of the box instead of inside it\n `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n }\n const rectBox = rect2.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return shapeSvg;\n}, \"rect\");\nvar noteGroup = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"note-cluster\").attr(\"id\", node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n rect2.attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", node.x - node.width / 2 - halfPadding).attr(\"y\", node.y - node.height / 2 - halfPadding).attr(\"width\", node.width + padding).attr(\"height\", node.height + padding).attr(\"fill\", \"none\");\n const rectBox = rect2.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return shapeSvg;\n}, \"noteGroup\");\nvar roundedWithTitle = /* @__PURE__ */ __name((parent, node) => {\n const siteConfig = getConfig();\n const shapeSvg = parent.insert(\"g\").attr(\"class\", node.classes).attr(\"id\", node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"cluster-label\");\n const innerRect = shapeSvg.append(\"rect\");\n const text = label.node().appendChild(createLabel_default(node.labelText, node.labelStyle, void 0, true));\n let bbox = text.getBBox();\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n rect2.attr(\"class\", \"outer\").attr(\"x\", node.x - width / 2 - halfPadding).attr(\"y\", node.y - node.height / 2 - halfPadding).attr(\"width\", width + padding).attr(\"height\", node.height + padding);\n innerRect.attr(\"class\", \"inner\").attr(\"x\", node.x - width / 2 - halfPadding).attr(\"y\", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr(\"width\", width + padding).attr(\"height\", node.height + padding - bbox.height - 3);\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n label.attr(\n \"transform\",\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + (evaluate(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})`\n );\n const rectBox = rect2.node().getBBox();\n node.height = rectBox.height;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return shapeSvg;\n}, \"roundedWithTitle\");\nvar divider = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", node.classes).attr(\"id\", node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n rect2.attr(\"class\", \"divider\").attr(\"x\", node.x - node.width / 2 - halfPadding).attr(\"y\", node.y - node.height / 2).attr(\"width\", node.width + padding).attr(\"height\", node.height + padding);\n const rectBox = rect2.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.diff = -node.padding / 2;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return shapeSvg;\n}, \"divider\");\nvar shapes = { rect, roundedWithTitle, noteGroup, divider };\nvar clusterElems = {};\nvar insertCluster = /* @__PURE__ */ __name((elem, node) => {\n log.trace(\"Inserting cluster\");\n const shape = node.shape || \"rect\";\n clusterElems[node.id] = shapes[shape](elem, node);\n}, \"insertCluster\");\nvar clear4 = /* @__PURE__ */ __name(() => {\n clusterElems = {};\n}, \"clear\");\n\n// src/dagre-wrapper/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.info(\"Graph in recursive render: XXX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.trace(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.info(\"Setting data for cluster XXX (\", v, \") \", data, parentCluster);\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\"Node bounds (abc123)\", v, node, node.width, node.x, node.y);\n setNodeElem(newEl, node);\n log.warn(\"Recursive render complete \", newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\"Cluster - the non recursive path XXX\", v, node.id, node, graph);\n log.info(findNonClusterChild(node.id, graph));\n clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };\n } else {\n log.info(\"Node - the non recursive path\", v, node.id, node);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n graph.edges().forEach(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\"Fix\", clusterDb, \"ids:\", e.v, e.w, \"Translating: \", clusterDb[e.v], clusterDb[e.w]);\n await insertEdgeLabel(edgeLabels, edge);\n });\n graph.edges().forEach(function(e) {\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n });\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"#############################################\");\n log.info(\"### Layout ###\");\n log.info(\"#############################################\");\n log.info(graph);\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n sortNodesByHierarchy(graph).forEach(function(v) {\n const node = graph.node(v);\n log.info(\"Position \" + v + \": \" + JSON.stringify(graph.node(v)));\n log.info(\n \"Position \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n node.height += subGraphTitleTotalMargin;\n insertCluster(clusters, node);\n clusterDb[node.id].node = node;\n } else {\n node.y += subGraphTitleTotalMargin / 2;\n positionNode(node);\n }\n }\n });\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramType, graph, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.type === \"group\") {\n diff = n.diff;\n }\n });\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (elem, graph, markers, diagramType, id) => {\n markers_default(elem, markers, diagramType, id);\n clear();\n clear2();\n clear4();\n clear3();\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig);\n}, \"render\");\n\n// src/diagrams/class/classRenderer-v2.ts\nvar sanitizeText = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, getConfig()), \"sanitizeText\");\nvar conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: void 0\n};\nvar addNamespaces = /* @__PURE__ */ __name(function(namespaces, g, _id, diagObj) {\n log.info(\"keys:\", [...namespaces.keys()]);\n log.info(namespaces);\n namespaces.forEach(function(vertex) {\n const shape = \"rect\";\n const node = {\n shape,\n id: vertex.id,\n domId: vertex.domId,\n labelText: sanitizeText(vertex.id),\n labelStyle: \"\",\n style: \"fill: none; stroke: black\",\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding\n };\n g.setNode(vertex.id, node);\n addClasses(vertex.classes, g, _id, diagObj, vertex.id);\n log.info(\"setNode\", node);\n });\n}, \"addNamespaces\");\nvar addClasses = /* @__PURE__ */ __name(function(classes, g, _id, diagObj, parent) {\n log.info(\"keys:\", [...classes.keys()]);\n log.info(classes);\n [...classes.values()].filter((vertex) => vertex.parent === parent).forEach(function(vertex) {\n const cssClassStr = vertex.cssClasses.join(\" \");\n const styles = getStylesFromArray(vertex.styles);\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = \"class_box\";\n const node = {\n labelStyle: styles.labelStyle,\n shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id, parent) || \"\",\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === \"group\" ? 500 : void 0,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding\n };\n g.setNode(vertex.id, node);\n if (parent) {\n g.setParent(vertex.id, parent);\n }\n log.info(\"setNode\", node);\n });\n}, \"addClasses\");\nvar addNotes = /* @__PURE__ */ __name(function(notes, g, startEdgeId, classes) {\n log.info(notes);\n notes.forEach(function(note, i) {\n const vertex = note;\n const cssNoteStr = \"\";\n const styles = { labelStyle: \"\", style: \"\" };\n const vertexText = vertex.text;\n const radius = 0;\n const shape = \"note\";\n const node = {\n labelStyle: styles.labelStyle,\n shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: \"\",\n type: \"note\",\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding\n };\n g.setNode(vertex.id, node);\n log.info(\"setNode\", node);\n if (!vertex.class || !classes.has(vertex.class)) {\n return;\n }\n const edgeId = startEdgeId + i;\n const edgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: \"relation\",\n pattern: \"dotted\",\n // Set link type for rendering\n arrowhead: \"none\",\n //Set edge extra labels\n startLabelRight: \"\",\n endLabelLeft: \"\",\n //Set relation arrow types\n arrowTypeStart: \"none\",\n arrowTypeEnd: \"none\",\n style: \"fill:none\",\n labelStyle: \"\",\n curve: interpolateToCurve(conf.curve, curveLinear)\n };\n g.setEdge(vertex.id, vertex.class, edgeData, edgeId);\n });\n}, \"addNotes\");\nvar addRelations = /* @__PURE__ */ __name(function(relations, g) {\n const conf2 = getConfig().flowchart;\n let cnt = 0;\n relations.forEach(function(edge) {\n cnt++;\n const edgeData = {\n //Set relationship style and line type\n classes: \"relation\",\n pattern: edge.relation.lineType == 1 ? \"dashed\" : \"solid\",\n id: getEdgeId(edge.id1, edge.id2, {\n prefix: \"id\",\n counter: cnt\n }),\n // Set link type for rendering\n arrowhead: edge.type === \"arrow_open\" ? \"none\" : \"normal\",\n //Set edge extra labels\n startLabelRight: edge.relationTitle1 === \"none\" ? \"\" : edge.relationTitle1,\n endLabelLeft: edge.relationTitle2 === \"none\" ? \"\" : edge.relationTitle2,\n //Set relation arrow types\n arrowTypeStart: getArrowMarker(edge.relation.type1),\n arrowTypeEnd: getArrowMarker(edge.relation.type2),\n style: \"fill:none\",\n labelStyle: \"\",\n curve: interpolateToCurve(conf2?.curve, curveLinear)\n };\n log.info(edgeData, edge);\n if (edge.style !== void 0) {\n const styles = getStylesFromArray(edge.style);\n edgeData.style = styles.style;\n edgeData.labelStyle = styles.labelStyle;\n }\n edge.text = edge.title;\n if (edge.text === void 0) {\n if (edge.style !== void 0) {\n edgeData.arrowheadStyle = \"fill: #333\";\n }\n } else {\n edgeData.arrowheadStyle = \"fill: #333\";\n edgeData.labelpos = \"c\";\n if (getConfig().flowchart?.htmlLabels ?? getConfig().htmlLabels) {\n edgeData.labelType = \"html\";\n edgeData.label = '<span class=\"edgeLabel\">' + edge.text + \"</span>\";\n } else {\n edgeData.labelType = \"text\";\n edgeData.label = edge.text.replace(common_default.lineBreakRegex, \"\\n\");\n if (edge.style === void 0) {\n edgeData.style = edgeData.style || \"stroke: #333; stroke-width: 1.5px;fill:none\";\n }\n edgeData.labelStyle = edgeData.labelStyle.replace(\"color:\", \"fill:\");\n }\n }\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n}, \"addRelations\");\nvar setConf = /* @__PURE__ */ __name(function(cnf) {\n conf = {\n ...conf,\n ...cnf\n };\n}, \"setConf\");\nvar draw = /* @__PURE__ */ __name(async function(text, id, _version, diagObj) {\n log.info(\"Drawing class - \", id);\n const conf2 = getConfig().flowchart ?? getConfig().class;\n const securityLevel = getConfig().securityLevel;\n log.info(\"config:\", conf2);\n const nodeSpacing = conf2?.nodeSpacing ?? 50;\n const rankSpacing = conf2?.rankSpacing ?? 50;\n const g = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: diagObj.db.getDirection(),\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const namespaces = diagObj.db.getNamespaces();\n const classes = diagObj.db.getClasses();\n const relations = diagObj.db.getRelations();\n const notes = diagObj.db.getNotes();\n log.info(relations);\n addNamespaces(namespaces, g, id, diagObj);\n addClasses(classes, g, id, diagObj);\n addRelations(relations, g);\n addNotes(notes, g, relations.length + 1, classes);\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select2(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select2(sandboxElement.nodes()[0].contentDocument.body) : select2(\"body\");\n const svg = root.select(`[id=\"${id}\"]`);\n const element = root.select(\"#\" + id + \" g\");\n await render(\n element,\n g,\n [\"aggregation\", \"extension\", \"composition\", \"dependency\", \"lollipop\"],\n \"classDiagram\",\n id\n );\n utils_default.insertTitle(svg, \"classTitleText\", conf2?.titleTopMargin ?? 5, diagObj.db.getDiagramTitle());\n setupGraphViewbox(g, svg, conf2?.diagramPadding, conf2?.useMaxWidth);\n if (!conf2?.htmlLabels) {\n const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (const label of labels) {\n const dim = label.getBBox();\n const rect2 = doc.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n rect2.setAttribute(\"rx\", 0);\n rect2.setAttribute(\"ry\", 0);\n rect2.setAttribute(\"width\", dim.width);\n rect2.setAttribute(\"height\", dim.height);\n label.insertBefore(rect2, label.firstChild);\n }\n }\n}, \"draw\");\nfunction getArrowMarker(type) {\n let marker;\n switch (type) {\n case 0:\n marker = \"aggregation\";\n break;\n case 1:\n marker = \"extension\";\n break;\n case 2:\n marker = \"composition\";\n break;\n case 3:\n marker = \"dependency\";\n break;\n case 4:\n marker = \"lollipop\";\n break;\n default:\n marker = \"none\";\n }\n return marker;\n}\n__name(getArrowMarker, \"getArrowMarker\");\nvar classRenderer_v2_default = {\n setConf,\n draw\n};\n\n// src/diagrams/class/classDiagram-v2.ts\nvar diagram = {\n parser: classDiagram_default,\n db: classDb_default,\n renderer: classRenderer_v2_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classDb_default.clear();\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|
package/dist/81.node.js
DELETED
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 81;
|
|
3
|
-
exports.ids = [81];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 7081:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ diagram: () => (/* binding */ diagram)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* harmony import */ var _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4896);
|
|
13
|
-
/* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
|
|
14
|
-
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6322);
|
|
15
|
-
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8066);
|
|
16
|
-
/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(995);
|
|
17
|
-
/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4416);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// src/diagrams/class/classRenderer.js
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// src/diagrams/class/svgDraw.js
|
|
28
|
-
|
|
29
|
-
var edgeCount = 0;
|
|
30
|
-
var drawEdge = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, path, relation, conf, diagObj) {
|
|
31
|
-
const getRelationType = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(type) {
|
|
32
|
-
switch (type) {
|
|
33
|
-
case diagObj.db.relationType.AGGREGATION:
|
|
34
|
-
return "aggregation";
|
|
35
|
-
case diagObj.db.relationType.EXTENSION:
|
|
36
|
-
return "extension";
|
|
37
|
-
case diagObj.db.relationType.COMPOSITION:
|
|
38
|
-
return "composition";
|
|
39
|
-
case diagObj.db.relationType.DEPENDENCY:
|
|
40
|
-
return "dependency";
|
|
41
|
-
case diagObj.db.relationType.LOLLIPOP:
|
|
42
|
-
return "lollipop";
|
|
43
|
-
}
|
|
44
|
-
}, "getRelationType");
|
|
45
|
-
path.points = path.points.filter((p) => !Number.isNaN(p.y));
|
|
46
|
-
const lineData = path.points;
|
|
47
|
-
const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .line */ .n8j)().x(function(d) {
|
|
48
|
-
return d.x;
|
|
49
|
-
}).y(function(d) {
|
|
50
|
-
return d.y;
|
|
51
|
-
}).curve(d3__WEBPACK_IMPORTED_MODULE_3__/* .curveBasis */ .qrM);
|
|
52
|
-
const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation");
|
|
53
|
-
let url = "";
|
|
54
|
-
if (conf.arrowMarkerAbsolute) {
|
|
55
|
-
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
|
|
56
|
-
url = url.replace(/\(/g, "\\(");
|
|
57
|
-
url = url.replace(/\)/g, "\\)");
|
|
58
|
-
}
|
|
59
|
-
if (relation.relation.lineType == 1) {
|
|
60
|
-
svgPath.attr("class", "relation dashed-line");
|
|
61
|
-
}
|
|
62
|
-
if (relation.relation.lineType == 10) {
|
|
63
|
-
svgPath.attr("class", "relation dotted-line");
|
|
64
|
-
}
|
|
65
|
-
if (relation.relation.type1 !== "none") {
|
|
66
|
-
svgPath.attr(
|
|
67
|
-
"marker-start",
|
|
68
|
-
"url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)"
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
if (relation.relation.type2 !== "none") {
|
|
72
|
-
svgPath.attr(
|
|
73
|
-
"marker-end",
|
|
74
|
-
"url(" + url + "#" + getRelationType(relation.relation.type2) + "End)"
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
let x, y;
|
|
78
|
-
const l = path.points.length;
|
|
79
|
-
let labelPosition = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcLabelPosition(path.points);
|
|
80
|
-
x = labelPosition.x;
|
|
81
|
-
y = labelPosition.y;
|
|
82
|
-
let p1_card_x, p1_card_y;
|
|
83
|
-
let p2_card_x, p2_card_y;
|
|
84
|
-
if (l % 2 !== 0 && l > 1) {
|
|
85
|
-
let cardinality_1_point = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcCardinalityPosition(
|
|
86
|
-
relation.relation.type1 !== "none",
|
|
87
|
-
path.points,
|
|
88
|
-
path.points[0]
|
|
89
|
-
);
|
|
90
|
-
let cardinality_2_point = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcCardinalityPosition(
|
|
91
|
-
relation.relation.type2 !== "none",
|
|
92
|
-
path.points,
|
|
93
|
-
path.points[l - 1]
|
|
94
|
-
);
|
|
95
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point));
|
|
96
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point));
|
|
97
|
-
p1_card_x = cardinality_1_point.x;
|
|
98
|
-
p1_card_y = cardinality_1_point.y;
|
|
99
|
-
p2_card_x = cardinality_2_point.x;
|
|
100
|
-
p2_card_y = cardinality_2_point.y;
|
|
101
|
-
}
|
|
102
|
-
if (relation.title !== void 0) {
|
|
103
|
-
const g = elem.append("g").attr("class", "classLabel");
|
|
104
|
-
const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title);
|
|
105
|
-
window.label = label;
|
|
106
|
-
const bounds = label.node().getBBox();
|
|
107
|
-
g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding);
|
|
108
|
-
}
|
|
109
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Rendering relation " + JSON.stringify(relation));
|
|
110
|
-
if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") {
|
|
111
|
-
const g = elem.append("g").attr("class", "cardinality");
|
|
112
|
-
g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1);
|
|
113
|
-
}
|
|
114
|
-
if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") {
|
|
115
|
-
const g = elem.append("g").attr("class", "cardinality");
|
|
116
|
-
g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2);
|
|
117
|
-
}
|
|
118
|
-
edgeCount++;
|
|
119
|
-
}, "drawEdge");
|
|
120
|
-
var drawClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, classDef, conf, diagObj) {
|
|
121
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Rendering class ", classDef, conf);
|
|
122
|
-
const id = classDef.id;
|
|
123
|
-
const classInfo = {
|
|
124
|
-
id,
|
|
125
|
-
label: classDef.id,
|
|
126
|
-
width: 0,
|
|
127
|
-
height: 0
|
|
128
|
-
};
|
|
129
|
-
const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup");
|
|
130
|
-
let title;
|
|
131
|
-
if (classDef.link) {
|
|
132
|
-
title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
|
|
133
|
-
} else {
|
|
134
|
-
title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
|
|
135
|
-
}
|
|
136
|
-
let isFirst = true;
|
|
137
|
-
classDef.annotations.forEach(function(member) {
|
|
138
|
-
const titleText2 = title.append("tspan").text("\xAB" + member + "\xBB");
|
|
139
|
-
if (!isFirst) {
|
|
140
|
-
titleText2.attr("dy", conf.textHeight);
|
|
141
|
-
}
|
|
142
|
-
isFirst = false;
|
|
143
|
-
});
|
|
144
|
-
let classTitleString = getClassTitleString(classDef);
|
|
145
|
-
const classTitle = title.append("tspan").text(classTitleString).attr("class", "title");
|
|
146
|
-
if (!isFirst) {
|
|
147
|
-
classTitle.attr("dy", conf.textHeight);
|
|
148
|
-
}
|
|
149
|
-
const titleHeight = title.node().getBBox().height;
|
|
150
|
-
let membersLine;
|
|
151
|
-
let membersBox;
|
|
152
|
-
let methodsLine;
|
|
153
|
-
if (classDef.members.length > 0) {
|
|
154
|
-
membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2);
|
|
155
|
-
const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText");
|
|
156
|
-
isFirst = true;
|
|
157
|
-
classDef.members.forEach(function(member) {
|
|
158
|
-
addTspan(members, member, isFirst, conf);
|
|
159
|
-
isFirst = false;
|
|
160
|
-
});
|
|
161
|
-
membersBox = members.node().getBBox();
|
|
162
|
-
}
|
|
163
|
-
if (classDef.methods.length > 0) {
|
|
164
|
-
methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
|
|
165
|
-
const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText");
|
|
166
|
-
isFirst = true;
|
|
167
|
-
classDef.methods.forEach(function(method) {
|
|
168
|
-
addTspan(methods, method, isFirst, conf);
|
|
169
|
-
isFirst = false;
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
const classBox = g.node().getBBox();
|
|
173
|
-
var cssClassStr = " ";
|
|
174
|
-
if (classDef.cssClasses.length > 0) {
|
|
175
|
-
cssClassStr = cssClassStr + classDef.cssClasses.join(" ");
|
|
176
|
-
}
|
|
177
|
-
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr);
|
|
178
|
-
const rectWidth = rect.node().getBBox().width;
|
|
179
|
-
title.node().childNodes.forEach(function(x) {
|
|
180
|
-
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
|
|
181
|
-
});
|
|
182
|
-
if (classDef.tooltip) {
|
|
183
|
-
title.insert("title").text(classDef.tooltip);
|
|
184
|
-
}
|
|
185
|
-
if (membersLine) {
|
|
186
|
-
membersLine.attr("x2", rectWidth);
|
|
187
|
-
}
|
|
188
|
-
if (methodsLine) {
|
|
189
|
-
methodsLine.attr("x2", rectWidth);
|
|
190
|
-
}
|
|
191
|
-
classInfo.width = rectWidth;
|
|
192
|
-
classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
|
|
193
|
-
return classInfo;
|
|
194
|
-
}, "drawClass");
|
|
195
|
-
var getClassTitleString = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(classDef) {
|
|
196
|
-
let classTitleString = classDef.id;
|
|
197
|
-
if (classDef.type) {
|
|
198
|
-
classTitleString += "<" + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .parseGenericTypes */ .QO)(classDef.type) + ">";
|
|
199
|
-
}
|
|
200
|
-
return classTitleString;
|
|
201
|
-
}, "getClassTitleString");
|
|
202
|
-
var drawNote = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, note, conf, _diagObj) {
|
|
203
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Rendering note ", note, conf);
|
|
204
|
-
const id = note.id;
|
|
205
|
-
const noteInfo = {
|
|
206
|
-
id,
|
|
207
|
-
text: note.text,
|
|
208
|
-
width: 0,
|
|
209
|
-
height: 0
|
|
210
|
-
};
|
|
211
|
-
const g = elem.append("g").attr("id", id).attr("class", "classGroup");
|
|
212
|
-
let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
|
|
213
|
-
const lines = JSON.parse(`"${note.text}"`).split("\n");
|
|
214
|
-
lines.forEach(function(line2) {
|
|
215
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`Adding line: ${line2}`);
|
|
216
|
-
text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight);
|
|
217
|
-
});
|
|
218
|
-
const noteBox = g.node().getBBox();
|
|
219
|
-
const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr(
|
|
220
|
-
"height",
|
|
221
|
-
noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin
|
|
222
|
-
);
|
|
223
|
-
const rectWidth = rect.node().getBBox().width;
|
|
224
|
-
text.node().childNodes.forEach(function(x) {
|
|
225
|
-
x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
|
|
226
|
-
});
|
|
227
|
-
noteInfo.width = rectWidth;
|
|
228
|
-
noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;
|
|
229
|
-
return noteInfo;
|
|
230
|
-
}, "drawNote");
|
|
231
|
-
var addTspan = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(textEl, member, isFirst, conf) {
|
|
232
|
-
const { displayText, cssStyle } = member.getDisplayDetails();
|
|
233
|
-
const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText);
|
|
234
|
-
if (cssStyle !== "") {
|
|
235
|
-
tSpan.attr("style", member.cssStyle);
|
|
236
|
-
}
|
|
237
|
-
if (!isFirst) {
|
|
238
|
-
tSpan.attr("dy", conf.textHeight);
|
|
239
|
-
}
|
|
240
|
-
}, "addTspan");
|
|
241
|
-
var svgDraw_default = {
|
|
242
|
-
getClassTitleString,
|
|
243
|
-
drawClass,
|
|
244
|
-
drawEdge,
|
|
245
|
-
drawNote
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
// src/diagrams/class/classRenderer.js
|
|
249
|
-
var idCache = {};
|
|
250
|
-
var padding = 20;
|
|
251
|
-
var getGraphId = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(label) {
|
|
252
|
-
const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
|
|
253
|
-
if (foundEntry) {
|
|
254
|
-
return foundEntry[0];
|
|
255
|
-
}
|
|
256
|
-
}, "getGraphId");
|
|
257
|
-
var insertMarkers = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
|
|
258
|
-
elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
|
|
259
|
-
elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
260
|
-
elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
261
|
-
elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
262
|
-
elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
263
|
-
elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
264
|
-
elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
|
|
265
|
-
elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).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");
|
|
266
|
-
}, "insertMarkers");
|
|
267
|
-
var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(text, id, _version, diagObj) {
|
|
268
|
-
const conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().class;
|
|
269
|
-
idCache = {};
|
|
270
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Rendering diagram " + text);
|
|
271
|
-
const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().securityLevel;
|
|
272
|
-
let sandboxElement;
|
|
273
|
-
if (securityLevel === "sandbox") {
|
|
274
|
-
sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("#i" + id);
|
|
275
|
-
}
|
|
276
|
-
const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("body");
|
|
277
|
-
const diagram2 = root.select(`[id='${id}']`);
|
|
278
|
-
insertMarkers(diagram2);
|
|
279
|
-
const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Graph */ .T({
|
|
280
|
-
multigraph: true
|
|
281
|
-
});
|
|
282
|
-
g.setGraph({
|
|
283
|
-
isMultiGraph: true
|
|
284
|
-
});
|
|
285
|
-
g.setDefaultEdgeLabel(function() {
|
|
286
|
-
return {};
|
|
287
|
-
});
|
|
288
|
-
const classes = diagObj.db.getClasses();
|
|
289
|
-
const keys = [...classes.keys()];
|
|
290
|
-
for (const key of keys) {
|
|
291
|
-
const classDef = classes.get(key);
|
|
292
|
-
const node = svgDraw_default.drawClass(diagram2, classDef, conf, diagObj);
|
|
293
|
-
idCache[node.id] = node;
|
|
294
|
-
g.setNode(node.id, node);
|
|
295
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Org height: " + node.height);
|
|
296
|
-
}
|
|
297
|
-
const relations = diagObj.db.getRelations();
|
|
298
|
-
relations.forEach(function(relation) {
|
|
299
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info(
|
|
300
|
-
// cspell:ignore tjoho
|
|
301
|
-
"tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
|
|
302
|
-
);
|
|
303
|
-
g.setEdge(
|
|
304
|
-
getGraphId(relation.id1),
|
|
305
|
-
getGraphId(relation.id2),
|
|
306
|
-
{
|
|
307
|
-
relation
|
|
308
|
-
},
|
|
309
|
-
relation.title || "DEFAULT"
|
|
310
|
-
);
|
|
311
|
-
});
|
|
312
|
-
const notes = diagObj.db.getNotes();
|
|
313
|
-
notes.forEach(function(note) {
|
|
314
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`Adding note: ${JSON.stringify(note)}`);
|
|
315
|
-
const node = svgDraw_default.drawNote(diagram2, note, conf, diagObj);
|
|
316
|
-
idCache[node.id] = node;
|
|
317
|
-
g.setNode(node.id, node);
|
|
318
|
-
if (note.class && classes.has(note.class)) {
|
|
319
|
-
g.setEdge(
|
|
320
|
-
note.id,
|
|
321
|
-
getGraphId(note.class),
|
|
322
|
-
{
|
|
323
|
-
relation: {
|
|
324
|
-
id1: note.id,
|
|
325
|
-
id2: note.class,
|
|
326
|
-
relation: {
|
|
327
|
-
type1: "none",
|
|
328
|
-
type2: "none",
|
|
329
|
-
lineType: 10
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
"DEFAULT"
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
(0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__/* .layout */ .Zp)(g);
|
|
338
|
-
g.nodes().forEach(function(v) {
|
|
339
|
-
if (v !== void 0 && g.node(v) !== void 0) {
|
|
340
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
|
|
341
|
-
root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
|
|
342
|
-
"transform",
|
|
343
|
-
"translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
g.edges().forEach(function(e) {
|
|
348
|
-
if (e !== void 0 && g.edge(e) !== void 0) {
|
|
349
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
|
|
350
|
-
svgDraw_default.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
const svgBounds = diagram2.node().getBBox();
|
|
354
|
-
const width = svgBounds.width + padding * 2;
|
|
355
|
-
const height = svgBounds.height + padding * 2;
|
|
356
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .configureSvgSize */ .a$)(diagram2, height, width, conf.useMaxWidth);
|
|
357
|
-
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
|
|
358
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`viewBox ${vBox}`);
|
|
359
|
-
diagram2.attr("viewBox", vBox);
|
|
360
|
-
}, "draw");
|
|
361
|
-
var classRenderer_default = {
|
|
362
|
-
draw
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
// src/diagrams/class/classDiagram.ts
|
|
366
|
-
var diagram = {
|
|
367
|
-
parser: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDiagram_default */ ._$,
|
|
368
|
-
db: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDb_default */ .z2,
|
|
369
|
-
renderer: classRenderer_default,
|
|
370
|
-
styles: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .styles_default */ .tM,
|
|
371
|
-
init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
|
|
372
|
-
if (!cnf.class) {
|
|
373
|
-
cnf.class = {};
|
|
374
|
-
}
|
|
375
|
-
cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
|
376
|
-
_chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDb_default */ .z2.clear();
|
|
377
|
-
}, "init")
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
/***/ })
|
|
383
|
-
|
|
384
|
-
};
|
|
385
|
-
;
|
|
386
|
-
//# sourceMappingURL=81.node.js.map
|
package/dist/81.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"81.node.js","mappings":";;;;;;;;;;;;;;;;;AAI8B;AAGA;AAOA;;AAE9B;AAC4B;AAC2C;AACT;;AAE9D;AACsC;AACtC;AACA,+BAA+B,qEAAM;AACrC,0CAA0C,qEAAM;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uBAAuB,mDAAI;AAC3B;AACA,GAAG;AACH;AACA,GAAG,QAAQ,qDAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wEAAa;AACnC;AACA;AACA;AACA;AACA;AACA,8BAA8B,wEAAa;AAC3C;AACA;AACA;AACA;AACA,8BAA8B,wEAAa;AAC3C;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gCAAgC,qEAAM;AACtC,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0CAA0C,qEAAM;AAChD;AACA;AACA,8BAA8B,gFAAiB;AAC/C;AACA;AACA,CAAC;AACD,+BAA+B,qEAAM;AACrC,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA,IAAI,8DAAG,uBAAuB,MAAM;AACpC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;AACD,+BAA+B,qEAAM;AACrC,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,qEAAM;AACvC;AACA;AACA;AACA;AACA,CAAC;AACD,oCAAoC,qEAAM;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,2BAA2B,qEAAM;AACjC,eAAe,yEAAS;AACxB;AACA,EAAE,8DAAG;AACL,wBAAwB,yEAAS;AACjC;AACA;AACA,qBAAqB,qDAAM;AAC3B;AACA,6CAA6C,qDAAM,mDAAmD,qDAAM;AAC5G,uCAAuC,GAAG;AAC1C;AACA,gBAAgB,6EAAc;AAC9B;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI,8DAAG,uBAAuB,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;AACH,EAAE,gFAAW;AACb;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE,+EAAgB;AAClB,kBAAkB,uBAAuB,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO;AACpF,EAAE,8DAAG,kBAAkB,KAAK;AAC5B;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,UAAU,+EAAoB;AAC9B,MAAM,0EAAe;AACrB;AACA,UAAU,yEAAc;AACxB,wBAAwB,qEAAM;AAC9B;AACA;AACA;AACA;AACA,IAAI,0EAAe;AACnB,GAAG;AACH;AAGE","sources":["webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-Q73GJZWF.mjs"],"sourcesContent":["import {\n classDb_default,\n classDiagram_default,\n styles_default\n} from \"./chunk-NGC4727B.mjs\";\nimport {\n utils_default\n} from \"./chunk-TLUHKHBO.mjs\";\nimport {\n __name,\n configureSvgSize,\n getConfig2 as getConfig,\n log,\n parseGenericTypes\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/diagrams/class/classRenderer.js\nimport { select } from \"d3\";\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/diagrams/class/svgDraw.js\nimport { line, curveBasis } from \"d3\";\nvar edgeCount = 0;\nvar drawEdge = /* @__PURE__ */ __name(function(elem, path, relation, conf, diagObj) {\n const getRelationType = /* @__PURE__ */ __name(function(type) {\n switch (type) {\n case diagObj.db.relationType.AGGREGATION:\n return \"aggregation\";\n case diagObj.db.relationType.EXTENSION:\n return \"extension\";\n case diagObj.db.relationType.COMPOSITION:\n return \"composition\";\n case diagObj.db.relationType.DEPENDENCY:\n return \"dependency\";\n case diagObj.db.relationType.LOLLIPOP:\n return \"lollipop\";\n }\n }, \"getRelationType\");\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n const lineData = path.points;\n const lineFunction = line().x(function(d) {\n return d.x;\n }).y(function(d) {\n return d.y;\n }).curve(curveBasis);\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", \"edge\" + edgeCount).attr(\"class\", \"relation\");\n let url = \"\";\n if (conf.arrowMarkerAbsolute) {\n url = window.location.protocol + \"//\" + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, \"\\\\(\");\n url = url.replace(/\\)/g, \"\\\\)\");\n }\n if (relation.relation.lineType == 1) {\n svgPath.attr(\"class\", \"relation dashed-line\");\n }\n if (relation.relation.lineType == 10) {\n svgPath.attr(\"class\", \"relation dotted-line\");\n }\n if (relation.relation.type1 !== \"none\") {\n svgPath.attr(\n \"marker-start\",\n \"url(\" + url + \"#\" + getRelationType(relation.relation.type1) + \"Start)\"\n );\n }\n if (relation.relation.type2 !== \"none\") {\n svgPath.attr(\n \"marker-end\",\n \"url(\" + url + \"#\" + getRelationType(relation.relation.type2) + \"End)\"\n );\n }\n let x, y;\n const l = path.points.length;\n let labelPosition = utils_default.calcLabelPosition(path.points);\n x = labelPosition.x;\n y = labelPosition.y;\n let p1_card_x, p1_card_y;\n let p2_card_x, p2_card_y;\n if (l % 2 !== 0 && l > 1) {\n let cardinality_1_point = utils_default.calcCardinalityPosition(\n relation.relation.type1 !== \"none\",\n path.points,\n path.points[0]\n );\n let cardinality_2_point = utils_default.calcCardinalityPosition(\n relation.relation.type2 !== \"none\",\n path.points,\n path.points[l - 1]\n );\n log.debug(\"cardinality_1_point \" + JSON.stringify(cardinality_1_point));\n log.debug(\"cardinality_2_point \" + JSON.stringify(cardinality_2_point));\n p1_card_x = cardinality_1_point.x;\n p1_card_y = cardinality_1_point.y;\n p2_card_x = cardinality_2_point.x;\n p2_card_y = cardinality_2_point.y;\n }\n if (relation.title !== void 0) {\n const g = elem.append(\"g\").attr(\"class\", \"classLabel\");\n const label = g.append(\"text\").attr(\"class\", \"label\").attr(\"x\", x).attr(\"y\", y).attr(\"fill\", \"red\").attr(\"text-anchor\", \"middle\").text(relation.title);\n window.label = label;\n const bounds = label.node().getBBox();\n g.insert(\"rect\", \":first-child\").attr(\"class\", \"box\").attr(\"x\", bounds.x - conf.padding / 2).attr(\"y\", bounds.y - conf.padding / 2).attr(\"width\", bounds.width + conf.padding).attr(\"height\", bounds.height + conf.padding);\n }\n log.info(\"Rendering relation \" + JSON.stringify(relation));\n if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== \"none\") {\n const g = elem.append(\"g\").attr(\"class\", \"cardinality\");\n g.append(\"text\").attr(\"class\", \"type1\").attr(\"x\", p1_card_x).attr(\"y\", p1_card_y).attr(\"fill\", \"black\").attr(\"font-size\", \"6\").text(relation.relationTitle1);\n }\n if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== \"none\") {\n const g = elem.append(\"g\").attr(\"class\", \"cardinality\");\n g.append(\"text\").attr(\"class\", \"type2\").attr(\"x\", p2_card_x).attr(\"y\", p2_card_y).attr(\"fill\", \"black\").attr(\"font-size\", \"6\").text(relation.relationTitle2);\n }\n edgeCount++;\n}, \"drawEdge\");\nvar drawClass = /* @__PURE__ */ __name(function(elem, classDef, conf, diagObj) {\n log.debug(\"Rendering class \", classDef, conf);\n const id = classDef.id;\n const classInfo = {\n id,\n label: classDef.id,\n width: 0,\n height: 0\n };\n const g = elem.append(\"g\").attr(\"id\", diagObj.db.lookUpDomId(id)).attr(\"class\", \"classGroup\");\n let title;\n if (classDef.link) {\n title = g.append(\"svg:a\").attr(\"xlink:href\", classDef.link).attr(\"target\", classDef.linkTarget).append(\"text\").attr(\"y\", conf.textHeight + conf.padding).attr(\"x\", 0);\n } else {\n title = g.append(\"text\").attr(\"y\", conf.textHeight + conf.padding).attr(\"x\", 0);\n }\n let isFirst = true;\n classDef.annotations.forEach(function(member) {\n const titleText2 = title.append(\"tspan\").text(\"\\xAB\" + member + \"\\xBB\");\n if (!isFirst) {\n titleText2.attr(\"dy\", conf.textHeight);\n }\n isFirst = false;\n });\n let classTitleString = getClassTitleString(classDef);\n const classTitle = title.append(\"tspan\").text(classTitleString).attr(\"class\", \"title\");\n if (!isFirst) {\n classTitle.attr(\"dy\", conf.textHeight);\n }\n const titleHeight = title.node().getBBox().height;\n let membersLine;\n let membersBox;\n let methodsLine;\n if (classDef.members.length > 0) {\n membersLine = g.append(\"line\").attr(\"x1\", 0).attr(\"y1\", conf.padding + titleHeight + conf.dividerMargin / 2).attr(\"y2\", conf.padding + titleHeight + conf.dividerMargin / 2);\n const members = g.append(\"text\").attr(\"x\", conf.padding).attr(\"y\", titleHeight + conf.dividerMargin + conf.textHeight).attr(\"fill\", \"white\").attr(\"class\", \"classText\");\n isFirst = true;\n classDef.members.forEach(function(member) {\n addTspan(members, member, isFirst, conf);\n isFirst = false;\n });\n membersBox = members.node().getBBox();\n }\n if (classDef.methods.length > 0) {\n methodsLine = g.append(\"line\").attr(\"x1\", 0).attr(\"y1\", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr(\"y2\", conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n const methods = g.append(\"text\").attr(\"x\", conf.padding).attr(\"y\", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr(\"fill\", \"white\").attr(\"class\", \"classText\");\n isFirst = true;\n classDef.methods.forEach(function(method) {\n addTspan(methods, method, isFirst, conf);\n isFirst = false;\n });\n }\n const classBox = g.node().getBBox();\n var cssClassStr = \" \";\n if (classDef.cssClasses.length > 0) {\n cssClassStr = cssClassStr + classDef.cssClasses.join(\" \");\n }\n const rect = g.insert(\"rect\", \":first-child\").attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", classBox.width + 2 * conf.padding).attr(\"height\", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr(\"class\", cssClassStr);\n const rectWidth = rect.node().getBBox().width;\n title.node().childNodes.forEach(function(x) {\n x.setAttribute(\"x\", (rectWidth - x.getBBox().width) / 2);\n });\n if (classDef.tooltip) {\n title.insert(\"title\").text(classDef.tooltip);\n }\n if (membersLine) {\n membersLine.attr(\"x2\", rectWidth);\n }\n if (methodsLine) {\n methodsLine.attr(\"x2\", rectWidth);\n }\n classInfo.width = rectWidth;\n classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n return classInfo;\n}, \"drawClass\");\nvar getClassTitleString = /* @__PURE__ */ __name(function(classDef) {\n let classTitleString = classDef.id;\n if (classDef.type) {\n classTitleString += \"<\" + parseGenericTypes(classDef.type) + \">\";\n }\n return classTitleString;\n}, \"getClassTitleString\");\nvar drawNote = /* @__PURE__ */ __name(function(elem, note, conf, _diagObj) {\n log.debug(\"Rendering note \", note, conf);\n const id = note.id;\n const noteInfo = {\n id,\n text: note.text,\n width: 0,\n height: 0\n };\n const g = elem.append(\"g\").attr(\"id\", id).attr(\"class\", \"classGroup\");\n let text = g.append(\"text\").attr(\"y\", conf.textHeight + conf.padding).attr(\"x\", 0);\n const lines = JSON.parse(`\"${note.text}\"`).split(\"\\n\");\n lines.forEach(function(line2) {\n log.debug(`Adding line: ${line2}`);\n text.append(\"tspan\").text(line2).attr(\"class\", \"title\").attr(\"dy\", conf.textHeight);\n });\n const noteBox = g.node().getBBox();\n const rect = g.insert(\"rect\", \":first-child\").attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", noteBox.width + 2 * conf.padding).attr(\n \"height\",\n noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin\n );\n const rectWidth = rect.node().getBBox().width;\n text.node().childNodes.forEach(function(x) {\n x.setAttribute(\"x\", (rectWidth - x.getBBox().width) / 2);\n });\n noteInfo.width = rectWidth;\n noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;\n return noteInfo;\n}, \"drawNote\");\nvar addTspan = /* @__PURE__ */ __name(function(textEl, member, isFirst, conf) {\n const { displayText, cssStyle } = member.getDisplayDetails();\n const tSpan = textEl.append(\"tspan\").attr(\"x\", conf.padding).text(displayText);\n if (cssStyle !== \"\") {\n tSpan.attr(\"style\", member.cssStyle);\n }\n if (!isFirst) {\n tSpan.attr(\"dy\", conf.textHeight);\n }\n}, \"addTspan\");\nvar svgDraw_default = {\n getClassTitleString,\n drawClass,\n drawEdge,\n drawNote\n};\n\n// src/diagrams/class/classRenderer.js\nvar idCache = {};\nvar padding = 20;\nvar getGraphId = /* @__PURE__ */ __name(function(label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n if (foundEntry) {\n return foundEntry[0];\n }\n}, \"getGraphId\");\nvar insertMarkers = /* @__PURE__ */ __name(function(elem) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"extensionStart\").attr(\"class\", \"extension\").attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,7 L18,13 V 1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"extensionEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 V 13 L18,7 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"compositionStart\").attr(\"class\", \"extension\").attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"compositionEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"aggregationStart\").attr(\"class\", \"extension\").attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"aggregationEnd\").attr(\"refX\", 19).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"dependencyStart\").attr(\"class\", \"extension\").attr(\"refX\", 0).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 5,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", \"dependencyEnd\").attr(\"refX\", 19).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\");\n}, \"insertMarkers\");\nvar draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n log.info(\"Rendering diagram \" + text);\n const securityLevel = getConfig().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n const diagram2 = root.select(`[id='${id}']`);\n insertMarkers(diagram2);\n const g = new graphlib.Graph({\n multigraph: true\n });\n g.setGraph({\n isMultiGraph: true\n });\n g.setDefaultEdgeLabel(function() {\n return {};\n });\n const classes = diagObj.db.getClasses();\n const keys = [...classes.keys()];\n for (const key of keys) {\n const classDef = classes.get(key);\n const node = svgDraw_default.drawClass(diagram2, classDef, conf, diagObj);\n idCache[node.id] = node;\n g.setNode(node.id, node);\n log.info(\"Org height: \" + node.height);\n }\n const relations = diagObj.db.getRelations();\n relations.forEach(function(relation) {\n log.info(\n // cspell:ignore tjoho\n \"tjoho\" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)\n );\n g.setEdge(\n getGraphId(relation.id1),\n getGraphId(relation.id2),\n {\n relation\n },\n relation.title || \"DEFAULT\"\n );\n });\n const notes = diagObj.db.getNotes();\n notes.forEach(function(note) {\n log.debug(`Adding note: ${JSON.stringify(note)}`);\n const node = svgDraw_default.drawNote(diagram2, note, conf, diagObj);\n idCache[node.id] = node;\n g.setNode(node.id, node);\n if (note.class && classes.has(note.class)) {\n g.setEdge(\n note.id,\n getGraphId(note.class),\n {\n relation: {\n id1: note.id,\n id2: note.class,\n relation: {\n type1: \"none\",\n type2: \"none\",\n lineType: 10\n }\n }\n },\n \"DEFAULT\"\n );\n }\n });\n dagreLayout(g);\n g.nodes().forEach(function(v) {\n if (v !== void 0 && g.node(v) !== void 0) {\n log.debug(\"Node \" + v + \": \" + JSON.stringify(g.node(v)));\n root.select(\"#\" + (diagObj.db.lookUpDomId(v) || v)).attr(\n \"transform\",\n \"translate(\" + (g.node(v).x - g.node(v).width / 2) + \",\" + (g.node(v).y - g.node(v).height / 2) + \" )\"\n );\n }\n });\n g.edges().forEach(function(e) {\n if (e !== void 0 && g.edge(e) !== void 0) {\n log.debug(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(g.edge(e)));\n svgDraw_default.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);\n }\n });\n const svgBounds = diagram2.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n configureSvgSize(diagram2, height, width, conf.useMaxWidth);\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n diagram2.attr(\"viewBox\", vBox);\n}, \"draw\");\nvar classRenderer_default = {\n draw\n};\n\n// src/diagrams/class/classDiagram.ts\nvar diagram = {\n parser: classDiagram_default,\n db: classDb_default,\n renderer: classRenderer_default,\n styles: styles_default,\n init: /* @__PURE__ */ __name((cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classDb_default.clear();\n }, \"init\")\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|