@stonecrop/node-editor 0.4.28 → 0.4.30
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/node-editor.d.ts +2 -3
- package/dist/node-editor.js +910 -908
- package/dist/node-editor.js.map +1 -1
- package/dist/node-editor.umd.cjs +3 -3
- package/dist/node-editor.umd.cjs.map +1 -1
- package/dist/src/types/index.d.ts +2 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/StateEditor.vue +13 -5
- package/src/types/index.ts +2 -2
package/dist/node-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as me, createPropsRestProxy as yr, toRef as be, ref as ge, computed as ne, onMounted as Ue, createElementBlock as he, openBlock as oe, normalizeClass as dt, unref as J, renderSlot as qe, h as pe, getCurrentScope as ii, inject as wt, effectScope as ri, watch as ve, provide as ft, getCurrentInstance as Bt, resolveComponent as li, nextTick as $e, createBlock as Re, Teleport as _r, useSlots as wr, onUnmounted as br, createVNode as Me, withCtx as ht, createElementVNode as _e, useAttrs as Er, Fragment as Te, createCommentVNode as Ne, mergeProps as en, reactive as xr, onScopeDispose as Wt, shallowRef as tn, toValue as ce, onBeforeMount as Sr, renderList as eo, normalizeStyle as He, onBeforeUnmount as to, isMemoSame as Nr, toDisplayString as gt, resolveDynamicComponent as Cr, createTextVNode as
|
|
1
|
+
import { defineComponent as me, createPropsRestProxy as yr, toRef as be, ref as ge, computed as ne, onMounted as Ue, createElementBlock as he, openBlock as oe, normalizeClass as dt, unref as J, renderSlot as qe, h as pe, getCurrentScope as ii, inject as wt, effectScope as ri, watch as ve, provide as ft, getCurrentInstance as Bt, resolveComponent as li, nextTick as $e, createBlock as Re, Teleport as _r, useSlots as wr, onUnmounted as br, createVNode as Me, withCtx as ht, createElementVNode as _e, useAttrs as Er, Fragment as Te, createCommentVNode as Ne, mergeProps as en, reactive as xr, onScopeDispose as Wt, shallowRef as tn, toValue as ce, onBeforeMount as Sr, renderList as eo, normalizeStyle as He, onBeforeUnmount as to, isMemoSame as Nr, toDisplayString as gt, resolveDynamicComponent as Cr, createTextVNode as si, isRef as no, toRefs as Mr, customRef as Ir, markRaw as Mt, readonly as kr, useTemplateRef as ai, withDirectives as ui, withKeys as ci, vModelText as di, withModifiers as Pr, mergeModels as po, useModel as $r } from "vue";
|
|
2
2
|
function hn(e) {
|
|
3
3
|
return ii() ? (Wt(e), !0) : !1;
|
|
4
4
|
}
|
|
@@ -48,11 +48,11 @@ function Rr(e, t, n = {}) {
|
|
|
48
48
|
i
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function st(e, t, n = {}) {
|
|
52
52
|
const {
|
|
53
53
|
eventFilter: o,
|
|
54
54
|
...i
|
|
55
|
-
} = n, { eventFilter: r, pause: l, resume:
|
|
55
|
+
} = n, { eventFilter: r, pause: l, resume: s, isActive: a } = Vr(o);
|
|
56
56
|
return { stop: Rr(
|
|
57
57
|
e,
|
|
58
58
|
t,
|
|
@@ -60,7 +60,7 @@ function at(e, t, n = {}) {
|
|
|
60
60
|
...i,
|
|
61
61
|
eventFilter: r
|
|
62
62
|
}
|
|
63
|
-
), pause: l, resume:
|
|
63
|
+
), pause: l, resume: s, isActive: a };
|
|
64
64
|
}
|
|
65
65
|
function Hr(e, t = {}) {
|
|
66
66
|
if (!no(e))
|
|
@@ -75,11 +75,11 @@ function Hr(e, t = {}) {
|
|
|
75
75
|
var r;
|
|
76
76
|
if ((r = Ye(t.replaceRef)) != null ? r : !0)
|
|
77
77
|
if (Array.isArray(e.value)) {
|
|
78
|
-
const
|
|
79
|
-
|
|
78
|
+
const s = [...e.value];
|
|
79
|
+
s[o] = i, e.value = s;
|
|
80
80
|
} else {
|
|
81
|
-
const
|
|
82
|
-
Object.setPrototypeOf(
|
|
81
|
+
const s = { ...e.value, [o]: i };
|
|
82
|
+
Object.setPrototypeOf(s, Object.getPrototypeOf(e.value)), e.value = s;
|
|
83
83
|
}
|
|
84
84
|
else
|
|
85
85
|
e.value[o] = i;
|
|
@@ -88,7 +88,7 @@ function Hr(e, t = {}) {
|
|
|
88
88
|
return n;
|
|
89
89
|
}
|
|
90
90
|
function Vn(e, t = !1) {
|
|
91
|
-
function n(d, { flush: h = "sync", deep: f = !1, timeout:
|
|
91
|
+
function n(d, { flush: h = "sync", deep: f = !1, timeout: E, throwOnTimeout: b } = {}) {
|
|
92
92
|
let S = null;
|
|
93
93
|
const M = [new Promise((_) => {
|
|
94
94
|
S = ve(
|
|
@@ -103,14 +103,14 @@ function Vn(e, t = !1) {
|
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
105
|
})];
|
|
106
|
-
return
|
|
107
|
-
mo(
|
|
106
|
+
return E != null && M.push(
|
|
107
|
+
mo(E, b).then(() => Ye(e)).finally(() => S == null ? void 0 : S())
|
|
108
108
|
), Promise.race(M);
|
|
109
109
|
}
|
|
110
110
|
function o(d, h) {
|
|
111
111
|
if (!no(d))
|
|
112
112
|
return n((N) => N === d, h);
|
|
113
|
-
const { flush: f = "sync", deep:
|
|
113
|
+
const { flush: f = "sync", deep: E = !1, timeout: b, throwOnTimeout: S } = h ?? {};
|
|
114
114
|
let C = null;
|
|
115
115
|
const _ = [new Promise((N) => {
|
|
116
116
|
C = ve(
|
|
@@ -120,7 +120,7 @@ function Vn(e, t = !1) {
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
flush: f,
|
|
123
|
-
deep:
|
|
123
|
+
deep: E,
|
|
124
124
|
immediate: !0
|
|
125
125
|
}
|
|
126
126
|
);
|
|
@@ -138,13 +138,13 @@ function Vn(e, t = !1) {
|
|
|
138
138
|
function l(d) {
|
|
139
139
|
return o(void 0, d);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function s(d) {
|
|
142
142
|
return n(Number.isNaN, d);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function a(d, h) {
|
|
145
145
|
return n((f) => {
|
|
146
|
-
const
|
|
147
|
-
return
|
|
146
|
+
const E = Array.from(f);
|
|
147
|
+
return E.includes(d) || E.includes(Ye(d));
|
|
148
148
|
}, h);
|
|
149
149
|
}
|
|
150
150
|
function u(d) {
|
|
@@ -156,7 +156,7 @@ function Vn(e, t = !1) {
|
|
|
156
156
|
}
|
|
157
157
|
return Array.isArray(Ye(e)) ? {
|
|
158
158
|
toMatch: n,
|
|
159
|
-
toContains:
|
|
159
|
+
toContains: a,
|
|
160
160
|
changed: u,
|
|
161
161
|
changedTimes: c,
|
|
162
162
|
get not() {
|
|
@@ -167,7 +167,7 @@ function Vn(e, t = !1) {
|
|
|
167
167
|
toBe: o,
|
|
168
168
|
toBeTruthy: i,
|
|
169
169
|
toBeNull: r,
|
|
170
|
-
toBeNaN:
|
|
170
|
+
toBeNaN: s,
|
|
171
171
|
toBeUndefined: l,
|
|
172
172
|
changed: u,
|
|
173
173
|
changedTimes: c,
|
|
@@ -192,19 +192,19 @@ function gi(...e) {
|
|
|
192
192
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
193
193
|
const r = [], l = () => {
|
|
194
194
|
r.forEach((c) => c()), r.length = 0;
|
|
195
|
-
},
|
|
195
|
+
}, s = (c, d, h, f) => (c.addEventListener(d, h, f), () => c.removeEventListener(d, h, f)), a = ve(
|
|
196
196
|
() => [Lr(t), Ye(i)],
|
|
197
197
|
([c, d]) => {
|
|
198
198
|
if (l(), !c)
|
|
199
199
|
return;
|
|
200
200
|
const h = Or(d) ? { ...d } : d;
|
|
201
201
|
r.push(
|
|
202
|
-
...n.flatMap((f) => o.map((
|
|
202
|
+
...n.flatMap((f) => o.map((E) => s(c, f, E, h)))
|
|
203
203
|
);
|
|
204
204
|
},
|
|
205
205
|
{ immediate: !0, flush: "post" }
|
|
206
206
|
), u = () => {
|
|
207
|
-
|
|
207
|
+
a(), l();
|
|
208
208
|
};
|
|
209
209
|
return hn(u), u;
|
|
210
210
|
}
|
|
@@ -218,10 +218,10 @@ function yo(...e) {
|
|
|
218
218
|
target: i = hi,
|
|
219
219
|
eventName: r = "keydown",
|
|
220
220
|
passive: l = !1,
|
|
221
|
-
dedupe:
|
|
222
|
-
} = o,
|
|
221
|
+
dedupe: s = !1
|
|
222
|
+
} = o, a = Fr(t);
|
|
223
223
|
return gi(i, r, (c) => {
|
|
224
|
-
c.repeat && Ye(
|
|
224
|
+
c.repeat && Ye(s) || a(c) && n(c);
|
|
225
225
|
}, l);
|
|
226
226
|
}
|
|
227
227
|
function Yr(e) {
|
|
@@ -230,19 +230,19 @@ function Yr(e) {
|
|
|
230
230
|
function Cn(e, t, n, o = {}) {
|
|
231
231
|
var i, r, l;
|
|
232
232
|
const {
|
|
233
|
-
clone:
|
|
234
|
-
passive:
|
|
233
|
+
clone: s = !1,
|
|
234
|
+
passive: a = !1,
|
|
235
235
|
eventName: u,
|
|
236
236
|
deep: c = !1,
|
|
237
237
|
defaultValue: d,
|
|
238
238
|
shouldEmit: h
|
|
239
|
-
} = o, f = Bt(),
|
|
239
|
+
} = o, f = Bt(), E = n || (f == null ? void 0 : f.emit) || ((i = f == null ? void 0 : f.$emit) == null ? void 0 : i.bind(f)) || ((l = (r = f == null ? void 0 : f.proxy) == null ? void 0 : r.$emit) == null ? void 0 : l.bind(f == null ? void 0 : f.proxy));
|
|
240
240
|
let b = u;
|
|
241
241
|
t || (t = "modelValue"), b = b || `update:${t.toString()}`;
|
|
242
|
-
const S = (_) =>
|
|
243
|
-
h ? h(_) &&
|
|
242
|
+
const S = (_) => s ? typeof s == "function" ? s(_) : Yr(_) : _, C = () => Dr(e[t]) ? S(e[t]) : d, M = (_) => {
|
|
243
|
+
h ? h(_) && E(b, _) : E(b, _);
|
|
244
244
|
};
|
|
245
|
-
if (
|
|
245
|
+
if (a) {
|
|
246
246
|
const _ = C(), N = ge(_);
|
|
247
247
|
let z = !1;
|
|
248
248
|
return ve(
|
|
@@ -380,8 +380,8 @@ function oo(e) {
|
|
|
380
380
|
function qr(e) {
|
|
381
381
|
typeof e != "function" && (e = oo(e));
|
|
382
382
|
for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)
|
|
383
|
-
for (var r = t[i], l = r.length,
|
|
384
|
-
(
|
|
383
|
+
for (var r = t[i], l = r.length, s = o[i] = new Array(l), a, u, c = 0; c < l; ++c)
|
|
384
|
+
(a = r[c]) && (u = e.call(a, a.__data__, c, r)) && ("__data__" in a && (u.__data__ = a.__data__), s[c] = u);
|
|
385
385
|
return new Ie(o, this._parents);
|
|
386
386
|
}
|
|
387
387
|
function Jr(e) {
|
|
@@ -403,8 +403,8 @@ function jr(e) {
|
|
|
403
403
|
function el(e) {
|
|
404
404
|
typeof e == "function" ? e = jr(e) : e = pi(e);
|
|
405
405
|
for (var t = this._groups, n = t.length, o = [], i = [], r = 0; r < n; ++r)
|
|
406
|
-
for (var l = t[r],
|
|
407
|
-
(
|
|
406
|
+
for (var l = t[r], s = l.length, a, u = 0; u < s; ++u)
|
|
407
|
+
(a = l[u]) && (o.push(e.call(a, a.__data__, u, l)), i.push(a));
|
|
408
408
|
return new Ie(o, i);
|
|
409
409
|
}
|
|
410
410
|
function mi(e) {
|
|
@@ -433,19 +433,19 @@ var rl = Array.prototype.filter;
|
|
|
433
433
|
function ll() {
|
|
434
434
|
return Array.from(this.children);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function sl(e) {
|
|
437
437
|
return function() {
|
|
438
438
|
return rl.call(this.children, e);
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
return this.selectAll(e == null ? ll :
|
|
441
|
+
function al(e) {
|
|
442
|
+
return this.selectAll(e == null ? ll : sl(typeof e == "function" ? e : yi(e)));
|
|
443
443
|
}
|
|
444
444
|
function ul(e) {
|
|
445
445
|
typeof e != "function" && (e = mi(e));
|
|
446
446
|
for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)
|
|
447
|
-
for (var r = t[i], l = r.length,
|
|
448
|
-
(
|
|
447
|
+
for (var r = t[i], l = r.length, s = o[i] = [], a, u = 0; u < l; ++u)
|
|
448
|
+
(a = r[u]) && e.call(a, a.__data__, u, r) && s.push(a);
|
|
449
449
|
return new Ie(o, this._parents);
|
|
450
450
|
}
|
|
451
451
|
function _i(e) {
|
|
@@ -478,19 +478,19 @@ function dl(e) {
|
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
480
|
function fl(e, t, n, o, i, r) {
|
|
481
|
-
for (var l = 0,
|
|
482
|
-
(
|
|
483
|
-
for (; l <
|
|
484
|
-
(
|
|
481
|
+
for (var l = 0, s, a = t.length, u = r.length; l < u; ++l)
|
|
482
|
+
(s = t[l]) ? (s.__data__ = r[l], o[l] = s) : n[l] = new nn(e, r[l]);
|
|
483
|
+
for (; l < a; ++l)
|
|
484
|
+
(s = t[l]) && (i[l] = s);
|
|
485
485
|
}
|
|
486
486
|
function hl(e, t, n, o, i, r, l) {
|
|
487
|
-
var
|
|
488
|
-
for (
|
|
489
|
-
(
|
|
490
|
-
for (
|
|
491
|
-
f = l.call(e, r[
|
|
492
|
-
for (
|
|
493
|
-
(
|
|
487
|
+
var s, a, u = /* @__PURE__ */ new Map(), c = t.length, d = r.length, h = new Array(c), f;
|
|
488
|
+
for (s = 0; s < c; ++s)
|
|
489
|
+
(a = t[s]) && (h[s] = f = l.call(a, a.__data__, s, t) + "", u.has(f) ? i[s] = a : u.set(f, a));
|
|
490
|
+
for (s = 0; s < d; ++s)
|
|
491
|
+
f = l.call(e, r[s], s, r) + "", (a = u.get(f)) ? (o[s] = a, a.__data__ = r[s], u.delete(f)) : n[s] = new nn(e, r[s]);
|
|
492
|
+
for (s = 0; s < c; ++s)
|
|
493
|
+
(a = t[s]) && u.get(h[s]) === a && (i[s] = a);
|
|
494
494
|
}
|
|
495
495
|
function gl(e) {
|
|
496
496
|
return e.__data__;
|
|
@@ -500,17 +500,17 @@ function vl(e, t) {
|
|
|
500
500
|
return Array.from(this, gl);
|
|
501
501
|
var n = t ? hl : fl, o = this._parents, i = this._groups;
|
|
502
502
|
typeof e != "function" && (e = dl(e));
|
|
503
|
-
for (var r = i.length, l = new Array(r),
|
|
504
|
-
var c = o[u], d = i[u], h = d.length, f = pl(e.call(c, c && c.__data__, u, o)),
|
|
503
|
+
for (var r = i.length, l = new Array(r), s = new Array(r), a = new Array(r), u = 0; u < r; ++u) {
|
|
504
|
+
var c = o[u], d = i[u], h = d.length, f = pl(e.call(c, c && c.__data__, u, o)), E = f.length, b = s[u] = new Array(E), S = l[u] = new Array(E), C = a[u] = new Array(h);
|
|
505
505
|
n(c, d, b, S, C, f, t);
|
|
506
|
-
for (var M = 0, _ = 0, N, z; M <
|
|
506
|
+
for (var M = 0, _ = 0, N, z; M < E; ++M)
|
|
507
507
|
if (N = b[M]) {
|
|
508
|
-
for (M >= _ && (_ = M + 1); !(z = S[_]) && ++_ <
|
|
508
|
+
for (M >= _ && (_ = M + 1); !(z = S[_]) && ++_ < E; )
|
|
509
509
|
;
|
|
510
510
|
N._next = z || null;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
return l = new Ie(l, o), l._enter =
|
|
513
|
+
return l = new Ie(l, o), l._enter = s, l._exit = a, l;
|
|
514
514
|
}
|
|
515
515
|
function pl(e) {
|
|
516
516
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
@@ -523,12 +523,12 @@ function yl(e, t, n) {
|
|
|
523
523
|
return typeof e == "function" ? (o = e(o), o && (o = o.selection())) : o = o.append(e + ""), t != null && (i = t(i), i && (i = i.selection())), n == null ? r.remove() : n(r), o && i ? o.merge(i).order() : i;
|
|
524
524
|
}
|
|
525
525
|
function _l(e) {
|
|
526
|
-
for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, l = Math.min(i, r),
|
|
527
|
-
for (var u = n[
|
|
528
|
-
(f = u[
|
|
529
|
-
for (;
|
|
530
|
-
a
|
|
531
|
-
return new Ie(
|
|
526
|
+
for (var t = e.selection ? e.selection() : e, n = this._groups, o = t._groups, i = n.length, r = o.length, l = Math.min(i, r), s = new Array(i), a = 0; a < l; ++a)
|
|
527
|
+
for (var u = n[a], c = o[a], d = u.length, h = s[a] = new Array(d), f, E = 0; E < d; ++E)
|
|
528
|
+
(f = u[E] || c[E]) && (h[E] = f);
|
|
529
|
+
for (; a < i; ++a)
|
|
530
|
+
s[a] = n[a];
|
|
531
|
+
return new Ie(s, this._parents);
|
|
532
532
|
}
|
|
533
533
|
function wl() {
|
|
534
534
|
for (var e = this._groups, t = -1, n = e.length; ++t < n; )
|
|
@@ -542,9 +542,9 @@ function bl(e) {
|
|
|
542
542
|
return d && h ? e(d.__data__, h.__data__) : !d - !h;
|
|
543
543
|
}
|
|
544
544
|
for (var n = this._groups, o = n.length, i = new Array(o), r = 0; r < o; ++r) {
|
|
545
|
-
for (var l = n[r],
|
|
546
|
-
(u = l[c]) && (
|
|
547
|
-
|
|
545
|
+
for (var l = n[r], s = l.length, a = i[r] = new Array(s), u, c = 0; c < s; ++c)
|
|
546
|
+
(u = l[c]) && (a[c] = u);
|
|
547
|
+
a.sort(t);
|
|
548
548
|
}
|
|
549
549
|
return new Ie(i, this._parents).order();
|
|
550
550
|
}
|
|
@@ -578,8 +578,8 @@ function Ml() {
|
|
|
578
578
|
}
|
|
579
579
|
function Il(e) {
|
|
580
580
|
for (var t = this._groups, n = 0, o = t.length; n < o; ++n)
|
|
581
|
-
for (var i = t[n], r = 0, l = i.length,
|
|
582
|
-
(
|
|
581
|
+
for (var i = t[n], r = 0, l = i.length, s; r < l; ++r)
|
|
582
|
+
(s = i[r]) && e.call(s, s.__data__, r, i);
|
|
583
583
|
return this;
|
|
584
584
|
}
|
|
585
585
|
function kl(e) {
|
|
@@ -746,75 +746,75 @@ function jl(e) {
|
|
|
746
746
|
this.innerHTML = e;
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function es(e) {
|
|
750
750
|
return function() {
|
|
751
751
|
var t = e.apply(this, arguments);
|
|
752
752
|
this.innerHTML = t ?? "";
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return arguments.length ? this.each(e == null ? Ql : (typeof e == "function" ?
|
|
755
|
+
function ts(e) {
|
|
756
|
+
return arguments.length ? this.each(e == null ? Ql : (typeof e == "function" ? es : jl)(e)) : this.node().innerHTML;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function ns() {
|
|
759
759
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
760
760
|
}
|
|
761
|
-
function
|
|
762
|
-
return this.each(
|
|
761
|
+
function os() {
|
|
762
|
+
return this.each(ns);
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function is() {
|
|
765
765
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
766
766
|
}
|
|
767
|
-
function
|
|
768
|
-
return this.each(
|
|
767
|
+
function rs() {
|
|
768
|
+
return this.each(is);
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function ls(e) {
|
|
771
771
|
var t = typeof e == "function" ? e : vi(e);
|
|
772
772
|
return this.select(function() {
|
|
773
773
|
return this.appendChild(t.apply(this, arguments));
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function ss() {
|
|
777
777
|
return null;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
780
|
-
var n = typeof e == "function" ? e : vi(e), o = t == null ?
|
|
779
|
+
function as(e, t) {
|
|
780
|
+
var n = typeof e == "function" ? e : vi(e), o = t == null ? ss : typeof t == "function" ? t : oo(t);
|
|
781
781
|
return this.select(function() {
|
|
782
782
|
return this.insertBefore(n.apply(this, arguments), o.apply(this, arguments) || null);
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function us() {
|
|
786
786
|
var e = this.parentNode;
|
|
787
787
|
e && e.removeChild(this);
|
|
788
788
|
}
|
|
789
|
-
function
|
|
790
|
-
return this.each(
|
|
789
|
+
function cs() {
|
|
790
|
+
return this.each(us);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function ds() {
|
|
793
793
|
var e = this.cloneNode(!1), t = this.parentNode;
|
|
794
794
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function fs() {
|
|
797
797
|
var e = this.cloneNode(!0), t = this.parentNode;
|
|
798
798
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
return this.select(e ?
|
|
800
|
+
function hs(e) {
|
|
801
|
+
return this.select(e ? fs : ds);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function gs(e) {
|
|
804
804
|
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function vs(e) {
|
|
807
807
|
return function(t) {
|
|
808
808
|
e.call(this, t, this.__data__);
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function ps(e) {
|
|
812
812
|
return e.trim().split(/^|\s+/).map(function(t) {
|
|
813
813
|
var n = "", o = t.indexOf(".");
|
|
814
814
|
return o >= 0 && (n = t.slice(o + 1), t = t.slice(0, o)), { type: t, name: n };
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ms(e) {
|
|
818
818
|
return function() {
|
|
819
819
|
var t = this.__on;
|
|
820
820
|
if (t) {
|
|
@@ -824,11 +824,11 @@ function ma(e) {
|
|
|
824
824
|
}
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function ys(e, t, n) {
|
|
828
828
|
return function() {
|
|
829
|
-
var o = this.__on, i, r =
|
|
829
|
+
var o = this.__on, i, r = vs(t);
|
|
830
830
|
if (o) {
|
|
831
|
-
for (var l = 0,
|
|
831
|
+
for (var l = 0, s = o.length; l < s; ++l)
|
|
832
832
|
if ((i = o[l]).type === e.type && i.name === e.name) {
|
|
833
833
|
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = r, i.options = n), i.value = t;
|
|
834
834
|
return;
|
|
@@ -837,40 +837,40 @@ function ya(e, t, n) {
|
|
|
837
837
|
this.addEventListener(e.type, r, n), i = { type: e.type, name: e.name, value: t, listener: r, options: n }, o ? o.push(i) : this.__on = [i];
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
var o =
|
|
840
|
+
function _s(e, t, n) {
|
|
841
|
+
var o = ps(e + ""), i, r = o.length, l;
|
|
842
842
|
if (arguments.length < 2) {
|
|
843
|
-
var
|
|
844
|
-
if (
|
|
845
|
-
for (var
|
|
846
|
-
for (i = 0, c = a
|
|
843
|
+
var s = this.node().__on;
|
|
844
|
+
if (s) {
|
|
845
|
+
for (var a = 0, u = s.length, c; a < u; ++a)
|
|
846
|
+
for (i = 0, c = s[a]; i < r; ++i)
|
|
847
847
|
if ((l = o[i]).type === c.type && l.name === c.name)
|
|
848
848
|
return c.value;
|
|
849
849
|
}
|
|
850
850
|
return;
|
|
851
851
|
}
|
|
852
|
-
for (
|
|
853
|
-
this.each(
|
|
852
|
+
for (s = t ? ys : ms, i = 0; i < r; ++i)
|
|
853
|
+
this.each(s(o[i], t, n));
|
|
854
854
|
return this;
|
|
855
855
|
}
|
|
856
856
|
function Ni(e, t, n) {
|
|
857
857
|
var o = wi(e), i = o.CustomEvent;
|
|
858
858
|
typeof i == "function" ? i = new i(t, n) : (i = o.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function ws(e, t) {
|
|
861
861
|
return function() {
|
|
862
862
|
return Ni(this, e, t);
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function bs(e, t) {
|
|
866
866
|
return function() {
|
|
867
867
|
return Ni(this, e, t.apply(this, arguments));
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return this.each((typeof t == "function" ?
|
|
870
|
+
function Es(e, t) {
|
|
871
|
+
return this.each((typeof t == "function" ? bs : ws)(e, t));
|
|
872
872
|
}
|
|
873
|
-
function*
|
|
873
|
+
function* xs() {
|
|
874
874
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
|
|
875
875
|
for (var o = e[t], i = 0, r = o.length, l; i < r; ++i)
|
|
876
876
|
(l = o[i]) && (yield l);
|
|
@@ -882,7 +882,7 @@ function Ie(e, t) {
|
|
|
882
882
|
function Vt() {
|
|
883
883
|
return new Ie([[document.documentElement]], Ci);
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Ss() {
|
|
886
886
|
return this;
|
|
887
887
|
}
|
|
888
888
|
Ie.prototype = Vt.prototype = {
|
|
@@ -890,14 +890,14 @@ Ie.prototype = Vt.prototype = {
|
|
|
890
890
|
select: qr,
|
|
891
891
|
selectAll: el,
|
|
892
892
|
selectChild: il,
|
|
893
|
-
selectChildren:
|
|
893
|
+
selectChildren: al,
|
|
894
894
|
filter: ul,
|
|
895
895
|
data: vl,
|
|
896
896
|
enter: cl,
|
|
897
897
|
exit: ml,
|
|
898
898
|
join: yl,
|
|
899
899
|
merge: _l,
|
|
900
|
-
selection:
|
|
900
|
+
selection: Ss,
|
|
901
901
|
order: wl,
|
|
902
902
|
sort: bl,
|
|
903
903
|
call: xl,
|
|
@@ -911,29 +911,29 @@ Ie.prototype = Vt.prototype = {
|
|
|
911
911
|
property: Yl,
|
|
912
912
|
classed: Zl,
|
|
913
913
|
text: Jl,
|
|
914
|
-
html:
|
|
915
|
-
raise:
|
|
916
|
-
lower:
|
|
917
|
-
append:
|
|
918
|
-
insert:
|
|
919
|
-
remove:
|
|
920
|
-
clone:
|
|
921
|
-
datum:
|
|
922
|
-
on:
|
|
923
|
-
dispatch:
|
|
924
|
-
[Symbol.iterator]:
|
|
914
|
+
html: ts,
|
|
915
|
+
raise: os,
|
|
916
|
+
lower: rs,
|
|
917
|
+
append: ls,
|
|
918
|
+
insert: as,
|
|
919
|
+
remove: cs,
|
|
920
|
+
clone: hs,
|
|
921
|
+
datum: gs,
|
|
922
|
+
on: _s,
|
|
923
|
+
dispatch: Es,
|
|
924
|
+
[Symbol.iterator]: xs
|
|
925
925
|
};
|
|
926
926
|
function ke(e) {
|
|
927
927
|
return typeof e == "string" ? new Ie([[document.querySelector(e)]], [document.documentElement]) : new Ie([[e]], Ci);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Ns(e) {
|
|
930
930
|
let t;
|
|
931
931
|
for (; t = e.sourceEvent; )
|
|
932
932
|
e = t;
|
|
933
933
|
return e;
|
|
934
934
|
}
|
|
935
935
|
function Oe(e, t) {
|
|
936
|
-
if (e =
|
|
936
|
+
if (e = Ns(e), t === void 0 && (t = e.currentTarget), t) {
|
|
937
937
|
var n = t.ownerSVGElement || t;
|
|
938
938
|
if (n.createSVGPoint) {
|
|
939
939
|
var o = n.createSVGPoint();
|
|
@@ -946,20 +946,20 @@ function Oe(e, t) {
|
|
|
946
946
|
}
|
|
947
947
|
return [e.pageX, e.pageY];
|
|
948
948
|
}
|
|
949
|
-
const
|
|
949
|
+
const Cs = { passive: !1 }, $t = { capture: !0, passive: !1 };
|
|
950
950
|
function Mn(e) {
|
|
951
951
|
e.stopImmediatePropagation();
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function at(e) {
|
|
954
954
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
955
955
|
}
|
|
956
956
|
function Mi(e) {
|
|
957
|
-
var t = e.document.documentElement, n = ke(e).on("dragstart.drag",
|
|
958
|
-
"onselectstart" in t ? n.on("selectstart.drag",
|
|
957
|
+
var t = e.document.documentElement, n = ke(e).on("dragstart.drag", at, $t);
|
|
958
|
+
"onselectstart" in t ? n.on("selectstart.drag", at, $t) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
959
959
|
}
|
|
960
960
|
function Ii(e, t) {
|
|
961
961
|
var n = e.document.documentElement, o = ke(e).on("dragstart.drag", null);
|
|
962
|
-
t && (o.on("click.drag",
|
|
962
|
+
t && (o.on("click.drag", at, $t), setTimeout(function() {
|
|
963
963
|
o.on("click.drag", null);
|
|
964
964
|
}, 0)), "onselectstart" in n ? o.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
965
965
|
}
|
|
@@ -971,8 +971,8 @@ function Ln(e, {
|
|
|
971
971
|
identifier: i,
|
|
972
972
|
active: r,
|
|
973
973
|
x: l,
|
|
974
|
-
y:
|
|
975
|
-
dx:
|
|
974
|
+
y: s,
|
|
975
|
+
dx: a,
|
|
976
976
|
dy: u,
|
|
977
977
|
dispatch: c
|
|
978
978
|
}) {
|
|
@@ -984,8 +984,8 @@ function Ln(e, {
|
|
|
984
984
|
identifier: { value: i, enumerable: !0, configurable: !0 },
|
|
985
985
|
active: { value: r, enumerable: !0, configurable: !0 },
|
|
986
986
|
x: { value: l, enumerable: !0, configurable: !0 },
|
|
987
|
-
y: { value:
|
|
988
|
-
dx: { value:
|
|
987
|
+
y: { value: s, enumerable: !0, configurable: !0 },
|
|
988
|
+
dx: { value: a, enumerable: !0, configurable: !0 },
|
|
989
989
|
dy: { value: u, enumerable: !0, configurable: !0 },
|
|
990
990
|
_: { value: c }
|
|
991
991
|
});
|
|
@@ -994,38 +994,38 @@ Ln.prototype.on = function() {
|
|
|
994
994
|
var e = this._.on.apply(this._, arguments);
|
|
995
995
|
return e === this._ ? this : e;
|
|
996
996
|
};
|
|
997
|
-
function
|
|
997
|
+
function Ms(e) {
|
|
998
998
|
return !e.ctrlKey && !e.button;
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function Is() {
|
|
1001
1001
|
return this.parentNode;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function ks(e, t) {
|
|
1004
1004
|
return t ?? { x: e.x, y: e.y };
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Ps() {
|
|
1007
1007
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1008
1008
|
}
|
|
1009
|
-
function $
|
|
1010
|
-
var e =
|
|
1009
|
+
function $s() {
|
|
1010
|
+
var e = Ms, t = Is, n = ks, o = Ps, i = {}, r = gn("start", "drag", "end"), l = 0, s, a, u, c, d = 0;
|
|
1011
1011
|
function h(N) {
|
|
1012
|
-
N.on("mousedown.drag", f).filter(o).on("touchstart.drag", S).on("touchmove.drag", C,
|
|
1012
|
+
N.on("mousedown.drag", f).filter(o).on("touchstart.drag", S).on("touchmove.drag", C, Cs).on("touchend.drag touchcancel.drag", M).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1013
1013
|
}
|
|
1014
1014
|
function f(N, z) {
|
|
1015
1015
|
if (!(c || !e.call(this, N, z))) {
|
|
1016
1016
|
var Y = _(this, t.call(this, N, z), N, z, "mouse");
|
|
1017
|
-
Y && (ke(N.view).on("mousemove.drag",
|
|
1017
|
+
Y && (ke(N.view).on("mousemove.drag", E, $t).on("mouseup.drag", b, $t), Mi(N.view), Mn(N), u = !1, s = N.clientX, a = N.clientY, Y("start", N));
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1021
|
-
if (
|
|
1022
|
-
var z = N.clientX -
|
|
1020
|
+
function E(N) {
|
|
1021
|
+
if (at(N), !u) {
|
|
1022
|
+
var z = N.clientX - s, Y = N.clientY - a;
|
|
1023
1023
|
u = z * z + Y * Y > d;
|
|
1024
1024
|
}
|
|
1025
1025
|
i.mouse("drag", N);
|
|
1026
1026
|
}
|
|
1027
1027
|
function b(N) {
|
|
1028
|
-
ke(N.view).on("mousemove.drag mouseup.drag", null), Ii(N.view, u),
|
|
1028
|
+
ke(N.view).on("mousemove.drag mouseup.drag", null), Ii(N.view, u), at(N), i.mouse("end", N);
|
|
1029
1029
|
}
|
|
1030
1030
|
function S(N, z) {
|
|
1031
1031
|
if (e.call(this, N, z)) {
|
|
@@ -1037,7 +1037,7 @@ function $a() {
|
|
|
1037
1037
|
function C(N) {
|
|
1038
1038
|
var z = N.changedTouches, Y = z.length, F, I;
|
|
1039
1039
|
for (F = 0; F < Y; ++F)
|
|
1040
|
-
(I = i[z[F].identifier]) && (
|
|
1040
|
+
(I = i[z[F].identifier]) && (at(N), I("drag", N, z[F]));
|
|
1041
1041
|
}
|
|
1042
1042
|
function M(N) {
|
|
1043
1043
|
var z = N.changedTouches, Y = z.length, F, I;
|
|
@@ -1059,9 +1059,9 @@ function $a() {
|
|
|
1059
1059
|
dy: 0,
|
|
1060
1060
|
dispatch: O
|
|
1061
1061
|
}), F)) != null)
|
|
1062
|
-
return w = y.x - D[0] || 0, Z = y.y - D[1] || 0, function P(
|
|
1062
|
+
return w = y.x - D[0] || 0, Z = y.y - D[1] || 0, function P(x, $, A) {
|
|
1063
1063
|
var V = D, B;
|
|
1064
|
-
switch (
|
|
1064
|
+
switch (x) {
|
|
1065
1065
|
case "start":
|
|
1066
1066
|
i[I] = P, B = l++;
|
|
1067
1067
|
break;
|
|
@@ -1072,9 +1072,9 @@ function $a() {
|
|
|
1072
1072
|
break;
|
|
1073
1073
|
}
|
|
1074
1074
|
O.call(
|
|
1075
|
-
|
|
1075
|
+
x,
|
|
1076
1076
|
N,
|
|
1077
|
-
new Ln(
|
|
1077
|
+
new Ln(x, {
|
|
1078
1078
|
sourceEvent: $,
|
|
1079
1079
|
subject: y,
|
|
1080
1080
|
target: h,
|
|
@@ -1116,7 +1116,7 @@ function ki(e, t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
function Rt() {
|
|
1118
1118
|
}
|
|
1119
|
-
var Tt = 0.7, on = 1 / Tt, ut = "\\s*([+-]?\\d+)\\s*", Dt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Ve = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
1119
|
+
var Tt = 0.7, on = 1 / Tt, ut = "\\s*([+-]?\\d+)\\s*", Dt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Ve = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Ts = /^#([0-9a-f]{3,8})$/, Ds = new RegExp(`^rgb\\(${ut},${ut},${ut}\\)$`), As = new RegExp(`^rgb\\(${Ve},${Ve},${Ve}\\)$`), Os = new RegExp(`^rgba\\(${ut},${ut},${ut},${Dt}\\)$`), zs = new RegExp(`^rgba\\(${Ve},${Ve},${Ve},${Dt}\\)$`), Bs = new RegExp(`^hsl\\(${Dt},${Ve},${Ve}\\)$`), Vs = new RegExp(`^hsla\\(${Dt},${Ve},${Ve},${Dt}\\)$`), bo = {
|
|
1120
1120
|
aliceblue: 15792383,
|
|
1121
1121
|
antiquewhite: 16444375,
|
|
1122
1122
|
aqua: 65535,
|
|
@@ -1276,18 +1276,18 @@ ro(Rt, it, {
|
|
|
1276
1276
|
hex: Eo,
|
|
1277
1277
|
// Deprecated! Use color.formatHex.
|
|
1278
1278
|
formatHex: Eo,
|
|
1279
|
-
formatHex8:
|
|
1280
|
-
formatHsl:
|
|
1279
|
+
formatHex8: Rs,
|
|
1280
|
+
formatHsl: Hs,
|
|
1281
1281
|
formatRgb: xo,
|
|
1282
1282
|
toString: xo
|
|
1283
1283
|
});
|
|
1284
1284
|
function Eo() {
|
|
1285
1285
|
return this.rgb().formatHex();
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Rs() {
|
|
1288
1288
|
return this.rgb().formatHex8();
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Hs() {
|
|
1291
1291
|
return Pi(this).formatHsl();
|
|
1292
1292
|
}
|
|
1293
1293
|
function xo() {
|
|
@@ -1295,7 +1295,7 @@ function xo() {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
function it(e) {
|
|
1297
1297
|
var t, n;
|
|
1298
|
-
return e = (e + "").trim().toLowerCase(), (t =
|
|
1298
|
+
return e = (e + "").trim().toLowerCase(), (t = Ts.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? So(t) : n === 3 ? new Ce(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Lt(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Lt(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Ds.exec(e)) ? new Ce(t[1], t[2], t[3], 1) : (t = As.exec(e)) ? new Ce(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Os.exec(e)) ? Lt(t[1], t[2], t[3], t[4]) : (t = zs.exec(e)) ? Lt(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Bs.exec(e)) ? Mo(t[1], t[2] / 100, t[3] / 100, 1) : (t = Vs.exec(e)) ? Mo(t[1], t[2] / 100, t[3] / 100, t[4]) : bo.hasOwnProperty(e) ? So(bo[e]) : e === "transparent" ? new Ce(NaN, NaN, NaN, 0) : null;
|
|
1299
1299
|
}
|
|
1300
1300
|
function So(e) {
|
|
1301
1301
|
return new Ce(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
@@ -1303,11 +1303,11 @@ function So(e) {
|
|
|
1303
1303
|
function Lt(e, t, n, o) {
|
|
1304
1304
|
return o <= 0 && (e = t = n = NaN), new Ce(e, t, n, o);
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Ls(e) {
|
|
1307
1307
|
return e instanceof Rt || (e = it(e)), e ? (e = e.rgb(), new Ce(e.r, e.g, e.b, e.opacity)) : new Ce();
|
|
1308
1308
|
}
|
|
1309
1309
|
function Fn(e, t, n, o) {
|
|
1310
|
-
return arguments.length === 1 ?
|
|
1310
|
+
return arguments.length === 1 ? Ls(e) : new Ce(e, t, n, o ?? 1);
|
|
1311
1311
|
}
|
|
1312
1312
|
function Ce(e, t, n, o) {
|
|
1313
1313
|
this.r = +e, this.g = +t, this.b = +n, this.opacity = +o;
|
|
@@ -1331,14 +1331,14 @@ ro(Ce, Fn, ki(Rt, {
|
|
|
1331
1331
|
hex: No,
|
|
1332
1332
|
// Deprecated! Use color.formatHex.
|
|
1333
1333
|
formatHex: No,
|
|
1334
|
-
formatHex8:
|
|
1334
|
+
formatHex8: Fs,
|
|
1335
1335
|
formatRgb: Co,
|
|
1336
1336
|
toString: Co
|
|
1337
1337
|
}));
|
|
1338
1338
|
function No() {
|
|
1339
1339
|
return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}`;
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function Fs() {
|
|
1342
1342
|
return `#${tt(this.r)}${tt(this.g)}${tt(this.b)}${tt((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1343
1343
|
}
|
|
1344
1344
|
function Co() {
|
|
@@ -1365,16 +1365,16 @@ function Pi(e) {
|
|
|
1365
1365
|
if (e instanceof Pe)
|
|
1366
1366
|
return e;
|
|
1367
1367
|
e = e.rgb();
|
|
1368
|
-
var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), l = NaN,
|
|
1369
|
-
return
|
|
1368
|
+
var t = e.r / 255, n = e.g / 255, o = e.b / 255, i = Math.min(t, n, o), r = Math.max(t, n, o), l = NaN, s = r - i, a = (r + i) / 2;
|
|
1369
|
+
return s ? (t === r ? l = (n - o) / s + (n < o) * 6 : n === r ? l = (o - t) / s + 2 : l = (t - n) / s + 4, s /= a < 0.5 ? r + i : 2 - r - i, l *= 60) : s = a > 0 && a < 1 ? 0 : l, new Pe(l, s, a, e.opacity);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Ys(e, t, n, o) {
|
|
1372
1372
|
return arguments.length === 1 ? Pi(e) : new Pe(e, t, n, o ?? 1);
|
|
1373
1373
|
}
|
|
1374
1374
|
function Pe(e, t, n, o) {
|
|
1375
1375
|
this.h = +e, this.s = +t, this.l = +n, this.opacity = +o;
|
|
1376
1376
|
}
|
|
1377
|
-
ro(Pe,
|
|
1377
|
+
ro(Pe, Ys, ki(Rt, {
|
|
1378
1378
|
brighter(e) {
|
|
1379
1379
|
return e = e == null ? on : Math.pow(on, e), new Pe(this.h, this.s, this.l * e, this.opacity);
|
|
1380
1380
|
},
|
|
@@ -1411,36 +1411,36 @@ function In(e, t, n) {
|
|
|
1411
1411
|
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
1412
1412
|
}
|
|
1413
1413
|
const lo = (e) => () => e;
|
|
1414
|
-
function
|
|
1414
|
+
function Gs(e, t) {
|
|
1415
1415
|
return function(n) {
|
|
1416
1416
|
return e + n * t;
|
|
1417
1417
|
};
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function Xs(e, t, n) {
|
|
1420
1420
|
return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(o) {
|
|
1421
1421
|
return Math.pow(e + o * t, n);
|
|
1422
1422
|
};
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function Us(e) {
|
|
1425
1425
|
return (e = +e) == 1 ? $i : function(t, n) {
|
|
1426
|
-
return n - t ?
|
|
1426
|
+
return n - t ? Xs(t, n, e) : lo(isNaN(t) ? n : t);
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
1429
|
function $i(e, t) {
|
|
1430
1430
|
var n = t - e;
|
|
1431
|
-
return n ?
|
|
1431
|
+
return n ? Gs(e, n) : lo(isNaN(e) ? t : e);
|
|
1432
1432
|
}
|
|
1433
1433
|
const ln = function e(t) {
|
|
1434
|
-
var n =
|
|
1434
|
+
var n = Us(t);
|
|
1435
1435
|
function o(i, r) {
|
|
1436
|
-
var l = n((i = Fn(i)).r, (r = Fn(r)).r),
|
|
1436
|
+
var l = n((i = Fn(i)).r, (r = Fn(r)).r), s = n(i.g, r.g), a = n(i.b, r.b), u = $i(i.opacity, r.opacity);
|
|
1437
1437
|
return function(c) {
|
|
1438
|
-
return i.r = l(c), i.g =
|
|
1438
|
+
return i.r = l(c), i.g = s(c), i.b = a(c), i.opacity = u(c), i + "";
|
|
1439
1439
|
};
|
|
1440
1440
|
}
|
|
1441
1441
|
return o.gamma = e, o;
|
|
1442
1442
|
}(1);
|
|
1443
|
-
function
|
|
1443
|
+
function Zs(e, t) {
|
|
1444
1444
|
t || (t = []);
|
|
1445
1445
|
var n = e ? Math.min(t.length, e.length) : 0, o = t.slice(), i;
|
|
1446
1446
|
return function(r) {
|
|
@@ -1449,22 +1449,22 @@ function Za(e, t) {
|
|
|
1449
1449
|
return o;
|
|
1450
1450
|
};
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1452
|
+
function Ws(e) {
|
|
1453
1453
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function Ks(e, t) {
|
|
1456
1456
|
var n = t ? t.length : 0, o = e ? Math.min(n, e.length) : 0, i = new Array(o), r = new Array(n), l;
|
|
1457
1457
|
for (l = 0; l < o; ++l)
|
|
1458
1458
|
i[l] = It(e[l], t[l]);
|
|
1459
1459
|
for (; l < n; ++l)
|
|
1460
1460
|
r[l] = t[l];
|
|
1461
|
-
return function(
|
|
1461
|
+
return function(s) {
|
|
1462
1462
|
for (l = 0; l < o; ++l)
|
|
1463
|
-
r[l] = i[l](
|
|
1463
|
+
r[l] = i[l](s);
|
|
1464
1464
|
return r;
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1467
|
+
function qs(e, t) {
|
|
1468
1468
|
var n = /* @__PURE__ */ new Date();
|
|
1469
1469
|
return e = +e, t = +t, function(o) {
|
|
1470
1470
|
return n.setTime(e * (1 - o) + t * o), n;
|
|
@@ -1475,7 +1475,7 @@ function ze(e, t) {
|
|
|
1475
1475
|
return e * (1 - n) + t * n;
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Js(e, t) {
|
|
1479
1479
|
var n = {}, o = {}, i;
|
|
1480
1480
|
(e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
|
|
1481
1481
|
for (i in t)
|
|
@@ -1487,29 +1487,29 @@ function Ja(e, t) {
|
|
|
1487
1487
|
};
|
|
1488
1488
|
}
|
|
1489
1489
|
var Yn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, kn = new RegExp(Yn.source, "g");
|
|
1490
|
-
function
|
|
1490
|
+
function Qs(e) {
|
|
1491
1491
|
return function() {
|
|
1492
1492
|
return e;
|
|
1493
1493
|
};
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function js(e) {
|
|
1496
1496
|
return function(t) {
|
|
1497
1497
|
return e(t) + "";
|
|
1498
1498
|
};
|
|
1499
1499
|
}
|
|
1500
1500
|
function Ti(e, t) {
|
|
1501
|
-
var n = Yn.lastIndex = kn.lastIndex = 0, o, i, r, l = -1,
|
|
1501
|
+
var n = Yn.lastIndex = kn.lastIndex = 0, o, i, r, l = -1, s = [], a = [];
|
|
1502
1502
|
for (e = e + "", t = t + ""; (o = Yn.exec(e)) && (i = kn.exec(t)); )
|
|
1503
|
-
(r = i.index) > n && (r = t.slice(n, r),
|
|
1504
|
-
return n < t.length && (r = t.slice(n),
|
|
1503
|
+
(r = i.index) > n && (r = t.slice(n, r), s[l] ? s[l] += r : s[++l] = r), (o = o[0]) === (i = i[0]) ? s[l] ? s[l] += i : s[++l] = i : (s[++l] = null, a.push({ i: l, x: ze(o, i) })), n = kn.lastIndex;
|
|
1504
|
+
return n < t.length && (r = t.slice(n), s[l] ? s[l] += r : s[++l] = r), s.length < 2 ? a[0] ? js(a[0].x) : Qs(t) : (t = a.length, function(u) {
|
|
1505
1505
|
for (var c = 0, d; c < t; ++c)
|
|
1506
|
-
|
|
1507
|
-
return
|
|
1506
|
+
s[(d = a[c]).i] = d.x(u);
|
|
1507
|
+
return s.join("");
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
function It(e, t) {
|
|
1511
1511
|
var n = typeof t, o;
|
|
1512
|
-
return t == null || n === "boolean" ? lo(t) : (n === "number" ? ze : n === "string" ? (o = it(t)) ? (t = o, ln) : Ti : t instanceof it ? ln : t instanceof Date ?
|
|
1512
|
+
return t == null || n === "boolean" ? lo(t) : (n === "number" ? ze : n === "string" ? (o = it(t)) ? (t = o, ln) : Ti : t instanceof it ? ln : t instanceof Date ? qs : Ws(t) ? Zs : Array.isArray(t) ? Ks : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? Js : ze)(e, t);
|
|
1513
1513
|
}
|
|
1514
1514
|
var ko = 180 / Math.PI, Gn = {
|
|
1515
1515
|
translateX: 0,
|
|
@@ -1520,83 +1520,83 @@ var ko = 180 / Math.PI, Gn = {
|
|
|
1520
1520
|
scaleY: 1
|
|
1521
1521
|
};
|
|
1522
1522
|
function Di(e, t, n, o, i, r) {
|
|
1523
|
-
var l,
|
|
1524
|
-
return (l = Math.sqrt(e * e + t * t)) && (e /= l, t /= l), (
|
|
1523
|
+
var l, s, a;
|
|
1524
|
+
return (l = Math.sqrt(e * e + t * t)) && (e /= l, t /= l), (a = e * n + t * o) && (n -= e * a, o -= t * a), (s = Math.sqrt(n * n + o * o)) && (n /= s, o /= s, a /= s), e * o < t * n && (e = -e, t = -t, a = -a, l = -l), {
|
|
1525
1525
|
translateX: i,
|
|
1526
1526
|
translateY: r,
|
|
1527
1527
|
rotate: Math.atan2(t, e) * ko,
|
|
1528
|
-
skewX: Math.atan(
|
|
1528
|
+
skewX: Math.atan(a) * ko,
|
|
1529
1529
|
scaleX: l,
|
|
1530
|
-
scaleY:
|
|
1530
|
+
scaleY: s
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
var Yt;
|
|
1534
|
-
function
|
|
1534
|
+
function ea(e) {
|
|
1535
1535
|
const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
|
|
1536
1536
|
return t.isIdentity ? Gn : Di(t.a, t.b, t.c, t.d, t.e, t.f);
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function ta(e) {
|
|
1539
1539
|
return e == null || (Yt || (Yt = document.createElementNS("http://www.w3.org/2000/svg", "g")), Yt.setAttribute("transform", e), !(e = Yt.transform.baseVal.consolidate())) ? Gn : (e = e.matrix, Di(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
1540
1540
|
}
|
|
1541
1541
|
function Ai(e, t, n, o) {
|
|
1542
1542
|
function i(u) {
|
|
1543
1543
|
return u.length ? u.pop() + " " : "";
|
|
1544
1544
|
}
|
|
1545
|
-
function r(u, c, d, h, f,
|
|
1545
|
+
function r(u, c, d, h, f, E) {
|
|
1546
1546
|
if (u !== d || c !== h) {
|
|
1547
1547
|
var b = f.push("translate(", null, t, null, n);
|
|
1548
|
-
|
|
1548
|
+
E.push({ i: b - 4, x: ze(u, d) }, { i: b - 2, x: ze(c, h) });
|
|
1549
1549
|
} else (d || h) && f.push("translate(" + d + t + h + n);
|
|
1550
1550
|
}
|
|
1551
1551
|
function l(u, c, d, h) {
|
|
1552
1552
|
u !== c ? (u - c > 180 ? c += 360 : c - u > 180 && (u += 360), h.push({ i: d.push(i(d) + "rotate(", null, o) - 2, x: ze(u, c) })) : c && d.push(i(d) + "rotate(" + c + o);
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function s(u, c, d, h) {
|
|
1555
1555
|
u !== c ? h.push({ i: d.push(i(d) + "skewX(", null, o) - 2, x: ze(u, c) }) : c && d.push(i(d) + "skewX(" + c + o);
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function a(u, c, d, h, f, E) {
|
|
1558
1558
|
if (u !== d || c !== h) {
|
|
1559
1559
|
var b = f.push(i(f) + "scale(", null, ",", null, ")");
|
|
1560
|
-
|
|
1560
|
+
E.push({ i: b - 4, x: ze(u, d) }, { i: b - 2, x: ze(c, h) });
|
|
1561
1561
|
} else (d !== 1 || h !== 1) && f.push(i(f) + "scale(" + d + "," + h + ")");
|
|
1562
1562
|
}
|
|
1563
1563
|
return function(u, c) {
|
|
1564
1564
|
var d = [], h = [];
|
|
1565
|
-
return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, d, h), l(u.rotate, c.rotate, d, h),
|
|
1566
|
-
for (var
|
|
1567
|
-
d[(S = h[
|
|
1565
|
+
return u = e(u), c = e(c), r(u.translateX, u.translateY, c.translateX, c.translateY, d, h), l(u.rotate, c.rotate, d, h), s(u.skewX, c.skewX, d, h), a(u.scaleX, u.scaleY, c.scaleX, c.scaleY, d, h), u = c = null, function(f) {
|
|
1566
|
+
for (var E = -1, b = h.length, S; ++E < b; )
|
|
1567
|
+
d[(S = h[E]).i] = S.x(f);
|
|
1568
1568
|
return d.join("");
|
|
1569
1569
|
};
|
|
1570
1570
|
};
|
|
1571
1571
|
}
|
|
1572
|
-
var
|
|
1572
|
+
var na = Ai(ea, "px, ", "px)", "deg)"), oa = Ai(ta, ", ", ")", ")"), ia = 1e-12;
|
|
1573
1573
|
function Po(e) {
|
|
1574
1574
|
return ((e = Math.exp(e)) + 1 / e) / 2;
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1576
|
+
function ra(e) {
|
|
1577
1577
|
return ((e = Math.exp(e)) - 1 / e) / 2;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function la(e) {
|
|
1580
1580
|
return ((e = Math.exp(2 * e)) - 1) / (e + 1);
|
|
1581
1581
|
}
|
|
1582
1582
|
const qt = function e(t, n, o) {
|
|
1583
1583
|
function i(r, l) {
|
|
1584
|
-
var
|
|
1585
|
-
if (b <
|
|
1584
|
+
var s = r[0], a = r[1], u = r[2], c = l[0], d = l[1], h = l[2], f = c - s, E = d - a, b = f * f + E * E, S, C;
|
|
1585
|
+
if (b < ia)
|
|
1586
1586
|
C = Math.log(h / u) / t, S = function(F) {
|
|
1587
1587
|
return [
|
|
1588
|
-
|
|
1589
|
-
|
|
1588
|
+
s + F * f,
|
|
1589
|
+
a + F * E,
|
|
1590
1590
|
u * Math.exp(t * F * C)
|
|
1591
1591
|
];
|
|
1592
1592
|
};
|
|
1593
1593
|
else {
|
|
1594
1594
|
var M = Math.sqrt(b), _ = (h * h - u * u + o * b) / (2 * u * n * M), N = (h * h - u * u - o * b) / (2 * h * n * M), z = Math.log(Math.sqrt(_ * _ + 1) - _), Y = Math.log(Math.sqrt(N * N + 1) - N);
|
|
1595
1595
|
C = (Y - z) / t, S = function(F) {
|
|
1596
|
-
var I = F * C, T = Po(z), O = u / (n * M) * (T *
|
|
1596
|
+
var I = F * C, T = Po(z), O = u / (n * M) * (T * la(t * I + z) - ra(z));
|
|
1597
1597
|
return [
|
|
1598
|
-
|
|
1599
|
-
|
|
1598
|
+
s + O * f,
|
|
1599
|
+
a + O * E,
|
|
1600
1600
|
u * T / Po(t * I + z)
|
|
1601
1601
|
];
|
|
1602
1602
|
};
|
|
@@ -1604,17 +1604,17 @@ const qt = function e(t, n, o) {
|
|
|
1604
1604
|
return S.duration = C * 1e3 * t / Math.SQRT2, S;
|
|
1605
1605
|
}
|
|
1606
1606
|
return i.rho = function(r) {
|
|
1607
|
-
var l = Math.max(1e-3, +r),
|
|
1608
|
-
return e(l,
|
|
1607
|
+
var l = Math.max(1e-3, +r), s = l * l, a = s * s;
|
|
1608
|
+
return e(l, s, a);
|
|
1609
1609
|
}, i;
|
|
1610
1610
|
}(Math.SQRT2, 2, 4);
|
|
1611
|
-
var pt = 0, St = 0, Et = 0, Oi = 1e3,
|
|
1611
|
+
var pt = 0, St = 0, Et = 0, Oi = 1e3, sn, Nt, an = 0, rt = 0, pn = 0, At = typeof performance == "object" && performance.now ? performance : Date, zi = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1612
1612
|
setTimeout(e, 17);
|
|
1613
1613
|
};
|
|
1614
|
-
function
|
|
1615
|
-
return rt || (zi(
|
|
1614
|
+
function so() {
|
|
1615
|
+
return rt || (zi(sa), rt = At.now() + pn);
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function sa() {
|
|
1618
1618
|
rt = 0;
|
|
1619
1619
|
}
|
|
1620
1620
|
function un() {
|
|
@@ -1625,7 +1625,7 @@ un.prototype = Bi.prototype = {
|
|
|
1625
1625
|
restart: function(e, t, n) {
|
|
1626
1626
|
if (typeof e != "function")
|
|
1627
1627
|
throw new TypeError("callback is not a function");
|
|
1628
|
-
n = (n == null ?
|
|
1628
|
+
n = (n == null ? so() : +n) + (t == null ? 0 : +t), !this._next && Nt !== this && (Nt ? Nt._next = this : sn = this, Nt = this), this._call = e, this._time = n, Xn();
|
|
1629
1629
|
},
|
|
1630
1630
|
stop: function() {
|
|
1631
1631
|
this._call && (this._call = null, this._time = 1 / 0, Xn());
|
|
@@ -1635,34 +1635,34 @@ function Bi(e, t, n) {
|
|
|
1635
1635
|
var o = new un();
|
|
1636
1636
|
return o.restart(e, t, n), o;
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
|
|
1640
|
-
for (var e =
|
|
1638
|
+
function aa() {
|
|
1639
|
+
so(), ++pt;
|
|
1640
|
+
for (var e = sn, t; e; )
|
|
1641
1641
|
(t = rt - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
1642
1642
|
--pt;
|
|
1643
1643
|
}
|
|
1644
1644
|
function $o() {
|
|
1645
|
-
rt = (
|
|
1645
|
+
rt = (an = At.now()) + pn, pt = St = 0;
|
|
1646
1646
|
try {
|
|
1647
|
-
|
|
1647
|
+
aa();
|
|
1648
1648
|
} finally {
|
|
1649
|
-
pt = 0,
|
|
1649
|
+
pt = 0, ca(), rt = 0;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
var e = At.now(), t = e -
|
|
1654
|
-
t > Oi && (pn -= t,
|
|
1652
|
+
function ua() {
|
|
1653
|
+
var e = At.now(), t = e - an;
|
|
1654
|
+
t > Oi && (pn -= t, an = e);
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1657
|
-
for (var e, t =
|
|
1658
|
-
t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n :
|
|
1656
|
+
function ca() {
|
|
1657
|
+
for (var e, t = sn, n, o = 1 / 0; t; )
|
|
1658
|
+
t._call ? (o > t._time && (o = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : sn = n);
|
|
1659
1659
|
Nt = e, Xn(o);
|
|
1660
1660
|
}
|
|
1661
1661
|
function Xn(e) {
|
|
1662
1662
|
if (!pt) {
|
|
1663
1663
|
St && (St = clearTimeout(St));
|
|
1664
1664
|
var t = e - rt;
|
|
1665
|
-
t > 24 ? (e < 1 / 0 && (St = setTimeout($o, e - At.now() - pn)), Et && (Et = clearInterval(Et))) : (Et || (
|
|
1665
|
+
t > 24 ? (e < 1 / 0 && (St = setTimeout($o, e - At.now() - pn)), Et && (Et = clearInterval(Et))) : (Et || (an = At.now(), Et = setInterval(ua, Oi)), pt = 1, zi($o));
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
function To(e, t, n) {
|
|
@@ -1671,21 +1671,21 @@ function To(e, t, n) {
|
|
|
1671
1671
|
o.stop(), e(i + t);
|
|
1672
1672
|
}, t, n), o;
|
|
1673
1673
|
}
|
|
1674
|
-
var
|
|
1674
|
+
var da = gn("start", "end", "cancel", "interrupt"), fa = [], Vi = 0, Do = 1, Un = 2, Jt = 3, Ao = 4, Zn = 5, Qt = 6;
|
|
1675
1675
|
function mn(e, t, n, o, i, r) {
|
|
1676
1676
|
var l = e.__transition;
|
|
1677
1677
|
if (!l)
|
|
1678
1678
|
e.__transition = {};
|
|
1679
1679
|
else if (n in l)
|
|
1680
1680
|
return;
|
|
1681
|
-
|
|
1681
|
+
ha(e, n, {
|
|
1682
1682
|
name: t,
|
|
1683
1683
|
index: o,
|
|
1684
1684
|
// For context during callback.
|
|
1685
1685
|
group: i,
|
|
1686
1686
|
// For context during callback.
|
|
1687
|
-
on:
|
|
1688
|
-
tween:
|
|
1687
|
+
on: da,
|
|
1688
|
+
tween: fa,
|
|
1689
1689
|
time: r.time,
|
|
1690
1690
|
delay: r.delay,
|
|
1691
1691
|
duration: r.duration,
|
|
@@ -1694,7 +1694,7 @@ function mn(e, t, n, o, i, r) {
|
|
|
1694
1694
|
state: Vi
|
|
1695
1695
|
});
|
|
1696
1696
|
}
|
|
1697
|
-
function
|
|
1697
|
+
function ao(e, t) {
|
|
1698
1698
|
var n = De(e, t);
|
|
1699
1699
|
if (n.state > Vi)
|
|
1700
1700
|
throw new Error("too late; already scheduled");
|
|
@@ -1712,7 +1712,7 @@ function De(e, t) {
|
|
|
1712
1712
|
throw new Error("transition not found");
|
|
1713
1713
|
return n;
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1715
|
+
function ha(e, t, n) {
|
|
1716
1716
|
var o = e.__transition, i;
|
|
1717
1717
|
o[t] = n, n.timer = Bi(r, 0, n.time);
|
|
1718
1718
|
function r(u) {
|
|
@@ -1721,7 +1721,7 @@ function hs(e, t, n) {
|
|
|
1721
1721
|
function l(u) {
|
|
1722
1722
|
var c, d, h, f;
|
|
1723
1723
|
if (n.state !== Do)
|
|
1724
|
-
return
|
|
1724
|
+
return a();
|
|
1725
1725
|
for (c in o)
|
|
1726
1726
|
if (f = o[c], f.name === n.name) {
|
|
1727
1727
|
if (f.state === Jt)
|
|
@@ -1729,19 +1729,19 @@ function hs(e, t, n) {
|
|
|
1729
1729
|
f.state === Ao ? (f.state = Qt, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete o[c]) : +c < t && (f.state = Qt, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete o[c]);
|
|
1730
1730
|
}
|
|
1731
1731
|
if (To(function() {
|
|
1732
|
-
n.state === Jt && (n.state = Ao, n.timer.restart(
|
|
1732
|
+
n.state === Jt && (n.state = Ao, n.timer.restart(s, n.delay, n.time), s(u));
|
|
1733
1733
|
}), n.state = Un, n.on.call("start", e, e.__data__, n.index, n.group), n.state === Un) {
|
|
1734
1734
|
for (n.state = Jt, i = new Array(h = n.tween.length), c = 0, d = -1; c < h; ++c)
|
|
1735
1735
|
(f = n.tween[c].value.call(e, e.__data__, n.index, n.group)) && (i[++d] = f);
|
|
1736
1736
|
i.length = d + 1;
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
-
function
|
|
1740
|
-
for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(
|
|
1739
|
+
function s(u) {
|
|
1740
|
+
for (var c = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(a), n.state = Zn, 1), d = -1, h = i.length; ++d < h; )
|
|
1741
1741
|
i[d].call(e, c);
|
|
1742
|
-
n.state === Zn && (n.on.call("end", e, e.__data__, n.index, n.group),
|
|
1742
|
+
n.state === Zn && (n.on.call("end", e, e.__data__, n.index, n.group), a());
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function a() {
|
|
1745
1745
|
n.state = Qt, n.timer.stop(), delete o[t];
|
|
1746
1746
|
for (var u in o)
|
|
1747
1747
|
return;
|
|
@@ -1762,18 +1762,18 @@ function jt(e, t) {
|
|
|
1762
1762
|
r && delete e.__transition;
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function ga(e) {
|
|
1766
1766
|
return this.each(function() {
|
|
1767
1767
|
jt(this, e);
|
|
1768
1768
|
});
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function va(e, t) {
|
|
1771
1771
|
var n, o;
|
|
1772
1772
|
return function() {
|
|
1773
1773
|
var i = Le(this, e), r = i.tween;
|
|
1774
1774
|
if (r !== n) {
|
|
1775
1775
|
o = n = r;
|
|
1776
|
-
for (var l = 0,
|
|
1776
|
+
for (var l = 0, s = o.length; l < s; ++l)
|
|
1777
1777
|
if (o[l].name === t) {
|
|
1778
1778
|
o = o.slice(), o.splice(l, 1);
|
|
1779
1779
|
break;
|
|
@@ -1782,7 +1782,7 @@ function vs(e, t) {
|
|
|
1782
1782
|
i.tween = o;
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function pa(e, t, n) {
|
|
1786
1786
|
var o, i;
|
|
1787
1787
|
if (typeof n != "function")
|
|
1788
1788
|
throw new Error();
|
|
@@ -1790,17 +1790,17 @@ function ps(e, t, n) {
|
|
|
1790
1790
|
var r = Le(this, e), l = r.tween;
|
|
1791
1791
|
if (l !== o) {
|
|
1792
1792
|
i = (o = l).slice();
|
|
1793
|
-
for (var
|
|
1794
|
-
if (i[
|
|
1795
|
-
i[
|
|
1793
|
+
for (var s = { name: t, value: n }, a = 0, u = i.length; a < u; ++a)
|
|
1794
|
+
if (i[a].name === t) {
|
|
1795
|
+
i[a] = s;
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
|
-
|
|
1798
|
+
a === u && i.push(s);
|
|
1799
1799
|
}
|
|
1800
1800
|
r.tween = i;
|
|
1801
1801
|
};
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function ma(e, t) {
|
|
1804
1804
|
var n = this._id;
|
|
1805
1805
|
if (e += "", arguments.length < 2) {
|
|
1806
1806
|
for (var o = De(this.node(), n).tween, i = 0, r = o.length, l; i < r; ++i)
|
|
@@ -1808,7 +1808,7 @@ function ms(e, t) {
|
|
|
1808
1808
|
return l.value;
|
|
1809
1809
|
return null;
|
|
1810
1810
|
}
|
|
1811
|
-
return this.each((t == null ?
|
|
1811
|
+
return this.each((t == null ? va : pa)(n, e, t));
|
|
1812
1812
|
}
|
|
1813
1813
|
function uo(e, t, n) {
|
|
1814
1814
|
var o = e._id;
|
|
@@ -1823,75 +1823,75 @@ function Ri(e, t) {
|
|
|
1823
1823
|
var n;
|
|
1824
1824
|
return (typeof t == "number" ? ze : t instanceof it ? ln : (n = it(t)) ? (t = n, ln) : Ti)(e, t);
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function ya(e) {
|
|
1827
1827
|
return function() {
|
|
1828
1828
|
this.removeAttribute(e);
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function _a(e) {
|
|
1832
1832
|
return function() {
|
|
1833
1833
|
this.removeAttributeNS(e.space, e.local);
|
|
1834
1834
|
};
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function wa(e, t, n) {
|
|
1837
1837
|
var o, i = n + "", r;
|
|
1838
1838
|
return function() {
|
|
1839
1839
|
var l = this.getAttribute(e);
|
|
1840
1840
|
return l === i ? null : l === o ? r : r = t(o = l, n);
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function ba(e, t, n) {
|
|
1844
1844
|
var o, i = n + "", r;
|
|
1845
1845
|
return function() {
|
|
1846
1846
|
var l = this.getAttributeNS(e.space, e.local);
|
|
1847
1847
|
return l === i ? null : l === o ? r : r = t(o = l, n);
|
|
1848
1848
|
};
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function Ea(e, t, n) {
|
|
1851
1851
|
var o, i, r;
|
|
1852
1852
|
return function() {
|
|
1853
|
-
var l,
|
|
1854
|
-
return
|
|
1853
|
+
var l, s = n(this), a;
|
|
1854
|
+
return s == null ? void this.removeAttribute(e) : (l = this.getAttribute(e), a = s + "", l === a ? null : l === o && a === i ? r : (i = a, r = t(o = l, s)));
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function xa(e, t, n) {
|
|
1858
1858
|
var o, i, r;
|
|
1859
1859
|
return function() {
|
|
1860
|
-
var l,
|
|
1861
|
-
return
|
|
1860
|
+
var l, s = n(this), a;
|
|
1861
|
+
return s == null ? void this.removeAttributeNS(e.space, e.local) : (l = this.getAttributeNS(e.space, e.local), a = s + "", l === a ? null : l === o && a === i ? r : (i = a, r = t(o = l, s)));
|
|
1862
1862
|
};
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
var n = vn(e), o = n === "transform" ?
|
|
1866
|
-
return this.attrTween(e, typeof t == "function" ? (n.local ?
|
|
1864
|
+
function Sa(e, t) {
|
|
1865
|
+
var n = vn(e), o = n === "transform" ? oa : Ri;
|
|
1866
|
+
return this.attrTween(e, typeof t == "function" ? (n.local ? xa : Ea)(n, o, uo(this, "attr." + e, t)) : t == null ? (n.local ? _a : ya)(n) : (n.local ? ba : wa)(n, o, t));
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function Na(e, t) {
|
|
1869
1869
|
return function(n) {
|
|
1870
1870
|
this.setAttribute(e, t.call(this, n));
|
|
1871
1871
|
};
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function Ca(e, t) {
|
|
1874
1874
|
return function(n) {
|
|
1875
1875
|
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function Ma(e, t) {
|
|
1879
1879
|
var n, o;
|
|
1880
1880
|
function i() {
|
|
1881
1881
|
var r = t.apply(this, arguments);
|
|
1882
|
-
return r !== o && (n = (o = r) &&
|
|
1882
|
+
return r !== o && (n = (o = r) && Ca(e, r)), n;
|
|
1883
1883
|
}
|
|
1884
1884
|
return i._value = t, i;
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function Ia(e, t) {
|
|
1887
1887
|
var n, o;
|
|
1888
1888
|
function i() {
|
|
1889
1889
|
var r = t.apply(this, arguments);
|
|
1890
|
-
return r !== o && (n = (o = r) &&
|
|
1890
|
+
return r !== o && (n = (o = r) && Na(e, r)), n;
|
|
1891
1891
|
}
|
|
1892
1892
|
return i._value = t, i;
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1894
|
+
function ka(e, t) {
|
|
1895
1895
|
var n = "attr." + e;
|
|
1896
1896
|
if (arguments.length < 2)
|
|
1897
1897
|
return (n = this.tween(n)) && n._value;
|
|
@@ -1900,48 +1900,48 @@ function ks(e, t) {
|
|
|
1900
1900
|
if (typeof t != "function")
|
|
1901
1901
|
throw new Error();
|
|
1902
1902
|
var o = vn(e);
|
|
1903
|
-
return this.tween(n, (o.local ?
|
|
1903
|
+
return this.tween(n, (o.local ? Ma : Ia)(o, t));
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Pa(e, t) {
|
|
1906
1906
|
return function() {
|
|
1907
|
-
|
|
1907
|
+
ao(this, e).delay = +t.apply(this, arguments);
|
|
1908
1908
|
};
|
|
1909
1909
|
}
|
|
1910
|
-
function $
|
|
1910
|
+
function $a(e, t) {
|
|
1911
1911
|
return t = +t, function() {
|
|
1912
|
-
|
|
1912
|
+
ao(this, e).delay = t;
|
|
1913
1913
|
};
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function Ta(e) {
|
|
1916
1916
|
var t = this._id;
|
|
1917
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1917
|
+
return arguments.length ? this.each((typeof e == "function" ? Pa : $a)(t, e)) : De(this.node(), t).delay;
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1919
|
+
function Da(e, t) {
|
|
1920
1920
|
return function() {
|
|
1921
1921
|
Le(this, e).duration = +t.apply(this, arguments);
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function Aa(e, t) {
|
|
1925
1925
|
return t = +t, function() {
|
|
1926
1926
|
Le(this, e).duration = t;
|
|
1927
1927
|
};
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Oa(e) {
|
|
1930
1930
|
var t = this._id;
|
|
1931
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
1931
|
+
return arguments.length ? this.each((typeof e == "function" ? Da : Aa)(t, e)) : De(this.node(), t).duration;
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function za(e, t) {
|
|
1934
1934
|
if (typeof t != "function")
|
|
1935
1935
|
throw new Error();
|
|
1936
1936
|
return function() {
|
|
1937
1937
|
Le(this, e).ease = t;
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function Ba(e) {
|
|
1941
1941
|
var t = this._id;
|
|
1942
|
-
return arguments.length ? this.each(
|
|
1942
|
+
return arguments.length ? this.each(za(t, e)) : De(this.node(), t).ease;
|
|
1943
1943
|
}
|
|
1944
|
-
function
|
|
1944
|
+
function Va(e, t) {
|
|
1945
1945
|
return function() {
|
|
1946
1946
|
var n = t.apply(this, arguments);
|
|
1947
1947
|
if (typeof n != "function")
|
|
@@ -1949,46 +1949,46 @@ function Vs(e, t) {
|
|
|
1949
1949
|
Le(this, e).ease = n;
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function Ra(e) {
|
|
1953
1953
|
if (typeof e != "function")
|
|
1954
1954
|
throw new Error();
|
|
1955
|
-
return this.each(
|
|
1955
|
+
return this.each(Va(this._id, e));
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function Ha(e) {
|
|
1958
1958
|
typeof e != "function" && (e = mi(e));
|
|
1959
1959
|
for (var t = this._groups, n = t.length, o = new Array(n), i = 0; i < n; ++i)
|
|
1960
|
-
for (var r = t[i], l = r.length,
|
|
1961
|
-
(
|
|
1960
|
+
for (var r = t[i], l = r.length, s = o[i] = [], a, u = 0; u < l; ++u)
|
|
1961
|
+
(a = r[u]) && e.call(a, a.__data__, u, r) && s.push(a);
|
|
1962
1962
|
return new Xe(o, this._parents, this._name, this._id);
|
|
1963
1963
|
}
|
|
1964
|
-
function
|
|
1964
|
+
function La(e) {
|
|
1965
1965
|
if (e._id !== this._id)
|
|
1966
1966
|
throw new Error();
|
|
1967
|
-
for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), l = new Array(o),
|
|
1968
|
-
for (var
|
|
1969
|
-
(h =
|
|
1970
|
-
for (;
|
|
1971
|
-
l[
|
|
1967
|
+
for (var t = this._groups, n = e._groups, o = t.length, i = n.length, r = Math.min(o, i), l = new Array(o), s = 0; s < r; ++s)
|
|
1968
|
+
for (var a = t[s], u = n[s], c = a.length, d = l[s] = new Array(c), h, f = 0; f < c; ++f)
|
|
1969
|
+
(h = a[f] || u[f]) && (d[f] = h);
|
|
1970
|
+
for (; s < o; ++s)
|
|
1971
|
+
l[s] = t[s];
|
|
1972
1972
|
return new Xe(l, this._parents, this._name, this._id);
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function Fa(e) {
|
|
1975
1975
|
return (e + "").trim().split(/^|\s+/).every(function(t) {
|
|
1976
1976
|
var n = t.indexOf(".");
|
|
1977
1977
|
return n >= 0 && (t = t.slice(0, n)), !t || t === "start";
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var o, i, r =
|
|
1980
|
+
function Ya(e, t, n) {
|
|
1981
|
+
var o, i, r = Fa(t) ? ao : Le;
|
|
1982
1982
|
return function() {
|
|
1983
|
-
var l = r(this, e),
|
|
1984
|
-
|
|
1983
|
+
var l = r(this, e), s = l.on;
|
|
1984
|
+
s !== o && (i = (o = s).copy()).on(t, n), l.on = i;
|
|
1985
1985
|
};
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Ga(e, t) {
|
|
1988
1988
|
var n = this._id;
|
|
1989
|
-
return arguments.length < 2 ? De(this.node(), n).on.on(e) : this.each(
|
|
1989
|
+
return arguments.length < 2 ? De(this.node(), n).on.on(e) : this.each(Ya(n, e, t));
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1991
|
+
function Xa(e) {
|
|
1992
1992
|
return function() {
|
|
1993
1993
|
var t = this.parentNode;
|
|
1994
1994
|
for (var n in this.__transition)
|
|
@@ -1997,34 +1997,34 @@ function Xs(e) {
|
|
|
1997
1997
|
t && t.removeChild(this);
|
|
1998
1998
|
};
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2001
|
-
return this.on("end.remove",
|
|
2000
|
+
function Ua() {
|
|
2001
|
+
return this.on("end.remove", Xa(this._id));
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function Za(e) {
|
|
2004
2004
|
var t = this._name, n = this._id;
|
|
2005
2005
|
typeof e != "function" && (e = oo(e));
|
|
2006
2006
|
for (var o = this._groups, i = o.length, r = new Array(i), l = 0; l < i; ++l)
|
|
2007
|
-
for (var
|
|
2008
|
-
(c =
|
|
2007
|
+
for (var s = o[l], a = s.length, u = r[l] = new Array(a), c, d, h = 0; h < a; ++h)
|
|
2008
|
+
(c = s[h]) && (d = e.call(c, c.__data__, h, s)) && ("__data__" in c && (d.__data__ = c.__data__), u[h] = d, mn(u[h], t, n, h, u, De(c, n)));
|
|
2009
2009
|
return new Xe(r, this._parents, t, n);
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function Wa(e) {
|
|
2012
2012
|
var t = this._name, n = this._id;
|
|
2013
2013
|
typeof e != "function" && (e = pi(e));
|
|
2014
|
-
for (var o = this._groups, i = o.length, r = [], l = [],
|
|
2015
|
-
for (var
|
|
2016
|
-
if (c =
|
|
2017
|
-
for (var h = e.call(c, c.__data__, d,
|
|
2018
|
-
(f = h[b]) && mn(f, t, n, b, h,
|
|
2014
|
+
for (var o = this._groups, i = o.length, r = [], l = [], s = 0; s < i; ++s)
|
|
2015
|
+
for (var a = o[s], u = a.length, c, d = 0; d < u; ++d)
|
|
2016
|
+
if (c = a[d]) {
|
|
2017
|
+
for (var h = e.call(c, c.__data__, d, a), f, E = De(c, n), b = 0, S = h.length; b < S; ++b)
|
|
2018
|
+
(f = h[b]) && mn(f, t, n, b, h, E);
|
|
2019
2019
|
r.push(h), l.push(c);
|
|
2020
2020
|
}
|
|
2021
2021
|
return new Xe(r, l, t, n);
|
|
2022
2022
|
}
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
return new
|
|
2023
|
+
var Ka = Vt.prototype.constructor;
|
|
2024
|
+
function qa() {
|
|
2025
|
+
return new Ka(this._groups, this._parents);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function Ja(e, t) {
|
|
2028
2028
|
var n, o, i;
|
|
2029
2029
|
return function() {
|
|
2030
2030
|
var r = vt(this, e), l = (this.style.removeProperty(e), vt(this, e));
|
|
@@ -2036,30 +2036,30 @@ function Hi(e) {
|
|
|
2036
2036
|
this.style.removeProperty(e);
|
|
2037
2037
|
};
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2039
|
+
function Qa(e, t, n) {
|
|
2040
2040
|
var o, i = n + "", r;
|
|
2041
2041
|
return function() {
|
|
2042
2042
|
var l = vt(this, e);
|
|
2043
2043
|
return l === i ? null : l === o ? r : r = t(o = l, n);
|
|
2044
2044
|
};
|
|
2045
2045
|
}
|
|
2046
|
-
function
|
|
2046
|
+
function ja(e, t, n) {
|
|
2047
2047
|
var o, i, r;
|
|
2048
2048
|
return function() {
|
|
2049
|
-
var l = vt(this, e),
|
|
2050
|
-
return
|
|
2049
|
+
var l = vt(this, e), s = n(this), a = s + "";
|
|
2050
|
+
return s == null && (a = s = (this.style.removeProperty(e), vt(this, e))), l === a ? null : l === o && a === i ? r : (i = a, r = t(o = l, s));
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
2053
|
function eu(e, t) {
|
|
2054
|
-
var n, o, i, r = "style." + t, l = "end." + r,
|
|
2054
|
+
var n, o, i, r = "style." + t, l = "end." + r, s;
|
|
2055
2055
|
return function() {
|
|
2056
|
-
var
|
|
2057
|
-
(u !== n || i !== c) && (o = (n = u).copy()).on(l, i = c),
|
|
2056
|
+
var a = Le(this, e), u = a.on, c = a.value[r] == null ? s || (s = Hi(t)) : void 0;
|
|
2057
|
+
(u !== n || i !== c) && (o = (n = u).copy()).on(l, i = c), a.on = o;
|
|
2058
2058
|
};
|
|
2059
2059
|
}
|
|
2060
2060
|
function tu(e, t, n) {
|
|
2061
|
-
var o = (e += "") == "transform" ?
|
|
2062
|
-
return t == null ? this.styleTween(e,
|
|
2061
|
+
var o = (e += "") == "transform" ? na : Ri;
|
|
2062
|
+
return t == null ? this.styleTween(e, Ja(e, o)).on("end.style." + e, Hi(e)) : typeof t == "function" ? this.styleTween(e, ja(e, o, uo(this, "style." + e, t))).each(eu(this._id, e)) : this.styleTween(e, Qa(e, o, t), n).on("end.style." + e, null);
|
|
2063
2063
|
}
|
|
2064
2064
|
function nu(e, t, n) {
|
|
2065
2065
|
return function(o) {
|
|
@@ -2095,10 +2095,10 @@ function lu(e) {
|
|
|
2095
2095
|
this.textContent = t ?? "";
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2098
|
+
function su(e) {
|
|
2099
2099
|
return this.tween("text", typeof e == "function" ? lu(uo(this, "text", e)) : ru(e == null ? "" : e + ""));
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function au(e) {
|
|
2102
2102
|
return function(t) {
|
|
2103
2103
|
this.textContent = e.call(this, t);
|
|
2104
2104
|
};
|
|
@@ -2107,7 +2107,7 @@ function uu(e) {
|
|
|
2107
2107
|
var t, n;
|
|
2108
2108
|
function o() {
|
|
2109
2109
|
var i = e.apply(this, arguments);
|
|
2110
|
-
return i !== n && (t = (n = i) &&
|
|
2110
|
+
return i !== n && (t = (n = i) && au(i)), t;
|
|
2111
2111
|
}
|
|
2112
2112
|
return o._value = e, o;
|
|
2113
2113
|
}
|
|
@@ -2123,10 +2123,10 @@ function cu(e) {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
function du() {
|
|
2125
2125
|
for (var e = this._name, t = this._id, n = Li(), o = this._groups, i = o.length, r = 0; r < i; ++r)
|
|
2126
|
-
for (var l = o[r],
|
|
2127
|
-
if (
|
|
2128
|
-
var c = De(
|
|
2129
|
-
mn(
|
|
2126
|
+
for (var l = o[r], s = l.length, a, u = 0; u < s; ++u)
|
|
2127
|
+
if (a = l[u]) {
|
|
2128
|
+
var c = De(a, t);
|
|
2129
|
+
mn(a, e, n, u, l, {
|
|
2130
2130
|
time: c.time + c.delay + c.duration,
|
|
2131
2131
|
delay: 0,
|
|
2132
2132
|
duration: c.duration,
|
|
@@ -2138,12 +2138,12 @@ function du() {
|
|
|
2138
2138
|
function fu() {
|
|
2139
2139
|
var e, t, n = this, o = n._id, i = n.size();
|
|
2140
2140
|
return new Promise(function(r, l) {
|
|
2141
|
-
var
|
|
2141
|
+
var s = { value: l }, a = { value: function() {
|
|
2142
2142
|
--i === 0 && r();
|
|
2143
2143
|
} };
|
|
2144
2144
|
n.each(function() {
|
|
2145
2145
|
var u = Le(this, o), c = u.on;
|
|
2146
|
-
c !== e && (t = (e = c).copy(), t._.cancel.push(
|
|
2146
|
+
c !== e && (t = (e = c).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(a)), u.on = t;
|
|
2147
2147
|
}), i === 0 && r();
|
|
2148
2148
|
});
|
|
2149
2149
|
}
|
|
@@ -2157,13 +2157,13 @@ function Li() {
|
|
|
2157
2157
|
var Fe = Vt.prototype;
|
|
2158
2158
|
Xe.prototype = {
|
|
2159
2159
|
constructor: Xe,
|
|
2160
|
-
select:
|
|
2161
|
-
selectAll:
|
|
2160
|
+
select: Za,
|
|
2161
|
+
selectAll: Wa,
|
|
2162
2162
|
selectChild: Fe.selectChild,
|
|
2163
2163
|
selectChildren: Fe.selectChildren,
|
|
2164
|
-
filter:
|
|
2165
|
-
merge:
|
|
2166
|
-
selection:
|
|
2164
|
+
filter: Ha,
|
|
2165
|
+
merge: La,
|
|
2166
|
+
selection: qa,
|
|
2167
2167
|
transition: du,
|
|
2168
2168
|
call: Fe.call,
|
|
2169
2169
|
nodes: Fe.nodes,
|
|
@@ -2171,19 +2171,19 @@ Xe.prototype = {
|
|
|
2171
2171
|
size: Fe.size,
|
|
2172
2172
|
empty: Fe.empty,
|
|
2173
2173
|
each: Fe.each,
|
|
2174
|
-
on:
|
|
2175
|
-
attr:
|
|
2176
|
-
attrTween:
|
|
2174
|
+
on: Ga,
|
|
2175
|
+
attr: Sa,
|
|
2176
|
+
attrTween: ka,
|
|
2177
2177
|
style: tu,
|
|
2178
2178
|
styleTween: iu,
|
|
2179
|
-
text:
|
|
2179
|
+
text: su,
|
|
2180
2180
|
textTween: cu,
|
|
2181
|
-
remove:
|
|
2182
|
-
tween:
|
|
2183
|
-
delay:
|
|
2184
|
-
duration:
|
|
2185
|
-
ease:
|
|
2186
|
-
easeVarying:
|
|
2181
|
+
remove: Ua,
|
|
2182
|
+
tween: ma,
|
|
2183
|
+
delay: Ta,
|
|
2184
|
+
duration: Oa,
|
|
2185
|
+
ease: Ba,
|
|
2186
|
+
easeVarying: Ra,
|
|
2187
2187
|
end: fu,
|
|
2188
2188
|
[Symbol.iterator]: Fe[Symbol.iterator]
|
|
2189
2189
|
};
|
|
@@ -2205,13 +2205,13 @@ function pu(e, t) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
function mu(e) {
|
|
2207
2207
|
var t, n;
|
|
2208
|
-
e instanceof Xe ? (t = e._id, e = e._name) : (t = Li(), (n = vu).time =
|
|
2208
|
+
e instanceof Xe ? (t = e._id, e = e._name) : (t = Li(), (n = vu).time = so(), e = e == null ? null : e + "");
|
|
2209
2209
|
for (var o = this._groups, i = o.length, r = 0; r < i; ++r)
|
|
2210
|
-
for (var l = o[r],
|
|
2211
|
-
(
|
|
2210
|
+
for (var l = o[r], s = l.length, a, u = 0; u < s; ++u)
|
|
2211
|
+
(a = l[u]) && mn(a, e, t, u, l, n || pu(a, t));
|
|
2212
2212
|
return new Xe(o, this._parents, e, t);
|
|
2213
2213
|
}
|
|
2214
|
-
Vt.prototype.interrupt =
|
|
2214
|
+
Vt.prototype.interrupt = ga;
|
|
2215
2215
|
Vt.prototype.transition = mu;
|
|
2216
2216
|
const Gt = (e) => () => e;
|
|
2217
2217
|
function yu(e, {
|
|
@@ -2299,71 +2299,71 @@ function xu(e, t, n) {
|
|
|
2299
2299
|
);
|
|
2300
2300
|
}
|
|
2301
2301
|
function Su() {
|
|
2302
|
-
var e = _u, t = wu, n = xu, o = bu, i = Eu, r = [0, 1 / 0], l = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]],
|
|
2302
|
+
var e = _u, t = wu, n = xu, o = bu, i = Eu, r = [0, 1 / 0], l = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], s = 250, a = qt, u = gn("start", "zoom", "end"), c, d, h, f = 500, E = 150, b = 0, S = 10;
|
|
2303
2303
|
function C(y) {
|
|
2304
2304
|
y.property("__zoom", Oo).on("wheel.zoom", I, { passive: !1 }).on("mousedown.zoom", T).on("dblclick.zoom", O).filter(i).on("touchstart.zoom", D).on("touchmove.zoom", w).on("touchend.zoom touchcancel.zoom", Z).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2305
2305
|
}
|
|
2306
|
-
C.transform = function(y, P,
|
|
2306
|
+
C.transform = function(y, P, x, $) {
|
|
2307
2307
|
var A = y.selection ? y.selection() : y;
|
|
2308
|
-
A.property("__zoom", Oo), y !== A ? z(y, P,
|
|
2308
|
+
A.property("__zoom", Oo), y !== A ? z(y, P, x, $) : A.interrupt().each(function() {
|
|
2309
2309
|
Y(this, arguments).event($).start().zoom(null, typeof P == "function" ? P.apply(this, arguments) : P).end();
|
|
2310
2310
|
});
|
|
2311
|
-
}, C.scaleBy = function(y, P,
|
|
2311
|
+
}, C.scaleBy = function(y, P, x, $) {
|
|
2312
2312
|
C.scaleTo(y, function() {
|
|
2313
2313
|
var A = this.__zoom.k, V = typeof P == "function" ? P.apply(this, arguments) : P;
|
|
2314
2314
|
return A * V;
|
|
2315
|
-
},
|
|
2316
|
-
}, C.scaleTo = function(y, P,
|
|
2315
|
+
}, x, $);
|
|
2316
|
+
}, C.scaleTo = function(y, P, x, $) {
|
|
2317
2317
|
C.transform(y, function() {
|
|
2318
|
-
var A = t.apply(this, arguments), V = this.__zoom, B =
|
|
2318
|
+
var A = t.apply(this, arguments), V = this.__zoom, B = x == null ? N(A) : typeof x == "function" ? x.apply(this, arguments) : x, W = V.invert(B), j = typeof P == "function" ? P.apply(this, arguments) : P;
|
|
2319
2319
|
return n(_(M(V, j), B, W), A, l);
|
|
2320
|
-
},
|
|
2321
|
-
}, C.translateBy = function(y, P,
|
|
2320
|
+
}, x, $);
|
|
2321
|
+
}, C.translateBy = function(y, P, x, $) {
|
|
2322
2322
|
C.transform(y, function() {
|
|
2323
2323
|
return n(this.__zoom.translate(
|
|
2324
2324
|
typeof P == "function" ? P.apply(this, arguments) : P,
|
|
2325
|
-
typeof
|
|
2325
|
+
typeof x == "function" ? x.apply(this, arguments) : x
|
|
2326
2326
|
), t.apply(this, arguments), l);
|
|
2327
2327
|
}, null, $);
|
|
2328
|
-
}, C.translateTo = function(y, P,
|
|
2328
|
+
}, C.translateTo = function(y, P, x, $, A) {
|
|
2329
2329
|
C.transform(y, function() {
|
|
2330
2330
|
var V = t.apply(this, arguments), B = this.__zoom, W = $ == null ? N(V) : typeof $ == "function" ? $.apply(this, arguments) : $;
|
|
2331
2331
|
return n(mt.translate(W[0], W[1]).scale(B.k).translate(
|
|
2332
2332
|
typeof P == "function" ? -P.apply(this, arguments) : -P,
|
|
2333
|
-
typeof
|
|
2333
|
+
typeof x == "function" ? -x.apply(this, arguments) : -x
|
|
2334
2334
|
), V, l);
|
|
2335
2335
|
}, $, A);
|
|
2336
2336
|
};
|
|
2337
2337
|
function M(y, P) {
|
|
2338
2338
|
return P = Math.max(r[0], Math.min(r[1], P)), P === y.k ? y : new Ge(P, y.x, y.y);
|
|
2339
2339
|
}
|
|
2340
|
-
function _(y, P,
|
|
2341
|
-
var $ = P[0] -
|
|
2340
|
+
function _(y, P, x) {
|
|
2341
|
+
var $ = P[0] - x[0] * y.k, A = P[1] - x[1] * y.k;
|
|
2342
2342
|
return $ === y.x && A === y.y ? y : new Ge(y.k, $, A);
|
|
2343
2343
|
}
|
|
2344
2344
|
function N(y) {
|
|
2345
2345
|
return [(+y[0][0] + +y[1][0]) / 2, (+y[0][1] + +y[1][1]) / 2];
|
|
2346
2346
|
}
|
|
2347
|
-
function z(y, P,
|
|
2347
|
+
function z(y, P, x, $) {
|
|
2348
2348
|
y.on("start.zoom", function() {
|
|
2349
2349
|
Y(this, arguments).event($).start();
|
|
2350
2350
|
}).on("interrupt.zoom end.zoom", function() {
|
|
2351
2351
|
Y(this, arguments).event($).end();
|
|
2352
2352
|
}).tween("zoom", function() {
|
|
2353
|
-
var A = this, V = arguments, B = Y(A, V).event($), W = t.apply(A, V), j =
|
|
2354
|
-
return function(
|
|
2355
|
-
if (
|
|
2356
|
-
|
|
2353
|
+
var A = this, V = arguments, B = Y(A, V).event($), W = t.apply(A, V), j = x == null ? N(W) : typeof x == "function" ? x.apply(A, V) : x, re = Math.max(W[1][0] - W[0][0], W[1][1] - W[0][1]), H = A.__zoom, G = typeof P == "function" ? P.apply(A, V) : P, q = a(H.invert(j).concat(re / H.k), G.invert(j).concat(re / G.k));
|
|
2354
|
+
return function(ae) {
|
|
2355
|
+
if (ae === 1)
|
|
2356
|
+
ae = G;
|
|
2357
2357
|
else {
|
|
2358
|
-
var ue = q(
|
|
2359
|
-
|
|
2358
|
+
var ue = q(ae), te = re / ue[2];
|
|
2359
|
+
ae = new Ge(te, j[0] - ue[0] * te, j[1] - ue[1] * te);
|
|
2360
2360
|
}
|
|
2361
|
-
B.zoom(null,
|
|
2361
|
+
B.zoom(null, ae);
|
|
2362
2362
|
};
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
2365
|
-
function Y(y, P,
|
|
2366
|
-
return !
|
|
2365
|
+
function Y(y, P, x) {
|
|
2366
|
+
return !x && y.__zooming || new F(y, P);
|
|
2367
2367
|
}
|
|
2368
2368
|
function F(y, P) {
|
|
2369
2369
|
this.that = y, this.args = P, this.active = 0, this.sourceEvent = null, this.extent = t.apply(y, P), this.taps = 0;
|
|
@@ -2399,30 +2399,30 @@ function Su() {
|
|
|
2399
2399
|
function I(y, ...P) {
|
|
2400
2400
|
if (!e.apply(this, arguments))
|
|
2401
2401
|
return;
|
|
2402
|
-
var
|
|
2403
|
-
if (
|
|
2404
|
-
(
|
|
2402
|
+
var x = Y(this, P).event(y), $ = this.__zoom, A = Math.max(r[0], Math.min(r[1], $.k * Math.pow(2, o.apply(this, arguments)))), V = Oe(y);
|
|
2403
|
+
if (x.wheel)
|
|
2404
|
+
(x.mouse[0][0] !== V[0] || x.mouse[0][1] !== V[1]) && (x.mouse[1] = $.invert(x.mouse[0] = V)), clearTimeout(x.wheel);
|
|
2405
2405
|
else {
|
|
2406
2406
|
if ($.k === A)
|
|
2407
2407
|
return;
|
|
2408
|
-
|
|
2408
|
+
x.mouse = [V, $.invert(V)], jt(this), x.start();
|
|
2409
2409
|
}
|
|
2410
|
-
xt(y),
|
|
2410
|
+
xt(y), x.wheel = setTimeout(B, E), x.zoom("mouse", n(_(M($, A), x.mouse[0], x.mouse[1]), x.extent, l));
|
|
2411
2411
|
function B() {
|
|
2412
|
-
|
|
2412
|
+
x.wheel = null, x.end();
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
2415
|
function T(y, ...P) {
|
|
2416
2416
|
if (h || !e.apply(this, arguments))
|
|
2417
2417
|
return;
|
|
2418
|
-
var
|
|
2418
|
+
var x = y.currentTarget, $ = Y(this, P, !0).event(y), A = ke(y.view).on("mousemove.zoom", j, !0).on("mouseup.zoom", re, !0), V = Oe(y, x), B = y.clientX, W = y.clientY;
|
|
2419
2419
|
Mi(y.view), Pn(y), $.mouse = [V, this.__zoom.invert(V)], jt(this), $.start();
|
|
2420
2420
|
function j(H) {
|
|
2421
2421
|
if (xt(H), !$.moved) {
|
|
2422
2422
|
var G = H.clientX - B, q = H.clientY - W;
|
|
2423
2423
|
$.moved = G * G + q * q > b;
|
|
2424
2424
|
}
|
|
2425
|
-
$.event(H).zoom("mouse", n(_($.that.__zoom, $.mouse[0] = Oe(H,
|
|
2425
|
+
$.event(H).zoom("mouse", n(_($.that.__zoom, $.mouse[0] = Oe(H, x), $.mouse[1]), $.extent, l));
|
|
2426
2426
|
}
|
|
2427
2427
|
function re(H) {
|
|
2428
2428
|
A.on("mousemove.zoom mouseup.zoom", null), Ii(H.view, $.moved), xt(H), $.event(H).end();
|
|
@@ -2430,15 +2430,15 @@ function Su() {
|
|
|
2430
2430
|
}
|
|
2431
2431
|
function O(y, ...P) {
|
|
2432
2432
|
if (e.apply(this, arguments)) {
|
|
2433
|
-
var
|
|
2434
|
-
xt(y),
|
|
2433
|
+
var x = this.__zoom, $ = Oe(y.changedTouches ? y.changedTouches[0] : y, this), A = x.invert($), V = x.k * (y.shiftKey ? 0.5 : 2), B = n(_(M(x, V), $, A), t.apply(this, P), l);
|
|
2434
|
+
xt(y), s > 0 ? ke(this).transition().duration(s).call(z, B, $, y) : ke(this).call(C.transform, B, $, y);
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
function D(y, ...P) {
|
|
2438
2438
|
if (e.apply(this, arguments)) {
|
|
2439
|
-
var
|
|
2439
|
+
var x = y.touches, $ = x.length, A = Y(this, P, y.changedTouches.length === $).event(y), V, B, W, j;
|
|
2440
2440
|
for (Pn(y), B = 0; B < $; ++B)
|
|
2441
|
-
W =
|
|
2441
|
+
W = x[B], j = Oe(W, this), j = [j, this.__zoom.invert(j), W.identifier], A.touch0 ? !A.touch1 && A.touch0[2] !== j[2] && (A.touch1 = j, A.taps = 0) : (A.touch0 = j, V = !0, A.taps = 1 + !!c);
|
|
2442
2442
|
c && (c = clearTimeout(c)), V && (A.taps < 2 && (d = j[0], c = setTimeout(function() {
|
|
2443
2443
|
c = null;
|
|
2444
2444
|
}, f)), jt(this), A.start());
|
|
@@ -2446,29 +2446,29 @@ function Su() {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
function w(y, ...P) {
|
|
2448
2448
|
if (this.__zooming) {
|
|
2449
|
-
var
|
|
2449
|
+
var x = Y(this, P).event(y), $ = y.changedTouches, A = $.length, V, B, W, j;
|
|
2450
2450
|
for (xt(y), V = 0; V < A; ++V)
|
|
2451
|
-
B = $[V], W = Oe(B, this),
|
|
2452
|
-
if (B =
|
|
2453
|
-
var re =
|
|
2454
|
-
B = M(B, Math.sqrt(
|
|
2455
|
-
} else if (
|
|
2456
|
-
W =
|
|
2451
|
+
B = $[V], W = Oe(B, this), x.touch0 && x.touch0[2] === B.identifier ? x.touch0[0] = W : x.touch1 && x.touch1[2] === B.identifier && (x.touch1[0] = W);
|
|
2452
|
+
if (B = x.that.__zoom, x.touch1) {
|
|
2453
|
+
var re = x.touch0[0], H = x.touch0[1], G = x.touch1[0], q = x.touch1[1], ae = (ae = G[0] - re[0]) * ae + (ae = G[1] - re[1]) * ae, ue = (ue = q[0] - H[0]) * ue + (ue = q[1] - H[1]) * ue;
|
|
2454
|
+
B = M(B, Math.sqrt(ae / ue)), W = [(re[0] + G[0]) / 2, (re[1] + G[1]) / 2], j = [(H[0] + q[0]) / 2, (H[1] + q[1]) / 2];
|
|
2455
|
+
} else if (x.touch0)
|
|
2456
|
+
W = x.touch0[0], j = x.touch0[1];
|
|
2457
2457
|
else
|
|
2458
2458
|
return;
|
|
2459
|
-
|
|
2459
|
+
x.zoom("touch", n(_(B, W, j), x.extent, l));
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
function Z(y, ...P) {
|
|
2463
2463
|
if (this.__zooming) {
|
|
2464
|
-
var
|
|
2464
|
+
var x = Y(this, P).event(y), $ = y.changedTouches, A = $.length, V, B;
|
|
2465
2465
|
for (Pn(y), h && clearTimeout(h), h = setTimeout(function() {
|
|
2466
2466
|
h = null;
|
|
2467
2467
|
}, f), V = 0; V < A; ++V)
|
|
2468
|
-
B = $[V],
|
|
2469
|
-
if (
|
|
2470
|
-
|
|
2471
|
-
else if (
|
|
2468
|
+
B = $[V], x.touch0 && x.touch0[2] === B.identifier ? delete x.touch0 : x.touch1 && x.touch1[2] === B.identifier && delete x.touch1;
|
|
2469
|
+
if (x.touch1 && !x.touch0 && (x.touch0 = x.touch1, delete x.touch1), x.touch0)
|
|
2470
|
+
x.touch0[1] = this.__zoom.invert(x.touch0[0]);
|
|
2471
|
+
else if (x.end(), x.taps === 2 && (B = Oe(B, this), Math.hypot(d[0] - B[0], d[1] - B[1]) < S)) {
|
|
2472
2472
|
var W = ke(this).on("dblclick.zoom");
|
|
2473
2473
|
W && W.apply(this, arguments);
|
|
2474
2474
|
}
|
|
@@ -2489,9 +2489,9 @@ function Su() {
|
|
|
2489
2489
|
}, C.constrain = function(y) {
|
|
2490
2490
|
return arguments.length ? (n = y, C) : n;
|
|
2491
2491
|
}, C.duration = function(y) {
|
|
2492
|
-
return arguments.length ? (
|
|
2492
|
+
return arguments.length ? (s = +y, C) : s;
|
|
2493
2493
|
}, C.interpolate = function(y) {
|
|
2494
|
-
return arguments.length ? (
|
|
2494
|
+
return arguments.length ? (a = y, C) : a;
|
|
2495
2495
|
}, C.on = function() {
|
|
2496
2496
|
var y = u.on.apply(u, arguments);
|
|
2497
2497
|
return y === u ? C : y;
|
|
@@ -2522,7 +2522,7 @@ function zo(e, t, n, o) {
|
|
|
2522
2522
|
return e.toLowerCase() === t.toLowerCase();
|
|
2523
2523
|
o || n.add(e.toLowerCase());
|
|
2524
2524
|
const r = i.every(
|
|
2525
|
-
(l,
|
|
2525
|
+
(l, s) => n.has(l) && Array.from(n.values())[s] === i[s]
|
|
2526
2526
|
);
|
|
2527
2527
|
return o && n.delete(e.toLowerCase()), r;
|
|
2528
2528
|
}
|
|
@@ -2541,16 +2541,16 @@ function Pt(e, t) {
|
|
|
2541
2541
|
const n = ne(() => ce(t == null ? void 0 : t.target) ?? Cu), o = tn(ce(e) === !0);
|
|
2542
2542
|
let i = !1;
|
|
2543
2543
|
const r = /* @__PURE__ */ new Set();
|
|
2544
|
-
let l =
|
|
2544
|
+
let l = a(ce(e));
|
|
2545
2545
|
ve(
|
|
2546
2546
|
() => ce(e),
|
|
2547
2547
|
(u, c) => {
|
|
2548
|
-
typeof c == "boolean" && typeof u != "boolean" &&
|
|
2548
|
+
typeof c == "boolean" && typeof u != "boolean" && s(), l = a(u);
|
|
2549
2549
|
},
|
|
2550
2550
|
{
|
|
2551
2551
|
immediate: !0
|
|
2552
2552
|
}
|
|
2553
|
-
), gi(["blur", "contextmenu"],
|
|
2553
|
+
), gi(["blur", "contextmenu"], s), yo(
|
|
2554
2554
|
(...u) => l(...u),
|
|
2555
2555
|
(u) => {
|
|
2556
2556
|
var c, d;
|
|
@@ -2573,11 +2573,11 @@ function Pt(e, t) {
|
|
|
2573
2573
|
},
|
|
2574
2574
|
{ eventName: "keyup", target: n }
|
|
2575
2575
|
);
|
|
2576
|
-
function
|
|
2576
|
+
function s() {
|
|
2577
2577
|
i = !1, r.clear(), o.value = ce(e) === !0;
|
|
2578
2578
|
}
|
|
2579
|
-
function
|
|
2580
|
-
return u === null ? (
|
|
2579
|
+
function a(u) {
|
|
2580
|
+
return u === null ? (s(), () => !1) : typeof u == "boolean" ? (s(), o.value = u, () => !1) : Array.isArray(u) || typeof u == "string" ? Iu(u, r) : u;
|
|
2581
2581
|
}
|
|
2582
2582
|
return o;
|
|
2583
2583
|
}
|
|
@@ -2689,22 +2689,22 @@ function Ui(e, t, n) {
|
|
|
2689
2689
|
}
|
|
2690
2690
|
function Zi(e, t, n, o) {
|
|
2691
2691
|
const i = typeof e == "string" ? e : e.id, r = /* @__PURE__ */ new Set(), l = o === "source" ? "target" : "source";
|
|
2692
|
-
for (const
|
|
2693
|
-
|
|
2694
|
-
return t.filter((
|
|
2692
|
+
for (const s of n)
|
|
2693
|
+
s[l] === i && r.add(s[o]);
|
|
2694
|
+
return t.filter((s) => r.has(s.id));
|
|
2695
2695
|
}
|
|
2696
2696
|
function Du(...e) {
|
|
2697
2697
|
if (e.length === 3) {
|
|
2698
|
-
const [r, l,
|
|
2699
|
-
return Zi(r, l,
|
|
2698
|
+
const [r, l, s] = e;
|
|
2699
|
+
return Zi(r, l, s, "target");
|
|
2700
2700
|
}
|
|
2701
2701
|
const [t, n] = e, o = typeof t == "string" ? t : t.id;
|
|
2702
2702
|
return n.filter((r) => Qe(r) && r.source === o).map((r) => n.find((l) => ot(l) && l.id === r.target));
|
|
2703
2703
|
}
|
|
2704
2704
|
function Au(...e) {
|
|
2705
2705
|
if (e.length === 3) {
|
|
2706
|
-
const [r, l,
|
|
2707
|
-
return Zi(r, l,
|
|
2706
|
+
const [r, l, s] = e;
|
|
2707
|
+
return Zi(r, l, s, "source");
|
|
2708
2708
|
}
|
|
2709
2709
|
const [t, n] = e, o = typeof t == "string" ? t : t.id;
|
|
2710
2710
|
return n.filter((r) => Qe(r) && r.target === o).map((r) => n.find((l) => ot(l) && l.id === r.source));
|
|
@@ -2724,11 +2724,11 @@ function qn({ x: e, y: t }, { x: n, y: o, zoom: i }) {
|
|
|
2724
2724
|
};
|
|
2725
2725
|
}
|
|
2726
2726
|
function Ot({ x: e, y: t }, { x: n, y: o, zoom: i }, r = !1, l = [1, 1]) {
|
|
2727
|
-
const
|
|
2727
|
+
const s = {
|
|
2728
2728
|
x: (e - n) / i,
|
|
2729
2729
|
y: (t - o) / i
|
|
2730
2730
|
};
|
|
2731
|
-
return r ? _n(
|
|
2731
|
+
return r ? _n(s, l) : s;
|
|
2732
2732
|
}
|
|
2733
2733
|
function zu(e, t) {
|
|
2734
2734
|
return {
|
|
@@ -2779,12 +2779,12 @@ function Ji(e, t, n = { x: 0, y: 0, zoom: 1 }, o = !1, i = !1) {
|
|
|
2779
2779
|
width: t.width / n.zoom,
|
|
2780
2780
|
height: t.height / n.zoom
|
|
2781
2781
|
}, l = [];
|
|
2782
|
-
for (const
|
|
2783
|
-
const { dimensions:
|
|
2782
|
+
for (const s of e) {
|
|
2783
|
+
const { dimensions: a, selectable: u = !0, hidden: c = !1 } = s, d = a.width ?? s.width ?? null, h = a.height ?? s.height ?? null;
|
|
2784
2784
|
if (i && !u || c)
|
|
2785
2785
|
continue;
|
|
2786
|
-
const f = dn(r, cn(
|
|
2787
|
-
(
|
|
2786
|
+
const f = dn(r, cn(s)), E = d === null || h === null, b = o && f > 0, S = (d ?? 0) * (h ?? 0);
|
|
2787
|
+
(E || b || f >= S || s.dragging) && l.push(s);
|
|
2788
2788
|
}
|
|
2789
2789
|
return l;
|
|
2790
2790
|
}
|
|
@@ -2798,8 +2798,8 @@ function Qi(e, t) {
|
|
|
2798
2798
|
return t.filter((o) => n.has(o.source) || n.has(o.target));
|
|
2799
2799
|
}
|
|
2800
2800
|
function Vo(e, t, n, o, i, r = 0.1, l = { x: 0, y: 0 }) {
|
|
2801
|
-
const
|
|
2802
|
-
return { x: f, y:
|
|
2801
|
+
const s = t / (e.width * (1 + r)), a = n / (e.height * (1 + r)), u = Math.min(s, a), c = lt(u, o, i), d = e.x + e.width / 2, h = e.y + e.height / 2, f = t / 2 - d * c + (l.x ?? 0), E = n / 2 - h * c + (l.y ?? 0);
|
|
2802
|
+
return { x: f, y: E, zoom: c };
|
|
2803
2803
|
}
|
|
2804
2804
|
function Vu(e, t) {
|
|
2805
2805
|
return {
|
|
@@ -2877,34 +2877,34 @@ function Ho(e, t) {
|
|
|
2877
2877
|
const i = e.filter((l) => l.type === "add" || l.type === "remove");
|
|
2878
2878
|
for (const l of i)
|
|
2879
2879
|
if (l.type === "add")
|
|
2880
|
-
t.findIndex((
|
|
2880
|
+
t.findIndex((a) => a.id === l.item.id) === -1 && t.push(l.item);
|
|
2881
2881
|
else if (l.type === "remove") {
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2882
|
+
const s = t.findIndex((a) => a.id === l.id);
|
|
2883
|
+
s !== -1 && t.splice(s, 1);
|
|
2884
2884
|
}
|
|
2885
2885
|
const r = t.map((l) => l.id);
|
|
2886
2886
|
for (const l of t)
|
|
2887
|
-
for (const
|
|
2888
|
-
if (
|
|
2889
|
-
switch (
|
|
2887
|
+
for (const s of e)
|
|
2888
|
+
if (s.id === l.id)
|
|
2889
|
+
switch (s.type) {
|
|
2890
2890
|
case "select":
|
|
2891
|
-
l.selected =
|
|
2891
|
+
l.selected = s.selected;
|
|
2892
2892
|
break;
|
|
2893
2893
|
case "position":
|
|
2894
|
-
if (Ct(l) && (typeof
|
|
2895
|
-
const
|
|
2896
|
-
|
|
2894
|
+
if (Ct(l) && (typeof s.position < "u" && (l.position = s.position), typeof s.dragging < "u" && (l.dragging = s.dragging), l.expandParent && l.parentNode)) {
|
|
2895
|
+
const a = t[r.indexOf(l.parentNode)];
|
|
2896
|
+
a && Ct(a) && $n(l, a);
|
|
2897
2897
|
}
|
|
2898
2898
|
break;
|
|
2899
2899
|
case "dimensions":
|
|
2900
|
-
if (Ct(l) && (typeof
|
|
2900
|
+
if (Ct(l) && (typeof s.dimensions < "u" && (l.dimensions = s.dimensions), typeof s.updateStyle < "u" && s.updateStyle && (l.style = {
|
|
2901
2901
|
...l.style || {},
|
|
2902
|
-
width: `${(n =
|
|
2903
|
-
height: `${(o =
|
|
2904
|
-
}), typeof
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2907
|
-
$n(l,
|
|
2902
|
+
width: `${(n = s.dimensions) == null ? void 0 : n.width}px`,
|
|
2903
|
+
height: `${(o = s.dimensions) == null ? void 0 : o.height}px`
|
|
2904
|
+
}), typeof s.resizing < "u" && (l.resizing = s.resizing), l.expandParent && l.parentNode)) {
|
|
2905
|
+
const a = t[r.indexOf(l.parentNode)];
|
|
2906
|
+
a && Ct(a) && (!!a.dimensions.width && !!a.dimensions.height ? $n(l, a) : $e(() => {
|
|
2907
|
+
$n(l, a);
|
|
2908
2908
|
}));
|
|
2909
2909
|
}
|
|
2910
2910
|
break;
|
|
@@ -2953,21 +2953,21 @@ function L(e) {
|
|
|
2953
2953
|
let n = !1;
|
|
2954
2954
|
const o = () => t.size > 0;
|
|
2955
2955
|
e && (n = !0, t.add(e));
|
|
2956
|
-
const i = (
|
|
2957
|
-
t.delete(
|
|
2956
|
+
const i = (s) => {
|
|
2957
|
+
t.delete(s);
|
|
2958
2958
|
};
|
|
2959
2959
|
return {
|
|
2960
|
-
on: (
|
|
2961
|
-
e && n && t.delete(e), t.add(
|
|
2962
|
-
const
|
|
2963
|
-
i(
|
|
2960
|
+
on: (s) => {
|
|
2961
|
+
e && n && t.delete(e), t.add(s);
|
|
2962
|
+
const a = () => {
|
|
2963
|
+
i(s), e && n && t.add(e);
|
|
2964
2964
|
};
|
|
2965
|
-
return hn(
|
|
2966
|
-
off:
|
|
2965
|
+
return hn(a), {
|
|
2966
|
+
off: a
|
|
2967
2967
|
};
|
|
2968
2968
|
},
|
|
2969
2969
|
off: i,
|
|
2970
|
-
trigger: (
|
|
2970
|
+
trigger: (s) => Promise.all(Array.from(t).map((a) => a(s))),
|
|
2971
2971
|
hasListeners: o,
|
|
2972
2972
|
fns: t
|
|
2973
2973
|
};
|
|
@@ -2985,24 +2985,24 @@ function Go(e, t, n) {
|
|
|
2985
2985
|
}
|
|
2986
2986
|
function Ru(e, t, n, o, i) {
|
|
2987
2987
|
var r, l;
|
|
2988
|
-
const
|
|
2989
|
-
for (const
|
|
2990
|
-
(
|
|
2988
|
+
const s = [];
|
|
2989
|
+
for (const a of e)
|
|
2990
|
+
(a.selected || a.id === i) && (!a.parentNode || !ji(a, o)) && (a.draggable || t && typeof a.draggable > "u") && s.push(
|
|
2991
2991
|
Mt({
|
|
2992
|
-
id:
|
|
2993
|
-
position:
|
|
2992
|
+
id: a.id,
|
|
2993
|
+
position: a.position || { x: 0, y: 0 },
|
|
2994
2994
|
distance: {
|
|
2995
|
-
x: n.x - ((r =
|
|
2996
|
-
y: n.y - ((l =
|
|
2995
|
+
x: n.x - ((r = a.computedPosition) == null ? void 0 : r.x) || 0,
|
|
2996
|
+
y: n.y - ((l = a.computedPosition) == null ? void 0 : l.y) || 0
|
|
2997
2997
|
},
|
|
2998
|
-
from:
|
|
2999
|
-
extent:
|
|
3000
|
-
parentNode:
|
|
3001
|
-
dimensions:
|
|
3002
|
-
expandParent:
|
|
2998
|
+
from: a.computedPosition,
|
|
2999
|
+
extent: a.extent,
|
|
3000
|
+
parentNode: a.parentNode,
|
|
3001
|
+
dimensions: a.dimensions,
|
|
3002
|
+
expandParent: a.expandParent
|
|
3003
3003
|
})
|
|
3004
3004
|
);
|
|
3005
|
-
return
|
|
3005
|
+
return s;
|
|
3006
3006
|
}
|
|
3007
3007
|
function Tn({
|
|
3008
3008
|
id: e,
|
|
@@ -3057,10 +3057,10 @@ function Lu(e, t, n, o) {
|
|
|
3057
3057
|
[i[1][0] + r, i[1][1] + l]
|
|
3058
3058
|
];
|
|
3059
3059
|
} else if (i !== "parent" && (i != null && i.range) && Array.isArray(i.range)) {
|
|
3060
|
-
const [r, l,
|
|
3060
|
+
const [r, l, s, a] = tr(i.padding), u = (o == null ? void 0 : o.computedPosition.x) || 0, c = (o == null ? void 0 : o.computedPosition.y) || 0;
|
|
3061
3061
|
i = [
|
|
3062
|
-
[i.range[0][0] + u +
|
|
3063
|
-
[i.range[1][0] + u - l, i.range[1][1] + c -
|
|
3062
|
+
[i.range[0][0] + u + a, i.range[0][1] + c + r],
|
|
3063
|
+
[i.range[1][0] + u - l, i.range[1][1] + c - s]
|
|
3064
3064
|
];
|
|
3065
3065
|
}
|
|
3066
3066
|
return i === "parent" ? [
|
|
@@ -3082,18 +3082,18 @@ function fo(e, t, n, o, i) {
|
|
|
3082
3082
|
};
|
|
3083
3083
|
}
|
|
3084
3084
|
function yt(e, t, n = R.Left, o = !1) {
|
|
3085
|
-
const i = ((t == null ? void 0 : t.x) ?? 0) + e.computedPosition.x, r = ((t == null ? void 0 : t.y) ?? 0) + e.computedPosition.y, { width: l, height:
|
|
3085
|
+
const i = ((t == null ? void 0 : t.x) ?? 0) + e.computedPosition.x, r = ((t == null ? void 0 : t.y) ?? 0) + e.computedPosition.y, { width: l, height: s } = t ?? Uu(e);
|
|
3086
3086
|
if (o)
|
|
3087
|
-
return { x: i + l / 2, y: r +
|
|
3087
|
+
return { x: i + l / 2, y: r + s / 2 };
|
|
3088
3088
|
switch ((t == null ? void 0 : t.position) ?? n) {
|
|
3089
3089
|
case R.Top:
|
|
3090
3090
|
return { x: i + l / 2, y: r };
|
|
3091
3091
|
case R.Right:
|
|
3092
|
-
return { x: i + l, y: r +
|
|
3092
|
+
return { x: i + l, y: r + s / 2 };
|
|
3093
3093
|
case R.Bottom:
|
|
3094
|
-
return { x: i + l / 2, y: r +
|
|
3094
|
+
return { x: i + l / 2, y: r + s };
|
|
3095
3095
|
case R.Left:
|
|
3096
|
-
return { x: i, y: r +
|
|
3096
|
+
return { x: i, y: r + s / 2 };
|
|
3097
3097
|
}
|
|
3098
3098
|
}
|
|
3099
3099
|
function Xo(e, t) {
|
|
@@ -3107,8 +3107,8 @@ function Yu({
|
|
|
3107
3107
|
targetWidth: i,
|
|
3108
3108
|
targetHeight: r,
|
|
3109
3109
|
width: l,
|
|
3110
|
-
height:
|
|
3111
|
-
viewport:
|
|
3110
|
+
height: s,
|
|
3111
|
+
viewport: a
|
|
3112
3112
|
}) {
|
|
3113
3113
|
const u = {
|
|
3114
3114
|
x: Math.min(e.x, t.x),
|
|
@@ -3118,10 +3118,10 @@ function Yu({
|
|
|
3118
3118
|
};
|
|
3119
3119
|
u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);
|
|
3120
3120
|
const c = Ki({
|
|
3121
|
-
x: (0 -
|
|
3122
|
-
y: (0 -
|
|
3123
|
-
width: l /
|
|
3124
|
-
height:
|
|
3121
|
+
x: (0 - a.x) / a.zoom,
|
|
3122
|
+
y: (0 - a.y) / a.zoom,
|
|
3123
|
+
width: l / a.zoom,
|
|
3124
|
+
height: s / a.zoom
|
|
3125
3125
|
}), d = Math.max(0, Math.min(c.x2, u.x2) - Math.max(c.x, u.x)), h = Math.max(0, Math.min(c.y2, u.y2) - Math.max(c.y, u.y));
|
|
3126
3126
|
return Math.ceil(d * h) > 0;
|
|
3127
3127
|
}
|
|
@@ -3226,15 +3226,15 @@ function Wu(e, t, n) {
|
|
|
3226
3226
|
const Ku = 250;
|
|
3227
3227
|
function qu(e, t, n, o) {
|
|
3228
3228
|
var i, r;
|
|
3229
|
-
let l = [],
|
|
3230
|
-
const
|
|
3231
|
-
for (const u of
|
|
3229
|
+
let l = [], s = Number.POSITIVE_INFINITY;
|
|
3230
|
+
const a = Wu(e, n, t + Ku);
|
|
3231
|
+
for (const u of a) {
|
|
3232
3232
|
const c = [...((i = u.handleBounds) == null ? void 0 : i.source) ?? [], ...((r = u.handleBounds) == null ? void 0 : r.target) ?? []];
|
|
3233
3233
|
for (const d of c) {
|
|
3234
3234
|
if (o.nodeId === d.nodeId && o.type === d.type && o.id === d.id)
|
|
3235
3235
|
continue;
|
|
3236
|
-
const { x: h, y: f } = yt(u, d, d.position, !0),
|
|
3237
|
-
|
|
3236
|
+
const { x: h, y: f } = yt(u, d, d.position, !0), E = Math.sqrt((h - e.x) ** 2 + (f - e.y) ** 2);
|
|
3237
|
+
E > t || (E < s ? (l = [{ ...d, x: h, y: f }], s = E) : E === s && l.push({ ...d, x: h, y: f }));
|
|
3238
3238
|
}
|
|
3239
3239
|
}
|
|
3240
3240
|
if (!l.length)
|
|
@@ -3252,11 +3252,11 @@ function Zo(e, {
|
|
|
3252
3252
|
fromHandleId: i,
|
|
3253
3253
|
fromType: r,
|
|
3254
3254
|
doc: l,
|
|
3255
|
-
lib:
|
|
3256
|
-
flowId:
|
|
3255
|
+
lib: s,
|
|
3256
|
+
flowId: a,
|
|
3257
3257
|
isValidConnection: u = Zu
|
|
3258
3258
|
}, c, d, h) {
|
|
3259
|
-
const f = r === "target",
|
|
3259
|
+
const f = r === "target", E = t ? l.querySelector(`.${s}-flow__handle[data-id="${a}-${t == null ? void 0 : t.nodeId}-${t == null ? void 0 : t.id}-${t == null ? void 0 : t.type}"]`) : null, { x: b, y: S } = Be(e), C = l.elementFromPoint(b, S), M = C != null && C.classList.contains(`${s}-flow__handle`) ? C : E, _ = {
|
|
3260
3260
|
handleDomNode: M,
|
|
3261
3261
|
isValid: !1,
|
|
3262
3262
|
connection: null,
|
|
@@ -3295,11 +3295,11 @@ function Qu(e, t) {
|
|
|
3295
3295
|
return t ? n = !0 : e && !t && (n = !1), n;
|
|
3296
3296
|
}
|
|
3297
3297
|
function ju(e, t, n, o, i, r = !1) {
|
|
3298
|
-
var l,
|
|
3298
|
+
var l, s, a;
|
|
3299
3299
|
const u = o.get(e);
|
|
3300
3300
|
if (!u)
|
|
3301
3301
|
return null;
|
|
3302
|
-
const c = i === Je.Strict ? (l = u.handleBounds) == null ? void 0 : l[t] : [...((
|
|
3302
|
+
const c = i === Je.Strict ? (l = u.handleBounds) == null ? void 0 : l[t] : [...((s = u.handleBounds) == null ? void 0 : s.source) ?? [], ...((a = u.handleBounds) == null ? void 0 : a.target) ?? []], d = (n ? c == null ? void 0 : c.find((h) => h.id === n) : c == null ? void 0 : c[0]) ?? null;
|
|
3303
3303
|
return d && r ? { ...d, ...yt(u, d, d.position, !0) } : d;
|
|
3304
3304
|
}
|
|
3305
3305
|
const Jn = {
|
|
@@ -3317,14 +3317,14 @@ function or() {
|
|
|
3317
3317
|
function Wo(e, t, n, o, i) {
|
|
3318
3318
|
const r = t.querySelectorAll(`.vue-flow__handle.${e}`);
|
|
3319
3319
|
return r != null && r.length ? Array.from(r).map((l) => {
|
|
3320
|
-
const
|
|
3320
|
+
const s = l.getBoundingClientRect();
|
|
3321
3321
|
return {
|
|
3322
3322
|
id: l.getAttribute("data-handleid"),
|
|
3323
3323
|
type: e,
|
|
3324
3324
|
nodeId: i,
|
|
3325
3325
|
position: l.getAttribute("data-handlepos"),
|
|
3326
|
-
x: (
|
|
3327
|
-
y: (
|
|
3326
|
+
x: (s.left - n.left) / o,
|
|
3327
|
+
y: (s.top - n.top) / o,
|
|
3328
3328
|
...yn(l)
|
|
3329
3329
|
};
|
|
3330
3330
|
}) : null;
|
|
@@ -3371,21 +3371,21 @@ function Ko(e, t, n) {
|
|
|
3371
3371
|
);
|
|
3372
3372
|
continue;
|
|
3373
3373
|
}
|
|
3374
|
-
const
|
|
3375
|
-
l.parentNode && (o[l.parentNode] = !0), i[r] =
|
|
3374
|
+
const s = Tu(l, t(l.id), l.parentNode);
|
|
3375
|
+
l.parentNode && (o[l.parentNode] = !0), i[r] = s;
|
|
3376
3376
|
}
|
|
3377
3377
|
for (const r of i) {
|
|
3378
|
-
const l = t(r.parentNode) || i.find((
|
|
3378
|
+
const l = t(r.parentNode) || i.find((s) => s.id === r.parentNode);
|
|
3379
3379
|
r.parentNode && !l && n(new Se(xe.NODE_MISSING_PARENT, r.id, r.parentNode)), (r.parentNode || o[r.id]) && (o[r.id] && (r.isParent = !0), l && (l.isParent = !0));
|
|
3380
3380
|
}
|
|
3381
3381
|
return i;
|
|
3382
3382
|
}
|
|
3383
3383
|
function qo(e, t, n, o, i, r) {
|
|
3384
3384
|
let l = i;
|
|
3385
|
-
const a = o.get(l) || /* @__PURE__ */ new Map();
|
|
3386
|
-
o.set(l, a.set(n, t)), l = `${i}-${e}`;
|
|
3387
3385
|
const s = o.get(l) || /* @__PURE__ */ new Map();
|
|
3388
|
-
|
|
3386
|
+
o.set(l, s.set(n, t)), l = `${i}-${e}`;
|
|
3387
|
+
const a = o.get(l) || /* @__PURE__ */ new Map();
|
|
3388
|
+
if (o.set(l, a.set(n, t)), r) {
|
|
3389
3389
|
l = `${i}-${e}-${r}`;
|
|
3390
3390
|
const u = o.get(l) || /* @__PURE__ */ new Map();
|
|
3391
3391
|
o.set(l, u.set(n, t));
|
|
@@ -3394,8 +3394,8 @@ function qo(e, t, n, o, i, r) {
|
|
|
3394
3394
|
function An(e, t, n) {
|
|
3395
3395
|
e.clear();
|
|
3396
3396
|
for (const o of n) {
|
|
3397
|
-
const { source: i, target: r, sourceHandle: l = null, targetHandle:
|
|
3398
|
-
qo("source",
|
|
3397
|
+
const { source: i, target: r, sourceHandle: l = null, targetHandle: s = null } = o, a = { edgeId: o.id, source: i, target: r, sourceHandle: l, targetHandle: s }, u = `${i}-${l}--${r}-${s}`, c = `${r}-${s}--${i}-${l}`;
|
|
3398
|
+
qo("source", a, c, e, i, l), qo("target", a, u, e, r, s);
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
3401
3401
|
function Jo(e, t) {
|
|
@@ -3406,10 +3406,10 @@ function Jo(e, t) {
|
|
|
3406
3406
|
return !1;
|
|
3407
3407
|
return !0;
|
|
3408
3408
|
}
|
|
3409
|
-
function On(e, t, n, o, i, r, l,
|
|
3410
|
-
const
|
|
3409
|
+
function On(e, t, n, o, i, r, l, s) {
|
|
3410
|
+
const a = [];
|
|
3411
3411
|
for (const u of e) {
|
|
3412
|
-
const c = Qe(u) ? u : tc(u,
|
|
3412
|
+
const c = Qe(u) ? u : tc(u, s, i, r);
|
|
3413
3413
|
if (!c)
|
|
3414
3414
|
continue;
|
|
3415
3415
|
const d = n(c.source), h = n(c.target);
|
|
@@ -3426,7 +3426,7 @@ function On(e, t, n, o, i, r, l, a) {
|
|
|
3426
3426
|
continue;
|
|
3427
3427
|
}
|
|
3428
3428
|
if (t && !t(c, {
|
|
3429
|
-
edges:
|
|
3429
|
+
edges: s,
|
|
3430
3430
|
nodes: l,
|
|
3431
3431
|
sourceNode: d,
|
|
3432
3432
|
targetNode: h
|
|
@@ -3435,13 +3435,13 @@ function On(e, t, n, o, i, r, l, a) {
|
|
|
3435
3435
|
continue;
|
|
3436
3436
|
}
|
|
3437
3437
|
const f = o(c.id);
|
|
3438
|
-
|
|
3438
|
+
a.push({
|
|
3439
3439
|
...Ui(c, f, r),
|
|
3440
3440
|
sourceNode: d,
|
|
3441
3441
|
targetNode: h
|
|
3442
3442
|
});
|
|
3443
3443
|
}
|
|
3444
|
-
return
|
|
3444
|
+
return a;
|
|
3445
3445
|
}
|
|
3446
3446
|
const Qo = Symbol("vueFlow"), ir = Symbol("nodeId"), rr = Symbol("nodeRef"), oc = Symbol("edgeId"), ic = Symbol("edgeRef"), bn = Symbol("slots");
|
|
3447
3447
|
function lr(e) {
|
|
@@ -3452,14 +3452,14 @@ function lr(e) {
|
|
|
3452
3452
|
noDragClassName: i,
|
|
3453
3453
|
nodes: r,
|
|
3454
3454
|
nodeExtent: l,
|
|
3455
|
-
nodeDragThreshold:
|
|
3456
|
-
viewport:
|
|
3455
|
+
nodeDragThreshold: s,
|
|
3456
|
+
viewport: a,
|
|
3457
3457
|
autoPanOnNodeDrag: u,
|
|
3458
3458
|
autoPanSpeed: c,
|
|
3459
3459
|
nodesDraggable: d,
|
|
3460
3460
|
panBy: h,
|
|
3461
3461
|
findNode: f,
|
|
3462
|
-
multiSelectionActive:
|
|
3462
|
+
multiSelectionActive: E,
|
|
3463
3463
|
nodesSelectionActive: b,
|
|
3464
3464
|
selectNodesOnDrag: S,
|
|
3465
3465
|
removeSelectedElements: C,
|
|
@@ -3467,8 +3467,8 @@ function lr(e) {
|
|
|
3467
3467
|
updateNodePositions: _,
|
|
3468
3468
|
emits: N
|
|
3469
3469
|
} = we(), { onStart: z, onDrag: Y, onStop: F, onClick: I, el: T, disabled: O, id: D, selectable: w, dragHandle: Z } = e, y = tn(!1);
|
|
3470
|
-
let P = [],
|
|
3471
|
-
const H =
|
|
3470
|
+
let P = [], x, $ = null, A = { x: void 0, y: void 0 }, V = { x: 0, y: 0 }, B = null, W = !1, j = 0, re = !1;
|
|
3471
|
+
const H = sc(), G = ({ x: Q, y: ie }) => {
|
|
3472
3472
|
A = { x: Q, y: ie };
|
|
3473
3473
|
let le = !1;
|
|
3474
3474
|
if (P = P.map((v) => {
|
|
@@ -3494,18 +3494,18 @@ function lr(e) {
|
|
|
3494
3494
|
const [Q, ie] = er(V, $, c.value);
|
|
3495
3495
|
if (Q !== 0 || ie !== 0) {
|
|
3496
3496
|
const le = {
|
|
3497
|
-
x: (A.x ?? 0) - Q /
|
|
3498
|
-
y: (A.y ?? 0) - ie /
|
|
3497
|
+
x: (A.x ?? 0) - Q / a.value.zoom,
|
|
3498
|
+
y: (A.y ?? 0) - ie / a.value.zoom
|
|
3499
3499
|
};
|
|
3500
3500
|
h({ x: Q, y: ie }) && G(le);
|
|
3501
3501
|
}
|
|
3502
3502
|
j = requestAnimationFrame(q);
|
|
3503
|
-
},
|
|
3503
|
+
}, ae = (Q, ie) => {
|
|
3504
3504
|
W = !0;
|
|
3505
3505
|
const le = f(D);
|
|
3506
|
-
!S.value && !
|
|
3506
|
+
!S.value && !E.value && le && (le.selected || C()), le && ce(w) && S.value && Qn(
|
|
3507
3507
|
le,
|
|
3508
|
-
|
|
3508
|
+
E.value,
|
|
3509
3509
|
M,
|
|
3510
3510
|
C,
|
|
3511
3511
|
b,
|
|
@@ -3523,19 +3523,19 @@ function lr(e) {
|
|
|
3523
3523
|
}
|
|
3524
3524
|
}, ue = (Q, ie) => {
|
|
3525
3525
|
var le;
|
|
3526
|
-
Q.sourceEvent.type === "touchmove" && Q.sourceEvent.touches.length > 1 || (
|
|
3526
|
+
Q.sourceEvent.type === "touchmove" && Q.sourceEvent.touches.length > 1 || (s.value === 0 && ae(Q, ie), A = H(Q.sourceEvent), $ = ((le = t.value) == null ? void 0 : le.getBoundingClientRect()) || null, V = Be(Q.sourceEvent, $));
|
|
3527
3527
|
}, te = (Q, ie) => {
|
|
3528
3528
|
const le = H(Q.sourceEvent);
|
|
3529
3529
|
if (!re && W && u.value && (re = !0, q()), !W) {
|
|
3530
3530
|
const v = le.xSnapped - (A.x ?? 0), g = le.ySnapped - (A.y ?? 0);
|
|
3531
|
-
Math.sqrt(v * v + g * g) >
|
|
3531
|
+
Math.sqrt(v * v + g * g) > s.value && ae(Q, ie);
|
|
3532
3532
|
}
|
|
3533
3533
|
(A.x !== le.xSnapped || A.y !== le.ySnapped) && P.length && W && (B = Q.sourceEvent, V = Be(Q.sourceEvent, $), G(le));
|
|
3534
3534
|
}, fe = (Q) => {
|
|
3535
3535
|
let ie = !1;
|
|
3536
|
-
if (!W && !y.value && !
|
|
3536
|
+
if (!W && !y.value && !E.value) {
|
|
3537
3537
|
const le = Q.sourceEvent, v = H(le), g = v.xSnapped - (A.x ?? 0), m = v.ySnapped - (A.y ?? 0), p = Math.sqrt(g * g + m * m);
|
|
3538
|
-
p !== 0 && p <=
|
|
3538
|
+
p !== 0 && p <= s.value && (I == null || I(le), ie = !0);
|
|
3539
3539
|
}
|
|
3540
3540
|
if (P.length && !ie) {
|
|
3541
3541
|
_(P, !1, !1);
|
|
@@ -3551,11 +3551,11 @@ function lr(e) {
|
|
|
3551
3551
|
return ve([() => ce(O), T], ([Q, ie], le, v) => {
|
|
3552
3552
|
if (ie) {
|
|
3553
3553
|
const g = ke(ie);
|
|
3554
|
-
Q || (
|
|
3554
|
+
Q || (x = $s().on("start", (m) => ue(m, ie)).on("drag", (m) => te(m, ie)).on("end", (m) => fe(m)).filter((m) => {
|
|
3555
3555
|
const p = m.target, k = ce(Z);
|
|
3556
3556
|
return !m.button && (!i.value || !Go(p, `.${i.value}`, ie) && (!k || Go(p, k, ie)));
|
|
3557
|
-
}), g.call(
|
|
3558
|
-
g.on(".drag", null),
|
|
3557
|
+
}), g.call(x)), v(() => {
|
|
3558
|
+
g.on(".drag", null), x && (x.on("start", null), x.on("drag", null), x.on("end", null));
|
|
3559
3559
|
});
|
|
3560
3560
|
}
|
|
3561
3561
|
}), y;
|
|
@@ -3607,11 +3607,11 @@ function lc(e, t) {
|
|
|
3607
3607
|
{ emit: {}, on: {} }
|
|
3608
3608
|
);
|
|
3609
3609
|
}
|
|
3610
|
-
function
|
|
3610
|
+
function sc() {
|
|
3611
3611
|
const { viewport: e, snapGrid: t, snapToGrid: n, vueFlowRef: o } = we();
|
|
3612
3612
|
return (i) => {
|
|
3613
3613
|
var r;
|
|
3614
|
-
const l = ((r = o.value) == null ? void 0 : r.getBoundingClientRect()) ?? { left: 0, top: 0 },
|
|
3614
|
+
const l = ((r = o.value) == null ? void 0 : r.getBoundingClientRect()) ?? { left: 0, top: 0 }, s = Xu(i) ? i.sourceEvent : i, { x: a, y: u } = Be(s, l), c = Ot({ x: a, y: u }, e.value), { x: d, y: h } = n.value ? _n(c, t.value) : c;
|
|
3615
3615
|
return {
|
|
3616
3616
|
xSnapped: d,
|
|
3617
3617
|
ySnapped: h,
|
|
@@ -3622,7 +3622,7 @@ function ac() {
|
|
|
3622
3622
|
function Ut() {
|
|
3623
3623
|
return !0;
|
|
3624
3624
|
}
|
|
3625
|
-
function
|
|
3625
|
+
function sr({
|
|
3626
3626
|
handleId: e,
|
|
3627
3627
|
nodeId: t,
|
|
3628
3628
|
type: n,
|
|
@@ -3632,14 +3632,14 @@ function ar({
|
|
|
3632
3632
|
onEdgeUpdateEnd: l
|
|
3633
3633
|
}) {
|
|
3634
3634
|
const {
|
|
3635
|
-
id:
|
|
3636
|
-
vueFlowRef:
|
|
3635
|
+
id: s,
|
|
3636
|
+
vueFlowRef: a,
|
|
3637
3637
|
connectionMode: u,
|
|
3638
3638
|
connectionRadius: c,
|
|
3639
3639
|
connectOnClick: d,
|
|
3640
3640
|
connectionClickStartHandle: h,
|
|
3641
3641
|
nodesConnectable: f,
|
|
3642
|
-
autoPanOnConnect:
|
|
3642
|
+
autoPanOnConnect: E,
|
|
3643
3643
|
autoPanSpeed: b,
|
|
3644
3644
|
findNode: S,
|
|
3645
3645
|
panBy: C,
|
|
@@ -3654,10 +3654,10 @@ function ar({
|
|
|
3654
3654
|
nodeLookup: O
|
|
3655
3655
|
} = we();
|
|
3656
3656
|
let D = null, w = !1, Z = null;
|
|
3657
|
-
function y(
|
|
3657
|
+
function y(x) {
|
|
3658
3658
|
var $;
|
|
3659
|
-
const A = ce(n) === "target", V = ho(
|
|
3660
|
-
if (V &&
|
|
3659
|
+
const A = ce(n) === "target", V = ho(x), B = Bo(x.target);
|
|
3660
|
+
if (V && x.button === 0 || !V) {
|
|
3661
3661
|
let W = function(ee) {
|
|
3662
3662
|
v = Be(ee, Q), G = qu(
|
|
3663
3663
|
Ot(v, Y.value, !1, [1, 1]),
|
|
@@ -3665,7 +3665,7 @@ function ar({
|
|
|
3665
3665
|
O.value,
|
|
3666
3666
|
p
|
|
3667
3667
|
), g || (m(), g = !0);
|
|
3668
|
-
const
|
|
3668
|
+
const se = Zo(
|
|
3669
3669
|
ee,
|
|
3670
3670
|
{
|
|
3671
3671
|
handle: G,
|
|
@@ -3676,22 +3676,22 @@ function ar({
|
|
|
3676
3676
|
isValidConnection: H,
|
|
3677
3677
|
doc: B,
|
|
3678
3678
|
lib: "vue",
|
|
3679
|
-
flowId:
|
|
3679
|
+
flowId: s,
|
|
3680
3680
|
nodeLookup: O.value
|
|
3681
3681
|
},
|
|
3682
3682
|
F.value,
|
|
3683
3683
|
I.value,
|
|
3684
3684
|
S
|
|
3685
3685
|
);
|
|
3686
|
-
Z =
|
|
3686
|
+
Z = se.handleDomNode, D = se.connection, w = Qu(!!G, se.isValid);
|
|
3687
3687
|
const de = {
|
|
3688
3688
|
// from stays the same
|
|
3689
3689
|
...U,
|
|
3690
3690
|
isValid: w,
|
|
3691
|
-
to:
|
|
3692
|
-
toHandle:
|
|
3693
|
-
toPosition: w &&
|
|
3694
|
-
toNode:
|
|
3691
|
+
to: se.toHandle && w ? qn({ x: se.toHandle.x, y: se.toHandle.y }, Y.value) : v,
|
|
3692
|
+
toHandle: se.toHandle,
|
|
3693
|
+
toPosition: w && se.toHandle ? se.toHandle.position : Jn[p.position],
|
|
3694
|
+
toNode: se.toHandle ? O.value.get(se.toHandle.nodeId) : null
|
|
3695
3695
|
};
|
|
3696
3696
|
if (!(w && G && (U != null && U.toHandle) && de.toHandle && U.toHandle.type === de.toHandle.type && U.toHandle.nodeId === de.toHandle.nodeId && U.toHandle.id === de.toHandle.id && U.to.x === de.to.x && U.to.y === de.to.y)) {
|
|
3697
3697
|
if (_(
|
|
@@ -3702,7 +3702,7 @@ function ar({
|
|
|
3702
3702
|
},
|
|
3703
3703
|
Y.value
|
|
3704
3704
|
) : v,
|
|
3705
|
-
|
|
3705
|
+
se.toHandle,
|
|
3706
3706
|
Ju(!!G, w)
|
|
3707
3707
|
), U = de, !G && !w && !Z)
|
|
3708
3708
|
return Dn(le);
|
|
@@ -3715,18 +3715,18 @@ function ar({
|
|
|
3715
3715
|
let H = ce(o) || T.value || Ut;
|
|
3716
3716
|
!H && re && (H = (A ? re.isValidSourcePos : re.isValidTargetPos) || Ut);
|
|
3717
3717
|
let G, q = 0;
|
|
3718
|
-
const { x:
|
|
3718
|
+
const { x: ae, y: ue } = Be(x), te = B == null ? void 0 : B.elementFromPoint(ae, ue), fe = nr(ce(i), te), Q = ($ = a.value) == null ? void 0 : $.getBoundingClientRect();
|
|
3719
3719
|
if (!Q || !fe)
|
|
3720
3720
|
return;
|
|
3721
3721
|
const ie = ju(ce(t), fe, ce(e), O.value, u.value);
|
|
3722
3722
|
if (!ie)
|
|
3723
3723
|
return;
|
|
3724
|
-
let le, v = Be(
|
|
3724
|
+
let le, v = Be(x, Q), g = !1;
|
|
3725
3725
|
const m = () => {
|
|
3726
|
-
if (!
|
|
3726
|
+
if (!E.value)
|
|
3727
3727
|
return;
|
|
3728
|
-
const [ee,
|
|
3729
|
-
C({ x: ee, y:
|
|
3728
|
+
const [ee, se] = er(v, Q, b.value);
|
|
3729
|
+
C({ x: ee, y: se }), q = requestAnimationFrame(m);
|
|
3730
3730
|
}, p = {
|
|
3731
3731
|
...ie,
|
|
3732
3732
|
nodeId: ce(t),
|
|
@@ -3753,27 +3753,27 @@ function ar({
|
|
|
3753
3753
|
...v
|
|
3754
3754
|
},
|
|
3755
3755
|
{
|
|
3756
|
-
x:
|
|
3756
|
+
x: ae - Q.left,
|
|
3757
3757
|
y: ue - Q.top
|
|
3758
3758
|
}
|
|
3759
|
-
), z.connectStart({ event:
|
|
3759
|
+
), z.connectStart({ event: x, nodeId: ce(t), handleId: ce(e), handleType: fe });
|
|
3760
3760
|
let U = X;
|
|
3761
3761
|
B.addEventListener("mousemove", W), B.addEventListener("mouseup", j), B.addEventListener("touchmove", W), B.addEventListener("touchend", j);
|
|
3762
3762
|
}
|
|
3763
3763
|
}
|
|
3764
|
-
function P(
|
|
3764
|
+
function P(x) {
|
|
3765
3765
|
var $, A;
|
|
3766
3766
|
if (!d.value)
|
|
3767
3767
|
return;
|
|
3768
3768
|
const V = ce(n) === "target";
|
|
3769
3769
|
if (!h.value) {
|
|
3770
|
-
z.clickConnectStart({ event:
|
|
3770
|
+
z.clickConnectStart({ event: x, nodeId: ce(t), handleId: ce(e) }), M(
|
|
3771
3771
|
{
|
|
3772
3772
|
nodeId: ce(t),
|
|
3773
3773
|
type: ce(n),
|
|
3774
3774
|
id: ce(e),
|
|
3775
3775
|
position: R.Top,
|
|
3776
|
-
...Be(
|
|
3776
|
+
...Be(x)
|
|
3777
3777
|
},
|
|
3778
3778
|
void 0,
|
|
3779
3779
|
!0
|
|
@@ -3784,15 +3784,15 @@ function ar({
|
|
|
3784
3784
|
const W = S(ce(t));
|
|
3785
3785
|
if (!B && W && (B = (V ? W.isValidSourcePos : W.isValidTargetPos) || Ut), W && (typeof W.connectable > "u" ? f.value : W.connectable) === !1)
|
|
3786
3786
|
return;
|
|
3787
|
-
const j = Bo(
|
|
3788
|
-
|
|
3787
|
+
const j = Bo(x.target), re = Zo(
|
|
3788
|
+
x,
|
|
3789
3789
|
{
|
|
3790
3790
|
handle: {
|
|
3791
3791
|
nodeId: ce(t),
|
|
3792
3792
|
id: ce(e),
|
|
3793
3793
|
type: ce(n),
|
|
3794
3794
|
position: R.Top,
|
|
3795
|
-
...Be(
|
|
3795
|
+
...Be(x)
|
|
3796
3796
|
},
|
|
3797
3797
|
connectionMode: u.value,
|
|
3798
3798
|
fromNodeId: h.value.nodeId,
|
|
@@ -3801,25 +3801,25 @@ function ar({
|
|
|
3801
3801
|
isValidConnection: B,
|
|
3802
3802
|
doc: j,
|
|
3803
3803
|
lib: "vue",
|
|
3804
|
-
flowId:
|
|
3804
|
+
flowId: s,
|
|
3805
3805
|
nodeLookup: O.value
|
|
3806
3806
|
},
|
|
3807
3807
|
F.value,
|
|
3808
3808
|
I.value,
|
|
3809
3809
|
S
|
|
3810
3810
|
), H = (($ = re.connection) == null ? void 0 : $.source) === ((A = re.connection) == null ? void 0 : A.target);
|
|
3811
|
-
re.isValid && re.connection && !H && z.connect(re.connection), z.clickConnectEnd(
|
|
3811
|
+
re.isValid && re.connection && !H && z.connect(re.connection), z.clickConnectEnd(x), N(x, !0);
|
|
3812
3812
|
}
|
|
3813
3813
|
return {
|
|
3814
3814
|
handlePointerDown: y,
|
|
3815
3815
|
handleClick: P
|
|
3816
3816
|
};
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function ac() {
|
|
3819
3819
|
return wt(ir, "");
|
|
3820
3820
|
}
|
|
3821
|
-
function
|
|
3822
|
-
const t = e ??
|
|
3821
|
+
function ar(e) {
|
|
3822
|
+
const t = e ?? ac() ?? "", n = wt(rr, ge(null)), { findNode: o, edges: i, emits: r } = we(), l = o(t);
|
|
3823
3823
|
return l || r.error(new Se(xe.NODE_NOT_FOUND, t)), {
|
|
3824
3824
|
id: t,
|
|
3825
3825
|
nodeEl: n,
|
|
@@ -3876,15 +3876,15 @@ function cc(e, t) {
|
|
|
3876
3876
|
);
|
|
3877
3877
|
}
|
|
3878
3878
|
function ur() {
|
|
3879
|
-
const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: l, emits:
|
|
3880
|
-
return (
|
|
3881
|
-
const c = r.value ? i.value[0] : 5, d = r.value ? i.value[1] : 5, h = u ? 4 : 1, f =
|
|
3879
|
+
const { getSelectedNodes: e, nodeExtent: t, updateNodePositions: n, findNode: o, snapGrid: i, snapToGrid: r, nodesDraggable: l, emits: s } = we();
|
|
3880
|
+
return (a, u = !1) => {
|
|
3881
|
+
const c = r.value ? i.value[0] : 5, d = r.value ? i.value[1] : 5, h = u ? 4 : 1, f = a.x * c * h, E = a.y * d * h, b = [];
|
|
3882
3882
|
for (const S of e.value)
|
|
3883
3883
|
if (S.draggable || l && typeof S.draggable > "u") {
|
|
3884
|
-
const C = { x: S.computedPosition.x + f, y: S.computedPosition.y +
|
|
3884
|
+
const C = { x: S.computedPosition.x + f, y: S.computedPosition.y + E }, { computedPosition: M } = fo(
|
|
3885
3885
|
S,
|
|
3886
3886
|
C,
|
|
3887
|
-
|
|
3887
|
+
s.error,
|
|
3888
3888
|
t.value,
|
|
3889
3889
|
S.parentNode ? o(S.parentNode) : void 0
|
|
3890
3890
|
);
|
|
@@ -3892,7 +3892,7 @@ function ur() {
|
|
|
3892
3892
|
id: S.id,
|
|
3893
3893
|
position: M,
|
|
3894
3894
|
from: S.position,
|
|
3895
|
-
distance: { x:
|
|
3895
|
+
distance: { x: a.x, y: a.y },
|
|
3896
3896
|
dimensions: S.dimensions
|
|
3897
3897
|
});
|
|
3898
3898
|
}
|
|
@@ -3931,15 +3931,15 @@ function hc(e) {
|
|
|
3931
3931
|
});
|
|
3932
3932
|
}
|
|
3933
3933
|
function n(o, i, r, l) {
|
|
3934
|
-
return new Promise((
|
|
3935
|
-
var
|
|
3934
|
+
return new Promise((s) => {
|
|
3935
|
+
var a;
|
|
3936
3936
|
const { x: u, y: c } = Xi({ x: -o, y: -i }, e.translateExtent), d = mt.translate(-u, -c).scale(r);
|
|
3937
|
-
e.d3Selection && e.d3Zoom ? (
|
|
3937
|
+
e.d3Selection && e.d3Zoom ? (a = e.d3Zoom) == null || a.interpolate((l == null ? void 0 : l.interpolate) === "linear" ? It : qt).transform(
|
|
3938
3938
|
Bn(e.d3Selection, l == null ? void 0 : l.duration, l == null ? void 0 : l.ease, () => {
|
|
3939
|
-
|
|
3939
|
+
s(!0);
|
|
3940
3940
|
}),
|
|
3941
3941
|
d
|
|
3942
|
-
) :
|
|
3942
|
+
) : s(!1);
|
|
3943
3943
|
});
|
|
3944
3944
|
}
|
|
3945
3945
|
return ne(() => e.d3Zoom && e.d3Selection && e.dimensions.width && e.dimensions.height ? {
|
|
@@ -3973,13 +3973,13 @@ function hc(e) {
|
|
|
3973
3973
|
duration: 0
|
|
3974
3974
|
}) => {
|
|
3975
3975
|
var r, l;
|
|
3976
|
-
const
|
|
3976
|
+
const s = [];
|
|
3977
3977
|
for (const h of e.nodes)
|
|
3978
|
-
h.dimensions.width && h.dimensions.height && ((i == null ? void 0 : i.includeHiddenNodes) || !h.hidden) && (!((r = i.nodes) != null && r.length) || (l = i.nodes) != null && l.length && i.nodes.includes(h.id)) &&
|
|
3979
|
-
if (!
|
|
3978
|
+
h.dimensions.width && h.dimensions.height && ((i == null ? void 0 : i.includeHiddenNodes) || !h.hidden) && (!((r = i.nodes) != null && r.length) || (l = i.nodes) != null && l.length && i.nodes.includes(h.id)) && s.push(h);
|
|
3979
|
+
if (!s.length)
|
|
3980
3980
|
return Promise.resolve(!1);
|
|
3981
|
-
const
|
|
3982
|
-
|
|
3981
|
+
const a = qi(s), { x: u, y: c, zoom: d } = Vo(
|
|
3982
|
+
a,
|
|
3983
3983
|
e.dimensions.width,
|
|
3984
3984
|
e.dimensions.height,
|
|
3985
3985
|
i.minZoom ?? e.minZoom,
|
|
@@ -3990,11 +3990,11 @@ function hc(e) {
|
|
|
3990
3990
|
return n(u, c, d, i);
|
|
3991
3991
|
},
|
|
3992
3992
|
setCenter: (i, r, l) => {
|
|
3993
|
-
const
|
|
3994
|
-
return n(
|
|
3993
|
+
const s = typeof (l == null ? void 0 : l.zoom) < "u" ? l.zoom : e.maxZoom, a = e.dimensions.width / 2 - i * s, u = e.dimensions.height / 2 - r * s;
|
|
3994
|
+
return n(a, u, s, l);
|
|
3995
3995
|
},
|
|
3996
3996
|
fitBounds: (i, r = { padding: zn }) => {
|
|
3997
|
-
const { x: l, y:
|
|
3997
|
+
const { x: l, y: s, zoom: a } = Vo(
|
|
3998
3998
|
i,
|
|
3999
3999
|
e.dimensions.width,
|
|
4000
4000
|
e.dimensions.height,
|
|
@@ -4002,26 +4002,26 @@ function hc(e) {
|
|
|
4002
4002
|
e.maxZoom,
|
|
4003
4003
|
r.padding
|
|
4004
4004
|
);
|
|
4005
|
-
return n(l,
|
|
4005
|
+
return n(l, s, a, r);
|
|
4006
4006
|
},
|
|
4007
4007
|
project: (i) => Ot(i, e.viewport, e.snapToGrid, e.snapGrid),
|
|
4008
4008
|
screenToFlowCoordinate: (i) => {
|
|
4009
4009
|
if (e.vueFlowRef) {
|
|
4010
|
-
const { x: r, y: l } = e.vueFlowRef.getBoundingClientRect(),
|
|
4010
|
+
const { x: r, y: l } = e.vueFlowRef.getBoundingClientRect(), s = {
|
|
4011
4011
|
x: i.x - r,
|
|
4012
4012
|
y: i.y - l
|
|
4013
4013
|
};
|
|
4014
|
-
return Ot(
|
|
4014
|
+
return Ot(s, e.viewport, e.snapToGrid, e.snapGrid);
|
|
4015
4015
|
}
|
|
4016
4016
|
return { x: 0, y: 0 };
|
|
4017
4017
|
},
|
|
4018
4018
|
flowToScreenCoordinate: (i) => {
|
|
4019
4019
|
if (e.vueFlowRef) {
|
|
4020
|
-
const { x: r, y: l } = e.vueFlowRef.getBoundingClientRect(),
|
|
4020
|
+
const { x: r, y: l } = e.vueFlowRef.getBoundingClientRect(), s = {
|
|
4021
4021
|
x: i.x + r,
|
|
4022
4022
|
y: i.y + l
|
|
4023
4023
|
};
|
|
4024
|
-
return qn(
|
|
4024
|
+
return qn(s, e.viewport);
|
|
4025
4025
|
}
|
|
4026
4026
|
return { x: 0, y: 0 };
|
|
4027
4027
|
}
|
|
@@ -4038,12 +4038,12 @@ function gc(e, t, n) {
|
|
|
4038
4038
|
const i = () => {
|
|
4039
4039
|
o.run(() => {
|
|
4040
4040
|
let b, S, C = !!(n.nodes.value.length || n.edges.value.length);
|
|
4041
|
-
b =
|
|
4041
|
+
b = st([e.modelValue, () => {
|
|
4042
4042
|
var M, _;
|
|
4043
4043
|
return (_ = (M = e.modelValue) == null ? void 0 : M.value) == null ? void 0 : _.length;
|
|
4044
4044
|
}], ([M]) => {
|
|
4045
4045
|
M && Array.isArray(M) && (S == null || S.pause(), n.setElements(M), !S && !C && M.length ? C = !0 : S == null || S.resume());
|
|
4046
|
-
}), S =
|
|
4046
|
+
}), S = st(
|
|
4047
4047
|
[n.nodes, n.edges, () => n.edges.value.length, () => n.nodes.value.length],
|
|
4048
4048
|
([M, _]) => {
|
|
4049
4049
|
var N;
|
|
@@ -4059,12 +4059,12 @@ function gc(e, t, n) {
|
|
|
4059
4059
|
}, r = () => {
|
|
4060
4060
|
o.run(() => {
|
|
4061
4061
|
let b, S, C = !!n.nodes.value.length;
|
|
4062
|
-
b =
|
|
4062
|
+
b = st([e.nodes, () => {
|
|
4063
4063
|
var M, _;
|
|
4064
4064
|
return (_ = (M = e.nodes) == null ? void 0 : M.value) == null ? void 0 : _.length;
|
|
4065
4065
|
}], ([M]) => {
|
|
4066
4066
|
M && Array.isArray(M) && (S == null || S.pause(), n.setNodes(M), !S && !C && M.length ? C = !0 : S == null || S.resume());
|
|
4067
|
-
}), S =
|
|
4067
|
+
}), S = st(
|
|
4068
4068
|
[n.nodes, () => n.nodes.value.length],
|
|
4069
4069
|
([M]) => {
|
|
4070
4070
|
var _;
|
|
@@ -4080,12 +4080,12 @@ function gc(e, t, n) {
|
|
|
4080
4080
|
}, l = () => {
|
|
4081
4081
|
o.run(() => {
|
|
4082
4082
|
let b, S, C = !!n.edges.value.length;
|
|
4083
|
-
b =
|
|
4083
|
+
b = st([e.edges, () => {
|
|
4084
4084
|
var M, _;
|
|
4085
4085
|
return (_ = (M = e.edges) == null ? void 0 : M.value) == null ? void 0 : _.length;
|
|
4086
4086
|
}], ([M]) => {
|
|
4087
4087
|
M && Array.isArray(M) && (S == null || S.pause(), n.setEdges(M), !S && !C && M.length ? C = !0 : S == null || S.resume());
|
|
4088
|
-
}), S =
|
|
4088
|
+
}), S = st(
|
|
4089
4089
|
[n.edges, () => n.edges.value.length],
|
|
4090
4090
|
([M]) => {
|
|
4091
4091
|
var _;
|
|
@@ -4098,7 +4098,7 @@ function gc(e, t, n) {
|
|
|
4098
4098
|
b == null || b.stop(), S == null || S.stop();
|
|
4099
4099
|
});
|
|
4100
4100
|
});
|
|
4101
|
-
},
|
|
4101
|
+
}, s = () => {
|
|
4102
4102
|
o.run(() => {
|
|
4103
4103
|
ve(
|
|
4104
4104
|
() => t.maxZoom,
|
|
@@ -4110,7 +4110,7 @@ function gc(e, t, n) {
|
|
|
4110
4110
|
}
|
|
4111
4111
|
);
|
|
4112
4112
|
});
|
|
4113
|
-
},
|
|
4113
|
+
}, a = () => {
|
|
4114
4114
|
o.run(() => {
|
|
4115
4115
|
ve(
|
|
4116
4116
|
() => t.minZoom,
|
|
@@ -4208,7 +4208,7 @@ function gc(e, t, n) {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
};
|
|
4210
4210
|
(() => {
|
|
4211
|
-
i(), r(), l(),
|
|
4211
|
+
i(), r(), l(), a(), s(), u(), c(), d(), h(), f();
|
|
4212
4212
|
})();
|
|
4213
4213
|
}), () => o.stop();
|
|
4214
4214
|
}
|
|
@@ -4394,7 +4394,7 @@ function yc(e, t, n) {
|
|
|
4394
4394
|
const o = hc(e), i = (v) => {
|
|
4395
4395
|
const g = v ?? [];
|
|
4396
4396
|
e.hooks.updateNodeInternals.trigger(g);
|
|
4397
|
-
}, r = (v) => Au(v, e.nodes, e.edges), l = (v) => Du(v, e.nodes, e.edges),
|
|
4397
|
+
}, r = (v) => Au(v, e.nodes, e.edges), l = (v) => Du(v, e.nodes, e.edges), s = (v) => Qi(v, e.edges), a = ({ id: v, type: g, nodeId: m }) => {
|
|
4398
4398
|
var p;
|
|
4399
4399
|
return Array.from(((p = e.connectionLookup.get(`${m}-${g}-${v ?? null}`)) == null ? void 0 : p.values()) ?? []);
|
|
4400
4400
|
}, u = (v) => {
|
|
@@ -4459,7 +4459,7 @@ function yc(e, t, n) {
|
|
|
4459
4459
|
K.push(We(X, g));
|
|
4460
4460
|
}
|
|
4461
4461
|
k.length && e.hooks.nodesChange.trigger(k), K.length && e.hooks.edgesChange.trigger(K);
|
|
4462
|
-
},
|
|
4462
|
+
}, E = (v) => {
|
|
4463
4463
|
if (e.multiSelectionActive) {
|
|
4464
4464
|
const g = v.map((m) => We(m.id, !0));
|
|
4465
4465
|
e.hooks.nodesChange.trigger(g);
|
|
@@ -4554,15 +4554,15 @@ function yc(e, t, n) {
|
|
|
4554
4554
|
p.length && e.hooks.edgesChange.trigger(p);
|
|
4555
4555
|
}, P = (v, g = !0, m = !1) => {
|
|
4556
4556
|
const p = v instanceof Function ? v(e.nodes) : v, k = Array.isArray(p) ? p : [p], K = [], X = [];
|
|
4557
|
-
function U(
|
|
4558
|
-
const de =
|
|
4557
|
+
function U(se) {
|
|
4558
|
+
const de = s(se);
|
|
4559
4559
|
for (const ye of de)
|
|
4560
4560
|
(!Ee(ye.deletable) || ye.deletable) && X.push(Yo(ye.id, ye.source, ye.target, ye.sourceHandle, ye.targetHandle));
|
|
4561
4561
|
}
|
|
4562
|
-
function ee(
|
|
4562
|
+
function ee(se) {
|
|
4563
4563
|
const de = [];
|
|
4564
4564
|
for (const ye of e.nodes)
|
|
4565
|
-
ye.parentNode ===
|
|
4565
|
+
ye.parentNode === se && de.push(ye);
|
|
4566
4566
|
if (de.length) {
|
|
4567
4567
|
for (const ye of de)
|
|
4568
4568
|
K.push(Fo(ye.id));
|
|
@@ -4571,12 +4571,12 @@ function yc(e, t, n) {
|
|
|
4571
4571
|
ee(ye.id);
|
|
4572
4572
|
}
|
|
4573
4573
|
}
|
|
4574
|
-
for (const
|
|
4575
|
-
const de = typeof
|
|
4574
|
+
for (const se of k) {
|
|
4575
|
+
const de = typeof se == "string" ? u(se) : se;
|
|
4576
4576
|
de && (Ee(de.deletable) && !de.deletable || (K.push(Fo(de.id)), g && U([de]), m && ee(de.id)));
|
|
4577
4577
|
}
|
|
4578
4578
|
X.length && e.hooks.edgesChange.trigger(X), K.length && e.hooks.nodesChange.trigger(K);
|
|
4579
|
-
},
|
|
4579
|
+
}, x = (v) => {
|
|
4580
4580
|
const g = v instanceof Function ? v(e.edges) : v, m = Array.isArray(g) ? g : [g], p = [];
|
|
4581
4581
|
for (const k of m) {
|
|
4582
4582
|
const K = typeof k == "string" ? c(k) : k;
|
|
@@ -4640,7 +4640,7 @@ function yc(e, t, n) {
|
|
|
4640
4640
|
}, q = (v) => {
|
|
4641
4641
|
const g = $u(v), m = g ? null : Ct(v) ? v : u(v.id);
|
|
4642
4642
|
return !g && !m ? [null, null, g] : [g ? v : cn(m), m, g];
|
|
4643
|
-
},
|
|
4643
|
+
}, ae = (v, g = !0, m = e.nodes) => {
|
|
4644
4644
|
const [p, k, K] = q(v);
|
|
4645
4645
|
if (!p)
|
|
4646
4646
|
return [];
|
|
@@ -4648,8 +4648,8 @@ function yc(e, t, n) {
|
|
|
4648
4648
|
for (const U of m || e.nodes) {
|
|
4649
4649
|
if (!K && (U.id === k.id || !U.computedPosition))
|
|
4650
4650
|
continue;
|
|
4651
|
-
const ee = cn(U),
|
|
4652
|
-
(g &&
|
|
4651
|
+
const ee = cn(U), se = dn(ee, p);
|
|
4652
|
+
(g && se > 0 || se >= Number(p.width) * Number(p.height)) && X.push(U);
|
|
4653
4653
|
}
|
|
4654
4654
|
return X;
|
|
4655
4655
|
}, ue = (v, g, m = !0) => {
|
|
@@ -4665,8 +4665,8 @@ function yc(e, t, n) {
|
|
|
4665
4665
|
const X = mt.translate(g.x + v.x, g.y + v.y).scale(g.zoom), U = [
|
|
4666
4666
|
[0, 0],
|
|
4667
4667
|
[m.width, m.height]
|
|
4668
|
-
], ee = p.constrain()(X, U, K),
|
|
4669
|
-
return p.transform(k, ee),
|
|
4668
|
+
], ee = p.constrain()(X, U, K), se = e.viewport.x !== ee.x || e.viewport.y !== ee.y || e.viewport.zoom !== ee.k;
|
|
4669
|
+
return p.transform(k, ee), se;
|
|
4670
4670
|
}, fe = (v) => {
|
|
4671
4671
|
const g = v instanceof Function ? v(e) : v, m = [
|
|
4672
4672
|
"d3Zoom",
|
|
@@ -4698,7 +4698,7 @@ function yc(e, t, n) {
|
|
|
4698
4698
|
addNodes: Z,
|
|
4699
4699
|
addEdges: y,
|
|
4700
4700
|
removeNodes: P,
|
|
4701
|
-
removeEdges:
|
|
4701
|
+
removeEdges: x,
|
|
4702
4702
|
findNode: u,
|
|
4703
4703
|
findEdge: c,
|
|
4704
4704
|
updateEdge: $,
|
|
@@ -4708,7 +4708,7 @@ function yc(e, t, n) {
|
|
|
4708
4708
|
applyEdgeChanges: B,
|
|
4709
4709
|
applyNodeChanges: V,
|
|
4710
4710
|
addSelectedElements: S,
|
|
4711
|
-
addSelectedNodes:
|
|
4711
|
+
addSelectedNodes: E,
|
|
4712
4712
|
addSelectedEdges: b,
|
|
4713
4713
|
setMinZoom: N,
|
|
4714
4714
|
setMaxZoom: z,
|
|
@@ -4723,11 +4723,11 @@ function yc(e, t, n) {
|
|
|
4723
4723
|
endConnection: G,
|
|
4724
4724
|
setInteractive: T,
|
|
4725
4725
|
setState: fe,
|
|
4726
|
-
getIntersectingNodes:
|
|
4726
|
+
getIntersectingNodes: ae,
|
|
4727
4727
|
getIncomers: r,
|
|
4728
4728
|
getOutgoers: l,
|
|
4729
|
-
getConnectedEdges:
|
|
4730
|
-
getHandleConnections:
|
|
4729
|
+
getConnectedEdges: s,
|
|
4730
|
+
getHandleConnections: a,
|
|
4731
4731
|
isNodeIntersecting: ue,
|
|
4732
4732
|
panBy: te,
|
|
4733
4733
|
fitView: (v) => o.value.fitView(v),
|
|
@@ -4753,7 +4753,7 @@ function yc(e, t, n) {
|
|
|
4753
4753
|
dimensions: X,
|
|
4754
4754
|
isParent: U,
|
|
4755
4755
|
resizing: ee,
|
|
4756
|
-
dragging:
|
|
4756
|
+
dragging: se,
|
|
4757
4757
|
events: de,
|
|
4758
4758
|
...ye
|
|
4759
4759
|
} = m;
|
|
@@ -4776,12 +4776,12 @@ function yc(e, t, n) {
|
|
|
4776
4776
|
fromObject: (v) => new Promise((g) => {
|
|
4777
4777
|
const { nodes: m, edges: p, position: k, zoom: K, viewport: X } = v;
|
|
4778
4778
|
if (m && O(m), p && D(p), X != null && X.x && (X != null && X.y) || k) {
|
|
4779
|
-
const U = (X == null ? void 0 : X.x) || k[0], ee = (X == null ? void 0 : X.y) || k[1],
|
|
4779
|
+
const U = (X == null ? void 0 : X.x) || k[0], ee = (X == null ? void 0 : X.y) || k[1], se = (X == null ? void 0 : X.zoom) || K || e.viewport.zoom;
|
|
4780
4780
|
return Rn(() => o.value.viewportInitialized).toBe(!0).then(() => {
|
|
4781
4781
|
o.value.setViewport({
|
|
4782
4782
|
x: U,
|
|
4783
4783
|
y: ee,
|
|
4784
|
-
zoom:
|
|
4784
|
+
zoom: se
|
|
4785
4785
|
}).then(() => {
|
|
4786
4786
|
g(!0);
|
|
4787
4787
|
});
|
|
@@ -4824,23 +4824,23 @@ const _c = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], wc = {
|
|
|
4824
4824
|
const n = yr(e, ["position", "connectable", "connectableStart", "connectableEnd", "id"]), o = be(() => n.type ?? "source"), i = be(() => n.isValidConnection ?? null), {
|
|
4825
4825
|
id: r,
|
|
4826
4826
|
connectionStartHandle: l,
|
|
4827
|
-
connectionClickStartHandle:
|
|
4828
|
-
connectionEndHandle:
|
|
4827
|
+
connectionClickStartHandle: s,
|
|
4828
|
+
connectionEndHandle: a,
|
|
4829
4829
|
vueFlowRef: u,
|
|
4830
4830
|
nodesConnectable: c,
|
|
4831
4831
|
noDragClassName: d,
|
|
4832
4832
|
noPanClassName: h
|
|
4833
|
-
} = we(), { id: f, node:
|
|
4833
|
+
} = we(), { id: f, node: E, nodeEl: b, connectedEdges: S } = ar(), C = ge(), M = be(() => typeof e.connectableStart < "u" ? e.connectableStart : !0), _ = be(() => typeof e.connectableEnd < "u" ? e.connectableEnd : !0), N = be(
|
|
4834
4834
|
() => {
|
|
4835
|
-
var D, w, Z, y, P,
|
|
4836
|
-
return ((D = l.value) == null ? void 0 : D.nodeId) === f && ((w = l.value) == null ? void 0 : w.id) === e.id && ((Z = l.value) == null ? void 0 : Z.type) === o.value || ((y =
|
|
4835
|
+
var D, w, Z, y, P, x;
|
|
4836
|
+
return ((D = l.value) == null ? void 0 : D.nodeId) === f && ((w = l.value) == null ? void 0 : w.id) === e.id && ((Z = l.value) == null ? void 0 : Z.type) === o.value || ((y = a.value) == null ? void 0 : y.nodeId) === f && ((P = a.value) == null ? void 0 : P.id) === e.id && ((x = a.value) == null ? void 0 : x.type) === o.value;
|
|
4837
4837
|
}
|
|
4838
4838
|
), z = be(
|
|
4839
4839
|
() => {
|
|
4840
4840
|
var D, w, Z;
|
|
4841
|
-
return ((D =
|
|
4841
|
+
return ((D = s.value) == null ? void 0 : D.nodeId) === f && ((w = s.value) == null ? void 0 : w.id) === e.id && ((Z = s.value) == null ? void 0 : Z.type) === o.value;
|
|
4842
4842
|
}
|
|
4843
|
-
), { handlePointerDown: Y, handleClick: F } =
|
|
4843
|
+
), { handlePointerDown: Y, handleClick: F } = sr({
|
|
4844
4844
|
nodeId: f,
|
|
4845
4845
|
handleId: e.id,
|
|
4846
4846
|
isValidConnection: i,
|
|
@@ -4851,18 +4851,18 @@ const _c = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], wc = {
|
|
|
4851
4851
|
}) : typeof e.connectable == "number" ? S.value.filter((D) => {
|
|
4852
4852
|
const w = D[`${o.value}Handle`];
|
|
4853
4853
|
return D[o.value] !== f ? !1 : w ? w === e.id : !0;
|
|
4854
|
-
}).length < e.connectable : typeof e.connectable == "function" ? e.connectable(
|
|
4854
|
+
}).length < e.connectable : typeof e.connectable == "function" ? e.connectable(E, S.value) : Ee(e.connectable) ? e.connectable : c.value);
|
|
4855
4855
|
Ue(() => {
|
|
4856
4856
|
var D;
|
|
4857
|
-
if (!
|
|
4857
|
+
if (!E.dimensions.width || !E.dimensions.height)
|
|
4858
4858
|
return;
|
|
4859
|
-
const w = (D =
|
|
4859
|
+
const w = (D = E.handleBounds[o.value]) == null ? void 0 : D.find((V) => V.id === e.id);
|
|
4860
4860
|
if (!u.value || w)
|
|
4861
4861
|
return;
|
|
4862
4862
|
const Z = u.value.querySelector(".vue-flow__transformationpane");
|
|
4863
4863
|
if (!b.value || !C.value || !Z || !e.id)
|
|
4864
4864
|
return;
|
|
4865
|
-
const y = b.value.getBoundingClientRect(), P = C.value.getBoundingClientRect(),
|
|
4865
|
+
const y = b.value.getBoundingClientRect(), P = C.value.getBoundingClientRect(), x = window.getComputedStyle(Z), { m22: $ } = new window.DOMMatrixReadOnly(x.transform), A = {
|
|
4866
4866
|
id: e.id,
|
|
4867
4867
|
position: e.position,
|
|
4868
4868
|
x: (P.left - y.left) / $,
|
|
@@ -4871,14 +4871,14 @@ const _c = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], wc = {
|
|
|
4871
4871
|
nodeId: f,
|
|
4872
4872
|
...yn(C.value)
|
|
4873
4873
|
};
|
|
4874
|
-
|
|
4874
|
+
E.handleBounds[o.value] = [...E.handleBounds[o.value] ?? [], A];
|
|
4875
4875
|
});
|
|
4876
4876
|
function T(D) {
|
|
4877
4877
|
const w = ho(D);
|
|
4878
4878
|
I.value && M.value && (w && D.button === 0 || !w) && Y(D);
|
|
4879
4879
|
}
|
|
4880
4880
|
function O(D) {
|
|
4881
|
-
!f || !
|
|
4881
|
+
!f || !s.value && !M.value || I.value && F(D);
|
|
4882
4882
|
}
|
|
4883
4883
|
return t({
|
|
4884
4884
|
handleClick: F,
|
|
@@ -4922,10 +4922,10 @@ const _c = ["data-id", "data-handleid", "data-nodeid", "data-handlepos"], wc = {
|
|
|
4922
4922
|
isValidSourcePos: r,
|
|
4923
4923
|
data: l
|
|
4924
4924
|
}) {
|
|
4925
|
-
const
|
|
4925
|
+
const s = l.label ?? n;
|
|
4926
4926
|
return [
|
|
4927
4927
|
pe(_t, { type: "target", position: t, connectable: o, isValidConnection: i }),
|
|
4928
|
-
typeof
|
|
4928
|
+
typeof s != "string" && s ? pe(s) : pe(Te, [s]),
|
|
4929
4929
|
pe(_t, { type: "source", position: e, connectable: o, isValidConnection: r })
|
|
4930
4930
|
];
|
|
4931
4931
|
};
|
|
@@ -5013,7 +5013,7 @@ const xc = Sn, Sc = ["transform"], Nc = ["width", "height", "x", "y", "rx", "ry"
|
|
|
5013
5013
|
}), [
|
|
5014
5014
|
qe(r.$slots, "default", {}, () => [
|
|
5015
5015
|
typeof r.label != "string" ? (oe(), Re(Cr(r.label), { key: 0 })) : (oe(), he(Te, { key: 1 }, [
|
|
5016
|
-
|
|
5016
|
+
si(gt(r.label), 1)
|
|
5017
5017
|
], 64))
|
|
5018
5018
|
])
|
|
5019
5019
|
], 16, Cc)
|
|
@@ -5046,7 +5046,7 @@ const xc = Sn, Sc = ["transform"], Nc = ["width", "height", "x", "y", "rx", "ry"
|
|
|
5046
5046
|
pathEl: n,
|
|
5047
5047
|
interactionEl: o,
|
|
5048
5048
|
labelEl: i
|
|
5049
|
-
}), (l,
|
|
5049
|
+
}), (l, s) => (oe(), he(Te, null, [
|
|
5050
5050
|
_e("path", en(J(r), {
|
|
5051
5051
|
id: l.id,
|
|
5052
5052
|
ref_key: "pathEl",
|
|
@@ -5088,8 +5088,8 @@ function dr({
|
|
|
5088
5088
|
targetX: n,
|
|
5089
5089
|
targetY: o
|
|
5090
5090
|
}) {
|
|
5091
|
-
const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, l = Math.abs(o - t) / 2,
|
|
5092
|
-
return [r,
|
|
5091
|
+
const i = Math.abs(n - e) / 2, r = n < e ? n + i : n - i, l = Math.abs(o - t) / 2, s = o < t ? o + l : o - l;
|
|
5092
|
+
return [r, s, i, l];
|
|
5093
5093
|
}
|
|
5094
5094
|
function fr({
|
|
5095
5095
|
sourceX: e,
|
|
@@ -5099,31 +5099,31 @@ function fr({
|
|
|
5099
5099
|
sourceControlX: i,
|
|
5100
5100
|
sourceControlY: r,
|
|
5101
5101
|
targetControlX: l,
|
|
5102
|
-
targetControlY:
|
|
5102
|
+
targetControlY: s
|
|
5103
5103
|
}) {
|
|
5104
|
-
const
|
|
5105
|
-
return [
|
|
5104
|
+
const a = e * 0.125 + i * 0.375 + l * 0.375 + n * 0.125, u = t * 0.125 + r * 0.375 + s * 0.375 + o * 0.125, c = Math.abs(a - e), d = Math.abs(u - t);
|
|
5105
|
+
return [a, u, c, d];
|
|
5106
5106
|
}
|
|
5107
5107
|
function Zt(e, t) {
|
|
5108
5108
|
return e >= 0 ? 0.5 * e : t * 25 * Math.sqrt(-e);
|
|
5109
5109
|
}
|
|
5110
5110
|
function jo({ pos: e, x1: t, y1: n, x2: o, y2: i, c: r }) {
|
|
5111
|
-
let l,
|
|
5111
|
+
let l, s;
|
|
5112
5112
|
switch (e) {
|
|
5113
5113
|
case R.Left:
|
|
5114
|
-
l = t - Zt(t - o, r),
|
|
5114
|
+
l = t - Zt(t - o, r), s = n;
|
|
5115
5115
|
break;
|
|
5116
5116
|
case R.Right:
|
|
5117
|
-
l = t + Zt(o - t, r),
|
|
5117
|
+
l = t + Zt(o - t, r), s = n;
|
|
5118
5118
|
break;
|
|
5119
5119
|
case R.Top:
|
|
5120
|
-
l = t,
|
|
5120
|
+
l = t, s = n - Zt(n - i, r);
|
|
5121
5121
|
break;
|
|
5122
5122
|
case R.Bottom:
|
|
5123
|
-
l = t,
|
|
5123
|
+
l = t, s = n + Zt(i - n, r);
|
|
5124
5124
|
break;
|
|
5125
5125
|
}
|
|
5126
|
-
return [l,
|
|
5126
|
+
return [l, s];
|
|
5127
5127
|
}
|
|
5128
5128
|
function go(e) {
|
|
5129
5129
|
const {
|
|
@@ -5133,36 +5133,36 @@ function go(e) {
|
|
|
5133
5133
|
targetX: i,
|
|
5134
5134
|
targetY: r,
|
|
5135
5135
|
targetPosition: l = R.Top,
|
|
5136
|
-
curvature:
|
|
5137
|
-
} = e, [
|
|
5136
|
+
curvature: s = 0.25
|
|
5137
|
+
} = e, [a, u] = jo({
|
|
5138
5138
|
pos: o,
|
|
5139
5139
|
x1: t,
|
|
5140
5140
|
y1: n,
|
|
5141
5141
|
x2: i,
|
|
5142
5142
|
y2: r,
|
|
5143
|
-
c:
|
|
5143
|
+
c: s
|
|
5144
5144
|
}), [c, d] = jo({
|
|
5145
5145
|
pos: l,
|
|
5146
5146
|
x1: i,
|
|
5147
5147
|
y1: r,
|
|
5148
5148
|
x2: t,
|
|
5149
5149
|
y2: n,
|
|
5150
|
-
c:
|
|
5151
|
-
}), [h, f,
|
|
5150
|
+
c: s
|
|
5151
|
+
}), [h, f, E, b] = fr({
|
|
5152
5152
|
sourceX: t,
|
|
5153
5153
|
sourceY: n,
|
|
5154
5154
|
targetX: i,
|
|
5155
5155
|
targetY: r,
|
|
5156
|
-
sourceControlX:
|
|
5156
|
+
sourceControlX: a,
|
|
5157
5157
|
sourceControlY: u,
|
|
5158
5158
|
targetControlX: c,
|
|
5159
5159
|
targetControlY: d
|
|
5160
5160
|
});
|
|
5161
5161
|
return [
|
|
5162
|
-
`M${t},${n} C${
|
|
5162
|
+
`M${t},${n} C${a},${u} ${c},${d} ${i},${r}`,
|
|
5163
5163
|
h,
|
|
5164
5164
|
f,
|
|
5165
|
-
|
|
5165
|
+
E,
|
|
5166
5166
|
b
|
|
5167
5167
|
];
|
|
5168
5168
|
}
|
|
@@ -5188,7 +5188,7 @@ function hr(e) {
|
|
|
5188
5188
|
targetX: i,
|
|
5189
5189
|
targetY: r,
|
|
5190
5190
|
targetPosition: l = R.Top
|
|
5191
|
-
} = e, [
|
|
5191
|
+
} = e, [s, a] = ei({
|
|
5192
5192
|
pos: o,
|
|
5193
5193
|
x1: t,
|
|
5194
5194
|
y1: n,
|
|
@@ -5200,22 +5200,22 @@ function hr(e) {
|
|
|
5200
5200
|
y1: r,
|
|
5201
5201
|
x2: t,
|
|
5202
5202
|
y2: n
|
|
5203
|
-
}), [d, h, f,
|
|
5203
|
+
}), [d, h, f, E] = fr({
|
|
5204
5204
|
sourceX: t,
|
|
5205
5205
|
sourceY: n,
|
|
5206
5206
|
targetX: i,
|
|
5207
5207
|
targetY: r,
|
|
5208
|
-
sourceControlX:
|
|
5209
|
-
sourceControlY:
|
|
5208
|
+
sourceControlX: s,
|
|
5209
|
+
sourceControlY: a,
|
|
5210
5210
|
targetControlX: u,
|
|
5211
5211
|
targetControlY: c
|
|
5212
5212
|
});
|
|
5213
5213
|
return [
|
|
5214
|
-
`M${t},${n} C${
|
|
5214
|
+
`M${t},${n} C${s},${a} ${u},${c} ${i},${r}`,
|
|
5215
5215
|
d,
|
|
5216
5216
|
h,
|
|
5217
5217
|
f,
|
|
5218
|
-
|
|
5218
|
+
E
|
|
5219
5219
|
];
|
|
5220
5220
|
}
|
|
5221
5221
|
const ti = {
|
|
@@ -5242,51 +5242,51 @@ function Dc({
|
|
|
5242
5242
|
center: i,
|
|
5243
5243
|
offset: r
|
|
5244
5244
|
}) {
|
|
5245
|
-
const l = ti[t],
|
|
5246
|
-
source:
|
|
5245
|
+
const l = ti[t], s = ti[o], a = { x: e.x + l.x * r, y: e.y + l.y * r }, u = { x: n.x + s.x * r, y: n.y + s.y * r }, c = Tc({
|
|
5246
|
+
source: a,
|
|
5247
5247
|
sourcePosition: t,
|
|
5248
5248
|
target: u
|
|
5249
5249
|
}), d = c.x !== 0 ? "x" : "y", h = c[d];
|
|
5250
|
-
let f,
|
|
5250
|
+
let f, E, b;
|
|
5251
5251
|
const S = { x: 0, y: 0 }, C = { x: 0, y: 0 }, [M, _, N, z] = dr({
|
|
5252
5252
|
sourceX: e.x,
|
|
5253
5253
|
sourceY: e.y,
|
|
5254
5254
|
targetX: n.x,
|
|
5255
5255
|
targetY: n.y
|
|
5256
5256
|
});
|
|
5257
|
-
if (l[d] *
|
|
5258
|
-
|
|
5257
|
+
if (l[d] * s[d] === -1) {
|
|
5258
|
+
E = i.x ?? M, b = i.y ?? _;
|
|
5259
5259
|
const F = [
|
|
5260
|
-
{ x, y:
|
|
5261
|
-
{ x, y: u.y }
|
|
5260
|
+
{ x: E, y: a.y },
|
|
5261
|
+
{ x: E, y: u.y }
|
|
5262
5262
|
], I = [
|
|
5263
|
-
{ x:
|
|
5263
|
+
{ x: a.x, y: b },
|
|
5264
5264
|
{ x: u.x, y: b }
|
|
5265
5265
|
];
|
|
5266
5266
|
l[d] === h ? f = d === "x" ? F : I : f = d === "x" ? I : F;
|
|
5267
5267
|
} else {
|
|
5268
|
-
const F = [{ x:
|
|
5268
|
+
const F = [{ x: a.x, y: u.y }], I = [{ x: u.x, y: a.y }];
|
|
5269
5269
|
if (d === "x" ? f = l.x === h ? I : F : f = l.y === h ? F : I, t === o) {
|
|
5270
5270
|
const Z = Math.abs(e[d] - n[d]);
|
|
5271
5271
|
if (Z <= r) {
|
|
5272
5272
|
const y = Math.min(r - 1, r - Z);
|
|
5273
|
-
l[d] === h ? S[d] = (
|
|
5273
|
+
l[d] === h ? S[d] = (a[d] > e[d] ? -1 : 1) * y : C[d] = (u[d] > n[d] ? -1 : 1) * y;
|
|
5274
5274
|
}
|
|
5275
5275
|
}
|
|
5276
5276
|
if (t !== o) {
|
|
5277
|
-
const Z = d === "x" ? "y" : "x", y = l[d] ===
|
|
5278
|
-
(l[d] === 1 && (!y && P || y &&
|
|
5277
|
+
const Z = d === "x" ? "y" : "x", y = l[d] === s[Z], P = a[Z] > u[Z], x = a[Z] < u[Z];
|
|
5278
|
+
(l[d] === 1 && (!y && P || y && x) || l[d] !== 1 && (!y && x || y && P)) && (f = d === "x" ? F : I);
|
|
5279
5279
|
}
|
|
5280
|
-
const T = { x:
|
|
5281
|
-
D >= w ? (
|
|
5280
|
+
const T = { x: a.x + S.x, y: a.y + S.y }, O = { x: u.x + C.x, y: u.y + C.y }, D = Math.max(Math.abs(T.x - f[0].x), Math.abs(O.x - f[0].x)), w = Math.max(Math.abs(T.y - f[0].y), Math.abs(O.y - f[0].y));
|
|
5281
|
+
D >= w ? (E = (T.x + O.x) / 2, b = f[0].y) : (E = f[0].x, b = (T.y + O.y) / 2);
|
|
5282
5282
|
}
|
|
5283
5283
|
return [[
|
|
5284
5284
|
e,
|
|
5285
|
-
{ x:
|
|
5285
|
+
{ x: a.x + S.x, y: a.y + S.y },
|
|
5286
5286
|
...f,
|
|
5287
5287
|
{ x: u.x + C.x, y: u.y + C.y },
|
|
5288
5288
|
n
|
|
5289
|
-
],
|
|
5289
|
+
], E, b, N, z];
|
|
5290
5290
|
}
|
|
5291
5291
|
function Ac(e, t, n, o) {
|
|
5292
5292
|
const i = Math.min(ni(e, t) / 2, ni(t, n) / 2, o), { x: r, y: l } = t;
|
|
@@ -5296,8 +5296,8 @@ function Ac(e, t, n, o) {
|
|
|
5296
5296
|
const u = e.x < n.x ? -1 : 1, c = e.y < n.y ? 1 : -1;
|
|
5297
5297
|
return `L ${r + i * u},${l}Q ${r},${l} ${r},${l + i * c}`;
|
|
5298
5298
|
}
|
|
5299
|
-
const
|
|
5300
|
-
return `L ${r},${l + i *
|
|
5299
|
+
const s = e.x < n.x ? 1 : -1, a = e.y < n.y ? -1 : 1;
|
|
5300
|
+
return `L ${r},${l + i * a}Q ${r},${l} ${r + i * s},${l}`;
|
|
5301
5301
|
}
|
|
5302
5302
|
function jn(e) {
|
|
5303
5303
|
const {
|
|
@@ -5307,31 +5307,31 @@ function jn(e) {
|
|
|
5307
5307
|
targetX: i,
|
|
5308
5308
|
targetY: r,
|
|
5309
5309
|
targetPosition: l = R.Top,
|
|
5310
|
-
borderRadius:
|
|
5311
|
-
centerX:
|
|
5310
|
+
borderRadius: s = 5,
|
|
5311
|
+
centerX: a,
|
|
5312
5312
|
centerY: u,
|
|
5313
5313
|
offset: c = 20
|
|
5314
|
-
} = e, [d, h, f,
|
|
5314
|
+
} = e, [d, h, f, E, b] = Dc({
|
|
5315
5315
|
source: { x: t, y: n },
|
|
5316
5316
|
sourcePosition: o,
|
|
5317
5317
|
target: { x: i, y: r },
|
|
5318
5318
|
targetPosition: l,
|
|
5319
|
-
center: { x:
|
|
5319
|
+
center: { x: a, y: u },
|
|
5320
5320
|
offset: c
|
|
5321
5321
|
});
|
|
5322
5322
|
return [d.reduce((C, M, _) => {
|
|
5323
5323
|
let N;
|
|
5324
|
-
return _ > 0 && _ < d.length - 1 ? N = Ac(d[_ - 1], M, d[_ + 1],
|
|
5325
|
-
}, ""), h, f,
|
|
5324
|
+
return _ > 0 && _ < d.length - 1 ? N = Ac(d[_ - 1], M, d[_ + 1], s) : N = `${_ === 0 ? "M" : "L"}${M.x} ${M.y}`, C += N, C;
|
|
5325
|
+
}, ""), h, f, E, b];
|
|
5326
5326
|
}
|
|
5327
5327
|
function Oc(e) {
|
|
5328
|
-
const { sourceX: t, sourceY: n, targetX: o, targetY: i } = e, [r, l,
|
|
5328
|
+
const { sourceX: t, sourceY: n, targetX: o, targetY: i } = e, [r, l, s, a] = dr({
|
|
5329
5329
|
sourceX: t,
|
|
5330
5330
|
sourceY: n,
|
|
5331
5331
|
targetX: o,
|
|
5332
5332
|
targetY: i
|
|
5333
5333
|
});
|
|
5334
|
-
return [`M ${t},${n}L ${o},${i}`, r, l,
|
|
5334
|
+
return [`M ${t},${n}L ${o},${i}`, r, l, s, a];
|
|
5335
5335
|
}
|
|
5336
5336
|
const zc = me({
|
|
5337
5337
|
name: "StraightEdge",
|
|
@@ -5524,7 +5524,7 @@ function Zc(e, t, n) {
|
|
|
5524
5524
|
for (const C of e.nodes)
|
|
5525
5525
|
C.type && !S.includes(C.type) && (b[C.type] = C.type);
|
|
5526
5526
|
return b;
|
|
5527
|
-
}),
|
|
5527
|
+
}), s = ne(() => e.onlyRenderVisibleElements ? Ji(
|
|
5528
5528
|
e.nodes,
|
|
5529
5529
|
{
|
|
5530
5530
|
x: 0,
|
|
@@ -5534,7 +5534,7 @@ function Zc(e, t, n) {
|
|
|
5534
5534
|
},
|
|
5535
5535
|
e.viewport,
|
|
5536
5536
|
!0
|
|
5537
|
-
) : e.nodes),
|
|
5537
|
+
) : e.nodes), a = ne(() => {
|
|
5538
5538
|
if (e.onlyRenderVisibleElements) {
|
|
5539
5539
|
const b = [];
|
|
5540
5540
|
for (const S of e.edges) {
|
|
@@ -5554,7 +5554,7 @@ function Zc(e, t, n) {
|
|
|
5554
5554
|
return b;
|
|
5555
5555
|
}
|
|
5556
5556
|
return e.edges;
|
|
5557
|
-
}), u = ne(() => [...
|
|
5557
|
+
}), u = ne(() => [...s.value, ...a.value]), c = ne(() => {
|
|
5558
5558
|
const b = [];
|
|
5559
5559
|
for (const S of e.nodes)
|
|
5560
5560
|
S.selected && b.push(S);
|
|
@@ -5572,8 +5572,8 @@ function Zc(e, t, n) {
|
|
|
5572
5572
|
for (const S of e.nodes)
|
|
5573
5573
|
S.dimensions.width && S.dimensions.height && S.handleBounds !== void 0 && b.push(S);
|
|
5574
5574
|
return b;
|
|
5575
|
-
}),
|
|
5576
|
-
() =>
|
|
5575
|
+
}), E = ne(
|
|
5576
|
+
() => s.value.length > 0 && f.value.length === s.value.length
|
|
5577
5577
|
);
|
|
5578
5578
|
return {
|
|
5579
5579
|
getNode: o,
|
|
@@ -5581,13 +5581,13 @@ function Zc(e, t, n) {
|
|
|
5581
5581
|
getElements: u,
|
|
5582
5582
|
getEdgeTypes: r,
|
|
5583
5583
|
getNodeTypes: l,
|
|
5584
|
-
getEdges:
|
|
5585
|
-
getNodes:
|
|
5584
|
+
getEdges: a,
|
|
5585
|
+
getNodes: s,
|
|
5586
5586
|
getSelectedElements: h,
|
|
5587
5587
|
getSelectedNodes: c,
|
|
5588
5588
|
getSelectedEdges: d,
|
|
5589
5589
|
getNodesInitialized: f,
|
|
5590
|
-
areNodesInitialized:
|
|
5590
|
+
areNodesInitialized: E
|
|
5591
5591
|
};
|
|
5592
5592
|
}
|
|
5593
5593
|
class et {
|
|
@@ -5611,31 +5611,31 @@ class et {
|
|
|
5611
5611
|
create(t, n) {
|
|
5612
5612
|
const o = cr(), i = xr(o), r = {};
|
|
5613
5613
|
for (const [h, f] of Object.entries(i.hooks)) {
|
|
5614
|
-
const
|
|
5615
|
-
r[
|
|
5614
|
+
const E = `on${h.charAt(0).toUpperCase() + h.slice(1)}`;
|
|
5615
|
+
r[E] = f.on;
|
|
5616
5616
|
}
|
|
5617
5617
|
const l = {};
|
|
5618
5618
|
for (const [h, f] of Object.entries(i.hooks))
|
|
5619
5619
|
l[h] = f.trigger;
|
|
5620
|
-
const
|
|
5620
|
+
const s = ne(() => {
|
|
5621
5621
|
const h = /* @__PURE__ */ new Map();
|
|
5622
5622
|
for (const f of i.nodes)
|
|
5623
5623
|
h.set(f.id, f);
|
|
5624
5624
|
return h;
|
|
5625
|
-
}),
|
|
5625
|
+
}), a = ne(() => {
|
|
5626
5626
|
const h = /* @__PURE__ */ new Map();
|
|
5627
5627
|
for (const f of i.edges)
|
|
5628
5628
|
h.set(f.id, f);
|
|
5629
5629
|
return h;
|
|
5630
|
-
}), u = Zc(i,
|
|
5630
|
+
}), u = Zc(i, s, a), c = yc(i, s, a);
|
|
5631
5631
|
c.setState({ ...i, ...n });
|
|
5632
5632
|
const d = {
|
|
5633
5633
|
...r,
|
|
5634
5634
|
...u,
|
|
5635
5635
|
...c,
|
|
5636
5636
|
...Hr(i),
|
|
5637
|
-
nodeLookup:
|
|
5638
|
-
edgeLookup:
|
|
5637
|
+
nodeLookup: s,
|
|
5638
|
+
edgeLookup: a,
|
|
5639
5639
|
emits: l,
|
|
5640
5640
|
id: t,
|
|
5641
5641
|
vueFlowVersion: "1.45.0",
|
|
@@ -5651,41 +5651,41 @@ class et {
|
|
|
5651
5651
|
}
|
|
5652
5652
|
function we(e) {
|
|
5653
5653
|
const t = et.getInstance(), n = ii(), o = typeof e == "object", i = o ? e : { id: e }, r = i.id, l = r ?? (n == null ? void 0 : n.vueFlowId);
|
|
5654
|
-
let
|
|
5654
|
+
let s;
|
|
5655
5655
|
if (n) {
|
|
5656
|
-
const
|
|
5657
|
-
typeof
|
|
5656
|
+
const a = wt(Qo, null);
|
|
5657
|
+
typeof a < "u" && a !== null && (!l || a.id === l) && (s = a);
|
|
5658
5658
|
}
|
|
5659
|
-
if (
|
|
5660
|
-
const
|
|
5661
|
-
|
|
5659
|
+
if (s || l && (s = t.get(l)), !s || l && s.id !== l) {
|
|
5660
|
+
const a = r ?? t.getId(), u = t.create(a, i);
|
|
5661
|
+
s = u, (n ?? ri(!0)).run(() => {
|
|
5662
5662
|
ve(
|
|
5663
5663
|
u.applyDefault,
|
|
5664
5664
|
(d, h, f) => {
|
|
5665
|
-
const
|
|
5665
|
+
const E = (S) => {
|
|
5666
5666
|
u.applyNodeChanges(S);
|
|
5667
5667
|
}, b = (S) => {
|
|
5668
5668
|
u.applyEdgeChanges(S);
|
|
5669
5669
|
};
|
|
5670
|
-
d ? (u.onNodesChange(
|
|
5671
|
-
u.hooks.value.nodesChange.off(
|
|
5670
|
+
d ? (u.onNodesChange(E), u.onEdgesChange(b)) : (u.hooks.value.nodesChange.off(E), u.hooks.value.edgesChange.off(b)), f(() => {
|
|
5671
|
+
u.hooks.value.nodesChange.off(E), u.hooks.value.edgesChange.off(b);
|
|
5672
5672
|
});
|
|
5673
5673
|
},
|
|
5674
5674
|
{ immediate: !0 }
|
|
5675
5675
|
), hn(() => {
|
|
5676
|
-
if (
|
|
5677
|
-
const d = t.get(
|
|
5678
|
-
d ? d.$destroy() : wn(`No store instance found for id ${
|
|
5676
|
+
if (s) {
|
|
5677
|
+
const d = t.get(s.id);
|
|
5678
|
+
d ? d.$destroy() : wn(`No store instance found for id ${s.id} in storage.`);
|
|
5679
5679
|
}
|
|
5680
5680
|
});
|
|
5681
5681
|
});
|
|
5682
5682
|
} else
|
|
5683
|
-
o &&
|
|
5684
|
-
if (n && (ft(Qo,
|
|
5685
|
-
const
|
|
5686
|
-
(
|
|
5683
|
+
o && s.setState(i);
|
|
5684
|
+
if (n && (ft(Qo, s), n.vueFlowId = s.id), o) {
|
|
5685
|
+
const a = Bt();
|
|
5686
|
+
(a == null ? void 0 : a.type.name) !== "VueFlow" && s.emits.error(new Se(xe.USEVUEFLOW_OPTIONS));
|
|
5687
5687
|
}
|
|
5688
|
-
return
|
|
5688
|
+
return s;
|
|
5689
5689
|
}
|
|
5690
5690
|
function Wc(e) {
|
|
5691
5691
|
const { emits: t, dimensions: n } = we();
|
|
@@ -5726,21 +5726,21 @@ const Kc = {
|
|
|
5726
5726
|
}, jc = /* @__PURE__ */ me({
|
|
5727
5727
|
...Qc,
|
|
5728
5728
|
setup(e) {
|
|
5729
|
-
const { emits: t, viewport: n, getSelectedNodes: o, noPanClassName: i, disableKeyboardA11y: r, userSelectionActive: l } = we(),
|
|
5730
|
-
el:
|
|
5731
|
-
onStart(
|
|
5732
|
-
t.selectionDragStart(
|
|
5729
|
+
const { emits: t, viewport: n, getSelectedNodes: o, noPanClassName: i, disableKeyboardA11y: r, userSelectionActive: l } = we(), s = ur(), a = ge(null), u = lr({
|
|
5730
|
+
el: a,
|
|
5731
|
+
onStart(E) {
|
|
5732
|
+
t.selectionDragStart(E);
|
|
5733
5733
|
},
|
|
5734
|
-
onDrag(
|
|
5735
|
-
t.selectionDrag(
|
|
5734
|
+
onDrag(E) {
|
|
5735
|
+
t.selectionDrag(E);
|
|
5736
5736
|
},
|
|
5737
|
-
onStop(
|
|
5738
|
-
t.selectionDragStop(
|
|
5737
|
+
onStop(E) {
|
|
5738
|
+
t.selectionDragStop(E);
|
|
5739
5739
|
}
|
|
5740
5740
|
});
|
|
5741
5741
|
Ue(() => {
|
|
5742
|
-
var
|
|
5743
|
-
r.value || (
|
|
5742
|
+
var E;
|
|
5743
|
+
r.value || (E = a.value) == null || E.focus({ preventScroll: !0 });
|
|
5744
5744
|
});
|
|
5745
5745
|
const c = ne(() => qi(o.value)), d = ne(() => ({
|
|
5746
5746
|
width: `${c.value.width}px`,
|
|
@@ -5748,26 +5748,26 @@ const Kc = {
|
|
|
5748
5748
|
top: `${c.value.y}px`,
|
|
5749
5749
|
left: `${c.value.x}px`
|
|
5750
5750
|
}));
|
|
5751
|
-
function h(
|
|
5752
|
-
t.selectionContextMenu({ event:
|
|
5751
|
+
function h(E) {
|
|
5752
|
+
t.selectionContextMenu({ event: E, nodes: o.value });
|
|
5753
5753
|
}
|
|
5754
|
-
function f(
|
|
5755
|
-
r || ct[
|
|
5754
|
+
function f(E) {
|
|
5755
|
+
r || ct[E.key] && (E.preventDefault(), s(
|
|
5756
5756
|
{
|
|
5757
|
-
x: ct[
|
|
5758
|
-
y: ct[
|
|
5757
|
+
x: ct[E.key].x,
|
|
5758
|
+
y: ct[E.key].y
|
|
5759
5759
|
},
|
|
5760
|
-
|
|
5760
|
+
E.shiftKey
|
|
5761
5761
|
));
|
|
5762
5762
|
}
|
|
5763
|
-
return (
|
|
5763
|
+
return (E, b) => !J(l) && c.value.width && c.value.height ? (oe(), he("div", {
|
|
5764
5764
|
key: 0,
|
|
5765
5765
|
class: dt(["vue-flow__nodesselection vue-flow__container", J(i)]),
|
|
5766
5766
|
style: He({ transform: `translate(${J(n).x}px,${J(n).y}px) scale(${J(n).zoom})` })
|
|
5767
5767
|
}, [
|
|
5768
5768
|
_e("div", {
|
|
5769
5769
|
ref_key: "el",
|
|
5770
|
-
ref:
|
|
5770
|
+
ref: a,
|
|
5771
5771
|
class: dt([{ dragging: J(u) }, "vue-flow__nodesselection-rect"]),
|
|
5772
5772
|
style: He(d.value),
|
|
5773
5773
|
tabIndex: J(r) ? void 0 : -1,
|
|
@@ -5800,14 +5800,14 @@ const td = {
|
|
|
5800
5800
|
emits: i,
|
|
5801
5801
|
userSelectionActive: r,
|
|
5802
5802
|
removeSelectedElements: l,
|
|
5803
|
-
userSelectionRect:
|
|
5804
|
-
elementsSelectable:
|
|
5803
|
+
userSelectionRect: s,
|
|
5804
|
+
elementsSelectable: a,
|
|
5805
5805
|
nodesSelectionActive: u,
|
|
5806
5806
|
getSelectedEdges: c,
|
|
5807
5807
|
getSelectedNodes: d,
|
|
5808
5808
|
removeNodes: h,
|
|
5809
5809
|
removeEdges: f,
|
|
5810
|
-
selectionMode:
|
|
5810
|
+
selectionMode: E,
|
|
5811
5811
|
deleteKeyCode: b,
|
|
5812
5812
|
multiSelectionKeyCode: S,
|
|
5813
5813
|
multiSelectionActive: C,
|
|
@@ -5816,12 +5816,12 @@ const td = {
|
|
|
5816
5816
|
connectionLookup: N,
|
|
5817
5817
|
defaultEdgeOptions: z,
|
|
5818
5818
|
connectionStartHandle: Y
|
|
5819
|
-
} = we(), F = ge(null), I = ge(/* @__PURE__ */ new Set()), T = ge(/* @__PURE__ */ new Set()), O = ge(), D = be(() =>
|
|
5819
|
+
} = we(), F = ge(null), I = ge(/* @__PURE__ */ new Set()), T = ge(/* @__PURE__ */ new Set()), O = ge(), D = be(() => a.value && (e.isSelecting || r.value)), w = be(() => Y.value !== null);
|
|
5820
5820
|
let Z = !1, y = !1;
|
|
5821
|
-
const P = Pt(b, { actInsideInputWithModifier: !1 }),
|
|
5821
|
+
const P = Pt(b, { actInsideInputWithModifier: !1 }), x = Pt(S);
|
|
5822
5822
|
ve(P, (H) => {
|
|
5823
5823
|
H && (h(d.value), f(c.value), u.value = !1);
|
|
5824
|
-
}), ve(
|
|
5824
|
+
}), ve(x, (H) => {
|
|
5825
5825
|
C.value = H;
|
|
5826
5826
|
});
|
|
5827
5827
|
function $(H, G) {
|
|
@@ -5843,12 +5843,12 @@ const td = {
|
|
|
5843
5843
|
i.paneScroll(H);
|
|
5844
5844
|
}
|
|
5845
5845
|
function W(H) {
|
|
5846
|
-
var G, q,
|
|
5847
|
-
if (O.value = (G = t.value) == null ? void 0 : G.getBoundingClientRect(), !
|
|
5846
|
+
var G, q, ae;
|
|
5847
|
+
if (O.value = (G = t.value) == null ? void 0 : G.getBoundingClientRect(), !a.value || !e.isSelecting || H.button !== 0 || H.target !== F.value || !O.value)
|
|
5848
5848
|
return;
|
|
5849
|
-
(
|
|
5849
|
+
(ae = (q = H.target) == null ? void 0 : q.setPointerCapture) == null || ae.call(q, H.pointerId);
|
|
5850
5850
|
const { x: ue, y: te } = ed(H, O.value);
|
|
5851
|
-
y = !0, Z = !1, l(),
|
|
5851
|
+
y = !0, Z = !1, l(), s.value = {
|
|
5852
5852
|
width: 0,
|
|
5853
5853
|
height: 0,
|
|
5854
5854
|
startX: ue,
|
|
@@ -5859,19 +5859,19 @@ const td = {
|
|
|
5859
5859
|
}
|
|
5860
5860
|
function j(H) {
|
|
5861
5861
|
var G;
|
|
5862
|
-
if (!O.value || !
|
|
5862
|
+
if (!O.value || !s.value)
|
|
5863
5863
|
return;
|
|
5864
5864
|
Z = !0;
|
|
5865
|
-
const { x: q, y:
|
|
5865
|
+
const { x: q, y: ae } = Be(H, O.value), { startX: ue = 0, startY: te = 0 } = s.value, fe = {
|
|
5866
5866
|
startX: ue,
|
|
5867
5867
|
startY: te,
|
|
5868
5868
|
x: q < ue ? q : ue,
|
|
5869
|
-
y:
|
|
5869
|
+
y: ae < te ? ae : te,
|
|
5870
5870
|
width: Math.abs(q - ue),
|
|
5871
|
-
height: Math.abs(
|
|
5871
|
+
height: Math.abs(ae - te)
|
|
5872
5872
|
}, Q = I.value, ie = T.value;
|
|
5873
5873
|
I.value = new Set(
|
|
5874
|
-
Ji(n.value, fe, o.value,
|
|
5874
|
+
Ji(n.value, fe, o.value, E.value === co.Partial, !0).map(
|
|
5875
5875
|
(v) => v.id
|
|
5876
5876
|
)
|
|
5877
5877
|
), T.value = /* @__PURE__ */ new Set();
|
|
@@ -5892,11 +5892,11 @@ const td = {
|
|
|
5892
5892
|
const v = Ke(M.value, T.value);
|
|
5893
5893
|
i.edgesChange(v);
|
|
5894
5894
|
}
|
|
5895
|
-
|
|
5895
|
+
s.value = fe, r.value = !0, u.value = !1;
|
|
5896
5896
|
}
|
|
5897
5897
|
function re(H) {
|
|
5898
5898
|
var G;
|
|
5899
|
-
H.button !== 0 || !y || ((G = H.target) == null || G.releasePointerCapture(H.pointerId), !r.value &&
|
|
5899
|
+
H.button !== 0 || !y || ((G = H.target) == null || G.releasePointerCapture(H.pointerId), !r.value && s.value && H.target === F.value && A(H), r.value = !1, s.value = null, u.value = I.value.size > 0, i.selectionEnd(H), e.selectionKeyPressed && (Z = !1), y = !1);
|
|
5900
5900
|
}
|
|
5901
5901
|
return (H, G) => (oe(), he("div", {
|
|
5902
5902
|
ref_key: "container",
|
|
@@ -5912,9 +5912,9 @@ const td = {
|
|
|
5912
5912
|
onPointerleave: G[7] || (G[7] = (q) => J(i).paneMouseLeave(q))
|
|
5913
5913
|
}, [
|
|
5914
5914
|
qe(H.$slots, "default"),
|
|
5915
|
-
J(r) && J(
|
|
5915
|
+
J(r) && J(s) ? (oe(), Re(qc, {
|
|
5916
5916
|
key: 0,
|
|
5917
|
-
"user-selection-rect": J(
|
|
5917
|
+
"user-selection-rect": J(s)
|
|
5918
5918
|
}, null, 8, ["user-selection-rect"])) : Ne("", !0),
|
|
5919
5919
|
J(u) && J(d).length ? (oe(), Re(jc, { key: 1 })) : Ne("", !0)
|
|
5920
5920
|
], 34));
|
|
@@ -5926,7 +5926,7 @@ const td = {
|
|
|
5926
5926
|
...od,
|
|
5927
5927
|
setup(e) {
|
|
5928
5928
|
const { viewport: t, fitViewOnInit: n, fitViewOnInitDone: o } = we(), i = ne(() => n.value ? !o.value : !1), r = ne(() => `translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);
|
|
5929
|
-
return (l,
|
|
5929
|
+
return (l, s) => (oe(), he("div", {
|
|
5930
5930
|
class: "vue-flow__transformationpane vue-flow__container",
|
|
5931
5931
|
style: He({ transform: r.value, opacity: i.value ? 0 : void 0 })
|
|
5932
5932
|
}, [
|
|
@@ -5946,14 +5946,14 @@ const td = {
|
|
|
5946
5946
|
translateExtent: i,
|
|
5947
5947
|
zoomActivationKeyCode: r,
|
|
5948
5948
|
selectionKeyCode: l,
|
|
5949
|
-
panActivationKeyCode:
|
|
5950
|
-
panOnScroll:
|
|
5949
|
+
panActivationKeyCode: s,
|
|
5950
|
+
panOnScroll: a,
|
|
5951
5951
|
panOnScrollMode: u,
|
|
5952
5952
|
panOnScrollSpeed: c,
|
|
5953
5953
|
panOnDrag: d,
|
|
5954
5954
|
zoomOnDoubleClick: h,
|
|
5955
5955
|
zoomOnPinch: f,
|
|
5956
|
-
zoomOnScroll:
|
|
5956
|
+
zoomOnScroll: E,
|
|
5957
5957
|
preventScrolling: b,
|
|
5958
5958
|
noWheelClassName: S,
|
|
5959
5959
|
noPanClassName: C,
|
|
@@ -5970,14 +5970,14 @@ const td = {
|
|
|
5970
5970
|
} = we();
|
|
5971
5971
|
Wc(O);
|
|
5972
5972
|
const w = tn(!1), Z = tn(!1);
|
|
5973
|
-
let y = null, P = !1,
|
|
5973
|
+
let y = null, P = !1, x = 0, $ = {
|
|
5974
5974
|
x: 0,
|
|
5975
5975
|
y: 0,
|
|
5976
5976
|
zoom: 0
|
|
5977
5977
|
};
|
|
5978
|
-
const A = Pt(
|
|
5978
|
+
const A = Pt(s), V = Pt(l), B = Pt(r), W = be(
|
|
5979
5979
|
() => (!V.value || V.value && l.value === !0) && (A.value || d.value)
|
|
5980
|
-
), j = be(() => A.value ||
|
|
5980
|
+
), j = be(() => A.value || a.value), re = be(() => V.value || l.value === !0 && W.value !== !0);
|
|
5981
5981
|
Ue(() => {
|
|
5982
5982
|
if (!O.value) {
|
|
5983
5983
|
wn("Viewport element is missing");
|
|
@@ -5991,19 +5991,19 @@ const td = {
|
|
|
5991
5991
|
var k;
|
|
5992
5992
|
if (!p.sourceEvent)
|
|
5993
5993
|
return null;
|
|
5994
|
-
|
|
5995
|
-
const K =
|
|
5994
|
+
x = p.sourceEvent.button, w.value = !0;
|
|
5995
|
+
const K = ae(p.transform);
|
|
5996
5996
|
((k = p.sourceEvent) == null ? void 0 : k.type) === "mousedown" && (z.value = !0), $ = K, M.viewportChangeStart(K), M.moveStart({ event: p, flowTransform: K });
|
|
5997
5997
|
}), Q.on("end", (p) => {
|
|
5998
5998
|
if (!p.sourceEvent)
|
|
5999
5999
|
return null;
|
|
6000
|
-
if (w.value = !1, z.value = !1, H(W.value,
|
|
6001
|
-
const k =
|
|
6000
|
+
if (w.value = !1, z.value = !1, H(W.value, x ?? 0) && !P && M.paneContextMenu(p.sourceEvent), P = !1, q($, p.transform)) {
|
|
6001
|
+
const k = ae(p.transform);
|
|
6002
6002
|
$ = k, M.viewportChangeEnd(k), M.moveEnd({ event: p, flowTransform: k });
|
|
6003
6003
|
}
|
|
6004
6004
|
}), Q.filter((p) => {
|
|
6005
6005
|
var k;
|
|
6006
|
-
const K = B.value ||
|
|
6006
|
+
const K = B.value || E.value, X = f.value && p.ctrlKey, U = p.button;
|
|
6007
6007
|
if (U === 1 && p.type === "mousedown" && (ue(p, "vue-flow__node") || ue(p, "vue-flow__edge")))
|
|
6008
6008
|
return !0;
|
|
6009
6009
|
if (!W.value && !K && !j.value && !h.value && !f.value || N.value || !h.value && p.type === "dblclick" || ue(p, S.value) && p.type === "wheel" || ue(p, C.value) && (p.type !== "wheel" || j.value && p.type === "wheel" && !B.value) || !f.value && p.ctrlKey && p.type === "wheel" || !K && !j.value && !X && p.type === "wheel")
|
|
@@ -6019,8 +6019,8 @@ const td = {
|
|
|
6019
6019
|
() => {
|
|
6020
6020
|
N.value && !w.value ? Q.on("zoom", null) : N.value || Q.on("zoom", (p) => {
|
|
6021
6021
|
T.value = { x: p.transform.x, y: p.transform.y, zoom: p.transform.k };
|
|
6022
|
-
const k =
|
|
6023
|
-
P = H(W.value,
|
|
6022
|
+
const k = ae(p.transform);
|
|
6023
|
+
P = H(W.value, x ?? 0), M.viewportChange(k), M.move({ event: p, flowTransform: k });
|
|
6024
6024
|
});
|
|
6025
6025
|
},
|
|
6026
6026
|
{ immediate: !0 }
|
|
@@ -6032,7 +6032,7 @@ const td = {
|
|
|
6032
6032
|
(p) => {
|
|
6033
6033
|
if (ue(p, S.value))
|
|
6034
6034
|
return !1;
|
|
6035
|
-
const k = B.value ||
|
|
6035
|
+
const k = B.value || E.value, K = f.value && p.ctrlKey;
|
|
6036
6036
|
if (!(!b.value || j.value || k || K))
|
|
6037
6037
|
return !1;
|
|
6038
6038
|
p.preventDefault(), p.stopImmediatePropagation();
|
|
@@ -6042,14 +6042,14 @@ const td = {
|
|
|
6042
6042
|
Q.scaleTo(ie, mr, bt, p);
|
|
6043
6043
|
return;
|
|
6044
6044
|
}
|
|
6045
|
-
const
|
|
6046
|
-
let de = u.value === kt.Vertical ? 0 : p.deltaX *
|
|
6045
|
+
const se = p.deltaMode === 1 ? 20 : 1;
|
|
6046
|
+
let de = u.value === kt.Vertical ? 0 : p.deltaX * se, ye = u.value === kt.Horizontal ? 0 : p.deltaY * se;
|
|
6047
6047
|
!ee && p.shiftKey && u.value !== kt.Vertical && !de && ye && (de = ye, ye = 0), Q.translateBy(
|
|
6048
6048
|
ie,
|
|
6049
6049
|
-(de / U) * c.value,
|
|
6050
6050
|
-(ye / U) * c.value
|
|
6051
6051
|
);
|
|
6052
|
-
const Ae =
|
|
6052
|
+
const Ae = ae(ie.property("__zoom"));
|
|
6053
6053
|
y && clearTimeout(y), Z.value ? (M.move({ event: p, flowTransform: Ae }), M.viewportChange(Ae), y = setTimeout(() => {
|
|
6054
6054
|
M.moveEnd({ event: p, flowTransform: Ae }), M.viewportChangeEnd(Ae), Z.value = !1;
|
|
6055
6055
|
}, 150)) : (Z.value = !0, M.moveStart({ event: p, flowTransform: Ae }), M.viewportChangeStart(Ae));
|
|
@@ -6058,8 +6058,8 @@ const td = {
|
|
|
6058
6058
|
) : typeof le < "u" && ie.on(
|
|
6059
6059
|
"wheel.zoom",
|
|
6060
6060
|
function(p, k) {
|
|
6061
|
-
const K = !b.value && p.type === "wheel" && !p.ctrlKey, X = B.value ||
|
|
6062
|
-
if (!X && !
|
|
6061
|
+
const K = !b.value && p.type === "wheel" && !p.ctrlKey, X = B.value || E.value, U = f.value && p.ctrlKey;
|
|
6062
|
+
if (!X && !a.value && !U && p.type === "wheel" || K || ue(p, S.value))
|
|
6063
6063
|
return null;
|
|
6064
6064
|
p.preventDefault(), le.call(this, p, k);
|
|
6065
6065
|
},
|
|
@@ -6079,7 +6079,7 @@ const td = {
|
|
|
6079
6079
|
function q(te, fe) {
|
|
6080
6080
|
return te.x !== fe.x && !Number.isNaN(fe.x) || te.y !== fe.y && !Number.isNaN(fe.y) || te.zoom !== fe.k && !Number.isNaN(fe.k);
|
|
6081
6081
|
}
|
|
6082
|
-
function
|
|
6082
|
+
function ae(te) {
|
|
6083
6083
|
return {
|
|
6084
6084
|
x: te.x,
|
|
6085
6085
|
y: te.y,
|
|
@@ -6115,7 +6115,7 @@ const td = {
|
|
|
6115
6115
|
}, 8, ["is-selecting", "selection-key-pressed", "class"])
|
|
6116
6116
|
], 512));
|
|
6117
6117
|
}
|
|
6118
|
-
}),
|
|
6118
|
+
}), sd = ["id"], ad = ["id"], ud = ["id"], cd = {
|
|
6119
6119
|
name: "A11yDescriptions",
|
|
6120
6120
|
compatConfig: { MODE: 3 }
|
|
6121
6121
|
}, dd = /* @__PURE__ */ me({
|
|
@@ -6126,11 +6126,11 @@ const td = {
|
|
|
6126
6126
|
_e("div", {
|
|
6127
6127
|
id: `${J(Fi)}-${J(t)}`,
|
|
6128
6128
|
style: { display: "none" }
|
|
6129
|
-
}, " Press enter or space to select a node. " + gt(J(n) ? "" : "You can then use the arrow keys to move the node around.") + " You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ", 9,
|
|
6129
|
+
}, " Press enter or space to select a node. " + gt(J(n) ? "" : "You can then use the arrow keys to move the node around.") + " You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ", 9, sd),
|
|
6130
6130
|
_e("div", {
|
|
6131
6131
|
id: `${J(Yi)}-${J(t)}`,
|
|
6132
6132
|
style: { display: "none" }
|
|
6133
|
-
}, " Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ", 8,
|
|
6133
|
+
}, " Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ", 8, ad),
|
|
6134
6134
|
J(n) ? Ne("", !0) : (oe(), he("div", {
|
|
6135
6135
|
key: 0,
|
|
6136
6136
|
id: `${J(Pu)}-${J(t)}`,
|
|
@@ -6188,33 +6188,33 @@ const oi = vo, vd = me({
|
|
|
6188
6188
|
edgeUpdaterRadius: i,
|
|
6189
6189
|
emits: r,
|
|
6190
6190
|
nodesSelectionActive: l,
|
|
6191
|
-
noPanClassName:
|
|
6192
|
-
getEdgeTypes:
|
|
6191
|
+
noPanClassName: s,
|
|
6192
|
+
getEdgeTypes: a,
|
|
6193
6193
|
removeSelectedEdges: u,
|
|
6194
6194
|
findEdge: c,
|
|
6195
6195
|
findNode: d,
|
|
6196
6196
|
isValidConnection: h,
|
|
6197
6197
|
multiSelectionActive: f,
|
|
6198
|
-
disableKeyboardA11y:
|
|
6198
|
+
disableKeyboardA11y: E,
|
|
6199
6199
|
elementsSelectable: b,
|
|
6200
6200
|
edgesUpdatable: S,
|
|
6201
6201
|
edgesFocusable: C,
|
|
6202
6202
|
hooks: M
|
|
6203
6203
|
} = we(), _ = ne(() => c(e.id)), { emit: N, on: z } = lc(_.value, r), Y = wt(bn), F = Bt(), I = ge(!1), T = ge(!1), O = ge(""), D = ge(null), w = ge("source"), Z = ge(null), y = be(
|
|
6204
6204
|
() => typeof _.value.selectable > "u" ? b.value : _.value.selectable
|
|
6205
|
-
), P = be(() => typeof _.value.updatable > "u" ? S.value : _.value.updatable),
|
|
6205
|
+
), P = be(() => typeof _.value.updatable > "u" ? S.value : _.value.updatable), x = be(() => typeof _.value.focusable > "u" ? C.value : _.value.focusable);
|
|
6206
6206
|
ft(oc, e.id), ft(ic, Z);
|
|
6207
6207
|
const $ = ne(() => _.value.class instanceof Function ? _.value.class(_.value) : _.value.class), A = ne(() => _.value.style instanceof Function ? _.value.style(_.value) : _.value.style), V = ne(() => {
|
|
6208
6208
|
const g = _.value.type || "default", m = Y == null ? void 0 : Y[`edge-${g}`];
|
|
6209
6209
|
if (m)
|
|
6210
6210
|
return m;
|
|
6211
|
-
let p = _.value.template ??
|
|
6211
|
+
let p = _.value.template ?? a.value[g];
|
|
6212
6212
|
if (typeof p == "string" && F) {
|
|
6213
6213
|
const k = Object.keys(F.appContext.components);
|
|
6214
6214
|
k && k.includes(g) && (p = li(g, !1));
|
|
6215
6215
|
}
|
|
6216
6216
|
return p && typeof p != "string" ? p : (r.error(new Se(xe.EDGE_TYPE_MISSING, p)), !1);
|
|
6217
|
-
}), { handlePointerDown: B } =
|
|
6217
|
+
}), { handlePointerDown: B } = sr({
|
|
6218
6218
|
nodeId: O,
|
|
6219
6219
|
handleId: D,
|
|
6220
6220
|
type: w,
|
|
@@ -6238,7 +6238,7 @@ const oi = vo, vd = me({
|
|
|
6238
6238
|
const K = Xo(k, _.value.sourceHandle);
|
|
6239
6239
|
let X;
|
|
6240
6240
|
o.value === Je.Strict ? X = m.handleBounds.target : X = [...m.handleBounds.target || [], ...m.handleBounds.source || []];
|
|
6241
|
-
const U = Xo(X, _.value.targetHandle), ee = (K == null ? void 0 : K.position) || R.Bottom,
|
|
6241
|
+
const U = Xo(X, _.value.targetHandle), ee = (K == null ? void 0 : K.position) || R.Bottom, se = (U == null ? void 0 : U.position) || R.Top, { x: de, y: ye } = yt(g, K, ee), { x: Ae, y: bt } = yt(m, U, se);
|
|
6242
6242
|
return _.value.sourceX = de, _.value.sourceY = ye, _.value.targetX = Ae, _.value.targetY = bt, pe(
|
|
6243
6243
|
"g",
|
|
6244
6244
|
{
|
|
@@ -6248,7 +6248,7 @@ const oi = vo, vd = me({
|
|
|
6248
6248
|
class: [
|
|
6249
6249
|
"vue-flow__edge",
|
|
6250
6250
|
`vue-flow__edge-${V.value === !1 ? "default" : _.value.type || "default"}`,
|
|
6251
|
-
|
|
6251
|
+
s.value,
|
|
6252
6252
|
$.value,
|
|
6253
6253
|
{
|
|
6254
6254
|
updating: I.value,
|
|
@@ -6257,22 +6257,22 @@ const oi = vo, vd = me({
|
|
|
6257
6257
|
inactive: !y.value && !M.value.edgeClick.hasListeners()
|
|
6258
6258
|
}
|
|
6259
6259
|
],
|
|
6260
|
-
tabIndex:
|
|
6260
|
+
tabIndex: x.value ? 0 : void 0,
|
|
6261
6261
|
"aria-label": _.value.ariaLabel === null ? void 0 : _.value.ariaLabel ?? `Edge from ${_.value.source} to ${_.value.target}`,
|
|
6262
|
-
"aria-describedby":
|
|
6262
|
+
"aria-describedby": x.value ? `${Yi}-${t}` : void 0,
|
|
6263
6263
|
"aria-roledescription": "edge",
|
|
6264
|
-
role:
|
|
6264
|
+
role: x.value ? "group" : "img",
|
|
6265
6265
|
..._.value.domAttributes,
|
|
6266
6266
|
onClick: q,
|
|
6267
|
-
onContextmenu:
|
|
6267
|
+
onContextmenu: ae,
|
|
6268
6268
|
onDblclick: ue,
|
|
6269
6269
|
onMouseenter: te,
|
|
6270
6270
|
onMousemove: fe,
|
|
6271
6271
|
onMouseleave: Q,
|
|
6272
|
-
onKeyDown:
|
|
6272
|
+
onKeyDown: x.value ? v : void 0
|
|
6273
6273
|
},
|
|
6274
6274
|
[
|
|
6275
|
-
T.value ? null : pe(V.value === !1 ?
|
|
6275
|
+
T.value ? null : pe(V.value === !1 ? a.value.default : V.value, {
|
|
6276
6276
|
id: e.id,
|
|
6277
6277
|
sourceNode: g,
|
|
6278
6278
|
targetNode: m,
|
|
@@ -6294,7 +6294,7 @@ const oi = vo, vd = me({
|
|
|
6294
6294
|
markerStart: `url('#${zt(_.value.markerStart, t)}')`,
|
|
6295
6295
|
markerEnd: `url('#${zt(_.value.markerEnd, t)}')`,
|
|
6296
6296
|
sourcePosition: ee,
|
|
6297
|
-
targetPosition:
|
|
6297
|
+
targetPosition: se,
|
|
6298
6298
|
sourceX: de,
|
|
6299
6299
|
sourceY: ye,
|
|
6300
6300
|
targetX: Ae,
|
|
@@ -6332,7 +6332,7 @@ const oi = vo, vd = me({
|
|
|
6332
6332
|
onMouseout: j
|
|
6333
6333
|
},
|
|
6334
6334
|
pe(oi, {
|
|
6335
|
-
position:
|
|
6335
|
+
position: se,
|
|
6336
6336
|
centerX: Ae,
|
|
6337
6337
|
centerY: bt,
|
|
6338
6338
|
radius: i.value,
|
|
@@ -6365,7 +6365,7 @@ const oi = vo, vd = me({
|
|
|
6365
6365
|
const p = { event: g, edge: _.value };
|
|
6366
6366
|
y.value && (l.value = !1, _.value.selected && f.value ? (u([_.value]), (m = Z.value) == null || m.blur()) : n([_.value])), N.click(p);
|
|
6367
6367
|
}
|
|
6368
|
-
function
|
|
6368
|
+
function ae(g) {
|
|
6369
6369
|
N.contextMenu({ event: g, edge: _.value });
|
|
6370
6370
|
}
|
|
6371
6371
|
function ue(g) {
|
|
@@ -6388,7 +6388,7 @@ const oi = vo, vd = me({
|
|
|
6388
6388
|
}
|
|
6389
6389
|
function v(g) {
|
|
6390
6390
|
var m;
|
|
6391
|
-
!
|
|
6391
|
+
!E.value && Gi.includes(g.key) && y.value && (g.key === "Escape" ? ((m = Z.value) == null || m.blur(), u([c(e.id)])) : n([c(e.id)]));
|
|
6392
6392
|
}
|
|
6393
6393
|
}
|
|
6394
6394
|
}), pd = vd, md = me({
|
|
@@ -6403,24 +6403,24 @@ const oi = vo, vd = me({
|
|
|
6403
6403
|
connectionEndHandle: i,
|
|
6404
6404
|
connectionPosition: r,
|
|
6405
6405
|
connectionLineType: l,
|
|
6406
|
-
connectionLineStyle:
|
|
6407
|
-
connectionLineOptions:
|
|
6406
|
+
connectionLineStyle: s,
|
|
6407
|
+
connectionLineOptions: a,
|
|
6408
6408
|
connectionStatus: u,
|
|
6409
6409
|
viewport: c,
|
|
6410
6410
|
findNode: d
|
|
6411
6411
|
} = we(), h = (e = wt(bn)) == null ? void 0 : e["connection-line"], f = ne(() => {
|
|
6412
6412
|
var M;
|
|
6413
6413
|
return d((M = o.value) == null ? void 0 : M.nodeId);
|
|
6414
|
-
}),
|
|
6414
|
+
}), E = ne(() => {
|
|
6415
6415
|
var M;
|
|
6416
6416
|
return d((M = i.value) == null ? void 0 : M.nodeId) ?? null;
|
|
6417
6417
|
}), b = ne(() => ({
|
|
6418
6418
|
x: (r.value.x - c.value.x) / c.value.zoom,
|
|
6419
6419
|
y: (r.value.y - c.value.y) / c.value.zoom
|
|
6420
6420
|
})), S = ne(
|
|
6421
|
-
() =>
|
|
6421
|
+
() => a.value.markerStart ? `url(#${zt(a.value.markerStart, t)})` : ""
|
|
6422
6422
|
), C = ne(
|
|
6423
|
-
() =>
|
|
6423
|
+
() => a.value.markerEnd ? `url(#${zt(a.value.markerEnd, t)})` : ""
|
|
6424
6424
|
);
|
|
6425
6425
|
return () => {
|
|
6426
6426
|
var M, _, N;
|
|
@@ -6436,12 +6436,12 @@ const oi = vo, vd = me({
|
|
|
6436
6436
|
return null;
|
|
6437
6437
|
const T = (z ? I.find((A) => A.id === z) : I[0]) ?? null, O = (T == null ? void 0 : T.position) ?? R.Top, { x: D, y: w } = yt(f.value, T, O);
|
|
6438
6438
|
let Z = null;
|
|
6439
|
-
|
|
6439
|
+
E.value && (n.value === Je.Strict ? Z = ((M = E.value.handleBounds[Y === "source" ? "target" : "source"]) == null ? void 0 : M.find(
|
|
6440
6440
|
(A) => {
|
|
6441
6441
|
var V;
|
|
6442
6442
|
return A.id === ((V = i.value) == null ? void 0 : V.id);
|
|
6443
6443
|
}
|
|
6444
|
-
)) || null : Z = ((_ = [...
|
|
6444
|
+
)) || null : Z = ((_ = [...E.value.handleBounds.source ?? [], ...E.value.handleBounds.target ?? []]) == null ? void 0 : _.find(
|
|
6445
6445
|
(A) => {
|
|
6446
6446
|
var V;
|
|
6447
6447
|
return A.id === ((V = i.value) == null ? void 0 : V.id);
|
|
@@ -6450,8 +6450,8 @@ const oi = vo, vd = me({
|
|
|
6450
6450
|
const y = ((N = i.value) == null ? void 0 : N.position) ?? (O ? Jn[O] : null);
|
|
6451
6451
|
if (!O || !y)
|
|
6452
6452
|
return null;
|
|
6453
|
-
const P = l.value ??
|
|
6454
|
-
let
|
|
6453
|
+
const P = l.value ?? a.value.type ?? je.Bezier;
|
|
6454
|
+
let x = "";
|
|
6455
6455
|
const $ = {
|
|
6456
6456
|
sourceX: D,
|
|
6457
6457
|
sourceY: w,
|
|
@@ -6460,10 +6460,10 @@ const oi = vo, vd = me({
|
|
|
6460
6460
|
targetY: b.value.y,
|
|
6461
6461
|
targetPosition: y
|
|
6462
6462
|
};
|
|
6463
|
-
return P === je.Bezier ? [
|
|
6463
|
+
return P === je.Bezier ? [x] = go($) : P === je.Step ? [x] = jn({
|
|
6464
6464
|
...$,
|
|
6465
6465
|
borderRadius: 0
|
|
6466
|
-
}) : P === je.SmoothStep ? [
|
|
6466
|
+
}) : P === je.SmoothStep ? [x] = jn($) : P === je.SimpleBezier ? [x] = hr($) : x = `M${D},${w} ${b.value.x},${b.value.y}`, pe(
|
|
6467
6467
|
"svg",
|
|
6468
6468
|
{ class: "vue-flow__edges vue-flow__connectionline vue-flow__container" },
|
|
6469
6469
|
pe(
|
|
@@ -6478,17 +6478,17 @@ const oi = vo, vd = me({
|
|
|
6478
6478
|
targetPosition: y,
|
|
6479
6479
|
sourceNode: f.value,
|
|
6480
6480
|
sourceHandle: T,
|
|
6481
|
-
targetNode:
|
|
6481
|
+
targetNode: E.value,
|
|
6482
6482
|
targetHandle: Z,
|
|
6483
6483
|
markerEnd: C.value,
|
|
6484
6484
|
markerStart: S.value,
|
|
6485
6485
|
connectionStatus: u.value
|
|
6486
6486
|
}) : pe("path", {
|
|
6487
|
-
d:
|
|
6488
|
-
class: [
|
|
6487
|
+
d: x,
|
|
6488
|
+
class: [a.value.class, u, "vue-flow__connection-path"],
|
|
6489
6489
|
style: {
|
|
6490
|
-
...
|
|
6491
|
-
...
|
|
6490
|
+
...s.value,
|
|
6491
|
+
...a.value.style
|
|
6492
6492
|
},
|
|
6493
6493
|
"marker-end": C.value,
|
|
6494
6494
|
"marker-start": S.value
|
|
@@ -6558,31 +6558,31 @@ const oi = vo, vd = me({
|
|
|
6558
6558
|
...xd,
|
|
6559
6559
|
setup(e) {
|
|
6560
6560
|
const { id: t, edges: n, connectionLineOptions: o, defaultMarkerColor: i } = we(), r = ne(() => {
|
|
6561
|
-
const l = /* @__PURE__ */ new Set(),
|
|
6561
|
+
const l = /* @__PURE__ */ new Set(), s = [], a = (u) => {
|
|
6562
6562
|
if (u) {
|
|
6563
6563
|
const c = zt(u, t);
|
|
6564
|
-
l.has(c) || (typeof u == "object" ?
|
|
6564
|
+
l.has(c) || (typeof u == "object" ? s.push({ ...u, id: c, color: u.color || i.value }) : s.push({ id: c, color: i.value, type: u }), l.add(c));
|
|
6565
6565
|
}
|
|
6566
6566
|
};
|
|
6567
6567
|
for (const u of [o.value.markerEnd, o.value.markerStart])
|
|
6568
|
-
|
|
6568
|
+
a(u);
|
|
6569
6569
|
for (const u of n.value)
|
|
6570
6570
|
for (const c of [u.markerStart, u.markerEnd])
|
|
6571
|
-
|
|
6572
|
-
return
|
|
6571
|
+
a(c);
|
|
6572
|
+
return s.sort((u, c) => u.id.localeCompare(c.id));
|
|
6573
6573
|
});
|
|
6574
|
-
return (l,
|
|
6574
|
+
return (l, s) => (oe(), he("svg", Ed, [
|
|
6575
6575
|
_e("defs", null, [
|
|
6576
|
-
(oe(!0), he(Te, null, eo(r.value, (
|
|
6577
|
-
id:
|
|
6578
|
-
key:
|
|
6579
|
-
type:
|
|
6580
|
-
color:
|
|
6581
|
-
width:
|
|
6582
|
-
height:
|
|
6583
|
-
markerUnits:
|
|
6584
|
-
"stroke-width":
|
|
6585
|
-
orient:
|
|
6576
|
+
(oe(!0), he(Te, null, eo(r.value, (a) => (oe(), Re(bd, {
|
|
6577
|
+
id: a.id,
|
|
6578
|
+
key: a.id,
|
|
6579
|
+
type: a.type,
|
|
6580
|
+
color: a.color,
|
|
6581
|
+
width: a.width,
|
|
6582
|
+
height: a.height,
|
|
6583
|
+
markerUnits: a.markerUnits,
|
|
6584
|
+
"stroke-width": a.strokeWidth,
|
|
6585
|
+
orient: a.orient
|
|
6586
6586
|
}, null, 8, ["id", "type", "color", "width", "height", "markerUnits", "stroke-width", "orient"]))), 128))
|
|
6587
6587
|
])
|
|
6588
6588
|
]));
|
|
@@ -6620,14 +6620,14 @@ const oi = vo, vd = me({
|
|
|
6620
6620
|
nodesSelectionActive: i,
|
|
6621
6621
|
multiSelectionActive: r,
|
|
6622
6622
|
emits: l,
|
|
6623
|
-
removeSelectedNodes:
|
|
6624
|
-
addSelectedNodes:
|
|
6623
|
+
removeSelectedNodes: s,
|
|
6624
|
+
addSelectedNodes: a,
|
|
6625
6625
|
updateNodeDimensions: u,
|
|
6626
6626
|
onUpdateNodeInternals: c,
|
|
6627
6627
|
getNodeTypes: d,
|
|
6628
6628
|
nodeExtent: h,
|
|
6629
6629
|
elevateNodesOnSelect: f,
|
|
6630
|
-
disableKeyboardA11y:
|
|
6630
|
+
disableKeyboardA11y: E,
|
|
6631
6631
|
ariaLiveMessage: b,
|
|
6632
6632
|
snapToGrid: S,
|
|
6633
6633
|
snapGrid: C,
|
|
@@ -6639,8 +6639,8 @@ const oi = vo, vd = me({
|
|
|
6639
6639
|
hooks: F
|
|
6640
6640
|
} = we(), I = ge(null);
|
|
6641
6641
|
ft(rr, I), ft(ir, e.id);
|
|
6642
|
-
const T = wt(bn), O = Bt(), D = ur(), { node: w, parentNode: Z } =
|
|
6643
|
-
() => $.value ||
|
|
6642
|
+
const T = wt(bn), O = Bt(), D = ur(), { node: w, parentNode: Z } = ar(e.id), { emit: y, on: P } = cc(w, l), x = be(() => typeof w.draggable > "u" ? _.value : w.draggable), $ = be(() => typeof w.selectable > "u" ? N.value : w.selectable), A = be(() => typeof w.connectable > "u" ? z.value : w.connectable), V = be(() => typeof w.focusable > "u" ? Y.value : w.focusable), B = ne(
|
|
6643
|
+
() => $.value || x.value || F.value.nodeClick.hasListeners() || F.value.nodeDoubleClick.hasListeners() || F.value.nodeMouseEnter.hasListeners() || F.value.nodeMouseMove.hasListeners() || F.value.nodeMouseLeave.hasListeners()
|
|
6644
6644
|
), W = be(() => !!w.dimensions.width && !!w.dimensions.height), j = ne(() => {
|
|
6645
6645
|
const m = w.type || "default", p = T == null ? void 0 : T[`node-${m}`];
|
|
6646
6646
|
if (p)
|
|
@@ -6654,7 +6654,7 @@ const oi = vo, vd = me({
|
|
|
6654
6654
|
}), re = lr({
|
|
6655
6655
|
id: e.id,
|
|
6656
6656
|
el: I,
|
|
6657
|
-
disabled: () => !
|
|
6657
|
+
disabled: () => !x.value,
|
|
6658
6658
|
selectable: $,
|
|
6659
6659
|
dragHandle: () => w.dragHandle,
|
|
6660
6660
|
onStart(m) {
|
|
@@ -6728,8 +6728,8 @@ const oi = vo, vd = me({
|
|
|
6728
6728
|
},
|
|
6729
6729
|
{ flush: "post", immediate: !0 }
|
|
6730
6730
|
), ve([() => w.extent, h], ([m, p], [k, K]) => {
|
|
6731
|
-
(m !== k || p !== K) &&
|
|
6732
|
-
}), w.extent === "parent" || typeof w.extent == "object" && "range" in w.extent && w.extent.range === "parent" ? Rn(() => W).toBe(!0).then(
|
|
6731
|
+
(m !== k || p !== K) && ae();
|
|
6732
|
+
}), w.extent === "parent" || typeof w.extent == "object" && "range" in w.extent && w.extent.range === "parent" ? Rn(() => W).toBe(!0).then(ae) : ae(), () => w.hidden ? null : pe(
|
|
6733
6733
|
"div",
|
|
6734
6734
|
{
|
|
6735
6735
|
ref: I,
|
|
@@ -6738,9 +6738,9 @@ const oi = vo, vd = me({
|
|
|
6738
6738
|
"vue-flow__node",
|
|
6739
6739
|
`vue-flow__node-${j.value === !1 ? "default" : w.type || "default"}`,
|
|
6740
6740
|
{
|
|
6741
|
-
[n.value]:
|
|
6741
|
+
[n.value]: x.value,
|
|
6742
6742
|
dragging: re == null ? void 0 : re.value,
|
|
6743
|
-
draggable:
|
|
6743
|
+
draggable: x.value,
|
|
6744
6744
|
selected: w.selected,
|
|
6745
6745
|
selectable: $.value,
|
|
6746
6746
|
parent: w.isParent
|
|
@@ -6756,7 +6756,7 @@ const oi = vo, vd = me({
|
|
|
6756
6756
|
},
|
|
6757
6757
|
tabIndex: V.value ? 0 : void 0,
|
|
6758
6758
|
role: V.value ? "group" : void 0,
|
|
6759
|
-
"aria-describedby":
|
|
6759
|
+
"aria-describedby": E.value ? void 0 : `${Fi}-${t}`,
|
|
6760
6760
|
"aria-label": w.ariaLabel,
|
|
6761
6761
|
"aria-roledescription": "node",
|
|
6762
6762
|
...w.domAttributes,
|
|
@@ -6793,7 +6793,7 @@ const oi = vo, vd = me({
|
|
|
6793
6793
|
})
|
|
6794
6794
|
]
|
|
6795
6795
|
);
|
|
6796
|
-
function
|
|
6796
|
+
function ae() {
|
|
6797
6797
|
const m = w.computedPosition, { computedPosition: p, position: k } = fo(
|
|
6798
6798
|
w,
|
|
6799
6799
|
S.value ? _n(m, C.value) : m,
|
|
@@ -6822,30 +6822,30 @@ const oi = vo, vd = me({
|
|
|
6822
6822
|
return y.doubleClick({ event: m, node: w });
|
|
6823
6823
|
}
|
|
6824
6824
|
function v(m) {
|
|
6825
|
-
$.value && (!o.value || !
|
|
6825
|
+
$.value && (!o.value || !x.value || M.value > 0) && Qn(
|
|
6826
6826
|
w,
|
|
6827
6827
|
r.value,
|
|
6828
|
-
s,
|
|
6829
6828
|
a,
|
|
6829
|
+
s,
|
|
6830
6830
|
i,
|
|
6831
6831
|
!1,
|
|
6832
6832
|
I.value
|
|
6833
6833
|
), y.click({ event: m, node: w });
|
|
6834
6834
|
}
|
|
6835
6835
|
function g(m) {
|
|
6836
|
-
if (!(Kn(m) ||
|
|
6836
|
+
if (!(Kn(m) || E.value))
|
|
6837
6837
|
if (Gi.includes(m.key) && $.value) {
|
|
6838
6838
|
const p = m.key === "Escape";
|
|
6839
6839
|
Qn(
|
|
6840
6840
|
w,
|
|
6841
6841
|
r.value,
|
|
6842
|
-
s,
|
|
6843
6842
|
a,
|
|
6843
|
+
s,
|
|
6844
6844
|
i,
|
|
6845
6845
|
p,
|
|
6846
6846
|
I.value
|
|
6847
6847
|
);
|
|
6848
|
-
} else
|
|
6848
|
+
} else x.value && w.selected && ct[m.key] && (m.preventDefault(), b.value = `Moved selected node ${m.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~w.position.x}, y: ${~~w.position.y}`, D(
|
|
6849
6849
|
{
|
|
6850
6850
|
x: ct[m.key].x,
|
|
6851
6851
|
y: ct[m.key].y
|
|
@@ -6907,28 +6907,28 @@ const Dd = { class: "vue-flow__nodes vue-flow__container" }, Ad = {
|
|
|
6907
6907
|
{ immediate: !0 }
|
|
6908
6908
|
), Ue(() => {
|
|
6909
6909
|
r.value = new ResizeObserver((l) => {
|
|
6910
|
-
const
|
|
6911
|
-
id:
|
|
6912
|
-
nodeElement:
|
|
6910
|
+
const s = l.map((a) => ({
|
|
6911
|
+
id: a.target.getAttribute("data-id"),
|
|
6912
|
+
nodeElement: a.target,
|
|
6913
6913
|
forceUpdate: !0
|
|
6914
6914
|
}));
|
|
6915
|
-
$e(() => n(
|
|
6915
|
+
$e(() => n(s));
|
|
6916
6916
|
});
|
|
6917
6917
|
}), to(() => {
|
|
6918
6918
|
var l;
|
|
6919
6919
|
return (l = r.value) == null ? void 0 : l.disconnect();
|
|
6920
|
-
}), (l,
|
|
6921
|
-
r.value ? (oe(!0), he(Te, { key: 0 }, eo(J(t), (
|
|
6922
|
-
const h = [
|
|
6923
|
-
if (d && d.key ===
|
|
6920
|
+
}), (l, s) => (oe(), he("div", Dd, [
|
|
6921
|
+
r.value ? (oe(!0), he(Te, { key: 0 }, eo(J(t), (a, u, c, d) => {
|
|
6922
|
+
const h = [a.id];
|
|
6923
|
+
if (d && d.key === a.id && Nr(d, h))
|
|
6924
6924
|
return d;
|
|
6925
6925
|
const f = (oe(), Re(J(Id), {
|
|
6926
|
-
id:
|
|
6927
|
-
key:
|
|
6926
|
+
id: a.id,
|
|
6927
|
+
key: a.id,
|
|
6928
6928
|
"resize-observer": r.value
|
|
6929
6929
|
}, null, 8, ["id", "resize-observer"]));
|
|
6930
6930
|
return f.memo = h, f;
|
|
6931
|
-
},
|
|
6931
|
+
}, s, 0), 128)) : Ne("", !0)
|
|
6932
6932
|
]));
|
|
6933
6933
|
}
|
|
6934
6934
|
});
|
|
@@ -7009,11 +7009,11 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7009
7009
|
},
|
|
7010
7010
|
emits: ["nodesChange", "edgesChange", "nodesInitialized", "paneReady", "init", "updateNodeInternals", "error", "connect", "connectStart", "connectEnd", "clickConnectStart", "clickConnectEnd", "moveStart", "move", "moveEnd", "selectionDragStart", "selectionDrag", "selectionDragStop", "selectionContextMenu", "selectionStart", "selectionEnd", "viewportChangeStart", "viewportChange", "viewportChangeEnd", "paneScroll", "paneClick", "paneContextMenu", "paneMouseEnter", "paneMouseMove", "paneMouseLeave", "edgeUpdate", "edgeContextMenu", "edgeMouseEnter", "edgeMouseMove", "edgeMouseLeave", "edgeDoubleClick", "edgeClick", "edgeUpdateStart", "edgeUpdateEnd", "nodeContextMenu", "nodeMouseEnter", "nodeMouseMove", "nodeMouseLeave", "nodeDoubleClick", "nodeClick", "nodeDragStart", "nodeDrag", "nodeDragStop", "miniMapNodeClick", "miniMapNodeDoubleClick", "miniMapNodeMouseEnter", "miniMapNodeMouseMove", "miniMapNodeMouseLeave", "update:modelValue", "update:nodes", "update:edges"],
|
|
7011
7011
|
setup(e, { expose: t, emit: n }) {
|
|
7012
|
-
const o = e, i = wr(), r = Cn(o, "modelValue", n), l = Cn(o, "nodes", n),
|
|
7013
|
-
return pc(n,
|
|
7012
|
+
const o = e, i = wr(), r = Cn(o, "modelValue", n), l = Cn(o, "nodes", n), s = Cn(o, "edges", n), a = we(o), u = gc({ modelValue: r, nodes: l, edges: s }, o, a);
|
|
7013
|
+
return pc(n, a.hooks), fd(), zd(), ft(bn, i), br(() => {
|
|
7014
7014
|
u();
|
|
7015
|
-
}), t(
|
|
7016
|
-
ref: J(
|
|
7015
|
+
}), t(a), (c, d) => (oe(), he("div", {
|
|
7016
|
+
ref: J(a).vueFlowRef,
|
|
7017
7017
|
class: "vue-flow"
|
|
7018
7018
|
}, [
|
|
7019
7019
|
Me(ld, null, {
|
|
@@ -7071,11 +7071,11 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7071
7071
|
},
|
|
7072
7072
|
emits: ["change"],
|
|
7073
7073
|
setup(e, { emit: t }) {
|
|
7074
|
-
const n = e, o = t, i =
|
|
7075
|
-
let
|
|
7076
|
-
const
|
|
7074
|
+
const n = e, o = t, i = ai("labelInput"), r = ge(""), l = ge(!1);
|
|
7075
|
+
let s = 0;
|
|
7076
|
+
const a = async () => {
|
|
7077
7077
|
let h = Date.now();
|
|
7078
|
-
h -
|
|
7078
|
+
h - s < 500 && !l.value && await u(), s = h;
|
|
7079
7079
|
}, u = async () => {
|
|
7080
7080
|
r.value = n.label, l.value = !0, await $e(), i.value.focus();
|
|
7081
7081
|
}, c = () => {
|
|
@@ -7098,15 +7098,15 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7098
7098
|
transform: `translate(-50%, -50%) translate(${d.value[1]}px,${d.value[2]}px)`
|
|
7099
7099
|
}),
|
|
7100
7100
|
class: "nodrag nopan editable-edge-label",
|
|
7101
|
-
onClick: f[2] || (f[2] = (
|
|
7101
|
+
onClick: f[2] || (f[2] = (E) => a())
|
|
7102
7102
|
}, [
|
|
7103
7103
|
_e("div", Ld, gt(h.label), 1),
|
|
7104
7104
|
l.value ? (oe(), he("div", Fd, [
|
|
7105
7105
|
ui(_e("input", {
|
|
7106
7106
|
ref: "labelInput",
|
|
7107
7107
|
class: "label-input",
|
|
7108
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
7109
|
-
onBlur: f[1] || (f[1] = (
|
|
7108
|
+
"onUpdate:modelValue": f[0] || (f[0] = (E) => r.value = E),
|
|
7109
|
+
onBlur: f[1] || (f[1] = (E) => l.value = !1),
|
|
7110
7110
|
onKeypress: ci(c, ["enter"])
|
|
7111
7111
|
}, null, 544), [
|
|
7112
7112
|
[di, r.value]
|
|
@@ -7146,18 +7146,18 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7146
7146
|
},
|
|
7147
7147
|
emits: ["change"],
|
|
7148
7148
|
setup(e, { emit: t }) {
|
|
7149
|
-
const n = e, o = t, i =
|
|
7150
|
-
let
|
|
7151
|
-
const
|
|
7149
|
+
const n = e, o = t, i = ai("labelInput"), r = ge(""), l = ge(!1);
|
|
7150
|
+
let s = 0;
|
|
7151
|
+
const a = async () => {
|
|
7152
7152
|
let d = Date.now();
|
|
7153
|
-
d -
|
|
7153
|
+
d - s < 500 && !l.value && await u(), s = d;
|
|
7154
7154
|
}, u = async () => {
|
|
7155
7155
|
r.value = n.label, l.value = !0, await $e(), i.value.focus();
|
|
7156
7156
|
}, c = () => {
|
|
7157
7157
|
l.value = !1, o("change", r.value);
|
|
7158
7158
|
};
|
|
7159
7159
|
return (d, h) => (oe(), he("div", {
|
|
7160
|
-
onClick: h[2] || (h[2] = (f) =>
|
|
7160
|
+
onClick: h[2] || (h[2] = (f) => a())
|
|
7161
7161
|
}, [
|
|
7162
7162
|
_e("div", null, gt(d.label), 1),
|
|
7163
7163
|
l.value ? (oe(), he("div", Xd, [
|
|
@@ -7193,10 +7193,10 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7193
7193
|
},
|
|
7194
7194
|
emits: ["update:modelValue"],
|
|
7195
7195
|
setup(e, { emit: t }) {
|
|
7196
|
-
const n = t, o = ge(!1), i = ge([]), r = ge(), l = ge(""),
|
|
7196
|
+
const n = t, o = ge(!1), i = ge([]), r = ge(), l = ge(""), s = ne(() => (i.value.forEach((I, T) => {
|
|
7197
7197
|
if (I.id === l.value)
|
|
7198
7198
|
return T;
|
|
7199
|
-
}), -1)),
|
|
7199
|
+
}), -1)), a = ne({
|
|
7200
7200
|
get: () => {
|
|
7201
7201
|
const I = e.modelValue;
|
|
7202
7202
|
for (const T of I)
|
|
@@ -7219,21 +7219,21 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7219
7219
|
document.removeEventListener("keypress", M);
|
|
7220
7220
|
}), h((I) => {
|
|
7221
7221
|
r.value = I;
|
|
7222
|
-
}), i.value =
|
|
7223
|
-
const
|
|
7222
|
+
}), i.value = a.value;
|
|
7223
|
+
const E = (I) => ({
|
|
7224
7224
|
[R.Top]: R.Right,
|
|
7225
7225
|
[R.Right]: R.Bottom,
|
|
7226
7226
|
[R.Bottom]: R.Left,
|
|
7227
7227
|
[R.Left]: R.Top
|
|
7228
7228
|
})[I], b = () => {
|
|
7229
|
-
if (
|
|
7230
|
-
const I = i.value[
|
|
7231
|
-
I.sourcePosition =
|
|
7229
|
+
if (s.value > -1) {
|
|
7230
|
+
const I = i.value[s.value];
|
|
7231
|
+
I.sourcePosition = E(I.sourcePosition);
|
|
7232
7232
|
}
|
|
7233
7233
|
}, S = () => {
|
|
7234
|
-
if (
|
|
7235
|
-
const I = i.value[
|
|
7236
|
-
I.targetPosition =
|
|
7234
|
+
if (s.value > -1) {
|
|
7235
|
+
const I = i.value[s.value];
|
|
7236
|
+
I.targetPosition = E(I.targetPosition);
|
|
7237
7237
|
}
|
|
7238
7238
|
}, C = (I) => {
|
|
7239
7239
|
window.scrollBy(0, I.deltaY);
|
|
@@ -7243,8 +7243,8 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7243
7243
|
await r.value.fitView();
|
|
7244
7244
|
}, N = () => {
|
|
7245
7245
|
let I = !1, T = { x: Math.random() * 200, y: Math.random() * 200 };
|
|
7246
|
-
if (
|
|
7247
|
-
const w = i.value[
|
|
7246
|
+
if (s.value > -1) {
|
|
7247
|
+
const w = i.value[s.value];
|
|
7248
7248
|
w.data.hasOutput && (T = { x: w.position.x + 200, y: w.position.y + 50 }, I = !0);
|
|
7249
7249
|
}
|
|
7250
7250
|
const O = i.value.length, D = `node-${O}`;
|
|
@@ -7320,7 +7320,7 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7320
7320
|
_e("div", Wd, [
|
|
7321
7321
|
_e("div", null, [
|
|
7322
7322
|
T[3] || (T[3] = _e("b", null, "Selected Node:", -1)),
|
|
7323
|
-
|
|
7323
|
+
si(" " + gt(l.value ? l.value : "none"), 1)
|
|
7324
7324
|
])
|
|
7325
7325
|
]),
|
|
7326
7326
|
_e("div", Kd, [
|
|
@@ -7336,13 +7336,13 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7336
7336
|
onClick: _
|
|
7337
7337
|
}, "Center")
|
|
7338
7338
|
]),
|
|
7339
|
-
|
|
7339
|
+
s.value > -1 ? (oe(), he("div", qd, [
|
|
7340
7340
|
_e("button", {
|
|
7341
7341
|
class: "button-default",
|
|
7342
7342
|
onClick: S
|
|
7343
7343
|
}, "Shift Input Position")
|
|
7344
7344
|
])) : Ne("", !0),
|
|
7345
|
-
|
|
7345
|
+
s.value > -1 ? (oe(), he("div", Jd, [
|
|
7346
7346
|
_e("button", {
|
|
7347
7347
|
class: "button-default",
|
|
7348
7348
|
onClick: b
|
|
@@ -7388,9 +7388,11 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7388
7388
|
const n = t, o = $r(e, "modelValue"), i = ne({
|
|
7389
7389
|
get: () => {
|
|
7390
7390
|
var c, d, h;
|
|
7391
|
-
const l = {},
|
|
7391
|
+
const l = {}, s = [], a = {};
|
|
7392
|
+
if (!o.value)
|
|
7393
|
+
return s;
|
|
7392
7394
|
let u = 0;
|
|
7393
|
-
for (const [f,
|
|
7395
|
+
for (const [f, E] of Object.entries(o.value)) {
|
|
7394
7396
|
const b = {
|
|
7395
7397
|
id: f,
|
|
7396
7398
|
label: f,
|
|
@@ -7398,13 +7400,13 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7398
7400
|
targetPosition: ((d = e.layout[f]) == null ? void 0 : d.targetPosition) || R.Left,
|
|
7399
7401
|
sourcePosition: ((h = e.layout[f]) == null ? void 0 : h.sourcePosition) || R.Right
|
|
7400
7402
|
};
|
|
7401
|
-
|
|
7403
|
+
(E == null ? void 0 : E.type) === "final" && (b.type = "output", b.class = "default-output-node"), a[f] = b;
|
|
7402
7404
|
}
|
|
7403
|
-
for (const [f,
|
|
7404
|
-
if (
|
|
7405
|
-
for (const [b, S] of Object.entries(
|
|
7405
|
+
for (const [f, E] of Object.entries(o.value)) {
|
|
7406
|
+
if (E != null && E.on)
|
|
7407
|
+
for (const [b, S] of Object.entries(E.on)) {
|
|
7406
7408
|
const C = S.target || S;
|
|
7407
|
-
|
|
7409
|
+
s.push({
|
|
7408
7410
|
id: `${f}-${C}`,
|
|
7409
7411
|
source: f,
|
|
7410
7412
|
target: C,
|
|
@@ -7414,38 +7416,38 @@ const Bd = /* @__PURE__ */ _e("div", { class: "vue-flow__edge-labels" }, null, -
|
|
|
7414
7416
|
}
|
|
7415
7417
|
u++;
|
|
7416
7418
|
}
|
|
7417
|
-
for (const [f,
|
|
7418
|
-
l[f] || (
|
|
7419
|
-
return
|
|
7419
|
+
for (const [f, E] of Object.entries(a))
|
|
7420
|
+
l[f] || (E.type = "input", E.class = "default-input-node"), s.push(E);
|
|
7421
|
+
return s;
|
|
7420
7422
|
},
|
|
7421
7423
|
set: (l) => {
|
|
7422
7424
|
r(l);
|
|
7423
7425
|
}
|
|
7424
7426
|
}), r = (l) => {
|
|
7425
|
-
const
|
|
7427
|
+
const s = {}, a = {}, u = {};
|
|
7426
7428
|
for (const c of l) {
|
|
7427
7429
|
const d = c.label;
|
|
7428
7430
|
c.type === "input" ? u[d] = {
|
|
7429
7431
|
on: {}
|
|
7430
7432
|
} : c.type === "output" ? u[d] = {
|
|
7431
7433
|
type: "final"
|
|
7432
|
-
} : c.source && c.target ? (
|
|
7434
|
+
} : c.source && c.target ? (s[c.source] = s[c.source] || {}, s[c.source][d] = {
|
|
7433
7435
|
target: c.target
|
|
7434
7436
|
}) : u[d] = {
|
|
7435
7437
|
on: {}
|
|
7436
|
-
},
|
|
7438
|
+
}, a[c.id] = d;
|
|
7437
7439
|
}
|
|
7438
|
-
for (const [c, d] of Object.entries(
|
|
7439
|
-
const h =
|
|
7440
|
-
for (const [f,
|
|
7441
|
-
u[h].on[f] =
|
|
7440
|
+
for (const [c, d] of Object.entries(s)) {
|
|
7441
|
+
const h = a[c];
|
|
7442
|
+
for (const [f, E] of Object.entries(d))
|
|
7443
|
+
u[h] || (u[h] = { on: {} }), u[h].on[f] = E;
|
|
7442
7444
|
}
|
|
7443
7445
|
n("update:modelValue", u);
|
|
7444
7446
|
};
|
|
7445
|
-
return (l,
|
|
7447
|
+
return (l, s) => (oe(), he("div", null, [
|
|
7446
7448
|
Me(vr, {
|
|
7447
7449
|
modelValue: i.value,
|
|
7448
|
-
"onUpdate:modelValue":
|
|
7450
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => i.value = a),
|
|
7449
7451
|
"node-container-class": l.nodeContainerClass
|
|
7450
7452
|
}, null, 8, ["modelValue", "node-container-class"])
|
|
7451
7453
|
]));
|