@zerops/web-components 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/chunks/{recipe-fetch-D2IpKMVr.js → app-CrO8M3t-.js} +3822 -4988
- package/chunks/{browser-CUhuh3a-.js → browser-CZljKQ_O.js} +1 -1
- package/chunks/recipe-fetch-9bf8nynf.js +1186 -0
- package/managed-service-diagram.d.ts +12 -0
- package/managed-service-diagram.js +3998 -0
- package/network-diagram.js +509 -484
- package/package.json +5 -1
- package/recipe-card.js +95 -94
- package/recipes/zerops-showcase.json +1 -1
package/network-diagram.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Oe = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var ae = (t, e, n) => e.has(t) ||
|
|
5
|
-
var d = (t, e, n) => (ae(t, e, "read from private field"), n ? n.call(t) : e.get(t)),
|
|
6
|
-
var
|
|
4
|
+
var ae = (t, e, n) => e.has(t) || Oe("Cannot " + n);
|
|
5
|
+
var d = (t, e, n) => (ae(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ? Oe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), h = (t, e, n, o) => (ae(t, e, "write to private field"), o ? o.call(t, n) : e.set(t, n), n), b = (t, e, n) => (ae(t, e, "access private method"), n);
|
|
6
|
+
var re = (t, e, n, o) => ({
|
|
7
7
|
set _(i) {
|
|
8
8
|
h(t, e, i, n);
|
|
9
9
|
},
|
|
@@ -11,8 +11,9 @@ var Oe = (t, e, n, o) => ({
|
|
|
11
11
|
return d(t, e, o);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import { a7 as N, aq as j, r as te, ar as We, as as Ge, au as W, ax as G, aS as Ze, aT as bn, at as m, az as D, av as _, ay as O, aw as c, aA as mn, aY as R, bj as X, aZ as A, aC as $e, a2 as u, al as S, B as un, l as Bn, aM as ze, b8 as ne, n as ke, F as De, aP as He, aR as Ue, bh as Gn, a_ as he, ah as en, j as Je, bo as Ye, J as Qe, bp as Xe, bq as Ke, br as nt } from "./chunks/app-CrO8M3t-.js";
|
|
15
|
+
import { Z as et, v as tt, u as ot, S as Ne, C as it, r as at, A as rt, z as st } from "./chunks/recipe-fetch-9bf8nynf.js";
|
|
16
|
+
const Ee = {
|
|
16
17
|
endpoint: "https://my-app.com",
|
|
17
18
|
infrastructure: {
|
|
18
19
|
ctrl: { active: 1, standby: 1 },
|
|
@@ -68,149 +69,149 @@ const ke = {
|
|
|
68
69
|
sublabel: "storage:6379"
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
|
-
function st(t, e) {
|
|
72
|
-
if (t & 1 && (m(0, "div", 0)(1, "span", 7), N(2), g()()), t & 2) {
|
|
73
|
-
const n = P();
|
|
74
|
-
s(2), mn(n.label());
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
72
|
function ct(t, e) {
|
|
78
|
-
if (t & 1 &&
|
|
79
|
-
const n =
|
|
80
|
-
|
|
73
|
+
if (t & 1 && (m(0, "div", 0)(1, "span", 7), D(2), _()()), t & 2) {
|
|
74
|
+
const n = O();
|
|
75
|
+
c(2), mn(n.label());
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
function lt(t, e) {
|
|
84
79
|
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
85
|
-
const n =
|
|
86
|
-
|
|
80
|
+
const n = O(2);
|
|
81
|
+
S("color", n.barColor())("active", !0);
|
|
87
82
|
}
|
|
88
83
|
}
|
|
89
84
|
function dt(t, e) {
|
|
90
|
-
if (t & 1 && u(0, "
|
|
91
|
-
const n =
|
|
92
|
-
|
|
85
|
+
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
86
|
+
const n = O(2);
|
|
87
|
+
S("color", n.barColor())("active", !1);
|
|
93
88
|
}
|
|
94
89
|
}
|
|
95
90
|
function ht(t, e) {
|
|
96
|
-
if (t & 1 &&
|
|
97
|
-
const n =
|
|
98
|
-
|
|
91
|
+
if (t & 1 && u(0, "mat-icon", 12), t & 2) {
|
|
92
|
+
const n = e.$implicit;
|
|
93
|
+
S("svgIcon", n);
|
|
99
94
|
}
|
|
100
95
|
}
|
|
101
96
|
function gt(t, e) {
|
|
102
|
-
if (t & 1 &&
|
|
103
|
-
const n =
|
|
104
|
-
|
|
97
|
+
if (t & 1 && R(0, ht, 1, 1, "mat-icon", 12, X), t & 2) {
|
|
98
|
+
const n = O(2);
|
|
99
|
+
A(n.techIcons());
|
|
105
100
|
}
|
|
106
101
|
}
|
|
107
102
|
function _t(t, e) {
|
|
108
|
-
if (t & 1 && (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
s(2), L(o.activeRange()), s(2), L(o.inactiveRange()), s(3), mn(o.label()), s(2), G((n = o.techIcons()) != null && n.length ? 9 : o.techIcon() ? 10 : -1);
|
|
103
|
+
if (t & 1 && u(0, "mat-icon", 12), t & 2) {
|
|
104
|
+
const n = O(2);
|
|
105
|
+
S("svgIcon", n.techIcon());
|
|
112
106
|
}
|
|
113
107
|
}
|
|
114
108
|
function pt(t, e) {
|
|
115
|
-
if (t & 1 &&
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
if (t & 1 && (m(0, "div", 1)(1, "div", 8), R(2, lt, 1, 2, "zui-bar-icon", 9, X), R(4, dt, 1, 2, "zui-bar-icon", 9, X), _(), m(6, "span", 10), D(7), _(), m(8, "div", 11), W(9, gt, 2, 0)(10, _t, 1, 1, "mat-icon", 12), _()()), t & 2) {
|
|
110
|
+
let n;
|
|
111
|
+
const o = O();
|
|
112
|
+
c(2), A(o.activeRange()), c(2), A(o.inactiveRange()), c(3), mn(o.label()), c(2), G((n = o.techIcons()) != null && n.length ? 9 : o.techIcon() ? 10 : -1);
|
|
118
113
|
}
|
|
119
114
|
}
|
|
120
115
|
function ft(t, e) {
|
|
121
|
-
if (t & 1 && u(0, "
|
|
122
|
-
const n =
|
|
123
|
-
|
|
116
|
+
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
117
|
+
const n = O(2);
|
|
118
|
+
S("color", n.barColor())("active", !0);
|
|
124
119
|
}
|
|
125
120
|
}
|
|
126
121
|
function ut(t, e) {
|
|
127
|
-
if (t & 1 && (
|
|
128
|
-
const n =
|
|
129
|
-
|
|
122
|
+
if (t & 1 && u(0, "mat-icon", 16), t & 2) {
|
|
123
|
+
const n = O(2);
|
|
124
|
+
S("svgIcon", n.techIcon());
|
|
130
125
|
}
|
|
131
126
|
}
|
|
132
127
|
function mt(t, e) {
|
|
133
|
-
if (t & 1 &&
|
|
134
|
-
const n =
|
|
135
|
-
|
|
128
|
+
if (t & 1 && (m(0, "div", 2)(1, "div", 13), R(2, ft, 1, 2, "zui-bar-icon", 9, X), _(), m(4, "div", 14)(5, "span", 15), D(6), _(), W(7, ut, 1, 1, "mat-icon", 16), _()()), t & 2) {
|
|
129
|
+
const n = O();
|
|
130
|
+
c(2), A(n.activeRange()), c(4), mn(n.formatLabel(n.label())), c(), G(n.techIcon() ? 7 : -1);
|
|
136
131
|
}
|
|
137
132
|
}
|
|
138
133
|
function vt(t, e) {
|
|
139
134
|
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
140
|
-
const n =
|
|
141
|
-
|
|
135
|
+
const n = O(2);
|
|
136
|
+
S("color", n.barColor())("active", !0);
|
|
142
137
|
}
|
|
143
138
|
}
|
|
144
139
|
function bt(t, e) {
|
|
145
|
-
if (t & 1 && u(0, "
|
|
146
|
-
const n =
|
|
147
|
-
|
|
140
|
+
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
141
|
+
const n = O(2);
|
|
142
|
+
S("color", n.barColor())("active", !1);
|
|
148
143
|
}
|
|
149
144
|
}
|
|
150
145
|
function xt(t, e) {
|
|
151
|
-
if (t & 1 && (
|
|
152
|
-
const n =
|
|
153
|
-
|
|
146
|
+
if (t & 1 && u(0, "mat-icon", 20), t & 2) {
|
|
147
|
+
const n = O(2);
|
|
148
|
+
S("svgIcon", n.techIcon());
|
|
154
149
|
}
|
|
155
150
|
}
|
|
156
151
|
function wt(t, e) {
|
|
157
|
-
if (t & 1 &&
|
|
158
|
-
const n =
|
|
159
|
-
|
|
152
|
+
if (t & 1 && (m(0, "div", 3)(1, "div", 17), R(2, vt, 1, 2, "zui-bar-icon", 9, X), R(4, bt, 1, 2, "zui-bar-icon", 9, X), _(), m(6, "div", 18)(7, "span", 19), D(8), _(), W(9, xt, 1, 1, "mat-icon", 20), _()()), t & 2) {
|
|
153
|
+
const n = O();
|
|
154
|
+
c(2), A(n.activeRange()), c(2), A(n.inactiveRange()), c(4), mn(n.label()), c(), G(n.techIcon() ? 9 : -1);
|
|
160
155
|
}
|
|
161
156
|
}
|
|
162
157
|
function Ct(t, e) {
|
|
163
158
|
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
164
|
-
const n =
|
|
165
|
-
|
|
159
|
+
const n = O(2);
|
|
160
|
+
S("color", n.barColor())("active", !0);
|
|
166
161
|
}
|
|
167
162
|
}
|
|
168
163
|
function yt(t, e) {
|
|
169
|
-
if (t & 1 && u(0, "
|
|
170
|
-
const n =
|
|
171
|
-
|
|
164
|
+
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
165
|
+
const n = O(2);
|
|
166
|
+
S("color", n.barColor())("active", !1);
|
|
172
167
|
}
|
|
173
168
|
}
|
|
174
169
|
function Mt(t, e) {
|
|
175
|
-
if (t & 1 && (
|
|
176
|
-
const n =
|
|
177
|
-
|
|
170
|
+
if (t & 1 && u(0, "mat-icon", 12), t & 2) {
|
|
171
|
+
const n = O(2);
|
|
172
|
+
S("svgIcon", n.techIcon());
|
|
178
173
|
}
|
|
179
174
|
}
|
|
180
175
|
function It(t, e) {
|
|
181
|
-
if (t & 1 &&
|
|
182
|
-
const n =
|
|
183
|
-
|
|
176
|
+
if (t & 1 && (m(0, "div", 4)(1, "div", 21), R(2, Ct, 1, 2, "zui-bar-icon", 9, X), R(4, yt, 1, 2, "zui-bar-icon", 9, X), _(), m(6, "div", 22)(7, "span", 23), D(8), _(), W(9, Mt, 1, 1, "mat-icon", 12), _()()), t & 2) {
|
|
177
|
+
const n = O();
|
|
178
|
+
c(2), A(n.activeRange()), c(2), A(n.inactiveRange()), c(4), mn(n.formatLabel(n.label())), c(), G(n.techIcon() ? 9 : -1);
|
|
184
179
|
}
|
|
185
180
|
}
|
|
186
181
|
function Pt(t, e) {
|
|
187
182
|
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
188
|
-
const n =
|
|
189
|
-
|
|
183
|
+
const n = O(2);
|
|
184
|
+
S("color", n.barColor())("active", !0);
|
|
190
185
|
}
|
|
191
186
|
}
|
|
192
187
|
function Ot(t, e) {
|
|
193
|
-
if (t & 1 && (
|
|
194
|
-
const n =
|
|
195
|
-
|
|
188
|
+
if (t & 1 && u(0, "zui-bar-icon", 9), t & 2) {
|
|
189
|
+
const n = O(2);
|
|
190
|
+
S("color", n.barColor())("active", !1);
|
|
196
191
|
}
|
|
197
192
|
}
|
|
198
193
|
function Tt(t, e) {
|
|
199
|
-
if (t & 1 && (m(0, "div",
|
|
200
|
-
const n =
|
|
201
|
-
|
|
194
|
+
if (t & 1 && (m(0, "div", 5)(1, "div", 21), R(2, Pt, 1, 2, "zui-bar-icon", 9, X), R(4, Ot, 1, 2, "zui-bar-icon", 9, X), _(), m(6, "span", 19), D(7), _()()), t & 2) {
|
|
195
|
+
const n = O();
|
|
196
|
+
c(2), A(n.activeRange()), c(2), A(n.inactiveRange()), c(3), mn(n.label());
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function St(t, e) {
|
|
200
|
+
if (t & 1 && (m(0, "div", 26)(1, "span", 27), D(2), _()()), t & 2) {
|
|
201
|
+
const n = O(2);
|
|
202
|
+
c(2), mn(n.sublabel());
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
function $t(t, e) {
|
|
205
|
-
if (t & 1 && (m(0, "div", 6)(1, "div", 24)(2, "span", 25),
|
|
206
|
-
const n =
|
|
207
|
-
|
|
208
|
-
External`),
|
|
206
|
+
if (t & 1 && (m(0, "div", 6)(1, "div", 24)(2, "span", 25), D(3), _()(), W(4, St, 3, 1, "div", 26), _()), t & 2) {
|
|
207
|
+
const n = O();
|
|
208
|
+
c(3), $e("", n.label(), `
|
|
209
|
+
External`), c(), G(n.sublabel() ? 4 : -1);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
const xn = class xn {
|
|
212
213
|
constructor() {
|
|
213
|
-
this.variant =
|
|
214
|
+
this.variant = N.required(), this.label = N.required(), this.sublabel = N(), this.containers = N(), this.barColor = N("orange"), this.techIcon = N(), this.techIcons = N(), this.highlighted = N(!1), this.activeRange = j(() => {
|
|
214
215
|
const e = this.containers();
|
|
215
216
|
return e ? Array.from({ length: e.active }, (n, o) => o) : [];
|
|
216
217
|
}), this.inactiveRange = j(() => {
|
|
@@ -224,14 +225,14 @@ const xn = class xn {
|
|
|
224
225
|
};
|
|
225
226
|
xn.ɵfac = function(n) {
|
|
226
227
|
return new (n || xn)();
|
|
227
|
-
}, xn.ɵcmp = /* @__PURE__ */
|
|
228
|
-
n & 2 && (
|
|
228
|
+
}, xn.ɵcmp = /* @__PURE__ */ te({ type: xn, selectors: [["zw-diagram-node"]], hostVars: 4, hostBindings: function(n, o) {
|
|
229
|
+
n & 2 && (Ze("__node __node--" + o.variant()), bn("__node--highlighted", o.highlighted()));
|
|
229
230
|
}, inputs: { variant: [1, "variant"], label: [1, "label"], sublabel: [1, "sublabel"], containers: [1, "containers"], barColor: [1, "barColor"], techIcon: [1, "techIcon"], techIcons: [1, "techIcons"], highlighted: [1, "highlighted"] }, decls: 7, vars: 1, consts: [[1, "__endpoint-pill"], [1, "__infra-core-box"], [1, "__infra-side-box"], [1, "__balancer-box"], [1, "__service-box"], [1, "__service-highlighted-box"], [1, "__external-box"], [1, "__endpoint-label"], [1, "__bar-row", "__bar-row--infra"], [3, "color", "active"], [1, "__node-label", "__node-label--mono-core", "__node-label--multiline"], [1, "__tech-icons-row"], [1, "__tech-icon", 3, "svgIcon"], [1, "__bar-col"], [1, "__side-bottom"], [1, "__node-label", "__node-label--mono", "__node-label--side"], [1, "__tech-icon", "__tech-icon--side", 3, "svgIcon"], [1, "__bar-row", "__bar-row--balancer"], [1, "__balancer-label-area"], [1, "__node-label", "__node-label--mono", "__node-label--multiline"], [1, "__tech-icon", "__tech-icon--sm", 3, "svgIcon"], [1, "__bar-row"], [1, "__label-block"], [1, "__node-label", "__node-label--mono"], [1, "__ext-inner-card"], [1, "__node-label", "__node-label--mono", "__node-label--ext-text"], [1, "__ext-sublabel-frame"], [1, "__node-label", "__node-label--mono", "__node-label--sub"]], template: function(n, o) {
|
|
230
|
-
if (n & 1 && W(0,
|
|
231
|
+
if (n & 1 && W(0, ct, 3, 1, "div", 0)(1, pt, 11, 2, "div", 1)(2, mt, 8, 2, "div", 2)(3, wt, 10, 2, "div", 3)(4, It, 10, 2, "div", 4)(5, Tt, 8, 1, "div", 5)(6, $t, 5, 2, "div", 6), n & 2) {
|
|
231
232
|
let i;
|
|
232
233
|
G((i = o.variant()) === "endpoint" ? 0 : i === "infra-core" ? 1 : i === "infra-side" ? 2 : i === "balancer" ? 3 : i === "service" ? 4 : i === "service-highlighted" ? 5 : i === "external" ? 6 : -1);
|
|
233
234
|
}
|
|
234
|
-
}, dependencies: [
|
|
235
|
+
}, dependencies: [et, We, Ge], styles: [`[_nghost-%COMP%] {
|
|
235
236
|
display: block;
|
|
236
237
|
position: relative;
|
|
237
238
|
contain: layout style;
|
|
@@ -493,52 +494,52 @@ xn.ɵfac = function(n) {
|
|
|
493
494
|
background: #E8E7E7;
|
|
494
495
|
border-radius: 3px;
|
|
495
496
|
}`], changeDetection: 0 });
|
|
496
|
-
let
|
|
497
|
-
const
|
|
498
|
-
function
|
|
499
|
-
if (t & 1 && (
|
|
497
|
+
let ee = xn;
|
|
498
|
+
const zt = ["*"];
|
|
499
|
+
function kt(t, e) {
|
|
500
|
+
if (t & 1 && (Gn(), u(0, "path", 28)), t & 2) {
|
|
500
501
|
const n = e.$implicit;
|
|
501
502
|
en("d", n);
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
|
-
const
|
|
505
|
+
const se = {
|
|
505
506
|
ctrl: { active: 1, standby: 1 },
|
|
506
507
|
stats: { active: 1, standby: 0 },
|
|
507
508
|
logger: { active: 1, standby: 0 }
|
|
508
509
|
}, Dt = {
|
|
509
510
|
containers: { active: 2, standby: 0 }
|
|
510
511
|
};
|
|
511
|
-
var Mn,
|
|
512
|
+
var Mn, Fn, In, Pn, ln, dn, An;
|
|
512
513
|
const wn = class wn {
|
|
513
514
|
// ─── Lifecycle ──────────────────────────────────────────
|
|
514
515
|
constructor() {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
this.config =
|
|
516
|
+
T(this, dn);
|
|
517
|
+
T(this, Mn);
|
|
518
|
+
T(this, Fn);
|
|
519
|
+
T(this, In);
|
|
520
|
+
T(this, Pn);
|
|
521
|
+
T(this, ln);
|
|
522
|
+
this.config = N({}), this.lightweight = N(!1), this.showPaths = N(!0), this.internalPaths = un([]), this.pathsVisible = un(!0), h(this, Mn, Bn(ke)), h(this, Fn, Bn(De)), h(this, Pn, !1), this.resolvedInfra = {
|
|
522
523
|
ctrl: {
|
|
523
524
|
id: "ctrl",
|
|
524
525
|
label: `Project ctrl
|
|
525
526
|
& L3 balancer
|
|
526
527
|
+ firewall`,
|
|
527
|
-
containers:
|
|
528
|
+
containers: se.ctrl,
|
|
528
529
|
techIcons: ["go"],
|
|
529
530
|
highlighted: !0
|
|
530
531
|
},
|
|
531
532
|
stats: {
|
|
532
533
|
id: "stats",
|
|
533
534
|
label: "Stats",
|
|
534
|
-
containers:
|
|
535
|
+
containers: se.stats,
|
|
535
536
|
techIcon: "sqlite",
|
|
536
537
|
highlighted: !1
|
|
537
538
|
},
|
|
538
539
|
logger: {
|
|
539
540
|
id: "logger",
|
|
540
541
|
label: "Logger",
|
|
541
|
-
containers:
|
|
542
|
+
containers: se.logger,
|
|
542
543
|
techIcon: "victorialogs",
|
|
543
544
|
highlighted: !1
|
|
544
545
|
}
|
|
@@ -559,10 +560,10 @@ balancer`,
|
|
|
559
560
|
techIcon: "nginx",
|
|
560
561
|
highlighted: !0
|
|
561
562
|
}, ze(() => {
|
|
562
|
-
h(this, Pn, !0), h(this, ln, this.lightweight()), h(this, In, new ResizeObserver(() =>
|
|
563
|
-
requestAnimationFrame(() =>
|
|
563
|
+
h(this, Pn, !0), h(this, ln, this.lightweight()), h(this, In, new ResizeObserver(() => b(this, dn, An).call(this))), d(this, In).observe(d(this, Mn).nativeElement), d(this, Fn).onDestroy(() => d(this, In)?.disconnect()), requestAnimationFrame(() => {
|
|
564
|
+
requestAnimationFrame(() => b(this, dn, An).call(this));
|
|
564
565
|
});
|
|
565
|
-
}),
|
|
566
|
+
}), ne(() => {
|
|
566
567
|
this.config();
|
|
567
568
|
const e = this.lightweight();
|
|
568
569
|
if (!d(this, Pn))
|
|
@@ -571,17 +572,17 @@ balancer`,
|
|
|
571
572
|
h(this, ln, e), n ? (this.pathsVisible.set(!1), setTimeout(() => {
|
|
572
573
|
requestAnimationFrame(() => {
|
|
573
574
|
requestAnimationFrame(() => {
|
|
574
|
-
|
|
575
|
+
b(this, dn, An).call(this), this.pathsVisible.set(!0);
|
|
575
576
|
});
|
|
576
577
|
});
|
|
577
578
|
}, 200)) : requestAnimationFrame(() => {
|
|
578
|
-
requestAnimationFrame(() =>
|
|
579
|
+
requestAnimationFrame(() => b(this, dn, An).call(this));
|
|
579
580
|
});
|
|
580
581
|
});
|
|
581
582
|
}
|
|
582
583
|
};
|
|
583
|
-
Mn = new WeakMap(),
|
|
584
|
-
|
|
584
|
+
Mn = new WeakMap(), Fn = new WeakMap(), In = new WeakMap(), Pn = new WeakMap(), ln = new WeakMap(), dn = new WeakSet(), // ─── Internal path computation ──────────────────────────
|
|
585
|
+
An = function() {
|
|
585
586
|
if (!this.showPaths()) {
|
|
586
587
|
this.internalPaths.set([]);
|
|
587
588
|
return;
|
|
@@ -592,70 +593,70 @@ Rn = function() {
|
|
|
592
593
|
const o = n.getBoundingClientRect();
|
|
593
594
|
if (o.width === 0)
|
|
594
595
|
return;
|
|
595
|
-
const i = (
|
|
596
|
-
const
|
|
596
|
+
const i = (w) => Math.round(w * 10) / 10, y = (w) => {
|
|
597
|
+
const x = w.getBoundingClientRect();
|
|
597
598
|
return [
|
|
598
|
-
i(
|
|
599
|
-
i(
|
|
599
|
+
i(x.left - o.left + x.width / 2),
|
|
600
|
+
i(x.top - o.top + x.height)
|
|
600
601
|
];
|
|
601
|
-
}, v = (
|
|
602
|
-
const
|
|
602
|
+
}, v = (w) => {
|
|
603
|
+
const x = w.getBoundingClientRect();
|
|
603
604
|
return [
|
|
604
|
-
i(
|
|
605
|
-
i(
|
|
605
|
+
i(x.left - o.left + x.width / 2),
|
|
606
|
+
i(x.top - o.top)
|
|
606
607
|
];
|
|
607
|
-
},
|
|
608
|
-
const [z,
|
|
608
|
+
}, s = [], k = 16, q = 27, V = (w, x, C) => {
|
|
609
|
+
const [z, $] = w, [L, K] = x, tn = L - z;
|
|
609
610
|
if (Math.abs(tn) < 3) {
|
|
610
|
-
const
|
|
611
|
-
return `M${
|
|
611
|
+
const nn = i((z + L) / 2);
|
|
612
|
+
return `M${nn},${i($)}L${nn},${i(K)}`;
|
|
612
613
|
}
|
|
613
|
-
const
|
|
614
|
+
const H = Math.min(k, Math.abs(tn) / 2, Math.abs(C - $) / 2, Math.abs(K - C) / 2), B = Math.sign(tn), U = Math.sign(K - C) || 1;
|
|
614
615
|
return [
|
|
615
|
-
`M${i(z)},${i(
|
|
616
|
-
`L${i(z)},${i(
|
|
617
|
-
`Q${i(z)},${i(
|
|
618
|
-
`L${i(
|
|
619
|
-
`Q${i(
|
|
620
|
-
`L${i(
|
|
616
|
+
`M${i(z)},${i($)}`,
|
|
617
|
+
`L${i(z)},${i(C - H)}`,
|
|
618
|
+
`Q${i(z)},${i(C)},${i(z + H * B)},${i(C)}`,
|
|
619
|
+
`L${i(L - H * B)},${i(C)}`,
|
|
620
|
+
`Q${i(L)},${i(C)},${i(L)},${i(C + H * U)}`,
|
|
621
|
+
`L${i(L)},${i(K)}`
|
|
621
622
|
].join("");
|
|
622
|
-
},
|
|
623
|
+
}, E = n.querySelector(".__zone--services");
|
|
623
624
|
if (this.lightweight()) {
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
const
|
|
627
|
-
if (
|
|
628
|
-
const [
|
|
629
|
-
|
|
625
|
+
const w = n.querySelector('[data-mode="lw"]');
|
|
626
|
+
if (w && E) {
|
|
627
|
+
const x = w.querySelector(".__infra-group");
|
|
628
|
+
if (x) {
|
|
629
|
+
const [C, z] = y(x), $ = v(E)[1];
|
|
630
|
+
s.push(`M${i(C)},${i(z)}L${i(C)},${i($)}`);
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
633
|
} else {
|
|
633
|
-
const
|
|
634
|
-
if (!
|
|
635
|
-
this.internalPaths.set(
|
|
634
|
+
const w = n.querySelector('[data-mode="hw"]');
|
|
635
|
+
if (!w) {
|
|
636
|
+
this.internalPaths.set(s);
|
|
636
637
|
return;
|
|
637
638
|
}
|
|
638
|
-
const
|
|
639
|
-
if (
|
|
640
|
-
const
|
|
639
|
+
const x = w.querySelector(".__infra-group"), C = w.querySelector('[data-node-id="ctrl"]'), z = w.querySelector('[data-node-id="l7"]');
|
|
640
|
+
if (x && C && z) {
|
|
641
|
+
const $ = y(C)[0], L = y(x)[1], K = [$, L], tn = Array.from(z.querySelectorAll("zui-bar-icon")), H = this.resolvedRoutingDisplay.containers.active;
|
|
641
642
|
for (let B = 0; B < tn.length; B++) {
|
|
642
|
-
if (B >=
|
|
643
|
+
if (B >= H)
|
|
643
644
|
continue;
|
|
644
|
-
const U = v(tn[B]),
|
|
645
|
-
|
|
645
|
+
const U = v(tn[B]), nn = U[1] - q;
|
|
646
|
+
s.push(V(K, U, nn));
|
|
646
647
|
}
|
|
647
|
-
if (
|
|
648
|
-
const [B, U] =
|
|
649
|
-
|
|
648
|
+
if (E) {
|
|
649
|
+
const [B, U] = y(z), nn = v(E)[1];
|
|
650
|
+
s.push(`M${i(B)},${i(U)}L${i(B)},${i(nn)}`);
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
653
|
}
|
|
653
|
-
this.internalPaths.set(
|
|
654
|
+
this.internalPaths.set(s);
|
|
654
655
|
}, wn.ɵfac = function(n) {
|
|
655
656
|
return new (n || wn)();
|
|
656
|
-
}, wn.ɵcmp = /* @__PURE__ */
|
|
657
|
-
n & 1 && (
|
|
658
|
-
}, dependencies: [
|
|
657
|
+
}, wn.ɵcmp = /* @__PURE__ */ te({ type: wn, selectors: [["zw-project-shell"]], inputs: { config: [1, "config"], lightweight: [1, "lightweight"], showPaths: [1, "showPaths"] }, ngContentSelectors: zt, decls: 48, vars: 28, consts: [[1, "__project"], [1, "__project-header"], [1, "__project-title"], [1, "__vxlan-label"], [1, "__infra-stack"], ["data-mode", "lw", 1, "__infra-mode"], [1, "__infra-mode-inner"], [1, "__zone", "__zone--infra", "__zone--infra-lightweight"], [1, "__zone-label"], [1, "__infra-content", "__infra-content--lightweight"], [1, "__infra-group"], ["data-node-id", "core-lw"], ["variant", "infra-core", "barColor", "orange", 3, "label", "containers", "techIcons", "highlighted"], ["data-mode", "hw", 1, "__infra-mode"], [1, "__zone", "__zone--infra"], [1, "__infra-content"], ["data-node-id", "ctrl"], [1, "__infra-side-nodes"], ["data-node-id", "stats"], ["variant", "infra-side", "barColor", "orange", 3, "label", "containers", "techIcon", "highlighted"], ["data-node-id", "logger"], [1, "__zone-spacer", "__zone-spacer--infra-to-routing"], [1, "__zone", "__zone--routing"], [1, "__routing-content"], ["data-node-id", "l7"], ["variant", "balancer", "barColor", "orange", 3, "label", "containers", "techIcon", "highlighted"], ["data-spacer", "routing-services", 1, "__zone-spacer", "__zone-spacer--routing-to-services"], [1, "__svg-layer"], [1, "__path-base"]], template: function(n, o) {
|
|
658
|
+
n & 1 && (He(), m(0, "div", 0)(1, "div", 1)(2, "span", 2), D(3, "Project"), _(), m(4, "span", 3), D(5, "Private VXLAN network"), _()(), m(6, "div", 4)(7, "div", 5)(8, "div", 6)(9, "div", 7)(10, "span", 8), D(11, "Dedicated"), u(12, "br"), D(13, "infrastructure"), u(14, "br"), D(15, "core with routing"), u(16, "br"), D(17, "and balancing"), _(), m(18, "div", 9)(19, "div", 10)(20, "div", 11), u(21, "zw-diagram-node", 12), _()()()()()(), m(22, "div", 13)(23, "div", 6)(24, "div", 14)(25, "span", 8), D(26, "Dedicated infrastructure core"), _(), m(27, "div", 15)(28, "div", 10)(29, "div", 16), u(30, "zw-diagram-node", 12), _(), m(31, "div", 17)(32, "div", 18), u(33, "zw-diagram-node", 19), _(), m(34, "div", 20), u(35, "zw-diagram-node", 19), _()()()()(), u(36, "div", 21), m(37, "div", 22)(38, "span", 8), D(39, "Dedicated routing and balancing"), _(), m(40, "div", 23)(41, "div", 24), u(42, "zw-diagram-node", 25), _()()()()()(), u(43, "div", 26), Ue(44), Gn(), m(45, "svg", 27), R(46, kt, 1, 1, ":svg:path", 28, he), _()()), n & 2 && (bn("__project--lightweight", o.lightweight()), c(7), bn("__infra-mode--active", o.lightweight()), c(14), S("label", o.resolvedLightweightNode.label)("containers", o.resolvedLightweightNode.containers)("techIcons", o.resolvedLightweightNode.techIcons)("highlighted", o.resolvedLightweightNode.highlighted), c(), bn("__infra-mode--active", !o.lightweight()), c(8), S("label", o.resolvedInfra.ctrl.label)("containers", o.resolvedInfra.ctrl.containers)("techIcons", o.resolvedInfra.ctrl.techIcons)("highlighted", o.resolvedInfra.ctrl.highlighted), c(3), S("label", o.resolvedInfra.stats.label)("containers", o.resolvedInfra.stats.containers)("techIcon", o.resolvedInfra.stats.techIcon)("highlighted", o.resolvedInfra.stats.highlighted), c(2), S("label", o.resolvedInfra.logger.label)("containers", o.resolvedInfra.logger.containers)("techIcon", o.resolvedInfra.logger.techIcon)("highlighted", o.resolvedInfra.logger.highlighted), c(7), S("label", o.resolvedRoutingDisplay.label)("containers", o.resolvedRoutingDisplay.containers)("techIcon", o.resolvedRoutingDisplay.techIcon)("highlighted", o.resolvedRoutingDisplay.highlighted), c(3), bn("__svg-layer--visible", o.pathsVisible()), c(), A(o.internalPaths()));
|
|
659
|
+
}, dependencies: [ee], styles: [`[_nghost-%COMP%] {
|
|
659
660
|
display: block;
|
|
660
661
|
position: relative;
|
|
661
662
|
}
|
|
@@ -827,108 +828,109 @@ Rn = function() {
|
|
|
827
828
|
stroke-linecap: round;
|
|
828
829
|
stroke-linejoin: round;
|
|
829
830
|
}`], changeDetection: 0 });
|
|
830
|
-
let
|
|
831
|
-
const
|
|
831
|
+
let ge = wn;
|
|
832
|
+
const _e = (t, e) => e.service.id;
|
|
832
833
|
function Nt(t, e) {
|
|
833
|
-
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13),
|
|
834
|
+
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13), _()), t & 2) {
|
|
834
835
|
const n = e.$implicit;
|
|
835
|
-
en("data-node-id", n.service.id),
|
|
836
|
+
en("data-node-id", n.service.id), c(), S("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
|
|
836
837
|
}
|
|
837
838
|
}
|
|
838
839
|
function Et(t, e) {
|
|
839
|
-
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13),
|
|
840
|
+
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13), _()), t & 2) {
|
|
840
841
|
const n = e.$implicit;
|
|
841
|
-
en("data-node-id", n.service.id),
|
|
842
|
+
en("data-node-id", n.service.id), c(), S("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
|
|
842
843
|
}
|
|
843
844
|
}
|
|
844
|
-
function
|
|
845
|
-
if (t & 1 && (m(0, "div", 8), R(1, Et, 2, 5, "div", null,
|
|
846
|
-
const n =
|
|
847
|
-
|
|
845
|
+
function Rt(t, e) {
|
|
846
|
+
if (t & 1 && (m(0, "div", 8), R(1, Et, 2, 5, "div", null, _e), _()), t & 2) {
|
|
847
|
+
const n = O();
|
|
848
|
+
c(), A(n.row1SideServices());
|
|
848
849
|
}
|
|
849
850
|
}
|
|
850
|
-
function
|
|
851
|
+
function At(t, e) {
|
|
851
852
|
t & 1 && u(0, "div");
|
|
852
853
|
}
|
|
853
854
|
function Lt(t, e) {
|
|
854
|
-
if (t & 1 && (m(0, "div", 14)(1, "div", 15), u(2, "zw-diagram-node", 16),
|
|
855
|
-
const n = e, o =
|
|
856
|
-
en("data-node-id", o.service.id + "-compound"),
|
|
855
|
+
if (t & 1 && (m(0, "div", 14)(1, "div", 15), u(2, "zw-diagram-node", 16), _(), m(3, "div", 17), u(4, "zw-diagram-node", 13), _()()), t & 2) {
|
|
856
|
+
const n = e, o = O().$implicit;
|
|
857
|
+
en("data-node-id", o.service.id + "-compound"), c(), en("data-node-id", n.id), c(), S("label", n.label)("containers", n.containers)("barColor", n.barColor)("highlighted", !0), c(), en("data-node-id", o.service.id), c(), S("label", o.service.label)("containers", o.service.containers)("barColor", o.barColor)("techIcon", o.service.techIcon);
|
|
857
858
|
}
|
|
858
859
|
}
|
|
859
|
-
function
|
|
860
|
-
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13),
|
|
861
|
-
const n =
|
|
862
|
-
en("data-node-id", n.service.id),
|
|
860
|
+
function Bt(t, e) {
|
|
861
|
+
if (t & 1 && (m(0, "div"), u(1, "zw-diagram-node", 13), _()), t & 2) {
|
|
862
|
+
const n = O().$implicit;
|
|
863
|
+
en("data-node-id", n.service.id), c(), S("label", n.service.label)("containers", n.service.containers)("barColor", n.barColor)("techIcon", n.service.techIcon);
|
|
863
864
|
}
|
|
864
865
|
}
|
|
865
|
-
function
|
|
866
|
-
if (t & 1 && W(0, Lt, 5, 11, "div", 14)(1,
|
|
866
|
+
function Ft(t, e) {
|
|
867
|
+
if (t & 1 && W(0, Lt, 5, 11, "div", 14)(1, Bt, 2, 5, "div"), t & 2) {
|
|
867
868
|
let n;
|
|
868
869
|
const o = e.$implicit;
|
|
869
870
|
G((n = o.loadBalancer) ? 0 : 1, n);
|
|
870
871
|
}
|
|
871
872
|
}
|
|
872
|
-
function
|
|
873
|
-
if (t & 1 && (m(0, "div", 11), u(1, "zw-diagram-node", 18),
|
|
873
|
+
function jt(t, e) {
|
|
874
|
+
if (t & 1 && (m(0, "div", 11), u(1, "zw-diagram-node", 18), _()), t & 2) {
|
|
874
875
|
const n = e;
|
|
875
|
-
|
|
876
|
+
c(), S("label", n.label)("sublabel", n.sublabel);
|
|
876
877
|
}
|
|
877
878
|
}
|
|
878
|
-
function
|
|
879
|
-
if (t & 1 && (
|
|
880
|
-
const n =
|
|
879
|
+
function qt(t, e) {
|
|
880
|
+
if (t & 1 && (Gn(), u(0, "path", 19)), t & 2) {
|
|
881
|
+
const n = O().$implicit;
|
|
881
882
|
en("d", n.d);
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
|
-
function
|
|
885
|
-
if (t & 1 && W(0,
|
|
885
|
+
function Vt(t, e) {
|
|
886
|
+
if (t & 1 && W(0, qt, 1, 1, ":svg:path", 19), t & 2) {
|
|
886
887
|
const n = e.$implicit;
|
|
887
888
|
G(n.renderMode !== "glow-only" ? 0 : -1);
|
|
888
889
|
}
|
|
889
890
|
}
|
|
890
|
-
function
|
|
891
|
-
if (t & 1 && (
|
|
892
|
-
const n =
|
|
891
|
+
function Wt(t, e) {
|
|
892
|
+
if (t & 1 && (Gn(), u(0, "path", 20)), t & 2) {
|
|
893
|
+
const n = O(), o = n.$implicit, i = n.$index;
|
|
893
894
|
en("d", o.d)("data-path-idx", i);
|
|
894
895
|
}
|
|
895
896
|
}
|
|
896
|
-
function
|
|
897
|
-
if (t & 1 && W(0,
|
|
897
|
+
function Gt(t, e) {
|
|
898
|
+
if (t & 1 && W(0, Wt, 1, 2, ":svg:path", 20), t & 2) {
|
|
898
899
|
const n = e.$implicit;
|
|
899
900
|
G(n.renderMode !== "base-only" ? 0 : -1);
|
|
900
901
|
}
|
|
901
902
|
}
|
|
902
|
-
const
|
|
903
|
+
const Zt = 660, ce = {
|
|
903
904
|
ctrl: { active: 1, standby: 1 },
|
|
904
905
|
stats: { active: 1, standby: 0 },
|
|
905
906
|
logger: { active: 1, standby: 0 }
|
|
906
907
|
}, Ht = {
|
|
907
908
|
containers: { active: 2, standby: 0 }
|
|
908
|
-
}, En = 600,
|
|
909
|
-
var
|
|
909
|
+
}, En = 600, Rn = 1050, le = 525, de = 900, Ut = 3300, Jt = 900, Te = 2250, Yt = 2e3, Qt = 400;
|
|
910
|
+
var Q, On, Tn, jn, Sn, Z, hn, gn, $n, qn, _n, pn, fn, on, an, rn, l, Ln, Re, Ae, fe, Le, Yn, Be, ue, Qn, Fe, je, qe, Ve, Xn, Kn, me;
|
|
910
911
|
const Cn = class Cn {
|
|
911
912
|
// ─── Lifecycle ──────────────────────────────────────────
|
|
912
913
|
constructor() {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
914
|
+
T(this, l);
|
|
915
|
+
T(this, Q);
|
|
916
|
+
T(this, On);
|
|
917
|
+
T(this, Tn);
|
|
918
|
+
T(this, jn);
|
|
919
|
+
T(this, Sn);
|
|
920
|
+
T(this, Z);
|
|
920
921
|
// rAF id for coalesced recomputation
|
|
921
|
-
|
|
922
|
-
|
|
922
|
+
T(this, hn);
|
|
923
|
+
T(this, gn);
|
|
924
|
+
T(this, $n);
|
|
923
925
|
// ─── Trace orchestrator state ──────────────────────────
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
this.config =
|
|
926
|
+
T(this, qn);
|
|
927
|
+
T(this, _n);
|
|
928
|
+
T(this, pn);
|
|
929
|
+
T(this, fn);
|
|
930
|
+
T(this, on);
|
|
931
|
+
T(this, an);
|
|
932
|
+
T(this, rn);
|
|
933
|
+
this.config = N(Ee), this.lightweight = N(!1), this.annotatedPaths = un([]), this.pathsVisible = un(!0), h(this, Q, Bn(ke)), h(this, On, Bn(De)), h(this, jn, 1), h(this, Sn, !1), h(this, Z, 0), h(this, gn, !1), h(this, $n, 0), h(this, qn, 0), h(this, _n, 0), h(this, pn, 0), h(this, fn, !1), h(this, on, !1), h(this, an, /* @__PURE__ */ new Map()), h(this, rn, /* @__PURE__ */ new Map()), this.shellConfig = j(() => ({
|
|
932
934
|
infrastructure: this.config().infrastructure,
|
|
933
935
|
routing: this.config().routing
|
|
934
936
|
})), this.resolvedInfra = j(() => {
|
|
@@ -939,21 +941,21 @@ const Cn = class Cn {
|
|
|
939
941
|
label: `Project ctrl
|
|
940
942
|
& L3 balancer
|
|
941
943
|
+ firewall`,
|
|
942
|
-
containers: e.ctrl ??
|
|
944
|
+
containers: e.ctrl ?? ce.ctrl,
|
|
943
945
|
techIcons: ["go"],
|
|
944
946
|
highlighted: !0
|
|
945
947
|
},
|
|
946
948
|
stats: {
|
|
947
949
|
id: "stats",
|
|
948
950
|
label: "Stats",
|
|
949
|
-
containers: e.stats ??
|
|
951
|
+
containers: e.stats ?? ce.stats,
|
|
950
952
|
techIcon: "sqlite",
|
|
951
953
|
highlighted: !1
|
|
952
954
|
},
|
|
953
955
|
logger: {
|
|
954
956
|
id: "logger",
|
|
955
957
|
label: "Logger",
|
|
956
|
-
containers: e.logger ??
|
|
958
|
+
containers: e.logger ?? ce.logger,
|
|
957
959
|
techIcon: "victorialogs",
|
|
958
960
|
highlighted: !1
|
|
959
961
|
}
|
|
@@ -968,100 +970,100 @@ balancer`,
|
|
|
968
970
|
techIcon: "nginx",
|
|
969
971
|
highlighted: !0
|
|
970
972
|
} : null;
|
|
971
|
-
}), this.row1MainServices = j(() => this.config().services.filter((e) => e.category === "http-runtime").map((e) =>
|
|
973
|
+
}), this.row1MainServices = j(() => this.config().services.filter((e) => e.category === "http-runtime").map((e) => b(this, l, Yn).call(this, e))), this.row1SideServices = j(() => this.config().services.filter((e) => e.category === "side-runtime").map((e) => b(this, l, Yn).call(this, e))), this.row1Services = j(() => [...this.row1MainServices()]), this.row2Services = j(() => this.config().services.filter((e) => e.category !== "http-runtime" && e.category !== "side-runtime").map((e) => b(this, l, Yn).call(this, e))), this.resolvedStorage = j(() => {
|
|
972
974
|
const e = this.config().storage;
|
|
973
975
|
return e ? {
|
|
974
976
|
label: e.label ?? "Object storage",
|
|
975
977
|
sublabel: e.sublabel ?? "storage:6379"
|
|
976
978
|
} : null;
|
|
977
979
|
}), ze(() => {
|
|
978
|
-
h(this,
|
|
979
|
-
|
|
980
|
-
})), d(this, Tn).observe(d(this,
|
|
981
|
-
d(this, Tn)?.disconnect(),
|
|
982
|
-
}),
|
|
980
|
+
h(this, Sn, !0), h(this, hn, this.lightweight()), h(this, Tn, new ResizeObserver(() => {
|
|
981
|
+
b(this, l, Ln).call(this);
|
|
982
|
+
})), d(this, Tn).observe(d(this, Q).nativeElement), d(this, On).onDestroy(() => {
|
|
983
|
+
d(this, Tn)?.disconnect(), b(this, l, ue).call(this), d(this, Z) && cancelAnimationFrame(d(this, Z));
|
|
984
|
+
}), b(this, l, Ln).call(this);
|
|
983
985
|
const e = new IntersectionObserver(([n]) => {
|
|
984
|
-
n.isIntersecting ?
|
|
986
|
+
n.isIntersecting ? b(this, l, Be).call(this) : b(this, l, ue).call(this);
|
|
985
987
|
}, { rootMargin: "200px 0px" });
|
|
986
|
-
e.observe(d(this,
|
|
987
|
-
}),
|
|
988
|
+
e.observe(d(this, Q).nativeElement), d(this, On).onDestroy(() => e.disconnect());
|
|
989
|
+
}), ne(() => {
|
|
988
990
|
this.config();
|
|
989
991
|
const e = this.lightweight();
|
|
990
|
-
if (!d(this,
|
|
992
|
+
if (!d(this, Sn))
|
|
991
993
|
return;
|
|
992
994
|
const n = d(this, hn) !== void 0 && d(this, hn) !== e;
|
|
993
|
-
h(this, hn, e), n ? (this.pathsVisible.set(!1),
|
|
994
|
-
h(this, gn, !0),
|
|
995
|
-
}, 400)) :
|
|
995
|
+
h(this, hn, e), n ? (this.pathsVisible.set(!1), b(this, l, Qn).call(this), b(this, l, Le).call(this), setTimeout(() => {
|
|
996
|
+
h(this, gn, !0), b(this, l, Ln).call(this);
|
|
997
|
+
}, 400)) : b(this, l, Ln).call(this);
|
|
996
998
|
});
|
|
997
999
|
}
|
|
998
1000
|
};
|
|
999
|
-
|
|
1001
|
+
Q = new WeakMap(), On = new WeakMap(), Tn = new WeakMap(), jn = new WeakMap(), Sn = new WeakMap(), Z = new WeakMap(), hn = new WeakMap(), gn = new WeakMap(), $n = new WeakMap(), qn = new WeakMap(), _n = new WeakMap(), pn = new WeakMap(), fn = new WeakMap(), on = new WeakMap(), an = new WeakMap(), rn = new WeakMap(), l = new WeakSet(), // ─── Private ────────────────────────────────────────────
|
|
1000
1002
|
/**
|
|
1001
1003
|
* Coalesces all path recomputation requests through a single double-rAF.
|
|
1002
1004
|
* Prevents stale DOM measurements when ResizeObserver fires before Angular
|
|
1003
1005
|
* has flushed template changes from a config update.
|
|
1004
1006
|
*/
|
|
1005
1007
|
Ln = function() {
|
|
1006
|
-
d(this,
|
|
1007
|
-
h(this,
|
|
1008
|
-
h(this,
|
|
1008
|
+
d(this, Z) && cancelAnimationFrame(d(this, Z)), h(this, Z, requestAnimationFrame(() => {
|
|
1009
|
+
h(this, Z, requestAnimationFrame(() => {
|
|
1010
|
+
h(this, Z, 0), b(this, l, Qn).call(this), b(this, l, Re).call(this), b(this, l, Ae).call(this);
|
|
1009
1011
|
}));
|
|
1010
1012
|
}));
|
|
1011
1013
|
}, Re = function() {
|
|
1012
|
-
const e = d(this,
|
|
1013
|
-
h(this,
|
|
1014
|
+
const e = d(this, Q).nativeElement, o = e.clientWidth / Zt;
|
|
1015
|
+
h(this, jn, o), e.style.setProperty("--diagram-scale", String(o));
|
|
1014
1016
|
const i = e.querySelector(".__canvas");
|
|
1015
1017
|
i && (e.style.height = `${i.scrollHeight * o}px`);
|
|
1016
|
-
},
|
|
1017
|
-
const e = d(this,
|
|
1018
|
+
}, Ae = function() {
|
|
1019
|
+
const e = d(this, Q).nativeElement, n = e.querySelector(".__canvas");
|
|
1018
1020
|
if (!n)
|
|
1019
1021
|
return;
|
|
1020
1022
|
const o = n.getBoundingClientRect();
|
|
1021
1023
|
if (o.width === 0)
|
|
1022
1024
|
return;
|
|
1023
|
-
const i = o.width / n.offsetWidth,
|
|
1024
|
-
const
|
|
1025
|
+
const i = o.width / n.offsetWidth, y = (r) => {
|
|
1026
|
+
const g = r.getBoundingClientRect();
|
|
1025
1027
|
return {
|
|
1026
|
-
x: (
|
|
1027
|
-
y: (
|
|
1028
|
-
w:
|
|
1029
|
-
h:
|
|
1028
|
+
x: (g.left - o.left) / i,
|
|
1029
|
+
y: (g.top - o.top) / i,
|
|
1030
|
+
w: g.width / i,
|
|
1031
|
+
h: g.height / i
|
|
1030
1032
|
};
|
|
1031
1033
|
}, v = (r) => {
|
|
1032
|
-
const
|
|
1033
|
-
return [
|
|
1034
|
-
},
|
|
1035
|
-
const
|
|
1036
|
-
return [
|
|
1037
|
-
},
|
|
1038
|
-
const p =
|
|
1039
|
-
return p ? Array.from(p.querySelectorAll("zui-bar-icon")).map((f,
|
|
1034
|
+
const g = y(r);
|
|
1035
|
+
return [g.x + g.w / 2, g.y];
|
|
1036
|
+
}, s = (r) => {
|
|
1037
|
+
const g = y(r);
|
|
1038
|
+
return [g.x + g.w / 2, g.y + g.h];
|
|
1039
|
+
}, k = (r) => n.querySelector(`[data-node-id="${r}"]`), q = (r, g) => {
|
|
1040
|
+
const p = k(r);
|
|
1041
|
+
return p ? Array.from(p.querySelectorAll("zui-bar-icon")).map((f, I) => ({
|
|
1040
1042
|
point: v(f),
|
|
1041
|
-
barIndex:
|
|
1042
|
-
active:
|
|
1043
|
+
barIndex: I,
|
|
1044
|
+
active: g !== void 0 ? I < g : !0
|
|
1043
1045
|
})) : [];
|
|
1044
|
-
}, V = 16,
|
|
1045
|
-
const [f,
|
|
1046
|
+
}, V = 16, E = 27, a = (r) => Math.round(r * 10) / 10, w = (r, g, p) => {
|
|
1047
|
+
const [f, I] = r, [M, P] = g, sn = M - f;
|
|
1046
1048
|
if (Math.abs(sn) < 3) {
|
|
1047
|
-
const cn = a((f +
|
|
1048
|
-
return `M${cn},${a(
|
|
1049
|
+
const cn = a((f + M) / 2);
|
|
1050
|
+
return `M${cn},${a(I)}L${cn},${a(P)}`;
|
|
1049
1051
|
}
|
|
1050
|
-
const F = Math.min(V, Math.abs(sn) / 2, Math.abs(p -
|
|
1052
|
+
const F = Math.min(V, Math.abs(sn) / 2, Math.abs(p - I) / 2, Math.abs(P - p) / 2), J = Math.sign(sn), Un = Math.sign(P - p) || 1;
|
|
1051
1053
|
return [
|
|
1052
|
-
`M${a(f)},${a(
|
|
1054
|
+
`M${a(f)},${a(I)}`,
|
|
1053
1055
|
`L${a(f)},${a(p - F)}`,
|
|
1054
1056
|
`Q${a(f)},${a(p)},${a(f + F * J)},${a(p)}`,
|
|
1055
|
-
`L${a(
|
|
1056
|
-
`Q${a(
|
|
1057
|
-
`L${a(
|
|
1057
|
+
`L${a(M - F * J)},${a(p)}`,
|
|
1058
|
+
`Q${a(M)},${a(p)},${a(M)},${a(p + F * Un)}`,
|
|
1059
|
+
`L${a(M)},${a(P)}`
|
|
1058
1060
|
].join("");
|
|
1059
|
-
},
|
|
1060
|
-
if (
|
|
1061
|
-
const r =
|
|
1062
|
-
for (const f of
|
|
1063
|
-
|
|
1064
|
-
d:
|
|
1061
|
+
}, x = [], C = this.lightweight(), z = C ? "core-lw" : "ctrl", $ = C ? 2 : 3, L = C ? 3 : 4, K = k("endpoint"), tn = this.resolvedInfra(), H = q(z, C ? void 0 : tn.ctrl.containers.active);
|
|
1062
|
+
if (K && H.length) {
|
|
1063
|
+
const r = s(K), p = Math.min(...H.map((f) => f.point[1])) - E;
|
|
1064
|
+
for (const f of H)
|
|
1065
|
+
x.push({
|
|
1066
|
+
d: w(r, f.point, p),
|
|
1065
1067
|
depth: 0,
|
|
1066
1068
|
sourceNodeId: "endpoint",
|
|
1067
1069
|
targetNodeId: z,
|
|
@@ -1069,110 +1071,106 @@ Ln = function() {
|
|
|
1069
1071
|
active: f.active
|
|
1070
1072
|
});
|
|
1071
1073
|
}
|
|
1072
|
-
const B = n.querySelector(".__infra-mode--active .__infra-group"), U =
|
|
1073
|
-
if (!
|
|
1074
|
-
const r = q("l7",
|
|
1074
|
+
const B = n.querySelector(".__infra-mode--active .__infra-group"), U = k("l7"), nn = k("ctrl"), be = this.resolvedRouting();
|
|
1075
|
+
if (!C && nn && U && B && be) {
|
|
1076
|
+
const r = q("l7", be.containers.active);
|
|
1075
1077
|
if (r.length) {
|
|
1076
|
-
const
|
|
1077
|
-
for (const
|
|
1078
|
-
|
|
1079
|
-
d:
|
|
1078
|
+
const g = s(nn)[0], p = s(B)[1], f = [g, p], M = Math.min(...r.map((P) => P.point[1])) - E;
|
|
1079
|
+
for (const P of r)
|
|
1080
|
+
x.push({
|
|
1081
|
+
d: w(f, P.point, M),
|
|
1080
1082
|
depth: 1,
|
|
1081
1083
|
sourceNodeId: "ctrl",
|
|
1082
1084
|
targetNodeId: "l7",
|
|
1083
|
-
targetBarIndex:
|
|
1084
|
-
active:
|
|
1085
|
+
targetBarIndex: P.barIndex,
|
|
1086
|
+
active: P.active
|
|
1085
1087
|
});
|
|
1086
1088
|
}
|
|
1087
1089
|
}
|
|
1088
|
-
let
|
|
1089
|
-
if (
|
|
1090
|
-
const r =
|
|
1091
|
-
r && B && (
|
|
1092
|
-
} else U && (
|
|
1093
|
-
if (
|
|
1094
|
-
const r =
|
|
1095
|
-
for (const
|
|
1096
|
-
const p = q(
|
|
1090
|
+
let Zn = null;
|
|
1091
|
+
if (C) {
|
|
1092
|
+
const r = k(z);
|
|
1093
|
+
r && B && (Zn = [s(r)[0], s(B)[1]]);
|
|
1094
|
+
} else U && (Zn = s(U));
|
|
1095
|
+
if (Zn) {
|
|
1096
|
+
const r = C ? z : "l7";
|
|
1097
|
+
for (const g of this.row1Services()) {
|
|
1098
|
+
const p = q(g.service.id, g.service.containers.active);
|
|
1097
1099
|
if (p.length) {
|
|
1098
|
-
const f =
|
|
1099
|
-
for (const
|
|
1100
|
-
|
|
1101
|
-
d:
|
|
1102
|
-
depth:
|
|
1100
|
+
const f = Zn, I = Math.min(...p.map((P) => P.point[1])), M = (f[1] + I) / 2;
|
|
1101
|
+
for (const P of p)
|
|
1102
|
+
x.push({
|
|
1103
|
+
d: w(f, P.point, M),
|
|
1104
|
+
depth: C ? 1 : 2,
|
|
1103
1105
|
sourceNodeId: r,
|
|
1104
|
-
targetNodeId:
|
|
1105
|
-
targetBarIndex:
|
|
1106
|
-
active:
|
|
1106
|
+
targetNodeId: g.service.id,
|
|
1107
|
+
targetBarIndex: P.barIndex,
|
|
1108
|
+
active: P.active
|
|
1107
1109
|
});
|
|
1108
1110
|
}
|
|
1109
1111
|
}
|
|
1110
1112
|
}
|
|
1111
|
-
const
|
|
1113
|
+
const xe = 19, oe = 11, Dn = [], Nn = [];
|
|
1112
1114
|
for (const r of this.row2Services())
|
|
1113
1115
|
if (r.loadBalancer)
|
|
1114
|
-
for (const
|
|
1115
|
-
Nn.push({ ...
|
|
1116
|
+
for (const g of q(r.loadBalancer.id, r.loadBalancer.containers.active))
|
|
1117
|
+
Nn.push({ ...g, nodeId: r.loadBalancer.id });
|
|
1116
1118
|
else
|
|
1117
|
-
for (const
|
|
1118
|
-
Dn.push({ ...
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
be.style.top = `${Math.round(l + 11)}px`;
|
|
1123
|
-
}
|
|
1124
|
-
const xe = D("storage"), Hn = xe ? v(xe) : null;
|
|
1125
|
-
let vn = 0, we = 0;
|
|
1119
|
+
for (const g of q(r.service.id, r.service.containers.active))
|
|
1120
|
+
Dn.push({ ...g, nodeId: r.service.id });
|
|
1121
|
+
b(this, l, fe).call(this, n);
|
|
1122
|
+
const we = k("storage"), Hn = we ? v(we) : null;
|
|
1123
|
+
let vn = 0, Ce = 0;
|
|
1126
1124
|
for (const r of this.row1Services()) {
|
|
1127
|
-
const
|
|
1128
|
-
if (!
|
|
1125
|
+
const g = k(r.service.id);
|
|
1126
|
+
if (!g)
|
|
1129
1127
|
continue;
|
|
1130
|
-
const p =
|
|
1131
|
-
|
|
1132
|
-
const f = Dn.length ? Math.min(...Dn.map((
|
|
1133
|
-
vn =
|
|
1134
|
-
d:
|
|
1135
|
-
depth:
|
|
1128
|
+
const p = s(g);
|
|
1129
|
+
Ce = p[0];
|
|
1130
|
+
const f = Dn.length ? Math.min(...Dn.map((M) => M.point[1])) : Nn.length ? Math.min(...Nn.map((M) => M.point[1])) : 0, I = Math.max(p[1] + V, f - E);
|
|
1131
|
+
vn = I, Hn && x.push({
|
|
1132
|
+
d: w(p, Hn, I - xe),
|
|
1133
|
+
depth: $,
|
|
1136
1134
|
sourceNodeId: r.service.id,
|
|
1137
1135
|
targetNodeId: "storage",
|
|
1138
1136
|
targetBarIndex: -1,
|
|
1139
1137
|
active: !0
|
|
1140
1138
|
});
|
|
1141
|
-
for (const
|
|
1142
|
-
|
|
1143
|
-
d:
|
|
1144
|
-
depth:
|
|
1139
|
+
for (const M of Dn)
|
|
1140
|
+
x.push({
|
|
1141
|
+
d: w(p, M.point, I),
|
|
1142
|
+
depth: $,
|
|
1145
1143
|
sourceNodeId: r.service.id,
|
|
1146
|
-
targetNodeId:
|
|
1147
|
-
targetBarIndex:
|
|
1148
|
-
active:
|
|
1144
|
+
targetNodeId: M.nodeId,
|
|
1145
|
+
targetBarIndex: M.barIndex,
|
|
1146
|
+
active: M.active
|
|
1149
1147
|
});
|
|
1150
|
-
for (const
|
|
1151
|
-
|
|
1152
|
-
d:
|
|
1153
|
-
depth:
|
|
1148
|
+
for (const M of Nn)
|
|
1149
|
+
x.push({
|
|
1150
|
+
d: w(p, M.point, I + oe),
|
|
1151
|
+
depth: $,
|
|
1154
1152
|
sourceNodeId: r.service.id,
|
|
1155
|
-
targetNodeId:
|
|
1156
|
-
targetBarIndex:
|
|
1157
|
-
active:
|
|
1153
|
+
targetNodeId: M.nodeId,
|
|
1154
|
+
targetBarIndex: M.barIndex,
|
|
1155
|
+
active: M.active
|
|
1158
1156
|
});
|
|
1159
1157
|
}
|
|
1160
1158
|
for (const r of this.row1SideServices()) {
|
|
1161
|
-
const
|
|
1162
|
-
if (!
|
|
1159
|
+
const g = k(r.service.id);
|
|
1160
|
+
if (!g || !vn)
|
|
1163
1161
|
continue;
|
|
1164
|
-
const p =
|
|
1165
|
-
|
|
1162
|
+
const p = s(g);
|
|
1163
|
+
x.push({
|
|
1166
1164
|
d: `M${a(p[0])},${a(p[1])}L${a(p[0])},${a(vn)}`,
|
|
1167
|
-
depth:
|
|
1165
|
+
depth: $,
|
|
1168
1166
|
sourceNodeId: r.service.id,
|
|
1169
1167
|
targetNodeId: "bus-rail",
|
|
1170
1168
|
targetBarIndex: -1,
|
|
1171
1169
|
active: !0,
|
|
1172
1170
|
renderMode: "base-only"
|
|
1173
|
-
}), Hn &&
|
|
1174
|
-
d:
|
|
1175
|
-
depth:
|
|
1171
|
+
}), Hn && x.push({
|
|
1172
|
+
d: w(p, Hn, vn - xe),
|
|
1173
|
+
depth: $,
|
|
1176
1174
|
sourceNodeId: r.service.id,
|
|
1177
1175
|
targetNodeId: "storage",
|
|
1178
1176
|
targetBarIndex: -1,
|
|
@@ -1180,9 +1178,9 @@ Ln = function() {
|
|
|
1180
1178
|
renderMode: "glow-only"
|
|
1181
1179
|
});
|
|
1182
1180
|
for (const f of Dn)
|
|
1183
|
-
|
|
1184
|
-
d:
|
|
1185
|
-
depth:
|
|
1181
|
+
x.push({
|
|
1182
|
+
d: w(p, f.point, vn),
|
|
1183
|
+
depth: $,
|
|
1186
1184
|
sourceNodeId: r.service.id,
|
|
1187
1185
|
targetNodeId: f.nodeId,
|
|
1188
1186
|
targetBarIndex: f.barIndex,
|
|
@@ -1190,34 +1188,34 @@ Ln = function() {
|
|
|
1190
1188
|
renderMode: "glow-only"
|
|
1191
1189
|
});
|
|
1192
1190
|
for (const f of Nn) {
|
|
1193
|
-
const [
|
|
1191
|
+
const [I, M] = p, [P, sn] = f.point, F = vn, J = Ce, Un = J - I, cn = Math.min(V, Math.abs(Un) / 2, Math.abs(F - M) / 2), ye = Math.sign(Un), Jn = P - J;
|
|
1194
1192
|
let ie;
|
|
1195
|
-
if (Math.abs(
|
|
1196
|
-
const Y = a((J +
|
|
1193
|
+
if (Math.abs(Jn) < 3) {
|
|
1194
|
+
const Y = a((J + P) / 2);
|
|
1197
1195
|
ie = [
|
|
1198
|
-
`M${a(
|
|
1199
|
-
`L${a(
|
|
1200
|
-
`Q${a(
|
|
1196
|
+
`M${a(I)},${a(M)}`,
|
|
1197
|
+
`L${a(I)},${a(F - cn)}`,
|
|
1198
|
+
`Q${a(I)},${a(F)},${a(I + cn * ye)},${a(F)}`,
|
|
1201
1199
|
`L${a(Y)},${a(F)}`,
|
|
1202
1200
|
`L${a(Y)},${a(sn)}`
|
|
1203
1201
|
].join("");
|
|
1204
1202
|
} else {
|
|
1205
|
-
const Y = F +
|
|
1203
|
+
const Y = F + oe, Me = Math.sign(Jn), Ie = Math.min(V, oe / 2, Math.abs(Jn) / 2), Pe = Math.min(V, Math.abs(Jn) / 2, Math.abs(sn - Y) / 2);
|
|
1206
1204
|
ie = [
|
|
1207
|
-
`M${a(
|
|
1208
|
-
`L${a(
|
|
1209
|
-
`Q${a(
|
|
1205
|
+
`M${a(I)},${a(M)}`,
|
|
1206
|
+
`L${a(I)},${a(F - cn)}`,
|
|
1207
|
+
`Q${a(I)},${a(F)},${a(I + cn * ye)},${a(F)}`,
|
|
1210
1208
|
`L${a(J)},${a(F)}`,
|
|
1211
|
-
`L${a(J)},${a(Y -
|
|
1212
|
-
`Q${a(J)},${a(Y)},${a(J +
|
|
1213
|
-
`L${a(
|
|
1214
|
-
`Q${a(
|
|
1215
|
-
`L${a(
|
|
1209
|
+
`L${a(J)},${a(Y - Ie)}`,
|
|
1210
|
+
`Q${a(J)},${a(Y)},${a(J + Ie * Me)},${a(Y)}`,
|
|
1211
|
+
`L${a(P - Pe * Me)},${a(Y)}`,
|
|
1212
|
+
`Q${a(P)},${a(Y)},${a(P)},${a(Y + Pe)}`,
|
|
1213
|
+
`L${a(P)},${a(sn)}`
|
|
1216
1214
|
].join("");
|
|
1217
1215
|
}
|
|
1218
|
-
|
|
1216
|
+
x.push({
|
|
1219
1217
|
d: ie,
|
|
1220
|
-
depth:
|
|
1218
|
+
depth: $,
|
|
1221
1219
|
sourceNodeId: r.service.id,
|
|
1222
1220
|
targetNodeId: f.nodeId,
|
|
1223
1221
|
targetBarIndex: f.barIndex,
|
|
@@ -1228,35 +1226,62 @@ Ln = function() {
|
|
|
1228
1226
|
}
|
|
1229
1227
|
for (const r of this.row2Services())
|
|
1230
1228
|
if (r.loadBalancer) {
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1233
|
-
const f =
|
|
1234
|
-
for (const
|
|
1235
|
-
|
|
1236
|
-
d:
|
|
1237
|
-
depth:
|
|
1229
|
+
const g = k(r.loadBalancer.id), p = q(r.service.id, r.service.containers.active);
|
|
1230
|
+
if (g && p.length) {
|
|
1231
|
+
const f = s(g), I = Math.min(...p.map((P) => P.point[1])), M = (f[1] + I) / 2;
|
|
1232
|
+
for (const P of p)
|
|
1233
|
+
x.push({
|
|
1234
|
+
d: w(f, P.point, M),
|
|
1235
|
+
depth: L,
|
|
1238
1236
|
sourceNodeId: r.loadBalancer.id,
|
|
1239
1237
|
targetNodeId: r.service.id,
|
|
1240
|
-
targetBarIndex:
|
|
1241
|
-
active:
|
|
1238
|
+
targetBarIndex: P.barIndex,
|
|
1239
|
+
active: P.active
|
|
1242
1240
|
});
|
|
1243
1241
|
}
|
|
1244
1242
|
}
|
|
1245
|
-
this.annotatedPaths.set(
|
|
1243
|
+
this.annotatedPaths.set(x), requestAnimationFrame(() => {
|
|
1246
1244
|
const r = e.querySelector(".__canvas > .__svg-layer");
|
|
1247
1245
|
if (!r)
|
|
1248
1246
|
return;
|
|
1249
|
-
const
|
|
1247
|
+
const g = this.annotatedPaths();
|
|
1250
1248
|
let p = !1;
|
|
1251
|
-
for (let f = 0; f <
|
|
1252
|
-
if (
|
|
1249
|
+
for (let f = 0; f < g.length; f++) {
|
|
1250
|
+
if (g[f].cachedLength != null)
|
|
1253
1251
|
continue;
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1252
|
+
const I = r.querySelector(`[data-path-idx="${f}"]`);
|
|
1253
|
+
I && (g[f].cachedLength = Math.ceil(I.getTotalLength()), p = !0);
|
|
1256
1254
|
}
|
|
1257
|
-
p && this.annotatedPaths.set([...
|
|
1255
|
+
p && this.annotatedPaths.set([...g]), d(this, gn) && (h(this, gn, !1), this.pathsVisible.set(!0));
|
|
1258
1256
|
});
|
|
1259
|
-
},
|
|
1257
|
+
}, /**
|
|
1258
|
+
* The CSS top pins storage for the serious layout; realign it to the
|
|
1259
|
+
* actual row-2 position (keeping the design's +11px offset) so mode
|
|
1260
|
+
* switches — where the lw infra stack is much shorter — keep it level.
|
|
1261
|
+
*/
|
|
1262
|
+
fe = function(e) {
|
|
1263
|
+
const n = e.querySelector(".__external-node"), o = e.querySelectorAll(".__services-row");
|
|
1264
|
+
if (!n || o.length < 2)
|
|
1265
|
+
return;
|
|
1266
|
+
const i = e.getBoundingClientRect();
|
|
1267
|
+
if (i.width === 0)
|
|
1268
|
+
return;
|
|
1269
|
+
const y = i.width / e.offsetWidth, s = (o[o.length - 1].getBoundingClientRect().top - i.top) / y;
|
|
1270
|
+
n.style.top = `${Math.round(s + 11)}px`;
|
|
1271
|
+
}, /**
|
|
1272
|
+
* During the mode crossfade the services rows travel with the animating
|
|
1273
|
+
* grid heights — re-pin storage to row 2 every frame so it visibly moves
|
|
1274
|
+
* with the boxes instead of jumping once the layout settles.
|
|
1275
|
+
*/
|
|
1276
|
+
Le = function() {
|
|
1277
|
+
const e = d(this, Q).nativeElement.querySelector(".__canvas");
|
|
1278
|
+
if (!e)
|
|
1279
|
+
return;
|
|
1280
|
+
const n = ++re(this, $n)._, o = performance.now(), i = () => {
|
|
1281
|
+
n === d(this, $n) && (b(this, l, fe).call(this, e), performance.now() - o < 450 && requestAnimationFrame(i));
|
|
1282
|
+
};
|
|
1283
|
+
requestAnimationFrame(i);
|
|
1284
|
+
}, Yn = function(e) {
|
|
1260
1285
|
const n = e.category === "managed" ? "orange" : "cyan";
|
|
1261
1286
|
let o;
|
|
1262
1287
|
if (e.hasLoadBalancer) {
|
|
@@ -1272,29 +1297,29 @@ balancers`,
|
|
|
1272
1297
|
}
|
|
1273
1298
|
return { service: e, barColor: n, loadBalancer: o };
|
|
1274
1299
|
}, // ─── Trace orchestrator ────────────────────────────────
|
|
1275
|
-
|
|
1300
|
+
Be = function() {
|
|
1276
1301
|
if (d(this, fn) || typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
1277
1302
|
return;
|
|
1278
1303
|
h(this, fn, !0);
|
|
1279
1304
|
const e = () => {
|
|
1280
|
-
|
|
1305
|
+
b(this, l, Fe).call(this), h(this, _n, window.setTimeout(e, Ut + Math.random() * Jt));
|
|
1281
1306
|
};
|
|
1282
1307
|
h(this, _n, window.setTimeout(e, Te));
|
|
1283
1308
|
const n = () => {
|
|
1284
|
-
|
|
1309
|
+
b(this, l, je).call(this), h(this, pn, window.setTimeout(n, Yt + Math.random() * Qt));
|
|
1285
1310
|
};
|
|
1286
1311
|
this.row1SideServices().length && h(this, pn, window.setTimeout(n, Te + 600));
|
|
1287
|
-
},
|
|
1288
|
-
h(this, fn, !1), clearTimeout(d(this, _n)), clearTimeout(d(this, pn)),
|
|
1289
|
-
},
|
|
1312
|
+
}, ue = function() {
|
|
1313
|
+
h(this, fn, !1), clearTimeout(d(this, _n)), clearTimeout(d(this, pn)), b(this, l, Qn).call(this);
|
|
1314
|
+
}, Qn = function() {
|
|
1290
1315
|
d(this, an).forEach((e) => e()), d(this, an).clear(), d(this, rn).clear(), h(this, on, !1);
|
|
1291
|
-
},
|
|
1316
|
+
}, Fe = function() {
|
|
1292
1317
|
const e = this.annotatedPaths();
|
|
1293
1318
|
if (!e.length)
|
|
1294
1319
|
return;
|
|
1295
|
-
const n =
|
|
1296
|
-
n.length &&
|
|
1297
|
-
},
|
|
1320
|
+
const n = b(this, l, Ve).call(this, e);
|
|
1321
|
+
n.length && b(this, l, me).call(this, n);
|
|
1322
|
+
}, je = function() {
|
|
1298
1323
|
if (d(this, on))
|
|
1299
1324
|
return;
|
|
1300
1325
|
const e = this.annotatedPaths();
|
|
@@ -1303,106 +1328,106 @@ Ae = function() {
|
|
|
1303
1328
|
const n = this.row1SideServices();
|
|
1304
1329
|
if (!n.length)
|
|
1305
1330
|
return;
|
|
1306
|
-
const o = n[Math.floor(Math.random() * n.length)], i =
|
|
1331
|
+
const o = n[Math.floor(Math.random() * n.length)], i = b(this, l, qe).call(this, e, o.service.id);
|
|
1307
1332
|
if (i.length) {
|
|
1308
|
-
h(this, on, !0),
|
|
1309
|
-
const
|
|
1333
|
+
h(this, on, !0), b(this, l, me).call(this, i);
|
|
1334
|
+
const y = i.length * le + En + Rn + de + 100;
|
|
1310
1335
|
setTimeout(() => {
|
|
1311
1336
|
h(this, on, !1);
|
|
1312
|
-
},
|
|
1337
|
+
}, y);
|
|
1313
1338
|
}
|
|
1314
1339
|
}, /**
|
|
1315
1340
|
* Pick a route starting from a side service (worker).
|
|
1316
1341
|
* Uses worker's own glow-only depth-3 paths (invisible base, full path to target).
|
|
1317
1342
|
* Optionally continues with depth-4 (LB → managed service).
|
|
1318
1343
|
*/
|
|
1319
|
-
|
|
1320
|
-
const o = [], i = e.filter((
|
|
1344
|
+
qe = function(e, n) {
|
|
1345
|
+
const o = [], i = e.filter((s) => s.sourceNodeId === n && s.renderMode === "glow-only" && s.active);
|
|
1321
1346
|
if (!i.length)
|
|
1322
1347
|
return o;
|
|
1323
|
-
const
|
|
1324
|
-
o.push(e.indexOf(
|
|
1325
|
-
const v = e.filter((
|
|
1348
|
+
const y = b(this, l, Xn).call(this, i);
|
|
1349
|
+
o.push(e.indexOf(y));
|
|
1350
|
+
const v = e.filter((s) => s.depth === y.depth + 1 && s.sourceNodeId === y.targetNodeId && s.active);
|
|
1326
1351
|
if (v.length) {
|
|
1327
|
-
const
|
|
1328
|
-
o.push(e.indexOf(
|
|
1352
|
+
const s = b(this, l, Xn).call(this, v);
|
|
1353
|
+
o.push(e.indexOf(s));
|
|
1329
1354
|
}
|
|
1330
1355
|
return o;
|
|
1331
|
-
},
|
|
1356
|
+
}, Ve = function(e) {
|
|
1332
1357
|
const n = [];
|
|
1333
1358
|
let o = "endpoint";
|
|
1334
1359
|
for (let i = 0; i <= 4; i++) {
|
|
1335
|
-
const
|
|
1336
|
-
if (!
|
|
1360
|
+
const y = e.filter((s) => s.depth === i && s.sourceNodeId === o && s.active);
|
|
1361
|
+
if (!y.length)
|
|
1337
1362
|
break;
|
|
1338
|
-
const v =
|
|
1363
|
+
const v = b(this, l, Xn).call(this, y);
|
|
1339
1364
|
n.push(e.indexOf(v)), o = v.targetNodeId;
|
|
1340
1365
|
}
|
|
1341
1366
|
return n;
|
|
1342
|
-
},
|
|
1367
|
+
}, Xn = function(e) {
|
|
1343
1368
|
if (e.length === 1)
|
|
1344
|
-
return
|
|
1369
|
+
return b(this, l, Kn).call(this, e[0]), e[0];
|
|
1345
1370
|
const n = e.map((v) => {
|
|
1346
|
-
const
|
|
1347
|
-
return 1 / ((d(this, rn).get(
|
|
1348
|
-
}), o = n.reduce((v,
|
|
1371
|
+
const s = `${v.targetNodeId}:${v.targetBarIndex}`;
|
|
1372
|
+
return 1 / ((d(this, rn).get(s) ?? 0) + 1);
|
|
1373
|
+
}), o = n.reduce((v, s) => v + s, 0);
|
|
1349
1374
|
let i = Math.random() * o;
|
|
1350
1375
|
for (let v = 0; v < e.length; v++)
|
|
1351
1376
|
if (i -= n[v], i <= 0)
|
|
1352
|
-
return
|
|
1353
|
-
const
|
|
1354
|
-
return
|
|
1355
|
-
},
|
|
1377
|
+
return b(this, l, Kn).call(this, e[v]), e[v];
|
|
1378
|
+
const y = e.at(-1);
|
|
1379
|
+
return b(this, l, Kn).call(this, y), y;
|
|
1380
|
+
}, Kn = function(e) {
|
|
1356
1381
|
const n = `${e.targetNodeId}:${e.targetBarIndex}`;
|
|
1357
1382
|
d(this, rn).set(n, (d(this, rn).get(n) ?? 0) + 1);
|
|
1358
|
-
},
|
|
1359
|
-
const n = this.annotatedPaths(), i = d(this,
|
|
1360
|
-
if (!i || !
|
|
1383
|
+
}, me = function(e) {
|
|
1384
|
+
const n = this.annotatedPaths(), i = d(this, Q).nativeElement.querySelector(".__canvas"), y = i?.querySelector(":scope > .__svg-layer");
|
|
1385
|
+
if (!i || !y)
|
|
1361
1386
|
return;
|
|
1362
|
-
const v = [],
|
|
1363
|
-
e.forEach((
|
|
1364
|
-
const
|
|
1365
|
-
if (
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1368
|
-
el:
|
|
1387
|
+
const v = [], s = ++re(this, qn)._, k = [];
|
|
1388
|
+
e.forEach((E, a) => {
|
|
1389
|
+
const w = n[E], x = a * le, C = y.querySelector(`[data-path-idx="${E}"]`);
|
|
1390
|
+
if (C) {
|
|
1391
|
+
const $ = w.cachedLength ?? Math.ceil(C.getTotalLength());
|
|
1392
|
+
C.style.setProperty("--path-len", String($)), k.push({
|
|
1393
|
+
el: C,
|
|
1369
1394
|
classes: ["__path-glow--active", "__path-glow--decay"]
|
|
1370
1395
|
}), v.push(setTimeout(() => {
|
|
1371
|
-
|
|
1372
|
-
},
|
|
1373
|
-
|
|
1374
|
-
},
|
|
1375
|
-
|
|
1376
|
-
},
|
|
1396
|
+
C.classList.add("__path-glow--active");
|
|
1397
|
+
}, x)), v.push(setTimeout(() => {
|
|
1398
|
+
C.classList.remove("__path-glow--active"), C.classList.add("__path-glow--decay");
|
|
1399
|
+
}, x + En + Rn)), v.push(setTimeout(() => {
|
|
1400
|
+
C.classList.remove("__path-glow--decay");
|
|
1401
|
+
}, x + En + Rn + de));
|
|
1377
1402
|
}
|
|
1378
|
-
const z =
|
|
1379
|
-
if (
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1382
|
-
} else if (
|
|
1383
|
-
const
|
|
1384
|
-
if (
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1403
|
+
const z = x + En * 0.85;
|
|
1404
|
+
if (w.targetBarIndex >= 0) {
|
|
1405
|
+
const L = i.querySelector(`[data-node-id="${w.targetNodeId}"]`)?.querySelectorAll("zui-bar-icon")[w.targetBarIndex];
|
|
1406
|
+
L && v.push(setTimeout(() => L.dispatchEvent(new CustomEvent("trace-pulse")), z));
|
|
1407
|
+
} else if (w.targetNodeId === "storage") {
|
|
1408
|
+
const $ = i.querySelector('[data-node-id="storage"]');
|
|
1409
|
+
if ($) {
|
|
1410
|
+
const L = z + Rn;
|
|
1411
|
+
k.push({ el: $, classes: ["--pulse"] }), v.push(setTimeout(() => $.classList.add("--pulse"), z)), v.push(setTimeout(() => $.classList.remove("--pulse"), L));
|
|
1387
1412
|
}
|
|
1388
1413
|
}
|
|
1389
1414
|
});
|
|
1390
1415
|
const q = () => {
|
|
1391
|
-
v.forEach((
|
|
1416
|
+
v.forEach((E) => clearTimeout(E)), k.forEach(({ el: E, classes: a }) => E.classList.remove(...a));
|
|
1392
1417
|
};
|
|
1393
|
-
d(this, an).set(
|
|
1394
|
-
const V = e.length *
|
|
1418
|
+
d(this, an).set(s, q);
|
|
1419
|
+
const V = e.length * le + En + Rn + de + 100;
|
|
1395
1420
|
v.push(setTimeout(() => {
|
|
1396
|
-
d(this, an).delete(
|
|
1421
|
+
d(this, an).delete(s);
|
|
1397
1422
|
}, V));
|
|
1398
1423
|
}, Cn.ɵfac = function(n) {
|
|
1399
1424
|
return new (n || Cn)();
|
|
1400
|
-
}, Cn.ɵcmp = /* @__PURE__ */
|
|
1401
|
-
if (n & 1 && (m(0, "div", 0)(1, "div", 1), u(2, "zw-diagram-node", 2),
|
|
1425
|
+
}, Cn.ɵcmp = /* @__PURE__ */ te({ type: Cn, selectors: [["zw-network-diagram"]], inputs: { config: [1, "config"], lightweight: [1, "lightweight"] }, decls: 26, vars: 8, consts: [[1, "__canvas"], ["data-node-id", "endpoint", 1, "__endpoint-row"], ["variant", "endpoint", 3, "label"], [3, "config", "showPaths", "lightweight"], [1, "__zone", "__zone--services"], [1, "__zone-label"], [1, "__services-content"], [1, "__services-row", "__services-row--top"], [1, "__services-side-nodes"], [1, "__services-spacer"], [1, "__services-row", "__services-row--bottom"], ["data-node-id", "storage", 1, "__external-node"], [1, "__svg-layer"], ["variant", "service", 3, "label", "containers", "barColor", "techIcon"], [1, "__compound"], [1, "__compound-lb"], ["variant", "service-highlighted", 3, "label", "containers", "barColor", "highlighted"], [1, "__compound-service"], ["variant", "external", 3, "label", "sublabel"], [1, "__path-base"], [1, "__path-glow"]], template: function(n, o) {
|
|
1426
|
+
if (n & 1 && (m(0, "div", 0)(1, "div", 1), u(2, "zw-diagram-node", 2), _(), m(3, "zw-project-shell", 3)(4, "div", 4)(5, "span", 5), D(6, "Your services"), u(7, "br"), D(8, "with system containers"), _(), m(9, "div", 6)(10, "div", 7), u(11, "div"), R(12, Nt, 2, 5, "div", null, _e), W(14, Rt, 3, 0, "div", 8)(15, At, 1, 0, "div"), _(), u(16, "div", 9), m(17, "div", 10), R(18, Ft, 2, 1, null, null, _e), _()()()(), W(20, jt, 2, 2, "div", 11), Gn(), m(21, "svg", 12), R(22, Vt, 1, 1, null, null, he), R(24, Gt, 1, 1, null, null, he), _()()), n & 2) {
|
|
1402
1427
|
let i;
|
|
1403
|
-
|
|
1428
|
+
c(2), S("label", o.config().endpoint), c(), S("config", o.shellConfig())("showPaths", !1)("lightweight", o.lightweight()), c(9), A(o.row1MainServices()), c(2), G(o.row1SideServices().length ? 14 : 15), c(4), A(o.row2Services()), c(2), G((i = o.resolvedStorage()) ? 20 : -1, i), c(), bn("__svg-layer--visible", o.pathsVisible()), c(), A(o.annotatedPaths()), c(2), A(o.annotatedPaths());
|
|
1404
1429
|
}
|
|
1405
|
-
}, dependencies: [
|
|
1430
|
+
}, dependencies: [ee, ge], styles: [`[_nghost-%COMP%] {
|
|
1406
1431
|
display: block;
|
|
1407
1432
|
position: relative;
|
|
1408
1433
|
width: 100%;
|
|
@@ -1613,17 +1638,17 @@ zw-project-shell[_ngcontent-%COMP%] {
|
|
|
1613
1638
|
display: none;
|
|
1614
1639
|
}
|
|
1615
1640
|
}`], changeDetection: 0 });
|
|
1616
|
-
let
|
|
1617
|
-
function
|
|
1641
|
+
let pe = Cn;
|
|
1642
|
+
function Se(t) {
|
|
1618
1643
|
const e = t.hostname || t.name, n = t.ports?.[0]?.port;
|
|
1619
1644
|
return n ? `${e}:${n}` : e;
|
|
1620
1645
|
}
|
|
1621
|
-
function
|
|
1622
|
-
return t ?
|
|
1646
|
+
function Xt(t) {
|
|
1647
|
+
return t ? Ne[t]?.horizontal === !0 : !1;
|
|
1623
1648
|
}
|
|
1624
|
-
const
|
|
1625
|
-
function
|
|
1626
|
-
const e = t.findIndex((
|
|
1649
|
+
const Kt = /* @__PURE__ */ new Set(["postgresql", "mariadb", "mongodb", "clickhouse"]);
|
|
1650
|
+
function no(t) {
|
|
1651
|
+
const e = t.findIndex((y) => y.techIcon && Kt.has(y.techIcon));
|
|
1627
1652
|
if (e < 0)
|
|
1628
1653
|
return t;
|
|
1629
1654
|
const n = Math.floor(t.length / 2);
|
|
@@ -1632,70 +1657,70 @@ function Kt(t) {
|
|
|
1632
1657
|
const o = [...t], [i] = o.splice(e, 1);
|
|
1633
1658
|
return o.splice(n, 0, i), o;
|
|
1634
1659
|
}
|
|
1635
|
-
function
|
|
1660
|
+
function eo(t) {
|
|
1636
1661
|
const e = t._servicesExtended ?? t.services ?? [];
|
|
1637
1662
|
let n = !1;
|
|
1638
1663
|
const o = [], i = [];
|
|
1639
|
-
let
|
|
1640
|
-
for (const
|
|
1641
|
-
if (
|
|
1664
|
+
let y = !1, v;
|
|
1665
|
+
for (const s of e) {
|
|
1666
|
+
if (s.category === "CORE")
|
|
1642
1667
|
continue;
|
|
1643
|
-
if (
|
|
1644
|
-
|
|
1668
|
+
if (s.category === "OBJECT_STORAGE") {
|
|
1669
|
+
y = !0, v = s;
|
|
1645
1670
|
continue;
|
|
1646
1671
|
}
|
|
1647
|
-
const
|
|
1648
|
-
id:
|
|
1649
|
-
label:
|
|
1672
|
+
const k = tt(s), q = ot(s.typeId, k, s.autoscaling?.horizontalAutoscaling?.minContainerCount || 1), V = s.typeId ? Ne[s.typeId]?.HAContainers : void 0, E = k === "HA" && (V?.freeContainers ?? 0) > 0, a = {
|
|
1673
|
+
id: s.hostname || s.name,
|
|
1674
|
+
label: Se(s),
|
|
1650
1675
|
containers: { active: q, standby: 0 },
|
|
1651
|
-
techIcon:
|
|
1652
|
-
...
|
|
1676
|
+
techIcon: s.typeId,
|
|
1677
|
+
...E ? {
|
|
1653
1678
|
hasLoadBalancer: !0,
|
|
1654
1679
|
loadBalancer: {
|
|
1655
1680
|
containers: { active: V.freeContainers, standby: 0 }
|
|
1656
1681
|
}
|
|
1657
1682
|
} : {}
|
|
1658
1683
|
};
|
|
1659
|
-
if (
|
|
1660
|
-
const
|
|
1661
|
-
n || (n = !0), o.push({ ...a, category:
|
|
1684
|
+
if (Xt(s.typeId)) {
|
|
1685
|
+
const w = n ? "side-runtime" : "http-runtime";
|
|
1686
|
+
n || (n = !0), o.push({ ...a, category: w });
|
|
1662
1687
|
} else
|
|
1663
1688
|
i.push({ ...a, category: "managed" });
|
|
1664
1689
|
}
|
|
1665
1690
|
return {
|
|
1666
|
-
...
|
|
1667
|
-
services: [...o, ...
|
|
1668
|
-
...
|
|
1691
|
+
...Ee,
|
|
1692
|
+
services: [...o, ...no(i)],
|
|
1693
|
+
...y && v ? {
|
|
1669
1694
|
storage: {
|
|
1670
1695
|
label: "Object storage",
|
|
1671
|
-
sublabel:
|
|
1696
|
+
sublabel: Se(v)
|
|
1672
1697
|
}
|
|
1673
1698
|
} : {}
|
|
1674
1699
|
};
|
|
1675
1700
|
}
|
|
1676
|
-
function
|
|
1701
|
+
function to(t, e) {
|
|
1677
1702
|
t & 1 && u(0, "div", 1);
|
|
1678
1703
|
}
|
|
1679
|
-
function
|
|
1680
|
-
if (t & 1 && (m(0, "div", 2),
|
|
1681
|
-
const n =
|
|
1682
|
-
|
|
1704
|
+
function oo(t, e) {
|
|
1705
|
+
if (t & 1 && (m(0, "div", 2), D(1), _()), t & 2) {
|
|
1706
|
+
const n = O();
|
|
1707
|
+
c(), $e("Could not load recipe “", n.slug() || "unknown", "”.");
|
|
1683
1708
|
}
|
|
1684
1709
|
}
|
|
1685
|
-
function
|
|
1710
|
+
function io(t, e) {
|
|
1686
1711
|
if (t & 1 && u(0, "zw-network-diagram", 3), t & 2) {
|
|
1687
|
-
const n =
|
|
1688
|
-
|
|
1712
|
+
const n = O();
|
|
1713
|
+
S("config", e)("lightweight", n.lightweight());
|
|
1689
1714
|
}
|
|
1690
1715
|
}
|
|
1691
|
-
var
|
|
1716
|
+
var Vn, zn, kn, Wn;
|
|
1692
1717
|
const yn = class yn {
|
|
1693
1718
|
constructor() {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
this.slug =
|
|
1719
|
+
T(this, Vn);
|
|
1720
|
+
T(this, zn);
|
|
1721
|
+
T(this, kn);
|
|
1722
|
+
T(this, Wn);
|
|
1723
|
+
this.slug = N(), this.recipeData = N(void 0, { transform: (e) => {
|
|
1699
1724
|
if (typeof e != "string")
|
|
1700
1725
|
return e ?? void 0;
|
|
1701
1726
|
if (e.trim())
|
|
@@ -1704,43 +1729,43 @@ const yn = class yn {
|
|
|
1704
1729
|
} catch {
|
|
1705
1730
|
return;
|
|
1706
1731
|
}
|
|
1707
|
-
} }), this.environment =
|
|
1732
|
+
} }), this.environment = N("highly-available-production"), this.mode = N("auto"), this.apiBase = N("https://api.zerops.io"), h(this, Vn, Bn(Xe)), this.recipe = un(null), this.loading = un(!0), this.error = un(!1), h(this, zn, j(() => {
|
|
1708
1733
|
const e = this.recipe();
|
|
1709
1734
|
if (!e)
|
|
1710
1735
|
return;
|
|
1711
1736
|
const n = e._environmentsExtended || [];
|
|
1712
|
-
return n.find((o) => o._key === this.environment()) ??
|
|
1737
|
+
return n.find((o) => o._key === this.environment()) ?? it(n) ?? void 0;
|
|
1713
1738
|
})), this.diagramConfig = j(() => {
|
|
1714
|
-
const e = d(this,
|
|
1715
|
-
return e ?
|
|
1739
|
+
const e = d(this, zn).call(this);
|
|
1740
|
+
return e ? eo(e) : void 0;
|
|
1716
1741
|
}), this.lightweight = j(() => {
|
|
1717
1742
|
const e = this.mode();
|
|
1718
1743
|
if (e === "lightweight")
|
|
1719
1744
|
return !0;
|
|
1720
1745
|
if (e === "serious")
|
|
1721
1746
|
return !1;
|
|
1722
|
-
const n = d(this,
|
|
1723
|
-
return n ?
|
|
1724
|
-
}), h(this,
|
|
1747
|
+
const n = d(this, zn).call(this);
|
|
1748
|
+
return n ? at(n._servicesExtended) === "LIGHT" : !1;
|
|
1749
|
+
}), h(this, kn, new Je()), h(this, Wn, Ye(d(this, kn).pipe(Qe((e) => st(d(this, Vn), this.apiBase(), e))))), ne(() => {
|
|
1725
1750
|
const e = this.recipeData(), n = this.slug();
|
|
1726
1751
|
if (e) {
|
|
1727
|
-
const o =
|
|
1752
|
+
const o = rt(e);
|
|
1728
1753
|
this.loading.set(!1), this.error.set(o.error), this.recipe.set(o.recipe);
|
|
1729
|
-
} else n && (this.loading.set(!0), this.error.set(!1), this.recipe.set(null), d(this,
|
|
1730
|
-
}),
|
|
1731
|
-
const e = d(this,
|
|
1754
|
+
} else n && (this.loading.set(!0), this.error.set(!1), this.recipe.set(null), d(this, kn).next(n));
|
|
1755
|
+
}), ne(() => {
|
|
1756
|
+
const e = d(this, Wn).call(this);
|
|
1732
1757
|
e && (this.loading.set(!1), this.error.set(e.error), this.recipe.set(e.recipe));
|
|
1733
1758
|
});
|
|
1734
1759
|
}
|
|
1735
1760
|
};
|
|
1736
|
-
|
|
1761
|
+
Vn = new WeakMap(), zn = new WeakMap(), kn = new WeakMap(), Wn = new WeakMap(), yn.ɵfac = function(n) {
|
|
1737
1762
|
return new (n || yn)();
|
|
1738
|
-
}, yn.ɵcmp = /* @__PURE__ */
|
|
1739
|
-
if (n & 1 && (m(0, "div", 0), W(1,
|
|
1763
|
+
}, yn.ɵcmp = /* @__PURE__ */ te({ type: yn, selectors: [["zwe-network-diagram-element"]], inputs: { slug: [1, "slug"], recipeData: [1, "recipeData"], environment: [1, "environment"], mode: [1, "mode"], apiBase: [1, "apiBase"] }, decls: 4, vars: 1, consts: [[1, "zerops"], ["aria-hidden", "true", 1, "__skeleton"], [1, "__error"], [3, "config", "lightweight"]], template: function(n, o) {
|
|
1764
|
+
if (n & 1 && (m(0, "div", 0), W(1, to, 1, 0, "div", 1)(2, oo, 2, 1, "div", 2)(3, io, 1, 2, "zw-network-diagram", 3), _()), n & 2) {
|
|
1740
1765
|
let i;
|
|
1741
|
-
|
|
1766
|
+
c(), G(o.loading() ? 1 : o.error() ? 2 : (i = o.diagramConfig()) ? 3 : -1, i);
|
|
1742
1767
|
}
|
|
1743
|
-
}, dependencies: [
|
|
1768
|
+
}, dependencies: [pe], styles: [`[_nghost-%COMP%] { display: block; }
|
|
1744
1769
|
|
|
1745
1770
|
.__skeleton[_ngcontent-%COMP%] {
|
|
1746
1771
|
height: 420px;
|
|
@@ -1757,7 +1782,7 @@ qn = new WeakMap(), Sn = new WeakMap(), zn = new WeakMap(), Vn = new WeakMap(),
|
|
|
1757
1782
|
color: var(--mat-sys-on-error-container);
|
|
1758
1783
|
font-size: 14px;
|
|
1759
1784
|
}`], changeDetection: 0 });
|
|
1760
|
-
let
|
|
1761
|
-
|
|
1762
|
-
customElements.get("zerops-network-diagram") || customElements.define("zerops-network-diagram",
|
|
1785
|
+
let ve = yn;
|
|
1786
|
+
Ke().then((t) => {
|
|
1787
|
+
customElements.get("zerops-network-diagram") || customElements.define("zerops-network-diagram", nt(ve, { injector: t.injector }));
|
|
1763
1788
|
});
|