@layers-app/editor 0.6.12 → 0.6.14
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/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/{layers.BGSz0UAv.js → layers.0-Yx8pnu.js} +1 -1
- package/dist/{layers.VOsMyo52.js → layers.14dx7-g7.js} +1 -1
- package/dist/{layers.Dcy5bS57.js → layers.1EWOHSqi.js} +1 -1
- package/dist/{layers.B_p6fAU4.js → layers.1_3Sv53g.js} +1 -1
- package/dist/{layers.C1e8lMpo.js → layers.1ouaEbyi.js} +1 -1
- package/dist/{layers.NST40c_L.js → layers.2JSCbXo9.js} +2 -2
- package/dist/{layers.y2zRsvEB.js → layers.2czEVRnd.js} +1 -1
- package/dist/{layers.Df0zv_Ji.js → layers.5-c3ZImz.js} +1 -1
- package/dist/{layers.BG3v8xd6.js → layers.7MXWLWgJ.js} +1 -1
- package/dist/{layers.DPbDiJNh.js → layers.8uaGnlJu.js} +1 -1
- package/dist/{layers.BlTDQIPs.js → layers.B1nQY6gR.js} +1 -1
- package/dist/{layers.C793otAS.js → layers.B3X3fo4j.js} +1 -1
- package/dist/{layers.DarGy8TQ.js → layers.B5ByFSSj.js} +1 -1
- package/dist/{layers.BFPwmK9Q.js → layers.B6DB7SRG.js} +4 -4
- package/dist/{layers.CL5QatTw.js → layers.B6K7WtWk.js} +1 -1
- package/dist/{layers.CTcbG2LE.js → layers.B6lPpwe_.js} +3 -3
- package/dist/{layers.B275ca4r.js → layers.B6lkoDyy.js} +4 -4
- package/dist/{layers.eEB_NdPF.js → layers.B7L4dR9E.js} +1 -1
- package/dist/{layers.8H22mmaB.js → layers.BA7QQSHh.js} +1 -1
- package/dist/{layers.BXhKRBJd.js → layers.BBLcOW05.js} +1 -1
- package/dist/{layers.CPolGtQi.js → layers.BCxtSMqe.js} +1 -1
- package/dist/layers.BDenr5Vg.js +1 -0
- package/dist/{layers.DCSFy_Zd.js → layers.BHeBjt7r.js} +1 -1
- package/dist/{layers.CI9_itqp.js → layers.BJaGYsQi.js} +7 -7
- package/dist/{layers.Cv7AFtmM.js → layers.BMSbrFCy.js} +1 -1
- package/dist/{layers.w1Cu9TLW.js → layers.BOFvu8lW.js} +1 -1
- package/dist/{layers.C5Rfm_WD.js → layers.BO_MjYGw.js} +3 -3
- package/dist/{layers.DrIDOT_7.js → layers.BQM9Rpzg.js} +1 -1
- package/dist/{layers.Dq2aODR7.js → layers.BQWihUkz.js} +1 -1
- package/dist/{layers.Bj3ofYIO.js → layers.BSE9EUi2.js} +2 -2
- package/dist/{layers.YavB8BnN.js → layers.BU-7QD9A.js} +1 -1
- package/dist/{layers.DLZvrreu.js → layers.BV5qc-bA.js} +1 -1
- package/dist/{layers.l4seUM0_.js → layers.BXKs5bTy.js} +1 -1
- package/dist/{layers.DOwZW8w7.js → layers.B_Uvi5J9.js} +1 -1
- package/dist/{layers.B6UQ2Liy.js → layers.BaOPhL0t.js} +1 -1
- package/dist/{layers.D1apeFex.js → layers.Ba_OZSBe.js} +1 -1
- package/dist/{layers.8hRz_UBo.js → layers.BakA__GA.js} +6 -6
- package/dist/{layers.Cb8ou-xZ.js → layers.BcPfcpYL.js} +1 -1
- package/dist/{layers.xZ8NkG8_.js → layers.BcYD30ao.js} +1 -1
- package/dist/{layers.C9vOkabN.js → layers.BdrcBmVp.js} +1 -1
- package/dist/{layers.CJGx6dyj.js → layers.Bg-cdZ2N.js} +1 -1
- package/dist/{layers.CbZCR_Gc.js → layers.Bg4Xa4Rn.js} +1 -1
- package/dist/{layers.BHQwUfdc.js → layers.BgCAcoj3.js} +1 -1
- package/dist/{layers.BHnLDHIN.js → layers.Bi7fd1lv.js} +1 -1
- package/dist/{layers.DKPeynF_.js → layers.BizS4eLu.js} +1 -1
- package/dist/{layers.CVRmH6p1.js → layers.BjKzZuc9.js} +1 -1
- package/dist/{layers.D0mVb6fZ.js → layers.Bjo0VA8_.js} +1 -1
- package/dist/{layers.DrdLkC4h.js → layers.Bjrk6tRA.js} +1 -1
- package/dist/{layers.DjwQTyPC.js → layers.BlS96d0x.js} +1 -1
- package/dist/{layers.DCbyLIgW.js → layers.BnEKcjJN.js} +1 -1
- package/dist/{layers.B3EKvrjh.js → layers.BnPfd2TG.js} +1 -1
- package/dist/{layers.CxniP0Pt.js → layers.BnyIp8SJ.js} +8 -8
- package/dist/{layers.DkRUKWov.js → layers.Bo3qGkdP.js} +4 -4
- package/dist/{layers.JJWnDD_L.js → layers.BoVhp9l-.js} +1 -1
- package/dist/{layers.Dv1LuVJo.js → layers.BopXs9i5.js} +1 -1
- package/dist/{layers.Dl_pXgO-.js → layers.Br-Jc8KA.js} +1 -1
- package/dist/{layers.BA-Oy94F.js → layers.BsVx1jjp.js} +1 -1
- package/dist/{layers.fXQrQDHf.js → layers.BtBKGDpo.js} +1 -1
- package/dist/{layers.CM6Cn1GM.js → layers.BtI3FauJ.js} +1 -1
- package/dist/{layers.CvThaGVx.js → layers.BtLz4NMl.js} +4 -4
- package/dist/{layers.fWHEokSi.js → layers.BtQd71ou.js} +1 -1
- package/dist/{layers.DtWOXRBo.js → layers.Bu2qG5Rb.js} +1 -1
- package/dist/{layers.C0zRuUrl.js → layers.Bvfud2a1.js} +1 -1
- package/dist/{layers.DfPELy32.js → layers.BvliExc1.js} +1 -1
- package/dist/{layers.Cart3Yzy.js → layers.BwpdbFr7.js} +3 -3
- package/dist/{layers.CXfbbYRW.js → layers.Bxtlu7TW.js} +3 -3
- package/dist/{layers.DItPG3qm.js → layers.ByMZpozJ.js} +1 -1
- package/dist/{layers.B33llMDX.js → layers.C-0mV4is.js} +1 -1
- package/dist/{layers.ByBI_Xl-.js → layers.C-jgG5v8.js} +4 -4
- package/dist/{layers.ANuCMYkc.js → layers.C-tWFK6s.js} +1 -1
- package/dist/{layers.C0QEdSxK.js → layers.C05ewFgZ.js} +1 -1
- package/dist/{layers.W9Dk12Na.js → layers.C0JRxjIq.js} +1 -1
- package/dist/{layers.9USc5Liz.js → layers.C0cPlxKM.js} +45 -45
- package/dist/{layers.DLXGZbAZ.js → layers.C1XX454B.js} +1 -1
- package/dist/{layers.q7FdMNUz.js → layers.C1h-kT0P.js} +2 -2
- package/dist/{layers.DeeKEYGM.js → layers.C3H0kr06.js} +1 -1
- package/dist/{layers.CEEVA-_O.js → layers.C58rf1Bp.js} +4 -4
- package/dist/{layers.CTvqq__0.js → layers.C6pjcXyR.js} +3 -3
- package/dist/{layers.B_qgiyCE.js → layers.C6vLqf_V.js} +1 -1
- package/dist/{layers.oYHG7Cxj.js → layers.C7_Qhuzw.js} +3 -3
- package/dist/{layers.CKHGoaJv.js → layers.C7d6dTZd.js} +4 -4
- package/dist/{layers.uJktGP2d.js → layers.C7pWaJzb.js} +1 -1
- package/dist/{layers.49JPVJQS.js → layers.C81ty4YB.js} +1 -1
- package/dist/{layers.AHl419DM.js → layers.C9tIOsYN.js} +2 -2
- package/dist/layers.CCfAnh4R.js +1 -0
- package/dist/{layers.Co0g1Mdo.js → layers.CCfyN4aj.js} +1 -1
- package/dist/{layers.BSlfjYzq.js → layers.CF5xTg8b.js} +1 -1
- package/dist/{layers.CmOe1I3f.js → layers.CFW5IhJL.js} +1 -1
- package/dist/{layers.Dw7Ecutz.js → layers.CHrmWcfj.js} +1 -1
- package/dist/{layers.5ptCthOw.js → layers.CJNdZMvP.js} +1 -1
- package/dist/{layers.DaM1WLDq.js → layers.CJwmAUIr.js} +1 -1
- package/dist/{layers.BsB87iDN.js → layers.CLL_snFh.js} +1 -1
- package/dist/{layers.BtVZOlO1.js → layers.CLSVPYyY.js} +1 -1
- package/dist/{layers.DRFdpeKN.js → layers.CLX75kbe.js} +1 -1
- package/dist/{layers.B7X0SC5i.js → layers.CPrHlB2Z.js} +1 -1
- package/dist/{layers.BpCnhAxf.js → layers.CSbo9deI.js} +1 -1
- package/dist/{layers.D0hzW66r.js → layers.CUSJhTyr.js} +1 -1
- package/dist/{layers.DWJR6Wa-.js → layers.CV_HRzEz.js} +1 -1
- package/dist/{layers.BCEeZy4J.js → layers.CWXjON7U.js} +1 -1
- package/dist/{layers.BfNLOew5.js → layers.CWxOj4U3.js} +1 -1
- package/dist/{layers.DatJzVJ8.js → layers.CXEIqJx3.js} +1 -1
- package/dist/{layers.DuVdrT5J.js → layers.CXf1M0oH.js} +1 -1
- package/dist/{layers.C_a964jH.js → layers.CXyq9f36.js} +1 -1
- package/dist/{layers.CKqvUqMx.js → layers.CYcJESU4.js} +1 -1
- package/dist/{layers.hsQAX_rs.js → layers.CYfoqjd_.js} +5 -5
- package/dist/{layers.CXOdEDjL.js → layers.CYiwa4an.js} +1 -1
- package/dist/{layers.DoQhxx0E.js → layers.C_uq4Gqc.js} +1 -1
- package/dist/{layers.Us6Eu1l6.js → layers.CaSkYgKR.js} +1 -1
- package/dist/{layers.BUXXUUzT.js → layers.CbHKDdQD.js} +1 -1
- package/dist/{layers.Bxc82hrw.js → layers.CgUAEOR6.js} +1 -1
- package/dist/{layers.CwAmNqcn.js → layers.CgtxYweM.js} +1 -1
- package/dist/{layers.B-3Qcrdo.js → layers.ClUKdp1n.js} +1 -1
- package/dist/{layers.DhhPiORN.js → layers.CoESF-Xw.js} +24 -24
- package/dist/{layers.rEwqj2nq.js → layers.Cp-T14P-.js} +1 -1
- package/dist/{layers.YhP3BBq0.js → layers.Cst83O7D.js} +1 -1
- package/dist/{layers.C4BqHwg6.js → layers.CtxXOemF.js} +1 -1
- package/dist/{layers.BxWQIB9U.js → layers.CvE2GjMG.js} +3 -3
- package/dist/{layers.CZi_7Fed.js → layers.CvbWNRei.js} +1 -1
- package/dist/{layers.CuBdfFUc.js → layers.CvdC-k_q.js} +1 -1
- package/dist/{layers.B12OkxTL.js → layers.CvqxXvbr.js} +2 -2
- package/dist/{layers.Dhopixil.js → layers.CwOool-4.js} +1 -1
- package/dist/{layers.hpp_ncdK.js → layers.CwYJNO3E.js} +1 -1
- package/dist/{layers.BS36nkf6.js → layers.Cx0XmLyP.js} +1023 -1019
- package/dist/{layers.CgaMfri2.js → layers.CzKzBgSJ.js} +1 -1
- package/dist/{layers.ChXJtYy2.js → layers.CzOECBHf.js} +1 -1
- package/dist/{layers.CmfTsj5t.js → layers.D0WDnpXs.js} +1 -1
- package/dist/{layers.3j2iMIIO.js → layers.D0YkQkkN.js} +1 -1
- package/dist/{layers.FzkexOVE.js → layers.D1IOqtO7.js} +2 -2
- package/dist/{layers.T5ufLcV9.js → layers.D6B-k9V_.js} +1 -1
- package/dist/{layers.dpgQlyAu.js → layers.D7onemsC.js} +1 -1
- package/dist/{layers.NT6hO7Ed.js → layers.D8gEk5jQ.js} +1 -1
- package/dist/{layers.ahTBGsK1.js → layers.D8se0b9M.js} +1 -1
- package/dist/{layers.2Enhhgvz.js → layers.D9YIWt2l.js} +1 -1
- package/dist/{layers.Chlm7apJ.js → layers.DA1Bkx5_.js} +1 -1
- package/dist/{layers.BZlPCZCS.js → layers.DCs1xA3B.js} +1 -1
- package/dist/{layers.CEjckt59.js → layers.DFKvN7xr.js} +1 -1
- package/dist/{layers.2FQACMvC.js → layers.DG3VOQCO.js} +1 -1
- package/dist/{layers.C_0KdEby.js → layers.DIDdasGr.js} +1 -1
- package/dist/{layers.Jcl8ldNS.js → layers.DJZWHhoM.js} +1 -1
- package/dist/{layers.2Rr6VxQF.js → layers.DK9f8MGp.js} +1 -1
- package/dist/{layers.DfIy41B9.js → layers.DKtO75sh.js} +1 -1
- package/dist/{layers.Db2sVDwZ.js → layers.DL-x6jRC.js} +1 -1
- package/dist/{layers.CqSYb7mD.js → layers.DM6wTVmw.js} +1 -1
- package/dist/{layers.DcOzGm2G.js → layers.DP7w6y7k.js} +1 -1
- package/dist/{layers.C3C-YazA.js → layers.DPlohdqD.js} +1 -1
- package/dist/{layers.ufQdj3cO.js → layers.DR3LoGAJ.js} +1 -1
- package/dist/{layers.nV72ZeA6.js → layers.DRHJjGOb.js} +3 -3
- package/dist/{layers.Zlgpxr1-.js → layers.DS9cXuKq.js} +1 -1
- package/dist/{layers.rdcCCtbb.js → layers.DUquLtZi.js} +1 -1
- package/dist/{layers.C2JXBHLn.js → layers.DVT9oVqt.js} +1 -1
- package/dist/{layers.CBh_1soU.js → layers.DWTKV81K.js} +1 -1
- package/dist/{layers.o5U0V624.js → layers.DXTh5Mq0.js} +1 -1
- package/dist/{layers.BDLWMiyi.js → layers.DZ67ujt7.js} +3 -3
- package/dist/{layers.RyzPh49f.js → layers.Db1ILUnF.js} +1 -1
- package/dist/{layers.BllC7nBV.js → layers.DdkhtLFW.js} +1 -1
- package/dist/{layers.jfFIYkfp.js → layers.Df-Azbsi.js} +1 -1
- package/dist/{layers.BIcGu0I7.js → layers.Dg2l6TxQ.js} +1 -1
- package/dist/{layers.Dye5RdeS.js → layers.Dg4lpal5.js} +4 -4
- package/dist/{layers.BtGGiBR5.js → layers.DhmW5ieA.js} +1 -1
- package/dist/{layers.DRmsM4H_.js → layers.DjsDr0QD.js} +1 -1
- package/dist/{layers.BR6bZQzc.js → layers.Dktt2dKS.js} +3 -3
- package/dist/{layers.wRgfwD-R.js → layers.DlEUIWap.js} +1 -1
- package/dist/{layers.BPYQwzv5.js → layers.Dm6kqvX9.js} +1 -1
- package/dist/{layers.BiQnKwtW.js → layers.Dmtq_co_.js} +1 -1
- package/dist/{layers.Cqj81DTu.js → layers.DodSCuZv.js} +1 -1
- package/dist/{layers.DfPcLToa.js → layers.Dp3QVUZY.js} +1 -1
- package/dist/{layers.BR_YCjPd.js → layers.Dqh7oFIX.js} +1 -1
- package/dist/{layers.DCjlq0L6.js → layers.Dqy1FAd7.js} +3 -3
- package/dist/{layers.BeeYPDiW.js → layers.DsUUmP6N.js} +1 -1
- package/dist/{layers.CcUxLVXV.js → layers.Du1kfndR.js} +1 -1
- package/dist/{layers.jJdN0wwE.js → layers.Du8lzn1F.js} +3 -3
- package/dist/{layers.B7HJjkuE.js → layers.Dy3pfbPd.js} +1 -1
- package/dist/{layers.tPx7__mo.js → layers.Dz9Cicez.js} +1 -1
- package/dist/{layers.dLMd1YGm.js → layers.EHEj681Z.js} +1 -1
- package/dist/{layers.BDqYXter.js → layers.Fyam0lGB.js} +1 -1
- package/dist/{layers.DzGZUgYW.js → layers.Gpp6cVHw.js} +4 -4
- package/dist/layers.HCb_K2Ym.js +8 -0
- package/dist/layers.JPDLhSnE.js +6 -0
- package/dist/{layers.sYdbDIEL.js → layers.MTy4E8SB.js} +1 -1
- package/dist/{layers.B4S66yVM.js → layers.QiOLSB-v.js} +1 -1
- package/dist/{layers.CJcFPtPB.js → layers.TOszacvV.js} +1 -1
- package/dist/{layers.CUvPxnM9.js → layers.Vv7W8EUK.js} +1 -1
- package/dist/{layers.EmwadzfJ.js → layers.YQLrJ5pg.js} +2 -2
- package/dist/{layers.Cvg2TSkK.js → layers.ZzweqwiO.js} +1 -1
- package/dist/{layers.CVWizJK2.js → layers._h5vjoRa.js} +1 -1
- package/dist/{layers.DSArWpN_.js → layers.bfXiaoPZ.js} +1 -1
- package/dist/{layers.DUQ_frUk.js → layers.eMeIyQqm.js} +1 -1
- package/dist/{layers.CumeN-sD.js → layers.edt_iNTK.js} +1 -1
- package/dist/{layers.CR3hp3I4.js → layers.eeJGywZ-.js} +1 -1
- package/dist/{layers.D1RmYivV.js → layers.efhIA7BF.js} +1 -1
- package/dist/{layers.CbVEwYIJ.js → layers.fhfhCAqj.js} +1 -1
- package/dist/{layers.BLaxsxEN.js → layers.hcsdejkd.js} +1 -1
- package/dist/{layers.C4joZ3cD.js → layers.htgiZ7Y9.js} +1 -1
- package/dist/{layers.CVN_xz1N.js → layers.hzA6JvMd.js} +1 -1
- package/dist/{layers.WAqjftYb.js → layers.jMrP7Xve.js} +1 -1
- package/dist/{layers.DG-qdQOI.js → layers.kjDyoGwY.js} +5 -5
- package/dist/{layers.Okqgwwc_.js → layers.pCEOadu-.js} +1 -1
- package/dist/{layers.NNlQ-qHM.js → layers.pGTe8gMy.js} +1 -1
- package/dist/{layers.C-SkH1Jh.js → layers.psgvvdjL.js} +1 -1
- package/dist/{layers.piWuM3Ug.js → layers.qhO1RKiF.js} +1 -1
- package/dist/{layers.8FOiq8i4.js → layers.wjQjL6HY.js} +1 -1
- package/dist/{layers.DLcwtZjr.js → layers.xqdkrWon.js} +1 -1
- package/dist/{layers.DNovLFon.js → layers.yDShvfOi.js} +1 -1
- package/dist/{layers.KhjHPvY7.js → layers.yYXopVrb.js} +1 -1
- package/package.json +1 -1
- package/dist/layers.B4btjMgv.js +0 -1
- package/dist/layers.BCOuIUut.js +0 -1
- package/dist/layers.Br_XxMiW.js +0 -6
- package/dist/layers.DOoKALtJ.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const P=require("lodash-es"),J=require("./layers.Cyzu9PKQ.js"),k=require("./layers.BLd2spTm.js"),u=require("./layers.DPbDiJNh.js"),i=require("./layers.jJdN0wwE.js"),j=require("./layers.BG3v8xd6.js");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=G(P);function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:F(e)};return m.isUndefined(e.graph())||(t.value=m.clone(e.graph())),t}function M(e){return m.map(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m.isUndefined(n)||(s.value=n),m.isUndefined(r)||(s.parent=r),s})}function F(e){return m.map(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m.isUndefined(t.name)||(r.name=t.name),m.isUndefined(n)||(r.value=n),r})}let a={},w={},p={};const q=()=>{w={},p={},a={}},X=(e,t)=>(i.log$1.trace("In isDescendant",t," ",e," = ",w[t].includes(e)),!!w[t].includes(e)),_=(e,t)=>(i.log$1.info("Descendants of ",t," is ",w[t]),i.log$1.info("Edge is ",e),e.v===t||e.w===t?!1:w[t]?w[t].includes(e.v)||X(e.v,t)||X(e.w,t)||w[t].includes(e.w):(i.log$1.debug("Tilt, ",t,",not in descendants"),!1)),B=(e,t,n,r)=>{i.log$1.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.log$1.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)B(o,t,n,r);else{const f=t.node(o);i.log$1.info("cp ",o," to ",r," with parent ",e),n.setNode(o,f),r!==t.parent(o)&&(i.log$1.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==r&&o!==e?(i.log$1.debug("Setting parent",o,e),n.setParent(o,e)):(i.log$1.info("In copy ",e,"root",r,"data",t.node(e),r),i.log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==r,"node!==clusterId",o!==e));const g=t.edges(o);i.log$1.debug("Copying Edges",g),g.forEach(d=>{i.log$1.info("Edge",d);const h=t.edge(d.v,d.w,d.name);i.log$1.info("Edge data",h,r);try{_(d,r)?(i.log$1.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.log$1.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.log$1.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch($){i.log$1.error($)}})}i.log$1.debug("Removing node",o),t.removeNode(o)})},D=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)p[s]=e,r=[...r,...D(s,t)];return r},C=(e,t)=>{i.log$1.trace("Searching",e);const n=t.children(e);if(i.log$1.trace("Searching children of id ",e,n),n.length<1)return i.log$1.trace("This is a valid node",e),e;for(const r of n){const s=C(r,t);if(s)return i.log$1.trace("Found replacement for",e," => ",s),s}},S=e=>!a[e]||!a[e].externalConnections?e:a[e]?a[e].id:e,U=(e,t)=>{if(!e||t>10){i.log$1.debug("Opting out, no graph ");return}else i.log$1.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.log$1.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),w[n]=D(n,e),a[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.log$1.debug("Cluster identified",n,w),s.forEach(o=>{if(o.v!==n&&o.w!==n){const f=X(o.v,n),g=X(o.w,n);f^g&&(i.log$1.warn("Edge: ",o," leaves cluster ",n),i.log$1.warn("Descendants of XXX ",n,": ",w[n]),a[n].externalConnections=!0)}})):i.log$1.debug("Not a cluster ",n,w)});for(let n of Object.keys(a)){const r=a[n].id,s=e.parent(r);s!==n&&a[s]&&!a[s].externalConnections&&(a[n].id=s)}e.edges().forEach(function(n){const r=e.edge(n);i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.log$1.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a[n.v]," --- ",a[n.w]),a[n.v]&&a[n.w]&&a[n.v]===a[n.w]){i.log$1.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name);const f=n.w+"---"+n.v;e.setNode(f,{domId:f,id:f,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const g=structuredClone(r),d=structuredClone(r);g.label="",g.arrowTypeEnd="none",d.label="",g.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,f,g,n.name+"-cyclic-special"),e.setEdge(f,o,d,n.name+"-cyclic-special")}else if(a[n.v]||a[n.w]){if(i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const f=e.parent(s);a[f].externalConnections=!0,r.fromCluster=n.v}if(o!==n.w){const f=e.parent(o);a[f].externalConnections=!0,r.toCluster=n.w}i.log$1.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,r,n.name)}}),i.log$1.warn("Adjusted Graph",x(e)),T(e,0),i.log$1.trace(a)},T=(e,t)=>{if(i.log$1.warn("extractor - ",t,x(e),e.children("D")),t>10){i.log$1.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const o=e.children(s);r=r||o.length>0}if(!r){i.log$1.debug("Done, no node has children",e.nodes());return}i.log$1.debug("Nodes = ",n,t);for(const s of n)if(i.log$1.debug("Extracting node",s,a,a[s]&&!a[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!a[s])i.log$1.debug("Not a cluster",s,t);else if(!a[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.log$1.warn("Cluster without external connections, without a parent and with children",s,t);let f=e.graph().rankdir==="TB"?"LR":"TB";a[s]&&a[s].clusterData&&a[s].clusterData.dir&&(f=a[s].clusterData.dir,i.log$1.warn("Fixing dir",a[s].clusterData.dir,f));const g=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.log$1.warn("Old graph before copy",x(e)),B(s,e,g,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:a[s].clusterData,labelText:a[s].labelText,graph:g}),i.log$1.warn("New graph after copy node: (",s,")",x(g)),i.log$1.debug("Old graph after copy",x(e))}else i.log$1.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!a[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.log$1.debug(a);n=e.nodes(),i.log$1.warn("New list of nodes",n);for(const s of n){const o=e.node(s);i.log$1.warn(" Now next level",s,o),o.clusterNode&&T(o.graph,t+1)}},O=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),o=O(e,s);n=[...n,...o]}),n},A=e=>O(e,e.children()),H=(e,t)=>{i.log$1.info("Creating subgraph rect for ",t.id,t);const n=i.getConfig(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),o=i.evaluate(n.flowchart.htmlLabels),f=r.insert("g").attr("class","cluster-label"),g=t.labelType==="markdown"?j.createText(f,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):f.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}const h=0*t.padding,$=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.log$1.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-$).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o?f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+N})`):f.attr("transform",`translate(${t.x}, ${t.y-t.height/2+N})`);const b=s.node().getBBox();return t.width=b.width,t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},V=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(g){return u.intersectRect$1(t,g)},n},z=(e,t)=>{const n=i.getConfig(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),s=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),f=r.append("rect"),g=o.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}d=g.getBBox();const h=0*t.padding,$=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,s.attr("class","outer").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$).attr("width",y+h).attr("height",t.height+h),f.attr("class","inner").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(i.evaluate(n.flowchart.htmlLabels)?5:3)+N})`);const b=s.node().getBBox();return t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},W=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.diff=-t.padding/2,t.intersect=function(g){return u.intersectRect$1(t,g)},n},K={rect:H,roundedWithTitle:z,noteGroup:V,divider:W};let R={};const Q=(e,t)=>{i.log$1.trace("Inserting cluster");const n=t.shape||"rect";R[t.id]=K[n](e,t)},Y=()=>{R={}},L=async(e,t,n,r,s,o)=>{i.log$1.info("Graph in recursive render: XXX",x(t),s);const f=t.graph().rankdir;i.log$1.trace("Dir in recursive render - dir:",f);const g=e.insert("g").attr("class","root");t.nodes()?i.log$1.info("Recursive render XXX",t.nodes()):i.log$1.info("No nodes found for",t),t.edges().length>0&&i.log$1.trace("Recursive edges",t.edge(t.edges()[0]));const d=g.insert("g").attr("class","clusters"),h=g.insert("g").attr("class","edgePaths"),$=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(l){const c=t.node(l);if(s!==void 0){const v=JSON.parse(JSON.stringify(s.clusterData));i.log$1.info("Setting data for cluster XXX (",l,") ",v,s),t.setNode(s.id,v),t.parent(l)||(i.log$1.trace("Setting parent",l,s.id),t.setParent(l,s.id,v))}if(i.log$1.info("(Insert) Node XXX"+l+": "+JSON.stringify(t.node(l))),c&&c.clusterNode){i.log$1.info("Cluster identified",l,c.width,t.node(l));const v=await L(y,c.graph,n,r,t.node(l),o),E=v.elem;u.updateNodeBounds(c,E),c.diff=v.diff||0,i.log$1.info("Node bounds (abc123)",l,c,c.width,c.x,c.y),u.setNodeElem(E,c),i.log$1.warn("Recursive render complete ",E,c)}else t.children(l).length>0?(i.log$1.info("Cluster - the non recursive path XXX",l,c.id,c,t),i.log$1.info(C(c.id,t)),a[c.id]={id:C(c.id,t),node:c}):(i.log$1.info("Node - the non recursive path",l,c.id,c),await u.insertNode(y,t.node(l),f))})),t.edges().forEach(function(l){const c=t.edge(l.v,l.w,l.name);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l)),i.log$1.info("Edge "+l.v+" -> "+l.w+": ",l," ",JSON.stringify(t.edge(l))),i.log$1.info("Fix",a,"ids:",l.v,l.w,"Translating: ",a[l.v],a[l.w]),u.insertEdgeLabel($,c)}),t.edges().forEach(function(l){i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l))}),i.log$1.info("#############################################"),i.log$1.info("### Layout ###"),i.log$1.info("#############################################"),i.log$1.info(t),J.layout(t),i.log$1.info("Graph after layout:",x(t));let N=0;const{subGraphTitleTotalMargin:b}=u.getSubGraphTitleMargins(o);return A(t).forEach(function(l){const c=t.node(l);i.log$1.info("Position "+l+": "+JSON.stringify(t.node(l))),i.log$1.info("Position "+l+": ("+c.x,","+c.y,") width: ",c.width," height: ",c.height),c&&c.clusterNode?(c.y+=b,u.positionNode(c)):t.children(l).length>0?(c.height+=b,Q(d,c),a[c.id].node=c):(c.y+=b/2,u.positionNode(c))}),t.edges().forEach(function(l){const c=t.edge(l);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(c),c),c.points.forEach(E=>E.y+=b/2);const v=u.insertEdge(h,l,c,a,n,t,r);u.positionEdgeLabel(c,v)}),t.nodes().forEach(function(l){const c=t.node(l);i.log$1.info(l,c.type,c.diff),c.type==="group"&&(N=c.diff)}),{elem:g,diff:N}},Z=async(e,t,n,r,s)=>{u.insertMarkers$1(e,n,r,s),u.clear$1(),u.clear(),Y(),q(),i.log$1.warn("Graph at first:",JSON.stringify(x(t))),U(t),i.log$1.warn("Graph after:",JSON.stringify(x(t)));const o=i.getConfig();await L(e,t,r,s,void 0,o)};exports.render=Z;
|
|
1
|
+
"use strict";const P=require("lodash-es"),J=require("./layers.Cyzu9PKQ.js"),k=require("./layers.BLd2spTm.js"),u=require("./layers.8uaGnlJu.js"),i=require("./layers.Du8lzn1F.js"),j=require("./layers.7MXWLWgJ.js");function G(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=G(P);function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:F(e)};return m.isUndefined(e.graph())||(t.value=m.clone(e.graph())),t}function M(e){return m.map(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),s={v:t};return m.isUndefined(n)||(s.value=n),m.isUndefined(r)||(s.parent=r),s})}function F(e){return m.map(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return m.isUndefined(t.name)||(r.name=t.name),m.isUndefined(n)||(r.value=n),r})}let a={},w={},p={};const q=()=>{w={},p={},a={}},X=(e,t)=>(i.log$1.trace("In isDescendant",t," ",e," = ",w[t].includes(e)),!!w[t].includes(e)),_=(e,t)=>(i.log$1.info("Descendants of ",t," is ",w[t]),i.log$1.info("Edge is ",e),e.v===t||e.w===t?!1:w[t]?w[t].includes(e.v)||X(e.v,t)||X(e.w,t)||w[t].includes(e.w):(i.log$1.debug("Tilt, ",t,",not in descendants"),!1)),B=(e,t,n,r)=>{i.log$1.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),i.log$1.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)B(o,t,n,r);else{const f=t.node(o);i.log$1.info("cp ",o," to ",r," with parent ",e),n.setNode(o,f),r!==t.parent(o)&&(i.log$1.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==r&&o!==e?(i.log$1.debug("Setting parent",o,e),n.setParent(o,e)):(i.log$1.info("In copy ",e,"root",r,"data",t.node(e),r),i.log$1.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==r,"node!==clusterId",o!==e));const g=t.edges(o);i.log$1.debug("Copying Edges",g),g.forEach(d=>{i.log$1.info("Edge",d);const h=t.edge(d.v,d.w,d.name);i.log$1.info("Edge data",h,r);try{_(d,r)?(i.log$1.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.log$1.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.log$1.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch($){i.log$1.error($)}})}i.log$1.debug("Removing node",o),t.removeNode(o)})},D=(e,t)=>{const n=t.children(e);let r=[...n];for(const s of n)p[s]=e,r=[...r,...D(s,t)];return r},C=(e,t)=>{i.log$1.trace("Searching",e);const n=t.children(e);if(i.log$1.trace("Searching children of id ",e,n),n.length<1)return i.log$1.trace("This is a valid node",e),e;for(const r of n){const s=C(r,t);if(s)return i.log$1.trace("Found replacement for",e," => ",s),s}},S=e=>!a[e]||!a[e].externalConnections?e:a[e]?a[e].id:e,U=(e,t)=>{if(!e||t>10){i.log$1.debug("Opting out, no graph ");return}else i.log$1.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.log$1.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),w[n]=D(n,e),a[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),s=e.edges();r.length>0?(i.log$1.debug("Cluster identified",n,w),s.forEach(o=>{if(o.v!==n&&o.w!==n){const f=X(o.v,n),g=X(o.w,n);f^g&&(i.log$1.warn("Edge: ",o," leaves cluster ",n),i.log$1.warn("Descendants of XXX ",n,": ",w[n]),a[n].externalConnections=!0)}})):i.log$1.debug("Not a cluster ",n,w)});for(let n of Object.keys(a)){const r=a[n].id,s=e.parent(r);s!==n&&a[s]&&!a[s].externalConnections&&(a[n].id=s)}e.edges().forEach(function(n){const r=e.edge(n);i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.log$1.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.log$1.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a[n.v]," --- ",a[n.w]),a[n.v]&&a[n.w]&&a[n.v]===a[n.w]){i.log$1.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name);const f=n.w+"---"+n.v;e.setNode(f,{domId:f,id:f,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const g=structuredClone(r),d=structuredClone(r);g.label="",g.arrowTypeEnd="none",d.label="",g.fromCluster=n.v,d.toCluster=n.v,e.setEdge(s,f,g,n.name+"-cyclic-special"),e.setEdge(f,o,d,n.name+"-cyclic-special")}else if(a[n.v]||a[n.w]){if(i.log$1.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),s=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){const f=e.parent(s);a[f].externalConnections=!0,r.fromCluster=n.v}if(o!==n.w){const f=e.parent(o);a[f].externalConnections=!0,r.toCluster=n.w}i.log$1.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,r,n.name)}}),i.log$1.warn("Adjusted Graph",x(e)),T(e,0),i.log$1.trace(a)},T=(e,t)=>{if(i.log$1.warn("extractor - ",t,x(e),e.children("D")),t>10){i.log$1.error("Bailing out");return}let n=e.nodes(),r=!1;for(const s of n){const o=e.children(s);r=r||o.length>0}if(!r){i.log$1.debug("Done, no node has children",e.nodes());return}i.log$1.debug("Nodes = ",n,t);for(const s of n)if(i.log$1.debug("Extracting node",s,a,a[s]&&!a[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!a[s])i.log$1.debug("Not a cluster",s,t);else if(!a[s].externalConnections&&e.children(s)&&e.children(s).length>0){i.log$1.warn("Cluster without external connections, without a parent and with children",s,t);let f=e.graph().rankdir==="TB"?"LR":"TB";a[s]&&a[s].clusterData&&a[s].clusterData.dir&&(f=a[s].clusterData.dir,i.log$1.warn("Fixing dir",a[s].clusterData.dir,f));const g=new k.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.log$1.warn("Old graph before copy",x(e)),B(s,e,g,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:a[s].clusterData,labelText:a[s].labelText,graph:g}),i.log$1.warn("New graph after copy node: (",s,")",x(g)),i.log$1.debug("Old graph after copy",x(e))}else i.log$1.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!a[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.log$1.debug(a);n=e.nodes(),i.log$1.warn("New list of nodes",n);for(const s of n){const o=e.node(s);i.log$1.warn(" Now next level",s,o),o.clusterNode&&T(o.graph,t+1)}},O=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const s=e.children(r),o=O(e,s);n=[...n,...o]}),n},A=e=>O(e,e.children()),H=(e,t)=>{i.log$1.info("Creating subgraph rect for ",t.id,t);const n=i.getConfig(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),o=i.evaluate(n.flowchart.htmlLabels),f=r.insert("g").attr("class","cluster-label"),g=t.labelType==="markdown"?j.createText(f,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):f.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}const h=0*t.padding,$=h/2,y=t.width<=d.width+h?d.width+h:t.width;t.width<=d.width+h?t.diff=(d.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,i.log$1.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-y/2).attr("y",t.y-t.height/2-$).attr("width",y).attr("height",t.height+h);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o?f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+N})`):f.attr("transform",`translate(${t.x}, ${t.y-t.height/2+N})`);const b=s.node().getBBox();return t.width=b.width,t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},V=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(g){return u.intersectRect$1(t,g)},n},z=(e,t)=>{const n=i.getConfig(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),s=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),f=r.append("rect"),g=o.node().appendChild(u.createLabel$1(t.labelText,t.labelStyle,void 0,!0));let d=g.getBBox();if(i.evaluate(n.flowchart.htmlLabels)){const l=g.children[0],c=i.select(g);d=l.getBoundingClientRect(),c.attr("width",d.width),c.attr("height",d.height)}d=g.getBBox();const h=0*t.padding,$=h/2,y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(d.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,s.attr("class","outer").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$).attr("width",y+h).attr("height",t.height+h),f.attr("class","inner").attr("x",t.x-y/2-$).attr("y",t.y-t.height/2-$+d.height-1).attr("width",y+h).attr("height",t.height+h-d.height-3);const{subGraphTitleTopMargin:N}=u.getSubGraphTitleMargins(n);o.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2-t.padding/3+(i.evaluate(n.flowchart.htmlLabels)?5:3)+N})`);const b=s.node().getBBox();return t.height=b.height,t.intersect=function(l){return u.intersectRect$1(t,l)},r},W=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const f=r.node().getBBox();return t.width=f.width,t.height=f.height,t.diff=-t.padding/2,t.intersect=function(g){return u.intersectRect$1(t,g)},n},K={rect:H,roundedWithTitle:z,noteGroup:V,divider:W};let R={};const Q=(e,t)=>{i.log$1.trace("Inserting cluster");const n=t.shape||"rect";R[t.id]=K[n](e,t)},Y=()=>{R={}},L=async(e,t,n,r,s,o)=>{i.log$1.info("Graph in recursive render: XXX",x(t),s);const f=t.graph().rankdir;i.log$1.trace("Dir in recursive render - dir:",f);const g=e.insert("g").attr("class","root");t.nodes()?i.log$1.info("Recursive render XXX",t.nodes()):i.log$1.info("No nodes found for",t),t.edges().length>0&&i.log$1.trace("Recursive edges",t.edge(t.edges()[0]));const d=g.insert("g").attr("class","clusters"),h=g.insert("g").attr("class","edgePaths"),$=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(l){const c=t.node(l);if(s!==void 0){const v=JSON.parse(JSON.stringify(s.clusterData));i.log$1.info("Setting data for cluster XXX (",l,") ",v,s),t.setNode(s.id,v),t.parent(l)||(i.log$1.trace("Setting parent",l,s.id),t.setParent(l,s.id,v))}if(i.log$1.info("(Insert) Node XXX"+l+": "+JSON.stringify(t.node(l))),c&&c.clusterNode){i.log$1.info("Cluster identified",l,c.width,t.node(l));const v=await L(y,c.graph,n,r,t.node(l),o),E=v.elem;u.updateNodeBounds(c,E),c.diff=v.diff||0,i.log$1.info("Node bounds (abc123)",l,c,c.width,c.x,c.y),u.setNodeElem(E,c),i.log$1.warn("Recursive render complete ",E,c)}else t.children(l).length>0?(i.log$1.info("Cluster - the non recursive path XXX",l,c.id,c,t),i.log$1.info(C(c.id,t)),a[c.id]={id:C(c.id,t),node:c}):(i.log$1.info("Node - the non recursive path",l,c.id,c),await u.insertNode(y,t.node(l),f))})),t.edges().forEach(function(l){const c=t.edge(l.v,l.w,l.name);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l)),i.log$1.info("Edge "+l.v+" -> "+l.w+": ",l," ",JSON.stringify(t.edge(l))),i.log$1.info("Fix",a,"ids:",l.v,l.w,"Translating: ",a[l.v],a[l.w]),u.insertEdgeLabel($,c)}),t.edges().forEach(function(l){i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(l))}),i.log$1.info("#############################################"),i.log$1.info("### Layout ###"),i.log$1.info("#############################################"),i.log$1.info(t),J.layout(t),i.log$1.info("Graph after layout:",x(t));let N=0;const{subGraphTitleTotalMargin:b}=u.getSubGraphTitleMargins(o);return A(t).forEach(function(l){const c=t.node(l);i.log$1.info("Position "+l+": "+JSON.stringify(t.node(l))),i.log$1.info("Position "+l+": ("+c.x,","+c.y,") width: ",c.width," height: ",c.height),c&&c.clusterNode?(c.y+=b,u.positionNode(c)):t.children(l).length>0?(c.height+=b,Q(d,c),a[c.id].node=c):(c.y+=b/2,u.positionNode(c))}),t.edges().forEach(function(l){const c=t.edge(l);i.log$1.info("Edge "+l.v+" -> "+l.w+": "+JSON.stringify(c),c),c.points.forEach(E=>E.y+=b/2);const v=u.insertEdge(h,l,c,a,n,t,r);u.positionEdgeLabel(c,v)}),t.nodes().forEach(function(l){const c=t.node(l);i.log$1.info(l,c.type,c.diff),c.type==="group"&&(N=c.diff)}),{elem:g,diff:N}},Z=async(e,t,n,r,s)=>{u.insertMarkers$1(e,n,r,s),u.clear$1(),u.clear(),Y(),q(),i.log$1.warn("Graph at first:",JSON.stringify(x(t))),U(t),i.log$1.warn("Graph after:",JSON.stringify(x(t)));const o=i.getConfig();await L(e,t,r,s,void 0,o)};exports.render=Z;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("./layers.jJdN0wwE.js");var Oe=(function(){var e=function(v,u,a,A){for(a=a||{},A=v.length;A--;a[v[A]]=u);return a},i=[1,17],r=[1,18],c=[1,19],o=[1,39],f=[1,40],k=[1,25],D=[1,23],B=[1,24],_=[1,31],Ae=[1,32],fe=[1,33],pe=[1,34],de=[1,35],Ce=[1,36],Ee=[1,26],me=[1,27],ge=[1,28],be=[1,29],C=[1,43],ke=[1,30],E=[1,42],m=[1,44],g=[1,41],T=[1,45],Te=[1,9],l=[1,8,9],z=[1,56],K=[1,57],Y=[1,58],Q=[1,59],j=[1,60],ye=[1,61],Fe=[1,62],X=[1,8,9,39],we=[1,74],P=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],q=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],H=[13,74,80,95,97,98],M=[13,64,65,74,80,95,97,98],Pe=[13,59,60,61,62,63,74,80,95,97,98],De=[1,93],W=[1,110],J=[1,108],Z=[1,102],$=[1,103],ee=[1,104],te=[1,105],se=[1,106],ie=[1,107],ne=[1,109],Be=[1,8,9,37,39,42],ue=[1,8,9,21],Me=[1,8,9,78],S=[1,8,9,21,73,74,78,80,81,82,83,84,85],_e={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:function(u,a,A,n,d,t,G){var s=t.length-1;switch(d){case 8:this.$=t[s-1];break;case 9:case 11:case 12:this.$=t[s];break;case 10:case 13:this.$=t[s-1]+t[s];break;case 14:case 15:this.$=t[s-1]+"~"+t[s]+"~";break;case 16:n.addRelation(t[s]);break;case 17:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 27:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 31:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 32:this.$=t[s],n.addNamespace(t[s]);break;case 33:this.$=[t[s]];break;case 34:this.$=[t[s-1]];break;case 35:t[s].unshift(t[s-2]),this.$=t[s];break;case 37:n.setCssClass(t[s-2],t[s]);break;case 38:n.addMembers(t[s-3],t[s-1]);break;case 39:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 40:this.$=t[s],n.addClass(t[s]);break;case 41:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 42:n.addAnnotation(t[s],t[s-2]);break;case 43:this.$=[t[s]];break;case 44:t[s].push(t[s-1]),this.$=t[s];break;case 45:break;case 46:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 47:break;case 48:break;case 49:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 51:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 52:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 53:n.addNote(t[s],t[s-1]);break;case 54:n.addNote(t[s]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 60:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 61:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 62:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 71:case 77:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 72:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 73:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 74:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 75:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 78:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 79:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 80:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 81:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 82:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 83:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 84:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 85:n.setCssClass(t[s-1],t[s]);break;case 86:this.$=[t[s]];break;case 87:t[s-2].push(t[s]),this.$=t[s-2];break;case 89:this.$=t[s-1]+t[s];break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:i,33:r,35:c,36:21,40:o,41:22,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(Te,[2,5],{8:[1,46]}),{8:[1,47]},e(l,[2,16],{21:[1,48]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),e(l,[2,21]),e(l,[2,22]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),e(l,[2,26]),{32:[1,49]},{34:[1,50]},e(l,[2,29]),e(l,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:z,60:K,61:Y,62:Q,63:j,64:ye,65:Fe}),{37:[1,63]},e(X,[2,36],{37:[1,65],42:[1,64]}),e(l,[2,47]),e(l,[2,48]),{16:66,74:C,80:E,95:m,97:g},{16:37,17:67,18:38,74:C,80:E,95:m,97:g,98:T},{16:37,17:68,18:38,74:C,80:E,95:m,97:g,98:T},{16:37,17:69,18:38,74:C,80:E,95:m,97:g,98:T},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:C,80:E,95:m,97:g,98:T},{13:we,51:73},e(l,[2,55]),e(l,[2,56]),e(l,[2,57]),e(l,[2,58]),e(P,[2,11],{16:37,18:38,17:75,19:[1,76],74:C,80:E,95:m,97:g,98:T}),e(P,[2,12],{19:[1,77]}),{15:78,16:79,74:C,80:E,95:m,97:g},{16:37,17:80,18:38,74:C,80:E,95:m,97:g,98:T},e(q,[2,112]),e(q,[2,113]),e(q,[2,114]),e(q,[2,115]),e([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),e(Te,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:i,33:r,35:c,40:o,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:i,33:r,35:c,36:21,40:o,41:22,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T},e(l,[2,17]),e(l,[2,27]),e(l,[2,28]),{13:[1,84],16:37,17:83,18:38,74:C,80:E,95:m,97:g,98:T},{49:85,57:54,58:55,59:z,60:K,61:Y,62:Q,63:j,64:ye,65:Fe},e(l,[2,46]),{58:86,64:ye,65:Fe},e(H,[2,62],{57:87,59:z,60:K,61:Y,62:Q,63:j}),e(M,[2,63]),e(M,[2,64]),e(M,[2,65]),e(M,[2,66]),e(M,[2,67]),e(Pe,[2,68]),e(Pe,[2,69]),{8:[1,89],23:90,38:88,41:22,44:f},{16:91,74:C,80:E,95:m,97:g},{43:92,47:De},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:W,73:J,74:Z,75:99,77:100,79:101,80:$,81:ee,82:te,83:se,84:ie,85:ne},{74:[1,111]},{13:we,51:112},e(l,[2,54]),e(l,[2,117]),e(P,[2,13]),e(P,[2,14]),e(P,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:C,80:E,95:m,97:g},e(Be,[2,40],{11:114,12:[1,115]}),e(Te,[2,7]),{9:[1,116]},e(ue,[2,49]),{16:37,17:117,18:38,74:C,80:E,95:m,97:g,98:T},{13:[1,119],16:37,17:118,18:38,74:C,80:E,95:m,97:g,98:T},e(H,[2,61],{57:120,59:z,60:K,61:Y,62:Q,63:j}),e(H,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:f},{8:[1,123],39:[2,33]},e(X,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:De},{16:37,17:127,18:38,74:C,80:E,95:m,97:g,98:T},e(l,[2,70],{13:[1,128]}),e(l,[2,72],{13:[1,130],68:[1,129]}),e(l,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},e(l,[2,84],{78:[1,134]}),e(Me,[2,86],{79:135,21:W,73:J,74:Z,80:$,81:ee,82:te,83:se,84:ie,85:ne}),e(S,[2,88]),e(S,[2,90]),e(S,[2,91]),e(S,[2,92]),e(S,[2,93]),e(S,[2,94]),e(S,[2,95]),e(S,[2,96]),e(S,[2,97]),e(S,[2,98]),e(l,[2,85]),e(l,[2,53]),{37:[2,10]},e(Be,[2,41]),{13:[1,136]},{1:[2,4]},e(ue,[2,51]),e(ue,[2,50]),{16:37,17:137,18:38,74:C,80:E,95:m,97:g,98:T},e(H,[2,59]),e(l,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:f},{43:140,47:De},e(X,[2,38]),{39:[2,44]},e(l,[2,42]),e(l,[2,71]),e(l,[2,73]),e(l,[2,74],{68:[1,141]}),e(l,[2,77]),e(l,[2,78],{13:[1,142]}),e(l,[2,80],{13:[1,144],68:[1,143]}),{21:W,73:J,74:Z,77:145,79:101,80:$,81:ee,82:te,83:se,84:ie,85:ne},e(S,[2,89]),{14:[1,146]},e(ue,[2,52]),e(l,[2,31]),{39:[2,35]},{39:[1,147]},e(l,[2,75]),e(l,[2,79]),e(l,[2,81]),e(l,[2,82],{68:[1,148]}),e(Me,[2,87],{79:135,21:W,73:J,74:Z,80:$,81:ee,82:te,83:se,84:ie,85:ne}),e(Be,[2,8]),e(X,[2,39]),e(l,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:function(u,a){if(a.recoverable)this.trace(u);else{var A=new Error(u);throw A.hash=a,A}},parse:function(u){var a=this,A=[0],n=[],d=[null],t=[],G=this.table,s="",re=0,Ge=0,Je=2,Ue=1,Ze=t.slice.call(arguments,1),b=Object.create(this.lexer),O={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(O.yy[Ne]=this.yy[Ne]);b.setInput(u,O.yy),O.yy.lexer=b,O.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Le=b.yylloc;t.push(Le);var $e=b.options&&b.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var L;return L=n.pop()||b.lex()||Ue,typeof L!="number"&&(L instanceof Array&&(n=L,L=n.pop()),L=a.symbols_[L]||L),L}for(var y,I,F,ve,w={},ae,N,ze,ce;;){if(I=A[A.length-1],this.defaultActions[I]?F=this.defaultActions[I]:((y===null||typeof y>"u")&&(y=et()),F=G[I]&&G[I][y]),typeof F>"u"||!F.length||!F[0]){var xe="";ce=[];for(ae in G[I])this.terminals_[ae]&&ae>Je&&ce.push("'"+this.terminals_[ae]+"'");b.showPosition?xe="Parse error on line "+(re+1)+`:
|
|
1
|
+
"use strict";const h=require("./layers.Du8lzn1F.js");var Oe=(function(){var e=function(v,u,a,A){for(a=a||{},A=v.length;A--;a[v[A]]=u);return a},i=[1,17],r=[1,18],c=[1,19],o=[1,39],f=[1,40],k=[1,25],D=[1,23],B=[1,24],_=[1,31],Ae=[1,32],fe=[1,33],pe=[1,34],de=[1,35],Ce=[1,36],Ee=[1,26],me=[1,27],ge=[1,28],be=[1,29],C=[1,43],ke=[1,30],E=[1,42],m=[1,44],g=[1,41],T=[1,45],Te=[1,9],l=[1,8,9],z=[1,56],K=[1,57],Y=[1,58],Q=[1,59],j=[1,60],ye=[1,61],Fe=[1,62],X=[1,8,9,39],we=[1,74],P=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],q=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],H=[13,74,80,95,97,98],M=[13,64,65,74,80,95,97,98],Pe=[13,59,60,61,62,63,74,80,95,97,98],De=[1,93],W=[1,110],J=[1,108],Z=[1,102],$=[1,103],ee=[1,104],te=[1,105],se=[1,106],ie=[1,107],ne=[1,109],Be=[1,8,9,37,39,42],ue=[1,8,9,21],Me=[1,8,9,78],S=[1,8,9,21,73,74,78,80,81,82,83,84,85],_e={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:function(u,a,A,n,d,t,G){var s=t.length-1;switch(d){case 8:this.$=t[s-1];break;case 9:case 11:case 12:this.$=t[s];break;case 10:case 13:this.$=t[s-1]+t[s];break;case 14:case 15:this.$=t[s-1]+"~"+t[s]+"~";break;case 16:n.addRelation(t[s]);break;case 17:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 27:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 31:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 32:this.$=t[s],n.addNamespace(t[s]);break;case 33:this.$=[t[s]];break;case 34:this.$=[t[s-1]];break;case 35:t[s].unshift(t[s-2]),this.$=t[s];break;case 37:n.setCssClass(t[s-2],t[s]);break;case 38:n.addMembers(t[s-3],t[s-1]);break;case 39:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 40:this.$=t[s],n.addClass(t[s]);break;case 41:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 42:n.addAnnotation(t[s],t[s-2]);break;case 43:this.$=[t[s]];break;case 44:t[s].push(t[s-1]),this.$=t[s];break;case 45:break;case 46:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 47:break;case 48:break;case 49:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 51:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 52:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 53:n.addNote(t[s],t[s-1]);break;case 54:n.addNote(t[s]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 60:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 61:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 62:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 71:case 77:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 72:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 73:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 74:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 75:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 78:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 79:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 80:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 81:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 82:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 83:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 84:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 85:n.setCssClass(t[s-1],t[s]);break;case 86:this.$=[t[s]];break;case 87:t[s-2].push(t[s]),this.$=t[s-2];break;case 89:this.$=t[s-1]+t[s];break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:i,33:r,35:c,36:21,40:o,41:22,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(Te,[2,5],{8:[1,46]}),{8:[1,47]},e(l,[2,16],{21:[1,48]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),e(l,[2,21]),e(l,[2,22]),e(l,[2,23]),e(l,[2,24]),e(l,[2,25]),e(l,[2,26]),{32:[1,49]},{34:[1,50]},e(l,[2,29]),e(l,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:z,60:K,61:Y,62:Q,63:j,64:ye,65:Fe}),{37:[1,63]},e(X,[2,36],{37:[1,65],42:[1,64]}),e(l,[2,47]),e(l,[2,48]),{16:66,74:C,80:E,95:m,97:g},{16:37,17:67,18:38,74:C,80:E,95:m,97:g,98:T},{16:37,17:68,18:38,74:C,80:E,95:m,97:g,98:T},{16:37,17:69,18:38,74:C,80:E,95:m,97:g,98:T},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:C,80:E,95:m,97:g,98:T},{13:we,51:73},e(l,[2,55]),e(l,[2,56]),e(l,[2,57]),e(l,[2,58]),e(P,[2,11],{16:37,18:38,17:75,19:[1,76],74:C,80:E,95:m,97:g,98:T}),e(P,[2,12],{19:[1,77]}),{15:78,16:79,74:C,80:E,95:m,97:g},{16:37,17:80,18:38,74:C,80:E,95:m,97:g,98:T},e(q,[2,112]),e(q,[2,113]),e(q,[2,114]),e(q,[2,115]),e([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),e(Te,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:i,33:r,35:c,40:o,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:i,33:r,35:c,36:21,40:o,41:22,44:f,45:k,47:D,48:B,50:_,52:Ae,53:fe,54:pe,55:de,56:Ce,66:Ee,67:me,69:ge,73:be,74:C,76:ke,80:E,95:m,97:g,98:T},e(l,[2,17]),e(l,[2,27]),e(l,[2,28]),{13:[1,84],16:37,17:83,18:38,74:C,80:E,95:m,97:g,98:T},{49:85,57:54,58:55,59:z,60:K,61:Y,62:Q,63:j,64:ye,65:Fe},e(l,[2,46]),{58:86,64:ye,65:Fe},e(H,[2,62],{57:87,59:z,60:K,61:Y,62:Q,63:j}),e(M,[2,63]),e(M,[2,64]),e(M,[2,65]),e(M,[2,66]),e(M,[2,67]),e(Pe,[2,68]),e(Pe,[2,69]),{8:[1,89],23:90,38:88,41:22,44:f},{16:91,74:C,80:E,95:m,97:g},{43:92,47:De},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:W,73:J,74:Z,75:99,77:100,79:101,80:$,81:ee,82:te,83:se,84:ie,85:ne},{74:[1,111]},{13:we,51:112},e(l,[2,54]),e(l,[2,117]),e(P,[2,13]),e(P,[2,14]),e(P,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:C,80:E,95:m,97:g},e(Be,[2,40],{11:114,12:[1,115]}),e(Te,[2,7]),{9:[1,116]},e(ue,[2,49]),{16:37,17:117,18:38,74:C,80:E,95:m,97:g,98:T},{13:[1,119],16:37,17:118,18:38,74:C,80:E,95:m,97:g,98:T},e(H,[2,61],{57:120,59:z,60:K,61:Y,62:Q,63:j}),e(H,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:f},{8:[1,123],39:[2,33]},e(X,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:De},{16:37,17:127,18:38,74:C,80:E,95:m,97:g,98:T},e(l,[2,70],{13:[1,128]}),e(l,[2,72],{13:[1,130],68:[1,129]}),e(l,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},e(l,[2,84],{78:[1,134]}),e(Me,[2,86],{79:135,21:W,73:J,74:Z,80:$,81:ee,82:te,83:se,84:ie,85:ne}),e(S,[2,88]),e(S,[2,90]),e(S,[2,91]),e(S,[2,92]),e(S,[2,93]),e(S,[2,94]),e(S,[2,95]),e(S,[2,96]),e(S,[2,97]),e(S,[2,98]),e(l,[2,85]),e(l,[2,53]),{37:[2,10]},e(Be,[2,41]),{13:[1,136]},{1:[2,4]},e(ue,[2,51]),e(ue,[2,50]),{16:37,17:137,18:38,74:C,80:E,95:m,97:g,98:T},e(H,[2,59]),e(l,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:f},{43:140,47:De},e(X,[2,38]),{39:[2,44]},e(l,[2,42]),e(l,[2,71]),e(l,[2,73]),e(l,[2,74],{68:[1,141]}),e(l,[2,77]),e(l,[2,78],{13:[1,142]}),e(l,[2,80],{13:[1,144],68:[1,143]}),{21:W,73:J,74:Z,77:145,79:101,80:$,81:ee,82:te,83:se,84:ie,85:ne},e(S,[2,89]),{14:[1,146]},e(ue,[2,52]),e(l,[2,31]),{39:[2,35]},{39:[1,147]},e(l,[2,75]),e(l,[2,79]),e(l,[2,81]),e(l,[2,82],{68:[1,148]}),e(Me,[2,87],{79:135,21:W,73:J,74:Z,80:$,81:ee,82:te,83:se,84:ie,85:ne}),e(Be,[2,8]),e(X,[2,39]),e(l,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:function(u,a){if(a.recoverable)this.trace(u);else{var A=new Error(u);throw A.hash=a,A}},parse:function(u){var a=this,A=[0],n=[],d=[null],t=[],G=this.table,s="",re=0,Ge=0,Je=2,Ue=1,Ze=t.slice.call(arguments,1),b=Object.create(this.lexer),O={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(O.yy[Ne]=this.yy[Ne]);b.setInput(u,O.yy),O.yy.lexer=b,O.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Le=b.yylloc;t.push(Le);var $e=b.options&&b.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var L;return L=n.pop()||b.lex()||Ue,typeof L!="number"&&(L instanceof Array&&(n=L,L=n.pop()),L=a.symbols_[L]||L),L}for(var y,I,F,ve,w={},ae,N,ze,ce;;){if(I=A[A.length-1],this.defaultActions[I]?F=this.defaultActions[I]:((y===null||typeof y>"u")&&(y=et()),F=G[I]&&G[I][y]),typeof F>"u"||!F.length||!F[0]){var xe="";ce=[];for(ae in G[I])this.terminals_[ae]&&ae>Je&&ce.push("'"+this.terminals_[ae]+"'");b.showPosition?xe="Parse error on line "+(re+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+ce.join(", ")+", got '"+(this.terminals_[y]||y)+"'":xe="Parse error on line "+(re+1)+": Unexpected "+(y==Ue?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(xe,{text:b.match,token:this.terminals_[y]||y,line:b.yylineno,loc:Le,expected:ce})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+y);switch(F[0]){case 1:A.push(y),d.push(b.yytext),t.push(b.yylloc),A.push(F[1]),y=null,Ge=b.yyleng,s=b.yytext,re=b.yylineno,Le=b.yylloc;break;case 2:if(N=this.productions_[F[1]][1],w.$=d[d.length-N],w._$={first_line:t[t.length-(N||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(N||1)].first_column,last_column:t[t.length-1].last_column},$e&&(w._$.range=[t[t.length-(N||1)].range[0],t[t.length-1].range[1]]),ve=this.performAction.apply(w,[s,Ge,re,O.yy,F[1],d,t].concat(Ze)),typeof ve<"u")return ve;N&&(A=A.slice(0,-1*N*2),d=d.slice(0,-1*N),t=t.slice(0,-1*N)),A.push(this.productions_[F[1]][0]),d.push(w.$),t.push(w._$),ze=G[A[A.length-2]][A[A.length-1]],A.push(ze);break;case 3:return!0}}return!0}},We=(function(){var v={EOF:1,parseError:function(a,A){if(this.yy.parser)this.yy.parser.parseError(a,A);else throw new Error(a)},setInput:function(u,a){return this.yy=a||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var a=u.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},unput:function(u){var a=u.length,A=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===n.length?this.yylloc.first_column:0)+n[n.length-A.length].length-A[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(u){this.unput(this.match.slice(u))},pastInput:function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var u=this.pastInput(),a=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
|