@layers-app/editor 0.7.16 → 0.7.17
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.d.ts +1 -77
- package/dist/index.js +9 -15
- package/dist/{layers.DIpDvY-A.js → layers.04n4wbqY.js} +1 -1
- package/dist/{layers.BvGgfImM.js → layers.0AjqeHO0.js} +7 -7
- package/dist/{layers.mvotlTNZ.js → layers.0YKivPbS.js} +1 -1
- package/dist/{layers.Bny7BWT9.js → layers.0ay1od4k.js} +1 -1
- package/dist/{layers.IbJq0D6U.js → layers.0cCD7Trw.js} +1 -1
- package/dist/{layers.C3SAUwXb.js → layers.192DYlty.js} +1 -1
- package/dist/{layers.Bpnbfq-r.js → layers.1ws9_bfy.js} +1 -1
- package/dist/layers.3NAUDSdp.js +1 -0
- package/dist/{layers.Dk2S8boy.js → layers.41VWy-aG.js} +1 -1
- package/dist/{layers.CpJSdiMb.js → layers.5QVC7kU0.js} +1 -1
- package/dist/{layers.Cd3kGFCJ.js → layers.6IpHt_7d.js} +1 -1
- package/dist/{layers.Vh-KvhZg.js → layers.8CQh8R7p.js} +1 -1
- package/dist/{layers.BL3wEq7M.js → layers.9iKrwzo8.js} +1 -1
- package/dist/{layers.DE6w34F3.js → layers.9p0T4nVw.js} +1 -1
- package/dist/{layers.B1ySJNCM.js → layers.B1auaUb-.js} +1 -1
- package/dist/{layers.CiTNX3uh.js → layers.B37cfkOz.js} +1 -1
- package/dist/layers.B3S_Iz7U.js +304 -0
- package/dist/{layers.E0TLXdrR.js → layers.B5XF9q_I.js} +1 -1
- package/dist/{layers.CJ1YRhUh.js → layers.B6hh7kZl.js} +1 -1
- package/dist/layers.B7rTjLeq.js +208 -0
- package/dist/{layers.B6Va7v9s.js → layers.B8_yUZ0B.js} +1 -1
- package/dist/{layers.CxIhyFb7.js → layers.B9JA0HLK.js} +1 -1
- package/dist/{layers.DdMy9cRx.js → layers.BABmXbhN.js} +7 -7
- package/dist/{layers.xrt74v23.js → layers.BCWekfj1.js} +1 -1
- package/dist/{layers.CJtE2LxP.js → layers.BDhkw0hD.js} +224 -227
- package/dist/{layers.fumrrA0i.js → layers.BEm0EevB.js} +3 -3
- package/dist/layers.BFOGMUuA.js +8 -0
- package/dist/{layers.C6fD5O8g.js → layers.BFc__DH6.js} +1 -1
- package/dist/{layers.BeCuix4V.js → layers.BGTnvNP0.js} +1 -1
- package/dist/{layers.DJM_OF_R.js → layers.BGdwpbmj.js} +1 -1
- package/dist/{layers.ojcNGNgi.js → layers.BGrn4rLd.js} +1 -1
- package/dist/{layers.DrarpmaN.js → layers.BHgpnpIV.js} +4 -7
- package/dist/{layers.eT_ZPmHS.js → layers.BIwMjJXk.js} +1 -1
- package/dist/{layers.s0KLXd5N.js → layers.BJ0kBYXi.js} +1 -1
- package/dist/{layers.0KANPDnB.js → layers.BK0gUtws.js} +1 -1
- package/dist/{layers.4HZb3jXk.js → layers.BMyOFpSB.js} +1 -1
- package/dist/{layers.DvYYNhUp.js → layers.BO1-27wB.js} +1 -1
- package/dist/{layers.C3DRx9On.js → layers.BO54hyIV.js} +4 -4
- package/dist/{layers.BRGRJfuK.js → layers.BOUezSTL.js} +1 -1
- package/dist/{layers.DLJtS0JJ.js → layers.BP0j0dgn.js} +1 -1
- package/dist/{layers.Di-PcJK6.js → layers.BPc2aeAC.js} +1 -1
- package/dist/{layers.ck9pUJ0W.js → layers.BRrrKVX0.js} +1 -1
- package/dist/{layers.CFLfRAu0.js → layers.BRw0W8BA.js} +2 -2
- package/dist/{layers.BakV9gnD.js → layers.BSUQkbOc.js} +1 -1
- package/dist/{layers.G3enfHRT.js → layers.BUA_HqY5.js} +1 -1
- package/dist/{layers.1Nv-nANB.js → layers.BVcL_n_M.js} +6 -9
- package/dist/{layers.Bk40urId.js → layers.BWePEr40.js} +1 -1
- package/dist/{layers.BeFEsW5q.js → layers.BXcsZWke.js} +1 -1
- package/dist/{layers.BAU0IeY7.js → layers.BZfVYPU5.js} +1 -1
- package/dist/{layers.Cg3Hqyp6.js → layers.BbJS6RnG.js} +1 -1
- package/dist/{layers.DDFbkCJT.js → layers.BbVq4Peg.js} +1 -1
- package/dist/{layers.CGajZ1Yz.js → layers.BbXyLjxZ.js} +1 -1
- package/dist/{layers.BbbyE_Pc.js → layers.Be1uXPSh.js} +1 -1
- package/dist/{layers.BQL01Vq6.js → layers.BeACRp58.js} +1 -1
- package/dist/{layers.CSXAHvGG.js → layers.Ben_68X-.js} +1 -1
- package/dist/{layers.CV8UgwCq.js → layers.BfaQveOZ.js} +7 -7
- package/dist/{layers.BNR6f37h.js → layers.BgJtKoXK.js} +1 -1
- package/dist/{layers.B_jUVHTe.js → layers.BifTQ-Px.js} +1 -1
- package/dist/{layers.BywviGiP.js → layers.BjN6TTXp.js} +1 -1
- package/dist/{layers.SCsPWeXb.js → layers.BjkK2efb.js} +1 -1
- package/dist/{layers.CcTyCqqv.js → layers.BlHp_VrY.js} +1 -1
- package/dist/layers.BlQ-fVEN.js +1 -0
- package/dist/{layers.UewvnK33.js → layers.Blc7rw4s.js} +1 -1
- package/dist/{layers.C8YD8pwl.js → layers.Bnsmp92P.js} +1 -1
- package/dist/layers.BqqCs8jG.js +96 -0
- package/dist/{layers.B_Vwa8Hx.js → layers.BsmgPu7t.js} +1 -1
- package/dist/{layers.CVJOismf.js → layers.Bt7tcN4s.js} +1 -1
- package/dist/{layers.js7-Kn9p.js → layers.Btzp1z-r.js} +1 -1
- package/dist/{layers.CkwenT1M.js → layers.BwTFFS1L.js} +1 -1
- package/dist/{layers.DukGouVT.js → layers.Bx3h2n9l.js} +1 -1
- package/dist/{layers.HFONz6O9.js → layers.BxM1KZfC.js} +4 -4
- package/dist/{layers.t_MFWlU6.js → layers.BxM9-XMl.js} +1 -1
- package/dist/{layers.CQvaw3yb.js → layers.C0J8aakp.js} +1 -1
- package/dist/{layers.B-9QQMGw.js → layers.C0rSyLVd.js} +1 -1
- package/dist/{layers.DBwG7x-W.js → layers.C2Ghtbvc.js} +1 -1
- package/dist/{layers.D_faABvp.js → layers.C2jhvzOq.js} +8 -8
- package/dist/{layers.CfISeAkt.js → layers.C35KTUy2.js} +84 -86
- package/dist/{layers.Coh6z7rV.js → layers.C39A_3mH.js} +1 -1
- package/dist/{layers.DjCXWv2m.js → layers.C5BRzalR.js} +1 -1
- package/dist/{layers.BNkwxNgt.js → layers.C5Fx7NyW.js} +1 -1
- package/dist/{layers.BIM8NeWS.js → layers.C5hEmFnZ.js} +1 -1
- package/dist/{layers.aGzHUJ1W.js → layers.C6s-F8xr.js} +4 -4
- package/dist/{layers.BJhjIY5r.js → layers.C7FVdo84.js} +1 -1
- package/dist/{layers.COjckA33.js → layers.C7dJDI3p.js} +1 -1
- package/dist/{layers.BIbdMSbX.js → layers.C89PpG1h.js} +89 -92
- package/dist/{layers.KT-QFgdb.js → layers.CAn91HUr.js} +1 -1
- package/dist/{layers.Db0NyGA-.js → layers.CDyM6rfz.js} +1 -1
- package/dist/{layers.CJyO2xrs.js → layers.CG5E1s6L.js} +1 -1
- package/dist/{layers.F4d4ILBH.js → layers.CH6vY6nz.js} +89 -92
- package/dist/{layers.5bSjIKfg.js → layers.CI8n-mXC.js} +1 -1
- package/dist/{layers.zNb0110W.js → layers.CIIPaPYQ.js} +1 -1
- package/dist/{layers.BHz2k1im.js → layers.CJjfGFRn.js} +1 -1
- package/dist/{layers.D9N3lSue.js → layers.CLyrFyTt.js} +6 -6
- package/dist/layers.CNTFg_PV.js +48033 -0
- package/dist/layers.COxTigDs.js +1359 -0
- package/dist/layers.CPPTxpTa.js +198 -0
- package/dist/layers.CQw2c-FF.js +1 -0
- package/dist/layers.CS_v9If4.js +118 -0
- package/dist/{layers.DDnI7-13.js → layers.CTEInOdX.js} +1 -1
- package/dist/{layers.DAmxkO9p.js → layers.CTzj-R3i.js} +1 -1
- package/dist/{layers.LR-nMBU_.js → layers.CULMlCQg.js} +5 -8
- package/dist/{layers.CnN8JfiX.js → layers.CWVWuX-h.js} +6 -9
- package/dist/{layers.DEaAvR_W.js → layers.CWetNlAM.js} +15 -18
- package/dist/{layers.5WzirB7G.js → layers.CZLAcdMj.js} +1 -1
- package/dist/{layers.CbBTbZIx.js → layers.CZcNOn_g.js} +1 -1
- package/dist/{layers.YT6D6D2x.js → layers.C_gG9xio.js} +1 -1
- package/dist/{layers.7oLFJZ8l.js → layers.CagLZWJV.js} +1 -1
- package/dist/{layers.BKy18lBk.js → layers.CcQRJhOy.js} +1 -1
- package/dist/{layers.ABhWEnmQ.js → layers.CdI08cP2.js} +1 -1
- package/dist/{layers.CTaitOnb.js → layers.CfGn3EEn.js} +1 -1
- package/dist/layers.CfTomFD-.js +74 -0
- package/dist/{layers.4RmaHEsu.js → layers.Ci-h8bbt.js} +1 -1
- package/dist/{layers.B2BhJZ0D.js → layers.CiOE4x64.js} +1 -1
- package/dist/{layers.CA_fw2Dw.js → layers.CjDmXlbI.js} +1 -1
- package/dist/{layers.BGDCJs-p.js → layers.CkvEBALf.js} +1 -1
- package/dist/{layers.D_WwW4Fn.js → layers.ClbtOgXD.js} +1 -1
- package/dist/{layers.7xkZRnuM.js → layers.CmMJ2vrz.js} +1 -1
- package/dist/layers.CoHrmJZb.js +1 -0
- package/dist/{layers.D8fFj0P_.js → layers.CqOjrhqg.js} +1 -1
- package/dist/{layers.d3HoUueQ.js → layers.Cq_SVM9v.js} +1 -1
- package/dist/layers.CtBDhkfE.js +2 -0
- package/dist/{layers.BXDV2XaW.js → layers.Cvcaleoh.js} +1 -1
- package/dist/{layers.CHhFVTiW.js → layers.Cx1Gq9Dp.js} +1 -1
- package/dist/layers.CxhBPjuM.js +257 -0
- package/dist/{layers.49H_5LNr.js → layers.CxzexeO2.js} +1 -1
- package/dist/{layers.BgEbqAdb.js → layers.Cyiby-Np.js} +3 -3
- package/dist/{layers.LCfVvo3T.js → layers.CzPTBQLq.js} +1 -1
- package/dist/{layers.D2cVaX5z.js → layers.D-Jn2ZYp.js} +11 -14
- package/dist/{layers.CRht5Nqq.js → layers.D3f2mUJi.js} +12 -15
- package/dist/{layers.De35CioU.js → layers.D3lMBPw_.js} +1 -1
- package/dist/{layers.D176Ljko.js → layers.D4HzIdc6.js} +1 -1
- package/dist/{layers.Cf5sVqJX.js → layers.D66jwaU4.js} +1 -1
- package/dist/{layers.D-uio-rN.js → layers.D7ZMXlyX.js} +50 -50
- package/dist/{layers.dh8xLSwh.js → layers.D8q3-pj1.js} +1 -1
- package/dist/{layers.Cxh-oez0.js → layers.D9YR6XE8.js} +3 -3
- package/dist/{layers.Cud-IArB.js → layers.D9jdGpJr.js} +1 -1
- package/dist/{layers.DHNIckw6.js → layers.DAl7I5u0.js} +1 -1
- package/dist/layers.DGi30IzW.js +6 -0
- package/dist/{layers.DNJtYtN1.js → layers.DJF9fzWp.js} +1 -1
- package/dist/{layers.Cg60w1Fn.js → layers.DN7zqtdR.js} +4 -7
- package/dist/{layers.n1dibO8I.js → layers.DODiJHd5.js} +1 -1
- package/dist/{layers.CPJSmpbw.js → layers.DPgcx12Q.js} +1 -1
- package/dist/{layers.DnRaD217.js → layers.DPiZNyNm.js} +3812 -3229
- package/dist/{layers.DkBjWcDH.js → layers.DQhlH0a7.js} +5 -8
- package/dist/{layers.C1actZbK.js → layers.DTik-pik.js} +1 -1
- package/dist/{layers.C3yLkCio.js → layers.DVrOalPV.js} +1 -1
- package/dist/layers.DWaBBiuP.js +19 -0
- package/dist/{layers.CFcHk-z5.js → layers.DZkaq_lv.js} +4 -7
- package/dist/{layers.Y3D9xjCC.js → layers.DacVDKlC.js} +1 -1
- package/dist/layers.DfazY_Pm.js +1 -0
- package/dist/{layers.CMyb9_FE.js → layers.DgCULOvY.js} +1 -1
- package/dist/{layers.D0RX234F.js → layers.DgjixQuR.js} +1 -1
- package/dist/{layers.C92R-ENv.js → layers.DhtGL7-o.js} +1 -1
- package/dist/{layers.DwzO2zcv.js → layers.DjYl24mJ.js} +1 -1
- package/dist/{layers.CFmNZSAJ.js → layers.DkUY5uNV.js} +1 -1
- package/dist/{layers.Ic3KgoPg.js → layers.DouGTsMz.js} +1 -1
- package/dist/{layers.D_fPGQ6i.js → layers.Dq2XAyOc.js} +1 -1
- package/dist/{layers.CwL02t3J.js → layers.DqL7bG3g.js} +1 -1
- package/dist/{layers.C9_vX7IO.js → layers.DrYzFfW_.js} +3 -3
- package/dist/{layers.DnvnGxUC.js → layers.DrdslLaU.js} +1 -1
- package/dist/{layers.CwsNJfmi.js → layers.Ds9-wuCp.js} +1 -1
- package/dist/layers.DsLySzfR.js +8 -0
- package/dist/{layers.Blc4R7F2.js → layers.DsXVRfSf.js} +1 -1
- package/dist/{layers.VfVZmEbK.js → layers.DtYnjrXZ.js} +1 -1
- package/dist/{layers.BLKD1Tiy.js → layers.Dtg6Vr-6.js} +1 -1
- package/dist/{layers.otxU0wtq.js → layers.DuwOgI-l.js} +1 -1
- package/dist/{layers.DHcbExrH.js → layers.DwXNFr-I.js} +3 -3
- package/dist/layers.Ev3O6tfW.js +1 -0
- package/dist/{layers.DUutOP8h.js → layers.GRwBofUp.js} +1 -1
- package/dist/{layers.CXWtqfTe.js → layers.HAyebP5S.js} +7 -10
- package/dist/{layers.BEUJQJGq.js → layers.J8v8A5JD.js} +1 -1
- package/dist/{layers.DaIprEGs.js → layers.MerAdE1w.js} +1 -1
- package/dist/{layers.kW7XFPN_.js → layers.OE83Ve6T.js} +1 -1
- package/dist/{layers.BfVGjstp.js → layers.P6mLQhtB.js} +1 -1
- package/dist/{layers.Ce7-wBOK.js → layers.PV80K4Xy.js} +1 -1
- package/dist/{layers.BJmaj5SY.js → layers.QNYkTpWx.js} +1 -1
- package/dist/{layers.B2iVWMcm.js → layers.RTKoEILv.js} +1 -1
- package/dist/{layers.BQm21WlP.js → layers.SLjiLvui.js} +1 -1
- package/dist/{layers.DVWaIKgr.js → layers.VJ5q1w0_.js} +6 -9
- package/dist/{layers.B-8gEV_E.js → layers.XOfuSupS.js} +3 -3
- package/dist/{layers.CsivQuv1.js → layers.YNcfYAuY.js} +1 -1
- package/dist/{layers.JNgL8WWu.js → layers.YO08nJMd.js} +1 -1
- package/dist/{layers._y8hExIw.js → layers.YqzV3yPW.js} +6 -9
- package/dist/layers.Z4R1XaSC.js +1 -0
- package/dist/{layers.B0sBopW9.js → layers.ZZQfmNLr.js} +1 -1
- package/dist/{layers.DzD-lWXV.js → layers.bHmhGLR5.js} +5 -8
- package/dist/{layers.Bd6ptC9U.js → layers.cgUeweX2.js} +1 -1
- package/dist/{layers.gVfRcFrJ.js → layers.dYPOB_yR.js} +1 -1
- package/dist/{layers.sqH5TpK8.js → layers.easeN7iP.js} +1 -1
- package/dist/{layers.DEtMl_i3.js → layers.f7Ihj79-.js} +1 -1
- package/dist/{layers.-fM6L_z3.js → layers.hLd2Pb2X.js} +1 -1
- package/dist/{layers.Cryqj610.js → layers.i0Y9asvx.js} +5 -8
- package/dist/layers.ib9vHAA4.js +2 -0
- package/dist/{layers.U4NCf2-l.js → layers.k6E3SRkR.js} +3 -3
- package/dist/layers.lDwCLT0I.js +1 -0
- package/dist/{layers.CYneLciB.js → layers.lP9uODKD.js} +7 -10
- package/dist/{layers.Cs-83js7.js → layers.pc1SXYEj.js} +1 -1
- package/dist/{layers.EcqLW9Mh.js → layers.snXT5mu6.js} +1 -1
- package/dist/{layers.BrbcqGdA.js → layers.vIfEp2lU.js} +8 -11
- package/dist/{layers.IUqwmZRd.js → layers.wJNNYF6u.js} +3 -3
- package/dist/{layers.DgO3Q5mW.js → layers.wKL0lWNs.js} +1 -1
- package/dist/{layers.CCur6VEj.js → layers.wU0hxeTl.js} +2 -2
- package/dist/{layers.CYdP1IhC.js → layers.wj-nS-86.js} +1 -1
- package/dist/layers.xiOwns_l.js +1 -0
- package/package.json +23 -24
- package/dist/layers.1bdyQGVP.js +0 -8
- package/dist/layers.B82wcYq0.js +0 -271
- package/dist/layers.BCD7sjs8.js +0 -1
- package/dist/layers.BOMC5c1j.js +0 -2
- package/dist/layers.C-_ynqvr.js +0 -1
- package/dist/layers.C9QCrDzm.js +0 -1
- package/dist/layers.CB61rfHO.js +0 -1225
- package/dist/layers.CYPfnKfS.js +0 -96
- package/dist/layers.CZLVHOh5.js +0 -8
- package/dist/layers.CcP6Z-gZ.js +0 -118
- package/dist/layers.Chd1p2rt.js +0 -26645
- package/dist/layers.D4Bw_BrO.js +0 -1
- package/dist/layers.DHVcgZzL.js +0 -257
- package/dist/layers.DUlTmlus.js +0 -213
- package/dist/layers.Dv_6xN7s.js +0 -2
- package/dist/layers.DwWUZK6s.js +0 -129
- package/dist/layers.Qt2qr0-t.js +0 -76
- package/dist/layers.a8-4vDzD.js +0 -22
- package/dist/layers.dWB4bggP.js +0 -1
- package/dist/layers.mobYTQXI.js +0 -1
- package/dist/layers.nRPZ1e3g.js +0 -1
- package/dist/layers.o2u1uDM3.js +0 -1
- package/dist/layers.oJ31-KOl.js +0 -6
- package/dist/layers.rE9xnPLC.js +0 -1
package/dist/layers.CZLVHOh5.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.CYPfnKfS.js");require("./layers.CV8UgwCq.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
|
|
2
|
-
`+S.showPosition()+`
|
|
3
|
-
Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),V=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof V<"u")return V;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,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 i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=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),c.length-1&&(this.yylineno-=c.length-1);var b=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:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),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
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
-
`+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],q={};const zt=()=>{X=[],Q=[],q={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const qt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Vt{constructor(n){this.ID=n}}const Rt=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),q[t]||(q[t]=new Vt(t),Q.push(q[t])),q[t]),Ut=()=>Q,Wt=()=>X,Ft=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:q,getConfig:()=>L.getConfig().sankey,getNodes:Ut,getLinks:Wt,getGraph:Ft,addLink:qt,findOrCreateNode:Rt,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
|
|
7
|
-
${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
-
`).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
|
package/dist/layers.CcP6Z-gZ.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./layers.CYPfnKfS.js"),Le=require("lodash-es/clone.js"),Y=require("./layers.DgO3Q5mW.js"),_e=require("./layers.BLd2spTm.js");require("./layers.CV8UgwCq.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const me=require("./layers.nRPZ1e3g.js"),ye=require("./layers.B19hGmey.js"),Ee=require("./layers.BIeVwYKL.js");var ae,le,ee=(function(){var e=function(D,o,s,i){for(s=s||{},i=D.length;i--;s[D[i]]=o);return s},a=[1,7],d=[1,13],c=[1,14],n=[1,15],g=[1,19],l=[1,16],b=[1,17],x=[1,18],p=[8,30],S=[8,21,28,29,30,31,32,40,44,47],y=[1,23],O=[1,24],v=[8,15,16,21,28,29,30,31,32,40,44,47],N=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],L={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(o,s,i,u,h,t,_){var r=t.length-1;switch(h){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[r-1]),u.setHierarchy(t[r-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[r]),typeof t[r].length=="number"?this.$=t[r]:this.$=[t[r]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[r-1]),this.$=[t[r-1]].concat(t[r]);break;case 14:u.getLogger().debug("Rule: link: ",t[r],o),this.$={edgeTypeStr:t[r],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[r-3],t[r-1],t[r]),this.$={edgeTypeStr:t[r],label:t[r-1]};break;case 18:const R=parseInt(t[r]),W=u.generateId();this.$={id:W,type:"space",label:"",width:R,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[r-2],t[r-1],t[r]," typestr: ",t[r-1].edgeTypeStr);const F=u.edgeStrToEdgeData(t[r-1].edgeTypeStr);this.$=[{id:t[r-2].id,label:t[r-2].label,type:t[r-2].type,directions:t[r-2].directions},{id:t[r-2].id+"-"+t[r].id,start:t[r-2].id,end:t[r].id,label:t[r-1].label,type:"edge",directions:t[r].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[r-1],t[r]),this.$={id:t[r-1].id,label:t[r-1].label,type:u.typeStr2Type(t[r-1].typeStr),directions:t[r-1].directions,widthInColumns:parseInt(t[r],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[r]),this.$={id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[r]),this.$={type:"column-setting",columns:t[r]==="auto"?-1:parseInt(t[r])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[r-2],t[r-1]),u.generateId(),this.$={...t[r-2],type:"composite",children:t[r-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[r-2],t[r-1],t[r]);const C=u.generateId();this.$={id:C,type:"composite",label:"",children:t[r-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[r]),this.$={id:t[r]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[r-1],t[r]),this.$={id:t[r-1],label:t[r].label,typeStr:t[r].typeStr,directions:t[r].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[r]),this.$=[t[r]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[r-1],t[r]),this.$=[t[r-1]].concat(t[r]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[r-2],t[r-1],t[r]),this.$={typeStr:t[r-2]+t[r],label:t[r-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[r-3],t[r-2]," #3:",t[r-1],t[r]),this.$={typeStr:t[r-3]+t[r],label:t[r-2],directions:t[r-1]};break;case 35:case 36:this.$={type:"classDef",id:t[r-1].trim(),css:t[r].trim()};break;case 37:this.$={type:"applyClass",id:t[r-1].trim(),styleClass:t[r].trim()};break;case 38:this.$={type:"applyStyles",id:t[r-1].trim(),stylesStr:t[r].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:a,28:d,29:c,31:n,32:g,40:l,44:b,47:x}),e(S,[2,16],{14:22,15:y,16:O}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(v,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(N,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(v,[2,24]),{11:37,13:4,14:22,15:y,16:O,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(N,[2,30]),{18:[1,43]},{18:[1,44]},e(v,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(S,[2,27]),e(N,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(N,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(o,s){if(s.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=s,i}},parse:function(o){var s=this,i=[0],u=[],h=[null],t=[],_=this.table,r="",R=0,W=0,F=2,C=1,be=t.slice.call(arguments,1),w=Object.create(this.lexer),K={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(K.yy[Z]=this.yy[Z]);w.setInput(o,K.yy),K.yy.lexer=w,K.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var J=w.yylloc;t.push(J);var xe=w.options&&w.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(){var P;return P=u.pop()||w.lex()||C,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}for(var T,M,z,Q,j={},X,B,ne,G;;){if(M=i[i.length-1],this.defaultActions[M]?z=this.defaultActions[M]:((T===null||typeof T>"u")&&(T=Se()),z=_[M]&&_[M][T]),typeof z>"u"||!z.length||!z[0]){var $="";G=[];for(X in _[M])this.terminals_[X]&&X>F&&G.push("'"+this.terminals_[X]+"'");w.showPosition?$="Parse error on line "+(R+1)+`:
|
|
2
|
-
`+w.showPosition()+`
|
|
3
|
-
Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(T==C?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError($,{text:w.match,token:this.terminals_[T]||T,line:w.yylineno,loc:J,expected:G})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+T);switch(z[0]){case 1:i.push(T),h.push(w.yytext),t.push(w.yylloc),i.push(z[1]),T=null,W=w.yyleng,r=w.yytext,R=w.yylineno,J=w.yylloc;break;case 2:if(B=this.productions_[z[1]][1],j.$=h[h.length-B],j._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},xe&&(j._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[r,W,R,K.yy,z[1],h,t].concat(be)),typeof Q<"u")return Q;B&&(i=i.slice(0,-1*B*2),h=h.slice(0,-1*B),t=t.slice(0,-1*B)),i.push(this.productions_[z[1]][0]),h.push(j.$),t.push(j._$),ne=_[i[i.length-2]][i[i.length-1]],i.push(ne);break;case 3:return!0}}return!0}},A=(function(){var D={EOF:1,parseError:function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},setInput:function(o,s){return this.yy=s||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,i=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=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),i.length-1&&(this.yylineno-=i.length-1);var h=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:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-s]),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
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
-
`+s+"^"},test_match:function(o,s){var i,u,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,i,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;t<h.length;t++)if(i=this._input.match(this.rules[h[t]]),i&&(!s||i[0].length>s[0].length)){if(s=i,u=t,this.options.backtrack_lexer){if(o=this.test_match(i,h[t]),o!==!1)return o;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(o=this.test_match(s,h[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,i,u,h){switch(u){case 0:return 10;case 1:return s.getLogger().debug("Found space-block"),31;case 2:return s.getLogger().debug("Found nl-block"),31;case 3:return s.getLogger().debug("Found space-block"),29;case 4:s.getLogger().debug(".",i.yytext);break;case 5:s.getLogger().debug("_",i.yytext);break;case 6:return 5;case 7:return i.yytext=-1,28;case 8:return i.yytext=i.yytext.replace(/columns\s+/,""),s.getLogger().debug("COLUMNS (LEX)",i.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:s.getLogger().debug("LEX: POPPING STR:",i.yytext),this.popState();break;case 14:return s.getLogger().debug("LEX: STR end:",i.yytext),"STR";case 15:return i.yytext=i.yytext.replace(/space\:/,""),s.getLogger().debug("SPACE NUM (LEX)",i.yytext),21;case 16:return i.yytext="1",s.getLogger().debug("COLUMNS (LEX)",i.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),s.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),s.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),s.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),s.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),s.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),s.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),s.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),s.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),s.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),s.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return s.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return s.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return s.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return s.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return s.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return s.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return s.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),s.getLogger().debug("LEX ARR START"),38;case 75:return s.getLogger().debug("Lex: NODE_ID",i.yytext),32;case 76:return s.getLogger().debug("Lex: EOF",i.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:s.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:s.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return s.getLogger().debug("LEX: NODE_DESCR:",i.yytext),"NODE_DESCR";case 84:s.getLogger().debug("LEX POPPING"),this.popState();break;case 85:s.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (right): dir:",i.yytext),"DIR";case 87:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (left):",i.yytext),"DIR";case 88:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (x):",i.yytext),"DIR";case 89:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (y):",i.yytext),"DIR";case 90:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (up):",i.yytext),"DIR";case 91:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (down):",i.yytext),"DIR";case 92:return i.yytext="]>",s.getLogger().debug("Lex (ARROW_DIR end):",i.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 94:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 95:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 96:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 97:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 98:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 99:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return s.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 103:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 104:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 105:return s.getLogger().debug("Lex: COLON",i.yytext),i.yytext=i.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D})();L.lexer=A;function k(){this.yy={}}return k.prototype=L,L.Parser=k,new k})();ee.parser=ee;const we=ee;let I={},se=[],q={};const oe="color",ce="fill",De="bgFill",de=",",ve=f.getConfig();let V={};const Ne=e=>f.common$1.sanitizeText(e,ve),ke=function(e,a=""){V[e]===void 0&&(V[e]={id:e,styles:[],textStyles:[]});const d=V[e];a!=null&&a.split(de).forEach(c=>{const n=c.replace(/([^;]*);/,"$1").trim();if(c.match(oe)){const l=n.replace(ce,De).replace(oe,ce);d.textStyles.push(l)}d.styles.push(n)})},Te=function(e,a=""){const d=I[e];a!=null&&(d.styles=a.split(de))},Ie=function(e,a){e.split(",").forEach(function(d){let c=I[d];if(c===void 0){const n=d.trim();I[n]={id:n,type:"na",children:[]},c=I[n]}c.classes||(c.classes=[]),c.classes.push(a)})},he=(e,a)=>{const d=e.flat(),c=[];for(const n of d){if(n.label&&(n.label=Ne(n.label)),n.type==="classDef"){ke(n.id,n.css);continue}if(n.type==="applyClass"){Ie(n.id,(n==null?void 0:n.styleClass)||"");continue}if(n.type==="applyStyles"){n!=null&&n.stylesStr&&Te(n.id,n==null?void 0:n.stylesStr);continue}if(n.type==="column-setting")a.columns=n.columns||-1;else if(n.type==="edge")q[n.id]?q[n.id]++:q[n.id]=1,n.id=q[n.id]+"-"+n.id,se.push(n);else{n.label||(n.type==="composite"?n.label="":n.label=n.id);const g=!I[n.id];if(g?I[n.id]=n:(n.type!=="na"&&(I[n.id].type=n.type),n.label!==n.id&&(I[n.id].label=n.label)),n.children&&he(n.children,n),n.type==="space"){const l=n.width||1;for(let b=0;b<l;b++){const x=Le(n);x.id=x.id+"-"+b,I[x.id]=x,c.push(x)}}else g&&c.push(n)}}a.children=c};let ie=[],U={id:"root",type:"composite",children:[],columns:-1};const Oe=()=>{f.log$1.debug("Clear called"),f.clear(),U={id:"root",type:"composite",children:[],columns:-1},I={root:U},ie=[],V={},se=[],q={}};function ze(e){switch(f.log$1.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return f.log$1.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Ce(e){switch(f.log$1.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function Ae(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}let ue=0;const Re=()=>(ue++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ue),Be=e=>{U.children=e,he(e,U),ie=U.children},Pe=e=>{const a=I[e];return a?a.columns?a.columns:a.children?a.children.length:-1:-1},Fe=()=>[...Object.values(I)],Ke=()=>ie||[],Me=()=>se,Ye=e=>I[e],We=e=>{I[e.id]=e},je=()=>console,qe=function(){return V},Ve={getConfig:()=>f.getConfig$1().block,typeStr2Type:ze,edgeTypeStr2Type:Ce,edgeStrToEdgeData:Ae,getLogger:je,getBlocksFlat:Fe,getBlocks:Ke,getEdges:Me,setHierarchy:Be,getBlock:Ye,setBlock:We,getColumns:Pe,getClasses:qe,clear:Oe,generateId:Re},Ue=Ve,H=(e,a)=>{const d=me.channel,c=d(e,"r"),n=d(e,"g"),g=d(e,"b");return f.rgba(c,n,g,a)},Xe=e=>`.label {
|
|
7
|
-
font-family: ${e.fontFamily};
|
|
8
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
-
}
|
|
10
|
-
.cluster-label text {
|
|
11
|
-
fill: ${e.titleColor};
|
|
12
|
-
}
|
|
13
|
-
.cluster-label span,p {
|
|
14
|
-
color: ${e.titleColor};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.label text,span,p {
|
|
20
|
-
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.node rect,
|
|
25
|
-
.node circle,
|
|
26
|
-
.node ellipse,
|
|
27
|
-
.node polygon,
|
|
28
|
-
.node path {
|
|
29
|
-
fill: ${e.mainBkg};
|
|
30
|
-
stroke: ${e.nodeBorder};
|
|
31
|
-
stroke-width: 1px;
|
|
32
|
-
}
|
|
33
|
-
.flowchart-label text {
|
|
34
|
-
text-anchor: middle;
|
|
35
|
-
}
|
|
36
|
-
// .flowchart-label .text-outer-tspan {
|
|
37
|
-
// text-anchor: middle;
|
|
38
|
-
// }
|
|
39
|
-
// .flowchart-label .text-inner-tspan {
|
|
40
|
-
// text-anchor: start;
|
|
41
|
-
// }
|
|
42
|
-
|
|
43
|
-
.node .label {
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
.node.clickable {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.arrowheadPath {
|
|
51
|
-
fill: ${e.arrowheadColor};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.edgePath .path {
|
|
55
|
-
stroke: ${e.lineColor};
|
|
56
|
-
stroke-width: 2.0px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.flowchart-link {
|
|
60
|
-
stroke: ${e.lineColor};
|
|
61
|
-
fill: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.edgeLabel {
|
|
65
|
-
background-color: ${e.edgeLabelBackground};
|
|
66
|
-
rect {
|
|
67
|
-
opacity: 0.5;
|
|
68
|
-
background-color: ${e.edgeLabelBackground};
|
|
69
|
-
fill: ${e.edgeLabelBackground};
|
|
70
|
-
}
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* For html labels only */
|
|
75
|
-
.labelBkg {
|
|
76
|
-
background-color: ${H(e.edgeLabelBackground,.5)};
|
|
77
|
-
// background-color:
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.node .cluster {
|
|
81
|
-
// fill: ${H(e.mainBkg,.5)};
|
|
82
|
-
fill: ${H(e.clusterBkg,.5)};
|
|
83
|
-
stroke: ${H(e.clusterBorder,.2)};
|
|
84
|
-
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
85
|
-
stroke-width: 1px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.cluster text {
|
|
89
|
-
fill: ${e.titleColor};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.cluster span,p {
|
|
93
|
-
color: ${e.titleColor};
|
|
94
|
-
}
|
|
95
|
-
/* .cluster div {
|
|
96
|
-
color: ${e.titleColor};
|
|
97
|
-
} */
|
|
98
|
-
|
|
99
|
-
div.mermaidTooltip {
|
|
100
|
-
position: absolute;
|
|
101
|
-
text-align: center;
|
|
102
|
-
max-width: 200px;
|
|
103
|
-
padding: 2px;
|
|
104
|
-
font-family: ${e.fontFamily};
|
|
105
|
-
font-size: 12px;
|
|
106
|
-
background: ${e.tertiaryColor};
|
|
107
|
-
border: 1px solid ${e.border2};
|
|
108
|
-
border-radius: 2px;
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
z-index: 100;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.flowchartTitleText {
|
|
114
|
-
text-anchor: middle;
|
|
115
|
-
font-size: 18px;
|
|
116
|
-
fill: ${e.textColor};
|
|
117
|
-
}
|
|
118
|
-
`,Ge=Xe;function ge(e,a,d=!1){var c,n,g;const l=e;let b="default";(((c=l==null?void 0:l.classes)==null?void 0:c.length)||0)>0&&(b=((l==null?void 0:l.classes)||[]).join(" ")),b=b+" flowchart-label";let x=0,p="",S;switch(l.type){case"round":x=5,p="rect";break;case"composite":x=0,p="composite",S=0;break;case"square":p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"group":p="rect";break;case"doublecircle":p="doublecircle";break;default:p="rect"}const y=f.getStylesFromArray((l==null?void 0:l.styles)||[]),O=l.label,v=l.size||{width:0,height:0,x:0,y:0};return{labelStyle:y.labelStyle,shape:p,labelText:O,rx:x,ry:x,class:b,style:y.style,id:l.id,directions:l.directions,width:v.width,height:v.height,x:v.x,y:v.y,positioned:d,intersect:void 0,type:l.type,padding:S??(((g=(n=f.getConfig$1())==null?void 0:n.block)==null?void 0:g.padding)||0)}}async function He(e,a,d){const c=ge(a,d,!1);if(c.type==="group")return;const n=await Y.insertNode(e,c),g=n.node().getBBox(),l=d.getBlock(c.id);l.size={width:g.width,height:g.height,x:0,y:0,node:n},d.setBlock(l),n.remove()}async function Ze(e,a,d){const c=ge(a,d,!0);d.getBlock(c.id).type!=="space"&&(await Y.insertNode(e,c),a.intersect=c==null?void 0:c.intersect,Y.positionNode(c))}async function re(e,a,d,c){for(const n of a)await c(e,n,d),n.children&&await re(e,n.children,d,c)}async function Je(e,a,d){await re(e,a,d,He)}async function Qe(e,a,d){await re(e,a,d,Ze)}async function $e(e,a,d,c,n){const g=new _e.Graph({multigraph:!0,compound:!0});g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of d)l.size&&g.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of a)if(l.start&&l.end){const b=c.getBlock(l.start),x=c.getBlock(l.end);if(b!=null&&b.size&&(x!=null&&x.size)){const p=b.size,S=x.size,y=[{x:p.x,y:p.y},{x:p.x+(S.x-p.x)/2,y:p.y+(S.y-p.y)/2},{x:S.x,y:S.y}];await Y.insertEdge(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",g,n),l.label&&(await Y.insertEdgeLabel(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart}),await Y.positionEdgeLabel({...l,x:y[1].x,y:y[1].y},{originalPath:y}))}}}const m=((le=(ae=f.getConfig())==null?void 0:ae.block)==null?void 0:le.padding)||8;function et(e,a){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(a<0||!Number.isInteger(a))throw new Error("Position must be a non-negative integer."+a);if(e<0)return{px:a,py:0};if(e===1)return{px:0,py:a};const d=a%e,c=Math.floor(a/e);return{px:d,py:c}}const tt=e=>{let a=0,d=0;for(const c of e.children){const{width:n,height:g,x:l,y:b}=c.size||{width:0,height:0,x:0,y:0};f.log$1.debug("getMaxChildSize abc95 child:",c.id,"width:",n,"height:",g,"x:",l,"y:",b,c.type),c.type!=="space"&&(n>a&&(a=n/(e.widthInColumns||1)),g>d&&(d=g))}return{width:a,height:d}};function te(e,a,d=0,c=0){var n,g,l,b,x,p,S,y,O,v,N;f.log$1.debug("setBlockSizes abc95 (start)",e.id,(n=e==null?void 0:e.size)==null?void 0:n.x,"block width =",e==null?void 0:e.size,"sieblingWidth",d),(g=e==null?void 0:e.size)!=null&&g.width||(e.size={width:d,height:c,x:0,y:0});let E=0,L=0;if(((l=e.children)==null?void 0:l.length)>0){for(const h of e.children)te(h,a);const A=tt(e);E=A.width,L=A.height,f.log$1.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",E,L);for(const h of e.children)h.size&&(f.log$1.debug(`abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`),h.size.width=E*(h.widthInColumns||1)+m*((h.widthInColumns||1)-1),h.size.height=L,h.size.x=0,h.size.y=0,f.log$1.debug(`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`));for(const h of e.children)te(h,a,E,L);const k=e.columns||-1;let D=0;for(const h of e.children)D+=h.widthInColumns||1;let o=e.children.length;k>0&&k<D&&(o=k),e.widthInColumns;const s=Math.ceil(D/o);let i=o*(E+m)+m,u=s*(L+m)+m;if(i<d){f.log$1.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`),i=d,u=c;const h=(d-o*m-m)/o,t=(c-s*m-m)/s;f.log$1.debug("Size indata abc88",e.id,"childWidth",h,"maxWidth",E),f.log$1.debug("Size indata abc88",e.id,"childHeight",t,"maxHeight",L),f.log$1.debug("Size indata abc88 xSize",o,"padding",m);for(const _ of e.children)_.size&&(_.size.width=h,_.size.height=t,_.size.x=0,_.size.y=0)}if(f.log$1.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i,((b=e.size)==null?void 0:b.width)||0)}`),i<(((x=e==null?void 0:e.size)==null?void 0:x.width)||0)){i=((p=e==null?void 0:e.size)==null?void 0:p.width)||0;const h=k>0?Math.min(e.children.length,k):e.children.length;if(h>0){const t=(i-h*m-m)/h;f.log$1.debug("abc95 (growing to fit) width",e.id,i,(S=e.size)==null?void 0:S.width,t);for(const _ of e.children)_.size&&(_.size.width=t)}}e.size={width:i,height:u,x:0,y:0}}f.log$1.debug("setBlockSizes abc94 (done)",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x,(O=e==null?void 0:e.size)==null?void 0:O.width,(v=e==null?void 0:e.size)==null?void 0:v.y,(N=e==null?void 0:e.size)==null?void 0:N.height)}function pe(e,a){var d,c,n,g,l,b,x,p,S,y,O,v,N,E,L,A,k;f.log$1.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d=e==null?void 0:e.size)==null?void 0:d.x} y: ${(c=e==null?void 0:e.size)==null?void 0:c.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const D=e.columns||-1;if(f.log$1.debug("layoutBlocks columns abc95",e.id,"=>",D,e),e.children&&e.children.length>0){const o=((l=(g=e==null?void 0:e.children[0])==null?void 0:g.size)==null?void 0:l.width)||0,s=e.children.length*o+(e.children.length-1)*m;f.log$1.debug("widthOfChildren 88",s,"posX");let i=0;f.log$1.debug("abc91 block?.size?.x",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x);let u=(x=e==null?void 0:e.size)!=null&&x.x?((p=e==null?void 0:e.size)==null?void 0:p.x)+(-((S=e==null?void 0:e.size)==null?void 0:S.width)/2||0):-m,h=0;for(const t of e.children){const _=e;if(!t.size)continue;const{width:r,height:R}=t.size,{px:W,py:F}=et(D,i);if(F!=h&&(h=F,u=(y=e==null?void 0:e.size)!=null&&y.x?((O=e==null?void 0:e.size)==null?void 0:O.x)+(-((v=e==null?void 0:e.size)==null?void 0:v.width)/2||0):-m,f.log$1.debug("New row in layout for block",e.id," and child ",t.id,h)),f.log$1.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${W},${F} (${(N=_==null?void 0:_.size)==null?void 0:N.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${r}${m}`),_.size){const C=r/2;t.size.x=u+m+C,f.log$1.debug(`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${m} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((t==null?void 0:t.widthInColumns)||1)/2}`),u=t.size.x+C,t.size.y=_.size.y-_.size.height/2+F*(R+m)+R/2+m,f.log$1.debug(`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${m}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r*((t==null?void 0:t.widthInColumns)||1)/2}`)}t.children&&pe(t),i+=(t==null?void 0:t.widthInColumns)||1,f.log$1.debug("abc88 columnsPos",t,i)}}f.log$1.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(L=e==null?void 0:e.size)==null?void 0:L.x} y: ${(A=e==null?void 0:e.size)==null?void 0:A.y} width: ${(k=e==null?void 0:e.size)==null?void 0:k.width}`)}function fe(e,{minX:a,minY:d,maxX:c,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:g,y:l,width:b,height:x}=e.size;g-b/2<a&&(a=g-b/2),l-x/2<d&&(d=l-x/2),g+b/2>c&&(c=g+b/2),l+x/2>n&&(n=l+x/2)}if(e.children)for(const g of e.children)({minX:a,minY:d,maxX:c,maxY:n}=fe(g,{minX:a,minY:d,maxX:c,maxY:n}));return{minX:a,minY:d,maxX:c,maxY:n}}function st(e){const a=e.getBlock("root");if(!a)return;te(a,e,0,0),pe(a),f.log$1.debug("getBlocks",JSON.stringify(a,null,2));const{minX:d,minY:c,maxX:n,maxY:g}=fe(a),l=g-c,b=n-d;return{x:d,y:c,width:b,height:l}}const it=function(e,a){return a.db.getClasses()},rt=async function(e,a,d,c){const{securityLevel:n,block:g}=f.getConfig$1(),l=c.db;let b;n==="sandbox"&&(b=f.select("#i"+a));const x=n==="sandbox"?f.select(b.nodes()[0].contentDocument.body):f.select("body"),p=n==="sandbox"?x.select(`[id="${a}"]`):f.select(`[id="${a}"]`),S=["point","circle","cross"];Y.insertMarkers$1(p,S,c.type,a);const y=l.getBlocks(),O=l.getBlocksFlat(),v=l.getEdges(),N=p.insert("g").attr("class","block");await Je(N,y,l);const E=st(l);if(await Qe(N,y,l),await $e(N,v,O,l,a),E){const L=E,A=Math.max(1,Math.round(.125*(L.width/L.height))),k=L.height+A+10,D=L.width+10,{useMaxWidth:o}=g;f.configureSvgSize(p,k,D,!!o),f.log$1.debug("Here Bounds",E,L),p.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}ye.ordinal(Ee.schemeTableau10)},nt={draw:rt,getClasses:it},at={parser:we,db:Ue,renderer:nt,styles:Ge};exports.diagram=at;
|