mce 0.29.5 → 0.29.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +834 -831
- package/dist/utils/png.d.ts +1 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Aabb2D as xt, Animation as Ut, Camera2D as zi, DEG_TO_RAD as Ri, DrawboardEffect as Ro, Element2D as Ht, Engine as Oi, IN_BROWSER as Oo, IN_MAC_OS as Vi, Lottie2D as Wo, Node as In, Obb2D as jn, Timeline as Fi, TimelineNode as Ni, Video2D as Cn, assets as Di, clamp as Ct, customNodes as Bi, render as Jn, renderPixels as qi } from "modern-canvas";
|
|
2
|
-
import { Fragment as we, Teleport as Vo, Transition as Ui, computed as Y, createBlock as Fe, createCommentVNode as _e, createElementBlock as J, createElementVNode as W, createSlots as Fo, createStaticVNode as ji, createTextVNode as mt, createVNode as Me, defineComponent as Se, effectScope as Hi, getCurrentInstance as Qt, guardReactiveProps as yt, h as Xt, inject as Ot, isReactive as Xi, isRef as Gn, markRaw as go, mergeModels as lt, mergeProps as ht, nextTick as zt, normalizeClass as De, normalizeProps as gt, normalizeStyle as Ie, onActivated as Yi, onBeforeMount as bt, onBeforeUnmount as Qe, onDeactivated as Gi, onMounted as Vt, onScopeDispose as en, onUnmounted as Wi, openBlock as U, provide as Yt, reactive as dt, readonly as Ki, ref as de, renderList as Pe, renderSlot as Ne, resolveComponent as Ps, resolveDynamicComponent as No, shallowRef as Zt, toDisplayString as be, toRaw as xo, toRef as Wt, toValue as Zi, unref as
|
|
2
|
+
import { Fragment as we, Teleport as Vo, Transition as Ui, computed as Y, createBlock as Fe, createCommentVNode as _e, createElementBlock as J, createElementVNode as W, createSlots as Fo, createStaticVNode as ji, createTextVNode as mt, createVNode as Me, defineComponent as Se, effectScope as Hi, getCurrentInstance as Qt, guardReactiveProps as yt, h as Xt, inject as Ot, isReactive as Xi, isRef as Gn, markRaw as go, mergeModels as lt, mergeProps as ht, nextTick as zt, normalizeClass as De, normalizeProps as gt, normalizeStyle as Ie, onActivated as Yi, onBeforeMount as bt, onBeforeUnmount as Qe, onDeactivated as Gi, onMounted as Vt, onScopeDispose as en, onUnmounted as Wi, openBlock as U, provide as Yt, reactive as dt, readonly as Ki, ref as de, renderList as Pe, renderSlot as Ne, resolveComponent as Ps, resolveDynamicComponent as No, shallowRef as Zt, toDisplayString as be, toRaw as xo, toRef as Wt, toValue as Zi, unref as F, useAttrs as Is, useId as Do, useModel as tt, useSlots as Ji, useTemplateRef as nt, vModelCheckbox as Qi, vModelSelect as Ko, vModelText as $n, vShow as $s, watch as Be, withCtx as Te, withDirectives as pt, withKeys as Zo, withModifiers as Je } from "vue";
|
|
3
3
|
import { isClient as er, onClickOutside as tr, useDebounceFn as Ls, useEventListener as zs, useFileDialog as Rs, useImage as nr, useLocalStorage as or, useResizeObserver as Os } from "@vueuse/core";
|
|
4
4
|
import { Observable as Bo, getDefaultTextStyle as sr, getObjectValueByPath as ir, idGenerator as Kt, isCRLF as Hn, isEqualObject as rr, normalizeCRLF as mn, normalizeTextContent as pn, property as Ft, setObjectValueByPath as ar, textContentToString as ro } from "modern-idoc";
|
|
5
5
|
import { cloneDeep as En, get as lr, isEqual as cr, isPlainObject as Jo, merge as un, set as bo } from "lodash-es";
|
|
@@ -25,9 +25,9 @@ function Wv(n) {
|
|
|
25
25
|
return n;
|
|
26
26
|
}
|
|
27
27
|
function wo(n, e, t) {
|
|
28
|
-
const o = e.x - n.x, s = e.y - n.y, i = Math.hypot(o, s) || 1, r = o / i, a = s / i, l = -a, c = r, d = t * 0.12, u = t * 0.7, h = t * 2.4, y = i - Math.min(t * 5, i * 0.5), f = (
|
|
29
|
-
x: n.x + r *
|
|
30
|
-
y: n.y + a *
|
|
28
|
+
const o = e.x - n.x, s = e.y - n.y, i = Math.hypot(o, s) || 1, r = o / i, a = s / i, l = -a, c = r, d = t * 0.12, u = t * 0.7, h = t * 2.4, y = i - Math.min(t * 5, i * 0.5), f = (V, R) => ({
|
|
29
|
+
x: n.x + r * V + l * R,
|
|
30
|
+
y: n.y + a * V + c * R
|
|
31
31
|
}), w = [
|
|
32
32
|
f(0, -d),
|
|
33
33
|
f(y, -u),
|
|
@@ -36,10 +36,10 @@ function wo(n, e, t) {
|
|
|
36
36
|
f(y, h),
|
|
37
37
|
f(y, u),
|
|
38
38
|
f(0, d)
|
|
39
|
-
],
|
|
39
|
+
], L = (V) => Math.round(V * 100) / 100;
|
|
40
40
|
return [
|
|
41
|
-
`M ${
|
|
42
|
-
...w.slice(1).map((
|
|
41
|
+
`M ${L(w[0].x)} ${L(w[0].y)}`,
|
|
42
|
+
...w.slice(1).map((V) => `L ${L(V.x)} ${L(V.y)}`),
|
|
43
43
|
"Z"
|
|
44
44
|
].join(" ");
|
|
45
45
|
}
|
|
@@ -571,18 +571,18 @@ function Hr(n) {
|
|
|
571
571
|
function Xr(n, e, t, o) {
|
|
572
572
|
const s = n.prev, i = n, r = n.next;
|
|
573
573
|
if (We(s, i, r) >= 0) return !1;
|
|
574
|
-
const a = s.x, l = i.x, c = r.x, d = s.y, u = i.y, h = r.y, y = Math.min(a, l, c), f = Math.min(d, u, h), w = Math.max(a, l, c),
|
|
574
|
+
const a = s.x, l = i.x, c = r.x, d = s.y, u = i.y, h = r.y, y = Math.min(a, l, c), f = Math.min(d, u, h), w = Math.max(a, l, c), L = Math.max(d, u, h), V = So(y, f, e, t, o), R = So(w, L, e, t, o);
|
|
575
575
|
let S = n.prevZ, A = n.nextZ;
|
|
576
|
-
for (; S && S.z >=
|
|
577
|
-
if (S.x >= y && S.x <= w && S.y >= f && S.y <=
|
|
576
|
+
for (; S && S.z >= V && A && A.z <= R; ) {
|
|
577
|
+
if (S.x >= y && S.x <= w && S.y >= f && S.y <= L && S !== s && S !== r && xn(a, d, l, u, c, h, S.x, S.y) && We(S.prev, S, S.next) >= 0 || (S = S.prevZ, A.x >= y && A.x <= w && A.y >= f && A.y <= L && A !== s && A !== r && xn(a, d, l, u, c, h, A.x, A.y) && We(A.prev, A, A.next) >= 0)) return !1;
|
|
578
578
|
A = A.nextZ;
|
|
579
579
|
}
|
|
580
|
-
for (; S && S.z >=
|
|
581
|
-
if (S.x >= y && S.x <= w && S.y >= f && S.y <=
|
|
580
|
+
for (; S && S.z >= V; ) {
|
|
581
|
+
if (S.x >= y && S.x <= w && S.y >= f && S.y <= L && S !== s && S !== r && xn(a, d, l, u, c, h, S.x, S.y) && We(S.prev, S, S.next) >= 0) return !1;
|
|
582
582
|
S = S.prevZ;
|
|
583
583
|
}
|
|
584
584
|
for (; A && A.z <= R; ) {
|
|
585
|
-
if (A.x >= y && A.x <= w && A.y >= f && A.y <=
|
|
585
|
+
if (A.x >= y && A.x <= w && A.y >= f && A.y <= L && A !== s && A !== r && xn(a, d, l, u, c, h, A.x, A.y) && We(A.prev, A, A.next) >= 0) return !1;
|
|
586
586
|
A = A.nextZ;
|
|
587
587
|
}
|
|
588
588
|
return !0;
|
|
@@ -1028,7 +1028,7 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1028
1028
|
}, X.prototype.load = function(m, M, O) {
|
|
1029
1029
|
M === void 0 && (M = []), O === void 0 && (O = !1);
|
|
1030
1030
|
var B = m.length, D = this._comparator;
|
|
1031
|
-
if (O &&
|
|
1031
|
+
if (O && L(m, M, 0, B - 1, D), this._root === null)
|
|
1032
1032
|
this._root = u(m, M, 0, B), this._size = B;
|
|
1033
1033
|
else {
|
|
1034
1034
|
var re = w(this.toList(), h(m, M), D);
|
|
@@ -1113,7 +1113,7 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1113
1113
|
M(D.key, re.key) < 0 ? (B.next = D, D = D.next) : (B.next = re, re = re.next), B = B.next;
|
|
1114
1114
|
return D !== null ? B.next = D : re !== null && (B.next = re), O.next;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function L(X, m, M, O, B) {
|
|
1117
1117
|
if (!(M >= O)) {
|
|
1118
1118
|
for (var D = X[M + O >> 1], re = M - 1, se = O + 1; ; ) {
|
|
1119
1119
|
do
|
|
@@ -1126,10 +1126,10 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1126
1126
|
var le = X[re];
|
|
1127
1127
|
X[re] = X[se], X[se] = le, le = m[re], m[re] = m[se], m[se] = le;
|
|
1128
1128
|
}
|
|
1129
|
-
|
|
1129
|
+
L(X, m, M, se, B), L(X, m, se + 1, O, B);
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
const
|
|
1132
|
+
const V = (X, m) => X.ll.x <= m.x && m.x <= X.ur.x && X.ll.y <= m.y && m.y <= X.ur.y, R = (X, m) => {
|
|
1133
1133
|
if (m.ur.x < X.ll.x || X.ur.x < m.ll.x || m.ur.y < X.ll.y || X.ur.y < m.ll.y) return null;
|
|
1134
1134
|
const M = X.ll.x < m.ll.x ? m.ll.x : X.ll.x, O = X.ur.x < m.ur.x ? X.ur.x : m.ur.x, B = X.ll.y < m.ll.y ? m.ll.y : X.ll.y, D = X.ur.y < m.ur.y ? X.ur.y : m.ur.y;
|
|
1135
1135
|
return {
|
|
@@ -1199,13 +1199,13 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1199
1199
|
function I(X) {
|
|
1200
1200
|
return new Float64Array(X);
|
|
1201
1201
|
}
|
|
1202
|
-
const k = 3.0000000000000018 * g, T = 2.0000000000000013 * g,
|
|
1202
|
+
const k = 3.0000000000000018 * g, T = 2.0000000000000013 * g, z = 9.000000000000007 * g * g, N = I(4), oe = I(8), j = I(12), G = I(16), q = I(4);
|
|
1203
1203
|
function K(X, m, M, O, B, D, re) {
|
|
1204
1204
|
let se, le, ne, me, ie, ue, xe, Re, Oe, He, Ve, Ge, ot, Ze, st, it, vt, rt;
|
|
1205
1205
|
const wt = X - B, kt = M - B, Mt = m - D, St = O - D;
|
|
1206
1206
|
Ze = wt * St, ue = x * wt, xe = ue - (ue - wt), Re = wt - xe, ue = x * St, Oe = ue - (ue - St), He = St - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = Mt * kt, ue = x * Mt, xe = ue - (ue - Mt), Re = Mt - xe, ue = x * kt, Oe = ue - (ue - kt), He = kt - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, N[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, N[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, N[2] = Ge - (rt - ie) + (Ve - ie), N[3] = rt;
|
|
1207
1207
|
let $t = E(4, N), gn = T * re;
|
|
1208
|
-
if ($t >= gn || -$t >= gn || (ie = X - wt, se = X - (wt + ie) + (ie - B), ie = M - kt, ne = M - (kt + ie) + (ie - B), ie = m - Mt, le = m - (Mt + ie) + (ie - D), ie = O - St, me = O - (St + ie) + (ie - D), se === 0 && le === 0 && ne === 0 && me === 0) || (gn =
|
|
1208
|
+
if ($t >= gn || -$t >= gn || (ie = X - wt, se = X - (wt + ie) + (ie - B), ie = M - kt, ne = M - (kt + ie) + (ie - B), ie = m - Mt, le = m - (Mt + ie) + (ie - D), ie = O - St, me = O - (St + ie) + (ie - D), se === 0 && le === 0 && ne === 0 && me === 0) || (gn = z * re + b * Math.abs($t), $t += wt * me + St * se - (Mt * ne + kt * le), $t >= gn || -$t >= gn)) return $t;
|
|
1209
1209
|
Ze = se * St, ue = x * se, xe = ue - (ue - se), Re = se - xe, ue = x * St, Oe = ue - (ue - St), He = St - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = le * kt, ue = x * le, xe = ue - (ue - le), Re = le - xe, ue = x * kt, Oe = ue - (ue - kt), He = kt - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, q[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, q[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, q[2] = Ge - (rt - ie) + (Ve - ie), q[3] = rt;
|
|
1210
1210
|
const $i = _(4, N, 4, q, oe);
|
|
1211
1211
|
Ze = wt * me, ue = x * wt, xe = ue - (ue - wt), Re = wt - xe, ue = x * me, Oe = ue - (ue - me), He = me - Oe, st = Re * He - (Ze - xe * Oe - Re * Oe - xe * He), it = Mt * ne, ue = x * Mt, xe = ue - (ue - Mt), Re = Mt - xe, ue = x * ne, Oe = ue - (ue - ne), He = ne - Oe, vt = Re * He - (it - xe * Oe - Re * Oe - xe * He), Ve = st - vt, ie = st - Ve, q[0] = st - (Ve + ie) + (ie - vt), Ge = Ze + Ve, ie = Ge - Ze, ot = Ze - (Ge - ie) + (Ve - ie), Ve = ot - it, ie = ot - Ve, q[1] = ot - (Ve + ie) + (ie - it), rt = Ge + Ve, ie = rt - Ge, q[2] = Ge - (rt - ie) + (Ve - ie), q[3] = rt;
|
|
@@ -1406,7 +1406,7 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1406
1406
|
getIntersection(m) {
|
|
1407
1407
|
const M = this.bbox(), O = m.bbox(), B = R(M, O);
|
|
1408
1408
|
if (B === null) return null;
|
|
1409
|
-
const D = this.leftSE.point, re = this.rightSE.point, se = m.leftSE.point, le = m.rightSE.point, ne =
|
|
1409
|
+
const D = this.leftSE.point, re = this.rightSE.point, se = m.leftSE.point, le = m.rightSE.point, ne = V(M, se) && this.comparePoint(se) === 0, me = V(O, D) && m.comparePoint(D) === 0, ie = V(M, le) && this.comparePoint(le) === 0, ue = V(O, re) && m.comparePoint(re) === 0;
|
|
1410
1410
|
if (me && ne)
|
|
1411
1411
|
return ue && !ie ? re : !ue && ie ? le : null;
|
|
1412
1412
|
if (me)
|
|
@@ -1417,7 +1417,7 @@ var aa = /* @__PURE__ */ kr(((n, e) => {
|
|
|
1417
1417
|
if (ue) return re;
|
|
1418
1418
|
if (ie) return le;
|
|
1419
1419
|
const xe = he(D, this.vector(), se, m.vector());
|
|
1420
|
-
return xe === null || !
|
|
1420
|
+
return xe === null || !V(B, xe) ? null : p.round(xe.x, xe.y);
|
|
1421
1421
|
}
|
|
1422
1422
|
split(m) {
|
|
1423
1423
|
const M = [], O = m.events !== void 0, B = new ge(m, !0), D = new ge(m, !1), re = this.rightSE;
|
|
@@ -2385,7 +2385,7 @@ function Ra(n, e, t, o, s, i, r, a, l = 0.5, c = []) {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
function To(n, e, t, o, s, i, r, a, l, c, d) {
|
|
2387
2387
|
if (d > La) return;
|
|
2388
|
-
const u = (n + t) / 2, h = (e + o) / 2, y = (t + s) / 2, f = (o + i) / 2, w = (s + r) / 2,
|
|
2388
|
+
const u = (n + t) / 2, h = (e + o) / 2, y = (t + s) / 2, f = (o + i) / 2, w = (s + r) / 2, L = (i + a) / 2, V = (u + y) / 2, R = (h + f) / 2, S = (y + w) / 2, A = (f + L) / 2, C = (V + S) / 2, P = (R + A) / 2;
|
|
2389
2389
|
if (d > 0) {
|
|
2390
2390
|
let v = r - n, p = a - e;
|
|
2391
2391
|
const g = Math.abs((t - r) * p - (o - a) * v), x = Math.abs((s - r) * p - (i - a) * v);
|
|
@@ -2409,7 +2409,7 @@ function To(n, e, t, o, s, i, r, a, l, c, d) {
|
|
|
2409
2409
|
return;
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
|
-
To(n, e, u, h,
|
|
2412
|
+
To(n, e, u, h, V, R, C, P, l, c, d + 1), To(C, P, S, A, w, L, r, a, l, c, d + 1);
|
|
2413
2413
|
}
|
|
2414
2414
|
var Oa = 8, Va = 11920929e-14, Fa = 1;
|
|
2415
2415
|
function Na(n, e, t, o, s, i, r = 0.5, a = []) {
|
|
@@ -2419,14 +2419,14 @@ function Na(n, e, t, o, s, i, r = 0.5, a = []) {
|
|
|
2419
2419
|
function Ao(n, e, t, o, s, i, r, a, l) {
|
|
2420
2420
|
if (l > Oa) return;
|
|
2421
2421
|
const c = (e + o) / 2, d = (t + s) / 2, u = (o + i) / 2, h = (s + r) / 2, y = (c + u) / 2, f = (d + h) / 2;
|
|
2422
|
-
let w = i - e,
|
|
2423
|
-
const
|
|
2424
|
-
if (
|
|
2425
|
-
if (
|
|
2422
|
+
let w = i - e, L = r - t;
|
|
2423
|
+
const V = Math.abs((o - i) * L - (s - r) * w);
|
|
2424
|
+
if (V > Va) {
|
|
2425
|
+
if (V * V <= a * (w * w + L * L)) {
|
|
2426
2426
|
n.push(y, f);
|
|
2427
2427
|
return;
|
|
2428
2428
|
}
|
|
2429
|
-
} else if (w = y - (e + i) / 2,
|
|
2429
|
+
} else if (w = y - (e + i) / 2, L = f - (t + r) / 2, w * w + L * L <= a) {
|
|
2430
2430
|
n.push(y, f);
|
|
2431
2431
|
return;
|
|
2432
2432
|
}
|
|
@@ -2474,10 +2474,10 @@ function ja(n) {
|
|
|
2474
2474
|
maxY: d[1]
|
|
2475
2475
|
};
|
|
2476
2476
|
const u = [(a[0] + c[0]) / 2, (l[1] + d[1]) / 2];
|
|
2477
|
-
let h, y, f, w,
|
|
2477
|
+
let h, y, f, w, L, V, R, S;
|
|
2478
2478
|
for (let A = 0; A < r; A += 2) {
|
|
2479
2479
|
const C = s[A], P = s[A + 1], v = Math.abs(C - u[0]), p = Math.abs(P - u[1]);
|
|
2480
|
-
P < u[1] && (!h || v < h) && (h = v, f = [C, P]), P > u[1] && (!y || v < y) && (y = v, w = [C, P]), C < u[0] && (!
|
|
2480
|
+
P < u[1] && (!h || v < h) && (h = v, f = [C, P]), P > u[1] && (!y || v < y) && (y = v, w = [C, P]), C < u[0] && (!L || p < L) && (L = p, R = [C, P]), C > u[0] && (!V || p < V) && (V = p, S = [C, P]);
|
|
2481
2481
|
}
|
|
2482
2482
|
return [
|
|
2483
2483
|
a,
|
|
@@ -2498,7 +2498,7 @@ function ja(n) {
|
|
|
2498
2498
|
if (!l || !u || !Ua(l, u)) continue;
|
|
2499
2499
|
const h = {}, y = [];
|
|
2500
2500
|
for (let f = 0, w = a.length; f < w; f++) {
|
|
2501
|
-
const [
|
|
2501
|
+
const [L, V] = a[f], R = Da(L, V, n[d]);
|
|
2502
2502
|
h[R] = (h[R] ?? 0) + 1, y.push(R);
|
|
2503
2503
|
}
|
|
2504
2504
|
y.filter((f) => f !== 0).length > y.filter((f) => f === 0).length && r.push({
|
|
@@ -2575,25 +2575,25 @@ function Za(n, e = {}) {
|
|
|
2575
2575
|
n.unshift(j, G), n.push(j, G);
|
|
2576
2576
|
}
|
|
2577
2577
|
const f = t, w = n.length / 2;
|
|
2578
|
-
let
|
|
2579
|
-
const
|
|
2578
|
+
let L = n.length;
|
|
2579
|
+
const V = f.length / 2, R = l.width / 2, S = R * R, A = l.miterLimit * l.miterLimit;
|
|
2580
2580
|
let C = n[0], P = n[1], v = n[2], p = n[3], g = 0, x = 0, b = -(P - p), _ = C - v, E = 0, I = 0, k = Math.sqrt(b * b + _ * _);
|
|
2581
2581
|
b /= k, _ /= k, b *= R, _ *= R;
|
|
2582
|
-
const T = c,
|
|
2583
|
-
h || (l.cap === "round" ?
|
|
2582
|
+
const T = c, z = (1 - T) * 2, N = T * 2;
|
|
2583
|
+
h || (l.cap === "round" ? L += Gt(C - b * (z - N) * 0.5, P - _ * (z - N) * 0.5, C - b * z, P - _ * z, C + b * N, P + _ * N, f, !0) + 2 : l.cap === "square" && (L += fs(C, P, b, _, z, N, !0, f))), f.push(C - b * z, P - _ * z), f.push(C + b * N, P + _ * N);
|
|
2584
2584
|
for (let j = 1; j < w - 1; ++j) {
|
|
2585
2585
|
C = n[(j - 1) * 2], P = n[(j - 1) * 2 + 1], v = n[j * 2], p = n[j * 2 + 1], g = n[(j + 1) * 2], x = n[(j + 1) * 2 + 1], b = -(P - p), _ = C - v, k = Math.sqrt(b * b + _ * _), b /= k, _ /= k, b *= R, _ *= R, E = -(p - x), I = v - g, k = Math.sqrt(E * E + I * I), E /= k, I /= k, E *= R, I *= R;
|
|
2586
2586
|
const G = v - C, q = P - p, K = v - g, H = x - p, Q = G * K + q * H, $ = q * K - H * G, Z = $ < 0;
|
|
2587
2587
|
if (Math.abs($) < 1e-3 * Math.abs(Q)) {
|
|
2588
|
-
f.push(v - b *
|
|
2588
|
+
f.push(v - b * z, p - _ * z), f.push(v + b * N, p + _ * N), Q >= 0 && (l.join === "round" ? L += Gt(v, p, v - b * z, p - _ * z, v - E * z, p - I * z, f, !1) + 4 : L += 2, f.push(v - E * N, p - I * N), f.push(v + E * z, p + I * z));
|
|
2589
2589
|
continue;
|
|
2590
2590
|
}
|
|
2591
|
-
const te = (-b + C) * (-_ + p) - (-b + v) * (-_ + P), ee = (-E + g) * (-I + p) - (-E + v) * (-I + x), ae = (G * ee - K * te) / $, ce = (H * te - q * ee) / $, pe = (ae - v) * (ae - v) + (ce - p) * (ce - p), he = v + (ae - v) *
|
|
2592
|
-
pe <= Ce + ke * ke * S ? l.join === "bevel" || pe / S > A ? (Z ? (f.push(he, ge), f.push(v + b * N, p + _ * N), f.push(he, ge), f.push(v + E * N, p + I * N)) : (f.push(v - b *
|
|
2591
|
+
const te = (-b + C) * (-_ + p) - (-b + v) * (-_ + P), ee = (-E + g) * (-I + p) - (-E + v) * (-I + x), ae = (G * ee - K * te) / $, ce = (H * te - q * ee) / $, pe = (ae - v) * (ae - v) + (ce - p) * (ce - p), he = v + (ae - v) * z, ge = p + (ce - p) * z, ve = v - (ae - v) * N, fe = p - (ce - p) * N, Ce = Math.min(G * G + q * q, K * K + H * H), ke = Z ? z : N;
|
|
2592
|
+
pe <= Ce + ke * ke * S ? l.join === "bevel" || pe / S > A ? (Z ? (f.push(he, ge), f.push(v + b * N, p + _ * N), f.push(he, ge), f.push(v + E * N, p + I * N)) : (f.push(v - b * z, p - _ * z), f.push(ve, fe), f.push(v - E * z, p - I * z), f.push(ve, fe)), L += 2) : l.join === "round" ? Z ? (f.push(he, ge), f.push(v + b * N, p + _ * N), L += Gt(v, p, v + b * N, p + _ * N, v + E * N, p + I * N, f, !0) + 4, f.push(he, ge), f.push(v + E * N, p + I * N)) : (f.push(v - b * z, p - _ * z), f.push(ve, fe), L += Gt(v, p, v - b * z, p - _ * z, v - E * z, p - I * z, f, !1) + 4, f.push(v - E * z, p - I * z), f.push(ve, fe)) : (f.push(he, ge), f.push(ve, fe)) : (f.push(v - b * z, p - _ * z), f.push(v + b * N, p + _ * N), l.join === "round" ? Z ? L += Gt(v, p, v + b * N, p + _ * N, v + E * N, p + I * N, f, !0) + 2 : L += Gt(v, p, v - b * z, p - _ * z, v - E * z, p - I * z, f, !1) + 2 : l.join === "miter" && pe / S <= A && (Z ? (f.push(ve, fe), f.push(ve, fe)) : (f.push(he, ge), f.push(he, ge)), L += 2), f.push(v - E * z, p - I * z), f.push(v + E * N, p + I * N), L += 2);
|
|
2593
2593
|
}
|
|
2594
|
-
C = n[(w - 2) * 2], P = n[(w - 2) * 2 + 1], v = n[(w - 1) * 2], p = n[(w - 1) * 2 + 1], b = -(P - p), _ = C - v, k = Math.sqrt(b * b + _ * _), b /= k, _ /= k, b *= R, _ *= R, f.push(v - b *
|
|
2594
|
+
C = n[(w - 2) * 2], P = n[(w - 2) * 2 + 1], v = n[(w - 1) * 2], p = n[(w - 1) * 2 + 1], b = -(P - p), _ = C - v, k = Math.sqrt(b * b + _ * _), b /= k, _ /= k, b *= R, _ *= R, f.push(v - b * z, p - _ * z), f.push(v + b * N, p + _ * N), h || (l.cap === "round" ? L += Gt(v - b * (z - N) * 0.5, p - _ * (z - N) * 0.5, v - b * z, p - _ * z, v + b * N, p + _ * N, f, !1) + 2 : l.cap === "square" && (L += fs(v, p, b, _, z, N, !1, f)));
|
|
2595
2595
|
const oe = hs * hs;
|
|
2596
|
-
for (let j =
|
|
2596
|
+
for (let j = V; j < L + V - 2; ++j)
|
|
2597
2597
|
C = f[j * 2], P = f[j * 2 + 1], v = f[(j + 1) * 2], p = f[(j + 1) * 2 + 1], g = f[(j + 2) * 2], x = f[(j + 2) * 2 + 1], !(Math.abs(C * (p - x) + v * (x - P) + g * (P - p)) < oe) && o.push(j, j + 1, j + 2);
|
|
2598
2598
|
return {
|
|
2599
2599
|
vertices: t,
|
|
@@ -2622,27 +2622,27 @@ function fs(n, e, t, o, s, i, r, a) {
|
|
|
2622
2622
|
const l = n - t * s, c = e - o * s, d = n + t * i, u = e + o * i;
|
|
2623
2623
|
let h, y;
|
|
2624
2624
|
r ? (h = o, y = -t) : (h = -o, y = t);
|
|
2625
|
-
const f = l + h, w = c + y,
|
|
2626
|
-
return a.push(f, w), a.push(
|
|
2625
|
+
const f = l + h, w = c + y, L = d + h, V = u + y;
|
|
2626
|
+
return a.push(f, w), a.push(L, V), 2;
|
|
2627
2627
|
}
|
|
2628
2628
|
function Gt(n, e, t, o, s, i, r, a) {
|
|
2629
2629
|
const l = t - n, c = o - e;
|
|
2630
2630
|
let d = Math.atan2(l, c), u = Math.atan2(s - n, i - e);
|
|
2631
2631
|
a && d < u ? d += Math.PI * 2 : !a && d > u && (u += Math.PI * 2);
|
|
2632
2632
|
let h = d;
|
|
2633
|
-
const y = u - d, f = Math.abs(y), w = Math.sqrt(l * l + c * c),
|
|
2634
|
-
if (h +=
|
|
2633
|
+
const y = u - d, f = Math.abs(y), w = Math.sqrt(l * l + c * c), L = (15 * f * Math.sqrt(w) / Math.PI >> 0) + 1, V = y / L;
|
|
2634
|
+
if (h += V, a) {
|
|
2635
2635
|
r.push(n, e), r.push(t, o);
|
|
2636
|
-
for (let R = 1, S = h; R <
|
|
2636
|
+
for (let R = 1, S = h; R < L; R++, S += V)
|
|
2637
2637
|
r.push(n, e), r.push(n + Math.sin(S) * w, e + Math.cos(S) * w);
|
|
2638
2638
|
r.push(n, e), r.push(s, i);
|
|
2639
2639
|
} else {
|
|
2640
2640
|
r.push(t, o), r.push(n, e);
|
|
2641
|
-
for (let R = 1, S = h; R <
|
|
2641
|
+
for (let R = 1, S = h; R < L; R++, S += V)
|
|
2642
2642
|
r.push(n + Math.sin(S) * w, e + Math.cos(S) * w), r.push(n, e);
|
|
2643
2643
|
r.push(s, i), r.push(n, e);
|
|
2644
2644
|
}
|
|
2645
|
-
return
|
|
2645
|
+
return L * 2;
|
|
2646
2646
|
}
|
|
2647
2647
|
var Qn = class Po {
|
|
2648
2648
|
constructor(e = 1, t = 0, o = 0, s = 1, i = 0, r = 0) {
|
|
@@ -2913,12 +2913,12 @@ function el(n, e, t, o, s, i, r, a) {
|
|
|
2913
2913
|
o = o * Math.PI / 180, e = Math.abs(e), t = Math.abs(t);
|
|
2914
2914
|
const l = (r.x - a.x) / 2, c = (r.y - a.y) / 2, d = Math.cos(o) * l + Math.sin(o) * c, u = -Math.sin(o) * l + Math.cos(o) * c;
|
|
2915
2915
|
let h = e * e, y = t * t;
|
|
2916
|
-
const f = d * d, w = u * u,
|
|
2917
|
-
if (
|
|
2918
|
-
const x = Math.sqrt(
|
|
2916
|
+
const f = d * d, w = u * u, L = f / h + w / y;
|
|
2917
|
+
if (L > 1) {
|
|
2918
|
+
const x = Math.sqrt(L);
|
|
2919
2919
|
e = x * e, t = x * t, h = e * e, y = t * t;
|
|
2920
2920
|
}
|
|
2921
|
-
const
|
|
2921
|
+
const V = h * w + y * f, R = (h * y - V) / V;
|
|
2922
2922
|
let S = Math.sqrt(Math.max(0, R));
|
|
2923
2923
|
s === i && (S = -S);
|
|
2924
2924
|
const A = S * e * u / t, C = -S * t * d / e, P = Math.cos(o) * A - Math.sin(o) * C + (r.x + a.x) / 2, v = Math.sin(o) * A + Math.cos(o) * C + (r.y + a.y) / 2, p = ms(1, 0, (d - A) / e, (u - C) / t), g = ms((d - A) / e, (u - C) / t, (-d - A) / e, (-u - C) / t) % (Math.PI * 2);
|
|
@@ -2936,8 +2936,8 @@ var Ke = {
|
|
|
2936
2936
|
function Lt(n, e, t = 0) {
|
|
2937
2937
|
let a = 0, l = !0, c = "", d = "";
|
|
2938
2938
|
const u = [];
|
|
2939
|
-
function h(
|
|
2940
|
-
const S = /* @__PURE__ */ new SyntaxError(`Unexpected character "${
|
|
2939
|
+
function h(L, V, R) {
|
|
2940
|
+
const S = /* @__PURE__ */ new SyntaxError(`Unexpected character "${L}" at index ${V}.`);
|
|
2941
2941
|
throw S.partial = R, S;
|
|
2942
2942
|
}
|
|
2943
2943
|
function y() {
|
|
@@ -2945,8 +2945,8 @@ function Lt(n, e, t = 0) {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
let f;
|
|
2947
2947
|
const w = n.length;
|
|
2948
|
-
for (let
|
|
2949
|
-
if (f = n[
|
|
2948
|
+
for (let L = 0; L < w; L++) {
|
|
2949
|
+
if (f = n[L], Array.isArray(e) && e.includes(u.length % t) && Ke.FLAGS.test(f)) {
|
|
2950
2950
|
a = 1, c = f, y();
|
|
2951
2951
|
continue;
|
|
2952
2952
|
}
|
|
@@ -2960,7 +2960,7 @@ function Lt(n, e, t = 0) {
|
|
|
2960
2960
|
a = 2, c = f;
|
|
2961
2961
|
continue;
|
|
2962
2962
|
}
|
|
2963
|
-
Ke.COMMA.test(f) && (l && h(f,
|
|
2963
|
+
Ke.COMMA.test(f) && (l && h(f, L, u), l = !0);
|
|
2964
2964
|
}
|
|
2965
2965
|
if (a === 1) {
|
|
2966
2966
|
if (Ke.DIGIT.test(f)) {
|
|
@@ -2975,7 +2975,7 @@ function Lt(n, e, t = 0) {
|
|
|
2975
2975
|
a = 3;
|
|
2976
2976
|
continue;
|
|
2977
2977
|
}
|
|
2978
|
-
Ke.SIGN.test(f) && c.length === 1 && Ke.SIGN.test(c[0]) && h(f,
|
|
2978
|
+
Ke.SIGN.test(f) && c.length === 1 && Ke.SIGN.test(c[0]) && h(f, L, u);
|
|
2979
2979
|
}
|
|
2980
2980
|
if (a === 2) {
|
|
2981
2981
|
if (Ke.DIGIT.test(f)) {
|
|
@@ -2986,7 +2986,7 @@ function Lt(n, e, t = 0) {
|
|
|
2986
2986
|
a = 3;
|
|
2987
2987
|
continue;
|
|
2988
2988
|
}
|
|
2989
|
-
Ke.POINT.test(f) && c[c.length - 1] === "." && h(f,
|
|
2989
|
+
Ke.POINT.test(f) && c[c.length - 1] === "." && h(f, L, u);
|
|
2990
2990
|
}
|
|
2991
2991
|
if (a === 3) {
|
|
2992
2992
|
if (Ke.DIGIT.test(f)) {
|
|
@@ -2998,10 +2998,10 @@ function Lt(n, e, t = 0) {
|
|
|
2998
2998
|
d += f;
|
|
2999
2999
|
continue;
|
|
3000
3000
|
}
|
|
3001
|
-
d.length === 1 && Ke.SIGN.test(d) && h(f,
|
|
3001
|
+
d.length === 1 && Ke.SIGN.test(d) && h(f, L, u);
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
3004
|
-
Ke.WHITESPACE.test(f) ? (y(), a = 0, l = !1) : Ke.COMMA.test(f) ? (y(), a = 0, l = !0) : Ke.SIGN.test(f) ? (y(), a = 1, c = f) : Ke.POINT.test(f) ? (y(), a = 2, c = f) : h(f,
|
|
3004
|
+
Ke.WHITESPACE.test(f) ? (y(), a = 0, l = !1) : Ke.COMMA.test(f) ? (y(), a = 0, l = !0) : Ke.SIGN.test(f) ? (y(), a = 1, c = f) : Ke.POINT.test(f) ? (y(), a = 2, c = f) : h(f, L, u);
|
|
3005
3005
|
}
|
|
3006
3006
|
return y(), u;
|
|
3007
3007
|
}
|
|
@@ -3533,8 +3533,8 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3533
3533
|
getMinMax(n = ye.MAX, e = ye.MIN) {
|
|
3534
3534
|
const { startAngle: t, rotate: o } = this, s = this._getDeltaAngle(), i = Math.cos(o), r = Math.sin(o), a = sn;
|
|
3535
3535
|
let l = n.x, c = n.y, d = e.x, u = e.y;
|
|
3536
|
-
const h = (
|
|
3537
|
-
this._pointAtAngle(
|
|
3536
|
+
const h = (L) => {
|
|
3537
|
+
this._pointAtAngle(L, a), a.x < l && (l = a.x), a.y < c && (c = a.y), a.x > d && (d = a.x), a.y > u && (u = a.y);
|
|
3538
3538
|
};
|
|
3539
3539
|
h(t), h(t + s);
|
|
3540
3540
|
const y = Math.atan2(-this.ry * r, this.rx * i), f = Math.atan2(this.ry * i, this.rx * r), w = [
|
|
@@ -3543,7 +3543,7 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3543
3543
|
f,
|
|
3544
3544
|
f + Math.PI
|
|
3545
3545
|
];
|
|
3546
|
-
for (let
|
|
3546
|
+
for (let L = 0; L < 4; L++) sl(w[L], t, s) && h(w[L]);
|
|
3547
3547
|
return n.set(l, c), e.set(d, u), {
|
|
3548
3548
|
min: n.finite(),
|
|
3549
3549
|
max: e.finite()
|
|
@@ -3552,7 +3552,7 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3552
3552
|
toCommands() {
|
|
3553
3553
|
const { cx: n, cy: e, rx: t, ry: o, startAngle: s, endAngle: i, clockwise: r, rotate: a } = this, l = n + t * Math.cos(s) * Math.cos(a) - o * Math.sin(s) * Math.sin(a), c = e + t * Math.cos(s) * Math.sin(a) + o * Math.sin(s) * Math.cos(a), d = Math.abs(s - i), u = d > Math.PI ? 1 : 0, h = r ? 1 : 0, y = a * 180 / Math.PI;
|
|
3554
3554
|
if (d >= 2 * Math.PI) {
|
|
3555
|
-
const f = s + Math.PI, w = n + t * Math.cos(f) * Math.cos(a) - o * Math.sin(f) * Math.sin(a),
|
|
3555
|
+
const f = s + Math.PI, w = n + t * Math.cos(f) * Math.cos(a) - o * Math.sin(f) * Math.sin(a), L = e + t * Math.cos(f) * Math.sin(a) + o * Math.sin(f) * Math.cos(a);
|
|
3556
3556
|
return [
|
|
3557
3557
|
{
|
|
3558
3558
|
type: "M",
|
|
@@ -3567,7 +3567,7 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3567
3567
|
largeArcFlag: 0,
|
|
3568
3568
|
sweepFlag: h,
|
|
3569
3569
|
x: w,
|
|
3570
|
-
y:
|
|
3570
|
+
y: L
|
|
3571
3571
|
},
|
|
3572
3572
|
{
|
|
3573
3573
|
type: "A",
|
|
@@ -3615,9 +3615,9 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3615
3615
|
const y = Math.max(12, Math.floor(12 * o ** (1 / 3) * (h / Math.PI)));
|
|
3616
3616
|
let f = h / y, w = a;
|
|
3617
3617
|
f *= u ? -1 : 1;
|
|
3618
|
-
const
|
|
3618
|
+
const L = Math.cos(u ? d : -d), V = Math.sin(u ? d : -d);
|
|
3619
3619
|
for (let R = 0; R < y + 1; R++) {
|
|
3620
|
-
const S = i + Math.cos(w) * o, A = r + Math.sin(w) * s, C = S *
|
|
3620
|
+
const S = i + Math.cos(w) * o, A = r + Math.sin(w) * s, C = S * L - A * V, P = S * V + A * L;
|
|
3621
3621
|
n.push(e + C, t + P), w += f;
|
|
3622
3622
|
}
|
|
3623
3623
|
return n;
|
|
@@ -3632,14 +3632,14 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3632
3632
|
if (c === 0)
|
|
3633
3633
|
u[f] = u[f + 6] = e + i, u[f + 1] = u[f + 3] = t + r, u[f + 2] = u[f + 4] = e - i, u[f + 5] = u[f + 7] = t - r;
|
|
3634
3634
|
else {
|
|
3635
|
-
let w = f,
|
|
3636
|
-
if (u[w++] = C, u[w++] = v, u[--
|
|
3635
|
+
let w = f, L = f + c * 4 + (i ? 2 : 0) + 2, V = L, R = d, S = i + o, A = r, C = e + S, P = e - S, v = t + A;
|
|
3636
|
+
if (u[w++] = C, u[w++] = v, u[--L] = v, u[--L] = P, r) {
|
|
3637
3637
|
const g = t - A;
|
|
3638
|
-
u[
|
|
3638
|
+
u[V++] = P, u[V++] = g, u[--R] = g, u[--R] = C;
|
|
3639
3639
|
}
|
|
3640
3640
|
for (let g = 1; g < c; g++) {
|
|
3641
3641
|
const x = Math.PI / 2 * (g / c), b = i + Math.cos(x) * o, _ = r + Math.sin(x) * s, E = e + b, I = e - b, k = t + _, T = t - _;
|
|
3642
|
-
u[w++] = E, u[w++] = k, u[--
|
|
3642
|
+
u[w++] = E, u[w++] = k, u[--L] = k, u[--L] = I, u[V++] = I, u[V++] = T, u[--R] = T, u[--R] = E;
|
|
3643
3643
|
}
|
|
3644
3644
|
S = i, A = r + s, C = e + S, P = e - S, v = t + A;
|
|
3645
3645
|
const p = t - A;
|
|
@@ -3648,7 +3648,7 @@ var ti = "data:image/svg+xml;", ey = `${ti}base64,`, ty = `${ti}charset=utf8,`,
|
|
|
3648
3648
|
}
|
|
3649
3649
|
const h = Math.cos(l ? -a : a), y = Math.sin(l ? -a : a);
|
|
3650
3650
|
for (let f = 0; f < u.length; f += 2) {
|
|
3651
|
-
const w = u[f],
|
|
3651
|
+
const w = u[f], L = u[f + 1], V = w - e, R = L - t, S = V * h - R * y, A = V * y + R * h;
|
|
3652
3652
|
n.push(e + S, t + A);
|
|
3653
3653
|
}
|
|
3654
3654
|
return n;
|
|
@@ -3678,9 +3678,9 @@ function sl(n, e, t) {
|
|
|
3678
3678
|
return t >= 0 ? (i < -1e-9 && (i += o), i >= -1e-9 && i <= t + s) : (i > s && (i -= o), i <= s && i >= t - s);
|
|
3679
3679
|
}
|
|
3680
3680
|
function il(n, e) {
|
|
3681
|
-
const t = n.rx, o = n.ry, s = Math.cos(n.rotate), i = Math.sin(n.rotate), r = new ye(t * s, t * i), a = new ye(-o * i, o * s), l = e.a * r.x + e.c * r.y, c = e.b * r.x + e.d * r.y, d = e.a * a.x + e.c * a.y, u = e.b * a.x + e.d * a.y, h = nl.set(l, c, d, u, 0, 0), { a: y, b: f, c: w, d:
|
|
3682
|
-
if (n.rx = 1 / R, n.ry = 1 / S, n.rotate = Math.atan2(
|
|
3683
|
-
const A = ps.set(R, 0, 0, S, 0, 0), C = ol.set(
|
|
3681
|
+
const t = n.rx, o = n.ry, s = Math.cos(n.rotate), i = Math.sin(n.rotate), r = new ye(t * s, t * i), a = new ye(-o * i, o * s), l = e.a * r.x + e.c * r.y, c = e.b * r.x + e.d * r.y, d = e.a * a.x + e.c * a.y, u = e.b * a.x + e.d * a.y, h = nl.set(l, c, d, u, 0, 0), { a: y, b: f, c: w, d: L } = ps.copyFrom(h).affineInvert(), V = ll(y * y + f * f, w * y + L * f, w * w + L * L), R = Math.sqrt(V.rt1), S = Math.sqrt(V.rt2);
|
|
3682
|
+
if (n.rx = 1 / R, n.ry = 1 / S, n.rotate = Math.atan2(V.sn, V.cs), !((n.endAngle - n.startAngle) % (2 * Math.PI) < Number.EPSILON)) {
|
|
3683
|
+
const A = ps.set(R, 0, 0, S, 0, 0), C = ol.set(V.cs, V.sn, -V.sn, V.cs, 0, 0), P = A.append(C).append(h), v = (p) => {
|
|
3684
3684
|
const { x: g, y: x } = P.apply({
|
|
3685
3685
|
x: Math.cos(p),
|
|
3686
3686
|
y: Math.sin(p)
|
|
@@ -4709,7 +4709,6 @@ function gl(n) {
|
|
|
4709
4709
|
layers: n.layers.map((s, i) => yl(s, i, t, o))
|
|
4710
4710
|
};
|
|
4711
4711
|
}
|
|
4712
|
-
var ny = 16384 * 16384;
|
|
4713
4712
|
function xl() {
|
|
4714
4713
|
return typeof CompressionStream < "u";
|
|
4715
4714
|
}
|
|
@@ -4743,9 +4742,13 @@ async function wl(n, e, t, o) {
|
|
|
4743
4742
|
if (f) break;
|
|
4744
4743
|
d.push(lo("IDAT", w));
|
|
4745
4744
|
}
|
|
4746
|
-
})(), h =
|
|
4747
|
-
for (let f = 0; f < t; f++)
|
|
4748
|
-
|
|
4745
|
+
})(), h = 4;
|
|
4746
|
+
for (let f = 0; f < t; f++) {
|
|
4747
|
+
const w = f * s, L = new Uint8Array(1 + s);
|
|
4748
|
+
L[0] = 1, L.set(n.subarray(w, w + h), 1);
|
|
4749
|
+
for (let V = h; V < s; V++) L[1 + V] = n[w + V] - n[w + V - h] & 255;
|
|
4750
|
+
await l.ready, await l.write(L), o && (f & 1023) === 0 && o(f / t);
|
|
4751
|
+
}
|
|
4749
4752
|
await l.close(), await u, o?.(1);
|
|
4750
4753
|
const y = new Uint8Array([
|
|
4751
4754
|
137,
|
|
@@ -4830,7 +4833,7 @@ function di(n, e) {
|
|
|
4830
4833
|
const t = typeof n == "string" ? new Blob([n], { type: "application/octet-stream" }) : n, o = URL.createObjectURL(t), s = document.createElement("a");
|
|
4831
4834
|
s.href = o, s.download = e, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
|
|
4832
4835
|
}
|
|
4833
|
-
function
|
|
4836
|
+
function ny(n) {
|
|
4834
4837
|
const { ext: e } = n, t = n.mime == null ? [] : Array.isArray(n.mime) ? n.mime : [n.mime], o = (s) => t.some((i) => s.startsWith(i));
|
|
4835
4838
|
return (s) => s instanceof File ? (e?.test(s.name) ?? !1) || o(s.type) : s instanceof Blob ? o(s.type) : !1;
|
|
4836
4839
|
}
|
|
@@ -5141,7 +5144,7 @@ function Ql(n, e) {
|
|
|
5141
5144
|
function ec(n, e) {
|
|
5142
5145
|
return IDBKeyRange.lowerBound(n, e);
|
|
5143
5146
|
}
|
|
5144
|
-
var co = "custom", gi = "updates",
|
|
5147
|
+
var co = "custom", gi = "updates", oy = 500;
|
|
5145
5148
|
function xi(n, e, t) {
|
|
5146
5149
|
const [o] = Mn(n.db, [gi]);
|
|
5147
5150
|
return Yl(o, ec(n._dbref, !1)).then((s) => {
|
|
@@ -5161,7 +5164,7 @@ function tc(n, e = !0) {
|
|
|
5161
5164
|
}));
|
|
5162
5165
|
});
|
|
5163
5166
|
}
|
|
5164
|
-
var
|
|
5167
|
+
var sy = (n) => pi(n), nc = class extends Bo {
|
|
5165
5168
|
name;
|
|
5166
5169
|
doc;
|
|
5167
5170
|
db = null;
|
|
@@ -5425,8 +5428,8 @@ var rc = class extends Bo {
|
|
|
5425
5428
|
else {
|
|
5426
5429
|
let w = this._pendingInserts.get(d);
|
|
5427
5430
|
w || (w = /* @__PURE__ */ new Set(), this._pendingInserts.set(d, w)), w.add(() => {
|
|
5428
|
-
const
|
|
5429
|
-
|
|
5431
|
+
const L = this._nodeMap.get(d);
|
|
5432
|
+
L && y(L);
|
|
5430
5433
|
});
|
|
5431
5434
|
}
|
|
5432
5435
|
}), t.splice(a, 0, ...c), a += c.length;
|
|
@@ -5564,9 +5567,9 @@ var rc = class extends Bo {
|
|
|
5564
5567
|
speed: 0
|
|
5565
5568
|
});
|
|
5566
5569
|
go(l.renderer), l.root.append(i.value), l.root.append(a.value), l.root.append(t.value);
|
|
5567
|
-
const c = de(l), d = de(), u = de(new xt()), h = de(), y = de(), f = de([]), w = dt(/* @__PURE__ */ new Map()),
|
|
5568
|
-
get: () =>
|
|
5569
|
-
set: ($) =>
|
|
5570
|
+
const c = de(l), d = de(), u = de(new xt()), h = de(), y = de(), f = de([]), w = dt(/* @__PURE__ */ new Map()), L = de([]), V = de(new xt()), R = Y({
|
|
5571
|
+
get: () => L.value.filter(($) => j($)),
|
|
5572
|
+
set: ($) => L.value = $
|
|
5570
5573
|
}), S = de(), A = de(), C = de(), P = de(e.mode ?? "canvas"), v = de(e.readonly ?? !1);
|
|
5571
5574
|
function p($) {
|
|
5572
5575
|
c.value.input.setCursor($);
|
|
@@ -5610,7 +5613,7 @@ var rc = class extends Bo {
|
|
|
5610
5613
|
align: k(ee, Z)
|
|
5611
5614
|
};
|
|
5612
5615
|
};
|
|
5613
|
-
function
|
|
5616
|
+
function z($) {
|
|
5614
5617
|
return $ instanceof In;
|
|
5615
5618
|
}
|
|
5616
5619
|
function N($) {
|
|
@@ -5649,8 +5652,8 @@ var rc = class extends Bo {
|
|
|
5649
5652
|
root: t,
|
|
5650
5653
|
nodes: f,
|
|
5651
5654
|
nodeIndexMap: w,
|
|
5652
|
-
selection:
|
|
5653
|
-
selectionMarquee:
|
|
5655
|
+
selection: L,
|
|
5656
|
+
selectionMarquee: V,
|
|
5654
5657
|
elementSelection: R,
|
|
5655
5658
|
textSelection: S,
|
|
5656
5659
|
hoverElement: A,
|
|
@@ -5664,7 +5667,7 @@ var rc = class extends Bo {
|
|
|
5664
5667
|
setCursor: p,
|
|
5665
5668
|
getGlobalPointer: b,
|
|
5666
5669
|
parseAnchor: T,
|
|
5667
|
-
isNode:
|
|
5670
|
+
isNode: z,
|
|
5668
5671
|
getNodeById: _,
|
|
5669
5672
|
isRootNode: N,
|
|
5670
5673
|
isElement: j,
|
|
@@ -5683,9 +5686,9 @@ var rc = class extends Bo {
|
|
|
5683
5686
|
f.value.push(ze), w.set(ze.id, f.value.length - 1);
|
|
5684
5687
|
}
|
|
5685
5688
|
function ge() {
|
|
5686
|
-
he(),
|
|
5689
|
+
he(), L.value = [], A.value = void 0, S.value = void 0;
|
|
5687
5690
|
}
|
|
5688
|
-
e.debug && Be(
|
|
5691
|
+
e.debug && Be(L, (Le) => {
|
|
5689
5692
|
window.$$0 = Le[0];
|
|
5690
5693
|
}), Be(ee, () => {
|
|
5691
5694
|
S.value = void 0, A.value = void 0;
|
|
@@ -5703,7 +5706,7 @@ var rc = class extends Bo {
|
|
|
5703
5706
|
}
|
|
5704
5707
|
function ke() {
|
|
5705
5708
|
const Le = c.value, ze = (Xe) => !!Xe && Le.getNodeById(Xe.id) === Xe;
|
|
5706
|
-
|
|
5709
|
+
L.value.some((Xe) => !ze(Xe)) && (L.value = L.value.filter(ze)), A.value && !ze(A.value) && (A.value = void 0);
|
|
5707
5710
|
}
|
|
5708
5711
|
let Ae = !1;
|
|
5709
5712
|
function Ee() {
|
|
@@ -6219,9 +6222,9 @@ var rc = class extends Bo {
|
|
|
6219
6222
|
}), g.style.left += E.left, g.style.top += E.top, g.style.width = E.width, g.style.height = E.height, g.updateGlobalTransform(), g.children.forEach((k, T) => {
|
|
6220
6223
|
if (e(k)) {
|
|
6221
6224
|
k.updateGlobalTransform();
|
|
6222
|
-
const
|
|
6223
|
-
x:
|
|
6224
|
-
y:
|
|
6225
|
+
const z = I[T], N = k.toLocal({
|
|
6226
|
+
x: z.left + z.width / 2,
|
|
6227
|
+
y: z.top + z.height / 2
|
|
6225
6228
|
}), oe = k.pivot, j = k.style, G = [N.x - oe.x, N.y - oe.y], q = new Qn().scale(k.scale.x, k.scale.y).skew(k.skew.x, k.skew.y).rotate(k.rotation).apply({
|
|
6226
6229
|
x: G[0],
|
|
6227
6230
|
y: G[1]
|
|
@@ -6290,14 +6293,14 @@ var rc = class extends Bo {
|
|
|
6290
6293
|
function w(g) {
|
|
6291
6294
|
return y(new jn(g));
|
|
6292
6295
|
}
|
|
6293
|
-
function
|
|
6296
|
+
function L(g) {
|
|
6294
6297
|
const x = t.value.zoom, b = t.value.position;
|
|
6295
6298
|
return {
|
|
6296
6299
|
x: g.x * x.x - b.x,
|
|
6297
6300
|
y: g.y * x.y - b.y
|
|
6298
6301
|
};
|
|
6299
6302
|
}
|
|
6300
|
-
function
|
|
6303
|
+
function V(g) {
|
|
6301
6304
|
const x = t.value.zoom, b = t.value.position;
|
|
6302
6305
|
return {
|
|
6303
6306
|
x: (g.x + b.x) / x.x,
|
|
@@ -6307,12 +6310,12 @@ var rc = class extends Bo {
|
|
|
6307
6310
|
const R = Y(() => {
|
|
6308
6311
|
const g = t.value, { position: x, zoom: b } = g;
|
|
6309
6312
|
x.x, x.y, b.x, b.y;
|
|
6310
|
-
const { left: _, top: E, right: I, bottom: k } = a.value, { width: T, height:
|
|
6313
|
+
const { left: _, top: E, right: I, bottom: k } = a.value, { width: T, height: z } = r.value, N = g.toGlobal({
|
|
6311
6314
|
x: _,
|
|
6312
6315
|
y: E
|
|
6313
6316
|
}), oe = g.toGlobal({
|
|
6314
6317
|
x: T - (I + _),
|
|
6315
|
-
y:
|
|
6318
|
+
y: z - (k + E)
|
|
6316
6319
|
});
|
|
6317
6320
|
return new xt({
|
|
6318
6321
|
x: N.x,
|
|
@@ -6327,8 +6330,8 @@ var rc = class extends Bo {
|
|
|
6327
6330
|
obbToDrawboardObb: w,
|
|
6328
6331
|
getAabb: h,
|
|
6329
6332
|
aabbToDrawboardAabb: f,
|
|
6330
|
-
globalToDrawboard:
|
|
6331
|
-
drawboardToGlobal:
|
|
6333
|
+
globalToDrawboard: L,
|
|
6334
|
+
drawboardToGlobal: V,
|
|
6332
6335
|
viewportAabb: R,
|
|
6333
6336
|
rootAabb: S,
|
|
6334
6337
|
selectionAabb: A,
|
|
@@ -6375,21 +6378,21 @@ var rc = class extends Bo {
|
|
|
6375
6378
|
}, xc = (n) => {
|
|
6376
6379
|
const { root: e, rootAabb: t, isElement: o, config: s, getAabb: i, getGlobalPointer: r, screenCenter: a, selection: l, camera: c, parseAnchor: d, exec: u } = n;
|
|
6377
6380
|
function h(f, w = {}) {
|
|
6378
|
-
const
|
|
6381
|
+
const L = s.value.canvas.frame.gap, { parent: V, index: R, sizeToFit: S, position: A, active: C, regenId: P } = w, v = V ? i(V) : void 0, p = Array.isArray(f);
|
|
6379
6382
|
let g = R;
|
|
6380
6383
|
const x = e.value.transact(() => {
|
|
6381
6384
|
const b = g, _ = (p ? f : [f]).map((k) => {
|
|
6382
6385
|
let T;
|
|
6383
|
-
|
|
6384
|
-
const
|
|
6386
|
+
V && V.id !== e.value.id ? T = V : T = e.value;
|
|
6387
|
+
const z = {
|
|
6385
6388
|
...k,
|
|
6386
6389
|
meta: {
|
|
6387
6390
|
inCanvasIs: "Element2D",
|
|
6388
6391
|
...k?.meta ?? {}
|
|
6389
6392
|
}
|
|
6390
6393
|
};
|
|
6391
|
-
P && delete
|
|
6392
|
-
const N = e.value.proxyNode(In.parse(
|
|
6394
|
+
P && delete z.id;
|
|
6395
|
+
const N = e.value.proxyNode(In.parse(z));
|
|
6393
6396
|
if (b === void 0 ? T.appendChild(N) : T.moveChild(N, b), g !== void 0 && g++, N.text.isValid() && (N.style.width || (N.style.width = N.text.base.boundingBox.width), N.style.height || (N.style.height = N.text.base.boundingBox.height)), v && v.width && v.height) {
|
|
6394
6397
|
const { width: oe, height: j } = v, G = oe / 2, q = j / 2;
|
|
6395
6398
|
if (N.style.width || (N.style.width = G), N.style.height || (N.style.height = q), S) {
|
|
@@ -6415,19 +6418,19 @@ var rc = class extends Bo {
|
|
|
6415
6418
|
x: 0,
|
|
6416
6419
|
y: 0
|
|
6417
6420
|
};
|
|
6418
|
-
const
|
|
6421
|
+
const z = {
|
|
6419
6422
|
centerX: () => I.x = k.left + k.width / 2,
|
|
6420
6423
|
centerY: () => I.y = k.top + k.height / 2
|
|
6421
6424
|
};
|
|
6422
6425
|
if (T.side === "center")
|
|
6423
|
-
|
|
6426
|
+
z.centerX(), z.centerY();
|
|
6424
6427
|
else if (T.side === "left" || T.side === "right") {
|
|
6425
6428
|
switch (T.side) {
|
|
6426
6429
|
case "left":
|
|
6427
|
-
I.x = k.left - (E.width +
|
|
6430
|
+
I.x = k.left - (E.width + L);
|
|
6428
6431
|
break;
|
|
6429
6432
|
case "right":
|
|
6430
|
-
I.x = k.left + k.width +
|
|
6433
|
+
I.x = k.left + k.width + L;
|
|
6431
6434
|
break;
|
|
6432
6435
|
}
|
|
6433
6436
|
switch (T.align) {
|
|
@@ -6438,16 +6441,16 @@ var rc = class extends Bo {
|
|
|
6438
6441
|
I.y = k.top + k.height;
|
|
6439
6442
|
break;
|
|
6440
6443
|
case "center":
|
|
6441
|
-
|
|
6444
|
+
z.centerY();
|
|
6442
6445
|
break;
|
|
6443
6446
|
}
|
|
6444
6447
|
} else if (T.side === "top" || T.side === "bottom") {
|
|
6445
6448
|
switch (T.side) {
|
|
6446
6449
|
case "top":
|
|
6447
|
-
I.y = k.top - (E.height +
|
|
6450
|
+
I.y = k.top - (E.height + L);
|
|
6448
6451
|
break;
|
|
6449
6452
|
case "bottom":
|
|
6450
|
-
I.y = k.top + k.height +
|
|
6453
|
+
I.y = k.top + k.height + L;
|
|
6451
6454
|
break;
|
|
6452
6455
|
}
|
|
6453
6456
|
switch (T.align) {
|
|
@@ -6458,7 +6461,7 @@ var rc = class extends Bo {
|
|
|
6458
6461
|
I.x = k.left + k.width;
|
|
6459
6462
|
break;
|
|
6460
6463
|
case "center":
|
|
6461
|
-
|
|
6464
|
+
z.centerX();
|
|
6462
6465
|
break;
|
|
6463
6466
|
}
|
|
6464
6467
|
}
|
|
@@ -6474,30 +6477,30 @@ var rc = class extends Bo {
|
|
|
6474
6477
|
x: Math.round(k.x - E.left),
|
|
6475
6478
|
y: Math.round(k.y - E.top)
|
|
6476
6479
|
};
|
|
6477
|
-
_.forEach((
|
|
6478
|
-
|
|
6480
|
+
_.forEach((z) => {
|
|
6481
|
+
z.style.left += T.x, z.style.top += T.y;
|
|
6479
6482
|
});
|
|
6480
6483
|
} else I && _.forEach((k) => {
|
|
6481
6484
|
k.style.left += Math.round(v ? v.left - I.x : I.x), k.style.top += Math.round(v ? v.top - I.y : I.y);
|
|
6482
6485
|
});
|
|
6483
6486
|
return _;
|
|
6484
6487
|
});
|
|
6485
|
-
return x.forEach((b) => b.updateGlobalTransform()), C && (l.value = x), !p && !
|
|
6488
|
+
return x.forEach((b) => b.updateGlobalTransform()), C && (l.value = x), !p && !V && u("nestIntoFrame", x[0]), p ? x : x[0];
|
|
6486
6489
|
}
|
|
6487
|
-
function y(f, w,
|
|
6488
|
-
const R = Math.abs(w / f.style.width), S = Math.abs(
|
|
6490
|
+
function y(f, w, L, V = {}) {
|
|
6491
|
+
const R = Math.abs(w / f.style.width), S = Math.abs(L / f.style.height);
|
|
6489
6492
|
if (n.applyResizeOverride(f, {
|
|
6490
6493
|
scaleX: R,
|
|
6491
6494
|
scaleY: S,
|
|
6492
6495
|
newWidth: w,
|
|
6493
|
-
newHeight:
|
|
6494
|
-
options:
|
|
6496
|
+
newHeight: L,
|
|
6497
|
+
options: V
|
|
6495
6498
|
})) return;
|
|
6496
6499
|
function A(C, P = !1) {
|
|
6497
6500
|
const v = C.style;
|
|
6498
6501
|
P && (v.left *= R, v.top *= S), v.width *= R, v.height *= S, C?.requestRender?.();
|
|
6499
6502
|
}
|
|
6500
|
-
A(f),
|
|
6503
|
+
A(f), V.deep && f.findOne((C) => (o(C) && A(C, !0), !1)), V.textToFit && u("textToFit", f), V.textFontSizeToFit && u("textFontSizeToFit", f, R);
|
|
6501
6504
|
}
|
|
6502
6505
|
Object.assign(n, {
|
|
6503
6506
|
addElement: h,
|
|
@@ -6506,14 +6509,14 @@ var rc = class extends Bo {
|
|
|
6506
6509
|
});
|
|
6507
6510
|
}, bc = (n) => {
|
|
6508
6511
|
const { map: e, register: t, unregister: o } = to((l) => l.name), s = de(!1), i = de(0), r = async ({ data: l, width: c, height: d, step: u, onFrame: h }) => {
|
|
6509
|
-
const { startTime: y, endTime: f } = l.meta, w = Array.from({ length: ~~((f - y) / u) }, (
|
|
6512
|
+
const { startTime: y, endTime: f } = l.meta, w = Array.from({ length: ~~((f - y) / u) }, (L, V) => y + V * u);
|
|
6510
6513
|
await n.runExclusiveRender(() => Jn({
|
|
6511
6514
|
data: l,
|
|
6512
6515
|
width: c,
|
|
6513
6516
|
height: d,
|
|
6514
6517
|
fonts: n.fonts,
|
|
6515
6518
|
keyframes: w,
|
|
6516
|
-
onKeyframe: (
|
|
6519
|
+
onKeyframe: (L, V) => h(L, V)
|
|
6517
6520
|
}));
|
|
6518
6521
|
}, a = (l, c = {}) => {
|
|
6519
6522
|
i.value = 0;
|
|
@@ -6898,7 +6901,7 @@ var $c = (n, e) => {
|
|
|
6898
6901
|
}
|
|
6899
6902
|
const l = de([]);
|
|
6900
6903
|
function c(f) {
|
|
6901
|
-
const w = l.value.filter((
|
|
6904
|
+
const w = l.value.filter((L) => L !== f);
|
|
6902
6905
|
w.push(f), l.value = w;
|
|
6903
6906
|
}
|
|
6904
6907
|
function d(f) {
|
|
@@ -6948,7 +6951,7 @@ var Vc = (n) => {
|
|
|
6948
6951
|
const u = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
|
|
6949
6952
|
return t.forEach((y) => {
|
|
6950
6953
|
const { xLines: f, yLines: w } = y.getLines();
|
|
6951
|
-
f?.forEach((
|
|
6954
|
+
f?.forEach((L) => u.add(L)), w?.forEach((L) => h.add(L));
|
|
6952
6955
|
}), {
|
|
6953
6956
|
axisX: u,
|
|
6954
6957
|
axisY: h
|
|
@@ -6964,13 +6967,13 @@ var Vc = (n) => {
|
|
|
6964
6967
|
}
|
|
6965
6968
|
function l(u, h, y, f) {
|
|
6966
6969
|
let w;
|
|
6967
|
-
for (const
|
|
6968
|
-
const
|
|
6970
|
+
for (const L of h) {
|
|
6971
|
+
const V = u + L, R = cn(y, V, f);
|
|
6969
6972
|
if (R === void 0) continue;
|
|
6970
|
-
const S = Math.abs(R -
|
|
6973
|
+
const S = Math.abs(R - V);
|
|
6971
6974
|
(!w || S < w.dist) && (w = {
|
|
6972
6975
|
line: R,
|
|
6973
|
-
offset:
|
|
6976
|
+
offset: L,
|
|
6974
6977
|
dist: S
|
|
6975
6978
|
});
|
|
6976
6979
|
}
|
|
@@ -6983,23 +6986,23 @@ var Vc = (n) => {
|
|
|
6983
6986
|
snap: (u) => {
|
|
6984
6987
|
const { axisX: h, axisY: y } = r(), f = o.value, w = l(u.left, a(u, "x"), h, f);
|
|
6985
6988
|
w && (u.left = w.line - w.offset);
|
|
6986
|
-
const
|
|
6987
|
-
|
|
6989
|
+
const L = l(u.top, a(u, "y"), y, f);
|
|
6990
|
+
L && (u.top = L.line - L.offset);
|
|
6988
6991
|
},
|
|
6989
6992
|
snapResize: (u, h) => {
|
|
6990
6993
|
if (h.length !== 1) return;
|
|
6991
|
-
const { axisX: y, axisY: f } = r(), w = o.value,
|
|
6994
|
+
const { axisX: y, axisY: f } = r(), w = o.value, L = u.left + u.width, V = u.top + u.height;
|
|
6992
6995
|
if (h === "l") {
|
|
6993
6996
|
const R = cn(y, u.left, w);
|
|
6994
|
-
R !== void 0 &&
|
|
6997
|
+
R !== void 0 && L - R >= 1 && (u.left = R, u.width = L - R);
|
|
6995
6998
|
} else if (h === "r") {
|
|
6996
|
-
const R = cn(y,
|
|
6999
|
+
const R = cn(y, L, w);
|
|
6997
7000
|
R !== void 0 && R - u.left >= 1 && (u.width = R - u.left);
|
|
6998
7001
|
} else if (h === "t") {
|
|
6999
7002
|
const R = cn(f, u.top, w);
|
|
7000
|
-
R !== void 0 &&
|
|
7003
|
+
R !== void 0 && V - R >= 1 && (u.top = R, u.height = V - R);
|
|
7001
7004
|
} else if (h === "b") {
|
|
7002
|
-
const R = cn(f,
|
|
7005
|
+
const R = cn(f, V, w);
|
|
7003
7006
|
R !== void 0 && R - u.top >= 1 && (u.height = R - u.top);
|
|
7004
7007
|
}
|
|
7005
7008
|
}
|
|
@@ -7108,13 +7111,13 @@ var Dc = bi, Bc = (n) => {
|
|
|
7108
7111
|
Uc,
|
|
7109
7112
|
jc
|
|
7110
7113
|
];
|
|
7111
|
-
function
|
|
7114
|
+
function iy(n) {
|
|
7112
7115
|
return n.type === "panel";
|
|
7113
7116
|
}
|
|
7114
|
-
function
|
|
7117
|
+
function ry(n) {
|
|
7115
7118
|
return n.type === "overlay";
|
|
7116
7119
|
}
|
|
7117
|
-
function
|
|
7120
|
+
function ay(n) {
|
|
7118
7121
|
return n.type === "dialog";
|
|
7119
7122
|
}
|
|
7120
7123
|
function $e(n, e) {
|
|
@@ -7143,29 +7146,29 @@ var Xc = $e((n) => {
|
|
|
7143
7146
|
function h(k) {
|
|
7144
7147
|
const T = c === void 0 ? 0 : k - c;
|
|
7145
7148
|
c = k;
|
|
7146
|
-
const
|
|
7149
|
+
const z = [];
|
|
7147
7150
|
a.forEach((N) => {
|
|
7148
7151
|
if (N.t += T * N.rate, N.loop)
|
|
7149
7152
|
N.span > 0 && (N.t %= N.span);
|
|
7150
7153
|
else if (N.t >= N.span) {
|
|
7151
|
-
N.t = N.span, u(N),
|
|
7154
|
+
N.t = N.span, u(N), z.push(N.node);
|
|
7152
7155
|
return;
|
|
7153
7156
|
}
|
|
7154
7157
|
u(N);
|
|
7155
|
-
}),
|
|
7158
|
+
}), z.forEach((N) => a.delete(N)), a.size ? l = requestAnimationFrame(h) : (l = void 0, c = void 0);
|
|
7156
7159
|
}
|
|
7157
7160
|
function y() {
|
|
7158
7161
|
l === void 0 && (c = void 0, l = requestAnimationFrame(h));
|
|
7159
7162
|
}
|
|
7160
7163
|
function f(k = o.value[0], T = !0) {
|
|
7161
7164
|
if (!k) return;
|
|
7162
|
-
const
|
|
7163
|
-
if (!
|
|
7164
|
-
|
|
7165
|
-
const N = Math.max(0, ...
|
|
7165
|
+
const z = d(k);
|
|
7166
|
+
if (!z.length) return;
|
|
7167
|
+
z.forEach((G) => G.setStandalone(!0));
|
|
7168
|
+
const N = Math.max(0, ...z.map((G) => (G.delay ?? 0) + (G.duration ?? 0))), oe = z.some((G) => !!G.loop), j = a.get(k);
|
|
7166
7169
|
a.set(k, {
|
|
7167
7170
|
node: k,
|
|
7168
|
-
anims:
|
|
7171
|
+
anims: z,
|
|
7169
7172
|
span: N,
|
|
7170
7173
|
loop: oe,
|
|
7171
7174
|
rate: 1,
|
|
@@ -7175,10 +7178,10 @@ var Xc = $e((n) => {
|
|
|
7175
7178
|
function w(k = o.value[0]) {
|
|
7176
7179
|
k && a.delete(k);
|
|
7177
7180
|
}
|
|
7178
|
-
function
|
|
7181
|
+
function L(k = o.value[0]) {
|
|
7179
7182
|
k && (a.has(k) ? w(k) : f(k, !1));
|
|
7180
7183
|
}
|
|
7181
|
-
function
|
|
7184
|
+
function V(k = o.value[0]) {
|
|
7182
7185
|
k && (a.delete(k), d(k).forEach((T) => T.setStandalone(!1)));
|
|
7183
7186
|
}
|
|
7184
7187
|
function R(k = o.value[0]) {
|
|
@@ -7186,25 +7189,25 @@ var Xc = $e((n) => {
|
|
|
7186
7189
|
}
|
|
7187
7190
|
function S(k, T) {
|
|
7188
7191
|
if (!k) return;
|
|
7189
|
-
const
|
|
7190
|
-
|
|
7192
|
+
const z = r(k);
|
|
7193
|
+
z.keyframes = T(z.keyframes ?? []);
|
|
7191
7194
|
}
|
|
7192
|
-
function A(k, T,
|
|
7193
|
-
S(
|
|
7195
|
+
function A(k, T, z = o.value[0]) {
|
|
7196
|
+
S(z, (N) => Sn(N, {
|
|
7194
7197
|
...T,
|
|
7195
7198
|
offset: k
|
|
7196
7199
|
}));
|
|
7197
7200
|
}
|
|
7198
7201
|
function C(k, T = o.value[0]) {
|
|
7199
|
-
S(T, (
|
|
7202
|
+
S(T, (z) => js(z, k));
|
|
7200
7203
|
}
|
|
7201
|
-
function P(k, T,
|
|
7202
|
-
S(
|
|
7204
|
+
function P(k, T, z = o.value[0]) {
|
|
7205
|
+
S(z, (N) => Hs(N, k, T));
|
|
7203
7206
|
}
|
|
7204
7207
|
function v(k, T = o.value[0]) {
|
|
7205
7208
|
if (!T) return;
|
|
7206
|
-
const
|
|
7207
|
-
k.duration !== void 0 && (
|
|
7209
|
+
const z = r(T);
|
|
7210
|
+
k.duration !== void 0 && (z.duration = k.duration), k.delay !== void 0 && (z.delay = k.delay);
|
|
7208
7211
|
}
|
|
7209
7212
|
function p(k) {
|
|
7210
7213
|
const T = k.style;
|
|
@@ -7222,19 +7225,19 @@ var Xc = $e((n) => {
|
|
|
7222
7225
|
}
|
|
7223
7226
|
function x(k, T = o.value[0]) {
|
|
7224
7227
|
if (!T) return;
|
|
7225
|
-
const
|
|
7226
|
-
if (!
|
|
7227
|
-
const N =
|
|
7228
|
+
const z = n.getAnimationPreset(k);
|
|
7229
|
+
if (!z) return;
|
|
7230
|
+
const N = z.build(p(T)), oe = 3e3;
|
|
7228
7231
|
let j = T.duration;
|
|
7229
7232
|
(!j || j <= 0) && (j = oe);
|
|
7230
|
-
const G =
|
|
7233
|
+
const G = z.category === "out" ? Math.max(0, j - z.duration) : 0, q = T, K = q.children.find((H) => H instanceof Ut && g(H) === z.category);
|
|
7231
7234
|
e.value?.transact(() => {
|
|
7232
7235
|
(!q.duration || q.duration <= 0) && (q.duration = j);
|
|
7233
7236
|
let H = K;
|
|
7234
7237
|
H || (H = new Ut({
|
|
7235
|
-
duration:
|
|
7238
|
+
duration: z.duration,
|
|
7236
7239
|
keyframes: []
|
|
7237
|
-
}), q.appendChild(H)), H.keyframes = N, H.duration =
|
|
7240
|
+
}), q.appendChild(H)), H.keyframes = N, H.duration = z.duration, H.delay = G, H.loop = !!z.loop, H.meta.presetCategory = z.category, H.meta.presetId = k;
|
|
7238
7241
|
}), n.recomputeTimelineEndTime?.();
|
|
7239
7242
|
}
|
|
7240
7243
|
function b() {
|
|
@@ -7244,14 +7247,14 @@ var Xc = $e((n) => {
|
|
|
7244
7247
|
return b()?.toJSON?.()?.easings ?? {};
|
|
7245
7248
|
}
|
|
7246
7249
|
function E(k, T) {
|
|
7247
|
-
const
|
|
7248
|
-
|
|
7250
|
+
const z = b();
|
|
7251
|
+
z && (z.easings = {
|
|
7249
7252
|
..._(),
|
|
7250
7253
|
[k]: T
|
|
7251
7254
|
});
|
|
7252
7255
|
}
|
|
7253
7256
|
function I(k = {}) {
|
|
7254
|
-
const T = s.value,
|
|
7257
|
+
const T = s.value, z = k.width ?? T.width ?? 800, N = k.height ?? T.height ?? 600, oe = k.fps ?? n.fps?.value ?? 30, j = _(), G = [];
|
|
7255
7258
|
let q = 0;
|
|
7256
7259
|
return e.value?.findOne((K) => {
|
|
7257
7260
|
if (t(K)) {
|
|
@@ -7276,7 +7279,7 @@ var Xc = $e((n) => {
|
|
|
7276
7279
|
}
|
|
7277
7280
|
return !1;
|
|
7278
7281
|
}), gl({
|
|
7279
|
-
width:
|
|
7282
|
+
width: z,
|
|
7280
7283
|
height: N,
|
|
7281
7284
|
fps: oe,
|
|
7282
7285
|
durationMs: q || 1e3,
|
|
@@ -7321,11 +7324,11 @@ var Xc = $e((n) => {
|
|
|
7321
7324
|
},
|
|
7322
7325
|
{
|
|
7323
7326
|
command: "toggleElementAnimation",
|
|
7324
|
-
handle:
|
|
7327
|
+
handle: L
|
|
7325
7328
|
},
|
|
7326
7329
|
{
|
|
7327
7330
|
command: "stopElementAnimation",
|
|
7328
|
-
handle:
|
|
7331
|
+
handle: V
|
|
7329
7332
|
},
|
|
7330
7333
|
{
|
|
7331
7334
|
command: "registerEasing",
|
|
@@ -7375,7 +7378,7 @@ var Xc = $e((n) => {
|
|
|
7375
7378
|
h && e(h) && (u = h.globalAabb);
|
|
7376
7379
|
} else u = s(t.value);
|
|
7377
7380
|
u && t.value.forEach((h) => {
|
|
7378
|
-
const y = h.getParent()?.globalAabb ?? new xt(), f = h.size.x / 2, w = h.size.y / 2,
|
|
7381
|
+
const y = h.getParent()?.globalAabb ?? new xt(), f = h.size.x / 2, w = h.size.y / 2, L = Math.cos(h.rotation), V = Math.sin(h.rotation), R = Math.abs(f * L) + Math.abs(w * V), S = Math.abs(f * V) + Math.abs(w * L);
|
|
7379
7382
|
switch (c) {
|
|
7380
7383
|
case "left":
|
|
7381
7384
|
h.style.left = u.left - y.left + R - f;
|
|
@@ -7411,7 +7414,7 @@ var Xc = $e((n) => {
|
|
|
7411
7414
|
h = "top", y = "height";
|
|
7412
7415
|
break;
|
|
7413
7416
|
}
|
|
7414
|
-
const f = [...d].sort((P, v) => P.globalAabb[h] - v.globalAabb[h]), w = f[0],
|
|
7417
|
+
const f = [...d].sort((P, v) => P.globalAabb[h] - v.globalAabb[h]), w = f[0], L = f[u - 1], V = w.globalAabb[h], R = L.globalAabb[h] + L.globalAabb[y], S = f.reduce((P, v) => P + v.globalAabb[y], 0), A = (R - V - S) / (u - 1);
|
|
7415
7418
|
let C = w.globalAabb[h] + w.globalAabb[y];
|
|
7416
7419
|
for (let P = 1; P < u - 1; P++) {
|
|
7417
7420
|
const v = f[P];
|
|
@@ -7436,13 +7439,13 @@ var Xc = $e((n) => {
|
|
|
7436
7439
|
cy: k.top + k.height / 2
|
|
7437
7440
|
};
|
|
7438
7441
|
}), h = [], y = [...u].sort((I, k) => I.cy - k.cy);
|
|
7439
|
-
let f = [y[0]], w = y[0].cy,
|
|
7442
|
+
let f = [y[0]], w = y[0].cy, L = y[0].height;
|
|
7440
7443
|
for (let I = 1; I < y.length; I++) {
|
|
7441
|
-
const k = y[I], T = w / f.length,
|
|
7442
|
-
Math.abs(k.cy - T) <=
|
|
7444
|
+
const k = y[I], T = w / f.length, z = Math.max(L, k.height) / 2;
|
|
7445
|
+
Math.abs(k.cy - T) <= z ? (f.push(k), w += k.cy, L = Math.max(L, k.height)) : (h.push(f), f = [k], w = k.cy, L = k.height);
|
|
7443
7446
|
}
|
|
7444
7447
|
h.push(f), h.forEach((I) => I.sort((k, T) => k.cx - T.cx));
|
|
7445
|
-
const
|
|
7448
|
+
const V = Math.max(...h.map((I) => I.length)), R = Array.from({ length: V }, () => 0);
|
|
7446
7449
|
h.forEach((I) => I.forEach((k, T) => {
|
|
7447
7450
|
R[T] = Math.max(R[T], k.width);
|
|
7448
7451
|
}));
|
|
@@ -7455,20 +7458,20 @@ var Xc = $e((n) => {
|
|
|
7455
7458
|
});
|
|
7456
7459
|
const C = [];
|
|
7457
7460
|
for (let I = 1; I < h.length; I++) {
|
|
7458
|
-
const k = Math.max(...h[I - 1].map((
|
|
7461
|
+
const k = Math.max(...h[I - 1].map((z) => z.top + z.height)), T = Math.min(...h[I].map((z) => z.top)) - k;
|
|
7459
7462
|
T >= 0 && C.push(T);
|
|
7460
7463
|
}
|
|
7461
7464
|
const P = A.length ? Math.min(...A) : d, v = C.length ? Math.min(...C) : d, p = Math.min(...u.map((I) => I.left)), g = Math.min(...u.map((I) => I.top)), x = [];
|
|
7462
7465
|
let b = p;
|
|
7463
|
-
for (let I = 0; I <
|
|
7466
|
+
for (let I = 0; I < V; I++)
|
|
7464
7467
|
x[I] = b, b += R[I] + P;
|
|
7465
7468
|
const _ = [];
|
|
7466
7469
|
let E = g;
|
|
7467
7470
|
for (let I = 0; I < h.length; I++)
|
|
7468
7471
|
_[I] = E, E += S[I] + v;
|
|
7469
7472
|
h.forEach((I, k) => {
|
|
7470
|
-
I.forEach((T,
|
|
7471
|
-
const N = x[
|
|
7473
|
+
I.forEach((T, z) => {
|
|
7474
|
+
const N = x[z] + T.width / 2, oe = _[k] + T.height / 2, j = T.el.getParent()?.globalAabb;
|
|
7472
7475
|
T.el.style.left = N - T.el.style.width / 2 - (j?.left ?? 0), T.el.style.top = oe - T.el.style.height / 2 - (j?.top ?? 0);
|
|
7473
7476
|
});
|
|
7474
7477
|
});
|
|
@@ -7601,10 +7604,10 @@ var Xc = $e((n) => {
|
|
|
7601
7604
|
let a;
|
|
7602
7605
|
function l(c, d) {
|
|
7603
7606
|
if (c.meta?.inEditorIs?.startsWith("Workflow")) return;
|
|
7604
|
-
const u = d?.pointer, h = c.findAncestor((
|
|
7607
|
+
const u = d?.pointer, h = c.findAncestor((L) => o(L, !0)), y = c.globalAabb, f = y.getArea();
|
|
7605
7608
|
let w = !0;
|
|
7606
|
-
for (let
|
|
7607
|
-
const R = t.value[
|
|
7609
|
+
for (let L = 0, V = t.value.length; L < V; L++) {
|
|
7610
|
+
const R = t.value[L];
|
|
7608
7611
|
if (d?.excluded.has(R.instanceId) || R.equal(c)) continue;
|
|
7609
7612
|
const S = R.globalAabb;
|
|
7610
7613
|
if (u ? S.contains(u) : y && y.getIntersectionRect(S).getArea() > f * 0.5) {
|
|
@@ -7617,8 +7620,8 @@ var Xc = $e((n) => {
|
|
|
7617
7620
|
}
|
|
7618
7621
|
}
|
|
7619
7622
|
if (w && h) {
|
|
7620
|
-
let
|
|
7621
|
-
i.value.equal(d?.parent) && (
|
|
7623
|
+
let L = i.value.children.length;
|
|
7624
|
+
i.value.equal(d?.parent) && (L = d.index), i.value.moveChild(c, L), c.style.left = y.x, c.style.top = y.y, c.updateGlobalTransform(), s("layerScrollIntoView");
|
|
7622
7625
|
}
|
|
7623
7626
|
}
|
|
7624
7627
|
return {
|
|
@@ -7632,7 +7635,7 @@ var Xc = $e((n) => {
|
|
|
7632
7635
|
if (c !== "move" || d?.__FROM__) return;
|
|
7633
7636
|
const u = e(), h = t.value.find((f) => f.globalAabb.contains(u)), y = /* @__PURE__ */ new Set();
|
|
7634
7637
|
if (r.value.forEach((f) => {
|
|
7635
|
-
const w = o(f, !0) ? f : f.findAncestor((
|
|
7638
|
+
const w = o(f, !0) ? f : f.findAncestor((L) => o(L, !0));
|
|
7636
7639
|
w ? w.equal(h) && y.add(w.instanceId) : y.add(0);
|
|
7637
7640
|
}), y.size === 1) {
|
|
7638
7641
|
const f = {};
|
|
@@ -7703,7 +7706,7 @@ var Xc = $e((n) => {
|
|
|
7703
7706
|
o(), e.on("historyChanged", o);
|
|
7704
7707
|
}), Wi(() => {
|
|
7705
7708
|
e.off("historyChanged", o);
|
|
7706
|
-
}), (r, a) => (U(), J("div", Kc, [t.value.length ? _e("", !0) : (U(), J("div", Zc, be(
|
|
7709
|
+
}), (r, a) => (U(), J("div", Kc, [t.value.length ? _e("", !0) : (U(), J("div", Zc, be(F(e).t("components.empty")), 1)), (U(!0), J(we, null, Pe(t.value, (l) => (U(), J("div", {
|
|
7707
7710
|
key: l.id,
|
|
7708
7711
|
class: "mce-components__item",
|
|
7709
7712
|
title: l.name,
|
|
@@ -7802,14 +7805,14 @@ var Xc = $e((n) => {
|
|
|
7802
7805
|
return v?.inEditorIs === "Instance" && v.componentId === A && t(P) && C(P), !1;
|
|
7803
7806
|
});
|
|
7804
7807
|
}
|
|
7805
|
-
function
|
|
7808
|
+
function L(A) {
|
|
7806
7809
|
w(A, u);
|
|
7807
7810
|
}
|
|
7808
|
-
function
|
|
7811
|
+
function V(A, C = o.value[0]) {
|
|
7809
7812
|
!l(A) || !C || (a(r().map((P) => P.id === A ? {
|
|
7810
7813
|
...P,
|
|
7811
7814
|
node: C.toJSON()
|
|
7812
|
-
} : P)),
|
|
7815
|
+
} : P)), L(A));
|
|
7813
7816
|
}
|
|
7814
7817
|
function R(A) {
|
|
7815
7818
|
if (!Array.isArray(A) || A.length === 0) return;
|
|
@@ -7856,11 +7859,11 @@ var Xc = $e((n) => {
|
|
|
7856
7859
|
},
|
|
7857
7860
|
{
|
|
7858
7861
|
command: "updateComponent",
|
|
7859
|
-
handle:
|
|
7862
|
+
handle: V
|
|
7860
7863
|
},
|
|
7861
7864
|
{
|
|
7862
7865
|
command: "syncInstancesOf",
|
|
7863
|
-
handle:
|
|
7866
|
+
handle: L
|
|
7864
7867
|
},
|
|
7865
7868
|
{
|
|
7866
7869
|
command: "getComponents",
|
|
@@ -7887,18 +7890,18 @@ var Xc = $e((n) => {
|
|
|
7887
7890
|
function w(P) {
|
|
7888
7891
|
P.findOne((v) => (v instanceof Ht && (v.foreground.texture?.destroy(), v.foreground.animatedTexture?.destroy(), v.fill.texture?.destroy(), v.fill.animatedTexture?.destroy(), v.background.texture?.destroy(), v.background.animatedTexture?.destroy()), !1));
|
|
7889
7892
|
}
|
|
7890
|
-
function
|
|
7893
|
+
function L(P) {
|
|
7891
7894
|
if (Array.isArray(P)) return P;
|
|
7892
7895
|
const v = P instanceof ln ? P : new ln(P);
|
|
7893
7896
|
v.init();
|
|
7894
7897
|
const p = v.toJSON().children ?? [];
|
|
7895
7898
|
return v.destroy(), p;
|
|
7896
7899
|
}
|
|
7897
|
-
const
|
|
7900
|
+
const V = (P) => {
|
|
7898
7901
|
d.clear();
|
|
7899
7902
|
const v = t.value;
|
|
7900
7903
|
if (n.collaboration?.active?.value) {
|
|
7901
|
-
const g =
|
|
7904
|
+
const g = L(P);
|
|
7902
7905
|
return w(v), v.transact(() => v.set({ children: g }), !0), v.clearHistory(), s("docSet", v, v), v;
|
|
7903
7906
|
}
|
|
7904
7907
|
const p = P instanceof ln ? P : new ln(P);
|
|
@@ -7909,22 +7912,22 @@ var Xc = $e((n) => {
|
|
|
7909
7912
|
await c();
|
|
7910
7913
|
const v = new ln(await o(P));
|
|
7911
7914
|
a.value.db.local && await v.loadIndexeddb();
|
|
7912
|
-
const p =
|
|
7915
|
+
const p = V(v);
|
|
7913
7916
|
return s("docLoaded", P, p), i.value = !1, p;
|
|
7914
7917
|
} catch (v) {
|
|
7915
7918
|
throw s("docLoaded", P, v), i.value = !1, v;
|
|
7916
7919
|
}
|
|
7917
7920
|
}, S = async () => {
|
|
7918
|
-
|
|
7921
|
+
V([]), s("docCleared");
|
|
7919
7922
|
}, A = async () => {
|
|
7920
|
-
|
|
7923
|
+
V([]);
|
|
7921
7924
|
}, C = async () => {
|
|
7922
7925
|
const [P] = await u();
|
|
7923
7926
|
P && await R(P);
|
|
7924
7927
|
};
|
|
7925
7928
|
return Object.assign(n, {
|
|
7926
7929
|
getDoc: h,
|
|
7927
|
-
setDoc:
|
|
7930
|
+
setDoc: V,
|
|
7928
7931
|
loadDoc: R,
|
|
7929
7932
|
clearDoc: S,
|
|
7930
7933
|
newDoc: A,
|
|
@@ -7938,7 +7941,7 @@ var Xc = $e((n) => {
|
|
|
7938
7941
|
},
|
|
7939
7942
|
{
|
|
7940
7943
|
command: "setDoc",
|
|
7941
|
-
handle:
|
|
7944
|
+
handle: V
|
|
7942
7945
|
},
|
|
7943
7946
|
{
|
|
7944
7947
|
command: "loadDoc",
|
|
@@ -7966,7 +7969,7 @@ var Xc = $e((n) => {
|
|
|
7966
7969
|
}],
|
|
7967
7970
|
setup: async () => {
|
|
7968
7971
|
const { doc: P } = e;
|
|
7969
|
-
P ? await
|
|
7972
|
+
P ? await V(P) : e.db?.local && await t.value.loadIndexeddb();
|
|
7970
7973
|
}
|
|
7971
7974
|
};
|
|
7972
7975
|
}), iu = $e((n, e) => {
|
|
@@ -7987,7 +7990,7 @@ var Xc = $e((n) => {
|
|
|
7987
7990
|
}), o.value = [];
|
|
7988
7991
|
}
|
|
7989
7992
|
l.value = void 0;
|
|
7990
|
-
},
|
|
7993
|
+
}, L = async (g) => {
|
|
7991
7994
|
if (typeof g == "string")
|
|
7992
7995
|
y && await navigator.clipboard.write([new ClipboardItem({ "text/plain": new Blob([g], { type: "text/plain" }) })]);
|
|
7993
7996
|
else if (g instanceof Blob)
|
|
@@ -8036,7 +8039,7 @@ var Xc = $e((n) => {
|
|
|
8036
8039
|
}
|
|
8037
8040
|
Array.isArray(g) && (h.value = g);
|
|
8038
8041
|
}
|
|
8039
|
-
},
|
|
8042
|
+
}, V = async (g, x = {}) => {
|
|
8040
8043
|
let b = await c(g, {
|
|
8041
8044
|
selected: !0,
|
|
8042
8045
|
...x
|
|
@@ -8044,7 +8047,7 @@ var Xc = $e((n) => {
|
|
|
8044
8047
|
const _ = d.get(g);
|
|
8045
8048
|
_ && typeof _.copyAs == "function" && (b = _.copyAs(b)), s("copy", b);
|
|
8046
8049
|
}, R = async () => {
|
|
8047
|
-
await
|
|
8050
|
+
await L(), s("delete");
|
|
8048
8051
|
};
|
|
8049
8052
|
let S = !1, A;
|
|
8050
8053
|
function C() {
|
|
@@ -8093,7 +8096,7 @@ var Xc = $e((n) => {
|
|
|
8093
8096
|
}
|
|
8094
8097
|
case "string":
|
|
8095
8098
|
if (E.type === "application/json") {
|
|
8096
|
-
const I = await new Promise((
|
|
8099
|
+
const I = await new Promise((z) => E.getAsString(z)), k = new Blob([I], { type: E.type }), T = new File([k], "data.json", { type: E.type });
|
|
8097
8100
|
_.push(new ClipboardItem({ [E.type]: T }));
|
|
8098
8101
|
}
|
|
8099
8102
|
break;
|
|
@@ -8134,11 +8137,11 @@ var Xc = $e((n) => {
|
|
|
8134
8137
|
},
|
|
8135
8138
|
{
|
|
8136
8139
|
command: "copy",
|
|
8137
|
-
handle:
|
|
8140
|
+
handle: L
|
|
8138
8141
|
},
|
|
8139
8142
|
{
|
|
8140
8143
|
command: "copyAs",
|
|
8141
|
-
handle:
|
|
8144
|
+
handle: V
|
|
8142
8145
|
},
|
|
8143
8146
|
{
|
|
8144
8147
|
command: "cut",
|
|
@@ -8270,13 +8273,13 @@ var Xc = $e((n) => {
|
|
|
8270
8273
|
function w() {
|
|
8271
8274
|
h() ? f() : y();
|
|
8272
8275
|
}
|
|
8273
|
-
function
|
|
8276
|
+
function L(R, S) {
|
|
8274
8277
|
const A = u();
|
|
8275
8278
|
if (!A) return;
|
|
8276
8279
|
const C = A.style;
|
|
8277
8280
|
C[R] = S, A.requestDraw?.();
|
|
8278
8281
|
}
|
|
8279
|
-
function
|
|
8282
|
+
function V(R) {
|
|
8280
8283
|
return u()?.style?.[R];
|
|
8281
8284
|
}
|
|
8282
8285
|
return {
|
|
@@ -8300,11 +8303,11 @@ var Xc = $e((n) => {
|
|
|
8300
8303
|
},
|
|
8301
8304
|
{
|
|
8302
8305
|
command: "setFlexStyle",
|
|
8303
|
-
handle:
|
|
8306
|
+
handle: L
|
|
8304
8307
|
},
|
|
8305
8308
|
{
|
|
8306
8309
|
command: "getFlexStyle",
|
|
8307
|
-
handle:
|
|
8310
|
+
handle: V
|
|
8308
8311
|
}
|
|
8309
8312
|
],
|
|
8310
8313
|
events: {
|
|
@@ -8419,8 +8422,8 @@ var _s = Se({
|
|
|
8419
8422
|
},
|
|
8420
8423
|
setup(n) {
|
|
8421
8424
|
const e = n, t = Is(), { iconData: o } = fu(Y(() => e.icon)), s = !!(t.onClick || t.onClickOnce);
|
|
8422
|
-
return (i, r) => (U(), Fe(No(
|
|
8423
|
-
icon:
|
|
8425
|
+
return (i, r) => (U(), Fe(No(F(o).component), {
|
|
8426
|
+
icon: F(o).icon,
|
|
8424
8427
|
tag: e.tag,
|
|
8425
8428
|
class: De(["m-icon", { "m-icon--disabled": e.disabled }]),
|
|
8426
8429
|
role: s ? "button" : void 0,
|
|
@@ -8703,7 +8706,7 @@ function ku(n) {
|
|
|
8703
8706
|
"--m-layout-top": On(f.value.top),
|
|
8704
8707
|
"--m-layout-bottom": On(f.value.bottom),
|
|
8705
8708
|
...y.value ? void 0 : { transition: "none" }
|
|
8706
|
-
})),
|
|
8709
|
+
})), L = Y(() => h.value.slice(1).map(({ id: A }, C) => {
|
|
8707
8710
|
const { layer: P } = h.value[C], v = i.get(A), p = s.get(A);
|
|
8708
8711
|
return {
|
|
8709
8712
|
id: A,
|
|
@@ -8711,7 +8714,7 @@ function ku(n) {
|
|
|
8711
8714
|
size: Number(v.value),
|
|
8712
8715
|
position: p.value
|
|
8713
8716
|
};
|
|
8714
|
-
})),
|
|
8717
|
+
})), V = (A) => L.value.find((C) => C.id === A), R = Qt(), S = Zt(!1);
|
|
8715
8718
|
return Vt(() => {
|
|
8716
8719
|
S.value = !0;
|
|
8717
8720
|
}), Yt(Kn, {
|
|
@@ -8719,17 +8722,17 @@ function ku(n) {
|
|
|
8719
8722
|
r.set(C, P), s.set(C, v), i.set(C, p), a.set(C, x), b && l.set(C, b);
|
|
8720
8723
|
const _ = dn(Ci, R?.vnode).indexOf(A);
|
|
8721
8724
|
_ > -1 ? o.value.splice(_, 0, C) : o.value.push(C);
|
|
8722
|
-
const E = Y(() =>
|
|
8725
|
+
const E = Y(() => L.value.findIndex((k) => k.id === C)), I = Y(() => t.value + h.value.length * 2 - E.value * 2);
|
|
8723
8726
|
return {
|
|
8724
8727
|
layoutItemStyles: Y(() => {
|
|
8725
|
-
const k = v.value === "left" || v.value === "right", T = v.value === "right",
|
|
8728
|
+
const k = v.value === "left" || v.value === "right", T = v.value === "right", z = v.value === "bottom", N = g.value ?? p.value, oe = N === 0 ? "%" : "px", j = {
|
|
8726
8729
|
[v.value]: 0,
|
|
8727
8730
|
zIndex: I.value,
|
|
8728
|
-
transform: `translate${k ? "X" : "Y"}(${(x.value ? 0 : -(N === 0 ? 100 : N)) * (T ||
|
|
8731
|
+
transform: `translate${k ? "X" : "Y"}(${(x.value ? 0 : -(N === 0 ? 100 : N)) * (T || z ? -1 : 1)}${oe})`,
|
|
8729
8732
|
...y.value ? void 0 : { transition: "none" }
|
|
8730
8733
|
};
|
|
8731
8734
|
if (!S.value) return j;
|
|
8732
|
-
const G =
|
|
8735
|
+
const G = L.value[E.value];
|
|
8733
8736
|
G || ft.warn(`Could not find layout item "${C}"`);
|
|
8734
8737
|
const q = u.value.get(C);
|
|
8735
8738
|
return q && (G[q.position] += q.amount), {
|
|
@@ -8751,8 +8754,8 @@ function ku(n) {
|
|
|
8751
8754
|
},
|
|
8752
8755
|
mainRect: f,
|
|
8753
8756
|
mainStyles: w,
|
|
8754
|
-
getLayoutItem:
|
|
8755
|
-
items:
|
|
8757
|
+
getLayoutItem: V,
|
|
8758
|
+
items: L,
|
|
8756
8759
|
layoutRect: d,
|
|
8757
8760
|
rootZIndex: t
|
|
8758
8761
|
}), {
|
|
@@ -8762,8 +8765,8 @@ function ku(n) {
|
|
|
8762
8765
|
position: e ? "relative" : void 0,
|
|
8763
8766
|
overflow: e ? "hidden" : void 0
|
|
8764
8767
|
})),
|
|
8765
|
-
getLayoutItem:
|
|
8766
|
-
items:
|
|
8768
|
+
getLayoutItem: V,
|
|
8769
|
+
items: L,
|
|
8767
8770
|
layoutRect: d,
|
|
8768
8771
|
layoutRef: c
|
|
8769
8772
|
};
|
|
@@ -8867,35 +8870,35 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
8867
8870
|
}
|
|
8868
8871
|
}
|
|
8869
8872
|
return (f, w) => pt((U(), J("div", {
|
|
8870
|
-
style: Ie(
|
|
8873
|
+
style: Ie(F(o)(e.value, "drawboard").toCssStyle()),
|
|
8871
8874
|
class: De(["m-frame", [
|
|
8872
8875
|
n.outline && "m-frame--outline",
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
+
F(s)?.equal(e.value) && "m-frame--hover",
|
|
8877
|
+
F(i).some((L) => L.equal(e.value)) && "m-frame--selected",
|
|
8878
|
+
F(d)(e.value) && "m-frame--lock"
|
|
8876
8879
|
]])
|
|
8877
8880
|
}, [W("div", {
|
|
8878
8881
|
class: "m-frame__name",
|
|
8879
8882
|
onDblclick: Je(h, ["prevent", "stop"]),
|
|
8880
8883
|
onPointerdown: y,
|
|
8881
|
-
onPointerenter: w[2] || (w[2] = (
|
|
8882
|
-
onPointerleave: w[3] || (w[3] = (
|
|
8884
|
+
onPointerenter: w[2] || (w[2] = (L) => !F(r) && !F(d)(e.value) && (s.value = e.value)),
|
|
8885
|
+
onPointerleave: w[3] || (w[3] = (L) => !F(r) && !F(d)(e.value) && (s.value = void 0))
|
|
8883
8886
|
}, [W("div", null, be(e.value.name), 1), u.value ? pt((U(), J("input", {
|
|
8884
8887
|
key: 0,
|
|
8885
8888
|
ref: "inputTpl",
|
|
8886
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
8889
|
+
"onUpdate:modelValue": w[0] || (w[0] = (L) => e.value.name = L),
|
|
8887
8890
|
name: "frame-name",
|
|
8888
|
-
onBlur: w[1] || (w[1] = (
|
|
8891
|
+
onBlur: w[1] || (w[1] = (L) => u.value = !1)
|
|
8889
8892
|
}, null, 544)), [[$n, e.value.name]]) : _e("", !0)], 32)], 6)), [[$s, e.value.visible]]);
|
|
8890
8893
|
}
|
|
8891
8894
|
}), Tu = Eu, Au = { class: "m-frames" }, Pu = /* @__PURE__ */ Se({
|
|
8892
8895
|
__name: "Frames",
|
|
8893
8896
|
setup(n) {
|
|
8894
8897
|
const { frames: e, getConfigRef: t } = qe(), o = t("canvas.frame");
|
|
8895
|
-
return (s, i) => (U(), J("div", Au, [(U(!0), J(we, null, Pe(
|
|
8898
|
+
return (s, i) => (U(), J("div", Au, [(U(!0), J(we, null, Pe(F(e), (r, a) => (U(), Fe(Tu, {
|
|
8896
8899
|
key: a,
|
|
8897
8900
|
"model-value": r,
|
|
8898
|
-
outline:
|
|
8901
|
+
outline: F(o).outline
|
|
8899
8902
|
}, null, 8, ["model-value", "outline"]))), 128))]));
|
|
8900
8903
|
}
|
|
8901
8904
|
}), Iu = Pu, $u = $e((n) => {
|
|
@@ -8946,7 +8949,7 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
8946
8949
|
let y = null;
|
|
8947
8950
|
function f(w) {
|
|
8948
8951
|
y?.(), i.value.thumbnail && c();
|
|
8949
|
-
function
|
|
8952
|
+
function L(R, S) {
|
|
8950
8953
|
if (i.value.thumbnail && l(R, "Frame")) {
|
|
8951
8954
|
const A = u.value.findIndex((C) => C.equal(R));
|
|
8952
8955
|
h.value.splice(A, 0, {
|
|
@@ -8957,11 +8960,11 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
8957
8960
|
}), d(A);
|
|
8958
8961
|
}
|
|
8959
8962
|
}
|
|
8960
|
-
function
|
|
8963
|
+
function V(R, S) {
|
|
8961
8964
|
i.value.thumbnail && l(R, "Frame") && h.value.splice(h.value.findIndex((A) => A.instanceId === R.instanceId), 1);
|
|
8962
8965
|
}
|
|
8963
|
-
w.on("addChild",
|
|
8964
|
-
w.off("addChild",
|
|
8966
|
+
w.on("addChild", L), w.on("removeChild", V), y = () => {
|
|
8967
|
+
w.off("addChild", L), w.off("removeChild", V);
|
|
8965
8968
|
};
|
|
8966
8969
|
}
|
|
8967
8970
|
bt(() => {
|
|
@@ -9039,10 +9042,10 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9039
9042
|
}, null, 8, Ru)])) : i.value ? (U(), J("div", {
|
|
9040
9043
|
key: 1,
|
|
9041
9044
|
class: "m-hover",
|
|
9042
|
-
"data-name":
|
|
9045
|
+
"data-name": F(t)?.name,
|
|
9043
9046
|
style: Ie({
|
|
9044
9047
|
borderColor: "currentcolor",
|
|
9045
|
-
borderRadius: `${(
|
|
9048
|
+
borderRadius: `${(F(t)?.style?.borderRadius ?? 0) * F(s).zoom.x}px`,
|
|
9046
9049
|
...l.value.toCssStyle()
|
|
9047
9050
|
})
|
|
9048
9051
|
}, null, 12, Ou)) : _e("", !0);
|
|
@@ -9065,8 +9068,8 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9065
9068
|
name: d,
|
|
9066
9069
|
saveAs: !0,
|
|
9067
9070
|
handle: async (u) => {
|
|
9068
|
-
const h = await o("json", u), y = Math.max(1, Math.floor(h.style.width)), f = Math.max(1, Math.floor(h.style.height)), w = (
|
|
9069
|
-
|
|
9071
|
+
const h = await o("json", u), y = Math.max(1, Math.floor(h.style.width)), f = Math.max(1, Math.floor(h.style.height)), w = (V) => {
|
|
9072
|
+
V.root.append(new Ro({
|
|
9070
9073
|
...r.value.getProperties(),
|
|
9071
9074
|
internalMode: "back",
|
|
9072
9075
|
effectMode: "before",
|
|
@@ -9074,22 +9077,22 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9074
9077
|
pixelGrid: !1
|
|
9075
9078
|
}));
|
|
9076
9079
|
};
|
|
9077
|
-
if (d === "png" &&
|
|
9080
|
+
if (d === "png" && xl()) return wl(await a(() => qi({
|
|
9078
9081
|
data: h,
|
|
9079
9082
|
fonts: s,
|
|
9080
9083
|
width: y,
|
|
9081
9084
|
height: f,
|
|
9082
9085
|
onBefore: w
|
|
9083
9086
|
})), y, f);
|
|
9084
|
-
const
|
|
9087
|
+
const L = await a(() => Jn({
|
|
9085
9088
|
data: h,
|
|
9086
9089
|
fonts: s,
|
|
9087
9090
|
width: h.style.width,
|
|
9088
9091
|
height: h.style.height,
|
|
9089
9092
|
onBefore: w
|
|
9090
9093
|
}));
|
|
9091
|
-
return await new Promise((
|
|
9092
|
-
|
|
9094
|
+
return await new Promise((V) => {
|
|
9095
|
+
L.toBlob((R) => V(R), d === "jpg" ? "image/jpeg" : `image/${d}`);
|
|
9093
9096
|
});
|
|
9094
9097
|
}
|
|
9095
9098
|
};
|
|
@@ -9178,11 +9181,11 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9178
9181
|
top: d.top
|
|
9179
9182
|
};
|
|
9180
9183
|
}
|
|
9181
|
-
return (c, d) =>
|
|
9184
|
+
return (c, d) => F(s) ? _e("", !0) : (U(), J("div", qu, [(U(!0), J(we, null, Pe(a.value, (u) => (U(), J("div", {
|
|
9182
9185
|
key: u.id,
|
|
9183
9186
|
class: "m-itx-badge",
|
|
9184
9187
|
style: Ie(l(u))
|
|
9185
|
-
}, [Me(
|
|
9188
|
+
}, [Me(F(je), { icon: "$gps" })], 4))), 128))]));
|
|
9186
9189
|
}
|
|
9187
9190
|
}), ju = Uu, Hu = { class: "m-interactions" }, Xu = { class: "m-interactions__head" }, Yu = { class: "m-interactions__scroll" }, Gu = {
|
|
9188
9191
|
key: 0,
|
|
@@ -9236,13 +9239,13 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9236
9239
|
action: "restart"
|
|
9237
9240
|
}]);
|
|
9238
9241
|
}
|
|
9239
|
-
function
|
|
9242
|
+
function L(C, P) {
|
|
9240
9243
|
f(u.value.map((v, p) => p === C ? {
|
|
9241
9244
|
...v,
|
|
9242
9245
|
...P
|
|
9243
9246
|
} : v));
|
|
9244
9247
|
}
|
|
9245
|
-
function
|
|
9248
|
+
function V(C) {
|
|
9246
9249
|
f(u.value.filter((P, v) => v !== C));
|
|
9247
9250
|
}
|
|
9248
9251
|
const R = [
|
|
@@ -9252,9 +9255,9 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9252
9255
|
"<"
|
|
9253
9256
|
];
|
|
9254
9257
|
function S(C, P) {
|
|
9255
|
-
if (!P) return
|
|
9258
|
+
if (!P) return L(C, { condition: void 0 });
|
|
9256
9259
|
const v = u.value[C].condition;
|
|
9257
|
-
|
|
9260
|
+
L(C, { condition: {
|
|
9258
9261
|
variableId: P,
|
|
9259
9262
|
op: v?.op ?? "==",
|
|
9260
9263
|
value: v?.value ?? ""
|
|
@@ -9262,19 +9265,19 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9262
9265
|
}
|
|
9263
9266
|
function A(C, P) {
|
|
9264
9267
|
const v = u.value[C].condition;
|
|
9265
|
-
v &&
|
|
9268
|
+
v && L(C, { condition: {
|
|
9266
9269
|
...v,
|
|
9267
9270
|
...P
|
|
9268
9271
|
} });
|
|
9269
9272
|
}
|
|
9270
9273
|
return (C, P) => (U(), J("div", Hu, [W("div", Xu, [W("button", {
|
|
9271
|
-
class: De(["m-interactions__preview", { "m-interactions__preview--on":
|
|
9274
|
+
class: De(["m-interactions__preview", { "m-interactions__preview--on": F(i) }]),
|
|
9272
9275
|
type: "button",
|
|
9273
|
-
onClick: P[0] || (P[0] = (v) =>
|
|
9274
|
-
}, [Me(
|
|
9276
|
+
onClick: P[0] || (P[0] = (v) => F(o)("togglePreview"))
|
|
9277
|
+
}, [Me(F(je), { icon: F(i) ? "$pause" : "$play" }, null, 8, ["icon"]), mt(" " + be(F(i) ? F(s)("exitPreview") : F(s)("preview")), 1)], 2), W("label", Yu, [pt(W("input", {
|
|
9275
9278
|
"onUpdate:modelValue": P[1] || (P[1] = (v) => Gn(r) ? r.value = v : null),
|
|
9276
9279
|
type: "checkbox"
|
|
9277
|
-
}, null, 512), [[Qi,
|
|
9280
|
+
}, null, 512), [[Qi, F(r)]]), mt(" " + be(F(s)("scrollDriven")), 1)])]), c.value ? (U(), J(we, { key: 1 }, [(U(!0), J(we, null, Pe(u.value, (v, p) => (U(), J("div", {
|
|
9278
9281
|
key: v.id,
|
|
9279
9282
|
class: "m-interactions__row"
|
|
9280
9283
|
}, [
|
|
@@ -9282,29 +9285,29 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9282
9285
|
W("select", {
|
|
9283
9286
|
class: "m-interactions__select",
|
|
9284
9287
|
value: v.trigger,
|
|
9285
|
-
onChange: (g) =>
|
|
9288
|
+
onChange: (g) => L(p, { trigger: g.target.value })
|
|
9286
9289
|
}, [(U(), J(we, null, Pe(a, (g) => W("option", {
|
|
9287
9290
|
key: g,
|
|
9288
9291
|
value: g
|
|
9289
|
-
}, be(
|
|
9290
|
-
Me(
|
|
9292
|
+
}, be(F(s)(`trigger_${g}`)), 9, Zu)), 64))], 40, Ku),
|
|
9293
|
+
Me(F(je), {
|
|
9291
9294
|
icon: "$arrowRight",
|
|
9292
9295
|
class: "m-interactions__arrow"
|
|
9293
9296
|
}),
|
|
9294
9297
|
W("select", {
|
|
9295
9298
|
class: "m-interactions__select",
|
|
9296
9299
|
value: v.action,
|
|
9297
|
-
onChange: (g) =>
|
|
9300
|
+
onChange: (g) => L(p, { action: g.target.value })
|
|
9298
9301
|
}, [(U(), J(we, null, Pe(l, (g) => W("option", {
|
|
9299
9302
|
key: g,
|
|
9300
9303
|
value: g
|
|
9301
|
-
}, be(
|
|
9304
|
+
}, be(F(s)(`action_${g}`)), 9, Qu)), 64))], 40, Ju),
|
|
9302
9305
|
W("button", {
|
|
9303
9306
|
class: "m-interactions__del",
|
|
9304
9307
|
type: "button",
|
|
9305
|
-
title:
|
|
9306
|
-
onClick: (g) =>
|
|
9307
|
-
}, [Me(
|
|
9308
|
+
title: F(s)("removeInteraction"),
|
|
9309
|
+
onClick: (g) => V(p)
|
|
9310
|
+
}, [Me(F(je), { icon: "$close" })], 8, ed)
|
|
9308
9311
|
]),
|
|
9309
9312
|
v.action === "openUrl" ? (U(), J("input", {
|
|
9310
9313
|
key: 0,
|
|
@@ -9312,36 +9315,36 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9312
9315
|
type: "text",
|
|
9313
9316
|
value: v.url ?? "",
|
|
9314
9317
|
placeholder: "https://",
|
|
9315
|
-
onChange: (g) =>
|
|
9318
|
+
onChange: (g) => L(p, { url: g.target.value })
|
|
9316
9319
|
}, null, 40, td)) : v.action === "navigate" ? (U(), J("select", {
|
|
9317
9320
|
key: 1,
|
|
9318
9321
|
class: "m-interactions__param",
|
|
9319
9322
|
value: v.frameId ?? "",
|
|
9320
|
-
onChange: (g) =>
|
|
9321
|
-
}, [W("option", od, be(
|
|
9323
|
+
onChange: (g) => L(p, { frameId: g.target.value })
|
|
9324
|
+
}, [W("option", od, be(F(s)("targetFrame")), 1), (U(!0), J(we, null, Pe(h.value, (g) => (U(), J("option", {
|
|
9322
9325
|
key: g.id,
|
|
9323
9326
|
value: g.id
|
|
9324
9327
|
}, be(g.name), 9, sd))), 128))], 40, nd)) : v.action === "setVariable" ? (U(), J(we, { key: 2 }, [W("select", {
|
|
9325
9328
|
class: "m-interactions__param",
|
|
9326
9329
|
value: v.variableId ?? "",
|
|
9327
|
-
onChange: (g) =>
|
|
9328
|
-
}, [W("option", rd, be(
|
|
9330
|
+
onChange: (g) => L(p, { variableId: g.target.value })
|
|
9331
|
+
}, [W("option", rd, be(F(s)("selectVariable")), 1), (U(!0), J(we, null, Pe(y.value, (g) => (U(), J("option", {
|
|
9329
9332
|
key: g.id,
|
|
9330
9333
|
value: g.id
|
|
9331
9334
|
}, be(g.name), 9, ad))), 128))], 40, id), W("input", {
|
|
9332
9335
|
class: "m-interactions__param",
|
|
9333
9336
|
type: "text",
|
|
9334
9337
|
value: v.value ?? "",
|
|
9335
|
-
placeholder:
|
|
9336
|
-
onChange: (g) =>
|
|
9338
|
+
placeholder: F(s)("variableValue"),
|
|
9339
|
+
onChange: (g) => L(p, { value: g.target.value })
|
|
9337
9340
|
}, null, 40, ld)], 64)) : _e("", !0),
|
|
9338
9341
|
W("div", cd, [
|
|
9339
|
-
W("span", ud, be(
|
|
9342
|
+
W("span", ud, be(F(s)("conditionWhen")), 1),
|
|
9340
9343
|
W("select", {
|
|
9341
9344
|
class: "m-interactions__select",
|
|
9342
9345
|
value: v.condition?.variableId ?? "",
|
|
9343
9346
|
onChange: (g) => S(p, g.target.value)
|
|
9344
|
-
}, [W("option", hd, be(
|
|
9347
|
+
}, [W("option", hd, be(F(s)("conditionAlways")), 1), (U(!0), J(we, null, Pe(y.value, (g) => (U(), J("option", {
|
|
9345
9348
|
key: g.id,
|
|
9346
9349
|
value: g.id
|
|
9347
9350
|
}, be(g.name), 9, fd))), 128))], 40, dd),
|
|
@@ -9356,7 +9359,7 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9356
9359
|
class: "m-interactions__cond-val",
|
|
9357
9360
|
type: "text",
|
|
9358
9361
|
value: v.condition.value ?? "",
|
|
9359
|
-
placeholder:
|
|
9362
|
+
placeholder: F(s)("variableValue"),
|
|
9360
9363
|
onChange: (g) => A(p, { value: g.target.value })
|
|
9361
9364
|
}, null, 40, vd)], 64)) : _e("", !0)
|
|
9362
9365
|
])
|
|
@@ -9364,7 +9367,7 @@ var Eu = /* @__PURE__ */ Se({
|
|
|
9364
9367
|
class: "m-interactions__add",
|
|
9365
9368
|
type: "button",
|
|
9366
9369
|
onClick: w
|
|
9367
|
-
}, [Me(
|
|
9370
|
+
}, [Me(F(je), { icon: "$plus" }), mt(" " + be(F(s)("addInteraction")), 1)])], 64)) : (U(), J("div", Gu, be(F(s)("interactionsSelectHint")), 1))]));
|
|
9368
9371
|
}
|
|
9369
9372
|
}), gd = yd, ho = 0;
|
|
9370
9373
|
function xd() {
|
|
@@ -9380,9 +9383,9 @@ var bd = $e((n) => {
|
|
|
9380
9383
|
function h(T) {
|
|
9381
9384
|
return T?.meta?.toJSON?.()?.interactions ?? [];
|
|
9382
9385
|
}
|
|
9383
|
-
function y(T,
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
+
function y(T, z = s.value[0]) {
|
|
9387
|
+
z && (e.value?.transact(() => {
|
|
9388
|
+
z.meta.interactions = T;
|
|
9386
9389
|
}), d.value++);
|
|
9387
9390
|
}
|
|
9388
9391
|
function f(T) {
|
|
@@ -9390,28 +9393,28 @@ var bd = $e((n) => {
|
|
|
9390
9393
|
return t(T);
|
|
9391
9394
|
}
|
|
9392
9395
|
function w(T) {
|
|
9393
|
-
const
|
|
9394
|
-
if (
|
|
9395
|
-
return
|
|
9396
|
+
const z = l("getVariablesState").collections.find((N) => N.variables.some((oe) => oe.id === T));
|
|
9397
|
+
if (z)
|
|
9398
|
+
return z.variables.find((N) => N.id === T)?.valuesByMode?.[z.defaultModeId];
|
|
9396
9399
|
}
|
|
9397
|
-
function
|
|
9398
|
-
const
|
|
9400
|
+
function L(T) {
|
|
9401
|
+
const z = w(T.variableId);
|
|
9399
9402
|
switch (T.op) {
|
|
9400
9403
|
case "==":
|
|
9401
|
-
return String(
|
|
9404
|
+
return String(z) === String(T.value);
|
|
9402
9405
|
case "!=":
|
|
9403
|
-
return String(
|
|
9406
|
+
return String(z) !== String(T.value);
|
|
9404
9407
|
case ">":
|
|
9405
|
-
return Number(
|
|
9408
|
+
return Number(z) > Number(T.value);
|
|
9406
9409
|
case "<":
|
|
9407
|
-
return Number(
|
|
9410
|
+
return Number(z) < Number(T.value);
|
|
9408
9411
|
default:
|
|
9409
9412
|
return !0;
|
|
9410
9413
|
}
|
|
9411
9414
|
}
|
|
9412
|
-
function
|
|
9413
|
-
if (T.condition?.variableId && !
|
|
9414
|
-
const N = R(f(T.target) ??
|
|
9415
|
+
function V(T, z) {
|
|
9416
|
+
if (T.condition?.variableId && !L(T.condition)) return;
|
|
9417
|
+
const N = R(f(T.target) ?? z) ?? z;
|
|
9415
9418
|
switch (T.action) {
|
|
9416
9419
|
case "restart":
|
|
9417
9420
|
l("playElementAnimation", N, !0);
|
|
@@ -9429,7 +9432,7 @@ var bd = $e((n) => {
|
|
|
9429
9432
|
T.url && window.open(T.url, "_blank", "noopener");
|
|
9430
9433
|
break;
|
|
9431
9434
|
case "toggleVisible": {
|
|
9432
|
-
const oe = f(T.target) ??
|
|
9435
|
+
const oe = f(T.target) ?? z;
|
|
9433
9436
|
oe && a(oe, !r(oe));
|
|
9434
9437
|
break;
|
|
9435
9438
|
}
|
|
@@ -9447,14 +9450,14 @@ var bd = $e((n) => {
|
|
|
9447
9450
|
}
|
|
9448
9451
|
}
|
|
9449
9452
|
function R(T) {
|
|
9450
|
-
let
|
|
9451
|
-
for (;
|
|
9452
|
-
if (o(
|
|
9453
|
-
|
|
9453
|
+
let z = T;
|
|
9454
|
+
for (; z; ) {
|
|
9455
|
+
if (o(z)) return z;
|
|
9456
|
+
z = z.parent;
|
|
9454
9457
|
}
|
|
9455
9458
|
}
|
|
9456
|
-
function S(T,
|
|
9457
|
-
T && h(T).filter((N) => N.trigger ===
|
|
9459
|
+
function S(T, z) {
|
|
9460
|
+
T && h(T).filter((N) => N.trigger === z).filter((N) => !N.condition?.variableId || L(N.condition)).forEach((N) => V(N, T));
|
|
9458
9461
|
}
|
|
9459
9462
|
function A(T) {
|
|
9460
9463
|
c.value && S(R(T.target), "click");
|
|
@@ -9462,25 +9465,25 @@ var bd = $e((n) => {
|
|
|
9462
9465
|
let C;
|
|
9463
9466
|
function P(T) {
|
|
9464
9467
|
if (!c.value) return;
|
|
9465
|
-
const
|
|
9466
|
-
|
|
9468
|
+
const z = R(T.target);
|
|
9469
|
+
z !== C && (S(C, "pointerLeave"), C = z, S(C, "pointerEnter"));
|
|
9467
9470
|
}
|
|
9468
9471
|
function v() {
|
|
9469
|
-
e.value?.findOne((T) => (o(T) && h(T).filter((
|
|
9472
|
+
e.value?.findOne((T) => (o(T) && h(T).filter((z) => z.trigger === "load").forEach((z) => V(z, T)), !1));
|
|
9470
9473
|
}
|
|
9471
9474
|
let p = [];
|
|
9472
9475
|
const g = /* @__PURE__ */ new WeakSet();
|
|
9473
9476
|
function x() {
|
|
9474
|
-
p = [], e.value?.findOne((T) => (o(T) && h(T).some((
|
|
9477
|
+
p = [], e.value?.findOne((T) => (o(T) && h(T).some((z) => z.trigger === "scrollIntoView") && p.push(T), !1));
|
|
9475
9478
|
}
|
|
9476
9479
|
function b() {
|
|
9477
9480
|
if (!c.value || !p.length) return;
|
|
9478
9481
|
const T = n.drawboardAabb?.value;
|
|
9479
9482
|
if (T)
|
|
9480
|
-
for (const
|
|
9481
|
-
if (g.has(
|
|
9482
|
-
const N = n.getAabb(
|
|
9483
|
-
N.left < T.width && N.left + N.width > 0 && N.top < T.height && N.top + N.height > 0 && (g.add(
|
|
9483
|
+
for (const z of p) {
|
|
9484
|
+
if (g.has(z)) continue;
|
|
9485
|
+
const N = n.getAabb(z, "drawboard");
|
|
9486
|
+
N.left < T.width && N.left + N.width > 0 && N.top < T.height && N.top + N.height > 0 && (g.add(z), S(z, "scrollIntoView"));
|
|
9484
9487
|
}
|
|
9485
9488
|
}
|
|
9486
9489
|
function _(T) {
|
|
@@ -9520,7 +9523,7 @@ var bd = $e((n) => {
|
|
|
9520
9523
|
},
|
|
9521
9524
|
{
|
|
9522
9525
|
command: "runInteraction",
|
|
9523
|
-
handle:
|
|
9526
|
+
handle: V
|
|
9524
9527
|
}
|
|
9525
9528
|
],
|
|
9526
9529
|
hotkeys: [{
|
|
@@ -9529,10 +9532,10 @@ var bd = $e((n) => {
|
|
|
9529
9532
|
}],
|
|
9530
9533
|
setup: () => {
|
|
9531
9534
|
const T = n.renderEngine.value;
|
|
9532
|
-
Be(c, (
|
|
9533
|
-
C = void 0,
|
|
9534
|
-
}), Be(u, (
|
|
9535
|
-
|
|
9535
|
+
Be(c, (z) => {
|
|
9536
|
+
C = void 0, z && (u.value && (l("pause"), I()), v(), x(), b());
|
|
9537
|
+
}), Be(u, (z) => {
|
|
9538
|
+
z && c.value && (l("pause"), I());
|
|
9536
9539
|
}), bt(() => {
|
|
9537
9540
|
T.on("pointerdown", A), T.on("pointermove", P), T.on("rendered", b), window.addEventListener("keydown", _), window.addEventListener("wheel", k, {
|
|
9538
9541
|
passive: !1,
|
|
@@ -9569,9 +9572,9 @@ var bd = $e((n) => {
|
|
|
9569
9572
|
transformOrigin: "left top",
|
|
9570
9573
|
transform: `scale(${l})`
|
|
9571
9574
|
},
|
|
9572
|
-
children: u.map((
|
|
9573
|
-
const
|
|
9574
|
-
return h && (R.left = (R.left ?? 0) - h), y && (R.top = (R.top ?? 0) - y),
|
|
9575
|
+
children: u.map((L) => {
|
|
9576
|
+
const V = L.toJSON(), R = V.style;
|
|
9577
|
+
return h && (R.left = (R.left ?? 0) - h), y && (R.top = (R.top ?? 0) - y), V.meta ??= {}, V.meta.inPptIs = "Slide", V;
|
|
9575
9578
|
}),
|
|
9576
9579
|
meta: {
|
|
9577
9580
|
inPptIs: "Pptx",
|
|
@@ -9619,7 +9622,7 @@ var bd = $e((n) => {
|
|
|
9619
9622
|
}),
|
|
9620
9623
|
emits: ["update:opened"],
|
|
9621
9624
|
setup(n) {
|
|
9622
|
-
const e = n, t = qe(), { isElement: o, isVisible: s, setVisible: i, isLock: r, setLock: a, selection: l, nodes: c, nodeIndexMap: d, hoverElement: u, exec: h, t: y } = t, f = tt(n, "opened"), w = de(), { thumbnailIcon:
|
|
9625
|
+
const e = n, t = qe(), { isElement: o, isVisible: s, setVisible: i, isLock: r, setLock: a, selection: l, nodes: c, nodeIndexMap: d, hoverElement: u, exec: h, t: y } = t, f = tt(n, "opened"), w = de(), { thumbnailIcon: L, thumbnailName: V } = Yo(Y(() => e.node), t), { selecting: R, dragging: S, dropping: A, onMousedown: C, id: P, openedItems: v } = pu({
|
|
9623
9626
|
opened: f,
|
|
9624
9627
|
node: Y(() => e.node),
|
|
9625
9628
|
dom: Y(() => w.value)
|
|
@@ -9629,7 +9632,7 @@ var bd = $e((n) => {
|
|
|
9629
9632
|
$.value && Q++;
|
|
9630
9633
|
}), Q;
|
|
9631
9634
|
}), _ = de(), E = Y(() => e.node?.equal(u.value)), I = de(!1), k = de(!1), T = de();
|
|
9632
|
-
function
|
|
9635
|
+
function z() {
|
|
9633
9636
|
f.value = !f.value;
|
|
9634
9637
|
}
|
|
9635
9638
|
function N(Q) {
|
|
@@ -9663,7 +9666,7 @@ var bd = $e((n) => {
|
|
|
9663
9666
|
Q.stopPropagation(), o(e.node) && h("zoomTo", "selection", { behavior: "smooth" });
|
|
9664
9667
|
}
|
|
9665
9668
|
function j() {
|
|
9666
|
-
k.value = !0, T.value =
|
|
9669
|
+
k.value = !0, T.value = V.value, zt().then(() => {
|
|
9667
9670
|
const Q = _.value;
|
|
9668
9671
|
Q && (Q.focus({ preventScroll: !0 }), Q.select());
|
|
9669
9672
|
});
|
|
@@ -9678,7 +9681,7 @@ var bd = $e((n) => {
|
|
|
9678
9681
|
l.value.some(($) => $.equal(e.node)) || (l.value = [e.node]), h("openContextMenu", Q);
|
|
9679
9682
|
}
|
|
9680
9683
|
function H() {
|
|
9681
|
-
k.value = !1, T.value !==
|
|
9684
|
+
k.value = !1, T.value !== V.value && (e.node.name = T.value, T.value = "");
|
|
9682
9685
|
}
|
|
9683
9686
|
return (Q, $) => {
|
|
9684
9687
|
const Z = Ps("MceLayer");
|
|
@@ -9691,10 +9694,10 @@ var bd = $e((n) => {
|
|
|
9691
9694
|
p.value && "m-layer--selected",
|
|
9692
9695
|
f.value && "m-layer--open",
|
|
9693
9696
|
E.value && "m-layer--hover",
|
|
9694
|
-
|
|
9697
|
+
F(A) && "m-layer--dropping"
|
|
9695
9698
|
]]),
|
|
9696
9699
|
style: Ie({ "--indent-padding": `${e.indent * 16}px` }),
|
|
9697
|
-
"data-id":
|
|
9700
|
+
"data-id": F(P),
|
|
9698
9701
|
onMousedown: N,
|
|
9699
9702
|
onMouseenter: G,
|
|
9700
9703
|
onMouseleave: q,
|
|
@@ -9703,19 +9706,19 @@ var bd = $e((n) => {
|
|
|
9703
9706
|
$[5] || ($[5] = W("span", { class: "m-layer__underlay" }, null, -1)),
|
|
9704
9707
|
$[6] || ($[6] = W("span", { class: "m-layer__overlay" }, null, -1)),
|
|
9705
9708
|
W("div", Md, [
|
|
9706
|
-
W("div", Sd, [x.value ? (U(), Fe(
|
|
9709
|
+
W("div", Sd, [x.value ? (U(), Fe(F(je), {
|
|
9707
9710
|
key: 0,
|
|
9708
9711
|
class: "m-layer__arrow",
|
|
9709
9712
|
icon: "$arrowRight",
|
|
9710
|
-
onClick:
|
|
9713
|
+
onClick: z,
|
|
9711
9714
|
onMousedown: $[0] || ($[0] = Je(() => {
|
|
9712
9715
|
}, ["stop"]))
|
|
9713
9716
|
})) : _e("", !0)]),
|
|
9714
9717
|
W("div", {
|
|
9715
9718
|
class: "m-layer__thumbnail",
|
|
9716
9719
|
onDblclick: oe
|
|
9717
|
-
}, [Me(
|
|
9718
|
-
e.root ? (U(), J("div", Cd, be(
|
|
9720
|
+
}, [Me(F(je), { icon: F(L) }, null, 8, ["icon"])], 32),
|
|
9721
|
+
e.root ? (U(), J("div", Cd, be(F(y)("layers")), 1)) : (U(), J("div", {
|
|
9719
9722
|
key: 1,
|
|
9720
9723
|
class: "m-layer__name",
|
|
9721
9724
|
onDblclick: j
|
|
@@ -9732,33 +9735,33 @@ var bd = $e((n) => {
|
|
|
9732
9735
|
autocorrect: "off",
|
|
9733
9736
|
autofocus: "",
|
|
9734
9737
|
onBlur: H
|
|
9735
|
-
}, null, 544)), [[$n, T.value]]) : _e("", !0), W("div", { style: Ie({ visibility: k.value ? "hidden" : void 0 }) }, be(T.value || V
|
|
9738
|
+
}, null, 544)), [[$n, T.value]]) : _e("", !0), W("div", { style: Ie({ visibility: k.value ? "hidden" : void 0 }) }, be(T.value || F(V)), 5)], 32)),
|
|
9736
9739
|
W("div", { class: De(["m-layer__action", {
|
|
9737
9740
|
"m-layer__action--hover": I.value,
|
|
9738
|
-
"m-layer__action--show": I.value ||
|
|
9741
|
+
"m-layer__action--show": I.value || F(r)(e.node) || !F(s)(e.node)
|
|
9739
9742
|
}]) }, [e.root ? (U(), J(we, { key: 0 }, [b.value > 1 ? (U(), Fe(jt, {
|
|
9740
9743
|
key: 0,
|
|
9741
9744
|
icon: "",
|
|
9742
9745
|
class: "m-layer__btn m-layer__btn--show",
|
|
9743
|
-
onMousedown: $[2] || ($[2] = Je((te) =>
|
|
9744
|
-
ae !==
|
|
9746
|
+
onMousedown: $[2] || ($[2] = Je((te) => F(v).forEach((ee, ae) => {
|
|
9747
|
+
ae !== F(P) && (ee.value = !1);
|
|
9745
9748
|
}), ["prevent", "stop"]))
|
|
9746
9749
|
}, {
|
|
9747
|
-
default: Te(() => [Me(
|
|
9750
|
+
default: Te(() => [Me(F(je), { icon: "$collapse" })]),
|
|
9748
9751
|
_: 1
|
|
9749
9752
|
})) : _e("", !0)], 64)) : (U(), J(we, { key: 1 }, [Me(jt, {
|
|
9750
9753
|
icon: "",
|
|
9751
|
-
class: De(["m-layer__btn", { "m-layer__btn--show":
|
|
9752
|
-
onClick: $[3] || ($[3] = Je((te) =>
|
|
9754
|
+
class: De(["m-layer__btn", { "m-layer__btn--show": F(r)(e.node) }]),
|
|
9755
|
+
onClick: $[3] || ($[3] = Je((te) => F(a)(e.node, !F(r)(e.node)), ["prevent", "stop"]))
|
|
9753
9756
|
}, {
|
|
9754
|
-
default: Te(() => [Me(
|
|
9757
|
+
default: Te(() => [Me(F(je), { icon: F(r)(e.node) ? "$lock" : "$unlock" }, null, 8, ["icon"])]),
|
|
9755
9758
|
_: 1
|
|
9756
9759
|
}, 8, ["class"]), Me(jt, {
|
|
9757
9760
|
icon: "",
|
|
9758
|
-
class: De(["m-layer__btn", { "m-layer__btn--show": !
|
|
9759
|
-
onClick: $[4] || ($[4] = Je((te) =>
|
|
9761
|
+
class: De(["m-layer__btn", { "m-layer__btn--show": !F(s)(e.node) }]),
|
|
9762
|
+
onClick: $[4] || ($[4] = Je((te) => F(i)(e.node, !F(s)(e.node)), ["prevent", "stop"]))
|
|
9760
9763
|
}, {
|
|
9761
|
-
default: Te(() => [Me(
|
|
9764
|
+
default: Te(() => [Me(F(je), { icon: F(s)(e.node) ? "$visible" : "$unvisible" }, null, 8, ["icon"])]),
|
|
9762
9765
|
_: 1
|
|
9763
9766
|
}, 8, ["class"])], 64))], 2)
|
|
9764
9767
|
])
|
|
@@ -9800,7 +9803,7 @@ var bd = $e((n) => {
|
|
|
9800
9803
|
o.value === "selecting" || i.value || c();
|
|
9801
9804
|
}), (d, u) => (U(), J("div", Ad, [W("div", Pd, [Me(Td, {
|
|
9802
9805
|
root: !0,
|
|
9803
|
-
node:
|
|
9806
|
+
node: F(e),
|
|
9804
9807
|
opened: !0
|
|
9805
9808
|
}, null, 8, ["node"])])]));
|
|
9806
9809
|
}
|
|
@@ -9902,10 +9905,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
9902
9905
|
padding: 20
|
|
9903
9906
|
})
|
|
9904
9907
|
].filter(Boolean)
|
|
9905
|
-
}), w = Y(() => ({ zIndex: 1500 + i.index.value })),
|
|
9908
|
+
}), w = Y(() => ({ zIndex: 1500 + i.index.value })), L = Y(() => ({
|
|
9906
9909
|
...y.value,
|
|
9907
9910
|
...o.contentStyle
|
|
9908
|
-
})),
|
|
9911
|
+
})), V = Y(() => ({ ref: (S) => a.value = S }));
|
|
9909
9912
|
let R = [];
|
|
9910
9913
|
return Vt(() => {
|
|
9911
9914
|
const { trigger: S, stop: A } = tr(d, (C) => {
|
|
@@ -9924,7 +9927,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
9924
9927
|
contentEl: d,
|
|
9925
9928
|
updateLocation: f
|
|
9926
9929
|
}), (S, A) => (U(), J(we, null, [Ne(S.$slots, "activator", {
|
|
9927
|
-
props:
|
|
9930
|
+
props: V.value,
|
|
9928
9931
|
isActive: r.value
|
|
9929
9932
|
}), (U(), Fe(Vo, {
|
|
9930
9933
|
disabled: u.value === !1,
|
|
@@ -9935,7 +9938,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
9935
9938
|
style: w.value
|
|
9936
9939
|
}, S.$attrs), [W("div", {
|
|
9937
9940
|
ref: "contentElTpl",
|
|
9938
|
-
style: Ie(
|
|
9941
|
+
style: Ie(L.value),
|
|
9939
9942
|
class: De(["m-overlay-content", o.contentClass])
|
|
9940
9943
|
}, [Ne(S.$slots, "default")], 6)], 16)) : _e("", !0)], 8, ["disabled", "to"]))], 64));
|
|
9941
9944
|
}
|
|
@@ -9985,10 +9988,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
9985
9988
|
function w() {
|
|
9986
9989
|
a.value?.updateLocation();
|
|
9987
9990
|
}
|
|
9988
|
-
function
|
|
9991
|
+
function L(S, A, C) {
|
|
9989
9992
|
S.children?.length ? r.value = A : (i.value = !1, u?.closeParents(C), S.handle ? S.handle?.(C) : s("click:item", S, C));
|
|
9990
9993
|
}
|
|
9991
|
-
function
|
|
9994
|
+
function V(S, A) {
|
|
9992
9995
|
r.value = S.disabled ? -1 : A;
|
|
9993
9996
|
}
|
|
9994
9997
|
function R() {
|
|
@@ -10030,19 +10033,19 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10030
10033
|
ref_for: !0,
|
|
10031
10034
|
ref: (p) => l.value[v] = p ?? void 0,
|
|
10032
10035
|
class: "m-list__item",
|
|
10033
|
-
onMouseenter: (p) =>
|
|
10036
|
+
onMouseenter: (p) => V(P, v)
|
|
10034
10037
|
}, [W("div", {
|
|
10035
10038
|
class: De(["m-list-item", [P.disabled && "m-list-item--disabled", r.value === v && "m-list-item--opened"]]),
|
|
10036
|
-
onClick: (p) =>
|
|
10039
|
+
onClick: (p) => L(P, v, p)
|
|
10037
10040
|
}, [
|
|
10038
|
-
c.value ? (U(), J("div", Xd, [P.checked ? (U(), Fe(
|
|
10041
|
+
c.value ? (U(), J("div", Xd, [P.checked ? (U(), Fe(F(je), {
|
|
10039
10042
|
key: 0,
|
|
10040
10043
|
icon: "$check"
|
|
10041
10044
|
})) : _e("", !0)])) : _e("", !0),
|
|
10042
10045
|
S.$slots.prepend ? (U(), J("div", Yd, [Ne(S.$slots, "prepend", { item: P })])) : _e("", !0),
|
|
10043
10046
|
W("div", Gd, [Ne(S.$slots, "title", { item: P }, () => [mt(be(P.key), 1)])]),
|
|
10044
10047
|
S.$slots.kbd ? (U(), J("div", Wd, [Ne(S.$slots, "kbd", { item: P })])) : _e("", !0),
|
|
10045
|
-
P.children?.length || S.$slots.append ? (U(), J("div", Kd, [Ne(S.$slots, "append", { item: P }), P.children?.length ? (U(), Fe(
|
|
10048
|
+
P.children?.length || S.$slots.append ? (U(), J("div", Kd, [Ne(S.$slots, "append", { item: P }), P.children?.length ? (U(), Fe(F(je), {
|
|
10046
10049
|
key: 0,
|
|
10047
10050
|
icon: "$arrowRight"
|
|
10048
10051
|
})) : _e("", !0)])) : _e("", !0)
|
|
@@ -10122,31 +10125,31 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10122
10125
|
bt(() => {
|
|
10123
10126
|
d({
|
|
10124
10127
|
command: "openContextMenu",
|
|
10125
|
-
handle:
|
|
10128
|
+
handle: V
|
|
10126
10129
|
});
|
|
10127
10130
|
}), Qe(() => {
|
|
10128
10131
|
u("openContextMenu");
|
|
10129
10132
|
}), Be(h, (S) => {
|
|
10130
10133
|
S || (s.value = void 0);
|
|
10131
10134
|
});
|
|
10132
|
-
function
|
|
10135
|
+
function L() {
|
|
10133
10136
|
f.value?.updateLocation();
|
|
10134
10137
|
}
|
|
10135
|
-
function
|
|
10138
|
+
function V(S) {
|
|
10136
10139
|
S.preventDefault(), h.value = !0, y.value = {
|
|
10137
10140
|
x: S.clientX,
|
|
10138
10141
|
y: S.clientY
|
|
10139
|
-
}, s.value = new ye(S.clientX - o.value.left, S.clientY - o.value.top),
|
|
10142
|
+
}, s.value = new ye(S.clientX - o.value.left, S.clientY - o.value.top), L();
|
|
10140
10143
|
}
|
|
10141
10144
|
Be(t, (S, A) => {
|
|
10142
|
-
A?.removeEventListener("contextmenu",
|
|
10145
|
+
A?.removeEventListener("contextmenu", V), S?.addEventListener("contextmenu", V);
|
|
10143
10146
|
}, { immediate: !0 }), Qe(() => {
|
|
10144
|
-
t.value?.removeEventListener("contextmenu",
|
|
10147
|
+
t.value?.removeEventListener("contextmenu", V);
|
|
10145
10148
|
});
|
|
10146
10149
|
function R(S) {
|
|
10147
10150
|
r(S.key);
|
|
10148
10151
|
}
|
|
10149
|
-
return e({ updateLocation:
|
|
10152
|
+
return e({ updateLocation: L }), (S, A) => (U(), Fe(io, {
|
|
10150
10153
|
ref: "menuTplRef",
|
|
10151
10154
|
modelValue: h.value,
|
|
10152
10155
|
"onUpdate:modelValue": A[0] || (A[0] = (C) => h.value = C),
|
|
@@ -10154,13 +10157,13 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10154
10157
|
offset: 10,
|
|
10155
10158
|
target: w,
|
|
10156
10159
|
location: "right-start",
|
|
10157
|
-
items:
|
|
10158
|
-
style: Ie({ "--max-height": `${
|
|
10160
|
+
items: F(i),
|
|
10161
|
+
style: Ie({ "--max-height": `${F(o).height * 0.8}px` }),
|
|
10159
10162
|
middlewares: ["offset", "shift"],
|
|
10160
10163
|
"onClick:item": R
|
|
10161
10164
|
}, {
|
|
10162
|
-
title: Te(({ item: C }) => [mt(be(
|
|
10163
|
-
kbd: Te(({ item: C }) => [
|
|
10165
|
+
title: Te(({ item: C }) => [mt(be(F(l)(C.key)), 1)]),
|
|
10166
|
+
kbd: Te(({ item: C }) => [F(c).has(C.key) ? (U(), J(we, { key: 0 }, [mt(be(F(a)(C.key)), 1)], 64)) : _e("", !0)]),
|
|
10164
10167
|
_: 1
|
|
10165
10168
|
}, 8, [
|
|
10166
10169
|
"modelValue",
|
|
@@ -10169,17 +10172,17 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10169
10172
|
]));
|
|
10170
10173
|
}
|
|
10171
10174
|
}), Qd = Jd, eh = $e((n, e) => {
|
|
10172
|
-
const { canUndo: t, canRedo: o, selection: s, elementSelection: i, textSelection: r, config: a, exporters: l, components: c, isElement: d, exec: u, mode: h, modes: y } = n, { customContextMenu: f } = e, w = Y(() => s.value.length > 0),
|
|
10175
|
+
const { canUndo: t, canRedo: o, selection: s, elementSelection: i, textSelection: r, config: a, exporters: l, components: c, isElement: d, exec: u, mode: h, modes: y } = n, { customContextMenu: f } = e, w = Y(() => s.value.length > 0), L = Y(() => ({
|
|
10173
10176
|
key: "export",
|
|
10174
10177
|
children: [...l.values()].filter((H) => !!H.saveAs).map((H) => ({ key: `saveAs:${H.name}` }))
|
|
10175
|
-
})),
|
|
10178
|
+
})), V = Y(() => ({
|
|
10176
10179
|
key: "file",
|
|
10177
10180
|
children: [
|
|
10178
10181
|
{ key: "newDoc" },
|
|
10179
10182
|
{ key: "openDoc" },
|
|
10180
10183
|
{ type: "divider" },
|
|
10181
10184
|
{ key: "import" },
|
|
10182
|
-
|
|
10185
|
+
L.value.children.length && L.value
|
|
10183
10186
|
].filter(Boolean)
|
|
10184
10187
|
})), R = Y(() => [{
|
|
10185
10188
|
key: "undo",
|
|
@@ -10396,7 +10399,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10396
10399
|
key: "flipVertical",
|
|
10397
10400
|
disabled: !w.value
|
|
10398
10401
|
}]
|
|
10399
|
-
})),
|
|
10402
|
+
})), z = Y(() => [{
|
|
10400
10403
|
key: "showOrHideSelection",
|
|
10401
10404
|
disabled: !w.value
|
|
10402
10405
|
}, {
|
|
@@ -10411,7 +10414,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10411
10414
|
{ type: "divider" },
|
|
10412
10415
|
...T.value.children,
|
|
10413
10416
|
{ type: "divider" },
|
|
10414
|
-
...
|
|
10417
|
+
...z.value
|
|
10415
10418
|
]
|
|
10416
10419
|
})), oe = Y(() => [
|
|
10417
10420
|
{
|
|
@@ -10456,7 +10459,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10456
10459
|
}
|
|
10457
10460
|
]
|
|
10458
10461
|
})), G = Y(() => [
|
|
10459
|
-
|
|
10462
|
+
V.value,
|
|
10460
10463
|
p.value,
|
|
10461
10464
|
E.value,
|
|
10462
10465
|
N.value,
|
|
@@ -10467,14 +10470,14 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10467
10470
|
...P.value,
|
|
10468
10471
|
{ type: "divider" },
|
|
10469
10472
|
...I.value,
|
|
10470
|
-
...
|
|
10473
|
+
...z.value,
|
|
10471
10474
|
{ type: "divider" },
|
|
10472
10475
|
k.value,
|
|
10473
10476
|
j.value,
|
|
10474
10477
|
T.value,
|
|
10475
10478
|
g.value,
|
|
10476
10479
|
{ type: "divider" },
|
|
10477
|
-
|
|
10480
|
+
L.value
|
|
10478
10481
|
] : [
|
|
10479
10482
|
...A.value,
|
|
10480
10483
|
{ type: "divider" },
|
|
@@ -10486,7 +10489,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10486
10489
|
{ type: "divider" },
|
|
10487
10490
|
...G.value,
|
|
10488
10491
|
{ type: "divider" },
|
|
10489
|
-
|
|
10492
|
+
L.value
|
|
10490
10493
|
]), K = Y(() => {
|
|
10491
10494
|
const H = q.value;
|
|
10492
10495
|
return f?.(H, n) ?? H;
|
|
@@ -10517,20 +10520,20 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10517
10520
|
]);
|
|
10518
10521
|
function r(u) {
|
|
10519
10522
|
const h = /* @__PURE__ */ new Map();
|
|
10520
|
-
for (const [w,
|
|
10523
|
+
for (const [w, L] of u.entries())
|
|
10521
10524
|
i.has(w) || h.set(w, {
|
|
10522
|
-
ctor:
|
|
10525
|
+
ctor: L,
|
|
10523
10526
|
name: w,
|
|
10524
10527
|
children: []
|
|
10525
10528
|
});
|
|
10526
10529
|
const y = /* @__PURE__ */ new Map();
|
|
10527
|
-
for (const [w,
|
|
10530
|
+
for (const [w, L] of u.entries()) y.set(L, w);
|
|
10528
10531
|
const f = [];
|
|
10529
10532
|
for (const [, w] of h.entries()) {
|
|
10530
|
-
const
|
|
10531
|
-
if (
|
|
10532
|
-
const
|
|
10533
|
-
h.get(
|
|
10533
|
+
const L = Object.getPrototypeOf(w.ctor.prototype)?.constructor;
|
|
10534
|
+
if (L && y.has(L)) {
|
|
10535
|
+
const V = y.get(L);
|
|
10536
|
+
h.get(V).children.push(w);
|
|
10534
10537
|
} else f.push(w);
|
|
10535
10538
|
}
|
|
10536
10539
|
return f;
|
|
@@ -10565,10 +10568,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10565
10568
|
key: f,
|
|
10566
10569
|
node: y
|
|
10567
10570
|
}, null, 8, ["node"]))), 128))]), W("div", oh, [Me(jt, { onClick: l }, {
|
|
10568
|
-
default: Te(() => [mt(be(
|
|
10571
|
+
default: Te(() => [mt(be(F(e)("cancel")), 1)]),
|
|
10569
10572
|
_: 1
|
|
10570
10573
|
}), Me(jt, { onClick: c }, {
|
|
10571
|
-
default: Te(() => [mt(be(
|
|
10574
|
+
default: Te(() => [mt(be(F(e)("create")), 1)]),
|
|
10572
10575
|
_: 1
|
|
10573
10576
|
})])]));
|
|
10574
10577
|
}
|
|
@@ -10593,8 +10596,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10593
10596
|
};
|
|
10594
10597
|
}), ah = $e((n) => {
|
|
10595
10598
|
const { addElement: e, renderEngine: t, activeTool: o, activateTool: s, getGlobalPointer: i, camera: r, selection: a, state: l, getConfigRef: c } = n, d = c("interaction.drawStyle");
|
|
10596
|
-
let u, h, y, f, w,
|
|
10597
|
-
const
|
|
10599
|
+
let u, h, y, f, w, L;
|
|
10600
|
+
const V = () => {
|
|
10598
10601
|
if (u && h) {
|
|
10599
10602
|
u.shape.paths = [{ data: h.toData() }];
|
|
10600
10603
|
const S = h.getBoundingBox();
|
|
@@ -10606,7 +10609,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10606
10609
|
const A = h.currentCurve.curves;
|
|
10607
10610
|
y && A[A.length - 1] === y && A.pop(), S && A.length && h.currentCurve.closePath();
|
|
10608
10611
|
const C = A.length, P = u;
|
|
10609
|
-
C > 0 &&
|
|
10612
|
+
C > 0 && V(), t.value.off("pointermove", f), w && window.removeEventListener("keydown", w), L?.(), L = void 0, f = void 0, w = void 0, u = void 0, h = void 0, y = void 0, C > 0 ? a.value = [P] : P.remove();
|
|
10610
10613
|
}
|
|
10611
10614
|
return {
|
|
10612
10615
|
name: "mce:pen",
|
|
@@ -10619,7 +10622,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10619
10622
|
R(!0), s(void 0);
|
|
10620
10623
|
return;
|
|
10621
10624
|
}
|
|
10622
|
-
y = new et(new ye(S.x, S.y), new ye(S.x, S.y)), h.currentCurve.addCurve(y),
|
|
10625
|
+
y = new et(new ye(S.x, S.y), new ye(S.x, S.y)), h.currentCurve.addCurve(y), V();
|
|
10623
10626
|
return;
|
|
10624
10627
|
}
|
|
10625
10628
|
u = e({
|
|
@@ -10635,12 +10638,12 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10635
10638
|
lineJoin: "round"
|
|
10636
10639
|
},
|
|
10637
10640
|
meta: { inPptIs: "Shape" }
|
|
10638
|
-
}, { position: S }), h = new At(), y = new et(new ye(S.x, S.y), new ye(S.x, S.y)), h.currentCurve.addCurve(y),
|
|
10641
|
+
}, { position: S }), h = new At(), y = new et(new ye(S.x, S.y), new ye(S.x, S.y)), h.currentCurve.addCurve(y), V(), f = () => {
|
|
10639
10642
|
const A = i();
|
|
10640
|
-
y && A && (y.p2.x = A.x, y.p2.y = A.y,
|
|
10643
|
+
y && A && (y.p2.x = A.x, y.p2.y = A.y, V());
|
|
10641
10644
|
}, t.value.on("pointermove", f), w = (A) => {
|
|
10642
10645
|
(A.key === "Enter" || A.key === "Escape") && (A.preventDefault(), R(!1), s(void 0));
|
|
10643
|
-
}, window.addEventListener("keydown", w),
|
|
10646
|
+
}, window.addEventListener("keydown", w), L = Be([l, o], () => R(!1));
|
|
10644
10647
|
}
|
|
10645
10648
|
}, {
|
|
10646
10649
|
name: "pencil",
|
|
@@ -10784,13 +10787,13 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10784
10787
|
border: "#000",
|
|
10785
10788
|
box: "#0000002E"
|
|
10786
10789
|
}), h = Y(() => t.borderColor ?? u.border), y = Y(() => t.textColor ?? u.text), f = Y(() => t.lineColor ?? "rgb(var(--m-theme-secondary))"), w = Y(() => t.boxColor ?? u.box);
|
|
10787
|
-
function
|
|
10790
|
+
function L() {
|
|
10788
10791
|
if (!t.selected?.width || !t.selected?.height) return;
|
|
10789
10792
|
c.fillStyle = w.value;
|
|
10790
10793
|
const q = t.vertical ? t.selected.top : t.selected.left, K = t.vertical ? t.selected.height : t.selected.width;
|
|
10791
10794
|
c.fillRect(q, 0, K, t.size);
|
|
10792
10795
|
}
|
|
10793
|
-
function
|
|
10796
|
+
function V(q, K, H, Q) {
|
|
10794
10797
|
c.lineWidth = H, c.strokeStyle = Q, c.beginPath(), c.moveTo(q[0], q[1]), c.lineTo(K[0], K[1]), c.stroke();
|
|
10795
10798
|
}
|
|
10796
10799
|
function R(q, K, H = 1) {
|
|
@@ -10832,7 +10835,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10832
10835
|
function x() {
|
|
10833
10836
|
const q = a.value;
|
|
10834
10837
|
if (!q || !l.width || !l.height) return;
|
|
10835
|
-
c.clearRect(0, 0, l.width, l.height), c.save(), c.scale(s.value, s.value), t.vertical && (c.scale(1, -1), c.translate(0, 0), c.rotate(-Math.PI / 2)),
|
|
10838
|
+
c.clearRect(0, 0, l.width, l.height), c.save(), c.scale(s.value, s.value), t.vertical && (c.scale(1, -1), c.translate(0, 0), c.rotate(-Math.PI / 2)), L(), t.axis && V([0, t.size], [t.vertical ? q.height : q.width, t.size], 2, h.value);
|
|
10836
10839
|
const K = ($, Z) => {
|
|
10837
10840
|
R($, 10), S(Z, $ + 2, 4, 8);
|
|
10838
10841
|
}, H = ($) => R($, 4);
|
|
@@ -10882,7 +10885,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10882
10885
|
const K = k(q);
|
|
10883
10886
|
t.refline && _.value.push(K);
|
|
10884
10887
|
}
|
|
10885
|
-
function
|
|
10888
|
+
function z(q, K = !1) {
|
|
10886
10889
|
const H = k(q);
|
|
10887
10890
|
t.refline && K && (E.value = H), i.value = t.labelFormat(H), r.value = {
|
|
10888
10891
|
x: q.clientX,
|
|
@@ -10913,16 +10916,16 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10913
10916
|
pt((U(), J("div", ht({
|
|
10914
10917
|
class: ["m-ruler", [`m-ruler--${t.vertical ? "vertical" : "horizontal"}`]],
|
|
10915
10918
|
style: { "--size": `${t.size}px` }
|
|
10916
|
-
},
|
|
10919
|
+
}, F(o), {
|
|
10917
10920
|
onMousedown: T,
|
|
10918
|
-
onMousemove: K[0] || (K[0] = (H) =>
|
|
10921
|
+
onMousemove: K[0] || (K[0] = (H) => z(H, !0)),
|
|
10919
10922
|
onMouseleave: N
|
|
10920
10923
|
}), [W("canvas", {
|
|
10921
10924
|
ref: "canvasTpl",
|
|
10922
10925
|
class: "m-ruler__canvas",
|
|
10923
10926
|
width: t.size,
|
|
10924
10927
|
height: t.size
|
|
10925
|
-
}, null, 8, hh)], 16)), [[
|
|
10928
|
+
}, null, 8, hh)], 16)), [[F(qo), F(b)]]),
|
|
10926
10929
|
(U(!0), J(we, null, Pe(I.value, (H, Q) => (U(), J("div", {
|
|
10927
10930
|
key: Q,
|
|
10928
10931
|
class: De(["m-ruler-refline", {
|
|
@@ -10972,14 +10975,14 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10972
10975
|
modelValue: e.value.x,
|
|
10973
10976
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => e.value.x = l),
|
|
10974
10977
|
refline: "",
|
|
10975
|
-
zoom:
|
|
10976
|
-
position:
|
|
10977
|
-
selected:
|
|
10978
|
+
zoom: F(o).zoom.x,
|
|
10979
|
+
position: F(o).position.x,
|
|
10980
|
+
selected: F(s),
|
|
10978
10981
|
axis: "",
|
|
10979
10982
|
size: 16,
|
|
10980
|
-
"line-color":
|
|
10981
|
-
"box-color":
|
|
10982
|
-
locked:
|
|
10983
|
+
"line-color": F(i).lineColor,
|
|
10984
|
+
"box-color": F(i).boxColor,
|
|
10985
|
+
locked: F(i).locked
|
|
10983
10986
|
}, null, 8, [
|
|
10984
10987
|
"modelValue",
|
|
10985
10988
|
"zoom",
|
|
@@ -10993,15 +10996,15 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
10993
10996
|
modelValue: e.value.y,
|
|
10994
10997
|
"onUpdate:modelValue": a[1] || (a[1] = (l) => e.value.y = l),
|
|
10995
10998
|
refline: "",
|
|
10996
|
-
zoom:
|
|
10997
|
-
position:
|
|
10998
|
-
selected:
|
|
10999
|
+
zoom: F(o).zoom.y,
|
|
11000
|
+
position: F(o).position.y,
|
|
11001
|
+
selected: F(s),
|
|
10999
11002
|
axis: "",
|
|
11000
11003
|
vertical: "",
|
|
11001
11004
|
size: 16,
|
|
11002
|
-
"line-color":
|
|
11003
|
-
"box-color":
|
|
11004
|
-
locked:
|
|
11005
|
+
"line-color": F(i).lineColor,
|
|
11006
|
+
"box-color": F(i).boxColor,
|
|
11007
|
+
locked: F(i).locked
|
|
11005
11008
|
}, null, 8, [
|
|
11006
11009
|
"modelValue",
|
|
11007
11010
|
"zoom",
|
|
@@ -11086,7 +11089,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11086
11089
|
height: 0
|
|
11087
11090
|
};
|
|
11088
11091
|
a.value = t.vertical ? p.height : p.width;
|
|
11089
|
-
}, 50), h = (p, g, x) => p * (1 - x) + g * x, y = (p, g) => h(p / 2, 1 - p / 2, g), f = Y(() => y(c.value, d.value)), w = Y(() => 1 - f.value - c.value),
|
|
11092
|
+
}, 50), h = (p, g, x) => p * (1 - x) + g * x, y = (p, g) => h(p / 2, 1 - p / 2, g), f = Y(() => y(c.value, d.value)), w = Y(() => 1 - f.value - c.value), L = Y(() => t.vertical ? `${f.value * 100}%` : "0%"), V = Y(() => t.vertical ? `${w.value * 100}%` : "50%"), R = Y(() => t.vertical ? "0%" : `${f.value * 100}%`), S = Y(() => t.vertical ? "50%" : `${w.value * 100}%`);
|
|
11090
11093
|
function A(p) {
|
|
11091
11094
|
o("scroll", p - s.value), s.value = p;
|
|
11092
11095
|
}
|
|
@@ -11122,13 +11125,13 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11122
11125
|
ref: "thumbTplRef",
|
|
11123
11126
|
class: De(["m-scrollbar__thumb", { "m-scrollbar__thumb--active": P.value }]),
|
|
11124
11127
|
style: Ie({
|
|
11125
|
-
top:
|
|
11126
|
-
bottom:
|
|
11128
|
+
top: L.value,
|
|
11129
|
+
bottom: V.value,
|
|
11127
11130
|
left: R.value,
|
|
11128
11131
|
right: S.value
|
|
11129
11132
|
}),
|
|
11130
11133
|
onPointerdown: v
|
|
11131
|
-
}, null, 38)], 512)], 6)), [[
|
|
11134
|
+
}, null, 38)], 512)], 6)), [[F(qo), F(u)]]);
|
|
11132
11135
|
}
|
|
11133
11136
|
}), ks = wh, kh = { class: "m-scrollbars" }, Mh = /* @__PURE__ */ Se({
|
|
11134
11137
|
__name: "Scrollbars",
|
|
@@ -11139,21 +11142,21 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11139
11142
|
setup(n) {
|
|
11140
11143
|
const e = n, { camera: t, rootAabb: o } = qe();
|
|
11141
11144
|
return (s, i) => (U(), J("div", kh, [Me(ks, ht(e, {
|
|
11142
|
-
modelValue:
|
|
11143
|
-
"onUpdate:modelValue": i[0] || (i[0] = (r) =>
|
|
11145
|
+
modelValue: F(t).position.y,
|
|
11146
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => F(t).position.y = r),
|
|
11144
11147
|
vertical: "",
|
|
11145
|
-
length:
|
|
11148
|
+
length: F(o).height * F(t).zoom.y
|
|
11146
11149
|
}), null, 16, ["modelValue", "length"]), Me(ks, ht(e, {
|
|
11147
|
-
modelValue:
|
|
11148
|
-
"onUpdate:modelValue": i[1] || (i[1] = (r) =>
|
|
11149
|
-
length:
|
|
11150
|
+
modelValue: F(t).position.x,
|
|
11151
|
+
"onUpdate:modelValue": i[1] || (i[1] = (r) => F(t).position.x = r),
|
|
11152
|
+
length: F(o).width * F(t).zoom.x
|
|
11150
11153
|
}), null, 16, ["modelValue", "length"])]));
|
|
11151
11154
|
}
|
|
11152
11155
|
}), Sh = Mh, Ch = $e((n) => {
|
|
11153
11156
|
const { registerConfig: e, camera: t, getAabb: o, selectionAabb: s, rootAabb: i, viewportAabb: r, screenCenter: a, screenCenterOffset: l } = n, c = e("ui.scrollbar", { default: { visible: !0 } }), d = async (u, h = {}) => {
|
|
11154
|
-
const { intoView: y, behavior: f, duration: w = 500 } = h, { position:
|
|
11155
|
-
x:
|
|
11156
|
-
y:
|
|
11157
|
+
const { intoView: y, behavior: f, duration: w = 500 } = h, { position: L, zoom: V } = t.value, R = {
|
|
11158
|
+
x: L.x,
|
|
11159
|
+
y: L.y
|
|
11157
11160
|
}, S = a.value, A = {
|
|
11158
11161
|
x: 0,
|
|
11159
11162
|
y: 0
|
|
@@ -11169,7 +11172,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11169
11172
|
y: v.top + v.height / 2
|
|
11170
11173
|
}, A.x = -S.x, A.y = -S.y;
|
|
11171
11174
|
}
|
|
11172
|
-
C.x !== void 0 && (C.x *=
|
|
11175
|
+
C.x !== void 0 && (C.x *= V.x, C.x += A.x), C.y !== void 0 && (C.y *= V.y, C.y += A.y);
|
|
11173
11176
|
const P = {
|
|
11174
11177
|
...R,
|
|
11175
11178
|
...C
|
|
@@ -11181,10 +11184,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11181
11184
|
}, g = performance.now();
|
|
11182
11185
|
function x(b) {
|
|
11183
11186
|
const _ = b - g, E = Math.min(_ / w, 1), I = E < 0.5 ? 2 * E * E : -1 + (4 - 2 * E) * E;
|
|
11184
|
-
|
|
11187
|
+
L.set(R.x + p.x * I, R.y + p.y * I), _ < w ? requestAnimationFrame(x) : v();
|
|
11185
11188
|
}
|
|
11186
11189
|
requestAnimationFrame(x);
|
|
11187
|
-
}) :
|
|
11190
|
+
}) : L.set(P.x, P.y);
|
|
11188
11191
|
};
|
|
11189
11192
|
return {
|
|
11190
11193
|
name: "mce:scroll",
|
|
@@ -11212,8 +11215,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11212
11215
|
return (r, a) => i.value ? (U(), J("div", {
|
|
11213
11216
|
key: 0,
|
|
11214
11217
|
class: "m-scroll-to-selection",
|
|
11215
|
-
onClick: a[0] || (a[0] = Je((l) =>
|
|
11216
|
-
}, [Me(
|
|
11218
|
+
onClick: a[0] || (a[0] = Je((l) => F(s)("scrollToSelection", { behavior: "smooth" }), ["prevent"]))
|
|
11219
|
+
}, [Me(F(je), { icon: "$gps" }), W("span", null, be(F(o)("scrollToSelection")), 1)])) : _e("", !0);
|
|
11217
11220
|
}
|
|
11218
11221
|
}), Th = Eh, Ah = ["rx", "ry"], Ph = { "pointer-events": "none" }, Ih = [
|
|
11219
11222
|
"x",
|
|
@@ -11336,12 +11339,12 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11336
11339
|
};
|
|
11337
11340
|
}
|
|
11338
11341
|
function l() {
|
|
11339
|
-
const b = a(), _ = o.scale, E = o.offset, { left: I, top: k, width: T, height:
|
|
11342
|
+
const b = a(), _ = o.scale, E = o.offset, { left: I, top: k, width: T, height: z, rotate: N, borderRadius: oe } = b;
|
|
11340
11343
|
return {
|
|
11341
11344
|
left: I * _[0] + E[0],
|
|
11342
11345
|
top: k * _[1] + E[1],
|
|
11343
11346
|
width: T * _[0],
|
|
11344
|
-
height:
|
|
11347
|
+
height: z * _[1],
|
|
11345
11348
|
rotate: N,
|
|
11346
11349
|
borderRadius: oe * _[0]
|
|
11347
11350
|
};
|
|
@@ -11364,7 +11367,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11364
11367
|
const b = o.handleShape, _ = b === "rect" ? 8 : 10, { width: E = 0, height: I = 0, borderRadius: k } = d.value, T = {
|
|
11365
11368
|
x: E / 2,
|
|
11366
11369
|
y: I / 2
|
|
11367
|
-
},
|
|
11370
|
+
}, z = [
|
|
11368
11371
|
{
|
|
11369
11372
|
type: "t",
|
|
11370
11373
|
points: [[0, 0], [1, 0]]
|
|
@@ -11422,7 +11425,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11422
11425
|
type: "br",
|
|
11423
11426
|
point: [1, 1]
|
|
11424
11427
|
}
|
|
11425
|
-
], oe =
|
|
11428
|
+
], oe = z.map(($) => {
|
|
11426
11429
|
const [Z, te] = $.points, ee = Math.min(Z[0], te[0]) * E, ae = Math.max(Z[0], te[0]) * E, ce = Math.min(Z[1], te[1]) * I, pe = Math.max(Z[1], te[1]) * I;
|
|
11427
11430
|
return {
|
|
11428
11431
|
type: $.type,
|
|
@@ -11498,8 +11501,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11498
11501
|
width: o.initialSize && !b ? void 0 : `${b}px`,
|
|
11499
11502
|
height: o.initialSize && !_ ? void 0 : `${_}px`
|
|
11500
11503
|
};
|
|
11501
|
-
}),
|
|
11502
|
-
const { left: b = 0, top: _ = 0, rotate: E = 0 } = d.value, I = E *
|
|
11504
|
+
}), L = Math.PI / 180, V = Y(() => {
|
|
11505
|
+
const { left: b = 0, top: _ = 0, rotate: E = 0 } = d.value, I = E * L, k = Math.cos(I), T = Math.sin(I);
|
|
11503
11506
|
return {
|
|
11504
11507
|
...w.value,
|
|
11505
11508
|
transform: `matrix(${k}, ${T}, ${-T}, ${k}, ${b}, ${_})`
|
|
@@ -11508,7 +11511,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11508
11511
|
function S(b, _) {
|
|
11509
11512
|
if (b && b.button !== void 0 && b.button !== 0) return !1;
|
|
11510
11513
|
b?.preventDefault(), b?.stopPropagation();
|
|
11511
|
-
const { left: E, top: I, width: k, height: T, rotate:
|
|
11514
|
+
const { left: E, top: I, width: k, height: T, rotate: z, borderRadius: N } = d.value;
|
|
11512
11515
|
let oe = 0;
|
|
11513
11516
|
k && T && (oe = k / T);
|
|
11514
11517
|
const j = _ === void 0 ? {
|
|
@@ -11528,10 +11531,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11528
11531
|
const pe = {
|
|
11529
11532
|
x: ce.x - ae.x > 0 ? 1 : -1,
|
|
11530
11533
|
y: ce.y - ae.y > 0 ? 1 : -1
|
|
11531
|
-
}, he = v(ce, ae,
|
|
11534
|
+
}, he = v(ce, ae, z), ge = {
|
|
11532
11535
|
x: ae.x * 2 - he.x,
|
|
11533
11536
|
y: ae.y * 2 - he.y
|
|
11534
|
-
}, ve = Math.atan2(he.y - ae.y, he.x - ae.x) /
|
|
11537
|
+
}, ve = Math.atan2(he.y - ae.y, he.x - ae.x) / L;
|
|
11535
11538
|
return Rt(b, {
|
|
11536
11539
|
threshold: o.threshold,
|
|
11537
11540
|
start: (fe) => {
|
|
@@ -11548,21 +11551,21 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11548
11551
|
if (Q)
|
|
11549
11552
|
o.movable && (ke.left = ce.x + Ce.x, ke.top = ce.y + Ce.y);
|
|
11550
11553
|
else if ($)
|
|
11551
|
-
o.rotatable && (ke.rotate =
|
|
11554
|
+
o.rotatable && (ke.rotate = z + Math.atan2(Ae.y - ae.y, Ae.x - ae.x) / L - ve);
|
|
11552
11555
|
else if (Z) {
|
|
11553
11556
|
const ze = v(Ce, {
|
|
11554
11557
|
x: 0,
|
|
11555
11558
|
y: 0
|
|
11556
|
-
}, -
|
|
11559
|
+
}, -z), Xe = -pe.x * ze.x, Ue = -pe.y * ze.y;
|
|
11557
11560
|
ke.borderRadius = N + (Xe < Ue ? Ue : Xe);
|
|
11558
11561
|
} else if (ee) {
|
|
11559
|
-
const ze = v(Ae, ae, -
|
|
11562
|
+
const ze = v(Ae, ae, -z), Xe = v(te ? {
|
|
11560
11563
|
x: ze.x,
|
|
11561
11564
|
y: ce.y
|
|
11562
11565
|
} : {
|
|
11563
11566
|
x: ce.x,
|
|
11564
11567
|
y: ze.y
|
|
11565
|
-
}, ae,
|
|
11568
|
+
}, ae, z), Ue = Math.abs(g(Xe, ge));
|
|
11566
11569
|
te ? (ke.width = Ue, o.resizeStrategy === "lockAspectRatio" && o.lockAspectRatioStrategy === "all" && oe ? ke.height = Ue / oe : ke.height = T) : (ke.height = Ue, o.resizeStrategy === "lockAspectRatio" && o.lockAspectRatioStrategy === "all" && oe ? ke.width = Ue * oe : ke.width = k);
|
|
11567
11570
|
const ct = p(Xe, ge);
|
|
11568
11571
|
ke.left = ct.x - ke.width / 2, ke.top = ct.y - ke.height / 2;
|
|
@@ -11572,7 +11575,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11572
11575
|
const Bt = v(Ce, {
|
|
11573
11576
|
x: 0,
|
|
11574
11577
|
y: 0
|
|
11575
|
-
}, -
|
|
11578
|
+
}, -z), It = pe.x * Bt.x, Tt = pe.y * Bt.y;
|
|
11576
11579
|
let X;
|
|
11577
11580
|
It > Tt * oe ? X = {
|
|
11578
11581
|
x: ce.x + pe.x * It,
|
|
@@ -11580,9 +11583,9 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11580
11583
|
} : X = {
|
|
11581
11584
|
x: ce.x + pe.x * Tt * oe,
|
|
11582
11585
|
y: ce.y + pe.y * Tt
|
|
11583
|
-
}, ze = v(X, ae,
|
|
11586
|
+
}, ze = v(X, ae, z);
|
|
11584
11587
|
} else ze = Ae;
|
|
11585
|
-
const Xe = p(ze, ge), Ue = [v(ze, Xe, -
|
|
11588
|
+
const Xe = p(ze, ge), Ue = [v(ze, Xe, -z), v(ge, Xe, -z)], [ct, Et] = Ue[0].x > Ue[1].x ? [Ue[1].x, Ue[0].x] : [Ue[0].x, Ue[1].x], [Ye, _t] = Ue[0].y > Ue[1].y ? [Ue[1].y, Ue[0].y] : [Ue[0].y, Ue[1].y];
|
|
11586
11589
|
ke.width = Et - ct, ke.height = _t - Ye, ke.left = ct, ke.top = Ye;
|
|
11587
11590
|
}
|
|
11588
11591
|
"width" in ke && (ke.width = Math.max(1, ke.width)), "height" in ke && (ke.height = Math.max(1, ke.height)), (ke.borderRadius ?? N) && (ke.borderRadius = Math.min(Math.max(0, ke.borderRadius ?? N), Math.min((ke.width ?? k) / 2, (ke.height ?? T) / 2)));
|
|
@@ -11612,7 +11615,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11612
11615
|
return `url("data:image/svg+xml,${_(d.value.rotate ?? 0)}") 16 16, pointer`;
|
|
11613
11616
|
}
|
|
11614
11617
|
function v(b, _, E) {
|
|
11615
|
-
const I = E *
|
|
11618
|
+
const I = E * L, k = Math.cos(I), T = Math.sin(I);
|
|
11616
11619
|
return {
|
|
11617
11620
|
x: (b.x - _.x) * k - (b.y - _.y) * T + _.x,
|
|
11618
11621
|
y: (b.x - _.x) * T + (b.y - _.y) * k + _.y
|
|
@@ -11685,7 +11688,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11685
11688
|
h.value?.startsWith("rotate") && "m-transform--rotateing",
|
|
11686
11689
|
o.borderStyle && `m-transform--${o.borderStyle}`
|
|
11687
11690
|
]]),
|
|
11688
|
-
style: Ie(
|
|
11691
|
+
style: Ie(V.value)
|
|
11689
11692
|
}, {
|
|
11690
11693
|
default: Te(() => [
|
|
11691
11694
|
Ne(b.$slots, "default", {
|
|
@@ -11804,23 +11807,23 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11804
11807
|
};
|
|
11805
11808
|
}
|
|
11806
11809
|
function h({ width: _, height: E }) {
|
|
11807
|
-
const { sx: I, sy: k, tx: T, ty:
|
|
11810
|
+
const { sx: I, sy: k, tx: T, ty: z } = c.value, { scaleX: N = 1, scaleY: oe = 1 } = a.value;
|
|
11808
11811
|
return {
|
|
11809
11812
|
width: I * _,
|
|
11810
11813
|
height: k * E,
|
|
11811
11814
|
left: T * N * (I * _),
|
|
11812
|
-
top:
|
|
11815
|
+
top: z * oe * (k * E)
|
|
11813
11816
|
};
|
|
11814
11817
|
}
|
|
11815
11818
|
const y = Y({
|
|
11816
11819
|
get: () => h(d.value),
|
|
11817
11820
|
set: (_) => {
|
|
11818
|
-
const { width: E, height: I } = d.value, { scaleX: k = 1, scaleY: T = 1 } = a.value,
|
|
11821
|
+
const { width: E, height: I } = d.value, { scaleX: k = 1, scaleY: T = 1 } = a.value, z = {
|
|
11819
11822
|
sx: _.width / E,
|
|
11820
11823
|
sy: _.height / I,
|
|
11821
11824
|
tx: _.left / _.width / k,
|
|
11822
11825
|
ty: _.top / _.height / T
|
|
11823
|
-
}, N = -
|
|
11826
|
+
}, N = -z.tx, oe = -z.ty, j = 1 - 1 / z.sx, G = 1 - 1 / z.sy;
|
|
11824
11827
|
r.value = {
|
|
11825
11828
|
left: N,
|
|
11826
11829
|
top: oe,
|
|
@@ -11839,7 +11842,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11839
11842
|
}
|
|
11840
11843
|
return {};
|
|
11841
11844
|
}
|
|
11842
|
-
function
|
|
11845
|
+
function L(_) {
|
|
11843
11846
|
if (_.handle !== "move") {
|
|
11844
11847
|
f.value = {};
|
|
11845
11848
|
return;
|
|
@@ -11852,7 +11855,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11852
11855
|
0,
|
|
11853
11856
|
k.width / 2,
|
|
11854
11857
|
k.width
|
|
11855
|
-
], k.left),
|
|
11858
|
+
], k.left), z = w([
|
|
11856
11859
|
0,
|
|
11857
11860
|
I / 2,
|
|
11858
11861
|
I
|
|
@@ -11863,15 +11866,15 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11863
11866
|
], k.top);
|
|
11864
11867
|
f.value = {
|
|
11865
11868
|
x: T.line,
|
|
11866
|
-
y:
|
|
11867
|
-
}, (T.value !== void 0 ||
|
|
11869
|
+
y: z.line
|
|
11870
|
+
}, (T.value !== void 0 || z.value !== void 0) && (y.value = {
|
|
11868
11871
|
width: k.width,
|
|
11869
11872
|
height: k.height,
|
|
11870
11873
|
left: T.value ?? k.left,
|
|
11871
|
-
top:
|
|
11874
|
+
top: z.value ?? k.top
|
|
11872
11875
|
});
|
|
11873
11876
|
}
|
|
11874
|
-
function
|
|
11877
|
+
function V() {
|
|
11875
11878
|
f.value = {};
|
|
11876
11879
|
}
|
|
11877
11880
|
const R = qe(), S = Be(a, (_, E) => {
|
|
@@ -11886,7 +11889,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11886
11889
|
}
|
|
11887
11890
|
});
|
|
11888
11891
|
function A(_) {
|
|
11889
|
-
const { sx: E, sy: I } = c.value, { left: k, top: T, right:
|
|
11892
|
+
const { sx: E, sy: I } = c.value, { left: k, top: T, right: z, bottom: N } = r.value, oe = 1 - k - z, j = 1 - T - N, G = k + oe * 0.5, q = T + j * 0.5, K = _, H = _ * (I / E), Q = 1 / K, $ = 1 / H, Z = G - Q * 0.5, te = q - $ * 0.5;
|
|
11890
11893
|
r.value = {
|
|
11891
11894
|
left: Z,
|
|
11892
11895
|
top: te,
|
|
@@ -11905,10 +11908,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11905
11908
|
s.value = i, S.stop(), a.value = l, P();
|
|
11906
11909
|
}
|
|
11907
11910
|
function p(_) {
|
|
11908
|
-
const { left: E = 0, top: I = 0 } = a.value, { left: k, top: T, width:
|
|
11909
|
-
let j =
|
|
11911
|
+
const { left: E = 0, top: I = 0 } = a.value, { left: k, top: T, width: z, height: N } = h(a.value), oe = _ === 0 ? z / N : _[0] / _[1];
|
|
11912
|
+
let j = z, G = z / oe;
|
|
11910
11913
|
G > N && (G = N, j = N * oe);
|
|
11911
|
-
const q = E + k + (
|
|
11914
|
+
const q = E + k + (z - j) / 2, K = I + T + (N - G) / 2;
|
|
11912
11915
|
a.value = {
|
|
11913
11916
|
...a.value,
|
|
11914
11917
|
width: j,
|
|
@@ -11928,7 +11931,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11928
11931
|
return bt(() => o("start")), Qe(() => o("end")), (_, E) => pt((U(), J("div", Dh, [
|
|
11929
11932
|
W("div", {
|
|
11930
11933
|
class: "m-cropper__source",
|
|
11931
|
-
style: Ie(
|
|
11934
|
+
style: Ie(F(Er)(y.value))
|
|
11932
11935
|
}, [W("canvas", {
|
|
11933
11936
|
ref_key: "canvasRef",
|
|
11934
11937
|
ref: x
|
|
@@ -11938,8 +11941,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11938
11941
|
"onUpdate:modelValue": E[0] || (E[0] = (I) => y.value = I),
|
|
11939
11942
|
class: "m-cropper__transform",
|
|
11940
11943
|
rotatable: !1,
|
|
11941
|
-
onMove:
|
|
11942
|
-
onEnd:
|
|
11944
|
+
onMove: L,
|
|
11945
|
+
onEnd: V
|
|
11943
11946
|
}, {
|
|
11944
11947
|
default: Te(({ props: I }) => [W("div", ht({ class: "m-cropper__transform_rect" }, I), null, 16)]),
|
|
11945
11948
|
_: 1
|
|
@@ -11961,7 +11964,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11961
11964
|
cancel: v,
|
|
11962
11965
|
setAspectRatio: p
|
|
11963
11966
|
})
|
|
11964
|
-
])), [[
|
|
11967
|
+
])), [[F(qo), u]]);
|
|
11965
11968
|
}
|
|
11966
11969
|
}), Uh = qh, jh = /* @__PURE__ */ Se({
|
|
11967
11970
|
__name: "ForegroundCropper",
|
|
@@ -11982,7 +11985,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
11982
11985
|
};
|
|
11983
11986
|
}
|
|
11984
11987
|
});
|
|
11985
|
-
return (i, r) =>
|
|
11988
|
+
return (i, r) => F(e) === "cropping" && o.value?.foreground.isValid() ? (U(), Fe(Uh, {
|
|
11986
11989
|
key: 0,
|
|
11987
11990
|
modelValue: o.value.foreground.cropRect,
|
|
11988
11991
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => o.value.foreground.cropRect = a),
|
|
@@ -12069,8 +12072,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12069
12072
|
y: v.y * e.scale[1] + e.offset[1]
|
|
12070
12073
|
};
|
|
12071
12074
|
}
|
|
12072
|
-
const w = Y(() => f(u.value)),
|
|
12073
|
-
function
|
|
12075
|
+
const w = Y(() => f(u.value)), L = Y(() => f(h.value));
|
|
12076
|
+
function V() {
|
|
12074
12077
|
const v = c(u.value), p = c(h.value), g = new At(s ? wo(v, p, i) : `M ${v.x} ${v.y} L ${p.x} ${p.y}`).getBoundingBox(), x = g.left, b = g.top, _ = Math.max(1, g.width), E = Math.max(1, g.height), I = d({
|
|
12075
12078
|
x: x + _ / 2,
|
|
12076
12079
|
y: b + E / 2
|
|
@@ -12082,10 +12085,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12082
12085
|
}, T = {
|
|
12083
12086
|
x: p.x - x,
|
|
12084
12087
|
y: p.y - b
|
|
12085
|
-
},
|
|
12088
|
+
}, z = s ? wo(k, T, i) : `M ${k.x} ${k.y} L ${T.x} ${T.y}`, N = o.shape.paths ?? [];
|
|
12086
12089
|
o.shape.paths = [{
|
|
12087
12090
|
...N[0] ?? {},
|
|
12088
|
-
data:
|
|
12091
|
+
data: z
|
|
12089
12092
|
}];
|
|
12090
12093
|
}
|
|
12091
12094
|
function R() {
|
|
@@ -12110,7 +12113,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12110
12113
|
}), S.kind !== "p1" && (h.value = {
|
|
12111
12114
|
x: S.a2.x + p,
|
|
12112
12115
|
y: S.a2.y + g
|
|
12113
|
-
}),
|
|
12116
|
+
}), V();
|
|
12114
12117
|
}
|
|
12115
12118
|
function P() {
|
|
12116
12119
|
S && (R(), S = void 0), window.removeEventListener("pointermove", C), window.removeEventListener("pointerup", P);
|
|
@@ -12128,16 +12131,16 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12128
12131
|
class: "m-line-editor__hit",
|
|
12129
12132
|
x1: w.value.x,
|
|
12130
12133
|
y1: w.value.y,
|
|
12131
|
-
x2:
|
|
12132
|
-
y2:
|
|
12134
|
+
x2: L.value.x,
|
|
12135
|
+
y2: L.value.y,
|
|
12133
12136
|
onPointerdown: p[0] || (p[0] = (g) => A(g, "body"))
|
|
12134
12137
|
}, null, 40, Yh),
|
|
12135
12138
|
W("line", {
|
|
12136
12139
|
class: "m-line-editor__line",
|
|
12137
12140
|
x1: w.value.x,
|
|
12138
12141
|
y1: w.value.y,
|
|
12139
|
-
x2:
|
|
12140
|
-
y2:
|
|
12142
|
+
x2: L.value.x,
|
|
12143
|
+
y2: L.value.y
|
|
12141
12144
|
}, null, 8, Gh),
|
|
12142
12145
|
W("circle", {
|
|
12143
12146
|
class: "m-line-editor__endpoint",
|
|
@@ -12148,8 +12151,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12148
12151
|
}, null, 40, Wh),
|
|
12149
12152
|
W("circle", {
|
|
12150
12153
|
class: "m-line-editor__endpoint",
|
|
12151
|
-
cx:
|
|
12152
|
-
cy:
|
|
12154
|
+
cx: L.value.x,
|
|
12155
|
+
cy: L.value.y,
|
|
12153
12156
|
r: "5",
|
|
12154
12157
|
onPointerdown: p[2] || (p[2] = (g) => A(g, "p2"))
|
|
12155
12158
|
}, null, 40, Kh)
|
|
@@ -12207,8 +12210,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12207
12210
|
}
|
|
12208
12211
|
const y = de([]);
|
|
12209
12212
|
let f = [], w = "";
|
|
12210
|
-
const
|
|
12211
|
-
function
|
|
12213
|
+
const L = de(null);
|
|
12214
|
+
function V($, Z, te, ee, ae, ce, pe, he, ge) {
|
|
12212
12215
|
if (te = Math.abs(te), ee = Math.abs(ee), te === 0 || ee === 0) return [[
|
|
12213
12216
|
$,
|
|
12214
12217
|
Z,
|
|
@@ -12256,7 +12259,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12256
12259
|
for (const pe of $) {
|
|
12257
12260
|
const he = pe;
|
|
12258
12261
|
if (he.type === "A") {
|
|
12259
|
-
for (const ge of
|
|
12262
|
+
for (const ge of V(te, ee, he.rx, he.ry, he.angle, he.largeArcFlag, he.sweepFlag, he.x, he.y)) Z.push({
|
|
12260
12263
|
type: "C",
|
|
12261
12264
|
x1: ge[0],
|
|
12262
12265
|
y1: ge[1],
|
|
@@ -12356,7 +12359,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12356
12359
|
ci: ae,
|
|
12357
12360
|
x: pe.x,
|
|
12358
12361
|
y: pe.y,
|
|
12359
|
-
sel:
|
|
12362
|
+
sel: L.value?.pi === te && L.value?.ci === ae
|
|
12360
12363
|
});
|
|
12361
12364
|
}
|
|
12362
12365
|
});
|
|
@@ -12490,14 +12493,14 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12490
12493
|
}), ce;
|
|
12491
12494
|
}
|
|
12492
12495
|
let T;
|
|
12493
|
-
function
|
|
12496
|
+
function z() {
|
|
12494
12497
|
s.root.value.stopCapturing?.();
|
|
12495
12498
|
}
|
|
12496
12499
|
function N($, Z, te, ee) {
|
|
12497
|
-
$.stopPropagation(), $.preventDefault(), ee === "xy" && (
|
|
12500
|
+
$.stopPropagation(), $.preventDefault(), ee === "xy" && (L.value = {
|
|
12498
12501
|
pi: Z,
|
|
12499
12502
|
ci: te
|
|
12500
|
-
}),
|
|
12503
|
+
}), z();
|
|
12501
12504
|
const ae = k(Z, te, ee).map(({ cmd: ce, field: pe }) => {
|
|
12502
12505
|
const he = C(ce, pe);
|
|
12503
12506
|
return {
|
|
@@ -12520,7 +12523,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12520
12523
|
I();
|
|
12521
12524
|
}
|
|
12522
12525
|
function j() {
|
|
12523
|
-
T && (
|
|
12526
|
+
T && (z(), T = void 0), window.removeEventListener("pointermove", oe), window.removeEventListener("pointerup", j);
|
|
12524
12527
|
}
|
|
12525
12528
|
function G($) {
|
|
12526
12529
|
$.stopPropagation();
|
|
@@ -12662,16 +12665,16 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12662
12665
|
return y.value[$].filter((Z) => "x" in Z && "y" in Z).length;
|
|
12663
12666
|
}
|
|
12664
12667
|
function H() {
|
|
12665
|
-
const $ =
|
|
12666
|
-
$ && (y.value[$.pi][$.ci].type === "M" || K($.pi) <= 2 || (y.value[$.pi].splice($.ci, 1),
|
|
12668
|
+
const $ = L.value;
|
|
12669
|
+
$ && (y.value[$.pi][$.ci].type === "M" || K($.pi) <= 2 || (y.value[$.pi].splice($.ci, 1), L.value = null, I()));
|
|
12667
12670
|
}
|
|
12668
12671
|
function Q($) {
|
|
12669
|
-
$.key === "Escape" ? ($.preventDefault(), o("end")) : ($.key === "Delete" || $.key === "Backspace") &&
|
|
12672
|
+
$.key === "Escape" ? ($.preventDefault(), o("end")) : ($.key === "Delete" || $.key === "Backspace") && L.value && ($.preventDefault(), H());
|
|
12670
12673
|
}
|
|
12671
12674
|
return Be(i, ($) => {
|
|
12672
12675
|
($.length !== 1 || !$[0]?.equal(r)) && o("end");
|
|
12673
12676
|
}), Be(() => r.shape.paths?.map(($) => $.data).join("|") ?? "", ($) => {
|
|
12674
|
-
T || $ === w || (
|
|
12677
|
+
T || $ === w || (L.value = null, S());
|
|
12675
12678
|
}), Vt(() => window.addEventListener("keydown", Q)), Qe(() => {
|
|
12676
12679
|
window.removeEventListener("keydown", Q), j();
|
|
12677
12680
|
}), ($, Z) => (U(), J("svg", Qh, [
|
|
@@ -12715,7 +12718,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12715
12718
|
}, cf = ["d", "transform"], uf = /* @__PURE__ */ Se({
|
|
12716
12719
|
__name: "Selection",
|
|
12717
12720
|
setup(n, { expose: e }) {
|
|
12718
|
-
const { emit: t, isElement: o, exec: s, state: i, selection: r, selectionMarquee: a, elementSelection: l, selectionObb: c, selectionObbInDrawboard: d, camera: u, getObb: h, registerCommand: y, unregisterCommand: f, isLock: w, getConfigRef:
|
|
12721
|
+
const { emit: t, isElement: o, exec: s, state: i, selection: r, selectionMarquee: a, elementSelection: l, selectionObb: c, selectionObbInDrawboard: d, camera: u, getObb: h, registerCommand: y, unregisterCommand: f, isLock: w, getConfigRef: L, hoverElement: V, isContentEditing: R, readonly: S } = qe(), A = L("interaction.transform"), C = nt("transformTpl"), P = Y(() => {
|
|
12719
12722
|
const K = l.value, H = { ...A.value };
|
|
12720
12723
|
if (K.length === 1) {
|
|
12721
12724
|
const Q = l.value[0];
|
|
@@ -12793,10 +12796,10 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12793
12796
|
function I(K) {
|
|
12794
12797
|
(i.value === "moving" || i.value === "transforming") && (i.value = void 0), t("selectionTransformEnded", K);
|
|
12795
12798
|
}
|
|
12796
|
-
const k = Y(() => s("getTransform")), T = Y(() => l.value.length === 1 && !!l.value[0].connection?.isValid()),
|
|
12799
|
+
const k = Y(() => s("getTransform")), T = Y(() => l.value.length === 1 && !!l.value[0].connection?.isValid()), z = Y(() => l.value.length === 1 && !!Wn(l.value[0])), N = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !w(K) && K.meta.movable !== !1 && K.meta.transformable !== !1)), oe = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !w(K) && K.meta.resizable !== !1 && K.meta.transformable !== !1)), j = Y(() => i.value !== "typing" && !R() && !T.value && l.value.every((K) => !w(K) && K.meta.rotatable !== !1 && K.meta.transformable !== !1)), G = Y(() => {
|
|
12797
12800
|
if (i.value !== "typing" && !R() && !T.value && l.value.length === 1) {
|
|
12798
12801
|
const K = l.value[0];
|
|
12799
|
-
return
|
|
12802
|
+
return V.value?.equal(K) && !w(K) && K.foreground.isValid();
|
|
12800
12803
|
}
|
|
12801
12804
|
return !1;
|
|
12802
12805
|
});
|
|
@@ -12814,7 +12817,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12814
12817
|
class: "m-selection__parent",
|
|
12815
12818
|
style: Ie(Q.style)
|
|
12816
12819
|
}, null, 4))), 128)),
|
|
12817
|
-
|
|
12820
|
+
F(i) !== "moving" && F(i) !== "transforming" ? (U(), J(we, { key: 0 }, [(U(!0), J(we, null, Pe(g.value, (Q) => (U(), J("div", {
|
|
12818
12821
|
key: Q.id,
|
|
12819
12822
|
class: "m-selection__node",
|
|
12820
12823
|
style: Ie(Q.style)
|
|
@@ -12825,41 +12828,41 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12825
12828
|
transform: x.value,
|
|
12826
12829
|
"vector-effect": "non-scaling-stroke"
|
|
12827
12830
|
}, null, 8, cf))), 128))])) : _e("", !0)], 64)) : _e("", !0),
|
|
12828
|
-
|
|
12831
|
+
F(i) === "selecting" || F(i) === "painting" ? (U(), J("div", {
|
|
12829
12832
|
key: 1,
|
|
12830
12833
|
class: "m-selection__marquee",
|
|
12831
|
-
style: Ie(
|
|
12834
|
+
style: Ie(F(a).toCssStyle())
|
|
12832
12835
|
}, null, 4)) : _e("", !0),
|
|
12833
12836
|
k.value.width && k.value.height ? (U(), J("div", {
|
|
12834
12837
|
key: 2,
|
|
12835
12838
|
class: "m-selection__slot",
|
|
12836
|
-
style: Ie(
|
|
12839
|
+
style: Ie(F(d).toCssStyle())
|
|
12837
12840
|
}, [Me(Hh, null, {
|
|
12838
12841
|
default: Te((Q) => [Ne(K.$slots, "foreground-cropper", gt(yt(Q)))]),
|
|
12839
12842
|
_: 3
|
|
12840
12843
|
}), Ne(K.$slots, "default")], 4)) : _e("", !0),
|
|
12841
|
-
|
|
12844
|
+
F(i) === "pathEditing" && F(l).length === 1 ? (U(), Fe(rf, {
|
|
12842
12845
|
key: 3,
|
|
12843
|
-
element:
|
|
12844
|
-
scale: [
|
|
12845
|
-
offset: [-
|
|
12846
|
+
element: F(l)[0],
|
|
12847
|
+
scale: [F(u).zoom.x, F(u).zoom.y],
|
|
12848
|
+
offset: [-F(u).position.x, -F(u).position.y],
|
|
12846
12849
|
onEnd: H[0] || (H[0] = (Q) => i.value = void 0)
|
|
12847
12850
|
}, null, 8, [
|
|
12848
12851
|
"element",
|
|
12849
12852
|
"scale",
|
|
12850
12853
|
"offset"
|
|
12851
12854
|
])) : _e("", !0),
|
|
12852
|
-
!
|
|
12853
|
-
key:
|
|
12854
|
-
element:
|
|
12855
|
-
scale: [
|
|
12856
|
-
offset: [-
|
|
12855
|
+
!F(S) && z.value && F(i) !== "pathEditing" && F(i) !== "cropping" ? (U(), Fe(Jh, {
|
|
12856
|
+
key: F(l)[0].instanceId,
|
|
12857
|
+
element: F(l)[0],
|
|
12858
|
+
scale: [F(u).zoom.x, F(u).zoom.y],
|
|
12859
|
+
offset: [-F(u).position.x, -F(u).position.y]
|
|
12857
12860
|
}, null, 8, [
|
|
12858
12861
|
"element",
|
|
12859
12862
|
"scale",
|
|
12860
12863
|
"offset"
|
|
12861
12864
|
])) : _e("", !0),
|
|
12862
|
-
!
|
|
12865
|
+
!F(S) && !z.value && !T.value && k.value.width && k.value.height && F(i) !== "pathEditing" ? (U(), Fe(Go, ht({
|
|
12863
12866
|
key: 5,
|
|
12864
12867
|
ref: "transformTpl"
|
|
12865
12868
|
}, P.value, {
|
|
@@ -12868,12 +12871,12 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12868
12871
|
resizable: oe.value,
|
|
12869
12872
|
rotatable: j.value,
|
|
12870
12873
|
roundable: G.value,
|
|
12871
|
-
ui:
|
|
12872
|
-
"border-style":
|
|
12874
|
+
ui: F(i) !== "moving",
|
|
12875
|
+
"border-style": F(i) === "cropping" ? "dashed" : "solid",
|
|
12873
12876
|
class: "m-selection__transform",
|
|
12874
12877
|
tip: q,
|
|
12875
|
-
scale: [
|
|
12876
|
-
offset: [-
|
|
12878
|
+
scale: [F(u).zoom.x, F(u).zoom.y],
|
|
12879
|
+
offset: [-F(u).position.x, -F(u).position.y],
|
|
12877
12880
|
onStart: _,
|
|
12878
12881
|
onMove: E,
|
|
12879
12882
|
onEnd: I
|
|
@@ -12895,7 +12898,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12895
12898
|
]));
|
|
12896
12899
|
}
|
|
12897
12900
|
}), df = uf, hf = $e((n) => {
|
|
12898
|
-
const { isElement: e, selection: t, selectionMarquee: o, elementSelection: s, getObb: i, getAabb: r, root: a, findSibling: l, inEditorIs: c, isFrameNode: d, addElement: u, addElements: h, obbToFit: y, setVisible: f, isVisible: w, setLock:
|
|
12901
|
+
const { isElement: e, selection: t, selectionMarquee: o, elementSelection: s, getObb: i, getAabb: r, root: a, findSibling: l, inEditorIs: c, isFrameNode: d, addElement: u, addElements: h, obbToFit: y, setVisible: f, isVisible: w, setLock: L, isLock: V, exec: R } = n;
|
|
12899
12902
|
function S(g) {
|
|
12900
12903
|
switch (g) {
|
|
12901
12904
|
case "none":
|
|
@@ -12938,7 +12941,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
12938
12941
|
let I = b.get(E);
|
|
12939
12942
|
return I || (I = i(E, "drawboard"), b.set(E, I)), I;
|
|
12940
12943
|
};
|
|
12941
|
-
t.value = a.value?.children.flatMap((E) => d(E, !0) && !x.contains(_(E)) ? E.children : [E]).filter((E) => "isVisibleInTree" in E && E.isVisibleInTree() && _(E).overlap(x) && !
|
|
12944
|
+
t.value = a.value?.children.flatMap((E) => d(E, !0) && !x.contains(_(E)) ? E.children : [E]).filter((E) => "isVisibleInTree" in E && E.isVisibleInTree() && _(E).overlap(x) && !V(E) && !E.findAncestor((I) => V(I))) ?? [];
|
|
12942
12945
|
}
|
|
12943
12946
|
function C(g) {
|
|
12944
12947
|
const x = s.value;
|
|
@@ -13004,13 +13007,13 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
13004
13007
|
t.value.forEach((x) => {
|
|
13005
13008
|
switch (g) {
|
|
13006
13009
|
case "lock":
|
|
13007
|
-
|
|
13010
|
+
L(x, !0);
|
|
13008
13011
|
break;
|
|
13009
13012
|
case "unlock":
|
|
13010
|
-
|
|
13013
|
+
L(x, !1);
|
|
13011
13014
|
break;
|
|
13012
13015
|
default:
|
|
13013
|
-
|
|
13016
|
+
L(x, !V(x));
|
|
13014
13017
|
break;
|
|
13015
13018
|
}
|
|
13016
13019
|
});
|
|
@@ -13366,8 +13369,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
13366
13369
|
if (!f) continue;
|
|
13367
13370
|
const w = c(y.command);
|
|
13368
13371
|
if (u && !w.toLowerCase().includes(u) && !f.toLowerCase().includes(u) && !y.command.toLowerCase().includes(u)) continue;
|
|
13369
|
-
const
|
|
13370
|
-
h.has(
|
|
13372
|
+
const L = a.find((V) => V.test(y.command))?.key ?? "shortcutsCatOther";
|
|
13373
|
+
h.has(L) || h.set(L, []), h.get(L).push({
|
|
13371
13374
|
command: y.command,
|
|
13372
13375
|
label: w,
|
|
13373
13376
|
kbd: f
|
|
@@ -13385,20 +13388,20 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
13385
13388
|
width: "680px"
|
|
13386
13389
|
}, {
|
|
13387
13390
|
default: Te(() => [W("div", vf, [W("div", yf, [
|
|
13388
|
-
W("span", gf, be(
|
|
13391
|
+
W("span", gf, be(F(o)("shortcuts")), 1),
|
|
13389
13392
|
pt(W("input", {
|
|
13390
13393
|
"onUpdate:modelValue": h[0] || (h[0] = (y) => i.value = y),
|
|
13391
13394
|
class: "m-shortcuts__search",
|
|
13392
13395
|
type: "text",
|
|
13393
|
-
placeholder:
|
|
13396
|
+
placeholder: F(o)("shortcutsSearch"),
|
|
13394
13397
|
spellcheck: "false"
|
|
13395
13398
|
}, null, 8, xf), [[$n, i.value]]),
|
|
13396
13399
|
W("button", {
|
|
13397
13400
|
class: "m-shortcuts__close",
|
|
13398
13401
|
type: "button",
|
|
13399
|
-
title:
|
|
13402
|
+
title: F(o)("close"),
|
|
13400
13403
|
onClick: h[1] || (h[1] = (y) => r.value = !1)
|
|
13401
|
-
}, [Me(
|
|
13404
|
+
}, [Me(F(je), { icon: "$close" })], 8, bf)
|
|
13402
13405
|
]), W("div", _f, [(U(!0), J(we, null, Pe(d.value, (y) => (U(), J("section", {
|
|
13403
13406
|
key: y.key,
|
|
13404
13407
|
class: "m-shortcuts__group"
|
|
@@ -13508,8 +13511,8 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
13508
13511
|
});
|
|
13509
13512
|
return h.style.width = 1, h.style.height = 1, {
|
|
13510
13513
|
move: (y) => {
|
|
13511
|
-
const f = Math.min(y.x, u.x), w = Math.min(y.y, u.y),
|
|
13512
|
-
h.style.left = f, h.style.top = w, h.style.width = Math.max(1,
|
|
13514
|
+
const f = Math.min(y.x, u.x), w = Math.min(y.y, u.y), L = Math.max(y.x, u.x), V = Math.max(y.y, u.y);
|
|
13515
|
+
h.style.left = f, h.style.top = w, h.style.width = Math.max(1, L - f), h.style.height = Math.max(1, V - w);
|
|
13513
13516
|
},
|
|
13514
13517
|
end: () => {
|
|
13515
13518
|
e(void 0);
|
|
@@ -13537,7 +13540,7 @@ var Vd = /* @__PURE__ */ no(zd, [["render", Od]]), Fd = $e((n) => {
|
|
|
13537
13540
|
props: { snapLines: {} },
|
|
13538
13541
|
setup(n) {
|
|
13539
13542
|
const { state: e } = qe();
|
|
13540
|
-
return (t, o) =>
|
|
13543
|
+
return (t, o) => F(e) === "transforming" || F(e) === "moving" ? (U(), J("div", Pf, [(U(!0), J(we, null, Pe(n.snapLines, (s, i) => (U(), J("div", {
|
|
13541
13544
|
key: i,
|
|
13542
13545
|
class: De(s.class.map((r) => `m-smart-guides__${r}`)),
|
|
13543
13546
|
style: Ie({
|
|
@@ -13944,10 +13947,10 @@ var Nf = $e((n) => {
|
|
|
13944
13947
|
const p = f(v);
|
|
13945
13948
|
return p && (p.id = -1), p;
|
|
13946
13949
|
}
|
|
13947
|
-
function
|
|
13950
|
+
function L(v) {
|
|
13948
13951
|
return v.box?.id === -1;
|
|
13949
13952
|
}
|
|
13950
|
-
function
|
|
13953
|
+
function V(v, p) {
|
|
13951
13954
|
const g = ["vt", "vb"].includes(p.type) ? "y" : "x", x = g === "y" ? "x" : "y", b = mo(p);
|
|
13952
13955
|
let _ = Ss(p.type);
|
|
13953
13956
|
if (y.value) {
|
|
@@ -13962,8 +13965,8 @@ var Nf = $e((n) => {
|
|
|
13962
13965
|
if (b) {
|
|
13963
13966
|
if (p.pos < T.pos) return;
|
|
13964
13967
|
} else if (p.pos > T.pos) return;
|
|
13965
|
-
const
|
|
13966
|
-
_ !== T.type && !
|
|
13968
|
+
const z = L(T);
|
|
13969
|
+
_ !== T.type && !z || fn(p).overlap(fn(T), x) && (!z && I && I.box.id !== T.box.id && fn(I).overlap(fn(T), g) || (I = T, E.push(T), _ = Ss(_)));
|
|
13967
13970
|
};
|
|
13968
13971
|
return b ? v.outorderTraversal(k) : v.inorderTraversal(k), E;
|
|
13969
13972
|
}
|
|
@@ -13997,19 +14000,19 @@ var Nf = $e((n) => {
|
|
|
13997
14000
|
function A(v = "move") {
|
|
13998
14001
|
const p = [], g = v.startsWith("resize") ? v.split("-")[1] ?? "" : "", x = f(i.value);
|
|
13999
14002
|
if (x) {
|
|
14000
|
-
const b = new Set(s.value.map((
|
|
14003
|
+
const b = new Set(s.value.map((z) => z.instanceId)), _ = h.value.children.filter((z) => !b.has(z.instanceId) && t(z) && !z.connection?.isValid() && c.value.overlap(z.globalAabb)).map((z) => f(z)).filter(Boolean), E = w();
|
|
14001
14004
|
E && _.push(E);
|
|
14002
|
-
const { vLines: I, hLines: k } = _.reduce((
|
|
14005
|
+
const { vLines: I, hLines: k } = _.reduce((z, N) => ([
|
|
14003
14006
|
N.vt,
|
|
14004
14007
|
N.vm,
|
|
14005
14008
|
N.vb
|
|
14006
|
-
].forEach((oe) =>
|
|
14009
|
+
].forEach((oe) => z.vLines.add(oe)), [
|
|
14007
14010
|
N.hl,
|
|
14008
14011
|
N.hm,
|
|
14009
14012
|
N.hr
|
|
14010
|
-
].forEach((oe) =>
|
|
14011
|
-
vLines: new Ms((
|
|
14012
|
-
hLines: new Ms((
|
|
14013
|
+
].forEach((oe) => z.hLines.add(oe)), z), {
|
|
14014
|
+
vLines: new Ms((z, N) => z.pos - N.pos),
|
|
14015
|
+
hLines: new Ms((z, N) => z.pos - N.pos)
|
|
14013
14016
|
}), T = {
|
|
14014
14017
|
vt: [],
|
|
14015
14018
|
vb: [],
|
|
@@ -14030,10 +14033,10 @@ var Nf = $e((n) => {
|
|
|
14030
14033
|
x.hr
|
|
14031
14034
|
],
|
|
14032
14035
|
targets: k
|
|
14033
|
-
}].forEach(({ targets:
|
|
14036
|
+
}].forEach(({ targets: z, sources: N }) => {
|
|
14034
14037
|
const oe = [];
|
|
14035
14038
|
for (const j of N) {
|
|
14036
|
-
const G =
|
|
14039
|
+
const G = z.searchClosest(j, (K, H, Q) => !Q || Math.abs(K.pos - H.pos) < Math.abs(K.pos - Q.pos));
|
|
14037
14040
|
if (!G) continue;
|
|
14038
14041
|
const q = Math.abs(G.pos - j.pos);
|
|
14039
14042
|
q >= u.value || oe.push({
|
|
@@ -14050,17 +14053,17 @@ var Nf = $e((n) => {
|
|
|
14050
14053
|
}, {
|
|
14051
14054
|
sources: [x.hl, x.hr],
|
|
14052
14055
|
targets: k
|
|
14053
|
-
}].forEach(({ sources:
|
|
14054
|
-
for (const oe of
|
|
14055
|
-
}), T.vt = T.vt.sort((
|
|
14056
|
+
}].forEach(({ sources: z, targets: N }) => {
|
|
14057
|
+
for (const oe of z) T[oe.type] = V(N, oe);
|
|
14058
|
+
}), T.vt = T.vt.sort((z, N) => N.pos - z.pos), T.hl = T.hl.sort((z, N) => N.pos - z.pos), (g ? [] : [{
|
|
14056
14059
|
targets: [T.vt, T.vb],
|
|
14057
14060
|
sources: [x.vt, x.vb]
|
|
14058
14061
|
}, {
|
|
14059
14062
|
targets: [T.hl, T.hr],
|
|
14060
14063
|
sources: [x.hl, x.hr]
|
|
14061
|
-
}]).forEach(({ sources:
|
|
14062
|
-
const oe = N[0][0], j =
|
|
14063
|
-
if (oe && G && (!
|
|
14064
|
+
}]).forEach(({ sources: z, targets: N }) => {
|
|
14065
|
+
const oe = N[0][0], j = z[0], G = N[1][0], q = z[1];
|
|
14066
|
+
if (oe && G && (!L(oe) || !L(G))) {
|
|
14064
14067
|
const K = Math.abs(j.pos - oe.pos), H = Math.abs(q.pos - G.pos);
|
|
14065
14068
|
if (Math.abs(K - H) < u.value) {
|
|
14066
14069
|
const Q = mo(j);
|
|
@@ -14082,16 +14085,16 @@ var Nf = $e((n) => {
|
|
|
14082
14085
|
return;
|
|
14083
14086
|
}
|
|
14084
14087
|
}
|
|
14085
|
-
for (const K in
|
|
14086
|
-
const H = R(N[K],
|
|
14088
|
+
for (const K in z) {
|
|
14089
|
+
const H = R(N[K], z[K]);
|
|
14087
14090
|
if (H.length) {
|
|
14088
14091
|
p.push(...H);
|
|
14089
14092
|
break;
|
|
14090
14093
|
}
|
|
14091
14094
|
}
|
|
14092
14095
|
}), !g) {
|
|
14093
|
-
const
|
|
14094
|
-
for (const j of Ff(x, _)) (
|
|
14096
|
+
const z = (j) => j === "vt" || j === "vm" || j === "vb", N = p.some((j) => z(j.target.type)), oe = p.some((j) => !z(j.target.type));
|
|
14097
|
+
for (const j of Ff(x, _)) (z(j.target.type) ? !N : !oe) && p.push(j);
|
|
14095
14098
|
}
|
|
14096
14099
|
}
|
|
14097
14100
|
S.value = p;
|
|
@@ -14099,14 +14102,14 @@ var Nf = $e((n) => {
|
|
|
14099
14102
|
const C = Y(() => {
|
|
14100
14103
|
const { zoom: v, position: p } = l.value, g = (b) => b * v.x, x = (b) => b * v.y;
|
|
14101
14104
|
return S.value.flatMap((b) => {
|
|
14102
|
-
const { target: _, source: E, type: I } = b, k = E.box, T = _.box,
|
|
14105
|
+
const { target: _, source: E, type: I } = b, k = E.box, T = _.box, z = [
|
|
14103
14106
|
"vt",
|
|
14104
14107
|
"vm",
|
|
14105
14108
|
"vb"
|
|
14106
14109
|
].includes(_.type), N = {}, oe = [];
|
|
14107
14110
|
switch (I) {
|
|
14108
14111
|
case "alignment":
|
|
14109
|
-
if (N.class = ["alignment"],
|
|
14112
|
+
if (N.class = ["alignment"], z) {
|
|
14110
14113
|
const j = Math.min(k.hl.pos, T.hl.pos), G = Math.max(k.hr.pos, T.hr.pos);
|
|
14111
14114
|
N.style = {
|
|
14112
14115
|
left: g(j) - p.left,
|
|
@@ -14125,9 +14128,9 @@ var Nf = $e((n) => {
|
|
|
14125
14128
|
}
|
|
14126
14129
|
break;
|
|
14127
14130
|
case "area": {
|
|
14128
|
-
N.class = ["area"],
|
|
14129
|
-
const j =
|
|
14130
|
-
if (
|
|
14131
|
+
N.class = ["area"], z && N.class.push("area--vertical");
|
|
14132
|
+
const j = L(_) || L(E);
|
|
14133
|
+
if (z) {
|
|
14131
14134
|
const G = Math.min(E.pos, _.pos), q = j ? Math.max(k.hl.pos, T.hl.pos) : Math.min(k.hl.pos, T.hl.pos), K = j ? Math.min(k.hr.pos, T.hr.pos) : Math.max(k.hr.pos, T.hr.pos);
|
|
14132
14135
|
N.style = {
|
|
14133
14136
|
left: g(q) - p.left,
|
|
@@ -14148,7 +14151,7 @@ var Nf = $e((n) => {
|
|
|
14148
14151
|
break;
|
|
14149
14152
|
}
|
|
14150
14153
|
case "distance":
|
|
14151
|
-
if (N.class = ["distance"],
|
|
14154
|
+
if (N.class = ["distance"], z) {
|
|
14152
14155
|
N.class.push("distance--vertical");
|
|
14153
14156
|
const j = Math.min(E.pos, _.pos);
|
|
14154
14157
|
N.style = {
|
|
@@ -14307,7 +14310,7 @@ var Nf = $e((n) => {
|
|
|
14307
14310
|
const w = Y(() => o.value.map((v) => ({
|
|
14308
14311
|
el: v,
|
|
14309
14312
|
style: s(v, "drawboard").toCssStyle()
|
|
14310
|
-
}))),
|
|
14313
|
+
}))), L = Y(() => {
|
|
14311
14314
|
const v = [];
|
|
14312
14315
|
if (!u.value) return v;
|
|
14313
14316
|
const { direction: p, spacing: g = 0, items: x } = u.value, { zoom: b, position: _ } = r.value, E = (I) => {
|
|
@@ -14316,7 +14319,7 @@ var Nf = $e((n) => {
|
|
|
14316
14319
|
for (let I = 0; I < x.length; I++) {
|
|
14317
14320
|
const k = x[I], T = x[I + 1];
|
|
14318
14321
|
if (!T) break;
|
|
14319
|
-
const
|
|
14322
|
+
const z = p === "horizontal" ? "y" : "x", N = Math.max(k.globalAabb.min[z], T.globalAabb.min[z]), oe = Math.min(k.globalAabb.max[z], T.globalAabb.max[z]);
|
|
14320
14323
|
let j, G;
|
|
14321
14324
|
switch (p) {
|
|
14322
14325
|
case "horizontal":
|
|
@@ -14348,7 +14351,7 @@ var Nf = $e((n) => {
|
|
|
14348
14351
|
});
|
|
14349
14352
|
}
|
|
14350
14353
|
return v;
|
|
14351
|
-
}),
|
|
14354
|
+
}), V = Y(() => {
|
|
14352
14355
|
const { left: v, top: p, width: g, height: x } = s(e.value);
|
|
14353
14356
|
return {
|
|
14354
14357
|
left: v,
|
|
@@ -14372,7 +14375,7 @@ var Nf = $e((n) => {
|
|
|
14372
14375
|
I && (E.x -= I.left, E.y -= I.top);
|
|
14373
14376
|
const k = {};
|
|
14374
14377
|
k.width = g.width * b, k.height = g.height * _, k.left = E.x - k.width / 2, k.top = E.y - k.height / 2;
|
|
14375
|
-
const { left: T, top:
|
|
14378
|
+
const { left: T, top: z, right: N, bottom: oe } = p.globalAabb;
|
|
14376
14379
|
a(p, k.width, k.height, l(p, "Frame") ? void 0 : p.shape.isValid() ? { deep: !0 } : {
|
|
14377
14380
|
deep: !0,
|
|
14378
14381
|
textToFit: !0
|
|
@@ -14381,7 +14384,7 @@ var Nf = $e((n) => {
|
|
|
14381
14384
|
if (!j) return;
|
|
14382
14385
|
const { direction: G, items: q } = j, K = p.globalAabb, H = {
|
|
14383
14386
|
left: K.left - T,
|
|
14384
|
-
top: K.top -
|
|
14387
|
+
top: K.top - z,
|
|
14385
14388
|
right: K.right - N,
|
|
14386
14389
|
bottom: K.bottom - oe
|
|
14387
14390
|
};
|
|
@@ -14407,7 +14410,7 @@ var Nf = $e((n) => {
|
|
|
14407
14410
|
if (!x) return;
|
|
14408
14411
|
const { direction: b } = x;
|
|
14409
14412
|
let _ = [], E = Number.MIN_SAFE_INTEGER, I = Number.MAX_SAFE_INTEGER, k, T;
|
|
14410
|
-
function
|
|
14413
|
+
function z() {
|
|
14411
14414
|
const N = S.value;
|
|
14412
14415
|
if (!N) return;
|
|
14413
14416
|
const oe = b === "horizontal" ? "left" : "top";
|
|
@@ -14418,7 +14421,7 @@ var Nf = $e((n) => {
|
|
|
14418
14421
|
Rt(v, {
|
|
14419
14422
|
threshold: 3,
|
|
14420
14423
|
start: () => {
|
|
14421
|
-
h.value = !0, S.value = g.globalAabb.clone(),
|
|
14424
|
+
h.value = !0, S.value = g.globalAabb.clone(), z(), i.value = "moving", y.value = "ring";
|
|
14422
14425
|
},
|
|
14423
14426
|
move: ({ movePoint: N, lastPoint: oe }) => {
|
|
14424
14427
|
const j = S.value;
|
|
@@ -14436,13 +14439,13 @@ var Nf = $e((n) => {
|
|
|
14436
14439
|
let H = j.right - k.globalAabb.width;
|
|
14437
14440
|
j.x = k.globalAabb.left;
|
|
14438
14441
|
const Q = k.getParent()?.globalAabb;
|
|
14439
|
-
Q && (H -= Q.x), k.style.left = H, k.updateGlobalTransform(),
|
|
14442
|
+
Q && (H -= Q.x), k.style.left = H, k.updateGlobalTransform(), z();
|
|
14440
14443
|
}
|
|
14441
14444
|
} else if (K.x > I && T) {
|
|
14442
14445
|
const H = T.globalAabb.right - j.width;
|
|
14443
14446
|
let Q = j.left;
|
|
14444
14447
|
const $ = T.getParent()?.globalAabb;
|
|
14445
|
-
$ && (Q -= $.x), T.style.left = Q, j.x = H, T.updateGlobalTransform(),
|
|
14448
|
+
$ && (Q -= $.x), T.style.left = Q, j.x = H, T.updateGlobalTransform(), z();
|
|
14446
14449
|
}
|
|
14447
14450
|
break;
|
|
14448
14451
|
case "vertical":
|
|
@@ -14451,13 +14454,13 @@ var Nf = $e((n) => {
|
|
|
14451
14454
|
let H = j.bottom - k.globalAabb.height;
|
|
14452
14455
|
j.y = k.globalAabb.top;
|
|
14453
14456
|
const Q = k.getParent()?.globalAabb;
|
|
14454
|
-
Q && (H -= Q.y), k.style.top = H, k.updateGlobalTransform(),
|
|
14457
|
+
Q && (H -= Q.y), k.style.top = H, k.updateGlobalTransform(), z();
|
|
14455
14458
|
}
|
|
14456
14459
|
} else if (K.y > I && T) {
|
|
14457
14460
|
const H = T.globalAabb.bottom - j.height;
|
|
14458
14461
|
let Q = j.top;
|
|
14459
14462
|
const $ = T.getParent()?.globalAabb;
|
|
14460
|
-
$ && (Q -= $.y), T.style.top = Q, j.y = H, T.updateGlobalTransform(),
|
|
14463
|
+
$ && (Q -= $.y), T.style.top = Q, j.y = H, T.updateGlobalTransform(), z();
|
|
14461
14464
|
}
|
|
14462
14465
|
break;
|
|
14463
14466
|
}
|
|
@@ -14505,24 +14508,24 @@ var Nf = $e((n) => {
|
|
|
14505
14508
|
}
|
|
14506
14509
|
});
|
|
14507
14510
|
}
|
|
14508
|
-
return (v, p) => u.value && !
|
|
14511
|
+
return (v, p) => u.value && !F(d) ? (U(), J("div", {
|
|
14509
14512
|
key: 0,
|
|
14510
14513
|
class: De(["m-smart-selection", {
|
|
14511
|
-
"m-smart-selection--hover": !
|
|
14514
|
+
"m-smart-selection--hover": !F(i) && F(t),
|
|
14512
14515
|
[`m-smart-selection--${u.value.direction}`]: !0,
|
|
14513
14516
|
[`m-smart-selection--${y.value}`]: y.value !== void 0
|
|
14514
14517
|
}])
|
|
14515
14518
|
}, [
|
|
14516
|
-
|
|
14519
|
+
F(i) !== "moving" ? (U(), J(we, { key: 0 }, [(U(!0), J(we, null, Pe(w.value, (g, x) => (U(), J("div", {
|
|
14517
14520
|
key: x,
|
|
14518
14521
|
class: De(["m-smart-selection__node", { "m-smart-selection__node--active": g.el.equal(e.value) }]),
|
|
14519
14522
|
style: Ie(g.style)
|
|
14520
14523
|
}, [W("div", {
|
|
14521
14524
|
class: "m-smart-selection__ring",
|
|
14522
14525
|
onPointerdown: (b) => C(b, g)
|
|
14523
|
-
}, null, 40, Df)], 6))), 128)),
|
|
14526
|
+
}, null, 40, Df)], 6))), 128)), V.value.width && V.value.height ? (U(), Fe(Go, ht({
|
|
14524
14527
|
key: 0,
|
|
14525
|
-
"model-value":
|
|
14528
|
+
"model-value": V.value
|
|
14526
14529
|
}, R, {
|
|
14527
14530
|
handles: [
|
|
14528
14531
|
"resize-l",
|
|
@@ -14532,14 +14535,14 @@ var Nf = $e((n) => {
|
|
|
14532
14535
|
],
|
|
14533
14536
|
class: "m-smart-selection__transform",
|
|
14534
14537
|
color: "rgb(var(--m-theme-secondary))",
|
|
14535
|
-
scale: [
|
|
14536
|
-
offset: [-
|
|
14538
|
+
scale: [F(r).zoom.x, F(r).zoom.y],
|
|
14539
|
+
offset: [-F(r).position.x, -F(r).position.y]
|
|
14537
14540
|
}), null, 16, [
|
|
14538
14541
|
"model-value",
|
|
14539
14542
|
"scale",
|
|
14540
14543
|
"offset"
|
|
14541
14544
|
])) : _e("", !0)], 64)) : _e("", !0),
|
|
14542
|
-
(U(!0), J(we, null, Pe(
|
|
14545
|
+
(U(!0), J(we, null, Pe(L.value, (g, x) => (U(), J("div", {
|
|
14543
14546
|
key: x,
|
|
14544
14547
|
class: "m-smart-selection__spacing",
|
|
14545
14548
|
style: Ie(g.style)
|
|
@@ -14619,34 +14622,34 @@ var Nf = $e((n) => {
|
|
|
14619
14622
|
setup(n) {
|
|
14620
14623
|
const { state: e, t, getKbd: o, exporting: s, exportProgress: i, selection: r, isElement: a, statusbarItems: l } = qe();
|
|
14621
14624
|
return (c, d) => (U(), J("div", Zf, [
|
|
14622
|
-
W("div", Jf, [
|
|
14623
|
-
W("div", Qf, [W("span", em, be(
|
|
14625
|
+
W("div", Jf, [F(e) === "typing" ? (U(), J(we, { key: 0 }, [
|
|
14626
|
+
W("div", Qf, [W("span", em, be(F(o)("Command")), 1), W("span", tm, be(F(o)("Enter")), 1)]),
|
|
14624
14627
|
d[1] || (d[1] = W("span", null, "/", -1)),
|
|
14625
|
-
W("div", nm, [W("span", om, be(
|
|
14626
|
-
], 64)) :
|
|
14627
|
-
W("div", sm, [Me(
|
|
14628
|
+
W("div", nm, [W("span", om, be(F(o)("Escape")), 1), W("span", null, be(F(t)("commitChanges")), 1)])
|
|
14629
|
+
], 64)) : F(e) === "transforming" || F(e) === "moving" ? (U(), J(we, { key: 1 }, [
|
|
14630
|
+
W("div", sm, [Me(F(je), { icon: "$mouseRightClick" })]),
|
|
14628
14631
|
d[3] || (d[3] = W("span", null, " / ", -1)),
|
|
14629
|
-
W("div", im, [W("span", rm, be(
|
|
14630
|
-
|
|
14631
|
-
], 64)) :
|
|
14632
|
-
W("div", um, [Me(
|
|
14632
|
+
W("div", im, [W("span", rm, be(F(o)("Escape")), 1), W("span", null, be(F(t)("cancel")), 1)]),
|
|
14633
|
+
F(e) === "moving" ? (U(), J(we, { key: 0 }, [d[2] || (d[2] = W("div", { class: "m-statusbar__divider" }, null, -1)), W("div", am, [W("span", lm, be(F(o)("Shift")), 1), W("span", null, be(F(t)("constrainMovement")), 1)])], 64)) : _e("", !0)
|
|
14634
|
+
], 64)) : F(e) ? (U(), J("span", cm, be(F(t)(F(e))), 1)) : (U(), J(we, { key: 3 }, [
|
|
14635
|
+
W("div", um, [Me(F(je), { icon: "$mouseLeftClick" }), W("span", null, be(F(t)("selectObject")), 1)]),
|
|
14633
14636
|
d[5] || (d[5] = W("span", null, " + ", -1)),
|
|
14634
|
-
W("div", dm, [W("span", hm, be(
|
|
14637
|
+
W("div", dm, [W("span", hm, be(F(o)("Shift")), 1), W("span", null, be(F(t)("extend")), 1)]),
|
|
14635
14638
|
d[6] || (d[6] = W("div", { class: "m-statusbar__divider" }, null, -1)),
|
|
14636
|
-
W("div", fm, [Me(
|
|
14639
|
+
W("div", fm, [Me(F(je), { icon: "$mouseLeftClick" }), W("span", null, be(F(t)("selectArea")), 1)]),
|
|
14637
14640
|
d[7] || (d[7] = W("span", null, " + ", -1)),
|
|
14638
|
-
W("div", mm, [W("span", pm, be(
|
|
14641
|
+
W("div", mm, [W("span", pm, be(F(o)("Shift")), 1), W("span", null, be(F(t)("extend")), 1)]),
|
|
14639
14642
|
d[8] || (d[8] = W("div", { class: "m-statusbar__divider" }, null, -1)),
|
|
14640
|
-
W("div", vm, [Me(
|
|
14641
|
-
|
|
14643
|
+
W("div", vm, [Me(F(je), { icon: "$mouseLeftClick" }), W("span", null, be(F(t)("dragSelected")), 1)]),
|
|
14644
|
+
F(r).length === 1 && F(a)(F(r)[0]) && F(r)[0].text.isValid() ? (U(), J(we, { key: 0 }, [d[4] || (d[4] = W("div", { class: "m-statusbar__divider" }, null, -1)), W("div", ym, [W("span", null, be(F(o)("Enter")), 1), W("span", null, be(F(t)("startTyping")), 1)])], 64)) : _e("", !0)
|
|
14642
14645
|
], 64))]),
|
|
14643
|
-
W("div", gm, [
|
|
14646
|
+
W("div", gm, [F(s) ? (U(), Fe(Kf, {
|
|
14644
14647
|
key: 0,
|
|
14645
|
-
modelValue:
|
|
14648
|
+
modelValue: F(i),
|
|
14646
14649
|
"onUpdate:modelValue": d[0] || (d[0] = (u) => Gn(i) ? i.value = u : null),
|
|
14647
|
-
label:
|
|
14650
|
+
label: F(t)("exporting")
|
|
14648
14651
|
}, null, 8, ["modelValue", "label"])) : _e("", !0)]),
|
|
14649
|
-
(U(!0), J(we, null, Pe(
|
|
14652
|
+
(U(!0), J(we, null, Pe(F(l), (u, h) => (U(), Fe(No(u), { key: h }))), 128))
|
|
14650
14653
|
]));
|
|
14651
14654
|
}
|
|
14652
14655
|
}), bm = /* @__PURE__ */ no(xm, [["__scopeId", "data-v-9ad38a0f"]]), _m = $e((n) => {
|
|
@@ -14728,13 +14731,13 @@ var Nf = $e((n) => {
|
|
|
14728
14731
|
function u(y, f) {
|
|
14729
14732
|
const w = Number(f);
|
|
14730
14733
|
if (!Number.isFinite(w)) return;
|
|
14731
|
-
const
|
|
14732
|
-
|
|
14734
|
+
const L = [...t.modelValue];
|
|
14735
|
+
L[y] = y === 0 || y === 2 ? Ct(d(w), 0, 1) : d(w), o("update:modelValue", L);
|
|
14733
14736
|
}
|
|
14734
14737
|
function h(y, f) {
|
|
14735
14738
|
y.preventDefault(), y.stopPropagation(), a.value = f;
|
|
14736
14739
|
const w = r.value.getBoundingClientRect();
|
|
14737
|
-
function
|
|
14740
|
+
function L(R) {
|
|
14738
14741
|
const S = Ct((R.clientX - w.left - Cs) / po, 0, 1), A = Ct(1 - (R.clientY - w.top - Es) / vo, -0.5, 1.5), [C, P, v, p] = t.modelValue;
|
|
14739
14742
|
o("update:modelValue", f === 1 ? [
|
|
14740
14743
|
d(S),
|
|
@@ -14748,10 +14751,10 @@ var Nf = $e((n) => {
|
|
|
14748
14751
|
d(A)
|
|
14749
14752
|
]);
|
|
14750
14753
|
}
|
|
14751
|
-
function
|
|
14752
|
-
a.value = 0, window.removeEventListener("mousemove",
|
|
14754
|
+
function V() {
|
|
14755
|
+
a.value = 0, window.removeEventListener("mousemove", L), window.removeEventListener("mouseup", V);
|
|
14753
14756
|
}
|
|
14754
|
-
window.addEventListener("mousemove",
|
|
14757
|
+
window.addEventListener("mousemove", L), window.addEventListener("mouseup", V);
|
|
14755
14758
|
}
|
|
14756
14759
|
return (y, f) => (U(), J("div", km, [(U(), J("svg", {
|
|
14757
14760
|
ref: "svgTpl",
|
|
@@ -14823,14 +14826,14 @@ var Nf = $e((n) => {
|
|
|
14823
14826
|
"y1",
|
|
14824
14827
|
"x2",
|
|
14825
14828
|
"y2"
|
|
14826
|
-
], (w,
|
|
14829
|
+
], (w, L) => W("input", {
|
|
14827
14830
|
key: w,
|
|
14828
14831
|
class: "m-ease__field",
|
|
14829
14832
|
type: "number",
|
|
14830
14833
|
step: "0.01",
|
|
14831
14834
|
title: w,
|
|
14832
|
-
value: n.modelValue[
|
|
14833
|
-
onChange: (
|
|
14835
|
+
value: n.modelValue[L],
|
|
14836
|
+
onChange: (V) => u(L, V.target.value)
|
|
14834
14837
|
}, null, 40, Rm)), 64))])]));
|
|
14835
14838
|
}
|
|
14836
14839
|
}), Vm = Om, Fm = {
|
|
@@ -14896,12 +14899,12 @@ var Nf = $e((n) => {
|
|
|
14896
14899
|
...i.map((H) => H.key),
|
|
14897
14900
|
"transform",
|
|
14898
14901
|
"transformOrigin"
|
|
14899
|
-
]), l = Y(() => e.value), c = Y(() => l.value?.anim), d = Y(() => l.value?.offset ?? 0), u = Y(() => c.value?.keyframes ?? []), h = Y(() => u.value.find((H) => H.offset === d.value)), y = de(0), f = Y(() => (y.value, o("getEasings"))), w = Y(() => qs(h.value?.easing ?? "linear", f.value)),
|
|
14902
|
+
]), l = Y(() => e.value), c = Y(() => l.value?.anim), d = Y(() => l.value?.offset ?? 0), u = Y(() => c.value?.keyframes ?? []), h = Y(() => u.value.find((H) => H.offset === d.value)), y = de(0), f = Y(() => (y.value, o("getEasings"))), w = Y(() => qs(h.value?.easing ?? "linear", f.value)), L = Y(() => {
|
|
14900
14903
|
const H = h.value?.easing ?? "linear";
|
|
14901
14904
|
return H in qt || H in f.value ? H : "custom";
|
|
14902
|
-
}),
|
|
14905
|
+
}), V = Y(() => {
|
|
14903
14906
|
const H = [...Object.keys(qt), ...Object.keys(f.value)];
|
|
14904
|
-
return
|
|
14907
|
+
return L.value === "custom" ? ["custom", ...H] : H;
|
|
14905
14908
|
});
|
|
14906
14909
|
function R(H) {
|
|
14907
14910
|
H !== "custom" && G(H);
|
|
@@ -14930,14 +14933,14 @@ var Nf = $e((n) => {
|
|
|
14930
14933
|
const $ = typeof H == "number" ? H : Number(H);
|
|
14931
14934
|
return Number.isFinite($) ? Number($.toFixed(Q)).toString() : "0";
|
|
14932
14935
|
}
|
|
14933
|
-
function
|
|
14936
|
+
function z(H) {
|
|
14934
14937
|
const Q = c.value;
|
|
14935
14938
|
Q && t.value?.transact(() => {
|
|
14936
14939
|
Q.keyframes = H;
|
|
14937
14940
|
});
|
|
14938
14941
|
}
|
|
14939
14942
|
function N(H, Q) {
|
|
14940
|
-
!h.value || !Number.isFinite(Q) ||
|
|
14943
|
+
!h.value || !Number.isFinite(Q) || z(Sn(u.value, {
|
|
14941
14944
|
offset: d.value,
|
|
14942
14945
|
[H]: Q
|
|
14943
14946
|
}));
|
|
@@ -14945,22 +14948,22 @@ var Nf = $e((n) => {
|
|
|
14945
14948
|
function oe(H, Q, $) {
|
|
14946
14949
|
if (!h.value || !Number.isFinite($)) return;
|
|
14947
14950
|
const Z = $l(b.value, H, Q, $);
|
|
14948
|
-
|
|
14951
|
+
z(Sn(u.value, {
|
|
14949
14952
|
offset: d.value,
|
|
14950
14953
|
transform: Z
|
|
14951
14954
|
}));
|
|
14952
14955
|
}
|
|
14953
14956
|
function j(H) {
|
|
14954
|
-
h.value &&
|
|
14957
|
+
h.value && z(Sn(u.value, {
|
|
14955
14958
|
offset: d.value,
|
|
14956
14959
|
transformOrigin: H
|
|
14957
14960
|
}));
|
|
14958
14961
|
}
|
|
14959
14962
|
function G(H) {
|
|
14960
|
-
h.value &&
|
|
14963
|
+
h.value && z(Hs(u.value, d.value, H));
|
|
14961
14964
|
}
|
|
14962
14965
|
function q() {
|
|
14963
|
-
h.value && (
|
|
14966
|
+
h.value && (z(js(u.value, d.value)), e.value = null);
|
|
14964
14967
|
}
|
|
14965
14968
|
function K(H) {
|
|
14966
14969
|
return Number(H.target.value);
|
|
@@ -14978,34 +14981,34 @@ var Nf = $e((n) => {
|
|
|
14978
14981
|
A.value ? (U(), J(we, { key: 0 }, [pt(W("input", {
|
|
14979
14982
|
"onUpdate:modelValue": Q[0] || (Q[0] = ($) => C.value = $),
|
|
14980
14983
|
class: "m-kfpop__select",
|
|
14981
|
-
placeholder:
|
|
14984
|
+
placeholder: F(s)("saveEasingPreset"),
|
|
14982
14985
|
autofocus: "",
|
|
14983
14986
|
onKeyup: [Zo(v, ["enter"]), Q[1] || (Q[1] = Zo(($) => A.value = !1, ["esc"]))]
|
|
14984
14987
|
}, null, 40, Bm), [[$n, C.value]]), W("button", {
|
|
14985
14988
|
class: "m-kfpop__btn",
|
|
14986
14989
|
type: "button",
|
|
14987
|
-
title:
|
|
14990
|
+
title: F(s)("saveEasingPreset"),
|
|
14988
14991
|
onClick: v
|
|
14989
|
-
}, [Me(
|
|
14992
|
+
}, [Me(F(je), { icon: "$check" })], 8, qm)], 64)) : (U(), J(we, { key: 1 }, [W("select", {
|
|
14990
14993
|
class: "m-kfpop__select",
|
|
14991
|
-
value:
|
|
14994
|
+
value: L.value,
|
|
14992
14995
|
onChange: Q[2] || (Q[2] = ($) => R($.target.value))
|
|
14993
|
-
}, [(U(!0), J(we, null, Pe(
|
|
14996
|
+
}, [(U(!0), J(we, null, Pe(V.value, ($) => (U(), J("option", {
|
|
14994
14997
|
key: $,
|
|
14995
14998
|
value: $
|
|
14996
|
-
}, be($ === "custom" ?
|
|
14999
|
+
}, be($ === "custom" ? F(s)("custom") : $), 9, jm))), 128))], 40, Um), L.value === "custom" ? (U(), J("button", {
|
|
14997
15000
|
key: 0,
|
|
14998
15001
|
class: "m-kfpop__btn",
|
|
14999
15002
|
type: "button",
|
|
15000
|
-
title:
|
|
15003
|
+
title: F(s)("saveEasingPreset"),
|
|
15001
15004
|
onClick: P
|
|
15002
|
-
}, [Me(
|
|
15005
|
+
}, [Me(F(je), { icon: "$plus" })], 8, Hm)) : _e("", !0)], 64)),
|
|
15003
15006
|
W("button", {
|
|
15004
15007
|
class: "m-kfpop__btn",
|
|
15005
15008
|
type: "button",
|
|
15006
|
-
title:
|
|
15009
|
+
title: F(s)("removeKeyframe"),
|
|
15007
15010
|
onClick: q
|
|
15008
|
-
}, [Me(
|
|
15011
|
+
}, [Me(F(je), { icon: "$close" })], 8, Xm)
|
|
15009
15012
|
]),
|
|
15010
15013
|
Me(Vm, {
|
|
15011
15014
|
"model-value": w.value,
|
|
@@ -15051,7 +15054,7 @@ var Nf = $e((n) => {
|
|
|
15051
15054
|
class: "m-kfpop__input",
|
|
15052
15055
|
type: "text",
|
|
15053
15056
|
value: E.value,
|
|
15054
|
-
placeholder:
|
|
15057
|
+
placeholder: F(s)("default"),
|
|
15055
15058
|
onChange: Q[3] || (Q[3] = ($) => j($.target.value))
|
|
15056
15059
|
}, null, 40, Qm)])) : _e("", !0)
|
|
15057
15060
|
])) : _e("", !0)]),
|
|
@@ -15181,15 +15184,15 @@ var Nf = $e((n) => {
|
|
|
15181
15184
|
}
|
|
15182
15185
|
return b;
|
|
15183
15186
|
}
|
|
15184
|
-
function
|
|
15187
|
+
function L(p, g) {
|
|
15185
15188
|
if (!g) return "move";
|
|
15186
15189
|
const x = p.currentTarget.getBoundingClientRect(), b = p.clientX - x.left;
|
|
15187
15190
|
return b < 6 ? "resize-left" : b > x.width - 6 ? "resize-right" : "move";
|
|
15188
15191
|
}
|
|
15189
|
-
function
|
|
15192
|
+
function V(p, g, x) {
|
|
15190
15193
|
p.stopPropagation(), r.value = [e.node];
|
|
15191
|
-
const b =
|
|
15192
|
-
function
|
|
15194
|
+
const b = L(p, x), _ = p.clientX, E = g.delay, I = x ? g.duration || e.endTime - E : 0, k = 1e3 / s.value, T = 8 * e.msPerPx;
|
|
15195
|
+
function z(oe) {
|
|
15193
15196
|
const j = (oe.clientX - _) * e.msPerPx;
|
|
15194
15197
|
if (b === "move") {
|
|
15195
15198
|
const G = w(E + j, T, g);
|
|
@@ -15203,12 +15206,12 @@ var Nf = $e((n) => {
|
|
|
15203
15206
|
}
|
|
15204
15207
|
}
|
|
15205
15208
|
function N() {
|
|
15206
|
-
window.removeEventListener("mousemove",
|
|
15209
|
+
window.removeEventListener("mousemove", z), window.removeEventListener("mouseup", N), i();
|
|
15207
15210
|
}
|
|
15208
|
-
window.addEventListener("mousemove",
|
|
15211
|
+
window.addEventListener("mousemove", z), window.addEventListener("mouseup", N);
|
|
15209
15212
|
}
|
|
15210
15213
|
function R(p, g) {
|
|
15211
|
-
|
|
15214
|
+
V(p, g.anim ?? e.node, g.kind === "animation");
|
|
15212
15215
|
}
|
|
15213
15216
|
function S(p) {
|
|
15214
15217
|
return p.anim?.keyframes ?? [];
|
|
@@ -15220,11 +15223,11 @@ var Nf = $e((n) => {
|
|
|
15220
15223
|
r.value = [e.node];
|
|
15221
15224
|
const _ = S(g), E = _[x];
|
|
15222
15225
|
if (!E) return;
|
|
15223
|
-
const I = p.currentTarget, k = b.duration || e.endTime - b.delay || 1, T = p.clientX,
|
|
15226
|
+
const I = p.currentTarget, k = b.duration || e.endTime - b.delay || 1, T = p.clientX, z = E.offset, N = 1e-3, oe = x > 0 ? _[x - 1].offset + N : 0, j = x < _.length - 1 ? _[x + 1].offset - N : 1, G = 1e3 / s.value;
|
|
15224
15227
|
let q = !1;
|
|
15225
15228
|
function K(Q) {
|
|
15226
15229
|
Math.abs(Q.clientX - T) > 2 && (q = !0);
|
|
15227
|
-
const $ = (Q.clientX - T) * e.msPerPx / k, Z = b.delay + (
|
|
15230
|
+
const $ = (Q.clientX - T) * e.msPerPx / k, Z = b.delay + (z + $) * k, te = Ct((Math.round(Z / G) * G - b.delay) / k, oe, j), ee = S(g);
|
|
15228
15231
|
t.value?.transact(() => {
|
|
15229
15232
|
b.keyframes = ee.map((ae, ce) => ce === x ? {
|
|
15230
15233
|
...ae,
|
|
@@ -15234,11 +15237,11 @@ var Nf = $e((n) => {
|
|
|
15234
15237
|
}
|
|
15235
15238
|
function H() {
|
|
15236
15239
|
if (window.removeEventListener("mousemove", K), window.removeEventListener("mouseup", H), q) return;
|
|
15237
|
-
o.value = b.delay +
|
|
15240
|
+
o.value = b.delay + z * k;
|
|
15238
15241
|
const Q = I.getBoundingClientRect();
|
|
15239
15242
|
a.value = {
|
|
15240
15243
|
anim: b,
|
|
15241
|
-
offset:
|
|
15244
|
+
offset: z,
|
|
15242
15245
|
target: {
|
|
15243
15246
|
x: Q.left + Q.width / 2,
|
|
15244
15247
|
y: Q.top
|
|
@@ -15275,7 +15278,7 @@ var Nf = $e((n) => {
|
|
|
15275
15278
|
};
|
|
15276
15279
|
}
|
|
15277
15280
|
function v(p) {
|
|
15278
|
-
|
|
15281
|
+
V(p, e.node, !1);
|
|
15279
15282
|
}
|
|
15280
15283
|
return (p, g) => (U(), J("div", {
|
|
15281
15284
|
class: De(["m-segment", [`m-segment--${(n.node.meta.inEditorIs ?? "none").toLowerCase()}`, n.active && "m-segment--active"]]),
|
|
@@ -15302,7 +15305,7 @@ var Nf = $e((n) => {
|
|
|
15302
15305
|
onMousedown: (E) => A(E, x, _)
|
|
15303
15306
|
}, null, 44, ap))), 128))], 46, ip))), 128)),
|
|
15304
15307
|
n.active ? (U(), J("div", lp)) : _e("", !0),
|
|
15305
|
-
W("span", cp, be(
|
|
15308
|
+
W("span", cp, be(F(d)), 1),
|
|
15306
15309
|
n.active ? (U(), J("div", up)) : _e("", !0)
|
|
15307
15310
|
], 38));
|
|
15308
15311
|
}
|
|
@@ -15315,7 +15318,7 @@ var Nf = $e((n) => {
|
|
|
15315
15318
|
__name: "Trackhead",
|
|
15316
15319
|
props: { node: {} },
|
|
15317
15320
|
setup(n) {
|
|
15318
|
-
const e = n, t = qe(), { selection: o, hoverElement: s, isElement: i, exec: r, t: a, animationPresets: l } = t, c = de(!1), d = _i(t, (g) => r("applyAnimationPreset", g.id, e.node)), { thumbnailIcon: u, thumbnailName: h } = Yo(Y(() => e.node), t), y = Y(() => o.value.some((g) => g.equal(e.node))), f = de(!1), w = de(!1),
|
|
15321
|
+
const e = n, t = qe(), { selection: o, hoverElement: s, isElement: i, exec: r, t: a, animationPresets: l } = t, c = de(!1), d = _i(t, (g) => r("applyAnimationPreset", g.id, e.node)), { thumbnailIcon: u, thumbnailName: h } = Yo(Y(() => e.node), t), y = Y(() => o.value.some((g) => g.equal(e.node))), f = de(!1), w = de(!1), L = de(""), V = nt("inputDom"), R = Y(() => f.value);
|
|
15319
15322
|
function S(g) {
|
|
15320
15323
|
if (g.button === 0) {
|
|
15321
15324
|
if (g.shiftKey) {
|
|
@@ -15349,15 +15352,15 @@ var Nf = $e((n) => {
|
|
|
15349
15352
|
s.value = void 0, f.value = !1;
|
|
15350
15353
|
}
|
|
15351
15354
|
function P(g) {
|
|
15352
|
-
g.stopPropagation(), w.value = !0,
|
|
15353
|
-
|
|
15355
|
+
g.stopPropagation(), w.value = !0, L.value = h.value, zt().then(() => {
|
|
15356
|
+
V.value?.focus({ preventScroll: !0 }), V.value?.select();
|
|
15354
15357
|
});
|
|
15355
15358
|
}
|
|
15356
15359
|
function v() {
|
|
15357
|
-
w.value = !1,
|
|
15360
|
+
w.value = !1, L.value && L.value !== h.value && (e.node.name = L.value);
|
|
15358
15361
|
}
|
|
15359
15362
|
function p(g) {
|
|
15360
|
-
g.key === "Enter" ?
|
|
15363
|
+
g.key === "Enter" ? V.value?.blur() : g.key === "Escape" && (w.value = !1);
|
|
15361
15364
|
}
|
|
15362
15365
|
return (g, x) => (U(), J("div", {
|
|
15363
15366
|
class: De(["m-trackhead", [y.value && "m-trackhead--selected"]]),
|
|
@@ -15366,15 +15369,15 @@ var Nf = $e((n) => {
|
|
|
15366
15369
|
onMouseenter: A,
|
|
15367
15370
|
onMouseleave: C
|
|
15368
15371
|
}, [
|
|
15369
|
-
W("div", yp, [Me(
|
|
15372
|
+
W("div", yp, [Me(F(je), { icon: F(u) }, null, 8, ["icon"])]),
|
|
15370
15373
|
W("div", {
|
|
15371
15374
|
class: "m-trackhead__name",
|
|
15372
15375
|
onDblclick: P
|
|
15373
15376
|
}, [w.value ? pt((U(), J("input", {
|
|
15374
15377
|
key: 0,
|
|
15375
15378
|
ref_key: "inputDom",
|
|
15376
|
-
ref:
|
|
15377
|
-
"onUpdate:modelValue": x[0] || (x[0] = (b) =>
|
|
15379
|
+
ref: V,
|
|
15380
|
+
"onUpdate:modelValue": x[0] || (x[0] = (b) => L.value = b),
|
|
15378
15381
|
type: "text",
|
|
15379
15382
|
class: "m-trackhead__input",
|
|
15380
15383
|
spellcheck: "false",
|
|
@@ -15384,22 +15387,22 @@ var Nf = $e((n) => {
|
|
|
15384
15387
|
onKeydown: p,
|
|
15385
15388
|
onMousedown: x[1] || (x[1] = Je(() => {
|
|
15386
15389
|
}, ["stop"]))
|
|
15387
|
-
}, null, 544)), [[$n,
|
|
15388
|
-
W("div", { class: De(["m-trackhead__action", { "m-trackhead__action--show": R.value || c.value }]) }, [
|
|
15390
|
+
}, null, 544)), [[$n, L.value]]) : (U(), J("span", gp, be(F(h)), 1))], 32),
|
|
15391
|
+
W("div", { class: De(["m-trackhead__action", { "m-trackhead__action--show": R.value || c.value }]) }, [F(i)(n.node) && F(l).length ? (U(), Fe(io, {
|
|
15389
15392
|
key: 0,
|
|
15390
15393
|
modelValue: c.value,
|
|
15391
15394
|
"onUpdate:modelValue": x[3] || (x[3] = (b) => c.value = b),
|
|
15392
|
-
items:
|
|
15395
|
+
items: F(d),
|
|
15393
15396
|
location: "bottom-start",
|
|
15394
15397
|
offset: 4
|
|
15395
15398
|
}, {
|
|
15396
15399
|
activator: Te(({ props: b }) => [W("button", ht({
|
|
15397
15400
|
type: "button",
|
|
15398
15401
|
class: ["m-trackhead__btn", { "m-trackhead__btn--show": c.value }],
|
|
15399
|
-
title:
|
|
15402
|
+
title: F(a)("addAnimation")
|
|
15400
15403
|
}, b, { onMousedown: x[2] || (x[2] = Je(() => {
|
|
15401
|
-
}, ["stop"])) }), [Me(
|
|
15402
|
-
title: Te(({ item: b }) => [mt(be(
|
|
15404
|
+
}, ["stop"])) }), [Me(F(je), { icon: "$plus" })], 16, xp)]),
|
|
15405
|
+
title: Te(({ item: b }) => [mt(be(F(a)(b.key)), 1)]),
|
|
15403
15406
|
_: 1
|
|
15404
15407
|
}, 8, ["modelValue", "items"])) : _e("", !0)], 2)
|
|
15405
15408
|
], 42, vp));
|
|
@@ -15407,14 +15410,14 @@ var Nf = $e((n) => {
|
|
|
15407
15410
|
}), _p = bp, wp = { class: "m-timeline__toolbar" }, kp = { class: "m-timeline__time" }, Mp = { class: "m-timeline__time--muted" }, Sp = { class: "m-timeline__controls" }, Cp = ["title"], Ep = ["title"], Tp = ["title"], Ap = ["title"], Pp = ["title"], Ip = ["title"], $p = ["value"], Lp = ["title"], zp = ["value"], Rp = ["title"], Op = ["title"], Vp = { class: "m-timeline__main" }, Fp = { class: "m-timeline__left-wrapper" }, Np = { class: "m-timeline__right-wrapper" }, Dp = { class: "m-timeline__ruler" }, Bp = { class: "m-timeline__track" }, qp = /* @__PURE__ */ Se({
|
|
15408
15411
|
__name: "Timeline",
|
|
15409
15412
|
setup(n) {
|
|
15410
|
-
const e = qe(), { isElement: t, root: o, msPerPx: s, currentTime: i, endTime: r, selection: a, paused: l, fps: c, playbackRate: d, loopMode: u, exec: h, t: y, assets: f, animationPresets: w } = e,
|
|
15413
|
+
const e = qe(), { isElement: t, root: o, msPerPx: s, currentTime: i, endTime: r, selection: a, paused: l, fps: c, playbackRate: d, loopMode: u, exec: h, t: y, assets: f, animationPresets: w } = e, L = [
|
|
15411
15414
|
0.25,
|
|
15412
15415
|
0.5,
|
|
15413
15416
|
1,
|
|
15414
15417
|
1.5,
|
|
15415
15418
|
2,
|
|
15416
15419
|
4
|
|
15417
|
-
],
|
|
15420
|
+
], V = [
|
|
15418
15421
|
"none",
|
|
15419
15422
|
"loop",
|
|
15420
15423
|
"alternate"
|
|
@@ -15447,7 +15450,7 @@ var Nf = $e((n) => {
|
|
|
15447
15450
|
return `${E(Math.floor(G / c.value / 60))}:${E(K)}.${E(q)}`;
|
|
15448
15451
|
}
|
|
15449
15452
|
const k = Y(() => I(i.value)), T = Y(() => I(r.value));
|
|
15450
|
-
function
|
|
15453
|
+
function z(j) {
|
|
15451
15454
|
if (j.ctrlKey || j.metaKey) {
|
|
15452
15455
|
j.preventDefault();
|
|
15453
15456
|
const G = j.ctrlKey && Vi ? 10 : 1, q = j.deltaY * (j.deltaMode === 1 ? 0.05 : j.deltaMode ? 1 : 2e-3) * G, K = Math.log(s.value) + q;
|
|
@@ -15490,93 +15493,93 @@ var Nf = $e((n) => {
|
|
|
15490
15493
|
W("button", {
|
|
15491
15494
|
class: "m-timeline__btn",
|
|
15492
15495
|
type: "button",
|
|
15493
|
-
title:
|
|
15494
|
-
onClick: G[0] || (G[0] = (q) =>
|
|
15495
|
-
}, [Me(
|
|
15496
|
+
title: F(y)("seekStart"),
|
|
15497
|
+
onClick: G[0] || (G[0] = (q) => F(h)("seekStart"))
|
|
15498
|
+
}, [Me(F(je), { icon: "$skipPrevious" })], 8, Cp),
|
|
15496
15499
|
W("button", {
|
|
15497
15500
|
class: "m-timeline__btn",
|
|
15498
15501
|
type: "button",
|
|
15499
|
-
title:
|
|
15500
|
-
onClick: G[1] || (G[1] = (q) =>
|
|
15501
|
-
}, [Me(
|
|
15502
|
+
title: F(y)("stepBackward"),
|
|
15503
|
+
onClick: G[1] || (G[1] = (q) => F(h)("stepBackward"))
|
|
15504
|
+
}, [Me(F(je), { icon: "$stepBackward" })], 8, Ep),
|
|
15502
15505
|
W("button", {
|
|
15503
15506
|
class: "m-timeline__btn m-timeline__btn--primary",
|
|
15504
15507
|
type: "button",
|
|
15505
|
-
title:
|
|
15506
|
-
onClick: G[2] || (G[2] = (q) =>
|
|
15507
|
-
}, [Me(
|
|
15508
|
+
title: F(l) ? F(y)("play") : F(y)("pause"),
|
|
15509
|
+
onClick: G[2] || (G[2] = (q) => F(h)("togglePlay"))
|
|
15510
|
+
}, [Me(F(je), { icon: F(l) ? "$play" : "$pause" }, null, 8, ["icon"])], 8, Tp),
|
|
15508
15511
|
W("button", {
|
|
15509
15512
|
class: "m-timeline__btn",
|
|
15510
15513
|
type: "button",
|
|
15511
|
-
title:
|
|
15512
|
-
onClick: G[3] || (G[3] = (q) =>
|
|
15513
|
-
}, [Me(
|
|
15514
|
+
title: F(y)("stepForward"),
|
|
15515
|
+
onClick: G[3] || (G[3] = (q) => F(h)("stepForward"))
|
|
15516
|
+
}, [Me(F(je), { icon: "$stepForward" })], 8, Ap),
|
|
15514
15517
|
W("button", {
|
|
15515
15518
|
class: "m-timeline__btn",
|
|
15516
15519
|
type: "button",
|
|
15517
|
-
title:
|
|
15518
|
-
onClick: G[4] || (G[4] = (q) =>
|
|
15519
|
-
}, [Me(
|
|
15520
|
+
title: F(y)("seekEnd"),
|
|
15521
|
+
onClick: G[4] || (G[4] = (q) => F(h)("seekEnd"))
|
|
15522
|
+
}, [Me(F(je), { icon: "$skipNext" })], 8, Pp)
|
|
15520
15523
|
]),
|
|
15521
15524
|
pt(W("select", {
|
|
15522
15525
|
"onUpdate:modelValue": G[5] || (G[5] = (q) => Gn(d) ? d.value = q : null),
|
|
15523
15526
|
class: "m-timeline__select",
|
|
15524
|
-
title:
|
|
15525
|
-
}, [(U(), J(we, null, Pe(
|
|
15527
|
+
title: F(y)("playbackRate")
|
|
15528
|
+
}, [(U(), J(we, null, Pe(L, (q) => W("option", {
|
|
15526
15529
|
key: q,
|
|
15527
15530
|
value: q
|
|
15528
15531
|
}, be(q) + "× ", 9, $p)), 64))], 8, Ip), [[
|
|
15529
15532
|
Ko,
|
|
15530
|
-
|
|
15533
|
+
F(d),
|
|
15531
15534
|
void 0,
|
|
15532
15535
|
{ number: !0 }
|
|
15533
15536
|
]]),
|
|
15534
15537
|
pt(W("select", {
|
|
15535
15538
|
"onUpdate:modelValue": G[6] || (G[6] = (q) => Gn(u) ? u.value = q : null),
|
|
15536
15539
|
class: "m-timeline__select",
|
|
15537
|
-
title:
|
|
15538
|
-
}, [(U(), J(we, null, Pe(
|
|
15540
|
+
title: F(y)("loopMode")
|
|
15541
|
+
}, [(U(), J(we, null, Pe(V, (q) => W("option", {
|
|
15539
15542
|
key: q,
|
|
15540
15543
|
value: q
|
|
15541
|
-
}, be(
|
|
15542
|
-
x.value.length &&
|
|
15544
|
+
}, be(F(y)(R[q])), 9, zp)), 64))], 8, Lp), [[Ko, F(u)]]),
|
|
15545
|
+
x.value.length && F(w).length ? (U(), Fe(io, {
|
|
15543
15546
|
key: 0,
|
|
15544
15547
|
modelValue: b.value,
|
|
15545
15548
|
"onUpdate:modelValue": G[7] || (G[7] = (q) => b.value = q),
|
|
15546
|
-
items:
|
|
15549
|
+
items: F(_),
|
|
15547
15550
|
location: "bottom-start",
|
|
15548
15551
|
offset: 4
|
|
15549
15552
|
}, {
|
|
15550
15553
|
activator: Te(({ props: q }) => [W("button", ht({
|
|
15551
15554
|
type: "button",
|
|
15552
15555
|
class: ["m-timeline__btn m-timeline__add-anim", { "m-timeline__add-anim--active": b.value }],
|
|
15553
|
-
title:
|
|
15554
|
-
}, q), [Me(
|
|
15555
|
-
title: Te(({ item: q }) => [mt(be(
|
|
15556
|
+
title: F(y)("addAnimation")
|
|
15557
|
+
}, q), [Me(F(je), { icon: "$plus" }), W("span", null, be(F(y)("addAnimation")), 1)], 16, Rp)]),
|
|
15558
|
+
title: Te(({ item: q }) => [mt(be(F(y)(q.key)), 1)]),
|
|
15556
15559
|
_: 1
|
|
15557
15560
|
}, 8, ["modelValue", "items"])) : _e("", !0),
|
|
15558
15561
|
G[11] || (G[11] = W("div", { class: "m-timeline__toolbar-spacer" }, null, -1)),
|
|
15559
15562
|
W("button", {
|
|
15560
15563
|
class: "m-timeline__btn",
|
|
15561
15564
|
type: "button",
|
|
15562
|
-
title:
|
|
15563
|
-
onClick: G[8] || (G[8] = (q) =>
|
|
15564
|
-
}, [Me(
|
|
15565
|
+
title: F(y)("collapse"),
|
|
15566
|
+
onClick: G[8] || (G[8] = (q) => F(h)("togglePanel", "timeline"))
|
|
15567
|
+
}, [Me(F(je), { icon: "$arrowDown" })], 8, Op)
|
|
15565
15568
|
]),
|
|
15566
15569
|
W("div", Vp, [W("div", {
|
|
15567
15570
|
class: "m-timeline__left",
|
|
15568
|
-
onWheel:
|
|
15571
|
+
onWheel: z
|
|
15569
15572
|
}, [W("div", Fp, [W("div", { style: Ie({ transform: `translateY(${A.value[1]}px)` }) }, [(U(!0), J(we, null, Pe(g.value, (q) => (U(), Fe(_p, {
|
|
15570
15573
|
key: q.id,
|
|
15571
15574
|
node: q
|
|
15572
15575
|
}, null, 8, ["node"]))), 128))], 4)])], 32), W("div", {
|
|
15573
15576
|
class: "m-timeline__right",
|
|
15574
|
-
onWheel:
|
|
15577
|
+
onWheel: z,
|
|
15575
15578
|
onMousedown: N
|
|
15576
15579
|
}, [W("div", Np, [
|
|
15577
15580
|
W("div", Dp, [Me(zo, {
|
|
15578
15581
|
ref: "rulerTpl",
|
|
15579
|
-
zoom: 1e3 /
|
|
15582
|
+
zoom: 1e3 / F(s) / F(c),
|
|
15580
15583
|
unit: 100,
|
|
15581
15584
|
"unit-fractions": [1, 3],
|
|
15582
15585
|
style: { position: "relative" },
|
|
@@ -15584,15 +15587,15 @@ var Nf = $e((n) => {
|
|
|
15584
15587
|
"label-format": oe
|
|
15585
15588
|
}, null, 8, ["zoom", "position"])]),
|
|
15586
15589
|
W("div", Bp, [W("div", { style: Ie({
|
|
15587
|
-
width: `${
|
|
15590
|
+
width: `${F(r) / F(s)}px`,
|
|
15588
15591
|
transform: `translate(${A.value[0]}px, ${A.value[1]}px)`
|
|
15589
15592
|
}) }, [(U(!0), J(we, null, Pe(g.value, (q) => (U(), Fe(pp, { key: q.id }, {
|
|
15590
15593
|
default: Te(() => [Me(hp, {
|
|
15591
15594
|
node: q,
|
|
15592
|
-
"ms-per-px":
|
|
15593
|
-
"end-time":
|
|
15595
|
+
"ms-per-px": F(s),
|
|
15596
|
+
"end-time": F(r),
|
|
15594
15597
|
rev: C.value,
|
|
15595
|
-
active:
|
|
15598
|
+
active: F(a).some((K) => K.equal(q))
|
|
15596
15599
|
}, null, 8, [
|
|
15597
15600
|
"node",
|
|
15598
15601
|
"ms-per-px",
|
|
@@ -15602,14 +15605,14 @@ var Nf = $e((n) => {
|
|
|
15602
15605
|
])]),
|
|
15603
15606
|
_: 2
|
|
15604
15607
|
}, 1024))), 128))], 4)]),
|
|
15605
|
-
Me(sp, { style: Ie({ transform: `translate(${A.value[0] + Math.ceil(
|
|
15608
|
+
Me(sp, { style: Ie({ transform: `translate(${A.value[0] + Math.ceil(F(i) / F(s))}px, 0px)` }) }, null, 8, ["style"])
|
|
15606
15609
|
])], 32)]),
|
|
15607
15610
|
Me(tp)
|
|
15608
15611
|
], 32));
|
|
15609
15612
|
}
|
|
15610
15613
|
}), Up = qp, jp = $e((n) => {
|
|
15611
15614
|
const { registerConfig: e, timeline: t } = n, o = e("ui.timeline", { default: { visible: !1 } }), s = de(!0), i = de(30), r = de(1), a = de("loop"), l = de(null);
|
|
15612
|
-
Be(a, (
|
|
15615
|
+
Be(a, (V) => t.value.loopMode = V, { immediate: !0 }), Be(r, (V) => t.value.rate = V, { immediate: !0 });
|
|
15613
15616
|
async function c() {
|
|
15614
15617
|
await n.renderEngine.value.nextTick(), t.value.endTime = n.root.value ? n.getTimeRange(n.root.value).endTime : 0;
|
|
15615
15618
|
}
|
|
@@ -15631,20 +15634,20 @@ var Nf = $e((n) => {
|
|
|
15631
15634
|
s.value = !s.value;
|
|
15632
15635
|
}
|
|
15633
15636
|
function y() {
|
|
15634
|
-
const
|
|
15635
|
-
|
|
15637
|
+
const V = t.value;
|
|
15638
|
+
V.currentTime = V.startTime;
|
|
15636
15639
|
}
|
|
15637
15640
|
function f() {
|
|
15638
|
-
const
|
|
15639
|
-
|
|
15641
|
+
const V = t.value;
|
|
15642
|
+
V.currentTime = V.endTime;
|
|
15640
15643
|
}
|
|
15641
15644
|
function w() {
|
|
15642
|
-
const
|
|
15643
|
-
|
|
15645
|
+
const V = t.value, R = 1e3 / i.value, S = Number.isFinite(V.currentTime) ? V.currentTime : V.startTime;
|
|
15646
|
+
V.currentTime = Math.max(V.startTime, S - R);
|
|
15644
15647
|
}
|
|
15645
|
-
function
|
|
15646
|
-
const
|
|
15647
|
-
|
|
15648
|
+
function L() {
|
|
15649
|
+
const V = t.value, R = 1e3 / i.value, S = Number.isFinite(V.currentTime) ? V.currentTime : V.startTime;
|
|
15650
|
+
V.currentTime = Math.min(V.endTime, S + R);
|
|
15648
15651
|
}
|
|
15649
15652
|
return {
|
|
15650
15653
|
name: "mce:timeline",
|
|
@@ -15657,7 +15660,7 @@ var Nf = $e((n) => {
|
|
|
15657
15660
|
component: Up,
|
|
15658
15661
|
visible: Y({
|
|
15659
15662
|
get: () => o.value.visible,
|
|
15660
|
-
set: (
|
|
15663
|
+
set: (V) => o.value.visible = V
|
|
15661
15664
|
})
|
|
15662
15665
|
}],
|
|
15663
15666
|
commands: [
|
|
@@ -15687,7 +15690,7 @@ var Nf = $e((n) => {
|
|
|
15687
15690
|
},
|
|
15688
15691
|
{
|
|
15689
15692
|
command: "stepForward",
|
|
15690
|
-
handle:
|
|
15693
|
+
handle: L
|
|
15691
15694
|
}
|
|
15692
15695
|
],
|
|
15693
15696
|
hotkeys: [
|
|
@@ -15722,7 +15725,7 @@ var Nf = $e((n) => {
|
|
|
15722
15725
|
}
|
|
15723
15726
|
],
|
|
15724
15727
|
setup: () => {
|
|
15725
|
-
const { assets:
|
|
15728
|
+
const { assets: V, on: R, off: S } = n, A = c;
|
|
15726
15729
|
function C() {
|
|
15727
15730
|
s.value = !0, t.value.currentTime = t.value.startTime, A();
|
|
15728
15731
|
}
|
|
@@ -15750,9 +15753,9 @@ var Nf = $e((n) => {
|
|
|
15750
15753
|
}, { immediate: !0 }), Be(s, (b) => {
|
|
15751
15754
|
b ? g() : p();
|
|
15752
15755
|
}, { immediate: !0 }), bt(() => {
|
|
15753
|
-
R("docSet", C),
|
|
15756
|
+
R("docSet", C), V.on("loaded", A);
|
|
15754
15757
|
}), en(() => {
|
|
15755
|
-
g(), t.value.off("ended", x), S("docSet", C),
|
|
15758
|
+
g(), t.value.off("ended", x), S("docSet", C), V.off("loaded", A);
|
|
15756
15759
|
});
|
|
15757
15760
|
}
|
|
15758
15761
|
};
|
|
@@ -15798,7 +15801,7 @@ var Nf = $e((n) => {
|
|
|
15798
15801
|
return (l, c) => (U(), J("div", Xp, [
|
|
15799
15802
|
(U(), J(we, null, Pe(o, (d) => W("button", {
|
|
15800
15803
|
key: `w${d}`,
|
|
15801
|
-
class: De(["m-tool-options__width", { "m-tool-options__width--active":
|
|
15804
|
+
class: De(["m-tool-options__width", { "m-tool-options__width--active": F(t).width === d }]),
|
|
15802
15805
|
onClick: (u) => r(d)
|
|
15803
15806
|
}, [W("span", {
|
|
15804
15807
|
class: "m-tool-options__dot",
|
|
@@ -15810,7 +15813,7 @@ var Nf = $e((n) => {
|
|
|
15810
15813
|
c[0] || (c[0] = W("span", { class: "m-tool-options__divider" }, null, -1)),
|
|
15811
15814
|
(U(), J(we, null, Pe(s, (d) => W("button", {
|
|
15812
15815
|
key: d,
|
|
15813
|
-
class: De(["m-tool-options__color", { "m-tool-options__color--active":
|
|
15816
|
+
class: De(["m-tool-options__color", { "m-tool-options__color--active": F(t).color === d }]),
|
|
15814
15817
|
style: Ie({ background: d }),
|
|
15815
15818
|
onClick: (u) => a(d)
|
|
15816
15819
|
}, null, 14, Gp)), 64))
|
|
@@ -15819,31 +15822,31 @@ var Nf = $e((n) => {
|
|
|
15819
15822
|
}), Kp = Wp, Zp = { key: 0 }, Jp = { key: 1 }, Qp = 12, ev = /* @__PURE__ */ Se({
|
|
15820
15823
|
__name: "Toolbelt",
|
|
15821
15824
|
setup(n) {
|
|
15822
|
-
const { state: e, t, activateTool: o, activeTool: s, hotkeys: i, getKbd: r, getConfigRef: a, drawboardAabb: l, toolbeltShapeItems: c, toolbeltItems: d } = qe(), u = a("ui.toolbelt"), h = de(!1), y = de(), f = Y(() => y.value?.placement ?? u.value?.placement ?? "bottom"), w = Y(() => h.value ? y.value?.offset : u.value?.offset),
|
|
15825
|
+
const { state: e, t, activateTool: o, activeTool: s, hotkeys: i, getKbd: r, getConfigRef: a, drawboardAabb: l, toolbeltShapeItems: c, toolbeltItems: d } = qe(), u = a("ui.toolbelt"), h = de(!1), y = de(), f = Y(() => y.value?.placement ?? u.value?.placement ?? "bottom"), w = Y(() => h.value ? y.value?.offset : u.value?.offset), L = Y(() => {
|
|
15823
15826
|
const _ = w.value;
|
|
15824
15827
|
if (_ != null)
|
|
15825
15828
|
return f.value === "left" || f.value === "right" ? { top: `${_}px` } : { left: `${_}px` };
|
|
15826
15829
|
});
|
|
15827
|
-
function
|
|
15830
|
+
function V(_, E) {
|
|
15828
15831
|
const I = l.value, k = {
|
|
15829
15832
|
top: E,
|
|
15830
15833
|
bottom: I.height - E,
|
|
15831
15834
|
left: _,
|
|
15832
15835
|
right: I.width - _
|
|
15833
15836
|
};
|
|
15834
|
-
return Object.keys(k).reduce((T,
|
|
15837
|
+
return Object.keys(k).reduce((T, z) => k[z] < k[T] ? z : T);
|
|
15835
15838
|
}
|
|
15836
15839
|
function R(_) {
|
|
15837
15840
|
if (_.button !== 0) return;
|
|
15838
15841
|
_.preventDefault();
|
|
15839
|
-
const E = _.currentTarget.closest(".m-toolbelt")?.getBoundingClientRect(), I = (E?.width ?? 0) / 2, k = (E?.height ?? 0) / 2, T = E ? _.clientX - (E.left + I) : 0,
|
|
15842
|
+
const E = _.currentTarget.closest(".m-toolbelt")?.getBoundingClientRect(), I = (E?.width ?? 0) / 2, k = (E?.height ?? 0) / 2, T = E ? _.clientX - (E.left + I) : 0, z = E ? _.clientY - (E.top + k) : 0;
|
|
15840
15843
|
Rt(_, {
|
|
15841
15844
|
threshold: 4,
|
|
15842
15845
|
start: () => {
|
|
15843
15846
|
h.value = !0;
|
|
15844
15847
|
},
|
|
15845
15848
|
move: (N) => {
|
|
15846
|
-
const oe = l.value, j = N.movePoint.x - oe.left, G = N.movePoint.y - oe.top, q =
|
|
15849
|
+
const oe = l.value, j = N.movePoint.x - oe.left, G = N.movePoint.y - oe.top, q = V(j, G), K = q === "left" || q === "right", H = K ? k : I, Q = K ? oe.height : oe.width, $ = Q / 2, Z = K ? G - z : j - T, te = Math.min(Math.max(Z, H + 8), Q - H - 8);
|
|
15847
15850
|
y.value = {
|
|
15848
15851
|
placement: q,
|
|
15849
15852
|
offset: Math.abs(te - $) < Qp ? void 0 : te
|
|
@@ -15948,7 +15951,7 @@ var Nf = $e((n) => {
|
|
|
15948
15951
|
]);
|
|
15949
15952
|
return (_, E) => (U(), J("div", {
|
|
15950
15953
|
class: De(["m-toolbelt", [`m-toolbelt--${f.value}`, { "m-toolbelt--dragging": h.value }]]),
|
|
15951
|
-
style: Ie(
|
|
15954
|
+
style: Ie(L.value)
|
|
15952
15955
|
}, [
|
|
15953
15956
|
v.value ? (U(), Fe(Kp, {
|
|
15954
15957
|
key: 0,
|
|
@@ -15972,11 +15975,11 @@ var Nf = $e((n) => {
|
|
|
15972
15975
|
class: "m-toolbelt__btn",
|
|
15973
15976
|
active: I.active || I.checked || !1
|
|
15974
15977
|
}, { ref_for: !0 }, T, { onClick: I.handle }), {
|
|
15975
|
-
default: Te(() => [Me(
|
|
15978
|
+
default: Te(() => [Me(F(je), { icon: I.icon ?? `$${I.key}` }, null, 8, ["icon"])]),
|
|
15976
15979
|
_: 2
|
|
15977
15980
|
}, 1040, ["active", "onClick"])]),
|
|
15978
|
-
default: Te(() => [W("span", null, be(
|
|
15979
|
-
kbd: Te(() => [
|
|
15981
|
+
default: Te(() => [W("span", null, be(F(t)(I.key)), 1)]),
|
|
15982
|
+
kbd: Te(() => [F(i).has(`setState:${I.key}`) ? (U(), J("span", Zp, be(F(r)(`setState:${I.key}`)), 1)) : F(i).has(`activateTool:${I.key}`) ? (U(), J("span", Jp, be(F(r)(`activateTool:${I.key}`)), 1)) : _e("", !0)]),
|
|
15980
15983
|
_: 2
|
|
15981
15984
|
}, 1032, ["location"]), I.children?.length ? (U(), Fe(io, {
|
|
15982
15985
|
key: 0,
|
|
@@ -15988,12 +15991,12 @@ var Nf = $e((n) => {
|
|
|
15988
15991
|
icon: "",
|
|
15989
15992
|
class: "m-toolbelt__arrow"
|
|
15990
15993
|
}, { ref_for: !0 }, T), {
|
|
15991
|
-
default: Te(() => [Me(
|
|
15994
|
+
default: Te(() => [Me(F(je), { icon: "$arrowDown" })]),
|
|
15992
15995
|
_: 1
|
|
15993
15996
|
}, 16)]),
|
|
15994
|
-
title: Te(({ item: T }) => [mt(be(
|
|
15995
|
-
kbd: Te(({ item: T }) => [
|
|
15996
|
-
prepend: Te(({ item: T }) => [Me(
|
|
15997
|
+
title: Te(({ item: T }) => [mt(be(F(t)(T.key)), 1)]),
|
|
15998
|
+
kbd: Te(({ item: T }) => [F(i).has(`setState:${T.key}`) ? (U(), J(we, { key: 0 }, [mt(be(F(r)(`setState:${T.key}`)), 1)], 64)) : F(i).has(`activateTool:${T.key}`) ? (U(), J(we, { key: 1 }, [mt(be(F(r)(`activateTool:${T.key}`)), 1)], 64)) : _e("", !0)]),
|
|
15999
|
+
prepend: Te(({ item: T }) => [Me(F(je), {
|
|
15997
16000
|
class: "m-toolbelt__icon",
|
|
15998
16001
|
icon: `$${T.key}`
|
|
15999
16002
|
}, null, 8, ["icon"])]),
|
|
@@ -16071,32 +16074,32 @@ var Nf = $e((n) => {
|
|
|
16071
16074
|
borderRadius: o.value[0]?.style.borderRadius ?? 0
|
|
16072
16075
|
};
|
|
16073
16076
|
});
|
|
16074
|
-
function
|
|
16077
|
+
function L() {
|
|
16075
16078
|
return w.value;
|
|
16076
16079
|
}
|
|
16077
|
-
const
|
|
16080
|
+
const V = (C, P, v = {}) => {
|
|
16078
16081
|
const { event: p, isCorner: g, direction: x = "" } = v;
|
|
16079
16082
|
y || f();
|
|
16080
|
-
const b = y, _ =
|
|
16083
|
+
const b = y, _ = L(), E = {
|
|
16081
16084
|
..._,
|
|
16082
16085
|
...P
|
|
16083
16086
|
}, I = o.value, k = I.length > 1;
|
|
16084
16087
|
if (C === "move" && I.length === 1) {
|
|
16085
|
-
const
|
|
16086
|
-
if (
|
|
16088
|
+
const z = I[0].getParent();
|
|
16089
|
+
if (z && z.style?.display === "flex") return;
|
|
16087
16090
|
}
|
|
16088
16091
|
if (C === "move") {
|
|
16089
16092
|
if (E.left = Math.round(E.left), E.top = Math.round(E.top), p?.shiftKey) {
|
|
16090
|
-
const
|
|
16091
|
-
|
|
16093
|
+
const z = b.constrainMovement;
|
|
16094
|
+
z.event || (z.event = p), z.startPoint || (z.startPoint = {
|
|
16092
16095
|
x: _.left,
|
|
16093
16096
|
y: _.top
|
|
16094
16097
|
});
|
|
16095
16098
|
const N = {
|
|
16096
|
-
x: (p?.clientX ?? 0) - (
|
|
16097
|
-
y: (p?.clientY ?? 0) - (
|
|
16099
|
+
x: (p?.clientX ?? 0) - (z.event?.clientX ?? 0),
|
|
16100
|
+
y: (p?.clientY ?? 0) - (z.event?.clientY ?? 0)
|
|
16098
16101
|
};
|
|
16099
|
-
Math.abs(N.x) > Math.abs(N.y) ? E.top =
|
|
16102
|
+
Math.abs(N.x) > Math.abs(N.y) ? E.top = z.startPoint.y : E.left = z.startPoint.x;
|
|
16100
16103
|
}
|
|
16101
16104
|
E.rotate || d(E);
|
|
16102
16105
|
} else C === "resize" && !E.rotate && !k && u(E, x);
|
|
@@ -16108,8 +16111,8 @@ var Nf = $e((n) => {
|
|
|
16108
16111
|
rotate: E.rotate - _.rotate,
|
|
16109
16112
|
borderRadius: E.borderRadius - _.borderRadius
|
|
16110
16113
|
};
|
|
16111
|
-
k && C === "rotate" && (T.rotate = E.rotate - b.batchRotate, b.batchRotate += T.rotate), I.forEach((
|
|
16112
|
-
const N =
|
|
16114
|
+
k && C === "rotate" && (T.rotate = E.rotate - b.batchRotate, b.batchRotate += T.rotate), I.forEach((z) => {
|
|
16115
|
+
const N = z.style, oe = {
|
|
16113
16116
|
left: N.left + T.left,
|
|
16114
16117
|
top: N.top + T.top,
|
|
16115
16118
|
width: N.width + T.width,
|
|
@@ -16119,16 +16122,16 @@ var Nf = $e((n) => {
|
|
|
16119
16122
|
};
|
|
16120
16123
|
if (C === "rotate") {
|
|
16121
16124
|
if (k) {
|
|
16122
|
-
const j =
|
|
16125
|
+
const j = z.globalAabb.getCenter().rotate(T.rotate * Ri, {
|
|
16123
16126
|
x: E.left + E.width / 2,
|
|
16124
16127
|
y: E.top + E.height / 2
|
|
16125
|
-
}), G =
|
|
16128
|
+
}), G = z.getParent()?.globalAabb;
|
|
16126
16129
|
G && (j.x -= G.left, j.y -= G.top), oe.left = j.x - oe.width / 2, oe.top = j.y - oe.height / 2;
|
|
16127
16130
|
}
|
|
16128
16131
|
oe.rotate = Math.round(oe.rotate * 100) / 100;
|
|
16129
16132
|
} else if (C === "resize") {
|
|
16130
16133
|
if (k) {
|
|
16131
|
-
const G = b.batchResize[
|
|
16134
|
+
const G = b.batchResize[z.instanceId];
|
|
16132
16135
|
if (G) {
|
|
16133
16136
|
const q = {
|
|
16134
16137
|
x: E.left + E.width * G.min.x,
|
|
@@ -16142,18 +16145,18 @@ var Nf = $e((n) => {
|
|
|
16142
16145
|
}, Q = {
|
|
16143
16146
|
x: q.x + H.x / 2,
|
|
16144
16147
|
y: q.y + H.y / 2
|
|
16145
|
-
}, $ =
|
|
16148
|
+
}, $ = z.getParent()?.globalAabb;
|
|
16146
16149
|
$ && (Q.x -= $.left, Q.y -= $.top), oe.width = H.x * G.scale.x, oe.height = H.y * G.scale.y, oe.left = Q.x - oe.width / 2, oe.top = Q.y - oe.height / 2;
|
|
16147
16150
|
}
|
|
16148
16151
|
}
|
|
16149
16152
|
const j = oe.rotate ? 100 : 1;
|
|
16150
|
-
r(
|
|
16153
|
+
r(z, Math.max(1, Math.round(oe.width * j) / j), Math.max(1, Math.round(oe.height * j) / j), i(z, "Frame") ? void 0 : z.shape.isValid() ? { deep: !0 } : g ? {
|
|
16151
16154
|
deep: !0,
|
|
16152
16155
|
textFontSizeToFit: !0
|
|
16153
16156
|
} : {
|
|
16154
16157
|
deep: !0,
|
|
16155
16158
|
textToFit: !0
|
|
16156
|
-
}), oe.width =
|
|
16159
|
+
}), oe.width = z.style.width, oe.height = z.style.height;
|
|
16157
16160
|
}
|
|
16158
16161
|
Object.assign(N, oe);
|
|
16159
16162
|
});
|
|
@@ -16201,11 +16204,11 @@ var Nf = $e((n) => {
|
|
|
16201
16204
|
},
|
|
16202
16205
|
{
|
|
16203
16206
|
command: "getTransform",
|
|
16204
|
-
handle:
|
|
16207
|
+
handle: L
|
|
16205
16208
|
},
|
|
16206
16209
|
{
|
|
16207
16210
|
command: "setTransform",
|
|
16208
|
-
handle:
|
|
16211
|
+
handle: V
|
|
16209
16212
|
},
|
|
16210
16213
|
{
|
|
16211
16214
|
command: "move",
|
|
@@ -16293,7 +16296,7 @@ var Nf = $e((n) => {
|
|
|
16293
16296
|
},
|
|
16294
16297
|
selectionTransformed: (C) => {
|
|
16295
16298
|
const { handle: P, value: v, event: p } = C, [g, x = ""] = P.split("-");
|
|
16296
|
-
|
|
16299
|
+
V(g, v, {
|
|
16297
16300
|
event: p,
|
|
16298
16301
|
isCorner: x.length > 1,
|
|
16299
16302
|
direction: x
|
|
@@ -16308,42 +16311,42 @@ var Nf = $e((n) => {
|
|
|
16308
16311
|
__name: "TextEditor",
|
|
16309
16312
|
setup(n, { expose: e }) {
|
|
16310
16313
|
const { elementSelection: t, state: o, textSelection: s, exec: i, getObb: r, registerCommand: a, unregisterCommand: l, camera: c } = qe(), d = de(), u = Y(() => {
|
|
16311
|
-
const { zoom:
|
|
16314
|
+
const { zoom: V, position: R } = c.value;
|
|
16312
16315
|
return {
|
|
16313
16316
|
transformOrigin: "left top",
|
|
16314
|
-
transform: `translate(${-R.x}px, ${-R.y}px) scale(${
|
|
16317
|
+
transform: `translate(${-R.x}px, ${-R.y}px) scale(${V.x}, ${V.y})`
|
|
16315
16318
|
};
|
|
16316
16319
|
}), h = Y(() => {
|
|
16317
|
-
const
|
|
16320
|
+
const V = t.value[0], R = r(V), S = V?.text.base?.boundingBox;
|
|
16318
16321
|
return S && (R.left += S.left, R.top += S.top), R.toCssStyle();
|
|
16319
16322
|
});
|
|
16320
|
-
function y(
|
|
16321
|
-
s.value =
|
|
16323
|
+
function y(V) {
|
|
16324
|
+
s.value = V.detail;
|
|
16322
16325
|
}
|
|
16323
16326
|
function f() {
|
|
16324
|
-
const
|
|
16325
|
-
|
|
16327
|
+
const V = t.value[0];
|
|
16328
|
+
V.shape.isValid() || i("textToFit", V), V._textContent = V.text.getStringContent();
|
|
16326
16329
|
}
|
|
16327
16330
|
function w() {
|
|
16328
16331
|
o.value = void 0;
|
|
16329
16332
|
}
|
|
16330
|
-
async function
|
|
16333
|
+
async function L(V) {
|
|
16331
16334
|
const R = t.value[0];
|
|
16332
16335
|
if (!R) return !1;
|
|
16333
16336
|
R.text.isValid() || (R.style.textAlign = "center", R.text.setContent(" ")), R.text.update(), o.value = "typing";
|
|
16334
16337
|
const S = d.value;
|
|
16335
|
-
return S.set(R.text.base), await zt(), S.pointerDown(
|
|
16338
|
+
return S.set(R.text.base), await zt(), S.pointerDown(V) ? (S.selectAll(), requestAnimationFrame(() => {
|
|
16336
16339
|
o.value === "typing" && S.selectAll();
|
|
16337
16340
|
}), !0) : !1;
|
|
16338
16341
|
}
|
|
16339
16342
|
return bt(() => {
|
|
16340
16343
|
a({
|
|
16341
16344
|
command: "startTyping",
|
|
16342
|
-
handle:
|
|
16345
|
+
handle: L
|
|
16343
16346
|
});
|
|
16344
16347
|
}), Qe(() => {
|
|
16345
16348
|
l("startTyping");
|
|
16346
|
-
}), e({ textEditor: d }), (
|
|
16349
|
+
}), e({ textEditor: d }), (V, R) => pt((U(), J("div", {
|
|
16347
16350
|
class: "m-text-editor",
|
|
16348
16351
|
style: Ie({ ...u.value })
|
|
16349
16352
|
}, [W("div", {
|
|
@@ -16358,7 +16361,7 @@ var Nf = $e((n) => {
|
|
|
16358
16361
|
onSelected: y,
|
|
16359
16362
|
onUpdate: f,
|
|
16360
16363
|
onSubmit: w
|
|
16361
|
-
}, null, 544)], 4)], 4)), [[$s,
|
|
16364
|
+
}, null, 544)], 4)], 4)), [[$s, F(t)[0] && F(o) === "typing"]]);
|
|
16362
16365
|
}
|
|
16363
16366
|
}), iv = sv;
|
|
16364
16367
|
function Nt(n, e) {
|
|
@@ -16616,18 +16619,18 @@ var yo = "PointerEvent" in globalThis, Pt = class extends HTMLElement {
|
|
|
16616
16619
|
...y,
|
|
16617
16620
|
fragments: []
|
|
16618
16621
|
}, w;
|
|
16619
|
-
d.fragments.forEach((
|
|
16620
|
-
Array.from(
|
|
16622
|
+
d.fragments.forEach((L) => {
|
|
16623
|
+
Array.from(L.content).forEach((V) => {
|
|
16621
16624
|
const R = s[l] ?? {};
|
|
16622
16625
|
if (w) {
|
|
16623
16626
|
const { content: S, ...A } = w;
|
|
16624
|
-
av(R, A) ? w.content +=
|
|
16627
|
+
av(R, A) ? w.content += V : (f.fragments.push(w), w = {
|
|
16625
16628
|
...R,
|
|
16626
|
-
content:
|
|
16629
|
+
content: V
|
|
16627
16630
|
});
|
|
16628
16631
|
} else w = {
|
|
16629
16632
|
...R,
|
|
16630
|
-
content:
|
|
16633
|
+
content: V
|
|
16631
16634
|
};
|
|
16632
16635
|
l++;
|
|
16633
16636
|
});
|
|
@@ -16718,7 +16721,7 @@ var yo = "PointerEvent" in globalThis, Pt = class extends HTMLElement {
|
|
|
16718
16721
|
y: h.y / a
|
|
16719
16722
|
};
|
|
16720
16723
|
let f = 0, w = 0;
|
|
16721
|
-
const
|
|
16724
|
+
const L = (R) => {
|
|
16722
16725
|
const S = u.transformPoint({
|
|
16723
16726
|
x: R.clientX - h.x,
|
|
16724
16727
|
y: R.clientY - h.y
|
|
@@ -16734,14 +16737,14 @@ var yo = "PointerEvent" in globalThis, Pt = class extends HTMLElement {
|
|
|
16734
16737
|
y: A.y - (y.y - i / 2)
|
|
16735
16738
|
};
|
|
16736
16739
|
};
|
|
16737
|
-
n && ({ x: f, y: w } =
|
|
16738
|
-
const
|
|
16740
|
+
n && ({ x: f, y: w } = L(n), n.preventDefault(), n.stopPropagation());
|
|
16741
|
+
const V = this._findNearest({
|
|
16739
16742
|
x: f,
|
|
16740
16743
|
y: w
|
|
16741
16744
|
});
|
|
16742
|
-
if (this.selection = [
|
|
16745
|
+
if (this.selection = [V, V], this._updateDomSelection(), n && ["mousedown", "pointerdown"].includes(n.type)) {
|
|
16743
16746
|
const R = (A) => {
|
|
16744
|
-
this.selection = [
|
|
16747
|
+
this.selection = [V, this._findNearest(L(A))], this._updateDomSelection();
|
|
16745
16748
|
}, S = () => {
|
|
16746
16749
|
yo ? (document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", S)) : (document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", S));
|
|
16747
16750
|
};
|
|
@@ -16838,11 +16841,11 @@ var cv = $e((n) => {
|
|
|
16838
16841
|
if (!P) {
|
|
16839
16842
|
const x = p.text.base.characters;
|
|
16840
16843
|
let b = 0, _;
|
|
16841
|
-
x.forEach((
|
|
16842
|
-
const N =
|
|
16843
|
-
N > b && (_ =
|
|
16844
|
+
x.forEach((z) => {
|
|
16845
|
+
const N = z.lineBox.left + z.lineBox.width;
|
|
16846
|
+
N > b && (_ = z, b = N);
|
|
16844
16847
|
});
|
|
16845
|
-
const E = {}, I = x.filter((
|
|
16848
|
+
const E = {}, I = x.filter((z) => z.lineBox.top === _?.lineBox.top).map((z) => (Object.assign(E, { ...z.parent.style }, { ...z.parent.parent.style }), z.content)).join(""), { boundingBox: k } = _o({
|
|
16846
16849
|
fonts: s,
|
|
16847
16850
|
style: {
|
|
16848
16851
|
...p.style.toJSON(),
|
|
@@ -16898,7 +16901,7 @@ var cv = $e((n) => {
|
|
|
16898
16901
|
p && g.fragments.forEach((_, E, I) => {
|
|
16899
16902
|
if (!p) return;
|
|
16900
16903
|
const { content: k, ...T } = _;
|
|
16901
|
-
Array.from(mn(k)).forEach((
|
|
16904
|
+
Array.from(mn(k)).forEach((z, N, oe) => {
|
|
16902
16905
|
p = v({
|
|
16903
16906
|
selected: (x > C.paragraphIndex || x === C.paragraphIndex && E > C.fragmentIndex || x === C.paragraphIndex && E === C.fragmentIndex && N >= C.charIndex) && (x < P.paragraphIndex || x === P.paragraphIndex && E < P.fragmentIndex || x === P.paragraphIndex && E === P.fragmentIndex && (P.isLastSelected ? N <= P.charIndex : N < P.charIndex)),
|
|
16904
16907
|
p: g,
|
|
@@ -16908,7 +16911,7 @@ var cv = $e((n) => {
|
|
|
16908
16911
|
fIndex: E,
|
|
16909
16912
|
fStyle: T,
|
|
16910
16913
|
fLength: I.length,
|
|
16911
|
-
c:
|
|
16914
|
+
c: z,
|
|
16912
16915
|
cLength: oe.length,
|
|
16913
16916
|
cIndex: N
|
|
16914
16917
|
});
|
|
@@ -16943,12 +16946,12 @@ var cv = $e((n) => {
|
|
|
16943
16946
|
}
|
|
16944
16947
|
return v;
|
|
16945
16948
|
}
|
|
16946
|
-
function
|
|
16949
|
+
function L(C) {
|
|
16947
16950
|
const P = t.value[0];
|
|
16948
16951
|
if (!P) return;
|
|
16949
16952
|
const v = P.text.content, p = [];
|
|
16950
16953
|
let g = { fragments: [] }, x;
|
|
16951
|
-
if (f(o.value, ({ selected: b, fIndex: _, fStyle: E, fLength: I, c: k, cIndex: T, cLength:
|
|
16954
|
+
if (f(o.value, ({ selected: b, fIndex: _, fStyle: E, fLength: I, c: k, cIndex: T, cLength: z }) => {
|
|
16952
16955
|
_ === 0 && T === 0 && (g = { fragments: [] }, x = void 0);
|
|
16953
16956
|
const N = { ...E };
|
|
16954
16957
|
if (b && C(N), x) {
|
|
@@ -16961,7 +16964,7 @@ var cv = $e((n) => {
|
|
|
16961
16964
|
...N,
|
|
16962
16965
|
content: k
|
|
16963
16966
|
};
|
|
16964
|
-
return _ === I - 1 && T ===
|
|
16967
|
+
return _ === I - 1 && T === z - 1 && (x && g.fragments.push(x), g.fragments.length && (p.push(g), g = { fragments: [] })), !0;
|
|
16965
16968
|
}), p.length) {
|
|
16966
16969
|
P.text = {
|
|
16967
16970
|
...P.text.toJSON(),
|
|
@@ -16971,7 +16974,7 @@ var cv = $e((n) => {
|
|
|
16971
16974
|
b && b.length === 2 && (o.value = Sl(v, p, [b[0], b[1]]));
|
|
16972
16975
|
}
|
|
16973
16976
|
}
|
|
16974
|
-
function
|
|
16977
|
+
function V(C, P) {
|
|
16975
16978
|
const v = t.value[0];
|
|
16976
16979
|
if (v)
|
|
16977
16980
|
switch (C) {
|
|
@@ -16982,7 +16985,7 @@ var cv = $e((n) => {
|
|
|
16982
16985
|
}
|
|
16983
16986
|
break;
|
|
16984
16987
|
default:
|
|
16985
|
-
if (d.value && !u.value)
|
|
16988
|
+
if (d.value && !u.value) L((p) => {
|
|
16986
16989
|
p[C] = P;
|
|
16987
16990
|
});
|
|
16988
16991
|
else {
|
|
@@ -17013,7 +17016,7 @@ var cv = $e((n) => {
|
|
|
17013
17016
|
}
|
|
17014
17017
|
function S(C) {
|
|
17015
17018
|
const P = t.value[0];
|
|
17016
|
-
P && (d.value && C?.color ?
|
|
17019
|
+
P && (d.value && C?.color ? V("fill", C) : (P.text.fill = C, C?.color && (P.style.color = C.color), P.text.content.forEach((v) => {
|
|
17017
17020
|
delete v.fill, delete v.color, v.fragments.forEach((p) => {
|
|
17018
17021
|
delete p.fill, delete p.color;
|
|
17019
17022
|
});
|
|
@@ -17057,7 +17060,7 @@ var cv = $e((n) => {
|
|
|
17057
17060
|
},
|
|
17058
17061
|
{
|
|
17059
17062
|
command: "setTextStyle",
|
|
17060
|
-
handle:
|
|
17063
|
+
handle: V
|
|
17061
17064
|
},
|
|
17062
17065
|
{
|
|
17063
17066
|
command: "getTextStyle",
|
|
@@ -17073,7 +17076,7 @@ var cv = $e((n) => {
|
|
|
17073
17076
|
},
|
|
17074
17077
|
{
|
|
17075
17078
|
command: "setTextContentByEachFragment",
|
|
17076
|
-
handle:
|
|
17079
|
+
handle: L
|
|
17077
17080
|
}
|
|
17078
17081
|
],
|
|
17079
17082
|
hotkeys: [{
|
|
@@ -17173,13 +17176,13 @@ var cv = $e((n) => {
|
|
|
17173
17176
|
})), A;
|
|
17174
17177
|
}
|
|
17175
17178
|
function y(R, S, A) {
|
|
17176
|
-
a(Nl(r(), R, S, A)),
|
|
17179
|
+
a(Nl(r(), R, S, A)), V();
|
|
17177
17180
|
}
|
|
17178
17181
|
function f(R, S) {
|
|
17179
17182
|
c({
|
|
17180
17183
|
...l(),
|
|
17181
17184
|
[R]: S
|
|
17182
|
-
}),
|
|
17185
|
+
}), V();
|
|
17183
17186
|
}
|
|
17184
17187
|
function w(R, S, A = o.value[0]) {
|
|
17185
17188
|
if (!A) return;
|
|
@@ -17187,14 +17190,14 @@ var cv = $e((n) => {
|
|
|
17187
17190
|
C.variableBindings = {
|
|
17188
17191
|
...C.variableBindings ?? {},
|
|
17189
17192
|
[R]: S
|
|
17190
|
-
},
|
|
17193
|
+
}, V();
|
|
17191
17194
|
}
|
|
17192
|
-
function
|
|
17195
|
+
function L(R, S = o.value[0]) {
|
|
17193
17196
|
if (!S) return;
|
|
17194
17197
|
const A = S.meta, C = { ...A.variableBindings ?? {} };
|
|
17195
17198
|
delete C[R], A.variableBindings = C;
|
|
17196
17199
|
}
|
|
17197
|
-
function
|
|
17200
|
+
function V() {
|
|
17198
17201
|
const R = r(), S = l();
|
|
17199
17202
|
e.value?.findOne((A) => {
|
|
17200
17203
|
const C = A.meta?.variableBindings;
|
|
@@ -17234,7 +17237,7 @@ var cv = $e((n) => {
|
|
|
17234
17237
|
},
|
|
17235
17238
|
{
|
|
17236
17239
|
command: "unbindVariable",
|
|
17237
|
-
handle:
|
|
17240
|
+
handle: L
|
|
17238
17241
|
},
|
|
17239
17242
|
{
|
|
17240
17243
|
command: "getVariablesState",
|
|
@@ -17242,7 +17245,7 @@ var cv = $e((n) => {
|
|
|
17242
17245
|
},
|
|
17243
17246
|
{
|
|
17244
17247
|
command: "resolveVariables",
|
|
17245
|
-
handle:
|
|
17248
|
+
handle: V
|
|
17246
17249
|
}
|
|
17247
17250
|
]
|
|
17248
17251
|
};
|
|
@@ -17312,13 +17315,13 @@ var cv = $e((n) => {
|
|
|
17312
17315
|
};
|
|
17313
17316
|
}), fv = $e((n) => {
|
|
17314
17317
|
const { registerConfig: e, camera: t, exec: o, findFrame: s, selection: i, drawboardAabb: r, selectionAabb: a, rootAabb: l, getAabb: c, screenCenterOffset: d, viewportAabb: u } = n, h = e("viewport.zoom", { default: { strategy: "contain" } });
|
|
17315
|
-
async function y(w,
|
|
17316
|
-
const { intoView:
|
|
17318
|
+
async function y(w, L = {}) {
|
|
17319
|
+
const { intoView: V, strategy: R = "contain", duration: S = 500, behavior: A } = L;
|
|
17317
17320
|
let C;
|
|
17318
|
-
if (Array.isArray(w) || typeof w == "object" ? C = c(w) : w === "selection" ? C = a.value : C = l.value,
|
|
17321
|
+
if (Array.isArray(w) || typeof w == "object" ? C = c(w) : w === "selection" ? C = a.value : C = l.value, V && u.value.contains(C)) return;
|
|
17319
17322
|
const [P, v, p, g] = C.toArray();
|
|
17320
17323
|
if (!p || !g) return;
|
|
17321
|
-
const x = d.value, { width: b, height: _ } = r.value, E = b - (x.left + x.right), I = _ - (x.top + x.bottom), k = E / p, T = I / g,
|
|
17324
|
+
const x = d.value, { width: b, height: _ } = r.value, E = b - (x.left + x.right), I = _ - (x.top + x.bottom), k = E / p, T = I / g, z = t.value;
|
|
17322
17325
|
let N;
|
|
17323
17326
|
if (typeof w == "number") N = w;
|
|
17324
17327
|
else switch (R) {
|
|
@@ -17335,12 +17338,12 @@ var cv = $e((n) => {
|
|
|
17335
17338
|
N = Math.min(k, T);
|
|
17336
17339
|
break;
|
|
17337
17340
|
}
|
|
17338
|
-
const oe = Math.min(
|
|
17341
|
+
const oe = Math.min(z.zoom.x, z.zoom.y), j = Math.min(Ct(N, z.minZoom.x, z.maxZoom.x), Ct(N, z.minZoom.y, z.maxZoom.y));
|
|
17339
17342
|
let G = x.left, q = x.top;
|
|
17340
17343
|
k < T ? q += (I - g * j) / 2 : G += (E - p * j) / 2;
|
|
17341
17344
|
const K = {
|
|
17342
|
-
x:
|
|
17343
|
-
y:
|
|
17345
|
+
x: z.position.x,
|
|
17346
|
+
y: z.position.y
|
|
17344
17347
|
}, H = {
|
|
17345
17348
|
x: P * j - G,
|
|
17346
17349
|
y: v * j - q
|
|
@@ -17352,14 +17355,14 @@ var cv = $e((n) => {
|
|
|
17352
17355
|
}, te = performance.now();
|
|
17353
17356
|
function ee(ae) {
|
|
17354
17357
|
const ce = ae - te, pe = Math.min(ce / S, 1), he = pe < 0.5 ? 2 * pe * pe : -1 + (4 - 2 * pe) * pe;
|
|
17355
|
-
|
|
17358
|
+
z.zoom.set(oe + $ * he), z.position.set(K.x + Z.x * he, K.y + Z.y * he), ce < S ? requestAnimationFrame(ee) : Q();
|
|
17356
17359
|
}
|
|
17357
17360
|
requestAnimationFrame(ee);
|
|
17358
|
-
}) : (
|
|
17361
|
+
}) : (z.zoom.set(j), z.position.set(H.x, H.y));
|
|
17359
17362
|
}
|
|
17360
|
-
function f(w,
|
|
17361
|
-
const
|
|
17362
|
-
|
|
17363
|
+
function f(w, L) {
|
|
17364
|
+
const V = s(w);
|
|
17365
|
+
V && (i.value = [V], y(V, L));
|
|
17363
17366
|
}
|
|
17364
17367
|
return {
|
|
17365
17368
|
name: "mce:zoom",
|
|
@@ -17429,8 +17432,8 @@ var cv = $e((n) => {
|
|
|
17429
17432
|
],
|
|
17430
17433
|
events: { docSet: () => o("zoomToFit") },
|
|
17431
17434
|
setup: () => {
|
|
17432
|
-
Be(r, (w,
|
|
17433
|
-
(!
|
|
17435
|
+
Be(r, (w, L) => {
|
|
17436
|
+
(!L.width || !L.height) && o("zoomToFit");
|
|
17434
17437
|
});
|
|
17435
17438
|
}
|
|
17436
17439
|
};
|
|
@@ -17638,7 +17641,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17638
17641
|
}, ["stop"])),
|
|
17639
17642
|
onClick: s[1] || (s[1] = (i) => t("close"))
|
|
17640
17643
|
}, {
|
|
17641
|
-
default: Te(() => [Me(
|
|
17644
|
+
default: Te(() => [Me(F(je), { icon: "$close" })]),
|
|
17642
17645
|
_: 1
|
|
17643
17646
|
})) : _e("", !0)], 32)) : _e("", !0), W("div", {
|
|
17644
17647
|
class: De(["m-panel__body", { "m-panel__body--padded": n.padded }]),
|
|
@@ -17699,16 +17702,16 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17699
17702
|
y.preventDefault(), y.stopPropagation(), a();
|
|
17700
17703
|
const w = { ...r.value };
|
|
17701
17704
|
Rt(y, {
|
|
17702
|
-
move: (
|
|
17703
|
-
const
|
|
17705
|
+
move: (L) => {
|
|
17706
|
+
const V = L.movePoint.x - L.startPoint.x, R = L.movePoint.y - L.startPoint.y;
|
|
17704
17707
|
if (f === "move") r.value = {
|
|
17705
17708
|
...r.value,
|
|
17706
|
-
left: w.left +
|
|
17709
|
+
left: w.left + V,
|
|
17707
17710
|
top: w.top + R
|
|
17708
17711
|
};
|
|
17709
17712
|
else {
|
|
17710
17713
|
const S = { ...r.value };
|
|
17711
|
-
(f === "e" || f === "se") && (S.width = Math.max(bv, w.width +
|
|
17714
|
+
(f === "e" || f === "se") && (S.width = Math.max(bv, w.width + V)), (f === "s" || f === "se") && (S.height = Math.max(_v, w.height + R)), r.value = S;
|
|
17712
17715
|
}
|
|
17713
17716
|
},
|
|
17714
17717
|
end: c
|
|
@@ -17825,7 +17828,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17825
17828
|
`m-layout-item--${e.position}`,
|
|
17826
17829
|
e.class
|
|
17827
17830
|
])),
|
|
17828
|
-
style: Ie(Ie([
|
|
17831
|
+
style: Ie(Ie([F(i), e.style]))
|
|
17829
17832
|
}, [Ne(c.$slots, "default"), n.resizable && n.modelValue ? (U(), J("div", {
|
|
17830
17833
|
key: 0,
|
|
17831
17834
|
class: De(["m-layout-item__resize", `m-layout-item__resize--${e.position}`]),
|
|
@@ -17850,20 +17853,20 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17850
17853
|
ref: (f) => l(f, u)
|
|
17851
17854
|
}, y);
|
|
17852
17855
|
}
|
|
17853
|
-
return (d, u) => (U(!0), J(we, null, Pe(
|
|
17856
|
+
return (d, u) => (U(!0), J(we, null, Pe(F(t), (h, y) => (U(), J(we, { key: y }, [h.type === "overlay" ? (U(), J(we, { key: 0 }, [F(s) && h.visible.value ? (U(), Fe(Vo, {
|
|
17854
17857
|
key: 0,
|
|
17855
|
-
to:
|
|
17856
|
-
}, [Me(c, { item: h }, null, 8, ["item"])], 8, ["to"])) : _e("", !0)], 64)) : h.type === "panel" ? (U(), J(we, { key: 1 }, [h.position === "float" ? (U(), J(we, { key: 0 }, [
|
|
17858
|
+
to: F(s)
|
|
17859
|
+
}, [Me(c, { item: h }, null, 8, ["item"])], 8, ["to"])) : _e("", !0)], 64)) : h.type === "panel" ? (U(), J(we, { key: 1 }, [h.position === "float" ? (U(), J(we, { key: 0 }, [F(i).height && h.visible.value ? (U(), Fe(Mv, {
|
|
17857
17860
|
key: 0,
|
|
17858
17861
|
modelValue: h.visible.value,
|
|
17859
17862
|
"onUpdate:modelValue": (f) => h.visible.value = f,
|
|
17860
17863
|
name: h.name,
|
|
17861
|
-
title:
|
|
17864
|
+
title: F(a)(h.name),
|
|
17862
17865
|
"default-transform": {
|
|
17863
17866
|
width: h.size || 260,
|
|
17864
|
-
height:
|
|
17865
|
-
left:
|
|
17866
|
-
top:
|
|
17867
|
+
height: F(i).height * 0.7,
|
|
17868
|
+
left: F(i).left + (F(r).left + 24),
|
|
17869
|
+
top: F(i).top + (F(r).top + 24)
|
|
17867
17870
|
}
|
|
17868
17871
|
}, {
|
|
17869
17872
|
default: Te(({ isActive: f }) => [Me(c, {
|
|
@@ -17936,7 +17939,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17936
17939
|
attach: !1,
|
|
17937
17940
|
"model-value": !0
|
|
17938
17941
|
}, {
|
|
17939
|
-
default: Te(() => [
|
|
17942
|
+
default: Te(() => [F(o).length > 0 ? Ne(d.$slots, "default", { key: 0 }) : _e("", !0)]),
|
|
17940
17943
|
_: 3
|
|
17941
17944
|
}, 8, [
|
|
17942
17945
|
"content-style",
|
|
@@ -17970,9 +17973,9 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17970
17973
|
items: i,
|
|
17971
17974
|
getLayoutItem: r
|
|
17972
17975
|
}), (l, c) => (U(), J("div", {
|
|
17973
|
-
ref:
|
|
17974
|
-
class: De(De([
|
|
17975
|
-
style: Ie(Ie([
|
|
17976
|
+
ref: F(a),
|
|
17977
|
+
class: De(De([F(o), t.class])),
|
|
17978
|
+
style: Ie(Ie([F(s), t.style]))
|
|
17976
17979
|
}, [Ne(l.$slots, "default")], 6));
|
|
17977
17980
|
}
|
|
17978
17981
|
}), Iv = Pv, $v = {
|
|
@@ -17985,7 +17988,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
17985
17988
|
const e = n, { mainStyles: t } = bu();
|
|
17986
17989
|
return (o, s) => (U(), J("main", {
|
|
17987
17990
|
class: De(["m-main", [{ "m-main--scrollable": e.scrollable }]]),
|
|
17988
|
-
style: Ie([
|
|
17991
|
+
style: Ie([F(t)])
|
|
17989
17992
|
}, [e.scrollable ? (U(), J("div", $v, [Ne(o.$slots, "default")])) : Ne(o.$slots, "default", { key: 1 })], 6));
|
|
17990
17993
|
}
|
|
17991
17994
|
}), zv = Lv, Rv = ["data-pixel-ratio"], Ov = {
|
|
@@ -18004,18 +18007,18 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18004
18007
|
const e = n, t = Ji();
|
|
18005
18008
|
let o;
|
|
18006
18009
|
e.editor ? (o = e.editor, Yt(Zn.injectionKey, o)) : o = qe(), o.setup(), Yt(ki, hu({ aliases: o.icons.value }));
|
|
18007
|
-
const { componentRefs: s, isElement: i, isFrameNode: r, drawboardDom: a, renderEngine: l, camera: c, hoverElement: d, state: u, setCursor: h, exec: y, isLock: f, t: w, selectionAabbInDrawboard:
|
|
18010
|
+
const { componentRefs: s, isElement: i, isFrameNode: r, drawboardDom: a, renderEngine: l, camera: c, hoverElement: d, state: u, setCursor: h, exec: y, isLock: f, t: w, selectionAabbInDrawboard: L, selectionMarquee: V, elementSelection: R, drawboardAabb: S, activeTool: A, isContentEditing: C } = o, P = Y(() => e.activeStrategy ?? o.activeStrategy), v = Y(() => e.doubleclickStrategy ?? o.doubleclickStrategy), p = Y(() => e.hoverStrategy ?? o.hoverStrategy), g = nt("overlayContainerTpl"), x = nt("canvasTpl"), b = de(!1);
|
|
18008
18011
|
Cu({ attach: Y(() => g.value) }), Os(x, (q) => {
|
|
18009
18012
|
const { width: K, height: H } = q[0].contentRect;
|
|
18010
18013
|
l.value.resize(K, H);
|
|
18011
18014
|
}), bt(() => {
|
|
18012
|
-
l.value.on("pointerdown",
|
|
18015
|
+
l.value.on("pointerdown", z), l.value.on("pointermove", N), l.value.on("pointerover", oe);
|
|
18013
18016
|
});
|
|
18014
18017
|
let _;
|
|
18015
18018
|
Vt(() => {
|
|
18016
18019
|
_ = E(x.value, a.value);
|
|
18017
18020
|
}), Qe(() => {
|
|
18018
|
-
l.value.off("pointerdown",
|
|
18021
|
+
l.value.off("pointerdown", z), l.value.off("pointermove", N), l.value.off("pointerover", oe), _?.();
|
|
18019
18022
|
});
|
|
18020
18023
|
function E(q, K) {
|
|
18021
18024
|
function H() {
|
|
@@ -18036,7 +18039,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18036
18039
|
return;
|
|
18037
18040
|
}
|
|
18038
18041
|
let K, H;
|
|
18039
|
-
if (R.value.length > 1 &&
|
|
18042
|
+
if (R.value.length > 1 && L.value.contains({
|
|
18040
18043
|
x: q.clientX - S.value.left,
|
|
18041
18044
|
y: q.clientY - S.value.top
|
|
18042
18045
|
})) K = "move";
|
|
@@ -18054,7 +18057,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18054
18057
|
x: 0,
|
|
18055
18058
|
y: 0
|
|
18056
18059
|
};
|
|
18057
|
-
function
|
|
18060
|
+
function z(q, K = {}) {
|
|
18058
18061
|
if (o.previewMode?.value || o.readonly.value) return;
|
|
18059
18062
|
const { srcElement: H, button: Q, target: $, clientX: Z, clientY: te } = q;
|
|
18060
18063
|
if (H && H !== a.value && H.dataset?.pointerdown_to_drawboard === void 0 || c.value.spaceKey || ![0, 2].includes(Q)) return;
|
|
@@ -18067,7 +18070,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18067
18070
|
y: te
|
|
18068
18071
|
};
|
|
18069
18072
|
let he = { ...pe }, ge = { ...he }, ve = [];
|
|
18070
|
-
const fe = ee && R.value.some((X) => X.equal($)) ||
|
|
18073
|
+
const fe = ee && R.value.some((X) => X.equal($)) || L.value.contains({
|
|
18071
18074
|
x: pe.x - S.value.left,
|
|
18072
18075
|
y: pe.y - S.value.top
|
|
18073
18076
|
});
|
|
@@ -18116,7 +18119,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18116
18119
|
ae(M) || (M = void 0), ve = M ? [M] : [], R.value = ve;
|
|
18117
18120
|
}
|
|
18118
18121
|
function Et() {
|
|
18119
|
-
Ae = !0, ce !== "painting" && ce !== "selecting" && (u.value = "selecting"),
|
|
18122
|
+
Ae = !0, ce !== "painting" && ce !== "selecting" && (u.value = "selecting"), V.value.x = Math.min(pe.x, he.x) - S.value.left, V.value.y = Math.min(pe.y, he.y) - S.value.top, V.value.width = Math.abs(pe.x - he.x), V.value.height = Math.abs(pe.y - he.y), y("marqueeSelect"), ve = R.value;
|
|
18120
18123
|
}
|
|
18121
18124
|
function Ye() {
|
|
18122
18125
|
const X = P.value({
|
|
@@ -18182,7 +18185,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18182
18185
|
default:
|
|
18183
18186
|
switch (ke || ($ && !Ae && Ye(), ($ || Ae || !q?.shiftKey) && (R.value = ve), Le && ve[0] && !f(ve[0]) && Le === "typing" && await y("startTyping", X), I(q)), u.value) {
|
|
18184
18187
|
case "selecting":
|
|
18185
|
-
|
|
18188
|
+
V.value = new xt({
|
|
18186
18189
|
x: -1,
|
|
18187
18190
|
y: -1,
|
|
18188
18191
|
width: 0,
|
|
@@ -18190,7 +18193,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18190
18193
|
}), u.value && (u.value = void 0);
|
|
18191
18194
|
break;
|
|
18192
18195
|
case "painting":
|
|
18193
|
-
|
|
18196
|
+
V.value = new xt({
|
|
18194
18197
|
x: -1,
|
|
18195
18198
|
y: -1,
|
|
18196
18199
|
width: 0,
|
|
@@ -18209,7 +18212,7 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18209
18212
|
}
|
|
18210
18213
|
o.registerCommand({
|
|
18211
18214
|
command: "pointerDown",
|
|
18212
|
-
handle:
|
|
18215
|
+
handle: z
|
|
18213
18216
|
});
|
|
18214
18217
|
function N(q) {
|
|
18215
18218
|
q.srcElement === a.value && (c.value.grabbing || q.button === 1 || u.value && u.value !== "typing" || I(q));
|
|
@@ -18222,8 +18225,8 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18222
18225
|
}
|
|
18223
18226
|
const G = { editor: o };
|
|
18224
18227
|
return (q, K) => (U(), Fe(Iv, { class: De(["m-editor", [
|
|
18225
|
-
|
|
18226
|
-
|
|
18228
|
+
F(u) && `m-editor--${F(u)}`,
|
|
18229
|
+
F(A) && `m-editor--drawing-tool-${F(A).name}`,
|
|
18227
18230
|
b.value && "m-editor--grabbing"
|
|
18228
18231
|
]]) }, {
|
|
18229
18232
|
default: Te(() => [
|
|
@@ -18232,25 +18235,25 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18232
18235
|
ref_key: "drawboardDom",
|
|
18233
18236
|
ref: a,
|
|
18234
18237
|
class: "m-editor__drawboard",
|
|
18235
|
-
"data-pixel-ratio":
|
|
18238
|
+
"data-pixel-ratio": F(l).pixelRatio,
|
|
18236
18239
|
onScroll: j,
|
|
18237
18240
|
onWheel: K[0] || (K[0] = Je(() => {
|
|
18238
18241
|
}, ["prevent"]))
|
|
18239
18242
|
}, [
|
|
18240
18243
|
W("canvas", Ov, null, 512),
|
|
18241
|
-
(t["floatbar-top"] || t.floatbar) && !
|
|
18244
|
+
(t["floatbar-top"] || t.floatbar) && !F(C)() ? (U(), Fe(As, {
|
|
18242
18245
|
key: 0,
|
|
18243
18246
|
location: "top-start",
|
|
18244
|
-
target:
|
|
18247
|
+
target: F(u) === "typing" ? F(s)["mce:text"]?.[0]?.textEditor : F(s)["mce:selection"]?.[0]?.transform?.$el,
|
|
18245
18248
|
middlewares: ["offset", "shift"]
|
|
18246
18249
|
}, {
|
|
18247
18250
|
default: Te(() => [Ne(q.$slots, "floatbar", gt(yt(G))), Ne(q.$slots, "floatbar-top", gt(yt(G)))]),
|
|
18248
18251
|
_: 3
|
|
18249
18252
|
}, 8, ["target"])) : _e("", !0),
|
|
18250
|
-
t["floatbar-bottom"] && !
|
|
18253
|
+
t["floatbar-bottom"] && !F(C)() ? (U(), Fe(As, {
|
|
18251
18254
|
key: 1,
|
|
18252
18255
|
location: "bottom-start",
|
|
18253
|
-
target:
|
|
18256
|
+
target: F(s)["mce:selection"]?.[0]?.transform?.$el,
|
|
18254
18257
|
middlewares: ["offset", "shift"]
|
|
18255
18258
|
}, {
|
|
18256
18259
|
default: Te(() => [Ne(q.$slots, "floatbar-bottom", gt(yt(G)))]),
|
|
@@ -18263,17 +18266,17 @@ var pv = { class: "m-panel" }, vv = { class: "m-panel__title" }, yv = /* @__PURE
|
|
|
18263
18266
|
Ne(q.$slots, "default", gt(yt(G))),
|
|
18264
18267
|
Me(Tv, { slots: t }),
|
|
18265
18268
|
W("div", Vv, null, 512),
|
|
18266
|
-
|
|
18269
|
+
F(o).previewMode?.value ? (U(), J("button", {
|
|
18267
18270
|
key: 0,
|
|
18268
18271
|
class: "m-editor__preview-badge",
|
|
18269
18272
|
type: "button",
|
|
18270
|
-
onClick: K[1] || (K[1] = (H) =>
|
|
18271
|
-
}, be(
|
|
18273
|
+
onClick: K[1] || (K[1] = (H) => F(y)("togglePreview"))
|
|
18274
|
+
}, be(F(w)("previewExitHint")), 1)) : _e("", !0)
|
|
18272
18275
|
]),
|
|
18273
18276
|
_: 3
|
|
18274
18277
|
}, 8, ["class"]));
|
|
18275
18278
|
}
|
|
18276
|
-
}),
|
|
18279
|
+
}), ly = Fv;
|
|
18277
18280
|
export {
|
|
18278
18281
|
Uh as Cropper,
|
|
18279
18282
|
pf as Dialog,
|
|
@@ -18281,7 +18284,7 @@ export {
|
|
|
18281
18284
|
ic as ELEMENT2D_SYNCED_SUBOBJECTS,
|
|
18282
18285
|
Zn as Editor,
|
|
18283
18286
|
$d as EditorLayers,
|
|
18284
|
-
|
|
18287
|
+
ly as EditorLayout,
|
|
18285
18288
|
Cv as EditorLayoutItem,
|
|
18286
18289
|
tv as EditorToolbelt,
|
|
18287
18290
|
ys as INTERNAL_ORIGIN,
|
|
@@ -18289,7 +18292,7 @@ export {
|
|
|
18289
18292
|
nc as IndexeddbProvider,
|
|
18290
18293
|
uo as LOCAL_ORIGIN,
|
|
18291
18294
|
io as Menu,
|
|
18292
|
-
|
|
18295
|
+
oy as PREFERRED_TRIM_SIZE,
|
|
18293
18296
|
zo as Ruler,
|
|
18294
18297
|
ks as Scrollbar,
|
|
18295
18298
|
Pt as TextEditor,
|
|
@@ -18297,7 +18300,7 @@ export {
|
|
|
18297
18300
|
rc as YDoc,
|
|
18298
18301
|
Cr as base64ToBytes,
|
|
18299
18302
|
Kv as base64ToText,
|
|
18300
|
-
|
|
18303
|
+
sy as clearDocument,
|
|
18301
18304
|
Zv as createCardElement,
|
|
18302
18305
|
Jv as createFlowNodeElement,
|
|
18303
18306
|
ts as createImageElement,
|
|
@@ -18307,10 +18310,10 @@ export {
|
|
|
18307
18310
|
Wv as defineMixin,
|
|
18308
18311
|
$e as definePlugin,
|
|
18309
18312
|
xi as fetchUpdates,
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
|
|
18313
|
-
|
|
18313
|
+
ay as isDialogComponent,
|
|
18314
|
+
ry as isOverlayComponent,
|
|
18315
|
+
iy as isPanelComponent,
|
|
18316
|
+
ny as matchSource,
|
|
18314
18317
|
Hc as mixins,
|
|
18315
18318
|
mv as plugins,
|
|
18316
18319
|
oc as rawReactivity,
|