reacthub-pixitweenjs 0.2.107-alpha.92 → 0.2.107-alpha.94
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.es.js +802 -792
- package/dist/index.umd.js +24 -24
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as k from "react";
|
|
2
|
-
import Bh, { useEffect as Nt, useState as Kt, useRef as
|
|
2
|
+
import Bh, { useEffect as Nt, useState as Kt, useRef as z, useLayoutEffect as xu, useCallback as Be, useContext as kr, useReducer as Uh } from "react";
|
|
3
3
|
import { TilingSprite as $h, useApp as wn, withFilters as Gh, Container as Ae, Sprite as yi, AnimatedSprite as zh, Text as jh, useTick as bu } from "@pixi/react";
|
|
4
4
|
import * as ze from "pixi.js";
|
|
5
5
|
import N from "gsap";
|
|
@@ -112,7 +112,7 @@ const ir = k.createContext({}), ye = {
|
|
|
112
112
|
}, jC = ({
|
|
113
113
|
children: t
|
|
114
114
|
}) => {
|
|
115
|
-
const [e, r] = Kt(0), i =
|
|
115
|
+
const [e, r] = Kt(0), i = z(), n = z(), s = z(1e-3), a = z(!1), o = z(!1), [u, h] = Kt(!1);
|
|
116
116
|
xu(() => (n.current = N.context(() => {
|
|
117
117
|
i.current && i.current.progress(0).kill(), i.current && i.current.clear(), i.current && N.killTweensOf(i.current), i.current = N.timeline({
|
|
118
118
|
paused: !0,
|
|
@@ -121,7 +121,7 @@ const ir = k.createContext({}), ye = {
|
|
|
121
121
|
}), () => {
|
|
122
122
|
i.current && i.current.revert(), n.current.revert();
|
|
123
123
|
}), []);
|
|
124
|
-
const
|
|
124
|
+
const f = Be(() => {
|
|
125
125
|
if (i.current) {
|
|
126
126
|
let x = i.current.time();
|
|
127
127
|
x < s.current ? a.current = !0 : a.current = !1, s.current = x;
|
|
@@ -132,15 +132,15 @@ const ir = k.createContext({}), ye = {
|
|
|
132
132
|
const _ = i.current;
|
|
133
133
|
_.eventCallback("onStart", function() {
|
|
134
134
|
}).eventCallback("onInterrupt", function() {
|
|
135
|
-
_.pause(),
|
|
135
|
+
_.pause(), f();
|
|
136
136
|
}).eventCallback("onUpdate", function() {
|
|
137
|
-
|
|
137
|
+
f();
|
|
138
138
|
}).eventCallback("onRepeat", function() {
|
|
139
139
|
console.log("onrepeat", _.progress());
|
|
140
140
|
}).eventCallback("onReverseComplete", function() {
|
|
141
141
|
console.log("onReverseComplete", _.progress());
|
|
142
142
|
}).eventCallback("onComplete", function() {
|
|
143
|
-
_.seek(0), _.pause(), Jr(ye.COMPLETE, { uniqueId: "timeline" }), console.log("Emitted events"),
|
|
143
|
+
_.seek(0), _.pause(), Jr(ye.COMPLETE, { uniqueId: "timeline" }), console.log("Emitted events"), f();
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
}, []);
|
|
@@ -148,7 +148,7 @@ const ir = k.createContext({}), ye = {
|
|
|
148
148
|
i.current && i.current.revert();
|
|
149
149
|
}, []), c = Be(() => {
|
|
150
150
|
i.current && i.current.restart();
|
|
151
|
-
}, []),
|
|
151
|
+
}, []), d = Be(() => {
|
|
152
152
|
if (i.current) {
|
|
153
153
|
const _ = i.current;
|
|
154
154
|
_.repeat(1), _.restart();
|
|
@@ -195,7 +195,7 @@ const ir = k.createContext({}), ye = {
|
|
|
195
195
|
handleSeek: p,
|
|
196
196
|
handleSeekTest: m,
|
|
197
197
|
handleRestart: c,
|
|
198
|
-
handleRepeat:
|
|
198
|
+
handleRepeat: d,
|
|
199
199
|
playerTimeRef: s,
|
|
200
200
|
getTimelineDuration: v,
|
|
201
201
|
totalDuration: e,
|
|
@@ -219,16 +219,16 @@ const ir = k.createContext({}), ye = {
|
|
|
219
219
|
uniqueId: o = "",
|
|
220
220
|
isText: u = !1
|
|
221
221
|
}) => {
|
|
222
|
-
const h = ze.utils.string2hex("#F3C409"),
|
|
222
|
+
const h = ze.utils.string2hex("#F3C409"), f = ze.utils.string2hex("#F3C409"), l = k.useRef({
|
|
223
223
|
isDragging: !1
|
|
224
|
-
}), c = 300,
|
|
224
|
+
}), c = 300, d = k.useRef(0), p = k.useCallback(() => {
|
|
225
225
|
s && !l.current.isDragging && s(!0);
|
|
226
226
|
}, [s]), m = k.useCallback(() => {
|
|
227
227
|
s && !l.current.isDragging && s(!1);
|
|
228
228
|
}, [s]), v = k.useCallback(() => {
|
|
229
229
|
l.current.isDragging = !0;
|
|
230
230
|
const _ = (/* @__PURE__ */ new Date()).getTime();
|
|
231
|
-
_ -
|
|
231
|
+
_ - d.current < c && a && a(), d.current = _;
|
|
232
232
|
}, []), g = k.useCallback(
|
|
233
233
|
(_) => {
|
|
234
234
|
l.current.isDragging = !0, n && n(_), Jr(ye.TRANSFORMER_DRAG_START, { uniqueId: "timeline" });
|
|
@@ -265,7 +265,7 @@ const ir = k.createContext({}), ye = {
|
|
|
265
265
|
boxRotationEnabled: !0,
|
|
266
266
|
centeredScaling: !0,
|
|
267
267
|
boxScalingEnabled: !0,
|
|
268
|
-
wireframeStyle: { thickness: 2, color:
|
|
268
|
+
wireframeStyle: { thickness: 2, color: f },
|
|
269
269
|
lockAspectRatio: !0,
|
|
270
270
|
scaleEnabled: !0,
|
|
271
271
|
handleStyle: {
|
|
@@ -558,10 +558,10 @@ function um(t, e, r, i, n, s) {
|
|
|
558
558
|
var a = r & om, o = t.length, u = e.length;
|
|
559
559
|
if (o != u && !(a && u > o))
|
|
560
560
|
return !1;
|
|
561
|
-
var h = s.get(t),
|
|
562
|
-
if (h &&
|
|
563
|
-
return h == e &&
|
|
564
|
-
var l = -1, c = !0,
|
|
561
|
+
var h = s.get(t), f = s.get(e);
|
|
562
|
+
if (h && f)
|
|
563
|
+
return h == e && f == t;
|
|
564
|
+
var l = -1, c = !0, d = r & lm ? new nm() : void 0;
|
|
565
565
|
for (s.set(t, e), s.set(e, t); ++l < o; ) {
|
|
566
566
|
var p = t[l], m = e[l];
|
|
567
567
|
if (i)
|
|
@@ -572,10 +572,10 @@ function um(t, e, r, i, n, s) {
|
|
|
572
572
|
c = !1;
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
|
-
if (
|
|
575
|
+
if (d) {
|
|
576
576
|
if (!sm(e, function(g, y) {
|
|
577
|
-
if (!am(
|
|
578
|
-
return
|
|
577
|
+
if (!am(d, y) && (p === g || n(p, g, r, i, s)))
|
|
578
|
+
return d.push(y);
|
|
579
579
|
})) {
|
|
580
580
|
c = !1;
|
|
581
581
|
break;
|
|
@@ -629,8 +629,8 @@ function Nm(t, e, r, i, n, s, a) {
|
|
|
629
629
|
if (h)
|
|
630
630
|
return h == e;
|
|
631
631
|
i |= Tm, a.set(t, e);
|
|
632
|
-
var
|
|
633
|
-
return a.delete(t),
|
|
632
|
+
var f = _m(o(t), o(e), i, n, s, a);
|
|
633
|
+
return a.delete(t), f;
|
|
634
634
|
case Mm:
|
|
635
635
|
if (Zn)
|
|
636
636
|
return Zn.call(t) == Zn.call(e);
|
|
@@ -770,17 +770,17 @@ function M0(t) {
|
|
|
770
770
|
}
|
|
771
771
|
var F0 = M0, po = F0, O0 = 1, N0 = Object.prototype, k0 = N0.hasOwnProperty;
|
|
772
772
|
function L0(t, e, r, i, n, s) {
|
|
773
|
-
var a = r & O0, o = po(t), u = o.length, h = po(e),
|
|
774
|
-
if (u !=
|
|
773
|
+
var a = r & O0, o = po(t), u = o.length, h = po(e), f = h.length;
|
|
774
|
+
if (u != f && !a)
|
|
775
775
|
return !1;
|
|
776
776
|
for (var l = u; l--; ) {
|
|
777
777
|
var c = o[l];
|
|
778
778
|
if (!(a ? c in e : k0.call(e, c)))
|
|
779
779
|
return !1;
|
|
780
780
|
}
|
|
781
|
-
var
|
|
782
|
-
if (
|
|
783
|
-
return
|
|
781
|
+
var d = s.get(t), p = s.get(e);
|
|
782
|
+
if (d && p)
|
|
783
|
+
return d == e && p == t;
|
|
784
784
|
var m = !0;
|
|
785
785
|
s.set(t, e), s.set(e, t);
|
|
786
786
|
for (var v = a; ++l < u; ) {
|
|
@@ -822,18 +822,18 @@ var Du = $t, Qn = Pu, av = Mu, ov = km, lv = D0, xo = Du, bo = _t, To = Ta, uv =
|
|
|
822
822
|
function fv(t, e, r, i, n, s) {
|
|
823
823
|
var a = bo(t), o = bo(e), u = a ? So : xo(t), h = o ? So : xo(e);
|
|
824
824
|
u = u == wo ? Ei : u, h = h == wo ? Ei : h;
|
|
825
|
-
var
|
|
825
|
+
var f = u == Ei, l = h == Ei, c = u == h;
|
|
826
826
|
if (c && To(t)) {
|
|
827
827
|
if (!To(e))
|
|
828
828
|
return !1;
|
|
829
|
-
a = !0,
|
|
829
|
+
a = !0, f = !1;
|
|
830
830
|
}
|
|
831
|
-
if (c && !
|
|
831
|
+
if (c && !f)
|
|
832
832
|
return s || (s = new Qn()), a || uv(t) ? av(t, e, r, i, n, s) : ov(t, e, u, r, i, n, s);
|
|
833
833
|
if (!(r & cv)) {
|
|
834
|
-
var
|
|
835
|
-
if (
|
|
836
|
-
var m =
|
|
834
|
+
var d = f && Ao.call(t, "__wrapped__"), p = l && Ao.call(e, "__wrapped__");
|
|
835
|
+
if (d || p) {
|
|
836
|
+
var m = d ? t.value() : t, v = p ? e.value() : e;
|
|
837
837
|
return s || (s = new Qn()), n(m, v, r, i, s);
|
|
838
838
|
}
|
|
839
839
|
}
|
|
@@ -849,7 +849,7 @@ function gv(t, e) {
|
|
|
849
849
|
}
|
|
850
850
|
var vv = gv;
|
|
851
851
|
const _v = /* @__PURE__ */ rr(vv), yv = (t, e) => {
|
|
852
|
-
const r =
|
|
852
|
+
const r = z(!0), i = z(e);
|
|
853
853
|
Nt(() => {
|
|
854
854
|
const n = i.current.every(
|
|
855
855
|
(s, a) => _v(s, e[a])
|
|
@@ -954,22 +954,22 @@ var Lv = /[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, Dv = /[\+\-]?\d*\.?
|
|
|
954
954
|
return Math.round(e * Io) / Io || 0;
|
|
955
955
|
};
|
|
956
956
|
function $v(t, e, r, i, n, s, a) {
|
|
957
|
-
for (var o = t.length, u, h,
|
|
958
|
-
for (u = t[o], h = u.length,
|
|
959
|
-
l = u[
|
|
957
|
+
for (var o = t.length, u, h, f, l, c; --o > -1; )
|
|
958
|
+
for (u = t[o], h = u.length, f = 0; f < h; f += 2)
|
|
959
|
+
l = u[f], c = u[f + 1], u[f] = l * e + c * i + s, u[f + 1] = l * r + c * n + a;
|
|
960
960
|
return t._dirty = 1, t;
|
|
961
961
|
}
|
|
962
962
|
function Gv(t, e, r, i, n, s, a, o, u) {
|
|
963
963
|
if (!(t === o && e === u)) {
|
|
964
964
|
r = ei(r), i = ei(i);
|
|
965
|
-
var h = n % 360 * Bv,
|
|
965
|
+
var h = n % 360 * Bv, f = Ii(h), l = Ci(h), c = Math.PI, d = c * 2, p = (t - o) / 2, m = (e - u) / 2, v = f * p + l * m, g = -l * p + f * m, y = v * v, _ = g * g, x = y / (r * r) + _ / (i * i);
|
|
966
966
|
x > 1 && (r = Vr(x) * r, i = Vr(x) * i);
|
|
967
967
|
var b = r * r, T = i * i, w = (b * T - b * _ - T * y) / (b * _ + T * y);
|
|
968
968
|
w < 0 && (w = 0);
|
|
969
|
-
var S = (s === a ? -1 : 1) * Vr(w), A = S * (r * g / i), C = S * -(i * v / r), M = (t + o) / 2, G = (e + u) / 2, I = M + (
|
|
970
|
-
isNaN(F) && (F = c), !a && F > 0 ? F -=
|
|
971
|
-
var
|
|
972
|
-
for ($ = 0; $ <
|
|
969
|
+
var S = (s === a ? -1 : 1) * Vr(w), A = S * (r * g / i), C = S * -(i * v / r), M = (t + o) / 2, G = (e + u) / 2, I = M + (f * A - l * C), E = G + (l * A + f * C), L = (v - A) / r, B = (g - C) / i, R = (-v - A) / r, U = (-g - C) / i, X = L * L + B * B, P = (B < 0 ? -1 : 1) * Math.acos(L / Vr(X)), F = (L * U - B * R < 0 ? -1 : 1) * Math.acos((L * R + B * U) / Vr(X * (R * R + U * U)));
|
|
970
|
+
isNaN(F) && (F = c), !a && F > 0 ? F -= d : a && F < 0 && (F += d), P %= d, F %= d;
|
|
971
|
+
var j = Math.ceil(ei(F) / (d / 4)), V = [], W = F / j, re = 4 / 3 * Ci(W / 2) / (1 + Ii(W / 2)), ne = f * r, oe = l * r, pe = l * -i, he = f * i, $;
|
|
972
|
+
for ($ = 0; $ < j; $++)
|
|
973
973
|
n = P + $ * W, v = Ii(n), g = Ci(n), L = Ii(n += W), B = Ci(n), V.push(v - re * g, g + re * v, L + re * B, B - re * L, L, B);
|
|
974
974
|
for ($ = 0; $ < V.length; $ += 2)
|
|
975
975
|
v = V[$], g = V[$ + 1], V[$] = v * ne + g * pe + I, V[$ + 1] = v * oe + g * he + E;
|
|
@@ -980,32 +980,32 @@ function zv(t) {
|
|
|
980
980
|
var e = (t + "").replace(Dv, function(A) {
|
|
981
981
|
var C = +A;
|
|
982
982
|
return C < 1e-4 && C > -1e-4 ? 0 : C;
|
|
983
|
-
}).match(Lv) || [], r = [], i = 0, n = 0, s = 2 / 3, a = e.length, o = 0, u = "ERROR: malformed path: " + t, h,
|
|
983
|
+
}).match(Lv) || [], r = [], i = 0, n = 0, s = 2 / 3, a = e.length, o = 0, u = "ERROR: malformed path: " + t, h, f, l, c, d, p, m, v, g, y, _, x, b, T, w, S = function(C, M, G, I) {
|
|
984
984
|
y = (G - C) / 3, _ = (I - M) / 3, m.push(C + y, M + _, G - y, I - _, G, I);
|
|
985
985
|
};
|
|
986
986
|
if (!t || !isNaN(e[0]) || isNaN(e[1]))
|
|
987
987
|
return console.log(u), r;
|
|
988
988
|
for (h = 0; h < a; h++)
|
|
989
|
-
if (b =
|
|
990
|
-
m && (m.length < 8 ? r.length -= 1 : o += m.length), i = v = l, n = g = c, m = [l, c], r.push(m), h += 2,
|
|
991
|
-
else if (
|
|
989
|
+
if (b = d, isNaN(e[h]) ? (d = e[h].toUpperCase(), p = d !== e[h]) : h--, l = +e[h + 1], c = +e[h + 2], p && (l += i, c += n), h || (v = l, g = c), d === "M")
|
|
990
|
+
m && (m.length < 8 ? r.length -= 1 : o += m.length), i = v = l, n = g = c, m = [l, c], r.push(m), h += 2, d = "L";
|
|
991
|
+
else if (d === "C")
|
|
992
992
|
m || (m = [0, 0]), p || (i = n = 0), m.push(l, c, i + e[h + 3] * 1, n + e[h + 4] * 1, i += e[h + 5] * 1, n += e[h + 6] * 1), h += 6;
|
|
993
|
-
else if (
|
|
993
|
+
else if (d === "S")
|
|
994
994
|
y = i, _ = n, (b === "C" || b === "S") && (y += i - m[m.length - 4], _ += n - m[m.length - 3]), p || (i = n = 0), m.push(y, _, l, c, i += e[h + 3] * 1, n += e[h + 4] * 1), h += 4;
|
|
995
|
-
else if (
|
|
995
|
+
else if (d === "Q")
|
|
996
996
|
y = i + (l - i) * s, _ = n + (c - n) * s, p || (i = n = 0), i += e[h + 3] * 1, n += e[h + 4] * 1, m.push(y, _, i + (l - i) * s, n + (c - n) * s, i, n), h += 4;
|
|
997
|
-
else if (
|
|
997
|
+
else if (d === "T")
|
|
998
998
|
y = i - m[m.length - 4], _ = n - m[m.length - 3], m.push(i + y, n + _, l + (i + y * 1.5 - l) * s, c + (n + _ * 1.5 - c) * s, i = l, n = c), h += 2;
|
|
999
|
-
else if (
|
|
999
|
+
else if (d === "H")
|
|
1000
1000
|
S(i, n, i = l, n), h += 1;
|
|
1001
|
-
else if (
|
|
1001
|
+
else if (d === "V")
|
|
1002
1002
|
S(i, n, i, n = l + (p ? n - i : 0)), h += 1;
|
|
1003
|
-
else if (
|
|
1004
|
-
|
|
1005
|
-
else if (
|
|
1006
|
-
if (T = e[h + 4], w = e[h + 5], y = e[h + 6], _ = e[h + 7],
|
|
1007
|
-
for (
|
|
1008
|
-
m.push(x[
|
|
1003
|
+
else if (d === "L" || d === "Z")
|
|
1004
|
+
d === "Z" && (l = v, c = g, m.closed = !0), (d === "L" || ei(i - l) > 0.5 || ei(n - c) > 0.5) && (S(i, n, l, c), d === "L" && (h += 2)), i = l, n = c;
|
|
1005
|
+
else if (d === "A") {
|
|
1006
|
+
if (T = e[h + 4], w = e[h + 5], y = e[h + 6], _ = e[h + 7], f = 7, T.length > 1 && (T.length < 3 ? (_ = y, y = w, f--) : (_ = w, y = T.substr(2), f -= 2), w = T.charAt(1), T = T.charAt(0)), x = Gv(i, n, +e[h + 1], +e[h + 2], +e[h + 3], +T, +w, (p ? i : 0) + y * 1, (p ? n : 0) + _ * 1), h += f, x)
|
|
1007
|
+
for (f = 0; f < x.length; f++)
|
|
1008
|
+
m.push(x[f]);
|
|
1009
1009
|
i = m[m.length - 2], n = m[m.length - 1];
|
|
1010
1010
|
} else
|
|
1011
1011
|
console.log(u);
|
|
@@ -1046,18 +1046,18 @@ var Ge, Uu, $u = function() {
|
|
|
1046
1046
|
var n = +e[0] * -1, s = -i, a = e.length, o = 1 / (+e[a - 2] + n), u = -r || (Math.abs(+e[a - 1] - +e[1]) < 0.01 * (+e[a - 2] - +e[0]) ? Wv(e) + s : +e[a - 1] + s), h;
|
|
1047
1047
|
for (u ? u = 1 / u : u = -o, h = 0; h < a; h += 2)
|
|
1048
1048
|
e[h] = (+e[h] + n) * o, e[h + 1] = (+e[h + 1] + s) * u;
|
|
1049
|
-
}, Yv = function t(e, r, i, n, s, a, o, u, h,
|
|
1050
|
-
var c = (e + i) / 2,
|
|
1051
|
-
return
|
|
1049
|
+
}, Yv = function t(e, r, i, n, s, a, o, u, h, f, l) {
|
|
1050
|
+
var c = (e + i) / 2, d = (r + n) / 2, p = (i + s) / 2, m = (n + a) / 2, v = (s + o) / 2, g = (a + u) / 2, y = (c + p) / 2, _ = (d + m) / 2, x = (p + v) / 2, b = (m + g) / 2, T = (y + x) / 2, w = (_ + b) / 2, S = o - e, A = u - r, C = Math.abs((i - o) * A - (n - u) * S), M = Math.abs((s - o) * A - (a - u) * S), G;
|
|
1051
|
+
return f || (f = [{
|
|
1052
1052
|
x: e,
|
|
1053
1053
|
y: r
|
|
1054
1054
|
}, {
|
|
1055
1055
|
x: o,
|
|
1056
1056
|
y: u
|
|
1057
|
-
}], l = 1),
|
|
1057
|
+
}], l = 1), f.splice(l || f.length - 1, 0, {
|
|
1058
1058
|
x: T,
|
|
1059
1059
|
y: w
|
|
1060
|
-
}), (C + M) * (C + M) > h * (S * S + A * A) && (G =
|
|
1060
|
+
}), (C + M) * (C + M) > h * (S * S + A * A) && (G = f.length, t(e, r, c, d, y, _, T, w, h, f, l), t(T, w, x, b, v, g, o, u, h, f, l + 1 + (f.length - G))), f;
|
|
1061
1061
|
}, wi = /* @__PURE__ */ function() {
|
|
1062
1062
|
function t(r, i, n) {
|
|
1063
1063
|
Uu || Ro(), this.id = r, this.setData(i, n);
|
|
@@ -1065,7 +1065,7 @@ var Ge, Uu, $u = function() {
|
|
|
1065
1065
|
var e = t.prototype;
|
|
1066
1066
|
return e.setData = function(i, n) {
|
|
1067
1067
|
n = n || {}, i = i || "0,0,1,1";
|
|
1068
|
-
var s = i.match(Vv), a = 1, o = [], u = [], h = n.precision || 1,
|
|
1068
|
+
var s = i.match(Vv), a = 1, o = [], u = [], h = n.precision || 1, f = h <= 1, l, c, d, p, m, v, g, y, _;
|
|
1069
1069
|
if (this.data = i, (Xv.test(i) || ~i.indexOf("M") && i.indexOf("C") < 0) && (s = zv(i)[0]), l = s.length, l === 4)
|
|
1070
1070
|
s.unshift(0, 0), s.push(1, 1), l = 8;
|
|
1071
1071
|
else if ((l - 2) % 6)
|
|
@@ -1074,13 +1074,13 @@ var Ge, Uu, $u = function() {
|
|
|
1074
1074
|
c = {
|
|
1075
1075
|
x: +s[p - 2],
|
|
1076
1076
|
y: +s[p - 1]
|
|
1077
|
-
},
|
|
1077
|
+
}, d = {
|
|
1078
1078
|
x: +s[p + 4],
|
|
1079
1079
|
y: +s[p + 5]
|
|
1080
|
-
}, o.push(c,
|
|
1080
|
+
}, o.push(c, d), Yv(c.x, c.y, +s[p], +s[p + 1], +s[p + 2], +s[p + 3], d.x, d.y, 1 / (h * 2e5), o, o.length - 1);
|
|
1081
1081
|
for (l = o.length, p = 0; p < l; p++)
|
|
1082
|
-
g = o[p], y = o[p - 1] || g, (g.x > y.x || y.y !== g.y && y.x === g.x || g === y) && g.x <= 1 ? (y.cx = g.x - y.x, y.cy = g.y - y.y, y.n = g, y.nx = g.x,
|
|
1083
|
-
if (l = 1 / a + 1 | 0, m = 1 / l, v = 0, g = o[0],
|
|
1082
|
+
g = o[p], y = o[p - 1] || g, (g.x > y.x || y.y !== g.y && y.x === g.x || g === y) && g.x <= 1 ? (y.cx = g.x - y.x, y.cy = g.y - y.y, y.n = g, y.nx = g.x, f && p > 1 && Math.abs(y.cy / y.cx - o[p - 2].cy / o[p - 2].cx) > 2 && (f = 0), y.cx < a && (y.cx ? a = y.cx : (y.cx = 1e-3, p === l - 1 && (y.x -= 1e-3, a = Math.min(a, 1e-3), f = 0)))) : (o.splice(p--, 1), l--);
|
|
1083
|
+
if (l = 1 / a + 1 | 0, m = 1 / l, v = 0, g = o[0], f) {
|
|
1084
1084
|
for (p = 0; p < l; p++)
|
|
1085
1085
|
_ = p * m, g.nx < _ && (g = o[++v]), c = g.y + (_ - g.x) / g.cx * g.cy, u[p] = {
|
|
1086
1086
|
x: _,
|
|
@@ -1109,15 +1109,15 @@ var Ge, Uu, $u = function() {
|
|
|
1109
1109
|
return Ge.parseEase(i);
|
|
1110
1110
|
}, t.getSVGData = function(i, n) {
|
|
1111
1111
|
n = n || {};
|
|
1112
|
-
var s = n.width || 100, a = n.height || 100, o = n.x || 0, u = (n.y || 0) + a, h = Ge.utils.toArray(n.path)[0],
|
|
1112
|
+
var s = n.width || 100, a = n.height || 100, o = n.x || 0, u = (n.y || 0) + a, h = Ge.utils.toArray(n.path)[0], f, l, c, d, p, m, v, g, y, _;
|
|
1113
1113
|
if (n.invert && (a = -a, u = 0), typeof i == "string" && (i = Ge.parseEase(i)), i.custom && (i = i.custom), i instanceof t)
|
|
1114
|
-
|
|
1114
|
+
f = jv($v([i.segment], s, 0, 0, -a, o, u));
|
|
1115
1115
|
else {
|
|
1116
|
-
for (
|
|
1117
|
-
p = Ri(o + c *
|
|
1118
|
-
|
|
1116
|
+
for (f = [o, u], v = Math.max(5, (n.precision || 1) * 200), d = 1 / v, v += 2, g = 5 / v, y = Ri(o + d * s), _ = Ri(u + i(d) * -a), l = (_ - u) / (y - o), c = 2; c < v; c++)
|
|
1117
|
+
p = Ri(o + c * d * s), m = Ri(u + i(c * d) * -a), (Math.abs((m - _) / (p - y) - l) > g || c === v - 1) && (f.push(y, _), l = (m - _) / (p - y)), y = p, _ = m;
|
|
1118
|
+
f = "M" + f.join(",");
|
|
1119
1119
|
}
|
|
1120
|
-
return h && h.setAttribute("d",
|
|
1120
|
+
return h && h.setAttribute("d", f), f;
|
|
1121
1121
|
}, t;
|
|
1122
1122
|
}();
|
|
1123
1123
|
$u() && Ge.registerPlugin(wi);
|
|
@@ -1228,8 +1228,8 @@ var Pt, Po, cn, Ke, ti, Gu, Us, zu = function() {
|
|
|
1228
1228
|
}, a_ = function(e, r) {
|
|
1229
1229
|
return r.set(r.t, r.p, e === 1 ? r.e : Math.round((r.s + r.c * e) * 1e5) / 1e5, r);
|
|
1230
1230
|
}, o_ = function(e, r, i, n, s, a) {
|
|
1231
|
-
var o = 360 * (a ? hn : 1), u = Vu(s), h = u && s.charAt(1) === "=" ? +(s.charAt(0) + "1") : 0,
|
|
1232
|
-
return u && (
|
|
1231
|
+
var o = 360 * (a ? hn : 1), u = Vu(s), h = u && s.charAt(1) === "=" ? +(s.charAt(0) + "1") : 0, f = parseFloat(h ? s.substr(2) : s) * (a ? hn : 1), l = h ? f * h : f - n, c = n + l, d, p;
|
|
1232
|
+
return u && (d = s.split("_")[1], d === "short" && (l %= o, l !== l % (o / 2) && (l += l < 0 ? o : -o)), d === "cw" && l < 0 ? l = (l + o * 1e10) % o - ~~(l / o) * o : d === "ccw" && l > 0 && (l = (l - o * 1e10) % o - ~~(l / o) * o)), e._pt = p = new ti(e._pt, r, i, n, l, a_), p.e = c, p;
|
|
1233
1233
|
}, Uo = function() {
|
|
1234
1234
|
zu() && (Po = window, Pt = ju(), Ke = Ke || Po.PIXI, Us = Ke && Ke.VERSION && Ke.VERSION.charAt(0) === "4", cn = function(r) {
|
|
1235
1235
|
return Pt.utils.splitColor((r + "").substr(0, 2) === "0x" ? "#" + r.substr(2) : r);
|
|
@@ -1249,7 +1249,7 @@ var Ca = {
|
|
|
1249
1249
|
init: function(e, r, i, n, s) {
|
|
1250
1250
|
if (Ke || Uo(), !Ke || !(e instanceof Ke.DisplayObject))
|
|
1251
1251
|
return console.warn(e, "is not a DisplayObject or PIXI was not found. PixiPlugin.registerPIXI(PIXI);"), !1;
|
|
1252
|
-
var a, o, u, h,
|
|
1252
|
+
var a, o, u, h, f, l, c, d, p;
|
|
1253
1253
|
for (l in r) {
|
|
1254
1254
|
if (a = $s[l], u = r[l], a)
|
|
1255
1255
|
o = ~l.charAt(l.length - 1).toLowerCase().indexOf("x") ? "x" : "y", this.add(e[a], o, e[a][o], a === "skew" ? s_(u) : u, 0, 0, 0, 0, 0, 1);
|
|
@@ -1260,15 +1260,15 @@ var Ca = {
|
|
|
1260
1260
|
else if (n_[l])
|
|
1261
1261
|
h || (Jv(e, r.colorMatrixFilter || r, this), h = !0);
|
|
1262
1262
|
else if (l === "blur" || l === "blurX" || l === "blurY" || l === "blurPadding") {
|
|
1263
|
-
if (
|
|
1264
|
-
for (c = r.blurPadding || Math.max(
|
|
1265
|
-
e.filters[
|
|
1263
|
+
if (f = Hu(e, "BlurFilter"), this.add(f, l, f[l], u), r.blurPadding !== 0)
|
|
1264
|
+
for (c = r.blurPadding || Math.max(f[l], u) * 2, d = e.filters.length; --d > -1; )
|
|
1265
|
+
e.filters[d].padding = Math.max(e.filters[d].padding, c);
|
|
1266
1266
|
} else if (i_[l])
|
|
1267
1267
|
if ((l === "lineColor" || l === "fillColor") && e instanceof Ke.Graphics)
|
|
1268
1268
|
for (p = (e.geometry || e).graphicsData, this._pt = new ti(this._pt, e, l, 0, 0, t_, {
|
|
1269
1269
|
g: e.geometry || e
|
|
1270
|
-
}),
|
|
1271
|
-
Do(Us ? p[
|
|
1270
|
+
}), d = p.length; --d > -1; )
|
|
1271
|
+
Do(Us ? p[d] : p[d][l.substr(0, 4) + "Style"], Us ? l : "color", u, this);
|
|
1272
1272
|
else
|
|
1273
1273
|
Do(e, l, u, this);
|
|
1274
1274
|
else
|
|
@@ -1588,7 +1588,7 @@ function l_() {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
var Xu = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.FLASH = "FLASH", t.PULSE = "PULSE", t.SHAKE = "SHAKE", t.SWING = "SWING", t.JELLO = "JELLO", t.WOOBLE = "WOOBLE", t.FADE_IN = "FADE_IN", t.FADE_OUT = "FADE_OUT", t.FADE_IN_OUT = "FADE_IN_OUT", t.SLIDE_IN_LEFT = "SLIDE_IN_LEFT", t.SLIDE_IN_RIGHT = "SLIDE_IN_RIGHT", t.SLIDE_IN_TOP = "SLIDE_IN_TOP", t.SLIDE_IN_BOTTOM = "SLIDE_IN_BOTTOM", t.SLIDE_OUT_LEFT = "SLIDE_OUT_LEFT", t.SLIDE_OUT_RIGHT = "SLIDE_OUT_RIGHT", t.SLIDE_OUT_TOP = "SLIDE_OUT_TOP", t.SLIDE_OUT_BOTTOM = "SLIDE_OUT_BOTTOM", t.ZOOM_IN = "ZOOM_IN", t.ZOOM_OUT = "ZOOM_OUT", t.ZOOM_IN_OUT = "ZOOM_IN_OUT", t.BOUNCE_IN = "BOUNCE_IN", t.BOUNCE_OUT = "BOUNCE_OUT", t.BOUNCE_IN_OUT = "BOUNCE_IN_OUT", t.BOUNCE_IN_DOWN = "BOUNCE_IN_DOWN", t.BOUNCE_IN_LEFT = "BOUNCE_IN_LEFT", t.BOUNCE_IN_RIGHT = "BOUNCE_IN_RIGHT", t.BOUNCE_IN_UP = "BOUNCE_IN_UP", t.BOUNCE_OUT_DOWN = "BOUNCE_OUT_DOWN", t.BOUNCE_OUT_LEFT = "BOUNCE_OUT_LEFT", t.BOUNCE_OUT_RIGHT = "BOUNCE_OUT_RIGHT", t.BOUNCE_OUT_UP = "BOUNCE_OUT_UP", t.FADE_IN_DOWN = "FADE_IN_DOWN", t.FADE_IN_LEFT = "FADE_IN_LEFT", t.FADE_IN_RIGHT = "FADE_IN_RIGHT", t.FADE_IN_UP = "FADE_IN_UP", t.FADE_OUT_DOWN = "FADE_OUT_DOWN", t.FADE_OUT_LEFT = "FADE_OUT_LEFT", t.FADE_OUT_RIGHT = "FADE_OUT_RIGHT", t.FADE_OUT_UP = "FADE_OUT_UP", t.ELASTIC_IN = "ELASTIC_IN", t.ELASTIC_OUT = "ELASTIC_OUT", t.ELASTIC_IN_OUT = "ELASTIC_IN_OUT", t.BACK_IN = "BACK_IN", t.BACK_OUT = "BACK_OUT", t.BACK_IN_OUT = "BACK_IN_OUT", t.CIRCULAR_IN = "CIRCULAR_IN", t.CIRCULAR_OUT = "CIRCULAR_OUT", t.CIRCULAR_IN_OUT = "CIRCULAR_IN_OUT", t.EXPO_IN = "EXPO_IN", t.EXPO_OUT = "EXPO_OUT", t.EXPO_IN_OUT = "EXPO_IN_OUT", t.SINE_IN = "SINE_IN", t.SINE_OUT = "SINE_OUT", t.SINE_IN_OUT = "SINE_IN_OUT", t.BOUNCE = "BOUNCE", t.ELASTIC = "ELASTIC", t.BACK = "BACK", t.CIRCULAR = "CIRCULAR", t.EXPO = "EXPO", t.SINE = "SINE", t))(Xu || {});
|
|
1590
1590
|
const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.forwardRef((t, e) => {
|
|
1591
|
-
const [r, i] = k.useState(!1), [n, s] = Kt(!1), [a, o] = Kt(!1), [u, h] = Kt(),
|
|
1591
|
+
const [r, i] = k.useState(!1), [n, s] = Kt(!1), [a, o] = Kt(!1), [u, h] = Kt(), f = xv(u, 300), l = z(null), c = z(null), d = z(null), p = z(null), m = z(null), v = z(null), { tl: g } = kr(ir), y = wn(), _ = y.screen.width, x = y.screen.height, {
|
|
1592
1592
|
uniqueId: b,
|
|
1593
1593
|
visible: T,
|
|
1594
1594
|
startAt: w,
|
|
@@ -1608,7 +1608,7 @@ const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.
|
|
|
1608
1608
|
pointerdown: X,
|
|
1609
1609
|
pointerout: P,
|
|
1610
1610
|
pointerover: F,
|
|
1611
|
-
isText:
|
|
1611
|
+
isText: j,
|
|
1612
1612
|
isDragging: V,
|
|
1613
1613
|
isGif: W,
|
|
1614
1614
|
onDoubleClick: re,
|
|
@@ -1639,8 +1639,8 @@ const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.
|
|
|
1639
1639
|
if (!c.current)
|
|
1640
1640
|
return;
|
|
1641
1641
|
const Y = N.context(() => {
|
|
1642
|
-
if (g.current &&
|
|
1643
|
-
const { x: fe, y: Oe, animation: Ne, maxX: Je, maxY: Z } =
|
|
1642
|
+
if (g.current && f) {
|
|
1643
|
+
const { x: fe, y: Oe, animation: Ne, maxX: Je, maxY: Z } = f || {}, le = g.current.progress(), Ee = oe.updateEffect(
|
|
1644
1644
|
l.current,
|
|
1645
1645
|
Ne,
|
|
1646
1646
|
{
|
|
@@ -1661,7 +1661,7 @@ const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.
|
|
|
1661
1661
|
return () => {
|
|
1662
1662
|
Y.revert();
|
|
1663
1663
|
};
|
|
1664
|
-
}, [w,
|
|
1664
|
+
}, [w, f]);
|
|
1665
1665
|
const pe = k.useCallback(() => {
|
|
1666
1666
|
o(!0), F && F();
|
|
1667
1667
|
}, []), he = k.useCallback(() => {
|
|
@@ -1705,10 +1705,10 @@ const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.
|
|
|
1705
1705
|
// @ts-ignore
|
|
1706
1706
|
matrix: u_
|
|
1707
1707
|
},
|
|
1708
|
-
children: /* @__PURE__ */ K.jsx(Ae, { ref:
|
|
1708
|
+
children: /* @__PURE__ */ K.jsx(Ae, { ref: d, children: t.children })
|
|
1709
1709
|
}
|
|
1710
1710
|
),
|
|
1711
|
-
W && /* @__PURE__ */ K.jsx(Ae, { ref:
|
|
1711
|
+
W && /* @__PURE__ */ K.jsx(Ae, { ref: d, children: t.children }),
|
|
1712
1712
|
!Cr(L) && L !== Bs.NONE && L !== Bs.NORMAL && /* @__PURE__ */ K.jsx(
|
|
1713
1713
|
kv,
|
|
1714
1714
|
{
|
|
@@ -1732,13 +1732,13 @@ const u_ = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], nr = k.
|
|
|
1732
1732
|
transformChange: he,
|
|
1733
1733
|
mouseoverEvent: pe,
|
|
1734
1734
|
uniqueId: b,
|
|
1735
|
-
isText:
|
|
1735
|
+
isText: j,
|
|
1736
1736
|
onDoubleClick: re
|
|
1737
1737
|
}
|
|
1738
1738
|
)
|
|
1739
1739
|
] });
|
|
1740
1740
|
});
|
|
1741
|
-
var sr = /* @__PURE__ */ ((t) => (t[t.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t[t.WEBGL = 1] = "WEBGL", t[t.WEBGL2 = 2] = "WEBGL2", t))(sr || {}), Wu = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.WEBGL = 1] = "WEBGL", t[t.CANVAS = 2] = "CANVAS", t))(Wu || {}), Gs = /* @__PURE__ */ ((t) => (t[t.COLOR = 16384] = "COLOR", t[t.DEPTH = 256] = "DEPTH", t[t.STENCIL = 1024] = "STENCIL", t))(Gs || {}),
|
|
1741
|
+
var sr = /* @__PURE__ */ ((t) => (t[t.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t[t.WEBGL = 1] = "WEBGL", t[t.WEBGL2 = 2] = "WEBGL2", t))(sr || {}), Wu = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.WEBGL = 1] = "WEBGL", t[t.CANVAS = 2] = "CANVAS", t))(Wu || {}), Gs = /* @__PURE__ */ ((t) => (t[t.COLOR = 16384] = "COLOR", t[t.DEPTH = 256] = "DEPTH", t[t.STENCIL = 1024] = "STENCIL", t))(Gs || {}), H = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ADD = 1] = "ADD", t[t.MULTIPLY = 2] = "MULTIPLY", t[t.SCREEN = 3] = "SCREEN", t[t.OVERLAY = 4] = "OVERLAY", t[t.DARKEN = 5] = "DARKEN", t[t.LIGHTEN = 6] = "LIGHTEN", t[t.COLOR_DODGE = 7] = "COLOR_DODGE", t[t.COLOR_BURN = 8] = "COLOR_BURN", t[t.HARD_LIGHT = 9] = "HARD_LIGHT", t[t.SOFT_LIGHT = 10] = "SOFT_LIGHT", t[t.DIFFERENCE = 11] = "DIFFERENCE", t[t.EXCLUSION = 12] = "EXCLUSION", t[t.HUE = 13] = "HUE", t[t.SATURATION = 14] = "SATURATION", t[t.COLOR = 15] = "COLOR", t[t.LUMINOSITY = 16] = "LUMINOSITY", t[t.NORMAL_NPM = 17] = "NORMAL_NPM", t[t.ADD_NPM = 18] = "ADD_NPM", t[t.SCREEN_NPM = 19] = "SCREEN_NPM", t[t.NONE = 20] = "NONE", t[t.SRC_OVER = 0] = "SRC_OVER", t[t.SRC_IN = 21] = "SRC_IN", t[t.SRC_OUT = 22] = "SRC_OUT", t[t.SRC_ATOP = 23] = "SRC_ATOP", t[t.DST_OVER = 24] = "DST_OVER", t[t.DST_IN = 25] = "DST_IN", t[t.DST_OUT = 26] = "DST_OUT", t[t.DST_ATOP = 27] = "DST_ATOP", t[t.ERASE = 26] = "ERASE", t[t.SUBTRACT = 28] = "SUBTRACT", t[t.XOR = 29] = "XOR", t))(H || {}), Mt = /* @__PURE__ */ ((t) => (t[t.POINTS = 0] = "POINTS", t[t.LINES = 1] = "LINES", t[t.LINE_LOOP = 2] = "LINE_LOOP", t[t.LINE_STRIP = 3] = "LINE_STRIP", t[t.TRIANGLES = 4] = "TRIANGLES", t[t.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", t[t.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", t))(Mt || {}), O = /* @__PURE__ */ ((t) => (t[t.RGBA = 6408] = "RGBA", t[t.RGB = 6407] = "RGB", t[t.RG = 33319] = "RG", t[t.RED = 6403] = "RED", t[t.RGBA_INTEGER = 36249] = "RGBA_INTEGER", t[t.RGB_INTEGER = 36248] = "RGB_INTEGER", t[t.RG_INTEGER = 33320] = "RG_INTEGER", t[t.RED_INTEGER = 36244] = "RED_INTEGER", t[t.ALPHA = 6406] = "ALPHA", t[t.LUMINANCE = 6409] = "LUMINANCE", t[t.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", t[t.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", t[t.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", t))(O || {}), Tr = /* @__PURE__ */ ((t) => (t[t.TEXTURE_2D = 3553] = "TEXTURE_2D", t[t.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", t[t.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", t[t.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", t[t.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", t[t.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", t[t.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", t))(Tr || {}), se = /* @__PURE__ */ ((t) => (t[t.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", t[t.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", t[t.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", t[t.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", t[t.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", t[t.UNSIGNED_INT = 5125] = "UNSIGNED_INT", t[t.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", t[t.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", t[t.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", t[t.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", t[t.BYTE = 5120] = "BYTE", t[t.SHORT = 5122] = "SHORT", t[t.INT = 5124] = "INT", t[t.FLOAT = 5126] = "FLOAT", t[t.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", t[t.HALF_FLOAT = 36193] = "HALF_FLOAT", t))(se || {}), zs = /* @__PURE__ */ ((t) => (t[t.FLOAT = 0] = "FLOAT", t[t.INT = 1] = "INT", t[t.UINT = 2] = "UINT", t))(zs || {}), mt = /* @__PURE__ */ ((t) => (t[t.NEAREST = 0] = "NEAREST", t[t.LINEAR = 1] = "LINEAR", t))(mt || {}), ci = /* @__PURE__ */ ((t) => (t[t.CLAMP = 33071] = "CLAMP", t[t.REPEAT = 10497] = "REPEAT", t[t.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", t))(ci || {}), er = /* @__PURE__ */ ((t) => (t[t.OFF = 0] = "OFF", t[t.POW2 = 1] = "POW2", t[t.ON = 2] = "ON", t[t.ON_MANUAL = 3] = "ON_MANUAL", t))(er || {}), kt = /* @__PURE__ */ ((t) => (t[t.NPM = 0] = "NPM", t[t.UNPACK = 1] = "UNPACK", t[t.PMA = 2] = "PMA", t[t.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", t[t.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", t[t.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", t))(kt || {}), Gt = /* @__PURE__ */ ((t) => (t[t.NO = 0] = "NO", t[t.YES = 1] = "YES", t[t.AUTO = 2] = "AUTO", t[t.BLEND = 0] = "BLEND", t[t.CLEAR = 1] = "CLEAR", t[t.BLIT = 2] = "BLIT", t))(Gt || {}), Ia = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.MANUAL = 1] = "MANUAL", t))(Ia || {}), Ze = /* @__PURE__ */ ((t) => (t.LOW = "lowp", t.MEDIUM = "mediump", t.HIGH = "highp", t))(Ze || {}), Se = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.SCISSOR = 1] = "SCISSOR", t[t.STENCIL = 2] = "STENCIL", t[t.SPRITE = 3] = "SPRITE", t[t.COLOR = 4] = "COLOR", t))(Se || {}), we = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.LOW = 2] = "LOW", t[t.MEDIUM = 4] = "MEDIUM", t[t.HIGH = 8] = "HIGH", t))(we || {}), gt = /* @__PURE__ */ ((t) => (t[t.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", t[t.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", t[t.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER", t))(gt || {});
|
|
1742
1742
|
const c_ = {
|
|
1743
1743
|
createCanvas: (t, e) => {
|
|
1744
1744
|
const r = document.createElement("canvas");
|
|
@@ -1828,14 +1828,14 @@ var qu = { exports: {} };
|
|
|
1828
1828
|
function i() {
|
|
1829
1829
|
}
|
|
1830
1830
|
Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (r = !1));
|
|
1831
|
-
function n(u, h,
|
|
1832
|
-
this.fn = u, this.context = h, this.once =
|
|
1831
|
+
function n(u, h, f) {
|
|
1832
|
+
this.fn = u, this.context = h, this.once = f || !1;
|
|
1833
1833
|
}
|
|
1834
|
-
function s(u, h,
|
|
1835
|
-
if (typeof
|
|
1834
|
+
function s(u, h, f, l, c) {
|
|
1835
|
+
if (typeof f != "function")
|
|
1836
1836
|
throw new TypeError("The listener must be a function");
|
|
1837
|
-
var
|
|
1838
|
-
return u._events[p] ? u._events[p].fn ? u._events[p] = [u._events[p],
|
|
1837
|
+
var d = new n(f, l || u, c), p = r ? r + h : h;
|
|
1838
|
+
return u._events[p] ? u._events[p].fn ? u._events[p] = [u._events[p], d] : u._events[p].push(d) : (u._events[p] = d, u._eventsCount++), u;
|
|
1839
1839
|
}
|
|
1840
1840
|
function a(u, h) {
|
|
1841
1841
|
--u._eventsCount === 0 ? u._events = new i() : delete u._events[h];
|
|
@@ -1844,25 +1844,25 @@ var qu = { exports: {} };
|
|
|
1844
1844
|
this._events = new i(), this._eventsCount = 0;
|
|
1845
1845
|
}
|
|
1846
1846
|
o.prototype.eventNames = function() {
|
|
1847
|
-
var h = [],
|
|
1847
|
+
var h = [], f, l;
|
|
1848
1848
|
if (this._eventsCount === 0)
|
|
1849
1849
|
return h;
|
|
1850
|
-
for (l in
|
|
1851
|
-
e.call(
|
|
1852
|
-
return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(
|
|
1850
|
+
for (l in f = this._events)
|
|
1851
|
+
e.call(f, l) && h.push(r ? l.slice(1) : l);
|
|
1852
|
+
return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(f)) : h;
|
|
1853
1853
|
}, o.prototype.listeners = function(h) {
|
|
1854
|
-
var
|
|
1854
|
+
var f = r ? r + h : h, l = this._events[f];
|
|
1855
1855
|
if (!l)
|
|
1856
1856
|
return [];
|
|
1857
1857
|
if (l.fn)
|
|
1858
1858
|
return [l.fn];
|
|
1859
|
-
for (var c = 0,
|
|
1859
|
+
for (var c = 0, d = l.length, p = new Array(d); c < d; c++)
|
|
1860
1860
|
p[c] = l[c].fn;
|
|
1861
1861
|
return p;
|
|
1862
1862
|
}, o.prototype.listenerCount = function(h) {
|
|
1863
|
-
var
|
|
1863
|
+
var f = r ? r + h : h, l = this._events[f];
|
|
1864
1864
|
return l ? l.fn ? 1 : l.length : 0;
|
|
1865
|
-
}, o.prototype.emit = function(h,
|
|
1865
|
+
}, o.prototype.emit = function(h, f, l, c, d, p) {
|
|
1866
1866
|
var m = r ? r + h : h;
|
|
1867
1867
|
if (!this._events[m])
|
|
1868
1868
|
return !1;
|
|
@@ -1872,15 +1872,15 @@ var qu = { exports: {} };
|
|
|
1872
1872
|
case 1:
|
|
1873
1873
|
return v.fn.call(v.context), !0;
|
|
1874
1874
|
case 2:
|
|
1875
|
-
return v.fn.call(v.context,
|
|
1875
|
+
return v.fn.call(v.context, f), !0;
|
|
1876
1876
|
case 3:
|
|
1877
|
-
return v.fn.call(v.context,
|
|
1877
|
+
return v.fn.call(v.context, f, l), !0;
|
|
1878
1878
|
case 4:
|
|
1879
|
-
return v.fn.call(v.context,
|
|
1879
|
+
return v.fn.call(v.context, f, l, c), !0;
|
|
1880
1880
|
case 5:
|
|
1881
|
-
return v.fn.call(v.context,
|
|
1881
|
+
return v.fn.call(v.context, f, l, c, d), !0;
|
|
1882
1882
|
case 6:
|
|
1883
|
-
return v.fn.call(v.context,
|
|
1883
|
+
return v.fn.call(v.context, f, l, c, d, p), !0;
|
|
1884
1884
|
}
|
|
1885
1885
|
for (_ = 1, y = new Array(g - 1); _ < g; _++)
|
|
1886
1886
|
y[_ - 1] = arguments[_];
|
|
@@ -1893,13 +1893,13 @@ var qu = { exports: {} };
|
|
|
1893
1893
|
v[_].fn.call(v[_].context);
|
|
1894
1894
|
break;
|
|
1895
1895
|
case 2:
|
|
1896
|
-
v[_].fn.call(v[_].context,
|
|
1896
|
+
v[_].fn.call(v[_].context, f);
|
|
1897
1897
|
break;
|
|
1898
1898
|
case 3:
|
|
1899
|
-
v[_].fn.call(v[_].context,
|
|
1899
|
+
v[_].fn.call(v[_].context, f, l);
|
|
1900
1900
|
break;
|
|
1901
1901
|
case 4:
|
|
1902
|
-
v[_].fn.call(v[_].context,
|
|
1902
|
+
v[_].fn.call(v[_].context, f, l, c);
|
|
1903
1903
|
break;
|
|
1904
1904
|
default:
|
|
1905
1905
|
if (!y)
|
|
@@ -1909,28 +1909,28 @@ var qu = { exports: {} };
|
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
1911
|
return !0;
|
|
1912
|
-
}, o.prototype.on = function(h,
|
|
1913
|
-
return s(this, h,
|
|
1914
|
-
}, o.prototype.once = function(h,
|
|
1915
|
-
return s(this, h,
|
|
1916
|
-
}, o.prototype.removeListener = function(h,
|
|
1917
|
-
var
|
|
1918
|
-
if (!this._events[
|
|
1912
|
+
}, o.prototype.on = function(h, f, l) {
|
|
1913
|
+
return s(this, h, f, l, !1);
|
|
1914
|
+
}, o.prototype.once = function(h, f, l) {
|
|
1915
|
+
return s(this, h, f, l, !0);
|
|
1916
|
+
}, o.prototype.removeListener = function(h, f, l, c) {
|
|
1917
|
+
var d = r ? r + h : h;
|
|
1918
|
+
if (!this._events[d])
|
|
1919
1919
|
return this;
|
|
1920
|
-
if (!
|
|
1921
|
-
return a(this,
|
|
1922
|
-
var p = this._events[
|
|
1920
|
+
if (!f)
|
|
1921
|
+
return a(this, d), this;
|
|
1922
|
+
var p = this._events[d];
|
|
1923
1923
|
if (p.fn)
|
|
1924
|
-
p.fn ===
|
|
1924
|
+
p.fn === f && (!c || p.once) && (!l || p.context === l) && a(this, d);
|
|
1925
1925
|
else {
|
|
1926
1926
|
for (var m = 0, v = [], g = p.length; m < g; m++)
|
|
1927
|
-
(p[m].fn !==
|
|
1928
|
-
v.length ? this._events[
|
|
1927
|
+
(p[m].fn !== f || c && !p[m].once || l && p[m].context !== l) && v.push(p[m]);
|
|
1928
|
+
v.length ? this._events[d] = v.length === 1 ? v[0] : v : a(this, d);
|
|
1929
1929
|
}
|
|
1930
1930
|
return this;
|
|
1931
1931
|
}, o.prototype.removeAllListeners = function(h) {
|
|
1932
|
-
var
|
|
1933
|
-
return h ? (
|
|
1932
|
+
var f;
|
|
1933
|
+
return h ? (f = r ? r + h : h, this._events[f] && a(this, f)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
1934
1934
|
}, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = r, o.EventEmitter = o, t.exports = o;
|
|
1935
1935
|
})(qu);
|
|
1936
1936
|
var d_ = qu.exports;
|
|
@@ -1943,14 +1943,14 @@ function On(t, e, r) {
|
|
|
1943
1943
|
var i = e && e.length, n = i ? e[0] * r : t.length, s = Yu(t, 0, n, r, !0), a = [];
|
|
1944
1944
|
if (!s || s.next === s.prev)
|
|
1945
1945
|
return a;
|
|
1946
|
-
var o, u, h,
|
|
1946
|
+
var o, u, h, f, l, c, d;
|
|
1947
1947
|
if (i && (s = __(t, e, s, r)), t.length > 80 * r) {
|
|
1948
|
-
o = h = t[0], u =
|
|
1948
|
+
o = h = t[0], u = f = t[1];
|
|
1949
1949
|
for (var p = r; p < n; p += r)
|
|
1950
|
-
l = t[p], c = t[p + 1], l < o && (o = l), c < u && (u = c), l > h && (h = l), c >
|
|
1951
|
-
|
|
1950
|
+
l = t[p], c = t[p + 1], l < o && (o = l), c < u && (u = c), l > h && (h = l), c > f && (f = c);
|
|
1951
|
+
d = Math.max(h - o, f - u), d = d !== 0 ? 32767 / d : 0;
|
|
1952
1952
|
}
|
|
1953
|
-
return hi(s, a, r, o, u,
|
|
1953
|
+
return hi(s, a, r, o, u, d, 0), a;
|
|
1954
1954
|
}
|
|
1955
1955
|
function Yu(t, e, r, i, n) {
|
|
1956
1956
|
var s, a;
|
|
@@ -1996,8 +1996,8 @@ function p_(t) {
|
|
|
1996
1996
|
var e = t.prev, r = t, i = t.next;
|
|
1997
1997
|
if (xe(e, r, i) >= 0)
|
|
1998
1998
|
return !1;
|
|
1999
|
-
for (var n = e.x, s = r.x, a = i.x, o = e.y, u = r.y, h = i.y,
|
|
2000
|
-
if (p.x >=
|
|
1999
|
+
for (var n = e.x, s = r.x, a = i.x, o = e.y, u = r.y, h = i.y, f = n < s ? n < a ? n : a : s < a ? s : a, l = o < u ? o < h ? o : h : u < h ? u : h, c = n > s ? n > a ? n : a : s > a ? s : a, d = o > u ? o > h ? o : h : u > h ? u : h, p = i.next; p !== e; ) {
|
|
2000
|
+
if (p.x >= f && p.x <= c && p.y >= l && p.y <= d && xr(n, o, s, u, a, h, p.x, p.y) && xe(p.prev, p, p.next) >= 0)
|
|
2001
2001
|
return !1;
|
|
2002
2002
|
p = p.next;
|
|
2003
2003
|
}
|
|
@@ -2007,18 +2007,18 @@ function m_(t, e, r, i) {
|
|
|
2007
2007
|
var n = t.prev, s = t, a = t.next;
|
|
2008
2008
|
if (xe(n, s, a) >= 0)
|
|
2009
2009
|
return !1;
|
|
2010
|
-
for (var o = n.x, u = s.x, h = a.x,
|
|
2011
|
-
if (_.x >=
|
|
2010
|
+
for (var o = n.x, u = s.x, h = a.x, f = n.y, l = s.y, c = a.y, d = o < u ? o < h ? o : h : u < h ? u : h, p = f < l ? f < c ? f : c : l < c ? l : c, m = o > u ? o > h ? o : h : u > h ? u : h, v = f > l ? f > c ? f : c : l > c ? l : c, g = js(d, p, e, r, i), y = js(m, v, e, r, i), _ = t.prevZ, x = t.nextZ; _ && _.z >= g && x && x.z <= y; ) {
|
|
2011
|
+
if (_.x >= d && _.x <= m && _.y >= p && _.y <= v && _ !== n && _ !== a && xr(o, f, u, l, h, c, _.x, _.y) && xe(_.prev, _, _.next) >= 0 || (_ = _.prevZ, x.x >= d && x.x <= m && x.y >= p && x.y <= v && x !== n && x !== a && xr(o, f, u, l, h, c, x.x, x.y) && xe(x.prev, x, x.next) >= 0))
|
|
2012
2012
|
return !1;
|
|
2013
2013
|
x = x.nextZ;
|
|
2014
2014
|
}
|
|
2015
2015
|
for (; _ && _.z >= g; ) {
|
|
2016
|
-
if (_.x >=
|
|
2016
|
+
if (_.x >= d && _.x <= m && _.y >= p && _.y <= v && _ !== n && _ !== a && xr(o, f, u, l, h, c, _.x, _.y) && xe(_.prev, _, _.next) >= 0)
|
|
2017
2017
|
return !1;
|
|
2018
2018
|
_ = _.prevZ;
|
|
2019
2019
|
}
|
|
2020
2020
|
for (; x && x.z <= y; ) {
|
|
2021
|
-
if (x.x >=
|
|
2021
|
+
if (x.x >= d && x.x <= m && x.y >= p && x.y <= v && x !== n && x !== a && xr(o, f, u, l, h, c, x.x, x.y) && xe(x.prev, x, x.next) >= 0)
|
|
2022
2022
|
return !1;
|
|
2023
2023
|
x = x.nextZ;
|
|
2024
2024
|
}
|
|
@@ -2076,10 +2076,10 @@ function b_(t, e) {
|
|
|
2076
2076
|
} while (r !== e);
|
|
2077
2077
|
if (!a)
|
|
2078
2078
|
return null;
|
|
2079
|
-
var u = a, h = a.x,
|
|
2079
|
+
var u = a, h = a.x, f = a.y, l = 1 / 0, c;
|
|
2080
2080
|
r = a;
|
|
2081
2081
|
do
|
|
2082
|
-
i >= r.x && r.x >= h && i !== r.x && xr(n <
|
|
2082
|
+
i >= r.x && r.x >= h && i !== r.x && xr(n < f ? i : s, n, h, f, n < f ? s : i, n, r.x, r.y) && (c = Math.abs(n - r.y) / (i - r.x), fi(r, t) && (c < l || c === l && (r.x > a.x || r.x === a.x && T_(a, r))) && (a = r, l = c)), r = r.next;
|
|
2083
2083
|
while (r !== u);
|
|
2084
2084
|
return a;
|
|
2085
2085
|
}
|
|
@@ -2179,14 +2179,14 @@ On.deviation = function(t, e, r, i) {
|
|
|
2179
2179
|
var n = e && e.length, s = n ? e[0] * r : t.length, a = Math.abs(Vs(t, 0, s, r));
|
|
2180
2180
|
if (n)
|
|
2181
2181
|
for (var o = 0, u = e.length; o < u; o++) {
|
|
2182
|
-
var h = e[o] * r,
|
|
2183
|
-
a -= Math.abs(Vs(t, h,
|
|
2182
|
+
var h = e[o] * r, f = o < u - 1 ? e[o + 1] * r : t.length;
|
|
2183
|
+
a -= Math.abs(Vs(t, h, f, r));
|
|
2184
2184
|
}
|
|
2185
2185
|
var l = 0;
|
|
2186
2186
|
for (o = 0; o < i.length; o += 3) {
|
|
2187
|
-
var c = i[o] * r,
|
|
2187
|
+
var c = i[o] * r, d = i[o + 1] * r, p = i[o + 2] * r;
|
|
2188
2188
|
l += Math.abs(
|
|
2189
|
-
(t[c] - t[p]) * (t[
|
|
2189
|
+
(t[c] - t[p]) * (t[d + 1] - t[c + 1]) - (t[c] - t[d]) * (t[p + 1] - t[c + 1])
|
|
2190
2190
|
);
|
|
2191
2191
|
}
|
|
2192
2192
|
return a === 0 && l === 0 ? 0 : Math.abs((l - a) / a);
|
|
@@ -2214,7 +2214,7 @@ fn.exports;
|
|
|
2214
2214
|
(function(r) {
|
|
2215
2215
|
var i = e && !e.nodeType && e, n = t && !t.nodeType && t, s = typeof Ye == "object" && Ye;
|
|
2216
2216
|
(s.global === s || s.window === s || s.self === s) && (r = s);
|
|
2217
|
-
var a, o = 2147483647, u = 36, h = 1,
|
|
2217
|
+
var a, o = 2147483647, u = 36, h = 1, f = 26, l = 38, c = 700, d = 72, p = 128, m = "-", v = /^xn--/, g = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, _ = {
|
|
2218
2218
|
overflow: "Overflow: input needs wider integers to process",
|
|
2219
2219
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2220
2220
|
"invalid-input": "Invalid input"
|
|
@@ -2223,25 +2223,25 @@ fn.exports;
|
|
|
2223
2223
|
throw new RangeError(_[P]);
|
|
2224
2224
|
}
|
|
2225
2225
|
function A(P, F) {
|
|
2226
|
-
for (var
|
|
2227
|
-
V[
|
|
2226
|
+
for (var j = P.length, V = []; j--; )
|
|
2227
|
+
V[j] = F(P[j]);
|
|
2228
2228
|
return V;
|
|
2229
2229
|
}
|
|
2230
2230
|
function C(P, F) {
|
|
2231
|
-
var
|
|
2232
|
-
|
|
2231
|
+
var j = P.split("@"), V = "";
|
|
2232
|
+
j.length > 1 && (V = j[0] + "@", P = j[1]), P = P.replace(y, ".");
|
|
2233
2233
|
var W = P.split("."), re = A(W, F).join(".");
|
|
2234
2234
|
return V + re;
|
|
2235
2235
|
}
|
|
2236
2236
|
function M(P) {
|
|
2237
|
-
for (var F = [],
|
|
2238
|
-
W = P.charCodeAt(
|
|
2237
|
+
for (var F = [], j = 0, V = P.length, W, re; j < V; )
|
|
2238
|
+
W = P.charCodeAt(j++), W >= 55296 && W <= 56319 && j < V ? (re = P.charCodeAt(j++), (re & 64512) == 56320 ? F.push(((W & 1023) << 10) + (re & 1023) + 65536) : (F.push(W), j--)) : F.push(W);
|
|
2239
2239
|
return F;
|
|
2240
2240
|
}
|
|
2241
2241
|
function G(P) {
|
|
2242
2242
|
return A(P, function(F) {
|
|
2243
|
-
var
|
|
2244
|
-
return F > 65535 && (F -= 65536,
|
|
2243
|
+
var j = "";
|
|
2244
|
+
return F > 65535 && (F -= 65536, j += T(F >>> 10 & 1023 | 55296), F = 56320 | F & 1023), j += T(F), j;
|
|
2245
2245
|
}).join("");
|
|
2246
2246
|
}
|
|
2247
2247
|
function I(P) {
|
|
@@ -2250,39 +2250,39 @@ fn.exports;
|
|
|
2250
2250
|
function E(P, F) {
|
|
2251
2251
|
return P + 22 + 75 * (P < 26) - ((F != 0) << 5);
|
|
2252
2252
|
}
|
|
2253
|
-
function L(P, F,
|
|
2253
|
+
function L(P, F, j) {
|
|
2254
2254
|
var V = 0;
|
|
2255
|
-
for (P =
|
|
2255
|
+
for (P = j ? b(P / c) : P >> 1, P += b(P / F); P > x * f >> 1; V += u)
|
|
2256
2256
|
P = b(P / x);
|
|
2257
2257
|
return b(V + (x + 1) * P / (P + l));
|
|
2258
2258
|
}
|
|
2259
2259
|
function B(P) {
|
|
2260
|
-
var F = [],
|
|
2260
|
+
var F = [], j = P.length, V, W = 0, re = p, ne = d, oe, pe, he, $, q, Y, fe, Oe, Ne;
|
|
2261
2261
|
for (oe = P.lastIndexOf(m), oe < 0 && (oe = 0), pe = 0; pe < oe; ++pe)
|
|
2262
2262
|
P.charCodeAt(pe) >= 128 && S("not-basic"), F.push(P.charCodeAt(pe));
|
|
2263
|
-
for (he = oe > 0 ? oe + 1 : 0; he <
|
|
2264
|
-
for ($ = W, q = 1, Y = u; he >=
|
|
2263
|
+
for (he = oe > 0 ? oe + 1 : 0; he < j; ) {
|
|
2264
|
+
for ($ = W, q = 1, Y = u; he >= j && S("invalid-input"), fe = I(P.charCodeAt(he++)), (fe >= u || fe > b((o - W) / q)) && S("overflow"), W += fe * q, Oe = Y <= ne ? h : Y >= ne + f ? f : Y - ne, !(fe < Oe); Y += u)
|
|
2265
2265
|
Ne = u - Oe, q > b(o / Ne) && S("overflow"), q *= Ne;
|
|
2266
2266
|
V = F.length + 1, ne = L(W - $, V, $ == 0), b(W / V) > o - re && S("overflow"), re += b(W / V), W %= V, F.splice(W++, 0, re);
|
|
2267
2267
|
}
|
|
2268
2268
|
return G(F);
|
|
2269
2269
|
}
|
|
2270
2270
|
function R(P) {
|
|
2271
|
-
var F,
|
|
2272
|
-
for (P = M(P), fe = P.length, F = p,
|
|
2271
|
+
var F, j, V, W, re, ne, oe, pe, he, $, q, Y = [], fe, Oe, Ne, Je;
|
|
2272
|
+
for (P = M(P), fe = P.length, F = p, j = 0, re = d, ne = 0; ne < fe; ++ne)
|
|
2273
2273
|
q = P[ne], q < 128 && Y.push(T(q));
|
|
2274
2274
|
for (V = W = Y.length, W && Y.push(m); V < fe; ) {
|
|
2275
2275
|
for (oe = o, ne = 0; ne < fe; ++ne)
|
|
2276
2276
|
q = P[ne], q >= F && q < oe && (oe = q);
|
|
2277
|
-
for (Oe = V + 1, oe - F > b((o -
|
|
2278
|
-
if (q = P[ne], q < F && ++
|
|
2279
|
-
for (pe =
|
|
2277
|
+
for (Oe = V + 1, oe - F > b((o - j) / Oe) && S("overflow"), j += (oe - F) * Oe, F = oe, ne = 0; ne < fe; ++ne)
|
|
2278
|
+
if (q = P[ne], q < F && ++j > o && S("overflow"), q == F) {
|
|
2279
|
+
for (pe = j, he = u; $ = he <= re ? h : he >= re + f ? f : he - re, !(pe < $); he += u)
|
|
2280
2280
|
Je = pe - $, Ne = u - $, Y.push(
|
|
2281
2281
|
T(E($ + Je % Ne, 0))
|
|
2282
2282
|
), pe = b(Je / Ne);
|
|
2283
|
-
Y.push(T(E(pe, 0))), re = L(
|
|
2283
|
+
Y.push(T(E(pe, 0))), re = L(j, Oe, V == W), j = 0, ++V;
|
|
2284
2284
|
}
|
|
2285
|
-
++
|
|
2285
|
+
++j, ++F;
|
|
2286
2286
|
}
|
|
2287
2287
|
return Y.join("");
|
|
2288
2288
|
}
|
|
@@ -2363,11 +2363,11 @@ var M_ = fn.exports, F_ = function() {
|
|
|
2363
2363
|
throw new TypeError(D_ + r);
|
|
2364
2364
|
for (var i = ts.call(arguments, 1), n, s = function() {
|
|
2365
2365
|
if (this instanceof n) {
|
|
2366
|
-
var
|
|
2366
|
+
var f = r.apply(
|
|
2367
2367
|
this,
|
|
2368
2368
|
i.concat(ts.call(arguments))
|
|
2369
2369
|
);
|
|
2370
|
-
return Object(
|
|
2370
|
+
return Object(f) === f ? f : this;
|
|
2371
2371
|
} else
|
|
2372
2372
|
return r.apply(
|
|
2373
2373
|
e,
|
|
@@ -2583,9 +2583,9 @@ var q_ = function t(e) {
|
|
|
2583
2583
|
throw new Ir("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2584
2584
|
var i = ey(e), n = i.length > 0 ? i[0] : "", s = ty("%" + n + "%", r), a = s.name, o = s.value, u = !1, h = s.alias;
|
|
2585
2585
|
h && (n = h[0], K_(i, Y_([0, 1], h)));
|
|
2586
|
-
for (var
|
|
2587
|
-
var c = i[
|
|
2588
|
-
if ((
|
|
2586
|
+
for (var f = 1, l = !0; f < i.length; f += 1) {
|
|
2587
|
+
var c = i[f], d = pn(c, 0, 1), p = pn(c, -1);
|
|
2588
|
+
if ((d === '"' || d === "'" || d === "`" || p === '"' || p === "'" || p === "`") && d !== p)
|
|
2589
2589
|
throw new Ir("property names with quotes must have matching quotes");
|
|
2590
2590
|
if ((c === "constructor" || !l) && (u = !0), n += "." + c, a = "%" + n + "%", dn(Qt, a))
|
|
2591
2591
|
o = Qt[a];
|
|
@@ -2595,7 +2595,7 @@ var q_ = function t(e) {
|
|
|
2595
2595
|
throw new wr("base intrinsic for " + e + " exists, but the property is not available.");
|
|
2596
2596
|
return;
|
|
2597
2597
|
}
|
|
2598
|
-
if (Zt &&
|
|
2598
|
+
if (Zt && f + 1 >= i.length) {
|
|
2599
2599
|
var m = Zt(o, c);
|
|
2600
2600
|
l = !!m, l && "get" in m && !("originalValue" in m.get) ? o = m.get : o = o[c];
|
|
2601
2601
|
} else
|
|
@@ -2616,8 +2616,8 @@ var q_ = function t(e) {
|
|
|
2616
2616
|
t.exports = function(l) {
|
|
2617
2617
|
var c = s(e, n, arguments);
|
|
2618
2618
|
if (a && o) {
|
|
2619
|
-
var
|
|
2620
|
-
|
|
2619
|
+
var d = a(c, "length");
|
|
2620
|
+
d.configurable && o(
|
|
2621
2621
|
c,
|
|
2622
2622
|
"length",
|
|
2623
2623
|
{ value: 1 + u(0, l.length - (arguments.length - 1)) }
|
|
@@ -2686,8 +2686,8 @@ var qs = oy, hl = qs.custom, fl = sc(hl) ? hl : null, vy = function t(e, r, i, n
|
|
|
2686
2686
|
var h = String(e) + "n";
|
|
2687
2687
|
return o ? cl(e, h) : h;
|
|
2688
2688
|
}
|
|
2689
|
-
var
|
|
2690
|
-
if (typeof i > "u" && (i = 0), i >=
|
|
2689
|
+
var f = typeof s.depth > "u" ? 5 : s.depth;
|
|
2690
|
+
if (typeof i > "u" && (i = 0), i >= f && f > 0 && typeof e == "object")
|
|
2691
2691
|
return Ys(e) ? "[Array]" : "[Object]";
|
|
2692
2692
|
var l = ky(s, i);
|
|
2693
2693
|
if (typeof n > "u")
|
|
@@ -2704,8 +2704,8 @@ var qs = oy, hl = qs.custom, fl = sc(hl) ? hl : null, vy = function t(e, r, i, n
|
|
|
2704
2704
|
return t(I, s, i + 1, n);
|
|
2705
2705
|
}
|
|
2706
2706
|
if (typeof e == "function" && !dl(e)) {
|
|
2707
|
-
var
|
|
2708
|
-
return "[Function" + (
|
|
2707
|
+
var d = Ey(e), p = Ni(e, c);
|
|
2708
|
+
return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (p.length > 0 ? " { " + pt.call(p, ", ") + " }" : "");
|
|
2709
2709
|
}
|
|
2710
2710
|
if (sc(e)) {
|
|
2711
2711
|
var m = Rr ? Ft.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Ws.call(e);
|
|
@@ -2728,7 +2728,7 @@ var qs = oy, hl = qs.custom, fl = sc(hl) ? hl : null, vy = function t(e, r, i, n
|
|
|
2728
2728
|
}
|
|
2729
2729
|
if (typeof e == "object" && a) {
|
|
2730
2730
|
if (fl && typeof e[fl] == "function" && qs)
|
|
2731
|
-
return qs(e, { depth:
|
|
2731
|
+
return qs(e, { depth: f - i });
|
|
2732
2732
|
if (a !== "symbol" && typeof e.inspect == "function")
|
|
2733
2733
|
return e.inspect();
|
|
2734
2734
|
}
|
|
@@ -3109,8 +3109,8 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3109
3109
|
return e;
|
|
3110
3110
|
var a = e;
|
|
3111
3111
|
if (typeof e == "symbol" ? a = Symbol.prototype.toString.call(e) : typeof e != "string" && (a = String(e)), i === "iso-8859-1")
|
|
3112
|
-
return escape(a).replace(/%u[0-9a-f]{4}/gi, function(
|
|
3113
|
-
return "%26%23" + parseInt(
|
|
3112
|
+
return escape(a).replace(/%u[0-9a-f]{4}/gi, function(f) {
|
|
3113
|
+
return "%26%23" + parseInt(f.slice(2), 16) + "%3B";
|
|
3114
3114
|
});
|
|
3115
3115
|
for (var o = "", u = 0; u < a.length; ++u) {
|
|
3116
3116
|
var h = a.charCodeAt(u);
|
|
@@ -3136,8 +3136,8 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3136
3136
|
}, rx = function(e) {
|
|
3137
3137
|
for (var r = [{ obj: { o: e }, prop: "o" }], i = [], n = 0; n < r.length; ++n)
|
|
3138
3138
|
for (var s = r[n], a = s.obj[s.prop], o = Object.keys(a), u = 0; u < o.length; ++u) {
|
|
3139
|
-
var h = o[u],
|
|
3140
|
-
typeof
|
|
3139
|
+
var h = o[u], f = a[h];
|
|
3140
|
+
typeof f == "object" && f !== null && i.indexOf(f) === -1 && (r.push({ obj: a, prop: h }), i.push(f));
|
|
3141
3141
|
}
|
|
3142
3142
|
return Zy(r), e;
|
|
3143
3143
|
}, ix = function(e) {
|
|
@@ -3197,7 +3197,7 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3197
3197
|
strictNullHandling: !1
|
|
3198
3198
|
}, cx = function(e) {
|
|
3199
3199
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
|
3200
|
-
}, cs = {}, hx = function t(e, r, i, n, s, a, o, u, h,
|
|
3200
|
+
}, cs = {}, hx = function t(e, r, i, n, s, a, o, u, h, f, l, c, d, p, m, v) {
|
|
3201
3201
|
for (var g = e, y = v, _ = 0, x = !1; (y = y.get(cs)) !== void 0 && !x; ) {
|
|
3202
3202
|
var b = y.get(e);
|
|
3203
3203
|
if (_ += 1, typeof b < "u") {
|
|
@@ -3217,9 +3217,9 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3217
3217
|
if (cx(g) || Yi.isBuffer(g)) {
|
|
3218
3218
|
if (o) {
|
|
3219
3219
|
var T = p ? r : o(r, ke.encoder, m, "key", c);
|
|
3220
|
-
return [
|
|
3220
|
+
return [d(T) + "=" + d(o(g, ke.encoder, m, "value", c))];
|
|
3221
3221
|
}
|
|
3222
|
-
return [
|
|
3222
|
+
return [d(r) + "=" + d(String(g))];
|
|
3223
3223
|
}
|
|
3224
3224
|
var w = [];
|
|
3225
3225
|
if (typeof g > "u")
|
|
@@ -3236,7 +3236,7 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3236
3236
|
for (var C = n && wt(g) && g.length === 1 ? r + "[]" : r, M = 0; M < S.length; ++M) {
|
|
3237
3237
|
var G = S[M], I = typeof G == "object" && typeof G.value < "u" ? G.value : g[G];
|
|
3238
3238
|
if (!(a && I === null)) {
|
|
3239
|
-
var E = wt(g) ? typeof i == "function" ? i(C, G) : C : C + (
|
|
3239
|
+
var E = wt(g) ? typeof i == "function" ? i(C, G) : C : C + (f ? "." + G : "[" + G + "]");
|
|
3240
3240
|
v.set(e, _);
|
|
3241
3241
|
var L = cc();
|
|
3242
3242
|
L.set(cs, v), hc(w, t(
|
|
@@ -3249,10 +3249,10 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3249
3249
|
i === "comma" && p && wt(g) ? null : o,
|
|
3250
3250
|
u,
|
|
3251
3251
|
h,
|
|
3252
|
-
|
|
3252
|
+
f,
|
|
3253
3253
|
l,
|
|
3254
3254
|
c,
|
|
3255
|
-
|
|
3255
|
+
d,
|
|
3256
3256
|
p,
|
|
3257
3257
|
m,
|
|
3258
3258
|
L
|
|
@@ -3305,7 +3305,7 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3305
3305
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3306
3306
|
var h = u === "comma" && e && e.commaRoundTrip;
|
|
3307
3307
|
n || (n = Object.keys(r)), i.sort && n.sort(i.sort);
|
|
3308
|
-
for (var
|
|
3308
|
+
for (var f = cc(), l = 0; l < n.length; ++l) {
|
|
3309
3309
|
var c = n[l];
|
|
3310
3310
|
i.skipNulls && r[c] === null || hc(a, hx(
|
|
3311
3311
|
r[c],
|
|
@@ -3323,11 +3323,11 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3323
3323
|
i.formatter,
|
|
3324
3324
|
i.encodeValuesOnly,
|
|
3325
3325
|
i.charset,
|
|
3326
|
-
|
|
3326
|
+
f
|
|
3327
3327
|
));
|
|
3328
3328
|
}
|
|
3329
|
-
var
|
|
3330
|
-
return i.charsetSentinel && (i.charset === "iso-8859-1" ? p += "utf8=%26%2310003%3B&" : p += "utf8=%E2%9C%93&"),
|
|
3329
|
+
var d = a.join(i.delimiter), p = i.addQueryPrefix === !0 ? "?" : "";
|
|
3330
|
+
return i.charsetSentinel && (i.charset === "iso-8859-1" ? p += "utf8=%26%2310003%3B&" : p += "utf8=%E2%9C%93&"), d.length > 0 ? p + d : "";
|
|
3331
3331
|
}, Pr = uc, Zs = Object.prototype.hasOwnProperty, px = Array.isArray, Ie = {
|
|
3332
3332
|
allowDots: !1,
|
|
3333
3333
|
allowPrototypes: !1,
|
|
@@ -3358,13 +3358,13 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3358
3358
|
a[u].indexOf("utf8=") === 0 && (a[u] === vx ? h = "utf-8" : a[u] === gx && (h = "iso-8859-1"), o = u, u = a.length);
|
|
3359
3359
|
for (u = 0; u < a.length; ++u)
|
|
3360
3360
|
if (u !== o) {
|
|
3361
|
-
var
|
|
3362
|
-
c === -1 ? (
|
|
3363
|
-
fc(
|
|
3361
|
+
var f = a[u], l = f.indexOf("]="), c = l === -1 ? f.indexOf("=") : l + 1, d, p;
|
|
3362
|
+
c === -1 ? (d = r.decoder(f, Ie.decoder, h, "key"), p = r.strictNullHandling ? null : "") : (d = r.decoder(f.slice(0, c), Ie.decoder, h, "key"), p = Pr.maybeMap(
|
|
3363
|
+
fc(f.slice(c + 1), r),
|
|
3364
3364
|
function(m) {
|
|
3365
3365
|
return r.decoder(m, Ie.decoder, h, "value");
|
|
3366
3366
|
}
|
|
3367
|
-
)), p && r.interpretNumericEntities && h === "iso-8859-1" && (p = mx(p)),
|
|
3367
|
+
)), p && r.interpretNumericEntities && h === "iso-8859-1" && (p = mx(p)), f.indexOf("[]=") > -1 && (p = px(p) ? [p] : p), Zs.call(i, d) ? i[d] = Pr.combine(i[d], p) : i[d] = p;
|
|
3368
3368
|
}
|
|
3369
3369
|
return i;
|
|
3370
3370
|
}, yx = function(t, e, r, i) {
|
|
@@ -3382,18 +3382,18 @@ var ka = Ma, zr = ny, Ly = vy, Dy = ka("%TypeError%"), ki = ka("%WeakMap%", !0),
|
|
|
3382
3382
|
return n;
|
|
3383
3383
|
}, xx = function(e, r, i, n) {
|
|
3384
3384
|
if (e) {
|
|
3385
|
-
var s = i.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, a = /(\[[^[\]]*])/, o = /(\[[^[\]]*])/g, u = i.depth > 0 && a.exec(s), h = u ? s.slice(0, u.index) : s,
|
|
3385
|
+
var s = i.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, a = /(\[[^[\]]*])/, o = /(\[[^[\]]*])/g, u = i.depth > 0 && a.exec(s), h = u ? s.slice(0, u.index) : s, f = [];
|
|
3386
3386
|
if (h) {
|
|
3387
3387
|
if (!i.plainObjects && Zs.call(Object.prototype, h) && !i.allowPrototypes)
|
|
3388
3388
|
return;
|
|
3389
|
-
|
|
3389
|
+
f.push(h);
|
|
3390
3390
|
}
|
|
3391
3391
|
for (var l = 0; i.depth > 0 && (u = o.exec(s)) !== null && l < i.depth; ) {
|
|
3392
3392
|
if (l += 1, !i.plainObjects && Zs.call(Object.prototype, u[1].slice(1, -1)) && !i.allowPrototypes)
|
|
3393
3393
|
return;
|
|
3394
|
-
|
|
3394
|
+
f.push(u[1]);
|
|
3395
3395
|
}
|
|
3396
|
-
return u &&
|
|
3396
|
+
return u && f.push("[" + s.slice(u.index) + "]"), yx(f, r, i, n);
|
|
3397
3397
|
}
|
|
3398
3398
|
}, bx = function(e) {
|
|
3399
3399
|
if (!e)
|
|
@@ -3504,34 +3504,34 @@ ot.prototype.parse = function(t, e, r) {
|
|
|
3504
3504
|
var h = Ix.exec(o);
|
|
3505
3505
|
if (h) {
|
|
3506
3506
|
h = h[0];
|
|
3507
|
-
var
|
|
3508
|
-
this.protocol =
|
|
3507
|
+
var f = h.toLowerCase();
|
|
3508
|
+
this.protocol = f, o = o.substr(h.length);
|
|
3509
3509
|
}
|
|
3510
3510
|
if (r || h || o.match(/^\/\/[^@/]+@[^@/]+/)) {
|
|
3511
3511
|
var l = o.substr(0, 2) === "//";
|
|
3512
3512
|
l && !(h && Js[h]) && (o = o.substr(2), this.slashes = !0);
|
|
3513
3513
|
}
|
|
3514
3514
|
if (!Js[h] && (l || h && !Sr[h])) {
|
|
3515
|
-
for (var c = -1,
|
|
3516
|
-
var p = o.indexOf(_l[
|
|
3515
|
+
for (var c = -1, d = 0; d < _l.length; d++) {
|
|
3516
|
+
var p = o.indexOf(_l[d]);
|
|
3517
3517
|
p !== -1 && (c === -1 || p < c) && (c = p);
|
|
3518
3518
|
}
|
|
3519
3519
|
var m, v;
|
|
3520
3520
|
c === -1 ? v = o.lastIndexOf("@") : v = o.lastIndexOf("@", c), v !== -1 && (m = o.slice(0, v), o = o.slice(v + 1), this.auth = decodeURIComponent(m)), c = -1;
|
|
3521
|
-
for (var
|
|
3522
|
-
var p = o.indexOf(vl[
|
|
3521
|
+
for (var d = 0; d < vl.length; d++) {
|
|
3522
|
+
var p = o.indexOf(vl[d]);
|
|
3523
3523
|
p !== -1 && (c === -1 || p < c) && (c = p);
|
|
3524
3524
|
}
|
|
3525
3525
|
c === -1 && (c = o.length), this.host = o.slice(0, c), o = o.slice(c), this.parseHost(), this.hostname = this.hostname || "";
|
|
3526
3526
|
var g = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3527
3527
|
if (!g)
|
|
3528
|
-
for (var y = this.hostname.split(/\./),
|
|
3529
|
-
var x = y[
|
|
3528
|
+
for (var y = this.hostname.split(/\./), d = 0, _ = y.length; d < _; d++) {
|
|
3529
|
+
var x = y[d];
|
|
3530
3530
|
if (x && !x.match(yl)) {
|
|
3531
3531
|
for (var b = "", T = 0, w = x.length; T < w; T++)
|
|
3532
3532
|
x.charCodeAt(T) > 127 ? b += "x" : b += x[T];
|
|
3533
3533
|
if (!b.match(yl)) {
|
|
3534
|
-
var S = y.slice(0,
|
|
3534
|
+
var S = y.slice(0, d), A = y.slice(d + 1), C = x.match(Nx);
|
|
3535
3535
|
C && (S.push(C[1]), A.unshift(C[2])), A.length && (o = "/" + A.join(".") + o), this.hostname = S.join(".");
|
|
3536
3536
|
break;
|
|
3537
3537
|
}
|
|
@@ -3541,9 +3541,9 @@ ot.prototype.parse = function(t, e, r) {
|
|
|
3541
3541
|
var M = this.port ? ":" + this.port : "", G = this.hostname || "";
|
|
3542
3542
|
this.host = G + M, this.href += this.host, g && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), o[0] !== "/" && (o = "/" + o));
|
|
3543
3543
|
}
|
|
3544
|
-
if (!kx[
|
|
3545
|
-
for (var
|
|
3546
|
-
var I = Qs[
|
|
3544
|
+
if (!kx[f])
|
|
3545
|
+
for (var d = 0, _ = Qs.length; d < _; d++) {
|
|
3546
|
+
var I = Qs[d];
|
|
3547
3547
|
if (o.indexOf(I) !== -1) {
|
|
3548
3548
|
var E = encodeURIComponent(I);
|
|
3549
3549
|
E === I && (E = escape(I)), o = o.split(I).join(E);
|
|
@@ -3552,7 +3552,7 @@ ot.prototype.parse = function(t, e, r) {
|
|
|
3552
3552
|
var L = o.indexOf("#");
|
|
3553
3553
|
L !== -1 && (this.hash = o.substr(L), o = o.slice(0, L));
|
|
3554
3554
|
var B = o.indexOf("?");
|
|
3555
|
-
if (B !== -1 ? (this.search = o.substr(B), this.query = o.substr(B + 1), e && (this.query = ea.parse(this.query)), o = o.slice(0, B)) : e && (this.search = "", this.query = {}), o && (this.pathname = o), Sr[
|
|
3555
|
+
if (B !== -1 ? (this.search = o.substr(B), this.query = o.substr(B + 1), e && (this.query = ea.parse(this.query)), o = o.slice(0, B)) : e && (this.search = "", this.query = {}), o && (this.pathname = o), Sr[f] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3556
3556
|
var M = this.pathname || "", R = this.search || "";
|
|
3557
3557
|
this.path = M + R;
|
|
3558
3558
|
}
|
|
@@ -3597,8 +3597,8 @@ ot.prototype.resolveObject = function(t) {
|
|
|
3597
3597
|
}
|
|
3598
3598
|
if (t.protocol && t.protocol !== r.protocol) {
|
|
3599
3599
|
if (!Sr[t.protocol]) {
|
|
3600
|
-
for (var h = Object.keys(t),
|
|
3601
|
-
var l = h[
|
|
3600
|
+
for (var h = Object.keys(t), f = 0; f < h.length; f++) {
|
|
3601
|
+
var l = h[f];
|
|
3602
3602
|
r[l] = t[l];
|
|
3603
3603
|
}
|
|
3604
3604
|
return r.href = r.format(), r;
|
|
@@ -3610,8 +3610,8 @@ ot.prototype.resolveObject = function(t) {
|
|
|
3610
3610
|
} else
|
|
3611
3611
|
r.pathname = t.pathname;
|
|
3612
3612
|
if (r.search = t.search, r.query = t.query, r.host = t.host || "", r.auth = t.auth, r.hostname = t.hostname || t.host, r.port = t.port, r.pathname || r.search) {
|
|
3613
|
-
var c = r.pathname || "",
|
|
3614
|
-
r.path = c +
|
|
3613
|
+
var c = r.pathname || "", d = r.search || "";
|
|
3614
|
+
r.path = c + d;
|
|
3615
3615
|
}
|
|
3616
3616
|
return r.slashes = r.slashes || t.slashes, r.href = r.format(), r;
|
|
3617
3617
|
}
|
|
@@ -3839,12 +3839,12 @@ function Zx(t, e) {
|
|
|
3839
3839
|
if (h)
|
|
3840
3840
|
return h;
|
|
3841
3841
|
if (a != null && a.closest) {
|
|
3842
|
-
var
|
|
3842
|
+
var f = this.toRgb(), l = 1 / 0, c = "black";
|
|
3843
3843
|
if (!s.length)
|
|
3844
|
-
for (var
|
|
3845
|
-
s[
|
|
3844
|
+
for (var d in r)
|
|
3845
|
+
s[d] = new t(r[d]).toRgb();
|
|
3846
3846
|
for (var p in r) {
|
|
3847
|
-
var m = (o =
|
|
3847
|
+
var m = (o = f, u = s[p], Math.pow(o.r - u.r, 2) + Math.pow(o.g - u.g, 2) + Math.pow(o.b - u.b, 2));
|
|
3848
3848
|
m < l && (l = m, c = p);
|
|
3849
3849
|
}
|
|
3850
3850
|
return c;
|
|
@@ -4025,7 +4025,7 @@ function Qx() {
|
|
|
4025
4025
|
const t = [], e = [];
|
|
4026
4026
|
for (let i = 0; i < 32; i++)
|
|
4027
4027
|
t[i] = i, e[i] = i;
|
|
4028
|
-
t[
|
|
4028
|
+
t[H.NORMAL_NPM] = H.NORMAL, t[H.ADD_NPM] = H.ADD, t[H.SCREEN_NPM] = H.SCREEN, e[H.NORMAL] = H.NORMAL_NPM, e[H.ADD] = H.ADD_NPM, e[H.SCREEN] = H.SCREEN_NPM;
|
|
4029
4029
|
const r = [];
|
|
4030
4030
|
return r.push(e), r.push(t), r;
|
|
4031
4031
|
}
|
|
@@ -4211,7 +4211,7 @@ function sb(t, e) {
|
|
|
4211
4211
|
const ms = 0, gs = 1, vs = 2, _s = 3, ys = 4, xs = 5;
|
|
4212
4212
|
let Dn = class vc {
|
|
4213
4213
|
constructor() {
|
|
4214
|
-
this.data = 0, this.blendMode =
|
|
4214
|
+
this.data = 0, this.blendMode = H.NORMAL, this.polygonOffset = 0, this.blend = !0, this.depthMask = !0;
|
|
4215
4215
|
}
|
|
4216
4216
|
get blend() {
|
|
4217
4217
|
return !!(this.data & 1 << ms);
|
|
@@ -4253,7 +4253,7 @@ let Dn = class vc {
|
|
|
4253
4253
|
return this._blendMode;
|
|
4254
4254
|
}
|
|
4255
4255
|
set blendMode(e) {
|
|
4256
|
-
this.blend = e !==
|
|
4256
|
+
this.blend = e !== H.NONE, this._blendMode = e;
|
|
4257
4257
|
}
|
|
4258
4258
|
get polygonOffset() {
|
|
4259
4259
|
return this._polygonOffset;
|
|
@@ -4292,11 +4292,11 @@ class lt {
|
|
|
4292
4292
|
emit(e, r, i, n, s, a, o, u) {
|
|
4293
4293
|
if (arguments.length > 8)
|
|
4294
4294
|
throw new Error("max arguments reached");
|
|
4295
|
-
const { name: h, items:
|
|
4295
|
+
const { name: h, items: f } = this;
|
|
4296
4296
|
this._aliasCount++;
|
|
4297
|
-
for (let l = 0, c =
|
|
4298
|
-
|
|
4299
|
-
return
|
|
4297
|
+
for (let l = 0, c = f.length; l < c; l++)
|
|
4298
|
+
f[l][h](e, r, i, n, s, a, o, u);
|
|
4299
|
+
return f === this.items && this._aliasCount--, this;
|
|
4300
4300
|
}
|
|
4301
4301
|
ensureNonAliasedItems() {
|
|
4302
4302
|
this._aliasCount > 0 && this.items.length > 1 && (this._aliasCount = 0, this.items = this.items.slice(0));
|
|
@@ -4404,12 +4404,12 @@ const ab = {
|
|
|
4404
4404
|
height: o,
|
|
4405
4405
|
wrapMode: u,
|
|
4406
4406
|
format: h,
|
|
4407
|
-
type:
|
|
4407
|
+
type: f,
|
|
4408
4408
|
target: l,
|
|
4409
4409
|
resolution: c,
|
|
4410
|
-
resourceOptions:
|
|
4410
|
+
resourceOptions: d
|
|
4411
4411
|
} = e;
|
|
4412
|
-
t && !(t instanceof mi) && (t = _c(t,
|
|
4412
|
+
t && !(t instanceof mi) && (t = _c(t, d), t.internal = !0), this.resolution = c || Q.RESOLUTION, this.width = Math.round((a || 0) * this.resolution) / this.resolution, this.height = Math.round((o || 0) * this.resolution) / this.resolution, this._mipmap = i, this.anisotropicLevel = n, this._wrapMode = u, this._scaleMode = s, this.format = h, this.type = f, this.target = l, this.alphaMode = r, this.uid = pi(), this.touched = 0, this.isPowerOfTwo = !1, this._refreshPOT(), this._glTextures = {}, this.dirtyId = 0, this.dirtyStyleId = 0, this.cacheId = null, this.valid = a > 0 && o > 0, this.textureCacheIds = [], this.destroyed = !1, this.resource = null, this._batchEnabled = 0, this._batchLocation = 0, this.parentTextureArray = null, this.setResource(t);
|
|
4413
4413
|
}
|
|
4414
4414
|
get realWidth() {
|
|
4415
4415
|
return Math.round(this.width * this.resolution);
|
|
@@ -4580,11 +4580,11 @@ function ub(t, e) {
|
|
|
4580
4580
|
const s = new ArrayBuffer(r * 4);
|
|
4581
4581
|
let a = null, o = 0;
|
|
4582
4582
|
for (let u = 0; u < t.length; u++) {
|
|
4583
|
-
const h = e[u],
|
|
4583
|
+
const h = e[u], f = t[u], l = gc(f);
|
|
4584
4584
|
n[l] || (n[l] = new lb[l](s)), a = n[l];
|
|
4585
|
-
for (let c = 0; c <
|
|
4586
|
-
const
|
|
4587
|
-
a[
|
|
4585
|
+
for (let c = 0; c < f.length; c++) {
|
|
4586
|
+
const d = (c / h | 0) * i + o, p = c % h;
|
|
4587
|
+
a[d + p] = f[c];
|
|
4588
4588
|
}
|
|
4589
4589
|
o += h;
|
|
4590
4590
|
}
|
|
@@ -4613,8 +4613,8 @@ class Mr {
|
|
|
4613
4613
|
this.addAttribute(h[l], r, i, n, s);
|
|
4614
4614
|
return this;
|
|
4615
4615
|
}
|
|
4616
|
-
let
|
|
4617
|
-
return
|
|
4616
|
+
let f = this.buffers.indexOf(r);
|
|
4617
|
+
return f === -1 && (this.buffers.push(r), f = this.buffers.length - 1), this.attributes[e] = new _n(f, i, n, s, a, o, u), this.instanced = this.instanced || u, this;
|
|
4618
4618
|
}
|
|
4619
4619
|
getAttribute(e) {
|
|
4620
4620
|
return this.attributes[e];
|
|
@@ -4681,21 +4681,21 @@ class Mr {
|
|
|
4681
4681
|
}
|
|
4682
4682
|
if (r.attributes = a.attributes, a.indexBuffer) {
|
|
4683
4683
|
r.indexBuffer = r.buffers[a.buffers.indexOf(a.indexBuffer)], r.indexBuffer.type = gt.ELEMENT_ARRAY_BUFFER;
|
|
4684
|
-
let o = 0, u = 0, h = 0,
|
|
4684
|
+
let o = 0, u = 0, h = 0, f = 0;
|
|
4685
4685
|
for (let l = 0; l < a.buffers.length; l++)
|
|
4686
4686
|
if (a.buffers[l] !== a.indexBuffer) {
|
|
4687
|
-
|
|
4687
|
+
f = l;
|
|
4688
4688
|
break;
|
|
4689
4689
|
}
|
|
4690
4690
|
for (const l in a.attributes) {
|
|
4691
4691
|
const c = a.attributes[l];
|
|
4692
|
-
(c.buffer | 0) ===
|
|
4692
|
+
(c.buffer | 0) === f && (u += c.size * Ol[c.type] / 4);
|
|
4693
4693
|
}
|
|
4694
4694
|
for (let l = 0; l < e.length; l++) {
|
|
4695
4695
|
const c = e[l].indexBuffer.data;
|
|
4696
|
-
for (let
|
|
4697
|
-
r.indexBuffer.data[
|
|
4698
|
-
o += e[l].buffers[
|
|
4696
|
+
for (let d = 0; d < c.length; d++)
|
|
4697
|
+
r.indexBuffer.data[d + h] += o;
|
|
4698
|
+
o += e[l].buffers[f].data.length / u, h += c.length;
|
|
4699
4699
|
}
|
|
4700
4700
|
}
|
|
4701
4701
|
return r;
|
|
@@ -4774,17 +4774,17 @@ class de {
|
|
|
4774
4774
|
const i = this.left, n = this.right, s = this.top, a = this.bottom;
|
|
4775
4775
|
if (n <= i || a <= s)
|
|
4776
4776
|
return !1;
|
|
4777
|
-
const o = Ui[0].set(e.left, e.top), u = Ui[1].set(e.left, e.bottom), h = Ui[2].set(e.right, e.top),
|
|
4777
|
+
const o = Ui[0].set(e.left, e.top), u = Ui[1].set(e.left, e.bottom), h = Ui[2].set(e.right, e.top), f = Ui[3].set(e.right, e.bottom);
|
|
4778
4778
|
if (h.x <= o.x || u.y <= o.y)
|
|
4779
4779
|
return !1;
|
|
4780
4780
|
const l = Math.sign(r.a * r.d - r.b * r.c);
|
|
4781
|
-
if (l === 0 || (r.apply(o, o), r.apply(u, u), r.apply(h, h), r.apply(
|
|
4781
|
+
if (l === 0 || (r.apply(o, o), r.apply(u, u), r.apply(h, h), r.apply(f, f), Math.max(o.x, u.x, h.x, f.x) <= i || Math.min(o.x, u.x, h.x, f.x) >= n || Math.max(o.y, u.y, h.y, f.y) <= s || Math.min(o.y, u.y, h.y, f.y) >= a))
|
|
4782
4782
|
return !1;
|
|
4783
|
-
const c = l * (u.y - o.y),
|
|
4784
|
-
if (Math.max(p, m, v, g) <= c * o.x +
|
|
4783
|
+
const c = l * (u.y - o.y), d = l * (o.x - u.x), p = c * i + d * s, m = c * n + d * s, v = c * i + d * a, g = c * n + d * a;
|
|
4784
|
+
if (Math.max(p, m, v, g) <= c * o.x + d * o.y || Math.min(p, m, v, g) >= c * f.x + d * f.y)
|
|
4785
4785
|
return !1;
|
|
4786
4786
|
const y = l * (o.y - h.y), _ = l * (h.x - o.x), x = y * i + _ * s, b = y * n + _ * s, T = y * i + _ * a, w = y * n + _ * a;
|
|
4787
|
-
return !(Math.max(x, b, T, w) <= y * o.x + _ * o.y || Math.min(x, b, T, w) >= y *
|
|
4787
|
+
return !(Math.max(x, b, T, w) <= y * o.x + _ * o.y || Math.min(x, b, T, w) >= y * f.x + _ * f.y);
|
|
4788
4788
|
}
|
|
4789
4789
|
pad(e = 0, r = e) {
|
|
4790
4790
|
return this.x -= e, this.y -= r, this.width += e * 2, this.height += r * 2, this;
|
|
@@ -4865,8 +4865,8 @@ class ai {
|
|
|
4865
4865
|
let i = !1;
|
|
4866
4866
|
const n = this.points.length / 2;
|
|
4867
4867
|
for (let s = 0, a = n - 1; s < n; a = s++) {
|
|
4868
|
-
const o = this.points[s * 2], u = this.points[s * 2 + 1], h = this.points[a * 2],
|
|
4869
|
-
u > r !=
|
|
4868
|
+
const o = this.points[s * 2], u = this.points[s * 2 + 1], h = this.points[a * 2], f = this.points[a * 2 + 1];
|
|
4869
|
+
u > r != f > r && e < (h - o) * ((r - u) / (f - u)) + o && (i = !i);
|
|
4870
4870
|
}
|
|
4871
4871
|
return i;
|
|
4872
4872
|
}
|
|
@@ -5607,7 +5607,7 @@ function bb() {
|
|
|
5607
5607
|
}
|
|
5608
5608
|
function kl(t, e) {
|
|
5609
5609
|
const r = t.getShaderSource(e).split(`
|
|
5610
|
-
`).map((h,
|
|
5610
|
+
`).map((h, f) => `${f}: ${h}`), i = t.getShaderInfoLog(e), n = i.split(`
|
|
5611
5611
|
`), s = {}, a = n.map((h) => parseFloat(h.replace(/^ERROR\: 0\:([\d]+)\:.*$/, "$1"))).filter((h) => h && !s[h] ? (s[h] = !0, !0) : !1), o = [""];
|
|
5612
5612
|
a.forEach((h) => {
|
|
5613
5613
|
r[h - 1] = `%c${r[h - 1]}%c`, o.push("background: #FF0000; color:#FFFFFF; font-size: 10px", "font-size: 10px");
|
|
@@ -5953,13 +5953,13 @@ const et = class extends Cc {
|
|
|
5953
5953
|
} = this, r = et._textureArrayPool, i = this.renderer.batch, n = this._tempBoundTextures, s = this.renderer.textureGC.count;
|
|
5954
5954
|
let a = ++ae._globalBatch, o = 0, u = r[0], h = 0;
|
|
5955
5955
|
i.copyBoundTextures(n, e);
|
|
5956
|
-
for (let
|
|
5957
|
-
const l = t[
|
|
5958
|
-
t[
|
|
5956
|
+
for (let f = 0; f < this._bufferSize; ++f) {
|
|
5957
|
+
const l = t[f];
|
|
5958
|
+
t[f] = null, l._batchEnabled !== a && (u.count >= e && (i.boundArray(u, n, a, e), this.buildDrawCalls(u, h, f), h = f, u = r[++o], ++a), l._batchEnabled = a, l.touched = s, u.elements[u.count++] = l);
|
|
5959
5959
|
}
|
|
5960
5960
|
u.count > 0 && (i.boundArray(u, n, a, e), this.buildDrawCalls(u, h, this._bufferSize), ++o, ++a);
|
|
5961
|
-
for (let
|
|
5962
|
-
n[
|
|
5961
|
+
for (let f = 0; f < n.length; f++)
|
|
5962
|
+
n[f] = null;
|
|
5963
5963
|
ae._globalBatch = a;
|
|
5964
5964
|
}
|
|
5965
5965
|
buildDrawCalls(t, e, r) {
|
|
@@ -5969,13 +5969,13 @@ const et = class extends Cc {
|
|
|
5969
5969
|
_indexBuffer: s,
|
|
5970
5970
|
vertexSize: a
|
|
5971
5971
|
} = this, o = et._drawCallPool;
|
|
5972
|
-
let u = this._dcIndex, h = this._aIndex,
|
|
5972
|
+
let u = this._dcIndex, h = this._aIndex, f = this._iIndex, l = o[u];
|
|
5973
5973
|
l.start = this._iIndex, l.texArray = t;
|
|
5974
5974
|
for (let c = e; c < r; ++c) {
|
|
5975
|
-
const
|
|
5976
|
-
i[c] = null, e < c && l.blend !== m && (l.size =
|
|
5975
|
+
const d = i[c], p = d._texture.baseTexture, m = Jx[p.alphaMode ? 1 : 0][d.blendMode];
|
|
5976
|
+
i[c] = null, e < c && l.blend !== m && (l.size = f - l.start, e = c, l = o[++u], l.texArray = t, l.start = f), this.packInterleavedGeometry(d, n, s, h, f), h += d.vertexData.length / 2 * a, f += d.indices.length, l.blend = m;
|
|
5977
5977
|
}
|
|
5978
|
-
e < r && (l.size =
|
|
5978
|
+
e < r && (l.size = f - l.start, ++u), this._dcIndex = u, this._aIndex = h, this._iIndex = f;
|
|
5979
5979
|
}
|
|
5980
5980
|
bindAndClearTexArray(t) {
|
|
5981
5981
|
const e = this.renderer.texture;
|
|
@@ -5995,8 +5995,8 @@ const et = class extends Cc {
|
|
|
5995
5995
|
const t = this._dcIndex, { gl: e, state: r } = this.renderer, i = et._drawCallPool;
|
|
5996
5996
|
let n = null;
|
|
5997
5997
|
for (let s = 0; s < t; s++) {
|
|
5998
|
-
const { texArray: a, type: o, size: u, start: h, blend:
|
|
5999
|
-
n !== a && (n = a, this.bindAndClearTexArray(a)), this.state.blendMode =
|
|
5998
|
+
const { texArray: a, type: o, size: u, start: h, blend: f } = i[s];
|
|
5999
|
+
n !== a && (n = a, this.bindAndClearTexArray(a)), this.state.blendMode = f, r.set(this.state), e.drawElements(o, u, e.UNSIGNED_SHORT, h * 2);
|
|
6000
6000
|
}
|
|
6001
6001
|
}
|
|
6002
6002
|
flush() {
|
|
@@ -6029,9 +6029,9 @@ const et = class extends Cc {
|
|
|
6029
6029
|
const {
|
|
6030
6030
|
uint32View: s,
|
|
6031
6031
|
float32View: a
|
|
6032
|
-
} = e, o = i / this.vertexSize, u = t.uvs, h = t.indices,
|
|
6033
|
-
for (let p = 0; p <
|
|
6034
|
-
a[i++] =
|
|
6032
|
+
} = e, o = i / this.vertexSize, u = t.uvs, h = t.indices, f = t.vertexData, l = t._texture.baseTexture._batchLocation, c = Math.min(t.worldAlpha, 1), d = Le.shared.setValue(t._tintRGB).toPremultiplied(c);
|
|
6033
|
+
for (let p = 0; p < f.length; p += 2)
|
|
6034
|
+
a[i++] = f[p], a[i++] = f[p + 1], a[i++] = u[p], a[i++] = u[p + 1], s[i++] = d, a[i++] = l;
|
|
6035
6035
|
for (let p = 0; p < h.length; p++)
|
|
6036
6036
|
r[n++] = o + h[p];
|
|
6037
6037
|
}
|
|
@@ -6171,8 +6171,8 @@ class Ic {
|
|
|
6171
6171
|
const { elements: s, ids: a, count: o } = e;
|
|
6172
6172
|
let u = 0;
|
|
6173
6173
|
for (let h = 0; h < o; h++) {
|
|
6174
|
-
const
|
|
6175
|
-
if (l >= 0 && l < n && r[l] ===
|
|
6174
|
+
const f = s[h], l = f._batchLocation;
|
|
6175
|
+
if (l >= 0 && l < n && r[l] === f) {
|
|
6176
6176
|
a[h] = l;
|
|
6177
6177
|
continue;
|
|
6178
6178
|
}
|
|
@@ -6182,7 +6182,7 @@ class Ic {
|
|
|
6182
6182
|
u++;
|
|
6183
6183
|
continue;
|
|
6184
6184
|
}
|
|
6185
|
-
a[h] = u,
|
|
6185
|
+
a[h] = u, f._batchLocation = u, r[u] = f;
|
|
6186
6186
|
break;
|
|
6187
6187
|
}
|
|
6188
6188
|
}
|
|
@@ -6606,8 +6606,8 @@ class ie extends Fn {
|
|
|
6606
6606
|
this._frame = e, this.noFrame = !1;
|
|
6607
6607
|
const { x: r, y: i, width: n, height: s } = e, a = r + n > this.baseTexture.width, o = i + s > this.baseTexture.height;
|
|
6608
6608
|
if (a || o) {
|
|
6609
|
-
const u = a && o ? "and" : "or", h = `X: ${r} + ${n} = ${r + n} > ${this.baseTexture.width}`,
|
|
6610
|
-
throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${u} ${
|
|
6609
|
+
const u = a && o ? "and" : "or", h = `X: ${r} + ${n} = ${r + n} > ${this.baseTexture.width}`, f = `Y: ${i} + ${s} = ${i + s} > ${this.baseTexture.height}`;
|
|
6610
|
+
throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${u} ${f}`);
|
|
6611
6611
|
}
|
|
6612
6612
|
this.valid = n && s && this.baseTexture.valid, !this.trim && !this.rotate && (this.orig = e), this.valid && this.updateUvs();
|
|
6613
6613
|
}
|
|
@@ -6789,16 +6789,16 @@ class Oc {
|
|
|
6789
6789
|
}
|
|
6790
6790
|
push(e, r) {
|
|
6791
6791
|
const i = this.renderer, n = this.defaultFilterStack, s = this.statePool.pop() || new Db(), a = this.renderer.renderTexture;
|
|
6792
|
-
let o = r[0].resolution, u = r[0].multisample, h = r[0].padding,
|
|
6792
|
+
let o = r[0].resolution, u = r[0].multisample, h = r[0].padding, f = r[0].autoFit, l = r[0].legacy ?? !0;
|
|
6793
6793
|
for (let p = 1; p < r.length; p++) {
|
|
6794
6794
|
const m = r[p];
|
|
6795
|
-
o = Math.min(o, m.resolution), u = Math.min(u, m.multisample), h = this.useMaxPadding ? Math.max(h, m.padding) : h + m.padding,
|
|
6795
|
+
o = Math.min(o, m.resolution), u = Math.min(u, m.multisample), h = this.useMaxPadding ? Math.max(h, m.padding) : h + m.padding, f = f && m.autoFit, l = l || (m.legacy ?? !0);
|
|
6796
6796
|
}
|
|
6797
6797
|
n.length === 1 && (this.defaultFilterStack[0].renderTexture = a.current), n.push(s), s.resolution = o, s.multisample = u, s.legacy = l, s.target = e, s.sourceFrame.copyFrom(e.filterArea || e.getBounds(!0)), s.sourceFrame.pad(h);
|
|
6798
6798
|
const c = this.tempRect.copyFrom(a.sourceFrame);
|
|
6799
|
-
i.projection.transform && this.transformAABB(Ts.copyFrom(i.projection.transform).invert(), c),
|
|
6800
|
-
const
|
|
6801
|
-
|
|
6799
|
+
i.projection.transform && this.transformAABB(Ts.copyFrom(i.projection.transform).invert(), c), f ? (s.sourceFrame.fit(c), (s.sourceFrame.width <= 0 || s.sourceFrame.height <= 0) && (s.sourceFrame.width = 0, s.sourceFrame.height = 0)) : s.sourceFrame.intersects(c) || (s.sourceFrame.width = 0, s.sourceFrame.height = 0), this.roundFrame(s.sourceFrame, a.current ? a.current.resolution : i.resolution, a.sourceFrame, a.destinationFrame, i.projection.transform), s.renderTexture = this.getOptimalFilterTexture(s.sourceFrame.width, s.sourceFrame.height, o, u), s.filters = r, s.destinationFrame.width = s.renderTexture.width, s.destinationFrame.height = s.renderTexture.height;
|
|
6800
|
+
const d = this.tempRect;
|
|
6801
|
+
d.x = 0, d.y = 0, d.width = s.sourceFrame.width, d.height = s.sourceFrame.height, s.renderTexture.filterFrame = s.sourceFrame, s.bindingSourceFrame.copyFrom(a.sourceFrame), s.bindingDestinationFrame.copyFrom(a.destinationFrame), s.transform = i.projection.transform, i.projection.transform = null, a.bind(s.renderTexture, s.sourceFrame, d), i.framebuffer.clear(0, 0, 0, 0);
|
|
6802
6802
|
}
|
|
6803
6803
|
pop() {
|
|
6804
6804
|
const e = this.defaultFilterStack, r = e.pop(), i = r.filters;
|
|
@@ -6815,15 +6815,15 @@ class Oc {
|
|
|
6815
6815
|
if (this.renderer.framebuffer.blit(), i.length === 1)
|
|
6816
6816
|
i[0].apply(this, r.renderTexture, u.renderTexture, Gt.BLEND, r), this.returnFilterTexture(r.renderTexture);
|
|
6817
6817
|
else {
|
|
6818
|
-
let h = r.renderTexture,
|
|
6819
|
-
|
|
6818
|
+
let h = r.renderTexture, f = this.getOptimalFilterTexture(h.width, h.height, r.resolution);
|
|
6819
|
+
f.filterFrame = h.filterFrame;
|
|
6820
6820
|
let l = 0;
|
|
6821
6821
|
for (l = 0; l < i.length - 1; ++l) {
|
|
6822
|
-
l === 1 && r.multisample > 1 && (
|
|
6822
|
+
l === 1 && r.multisample > 1 && (f = this.getOptimalFilterTexture(h.width, h.height, r.resolution), f.filterFrame = h.filterFrame), i[l].apply(this, h, f, Gt.CLEAR, r);
|
|
6823
6823
|
const c = h;
|
|
6824
|
-
h =
|
|
6824
|
+
h = f, f = c;
|
|
6825
6825
|
}
|
|
6826
|
-
i[l].apply(this, h, u.renderTexture, Gt.BLEND, r), l > 1 && r.multisample > 1 && this.returnFilterTexture(r.renderTexture), this.returnFilterTexture(h), this.returnFilterTexture(
|
|
6826
|
+
i[l].apply(this, h, u.renderTexture, Gt.BLEND, r), l > 1 && r.multisample > 1 && this.returnFilterTexture(r.renderTexture), this.returnFilterTexture(h), this.returnFilterTexture(f);
|
|
6827
6827
|
}
|
|
6828
6828
|
r.clear(), this.statePool.push(r);
|
|
6829
6829
|
}
|
|
@@ -6875,8 +6875,8 @@ class Oc {
|
|
|
6875
6875
|
transformAABB(e, r) {
|
|
6876
6876
|
const i = Vi[0], n = Vi[1], s = Vi[2], a = Vi[3];
|
|
6877
6877
|
i.set(r.left, r.top), n.set(r.left, r.bottom), s.set(r.right, r.top), a.set(r.right, r.bottom), e.apply(i, i), e.apply(n, n), e.apply(s, s), e.apply(a, a);
|
|
6878
|
-
const o = Math.min(i.x, n.x, s.x, a.x), u = Math.min(i.y, n.y, s.y, a.y), h = Math.max(i.x, n.x, s.x, a.x),
|
|
6879
|
-
r.x = o, r.y = u, r.width = h - o, r.height =
|
|
6878
|
+
const o = Math.min(i.x, n.x, s.x, a.x), u = Math.min(i.y, n.y, s.y, a.y), h = Math.max(i.x, n.x, s.x, a.x), f = Math.max(i.y, n.y, s.y, a.y);
|
|
6879
|
+
r.x = o, r.y = u, r.width = h - o, r.height = f - u;
|
|
6880
6880
|
}
|
|
6881
6881
|
roundFrame(e, r, i, n, s) {
|
|
6882
6882
|
if (!(e.width <= 0 || e.height <= 0 || i.width <= 0 || i.height <= 0)) {
|
|
@@ -6966,8 +6966,8 @@ class Nc {
|
|
|
6966
6966
|
i.drawBuffers || (a = Math.min(a, 1)), n.multisample > 1 && this.canMultisampleFramebuffer(e) ? n.msaaBuffer = n.msaaBuffer || i.createRenderbuffer() : n.msaaBuffer && (i.deleteRenderbuffer(n.msaaBuffer), n.msaaBuffer = null, n.blitFramebuffer && (n.blitFramebuffer.dispose(), n.blitFramebuffer = null));
|
|
6967
6967
|
const o = [];
|
|
6968
6968
|
for (let u = 0; u < a; u++) {
|
|
6969
|
-
const h = s[u],
|
|
6970
|
-
this.renderer.texture.bind(
|
|
6969
|
+
const h = s[u], f = h.parentTextureArray || h;
|
|
6970
|
+
this.renderer.texture.bind(f, 0), u === 0 && n.msaaBuffer ? (i.bindRenderbuffer(i.RENDERBUFFER, n.msaaBuffer), i.renderbufferStorageMultisample(i.RENDERBUFFER, n.multisample, f._glTextures[this.CONTEXT_UID].internalFormat, e.width, e.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.RENDERBUFFER, n.msaaBuffer)) : (i.framebufferTexture2D(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + u, h.target, f._glTextures[this.CONTEXT_UID].texture, r), o.push(i.COLOR_ATTACHMENT0 + u));
|
|
6971
6971
|
}
|
|
6972
6972
|
if (o.length > 1 && i.drawBuffers(o), e.depthTexture && this.writeDepthTexture) {
|
|
6973
6973
|
const h = e.depthTexture;
|
|
@@ -7000,10 +7000,10 @@ class Nc {
|
|
|
7000
7000
|
if (!e) {
|
|
7001
7001
|
if (!u.msaaBuffer)
|
|
7002
7002
|
return;
|
|
7003
|
-
const
|
|
7004
|
-
if (!
|
|
7003
|
+
const f = n.colorTextures[0];
|
|
7004
|
+
if (!f)
|
|
7005
7005
|
return;
|
|
7006
|
-
u.blitFramebuffer || (u.blitFramebuffer = new la(n.width, n.height), u.blitFramebuffer.addColorTexture(0,
|
|
7006
|
+
u.blitFramebuffer || (u.blitFramebuffer = new la(n.width, n.height), u.blitFramebuffer.addColorTexture(0, f)), e = u.blitFramebuffer, e.colorTextures[0] !== f && (e.colorTextures[0] = f, e.dirtyId++, e.dirtyFormat++), (e.width !== n.width || e.height !== n.height) && (e.width = n.width, e.height = n.height, e.dirtyId++, e.dirtySize++);
|
|
7007
7007
|
}
|
|
7008
7008
|
r || (r = Ub, r.width = n.width, r.height = n.height), i || (i = r);
|
|
7009
7009
|
const h = r.width === i.width && r.height === i.height;
|
|
@@ -7098,24 +7098,24 @@ class kc {
|
|
|
7098
7098
|
const n = this.gl, s = this.CONTEXT_UID, a = this.renderer.buffer, o = r.program;
|
|
7099
7099
|
o.glPrograms[s] || this.renderer.shader.generateProgram(r), this.checkCompatibility(e, o);
|
|
7100
7100
|
const u = this.getSignature(e, o), h = e.glVertexArrayObjects[this.CONTEXT_UID];
|
|
7101
|
-
let
|
|
7102
|
-
if (
|
|
7103
|
-
return h[o.id] =
|
|
7104
|
-
const l = e.buffers, c = e.attributes,
|
|
7101
|
+
let f = h[u];
|
|
7102
|
+
if (f)
|
|
7103
|
+
return h[o.id] = f, f;
|
|
7104
|
+
const l = e.buffers, c = e.attributes, d = {}, p = {};
|
|
7105
7105
|
for (const m in l)
|
|
7106
|
-
|
|
7106
|
+
d[m] = 0, p[m] = 0;
|
|
7107
7107
|
for (const m in c)
|
|
7108
|
-
!c[m].size && o.attributeData[m] ? c[m].size = o.attributeData[m].size : c[m].size || console.warn(`PIXI Geometry attribute '${m}' size cannot be determined (likely the bound shader does not have the attribute)`),
|
|
7108
|
+
!c[m].size && o.attributeData[m] ? c[m].size = o.attributeData[m].size : c[m].size || console.warn(`PIXI Geometry attribute '${m}' size cannot be determined (likely the bound shader does not have the attribute)`), d[c[m].buffer] += c[m].size * ws[c[m].type];
|
|
7109
7109
|
for (const m in c) {
|
|
7110
7110
|
const v = c[m], g = v.size;
|
|
7111
|
-
v.stride === void 0 && (
|
|
7111
|
+
v.stride === void 0 && (d[v.buffer] === g * ws[v.type] ? v.stride = 0 : v.stride = d[v.buffer]), v.start === void 0 && (v.start = p[v.buffer], p[v.buffer] += g * ws[v.type]);
|
|
7112
7112
|
}
|
|
7113
|
-
|
|
7113
|
+
f = n.createVertexArray(), n.bindVertexArray(f);
|
|
7114
7114
|
for (let m = 0; m < l.length; m++) {
|
|
7115
7115
|
const v = l[m];
|
|
7116
7116
|
a.bind(v), i && v._glBuffers[s].refCount++;
|
|
7117
7117
|
}
|
|
7118
|
-
return this.activateVao(e, o), h[o.id] =
|
|
7118
|
+
return this.activateVao(e, o), h[o.id] = f, h[u] = f, n.bindVertexArray(null), a.unbind(gt.ARRAY_BUFFER), f;
|
|
7119
7119
|
}
|
|
7120
7120
|
disposeGeometry(e, r) {
|
|
7121
7121
|
var o;
|
|
@@ -7149,13 +7149,13 @@ class kc {
|
|
|
7149
7149
|
e.indexBuffer && s.bind(e.indexBuffer);
|
|
7150
7150
|
let u = null;
|
|
7151
7151
|
for (const h in o) {
|
|
7152
|
-
const
|
|
7152
|
+
const f = o[h], l = a[f.buffer], c = l._glBuffers[n];
|
|
7153
7153
|
if (r.attributeData[h]) {
|
|
7154
7154
|
u !== c && (s.bind(l), u = c);
|
|
7155
|
-
const
|
|
7156
|
-
if (i.enableVertexAttribArray(
|
|
7155
|
+
const d = r.attributeData[h].location;
|
|
7156
|
+
if (i.enableVertexAttribArray(d), i.vertexAttribPointer(d, f.size, f.type || i.FLOAT, f.normalized, f.stride, f.start), f.instance)
|
|
7157
7157
|
if (this.hasInstance)
|
|
7158
|
-
i.vertexAttribDivisor(
|
|
7158
|
+
i.vertexAttribDivisor(d, f.divisor);
|
|
7159
7159
|
else
|
|
7160
7160
|
throw new Error("geometry error, GPU Instancing is not supported on this device");
|
|
7161
7161
|
}
|
|
@@ -7356,8 +7356,8 @@ class Lc {
|
|
|
7356
7356
|
const s = this.renderer, a = s.renderTexture;
|
|
7357
7357
|
let o, u;
|
|
7358
7358
|
if (a.current) {
|
|
7359
|
-
const
|
|
7360
|
-
o = e.resolution ||
|
|
7359
|
+
const f = a.current;
|
|
7360
|
+
o = e.resolution || f.resolution, u = e.multisample ?? f.multisample;
|
|
7361
7361
|
} else
|
|
7362
7362
|
o = e.resolution || s.resolution, u = e.multisample ?? s.multisample;
|
|
7363
7363
|
n[0].resolution = o, n[0].multisample = u, n[0].maskSprite = r;
|
|
@@ -7602,8 +7602,8 @@ class jc {
|
|
|
7602
7602
|
clear(e, r) {
|
|
7603
7603
|
const i = this.current ? this.current.baseTexture.clear : this.renderer.background.backgroundColor, n = e ? Le.shared.setValue(e) : i, s = this.destinationFrame, a = this.current ? this.current.baseTexture : this.renderer._view.screen, o = s.width !== a.width || s.height !== a.height;
|
|
7604
7604
|
if (o) {
|
|
7605
|
-
let { x: u, y: h, width:
|
|
7606
|
-
u = Math.round(u), h = Math.round(h),
|
|
7605
|
+
let { x: u, y: h, width: f, height: l } = this.viewportFrame;
|
|
7606
|
+
u = Math.round(u), h = Math.round(h), f = Math.round(f), l = Math.round(l), this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST), this.renderer.gl.scissor(u, h, f, l);
|
|
7607
7607
|
}
|
|
7608
7608
|
this.renderer.framebuffer.clear(n.red, n.green, n.blue, n.alpha, r), o && this.renderer.scissor.pop();
|
|
7609
7609
|
}
|
|
@@ -7668,18 +7668,18 @@ function Yb(t, e) {
|
|
|
7668
7668
|
const s = (u = e.extra) == null ? void 0 : u.transformFeedbackVaryings;
|
|
7669
7669
|
if (s && (typeof t.transformFeedbackVaryings != "function" ? console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given.") : t.transformFeedbackVaryings(n, s.names, s.bufferMode === "separate" ? t.SEPARATE_ATTRIBS : t.INTERLEAVED_ATTRIBS)), t.linkProgram(n), t.getProgramParameter(n, t.LINK_STATUS) || Tb(t, n, r, i), e.attributeData = Wb(n, t), e.uniformData = qb(n, t), !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)) {
|
|
7670
7670
|
const h = Object.keys(e.attributeData);
|
|
7671
|
-
h.sort((
|
|
7672
|
-
for (let
|
|
7673
|
-
e.attributeData[h[
|
|
7671
|
+
h.sort((f, l) => f > l ? 1 : -1);
|
|
7672
|
+
for (let f = 0; f < h.length; f++)
|
|
7673
|
+
e.attributeData[h[f]].location = f, t.bindAttribLocation(n, f, h[f]);
|
|
7674
7674
|
t.linkProgram(n);
|
|
7675
7675
|
}
|
|
7676
7676
|
t.deleteShader(r), t.deleteShader(i);
|
|
7677
7677
|
const a = {};
|
|
7678
7678
|
for (const h in e.uniformData) {
|
|
7679
|
-
const
|
|
7679
|
+
const f = e.uniformData[h];
|
|
7680
7680
|
a[h] = {
|
|
7681
7681
|
location: t.getUniformLocation(n, h),
|
|
7682
|
-
value: wc(
|
|
7682
|
+
value: wc(f.type, f.size)
|
|
7683
7683
|
};
|
|
7684
7684
|
}
|
|
7685
7685
|
return new Xb(n, a);
|
|
@@ -7792,17 +7792,17 @@ function e1(t, e) {
|
|
|
7792
7792
|
`];
|
|
7793
7793
|
for (let a = 0; a < i.length; a++) {
|
|
7794
7794
|
const o = i[a], u = t.uniforms[o.data.name], h = o.data.name;
|
|
7795
|
-
let
|
|
7795
|
+
let f = !1;
|
|
7796
7796
|
for (let l = 0; l < Er.length; l++) {
|
|
7797
7797
|
const c = Er[l];
|
|
7798
7798
|
if (c.codeUbo && c.test(o.data, u)) {
|
|
7799
|
-
s.push(`offset = ${o.offset / 4};`, Er[l].codeUbo(o.data.name, u)),
|
|
7799
|
+
s.push(`offset = ${o.offset / 4};`, Er[l].codeUbo(o.data.name, u)), f = !0;
|
|
7800
7800
|
break;
|
|
7801
7801
|
}
|
|
7802
7802
|
}
|
|
7803
|
-
if (!
|
|
7803
|
+
if (!f)
|
|
7804
7804
|
if (o.data.size > 1) {
|
|
7805
|
-
const l = Ac(o.data.type), c = Math.max(Hc[o.data.type] / 16, 1),
|
|
7805
|
+
const l = Ac(o.data.type), c = Math.max(Hc[o.data.type] / 16, 1), d = l / c, p = (4 - d % 4) % 4;
|
|
7806
7806
|
s.push(`
|
|
7807
7807
|
cv = ud.${h}.value;
|
|
7808
7808
|
v = uv.${h};
|
|
@@ -7812,7 +7812,7 @@ function e1(t, e) {
|
|
|
7812
7812
|
|
|
7813
7813
|
for(var i=0; i < ${o.data.size * c}; i++)
|
|
7814
7814
|
{
|
|
7815
|
-
for(var j = 0; j < ${
|
|
7815
|
+
for(var j = 0; j < ${d}; j++)
|
|
7816
7816
|
{
|
|
7817
7817
|
data[offset++] = v[t++];
|
|
7818
7818
|
}
|
|
@@ -7944,11 +7944,11 @@ Gn.extension = {
|
|
|
7944
7944
|
};
|
|
7945
7945
|
ce.add(Gn);
|
|
7946
7946
|
function r1(t, e = []) {
|
|
7947
|
-
return e[
|
|
7947
|
+
return e[H.NORMAL] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.ADD] = [t.ONE, t.ONE], e[H.MULTIPLY] = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.SCREEN] = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.OVERLAY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.DARKEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.LIGHTEN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.COLOR_DODGE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.COLOR_BURN] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.HARD_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.SOFT_LIGHT] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.DIFFERENCE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.EXCLUSION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.HUE] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.SATURATION] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.COLOR] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.LUMINOSITY] = [t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.NONE] = [0, 0], e[H.NORMAL_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.ADD_NPM] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE], e[H.SCREEN_NPM] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA], e[H.SRC_IN] = [t.DST_ALPHA, t.ZERO], e[H.SRC_OUT] = [t.ONE_MINUS_DST_ALPHA, t.ZERO], e[H.SRC_ATOP] = [t.DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], e[H.DST_OVER] = [t.ONE_MINUS_DST_ALPHA, t.ONE], e[H.DST_IN] = [t.ZERO, t.SRC_ALPHA], e[H.DST_OUT] = [t.ZERO, t.ONE_MINUS_SRC_ALPHA], e[H.DST_ATOP] = [t.ONE_MINUS_DST_ALPHA, t.SRC_ALPHA], e[H.XOR] = [t.ONE_MINUS_DST_ALPHA, t.ONE_MINUS_SRC_ALPHA], e[H.SUBTRACT] = [t.ONE, t.ONE, t.ONE, t.ONE, t.FUNC_REVERSE_SUBTRACT, t.FUNC_ADD], e;
|
|
7948
7948
|
}
|
|
7949
7949
|
const i1 = 0, n1 = 1, s1 = 2, a1 = 3, o1 = 4, l1 = 5, ua = class {
|
|
7950
7950
|
constructor() {
|
|
7951
|
-
this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode =
|
|
7951
|
+
this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = H.NONE, this._blendEq = !1, this.map = [], this.map[i1] = this.setBlend, this.map[n1] = this.setOffset, this.map[s1] = this.setCullFace, this.map[a1] = this.setDepthTest, this.map[o1] = this.setFrontFace, this.map[l1] = this.setDepthMask, this.checks = [], this.defaultState = new Dn(), this.defaultState.blend = !0;
|
|
7952
7952
|
}
|
|
7953
7953
|
contextChange(t) {
|
|
7954
7954
|
this.gl = t, this.blendModes = r1(t), this.set(this.defaultState), this.reset();
|
|
@@ -9394,10 +9394,10 @@ let vi = class extends ue {
|
|
|
9394
9394
|
o = this._kernels[0] + 0.5, this.uniforms.uOffset[0] = o * s, this.uniforms.uOffset[1] = o * a, e.applyFilter(this, r, i, n);
|
|
9395
9395
|
else {
|
|
9396
9396
|
const u = e.getFilterTexture();
|
|
9397
|
-
let h = r,
|
|
9397
|
+
let h = r, f = u, l;
|
|
9398
9398
|
const c = this._quality - 1;
|
|
9399
|
-
for (let
|
|
9400
|
-
o = this._kernels[
|
|
9399
|
+
for (let d = 0; d < c; d++)
|
|
9400
|
+
o = this._kernels[d] + 0.5, this.uniforms.uOffset[0] = o * s, this.uniforms.uOffset[1] = o * a, e.applyFilter(this, h, f, 1), l = h, h = f, f = l;
|
|
9401
9401
|
o = this._kernels[c] + 0.5, this.uniforms.uOffset[0] = o * s, this.uniforms.uOffset[1] = o * a, e.applyFilter(this, h, i, n), e.returnFilterTexture(u);
|
|
9402
9402
|
}
|
|
9403
9403
|
}
|
|
@@ -9873,12 +9873,12 @@ ar.parse = function() {
|
|
|
9873
9873
|
}
|
|
9874
9874
|
}
|
|
9875
9875
|
function u() {
|
|
9876
|
-
return h() ||
|
|
9876
|
+
return h() || f();
|
|
9877
9877
|
}
|
|
9878
9878
|
function h() {
|
|
9879
9879
|
return E("directional", t.sideOrCorner, 1);
|
|
9880
9880
|
}
|
|
9881
|
-
function
|
|
9881
|
+
function f() {
|
|
9882
9882
|
return E("angular", t.angleValue, 1);
|
|
9883
9883
|
}
|
|
9884
9884
|
function l() {
|
|
@@ -9886,7 +9886,7 @@ ar.parse = function() {
|
|
|
9886
9886
|
return U && (R = [], R.push(U), X = e, L(t.comma) && (U = c(), U ? R.push(U) : e = X)), R;
|
|
9887
9887
|
}
|
|
9888
9888
|
function c() {
|
|
9889
|
-
var R =
|
|
9889
|
+
var R = d() || p();
|
|
9890
9890
|
if (R)
|
|
9891
9891
|
R.at = v();
|
|
9892
9892
|
else {
|
|
@@ -9902,7 +9902,7 @@ ar.parse = function() {
|
|
|
9902
9902
|
}
|
|
9903
9903
|
return R;
|
|
9904
9904
|
}
|
|
9905
|
-
function
|
|
9905
|
+
function d() {
|
|
9906
9906
|
var R = E("shape", /^(circle)/i, 0);
|
|
9907
9907
|
return R && (R.style = I() || m()), R;
|
|
9908
9908
|
}
|
|
@@ -10002,10 +10002,10 @@ function M1(t) {
|
|
|
10002
10002
|
var u = e[1], h = u === "rgb", s = u.replace(/a$/, "");
|
|
10003
10003
|
n = s;
|
|
10004
10004
|
var a = s === "cmyk" ? 4 : s === "gray" ? 1 : 3;
|
|
10005
|
-
r = e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,
|
|
10005
|
+
r = e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c, d) {
|
|
10006
10006
|
if (/%$/.test(c))
|
|
10007
|
-
return
|
|
10008
|
-
if (s[
|
|
10007
|
+
return d === a ? parseFloat(c) / 100 : s === "rgb" ? parseFloat(c) * 255 / 100 : parseFloat(c);
|
|
10008
|
+
if (s[d] === "h") {
|
|
10009
10009
|
if (/deg$/.test(c))
|
|
10010
10010
|
return parseFloat(c);
|
|
10011
10011
|
if (Hl[c] !== void 0)
|
|
@@ -10014,8 +10014,8 @@ function M1(t) {
|
|
|
10014
10014
|
return parseFloat(c);
|
|
10015
10015
|
}), u === s && r.push(1), i = h || r[a] === void 0 ? 1 : r[a], r = r.slice(0, a);
|
|
10016
10016
|
} else
|
|
10017
|
-
t.length > 10 && /[0-9](?:\s|\/)/.test(t) && (r = t.match(/([0-9]+)/g).map(function(
|
|
10018
|
-
return parseFloat(
|
|
10017
|
+
t.length > 10 && /[0-9](?:\s|\/)/.test(t) && (r = t.match(/([0-9]+)/g).map(function(f) {
|
|
10018
|
+
return parseFloat(f);
|
|
10019
10019
|
}), n = t.match(/([a-z])/ig).join("").toLowerCase());
|
|
10020
10020
|
else
|
|
10021
10021
|
isNaN(t) ? Array.isArray(t) || t.length ? (r = [t[0], t[1], t[2]], n = "rgb", i = t.length === 4 ? t[3] : 1) : t instanceof Object && (t.r != null || t.red != null || t.R != null ? (n = "rgb", r = [t.r || t.red || t.R || 0, t.g || t.green || t.G || 0, t.b || t.blue || t.B || 0]) : (n = "hsl", r = [t.h || t.hue || t.H || 0, t.s || t.saturation || t.S || 0, t.l || t.lightness || t.L || t.b || t.brightness]), i = t.a || t.alpha || t.opacity || 1, t.opacity != null && (i /= 100)) : (n = "rgb", r = [t >>> 16, (t & 65280) >>> 8, t & 255]);
|
|
@@ -10459,8 +10459,8 @@ const da = class extends ue {
|
|
|
10459
10459
|
super(), this.angle = 45, this._distance = 5, this._resolution = Q.FILTER_RESOLUTION;
|
|
10460
10460
|
const r = e ? Kl(Kl({}, da.defaults), e) : da.defaults, { kernels: i, blur: n, quality: s, pixelSize: a, resolution: o } = r;
|
|
10461
10461
|
this._offset = new qt(this._updatePadding, this), this._tintFilter = new ue(iT, nT), this._tintFilter.uniforms.color = new Float32Array(4), this._tintFilter.uniforms.shift = this._offset, this._tintFilter.resolution = o, this._blurFilter = i ? new vi(i) : new vi(n, s), this.pixelSize = a, this.resolution = o;
|
|
10462
|
-
const { shadowOnly: u, rotation: h, distance:
|
|
10463
|
-
this.shadowOnly = u, h !== void 0 &&
|
|
10462
|
+
const { shadowOnly: u, rotation: h, distance: f, offset: l, alpha: c, color: d } = r;
|
|
10463
|
+
this.shadowOnly = u, h !== void 0 && f !== void 0 ? (this.rotation = h, this.distance = f) : this.offset = l, this.alpha = c, this.color = d;
|
|
10464
10464
|
}
|
|
10465
10465
|
apply(e, r, i, n) {
|
|
10466
10466
|
const s = e.getFilterTexture();
|
|
@@ -12035,10 +12035,10 @@ const or = (t) => {
|
|
|
12035
12035
|
gamma: o = 1,
|
|
12036
12036
|
green: u = 1,
|
|
12037
12037
|
blurRadius: h = 0,
|
|
12038
|
-
temperature:
|
|
12038
|
+
temperature: f = 0,
|
|
12039
12039
|
hue: l = 0,
|
|
12040
12040
|
sharpness: c = 0,
|
|
12041
|
-
vignette:
|
|
12041
|
+
vignette: d = 0,
|
|
12042
12042
|
noise: p = 0
|
|
12043
12043
|
// outline = 0,
|
|
12044
12044
|
// outlineColor = 0x000000,
|
|
@@ -12059,7 +12059,7 @@ const or = (t) => {
|
|
|
12059
12059
|
}
|
|
12060
12060
|
`
|
|
12061
12061
|
);
|
|
12062
|
-
m.uniforms.temperature =
|
|
12062
|
+
m.uniforms.temperature = f;
|
|
12063
12063
|
const v = new J1([
|
|
12064
12064
|
0,
|
|
12065
12065
|
-c,
|
|
@@ -12073,7 +12073,7 @@ const or = (t) => {
|
|
|
12073
12073
|
]), g = new ze.filters.ColorMatrixFilter();
|
|
12074
12074
|
g.hue(l, !1);
|
|
12075
12075
|
const y = new vi(h, 1, !0), _ = new ch({
|
|
12076
|
-
vignetting:
|
|
12076
|
+
vignetting: d
|
|
12077
12077
|
}), x = new ze.filters.NoiseFilter(p);
|
|
12078
12078
|
return {
|
|
12079
12079
|
adjustmentFilter: new v1({
|
|
@@ -12146,7 +12146,7 @@ const or = (t) => {
|
|
|
12146
12146
|
vignetteFilter: r
|
|
12147
12147
|
};
|
|
12148
12148
|
}, XT = k.forwardRef((t, e) => {
|
|
12149
|
-
const r =
|
|
12149
|
+
const r = z(null), i = z(null), {
|
|
12150
12150
|
src: n,
|
|
12151
12151
|
visible: s,
|
|
12152
12152
|
disabled: a,
|
|
@@ -12154,10 +12154,10 @@ const or = (t) => {
|
|
|
12154
12154
|
x: o,
|
|
12155
12155
|
y: u,
|
|
12156
12156
|
width: h,
|
|
12157
|
-
height:
|
|
12157
|
+
height: f,
|
|
12158
12158
|
anchor: l,
|
|
12159
12159
|
colorCorrection: c = {},
|
|
12160
|
-
effect:
|
|
12160
|
+
effect: d
|
|
12161
12161
|
},
|
|
12162
12162
|
pointerdown: p
|
|
12163
12163
|
} = t, {
|
|
@@ -12182,7 +12182,7 @@ const or = (t) => {
|
|
|
12182
12182
|
{
|
|
12183
12183
|
image: n,
|
|
12184
12184
|
width: h,
|
|
12185
|
-
height:
|
|
12185
|
+
height: f,
|
|
12186
12186
|
anchor: l,
|
|
12187
12187
|
ref: r,
|
|
12188
12188
|
alpha: s ? 1 : 0,
|
|
@@ -12197,7 +12197,7 @@ const or = (t) => {
|
|
|
12197
12197
|
// conditionally add blur filter
|
|
12198
12198
|
...m > 0 ? [b] : [],
|
|
12199
12199
|
// conditionally add night vision filter
|
|
12200
|
-
...
|
|
12200
|
+
...d === Xt.NightVision ? [A] : [],
|
|
12201
12201
|
// conditionally add vignette filter
|
|
12202
12202
|
...v > 0 ? [w] : [],
|
|
12203
12203
|
// conditionally add noise filter
|
|
@@ -12237,21 +12237,21 @@ const bn = {
|
|
|
12237
12237
|
e.length = 8, e[0] = e[6] = r + n, e[1] = e[3] = i + s, e[2] = e[4] = r - n, e[5] = e[7] = i - s;
|
|
12238
12238
|
return;
|
|
12239
12239
|
}
|
|
12240
|
-
let
|
|
12240
|
+
let f = 0, l = u * 4 + (n ? 2 : 0) + 2, c = l, d = h;
|
|
12241
12241
|
{
|
|
12242
12242
|
const p = n + a, m = s, v = r + p, g = r - p, y = i + m;
|
|
12243
|
-
if (e[
|
|
12243
|
+
if (e[f++] = v, e[f++] = y, e[--l] = y, e[--l] = g, s) {
|
|
12244
12244
|
const _ = i - m;
|
|
12245
|
-
e[c++] = g, e[c++] = _, e[--
|
|
12245
|
+
e[c++] = g, e[c++] = _, e[--d] = _, e[--d] = v;
|
|
12246
12246
|
}
|
|
12247
12247
|
}
|
|
12248
12248
|
for (let p = 1; p < u; p++) {
|
|
12249
12249
|
const m = Math.PI / 2 * (p / u), v = n + Math.cos(m) * a, g = s + Math.sin(m) * o, y = r + v, _ = r - v, x = i + g, b = i - g;
|
|
12250
|
-
e[
|
|
12250
|
+
e[f++] = y, e[f++] = x, e[--l] = x, e[--l] = _, e[c++] = _, e[c++] = b, e[--d] = b, e[--d] = y;
|
|
12251
12251
|
}
|
|
12252
12252
|
{
|
|
12253
12253
|
const p = n, m = s + o, v = r + p, g = r - p, y = i + m, _ = i - m;
|
|
12254
|
-
e[
|
|
12254
|
+
e[f++] = v, e[f++] = y, e[--d] = _, e[--d] = v, n && (e[f++] = g, e[f++] = y, e[--d] = _, e[--d] = g);
|
|
12255
12255
|
}
|
|
12256
12256
|
},
|
|
12257
12257
|
triangulate(t, e) {
|
|
@@ -12262,16 +12262,16 @@ const bn = {
|
|
|
12262
12262
|
const a = s;
|
|
12263
12263
|
let o, u;
|
|
12264
12264
|
if (t.type !== Fe.RREC) {
|
|
12265
|
-
const
|
|
12266
|
-
o =
|
|
12265
|
+
const f = t.shape;
|
|
12266
|
+
o = f.x, u = f.y;
|
|
12267
12267
|
} else {
|
|
12268
|
-
const
|
|
12269
|
-
o =
|
|
12268
|
+
const f = t.shape;
|
|
12269
|
+
o = f.x + f.width / 2, u = f.y + f.height / 2;
|
|
12270
12270
|
}
|
|
12271
12271
|
const h = t.matrix;
|
|
12272
12272
|
i.push(t.matrix ? h.a * o + h.c * u + h.tx : o, t.matrix ? h.b * o + h.d * u + h.ty : u), s++, i.push(r[0], r[1]);
|
|
12273
|
-
for (let
|
|
12274
|
-
i.push(r[
|
|
12273
|
+
for (let f = 2; f < r.length; f += 2)
|
|
12274
|
+
i.push(r[f], r[f + 1]), n.push(s++, a, s);
|
|
12275
12275
|
n.push(a + 1, a, s);
|
|
12276
12276
|
}
|
|
12277
12277
|
};
|
|
@@ -12303,8 +12303,8 @@ const vh = {
|
|
|
12303
12303
|
Jl(r, !1);
|
|
12304
12304
|
const a = [];
|
|
12305
12305
|
for (let h = 0; h < i.length; h++) {
|
|
12306
|
-
const
|
|
12307
|
-
Jl(
|
|
12306
|
+
const f = i[h];
|
|
12307
|
+
Jl(f.points, !0), a.push(r.length / 2), r = r.concat(f.points);
|
|
12308
12308
|
}
|
|
12309
12309
|
const o = P_(r, a, 2);
|
|
12310
12310
|
if (!o)
|
|
@@ -12352,23 +12352,23 @@ const Fr = {
|
|
|
12352
12352
|
};
|
|
12353
12353
|
class eu {
|
|
12354
12354
|
static curveTo(e, r, i, n, s, a) {
|
|
12355
|
-
const o = a[a.length - 2], h = a[a.length - 1] - r,
|
|
12356
|
-
if (
|
|
12355
|
+
const o = a[a.length - 2], h = a[a.length - 1] - r, f = o - e, l = n - r, c = i - e, d = Math.abs(h * c - f * l);
|
|
12356
|
+
if (d < 1e-8 || s === 0)
|
|
12357
12357
|
return (a[a.length - 2] !== e || a[a.length - 1] !== r) && a.push(e, r), null;
|
|
12358
|
-
const p = h * h +
|
|
12358
|
+
const p = h * h + f * f, m = l * l + c * c, v = h * l + f * c, g = s * Math.sqrt(p) / d, y = s * Math.sqrt(m) / d, _ = g * v / p, x = y * v / m, b = g * c + y * f, T = g * l + y * h, w = f * (y + _), S = h * (y + _), A = c * (g + x), C = l * (g + x), M = Math.atan2(S - T, w - b), G = Math.atan2(C - T, A - b);
|
|
12359
12359
|
return {
|
|
12360
12360
|
cx: b + e,
|
|
12361
12361
|
cy: T + r,
|
|
12362
12362
|
radius: s,
|
|
12363
12363
|
startAngle: M,
|
|
12364
12364
|
endAngle: G,
|
|
12365
|
-
anticlockwise:
|
|
12365
|
+
anticlockwise: f * l > c * h
|
|
12366
12366
|
};
|
|
12367
12367
|
}
|
|
12368
12368
|
static arc(e, r, i, n, s, a, o, u, h) {
|
|
12369
|
-
const
|
|
12369
|
+
const f = o - a, l = Fr._segmentsCount(Math.abs(f) * s, Math.ceil(Math.abs(f) / yn) * 40), c = f / (l * 2), d = c * 2, p = Math.cos(c), m = Math.sin(c), v = l - 1, g = v % 1 / v;
|
|
12370
12370
|
for (let y = 0; y <= v; ++y) {
|
|
12371
|
-
const _ = y + g * y, x = c + a +
|
|
12371
|
+
const _ = y + g * y, x = c + a + d * _, b = Math.cos(x), T = -Math.sin(x);
|
|
12372
12372
|
h.push((p * b + m * T) * s + i, (p * -T + m * b) * s + n);
|
|
12373
12373
|
}
|
|
12374
12374
|
}
|
|
@@ -12389,34 +12389,34 @@ class YT {
|
|
|
12389
12389
|
}
|
|
12390
12390
|
class Xa {
|
|
12391
12391
|
static curveLength(e, r, i, n, s, a, o, u) {
|
|
12392
|
-
let
|
|
12392
|
+
let f = 0, l = 0, c = 0, d = 0, p = 0, m = 0, v = 0, g = 0, y = 0, _ = 0, x = 0, b = e, T = r;
|
|
12393
12393
|
for (let w = 1; w <= 10; ++w)
|
|
12394
|
-
l = w / 10, c = l * l,
|
|
12395
|
-
return
|
|
12394
|
+
l = w / 10, c = l * l, d = c * l, p = 1 - l, m = p * p, v = m * p, g = v * e + 3 * m * l * i + 3 * p * c * s + d * o, y = v * r + 3 * m * l * n + 3 * p * c * a + d * u, _ = b - g, x = T - y, b = g, T = y, f += Math.sqrt(_ * _ + x * x);
|
|
12395
|
+
return f;
|
|
12396
12396
|
}
|
|
12397
12397
|
static curveTo(e, r, i, n, s, a, o) {
|
|
12398
12398
|
const u = o[o.length - 2], h = o[o.length - 1];
|
|
12399
12399
|
o.length -= 2;
|
|
12400
|
-
const
|
|
12401
|
-
let l = 0, c = 0,
|
|
12400
|
+
const f = Fr._segmentsCount(Xa.curveLength(u, h, e, r, i, n, s, a));
|
|
12401
|
+
let l = 0, c = 0, d = 0, p = 0, m = 0;
|
|
12402
12402
|
o.push(u, h);
|
|
12403
|
-
for (let v = 1, g = 0; v <=
|
|
12404
|
-
g = v /
|
|
12403
|
+
for (let v = 1, g = 0; v <= f; ++v)
|
|
12404
|
+
g = v / f, l = 1 - g, c = l * l, d = c * l, p = g * g, m = p * g, o.push(d * u + 3 * c * g * e + 3 * l * p * i + m * s, d * h + 3 * c * g * r + 3 * l * p * n + m * a);
|
|
12405
12405
|
}
|
|
12406
12406
|
}
|
|
12407
12407
|
function tu(t, e, r, i, n, s, a, o) {
|
|
12408
|
-
const u = t - r * n, h = e - i * n,
|
|
12409
|
-
let c,
|
|
12410
|
-
a ? (c = i,
|
|
12411
|
-
const p = u + c, m = h +
|
|
12408
|
+
const u = t - r * n, h = e - i * n, f = t + r * s, l = e + i * s;
|
|
12409
|
+
let c, d;
|
|
12410
|
+
a ? (c = i, d = -r) : (c = -i, d = r);
|
|
12411
|
+
const p = u + c, m = h + d, v = f + c, g = l + d;
|
|
12412
12412
|
return o.push(p, m, v, g), 2;
|
|
12413
12413
|
}
|
|
12414
12414
|
function Ut(t, e, r, i, n, s, a, o) {
|
|
12415
12415
|
const u = r - t, h = i - e;
|
|
12416
|
-
let
|
|
12417
|
-
o &&
|
|
12418
|
-
let c =
|
|
12419
|
-
const
|
|
12416
|
+
let f = Math.atan2(u, h), l = Math.atan2(n - t, s - e);
|
|
12417
|
+
o && f < l ? f += Math.PI * 2 : !o && f > l && (l += Math.PI * 2);
|
|
12418
|
+
let c = f;
|
|
12419
|
+
const d = l - f, p = Math.abs(d), m = Math.sqrt(u * u + h * h), v = (15 * p * Math.sqrt(m) / Math.PI >> 0) + 1, g = d / v;
|
|
12420
12420
|
if (c += g, o) {
|
|
12421
12421
|
a.push(t, e, r, i);
|
|
12422
12422
|
for (let y = 1, _ = c; y < v; y++, _ += g)
|
|
@@ -12442,18 +12442,18 @@ function KT(t, e) {
|
|
|
12442
12442
|
const R = (a.x + o.x) * 0.5, U = (o.y + a.y) * 0.5;
|
|
12443
12443
|
i.unshift(R, U), i.push(R, U);
|
|
12444
12444
|
}
|
|
12445
|
-
const
|
|
12445
|
+
const f = e.points, l = i.length / 2;
|
|
12446
12446
|
let c = i.length;
|
|
12447
|
-
const
|
|
12447
|
+
const d = f.length / 2, p = s.width / 2, m = p * p, v = s.miterLimit * s.miterLimit;
|
|
12448
12448
|
let g = i[0], y = i[1], _ = i[2], x = i[3], b = 0, T = 0, w = -(y - x), S = g - _, A = 0, C = 0, M = Math.sqrt(w * w + S * S);
|
|
12449
12449
|
w /= M, S /= M, w *= p, S *= p;
|
|
12450
12450
|
const G = s.alignment, I = (1 - G) * 2, E = G * 2;
|
|
12451
|
-
u || (s.cap === Yt.ROUND ? c += Ut(g - w * (I - E) * 0.5, y - S * (I - E) * 0.5, g - w * I, y - S * I, g + w * E, y + S * E,
|
|
12451
|
+
u || (s.cap === Yt.ROUND ? c += Ut(g - w * (I - E) * 0.5, y - S * (I - E) * 0.5, g - w * I, y - S * I, g + w * E, y + S * E, f, !0) + 2 : s.cap === Yt.SQUARE && (c += tu(g, y, w, S, I, E, !0, f))), f.push(g - w * I, y - S * I, g + w * E, y + S * E);
|
|
12452
12452
|
for (let R = 1; R < l - 1; ++R) {
|
|
12453
12453
|
g = i[(R - 1) * 2], y = i[(R - 1) * 2 + 1], _ = i[R * 2], x = i[R * 2 + 1], b = i[(R + 1) * 2], T = i[(R + 1) * 2 + 1], w = -(y - x), S = g - _, M = Math.sqrt(w * w + S * S), w /= M, S /= M, w *= p, S *= p, A = -(x - T), C = _ - b, M = Math.sqrt(A * A + C * C), A /= M, C /= M, A *= p, C *= p;
|
|
12454
|
-
const U = _ - g, X = y - x, P = _ - b, F = T - x,
|
|
12455
|
-
if (Math.abs(V) < 1e-3 * Math.abs(
|
|
12456
|
-
|
|
12454
|
+
const U = _ - g, X = y - x, P = _ - b, F = T - x, j = U * P + X * F, V = X * P - F * U, W = V < 0;
|
|
12455
|
+
if (Math.abs(V) < 1e-3 * Math.abs(j)) {
|
|
12456
|
+
f.push(_ - w * I, x - S * I, _ + w * E, x + S * E), j >= 0 && (s.join === rt.ROUND ? c += Ut(_, x, _ - w * I, x - S * I, _ - A * I, x - C * I, f, !1) + 4 : c += 2, f.push(_ - A * E, x - C * E, _ + A * I, x + C * I));
|
|
12457
12457
|
continue;
|
|
12458
12458
|
}
|
|
12459
12459
|
const re = (-w + g) * (-S + x) - (-w + _) * (-S + y), ne = (-A + b) * (-C + x) - (-A + _) * (-C + T), oe = (U * ne - P * re) / V, pe = (F * re - X * ne) / V, he = (oe - _) * (oe - _) + (pe - x) * (pe - x), $ = _ + (oe - _) * I, q = x + (pe - x) * I, Y = _ - (oe - _) * E, fe = x - (pe - x) * E, Oe = Math.min(U * U + X * X, P * P + F * F), Ne = W ? I : E, Je = Oe + Ne * Ne * m, Z = he <= Je;
|
|
@@ -12461,36 +12461,36 @@ function KT(t, e) {
|
|
|
12461
12461
|
if (le === rt.MITER && he / m > v && (le = rt.BEVEL), Z)
|
|
12462
12462
|
switch (le) {
|
|
12463
12463
|
case rt.MITER: {
|
|
12464
|
-
|
|
12464
|
+
f.push($, q, Y, fe);
|
|
12465
12465
|
break;
|
|
12466
12466
|
}
|
|
12467
12467
|
case rt.BEVEL: {
|
|
12468
|
-
W ?
|
|
12468
|
+
W ? f.push($, q, _ + w * E, x + S * E, $, q, _ + A * E, x + C * E) : f.push(_ - w * I, x - S * I, Y, fe, _ - A * I, x - C * I, Y, fe), c += 2;
|
|
12469
12469
|
break;
|
|
12470
12470
|
}
|
|
12471
12471
|
case rt.ROUND: {
|
|
12472
|
-
W ? (
|
|
12472
|
+
W ? (f.push($, q, _ + w * E, x + S * E), c += Ut(_, x, _ + w * E, x + S * E, _ + A * E, x + C * E, f, !0) + 4, f.push($, q, _ + A * E, x + C * E)) : (f.push(_ - w * I, x - S * I, Y, fe), c += Ut(_, x, _ - w * I, x - S * I, _ - A * I, x - C * I, f, !1) + 4, f.push(_ - A * I, x - C * I, Y, fe));
|
|
12473
12473
|
break;
|
|
12474
12474
|
}
|
|
12475
12475
|
}
|
|
12476
12476
|
else {
|
|
12477
|
-
switch (
|
|
12477
|
+
switch (f.push(_ - w * I, x - S * I, _ + w * E, x + S * E), le) {
|
|
12478
12478
|
case rt.MITER: {
|
|
12479
|
-
W ?
|
|
12479
|
+
W ? f.push(Y, fe, Y, fe) : f.push($, q, $, q), c += 2;
|
|
12480
12480
|
break;
|
|
12481
12481
|
}
|
|
12482
12482
|
case rt.ROUND: {
|
|
12483
|
-
W ? c += Ut(_, x, _ + w * E, x + S * E, _ + A * E, x + C * E,
|
|
12483
|
+
W ? c += Ut(_, x, _ + w * E, x + S * E, _ + A * E, x + C * E, f, !0) + 2 : c += Ut(_, x, _ - w * I, x - S * I, _ - A * I, x - C * I, f, !1) + 2;
|
|
12484
12484
|
break;
|
|
12485
12485
|
}
|
|
12486
12486
|
}
|
|
12487
|
-
|
|
12487
|
+
f.push(_ - A * I, x - C * I, _ + A * E, x + C * E), c += 2;
|
|
12488
12488
|
}
|
|
12489
12489
|
}
|
|
12490
|
-
g = i[(l - 2) * 2], y = i[(l - 2) * 2 + 1], _ = i[(l - 1) * 2], x = i[(l - 1) * 2 + 1], w = -(y - x), S = g - _, M = Math.sqrt(w * w + S * S), w /= M, S /= M, w *= p, S *= p,
|
|
12490
|
+
g = i[(l - 2) * 2], y = i[(l - 2) * 2 + 1], _ = i[(l - 1) * 2], x = i[(l - 1) * 2 + 1], w = -(y - x), S = g - _, M = Math.sqrt(w * w + S * S), w /= M, S /= M, w *= p, S *= p, f.push(_ - w * I, x - S * I, _ + w * E, x + S * E), u || (s.cap === Yt.ROUND ? c += Ut(_ - w * (I - E) * 0.5, x - S * (I - E) * 0.5, _ - w * I, x - S * I, _ + w * E, x + S * E, f, !1) + 2 : s.cap === Yt.SQUARE && (c += tu(_, x, w, S, I, E, !1, f)));
|
|
12491
12491
|
const L = e.indices, B = Fr.epsilon * Fr.epsilon;
|
|
12492
|
-
for (let R =
|
|
12493
|
-
g =
|
|
12492
|
+
for (let R = d; R < c + d - 2; ++R)
|
|
12493
|
+
g = f[R * 2], y = f[R * 2 + 1], _ = f[(R + 1) * 2], x = f[(R + 1) * 2 + 1], b = f[(R + 2) * 2], T = f[(R + 2) * 2 + 1], !(Math.abs(g * (x - T) + _ * (T - y) + b * (y - x)) < B) && L.push(R, R + 1, R + 2);
|
|
12494
12494
|
}
|
|
12495
12495
|
function ZT(t, e) {
|
|
12496
12496
|
let r = 0;
|
|
@@ -12498,25 +12498,25 @@ function ZT(t, e) {
|
|
|
12498
12498
|
if (n.length === 0)
|
|
12499
12499
|
return;
|
|
12500
12500
|
const a = e.points, o = e.indices, u = n.length / 2, h = a.length / 2;
|
|
12501
|
-
let
|
|
12501
|
+
let f = h;
|
|
12502
12502
|
for (a.push(n[0], n[1]), r = 1; r < u; r++)
|
|
12503
|
-
a.push(n[r * 2], n[r * 2 + 1]), o.push(
|
|
12504
|
-
s && o.push(
|
|
12503
|
+
a.push(n[r * 2], n[r * 2 + 1]), o.push(f, f + 1), f++;
|
|
12504
|
+
s && o.push(f, h);
|
|
12505
12505
|
}
|
|
12506
12506
|
function ru(t, e) {
|
|
12507
12507
|
t.lineStyle.native ? ZT(t, e) : KT(t, e);
|
|
12508
12508
|
}
|
|
12509
12509
|
class Wa {
|
|
12510
12510
|
static curveLength(e, r, i, n, s, a) {
|
|
12511
|
-
const o = e - 2 * i + s, u = r - 2 * n + a, h = 2 * i - 2 * e,
|
|
12512
|
-
return (v * p + m * c * (p - g) + (4 *
|
|
12511
|
+
const o = e - 2 * i + s, u = r - 2 * n + a, h = 2 * i - 2 * e, f = 2 * n - 2 * r, l = 4 * (o * o + u * u), c = 4 * (o * h + u * f), d = h * h + f * f, p = 2 * Math.sqrt(l + c + d), m = Math.sqrt(l), v = 2 * l * m, g = 2 * Math.sqrt(d), y = c / m;
|
|
12512
|
+
return (v * p + m * c * (p - g) + (4 * d * l - c * c) * Math.log((2 * m + y + p) / (y + g))) / (4 * v);
|
|
12513
12513
|
}
|
|
12514
12514
|
static curveTo(e, r, i, n, s) {
|
|
12515
12515
|
const a = s[s.length - 2], o = s[s.length - 1], u = Fr._segmentsCount(Wa.curveLength(a, o, e, r, i, n));
|
|
12516
|
-
let h = 0,
|
|
12516
|
+
let h = 0, f = 0;
|
|
12517
12517
|
for (let l = 1; l <= u; ++l) {
|
|
12518
12518
|
const c = l / u;
|
|
12519
|
-
h = a + (e - a) * c,
|
|
12519
|
+
h = a + (e - a) * c, f = o + (r - o) * c, s.push(h + (e + (i - e) * c - h) * c, f + (r + (n - r) * c - f) * c);
|
|
12520
12520
|
}
|
|
12521
12521
|
}
|
|
12522
12522
|
}
|
|
@@ -12544,8 +12544,8 @@ class ma {
|
|
|
12544
12544
|
this.minX = Math.min(this.minX, e.x), this.maxX = Math.max(this.maxX, e.x), this.minY = Math.min(this.minY, e.y), this.maxY = Math.max(this.maxY, e.y);
|
|
12545
12545
|
}
|
|
12546
12546
|
addPointMatrix(e, r) {
|
|
12547
|
-
const { a: i, b: n, c: s, d: a, tx: o, ty: u } = e, h = i * r.x + s * r.y + o,
|
|
12548
|
-
this.minX = Math.min(this.minX, h), this.maxX = Math.max(this.maxX, h), this.minY = Math.min(this.minY,
|
|
12547
|
+
const { a: i, b: n, c: s, d: a, tx: o, ty: u } = e, h = i * r.x + s * r.y + o, f = n * r.x + a * r.y + u;
|
|
12548
|
+
this.minX = Math.min(this.minX, h), this.maxX = Math.max(this.maxX, h), this.minY = Math.min(this.minY, f), this.maxY = Math.max(this.maxY, f);
|
|
12549
12549
|
}
|
|
12550
12550
|
addQuad(e) {
|
|
12551
12551
|
let r = this.minX, i = this.minY, n = this.maxX, s = this.maxY, a = e[0], o = e[1];
|
|
@@ -12555,15 +12555,15 @@ class ma {
|
|
|
12555
12555
|
this.addFrameMatrix(e.worldTransform, r, i, n, s);
|
|
12556
12556
|
}
|
|
12557
12557
|
addFrameMatrix(e, r, i, n, s) {
|
|
12558
|
-
const a = e.a, o = e.b, u = e.c, h = e.d,
|
|
12559
|
-
let c = this.minX,
|
|
12560
|
-
c = v < c ? v : c,
|
|
12558
|
+
const a = e.a, o = e.b, u = e.c, h = e.d, f = e.tx, l = e.ty;
|
|
12559
|
+
let c = this.minX, d = this.minY, p = this.maxX, m = this.maxY, v = a * r + u * i + f, g = o * r + h * i + l;
|
|
12560
|
+
c = v < c ? v : c, d = g < d ? g : d, p = v > p ? v : p, m = g > m ? g : m, v = a * n + u * i + f, g = o * n + h * i + l, c = v < c ? v : c, d = g < d ? g : d, p = v > p ? v : p, m = g > m ? g : m, v = a * r + u * s + f, g = o * r + h * s + l, c = v < c ? v : c, d = g < d ? g : d, p = v > p ? v : p, m = g > m ? g : m, v = a * n + u * s + f, g = o * n + h * s + l, c = v < c ? v : c, d = g < d ? g : d, p = v > p ? v : p, m = g > m ? g : m, this.minX = c, this.minY = d, this.maxX = p, this.maxY = m;
|
|
12561
12561
|
}
|
|
12562
12562
|
addVertexData(e, r, i) {
|
|
12563
12563
|
let n = this.minX, s = this.minY, a = this.maxX, o = this.maxY;
|
|
12564
12564
|
for (let u = r; u < i; u += 2) {
|
|
12565
|
-
const h = e[u],
|
|
12566
|
-
n = h < n ? h : n, s =
|
|
12565
|
+
const h = e[u], f = e[u + 1];
|
|
12566
|
+
n = h < n ? h : n, s = f < s ? f : s, a = h > a ? h : a, o = f > o ? f : o;
|
|
12567
12567
|
}
|
|
12568
12568
|
this.minX = n, this.minY = s, this.maxX = a, this.maxY = o;
|
|
12569
12569
|
}
|
|
@@ -12571,13 +12571,13 @@ class ma {
|
|
|
12571
12571
|
this.addVerticesMatrix(e.worldTransform, r, i, n);
|
|
12572
12572
|
}
|
|
12573
12573
|
addVerticesMatrix(e, r, i, n, s = 0, a = s) {
|
|
12574
|
-
const o = e.a, u = e.b, h = e.c,
|
|
12575
|
-
let
|
|
12574
|
+
const o = e.a, u = e.b, h = e.c, f = e.d, l = e.tx, c = e.ty;
|
|
12575
|
+
let d = this.minX, p = this.minY, m = this.maxX, v = this.maxY;
|
|
12576
12576
|
for (let g = i; g < n; g += 2) {
|
|
12577
|
-
const y = r[g], _ = r[g + 1], x = o * y + h * _ + l, b =
|
|
12578
|
-
|
|
12577
|
+
const y = r[g], _ = r[g + 1], x = o * y + h * _ + l, b = f * _ + u * y + c;
|
|
12578
|
+
d = Math.min(d, x - s), m = Math.max(m, x + s), p = Math.min(p, b - a), v = Math.max(v, b + a);
|
|
12579
12579
|
}
|
|
12580
|
-
this.minX =
|
|
12580
|
+
this.minX = d, this.minY = p, this.maxX = m, this.maxY = v;
|
|
12581
12581
|
}
|
|
12582
12582
|
addBounds(e) {
|
|
12583
12583
|
const r = this.minX, i = this.minY, n = this.maxX, s = this.maxY;
|
|
@@ -12586,8 +12586,8 @@ class ma {
|
|
|
12586
12586
|
addBoundsMask(e, r) {
|
|
12587
12587
|
const i = e.minX > r.minX ? e.minX : r.minX, n = e.minY > r.minY ? e.minY : r.minY, s = e.maxX < r.maxX ? e.maxX : r.maxX, a = e.maxY < r.maxY ? e.maxY : r.maxY;
|
|
12588
12588
|
if (i <= s && n <= a) {
|
|
12589
|
-
const o = this.minX, u = this.minY, h = this.maxX,
|
|
12590
|
-
this.minX = i < o ? i : o, this.minY = n < u ? n : u, this.maxX = s > h ? s : h, this.maxY = a >
|
|
12589
|
+
const o = this.minX, u = this.minY, h = this.maxX, f = this.maxY;
|
|
12590
|
+
this.minX = i < o ? i : o, this.minY = n < u ? n : u, this.maxX = s > h ? s : h, this.maxY = a > f ? a : f;
|
|
12591
12591
|
}
|
|
12592
12592
|
}
|
|
12593
12593
|
addBoundsMatrix(e, r) {
|
|
@@ -12596,8 +12596,8 @@ class ma {
|
|
|
12596
12596
|
addBoundsArea(e, r) {
|
|
12597
12597
|
const i = e.minX > r.x ? e.minX : r.x, n = e.minY > r.y ? e.minY : r.y, s = e.maxX < r.x + r.width ? e.maxX : r.x + r.width, a = e.maxY < r.y + r.height ? e.maxY : r.y + r.height;
|
|
12598
12598
|
if (i <= s && n <= a) {
|
|
12599
|
-
const o = this.minX, u = this.minY, h = this.maxX,
|
|
12600
|
-
this.minX = i < o ? i : o, this.minY = n < u ? n : u, this.maxX = s > h ? s : h, this.maxY = a >
|
|
12599
|
+
const o = this.minX, u = this.minY, h = this.maxX, f = this.maxY;
|
|
12600
|
+
this.minX = i < o ? i : o, this.minY = n < u ? n : u, this.maxX = s > h ? s : h, this.maxY = a > f ? a : f;
|
|
12601
12601
|
}
|
|
12602
12602
|
}
|
|
12603
12603
|
pad(e = 0, r = e) {
|
|
@@ -13043,16 +13043,16 @@ const pr = new me(), _h = class extends yc {
|
|
|
13043
13043
|
this.batches.length > 0 && (r = this.batches[this.batches.length - 1], i = r.style);
|
|
13044
13044
|
for (let o = this.shapeIndex; o < e.length; o++) {
|
|
13045
13045
|
this.shapeIndex++;
|
|
13046
|
-
const u = e[o], h = u.fillStyle,
|
|
13047
|
-
Is[u.type].build(u), u.matrix && this.transformPoints(u.points, u.matrix), (h.visible ||
|
|
13046
|
+
const u = e[o], h = u.fillStyle, f = u.lineStyle;
|
|
13047
|
+
Is[u.type].build(u), u.matrix && this.transformPoints(u.points, u.matrix), (h.visible || f.visible) && this.processHoles(u.holes);
|
|
13048
13048
|
for (let c = 0; c < 2; c++) {
|
|
13049
|
-
const
|
|
13050
|
-
if (!
|
|
13049
|
+
const d = c === 0 ? h : f;
|
|
13050
|
+
if (!d.visible)
|
|
13051
13051
|
continue;
|
|
13052
|
-
const p =
|
|
13052
|
+
const p = d.texture.baseTexture, m = this.indices.length, v = this.points.length / 2;
|
|
13053
13053
|
p.wrapMode = ci.REPEAT, c === 0 ? this.processFill(u) : this.processLine(u);
|
|
13054
13054
|
const g = this.points.length / 2 - v;
|
|
13055
|
-
g !== 0 && (r && !this._compareStyles(i,
|
|
13055
|
+
g !== 0 && (r && !this._compareStyles(i, d) && (r.end(m, v), r = null), r || (r = iu.pop() || new YT(), r.begin(d, m, v), this.batches.push(r), i = d), this.addUvs(this.points, t, d.texture, v, g, d.matrix));
|
|
13056
13056
|
}
|
|
13057
13057
|
}
|
|
13058
13058
|
const n = this.indices.length, s = this.points.length / 2;
|
|
@@ -13098,17 +13098,17 @@ const pr = new me(), _h = class extends yc {
|
|
|
13098
13098
|
}
|
|
13099
13099
|
buildDrawCalls() {
|
|
13100
13100
|
let t = ++ae._globalBatch;
|
|
13101
|
-
for (let
|
|
13102
|
-
this.drawCalls[
|
|
13101
|
+
for (let f = 0; f < this.drawCalls.length; f++)
|
|
13102
|
+
this.drawCalls[f].texArray.clear(), qi.push(this.drawCalls[f]);
|
|
13103
13103
|
this.drawCalls.length = 0;
|
|
13104
13104
|
const e = this.colors, r = this.textureIds;
|
|
13105
13105
|
let i = qi.pop();
|
|
13106
13106
|
i || (i = new sa(), i.texArray = new oa()), i.texArray.count = 0, i.start = 0, i.size = 0, i.type = Mt.TRIANGLES;
|
|
13107
13107
|
let n = 0, s = null, a = 0, o = !1, u = Mt.TRIANGLES, h = 0;
|
|
13108
13108
|
this.drawCalls.push(i);
|
|
13109
|
-
for (let
|
|
13110
|
-
const l = this.batches[
|
|
13111
|
-
o !== !!
|
|
13109
|
+
for (let f = 0; f < this.batches.length; f++) {
|
|
13110
|
+
const l = this.batches[f], c = 8, d = l.style, p = d.texture.baseTexture;
|
|
13111
|
+
o !== !!d.native && (o = !!d.native, u = o ? Mt.LINES : Mt.TRIANGLES, s = null, n = c, t++), s !== p && (s = p, p._batchEnabled !== t && (n === c && (t++, n = 0, i.size > 0 && (i = qi.pop(), i || (i = new sa(), i.texArray = new oa()), this.drawCalls.push(i)), i.start = h, i.size = 0, i.texArray.count = 0, i.type = u), p.touched = 1, p._batchEnabled = t, p._batchLocation = n, p.wrapMode = ci.REPEAT, i.texArray.elements[i.texArray.count++] = p, n++)), i.size += l.size, h += l.size, a = p._batchLocation, this.addColors(e, d.color, d.alpha, l.attribSize, l.attribStart), this.addTextureIds(r, a, l.attribSize, l.attribStart);
|
|
13112
13112
|
}
|
|
13113
13113
|
ae._globalBatch = t, this.packAttributes();
|
|
13114
13114
|
}
|
|
@@ -13158,24 +13158,24 @@ const pr = new me(), _h = class extends yc {
|
|
|
13158
13158
|
let a = 0;
|
|
13159
13159
|
const o = e.length, u = r.frame;
|
|
13160
13160
|
for (; a < n; ) {
|
|
13161
|
-
let
|
|
13161
|
+
let f = t[(i + a) * 2], l = t[(i + a) * 2 + 1];
|
|
13162
13162
|
if (s) {
|
|
13163
|
-
const c = s.a *
|
|
13164
|
-
l = s.b *
|
|
13163
|
+
const c = s.a * f + s.c * l + s.tx;
|
|
13164
|
+
l = s.b * f + s.d * l + s.ty, f = c;
|
|
13165
13165
|
}
|
|
13166
|
-
a++, e.push(
|
|
13166
|
+
a++, e.push(f / u.width, l / u.height);
|
|
13167
13167
|
}
|
|
13168
13168
|
const h = r.baseTexture;
|
|
13169
13169
|
(u.width < h.width || u.height < h.height) && this.adjustUvs(e, r, o, n);
|
|
13170
13170
|
}
|
|
13171
13171
|
adjustUvs(t, e, r, i) {
|
|
13172
13172
|
const n = e.baseTexture, s = 1e-6, a = r + i * 2, o = e.frame, u = o.width / n.width, h = o.height / n.height;
|
|
13173
|
-
let
|
|
13173
|
+
let f = o.x / o.width, l = o.y / o.height, c = Math.floor(t[r] + s), d = Math.floor(t[r + 1] + s);
|
|
13174
13174
|
for (let p = r + 2; p < a; p += 2)
|
|
13175
|
-
c = Math.min(c, Math.floor(t[p] + s)),
|
|
13176
|
-
|
|
13175
|
+
c = Math.min(c, Math.floor(t[p] + s)), d = Math.min(d, Math.floor(t[p + 1] + s));
|
|
13176
|
+
f -= c, l -= d;
|
|
13177
13177
|
for (let p = r; p < a; p += 2)
|
|
13178
|
-
t[p] = (t[p] +
|
|
13178
|
+
t[p] = (t[p] + f) * u, t[p + 1] = (t[p + 1] + l) * h;
|
|
13179
13179
|
}
|
|
13180
13180
|
};
|
|
13181
13181
|
let yh = _h;
|
|
@@ -13209,7 +13209,7 @@ class qa extends jn {
|
|
|
13209
13209
|
}
|
|
13210
13210
|
const Rs = {}, rn = class extends Nr {
|
|
13211
13211
|
constructor(t = null) {
|
|
13212
|
-
super(), this.shader = null, this.pluginName = "batch", this.currentPath = null, this.batches = [], this.batchTint = -1, this.batchDirty = -1, this.vertexData = null, this._fillStyle = new jn(), this._lineStyle = new qa(), this._matrix = null, this._holeMode = !1, this.state = Dn.for2d(), this._geometry = t || new yh(), this._geometry.refCount++, this._transformID = -1, this._tintColor = new Le(16777215), this.blendMode =
|
|
13212
|
+
super(), this.shader = null, this.pluginName = "batch", this.currentPath = null, this.batches = [], this.batchTint = -1, this.batchDirty = -1, this.vertexData = null, this._fillStyle = new jn(), this._lineStyle = new qa(), this._matrix = null, this._holeMode = !1, this.state = Dn.for2d(), this._geometry = t || new yh(), this._geometry.refCount++, this._transformID = -1, this._tintColor = new Le(16777215), this.blendMode = H.NORMAL;
|
|
13213
13213
|
}
|
|
13214
13214
|
get geometry() {
|
|
13215
13215
|
return this._geometry;
|
|
@@ -13287,8 +13287,8 @@ const Rs = {}, rn = class extends Nr {
|
|
|
13287
13287
|
this._initCurve(t, e);
|
|
13288
13288
|
const s = this.currentPath.points, a = eu.curveTo(t, e, r, i, n, s);
|
|
13289
13289
|
if (a) {
|
|
13290
|
-
const { cx: o, cy: u, radius: h, startAngle:
|
|
13291
|
-
this.arc(o, u, h,
|
|
13290
|
+
const { cx: o, cy: u, radius: h, startAngle: f, endAngle: l, anticlockwise: c } = a;
|
|
13291
|
+
this.arc(o, u, h, f, l, c);
|
|
13292
13292
|
}
|
|
13293
13293
|
return this;
|
|
13294
13294
|
}
|
|
@@ -13298,13 +13298,13 @@ const Rs = {}, rn = class extends Nr {
|
|
|
13298
13298
|
if (!s && n <= i ? n += yn : s && i <= n && (i += yn), n - i === 0)
|
|
13299
13299
|
return this;
|
|
13300
13300
|
const o = t + Math.cos(i) * r, u = e + Math.sin(i) * r, h = this._geometry.closePointEps;
|
|
13301
|
-
let
|
|
13302
|
-
if (
|
|
13303
|
-
const l = Math.abs(
|
|
13304
|
-
l < h && c < h ||
|
|
13301
|
+
let f = this.currentPath ? this.currentPath.points : null;
|
|
13302
|
+
if (f) {
|
|
13303
|
+
const l = Math.abs(f[f.length - 2] - o), c = Math.abs(f[f.length - 1] - u);
|
|
13304
|
+
l < h && c < h || f.push(o, u);
|
|
13305
13305
|
} else
|
|
13306
|
-
this.moveTo(o, u),
|
|
13307
|
-
return eu.arc(o, u, t, e, r, i, n, s,
|
|
13306
|
+
this.moveTo(o, u), f = this.currentPath.points;
|
|
13307
|
+
return eu.arc(o, u, t, e, r, i, n, s, f), this;
|
|
13308
13308
|
}
|
|
13309
13309
|
beginFill(t = 0, e) {
|
|
13310
13310
|
return this.beginTextureFill({ texture: ie.WHITE, color: t, alpha: e });
|
|
@@ -13444,10 +13444,10 @@ const Rs = {}, rn = class extends Nr {
|
|
|
13444
13444
|
return;
|
|
13445
13445
|
this._transformID = t;
|
|
13446
13446
|
const e = this.transform.worldTransform, r = e.a, i = e.b, n = e.c, s = e.d, a = e.tx, o = e.ty, u = this._geometry.points, h = this.vertexData;
|
|
13447
|
-
let
|
|
13447
|
+
let f = 0;
|
|
13448
13448
|
for (let l = 0; l < u.length; l += 2) {
|
|
13449
|
-
const c = u[l],
|
|
13450
|
-
h[
|
|
13449
|
+
const c = u[l], d = u[l + 1];
|
|
13450
|
+
h[f++] = r * c + n * d + a, h[f++] = s * d + i * c + o;
|
|
13451
13451
|
}
|
|
13452
13452
|
}
|
|
13453
13453
|
closePath() {
|
|
@@ -13499,27 +13499,27 @@ var tw = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
13499
13499
|
flag: /\s*([01])/g
|
|
13500
13500
|
}, s = {
|
|
13501
13501
|
number: function(m) {
|
|
13502
|
-
return +
|
|
13502
|
+
return +d("number", m);
|
|
13503
13503
|
},
|
|
13504
13504
|
"coordinate pair": function(m) {
|
|
13505
|
-
var v =
|
|
13505
|
+
var v = d("number", m);
|
|
13506
13506
|
if (v === null && !m)
|
|
13507
13507
|
return null;
|
|
13508
|
-
|
|
13509
|
-
var g =
|
|
13508
|
+
d("comma");
|
|
13509
|
+
var g = d("number", !0);
|
|
13510
13510
|
return { x: +v, y: +g };
|
|
13511
13511
|
},
|
|
13512
13512
|
"arc definition": function(m) {
|
|
13513
13513
|
var v = s["coordinate pair"](m);
|
|
13514
13514
|
if (!v && !m)
|
|
13515
13515
|
return null;
|
|
13516
|
-
|
|
13517
|
-
var g = +
|
|
13518
|
-
|
|
13519
|
-
var y = !!+
|
|
13520
|
-
|
|
13521
|
-
var _ = !!+
|
|
13522
|
-
|
|
13516
|
+
d("comma");
|
|
13517
|
+
var g = +d("number", !0);
|
|
13518
|
+
d("comma", !0);
|
|
13519
|
+
var y = !!+d("flag", !0);
|
|
13520
|
+
d("comma");
|
|
13521
|
+
var _ = !!+d("flag", !0);
|
|
13522
|
+
d("comma");
|
|
13523
13523
|
var x = s["coordinate pair"](!0);
|
|
13524
13524
|
return {
|
|
13525
13525
|
radii: v,
|
|
@@ -13530,11 +13530,11 @@ var tw = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
13530
13530
|
};
|
|
13531
13531
|
}
|
|
13532
13532
|
}, a = 0, o = []; a < i.length; ) {
|
|
13533
|
-
var u =
|
|
13533
|
+
var u = d("command"), h = u.toUpperCase(), f = u !== h, l;
|
|
13534
13534
|
switch (h) {
|
|
13535
13535
|
case "M":
|
|
13536
13536
|
l = p("coordinate pair").map(function(m, v) {
|
|
13537
|
-
return v === 1 && (u =
|
|
13537
|
+
return v === 1 && (u = f ? "l" : "L"), c({ end: m });
|
|
13538
13538
|
});
|
|
13539
13539
|
break;
|
|
13540
13540
|
case "L":
|
|
@@ -13589,9 +13589,9 @@ var tw = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
13589
13589
|
}
|
|
13590
13590
|
return o;
|
|
13591
13591
|
function c(m) {
|
|
13592
|
-
return m.code = u, m.relative =
|
|
13592
|
+
return m.code = u, m.relative = f, m;
|
|
13593
13593
|
}
|
|
13594
|
-
function
|
|
13594
|
+
function d(m, v) {
|
|
13595
13595
|
n[m].lastIndex = a;
|
|
13596
13596
|
var g = n[m].exec(i);
|
|
13597
13597
|
if (!g || g.index !== a) {
|
|
@@ -13603,7 +13603,7 @@ var tw = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
13603
13603
|
}
|
|
13604
13604
|
function p(m) {
|
|
13605
13605
|
for (var v = [], g, y = !0; g = s[m](y); )
|
|
13606
|
-
v.push(g), y = !!
|
|
13606
|
+
v.push(g), y = !!d("comma");
|
|
13607
13607
|
return v;
|
|
13608
13608
|
}
|
|
13609
13609
|
};
|
|
@@ -13821,8 +13821,8 @@ function nu(t, e, r) {
|
|
|
13821
13821
|
function ow(t, e, r) {
|
|
13822
13822
|
var i, n, s;
|
|
13823
13823
|
t = ve(t, 360), e = ve(e, 100), r = ve(r, 100);
|
|
13824
|
-
function a(h,
|
|
13825
|
-
return l < 0 && (l += 1), l > 1 && (l -= 1), l < 1 / 6 ? h + (
|
|
13824
|
+
function a(h, f, l) {
|
|
13825
|
+
return l < 0 && (l += 1), l > 1 && (l -= 1), l < 1 / 6 ? h + (f - h) * 6 * l : l < 1 / 2 ? f : l < 2 / 3 ? h + (f - h) * (2 / 3 - l) * 6 : h;
|
|
13826
13826
|
}
|
|
13827
13827
|
if (e === 0)
|
|
13828
13828
|
i = n = s = r;
|
|
@@ -13855,8 +13855,8 @@ function su(t, e, r) {
|
|
|
13855
13855
|
}
|
|
13856
13856
|
function lw(t, e, r) {
|
|
13857
13857
|
t = ve(t, 360) * 6, e = ve(e, 100), r = ve(r, 100);
|
|
13858
|
-
var i = Math.floor(t), n = t - i, s = r * (1 - e), a = r * (1 - n * e), o = r * (1 - (1 - n) * e), u = i % 6, h = [r, a, s, s, o, r][u],
|
|
13859
|
-
return { r: h * 255, g:
|
|
13858
|
+
var i = Math.floor(t), n = t - i, s = r * (1 - e), a = r * (1 - n * e), o = r * (1 - (1 - n) * e), u = i % 6, h = [r, a, s, s, o, r][u], f = [o, r, r, a, s, s][u], l = [s, s, o, r, r, a][u];
|
|
13859
|
+
return { r: h * 255, g: f * 255, b: l * 255 };
|
|
13860
13860
|
}
|
|
13861
13861
|
function au(t, e, r, i) {
|
|
13862
13862
|
var n = [
|
|
@@ -14270,9 +14270,9 @@ var Cw = function() {
|
|
|
14270
14270
|
}(), oi = Math.PI * 2, Ps = function(e, r, i, n, s, a, o) {
|
|
14271
14271
|
var u = e.x, h = e.y;
|
|
14272
14272
|
u *= r, h *= i;
|
|
14273
|
-
var
|
|
14273
|
+
var f = n * u - s * h, l = s * u + n * h;
|
|
14274
14274
|
return {
|
|
14275
|
-
x:
|
|
14275
|
+
x: f + a,
|
|
14276
14276
|
y: l + o
|
|
14277
14277
|
};
|
|
14278
14278
|
}, Iw = function(e, r) {
|
|
@@ -14290,13 +14290,13 @@ var Cw = function() {
|
|
|
14290
14290
|
}, cu = function(e, r, i, n) {
|
|
14291
14291
|
var s = e * n - r * i < 0 ? -1 : 1, a = e * i + r * n;
|
|
14292
14292
|
return a > 1 && (a = 1), a < -1 && (a = -1), s * Math.acos(a);
|
|
14293
|
-
}, Rw = function(e, r, i, n, s, a, o, u, h,
|
|
14294
|
-
var
|
|
14295
|
-
g < 0 && (g = 0), g /=
|
|
14296
|
-
var y = g * s / a * c, _ = g * -a / s * l, x =
|
|
14293
|
+
}, Rw = function(e, r, i, n, s, a, o, u, h, f, l, c) {
|
|
14294
|
+
var d = Math.pow(s, 2), p = Math.pow(a, 2), m = Math.pow(l, 2), v = Math.pow(c, 2), g = d * p - d * v - p * m;
|
|
14295
|
+
g < 0 && (g = 0), g /= d * v + p * m, g = Math.sqrt(g) * (o === u ? -1 : 1);
|
|
14296
|
+
var y = g * s / a * c, _ = g * -a / s * l, x = f * y - h * _ + (e + i) / 2, b = h * y + f * _ + (r + n) / 2, T = (l - y) / s, w = (c - _) / a, S = (-l - y) / s, A = (-c - _) / a, C = cu(1, 0, T, w), M = cu(T, w, S, A);
|
|
14297
14297
|
return u === 0 && M > 0 && (M -= oi), u === 1 && M < 0 && (M += oi), [x, b, C, M];
|
|
14298
14298
|
}, hu = function(e) {
|
|
14299
|
-
var r = e.px, i = e.py, n = e.cx, s = e.cy, a = e.rx, o = e.ry, u = e.xAxisRotation, h = u === void 0 ? 0 : u,
|
|
14299
|
+
var r = e.px, i = e.py, n = e.cx, s = e.cy, a = e.rx, o = e.ry, u = e.xAxisRotation, h = u === void 0 ? 0 : u, f = e.largeArcFlag, l = f === void 0 ? 0 : f, c = e.sweepFlag, d = c === void 0 ? 0 : c, p = [];
|
|
14300
14300
|
if (a === 0 || o === 0)
|
|
14301
14301
|
return [];
|
|
14302
14302
|
var m = Math.sin(h * oi / 360), v = Math.cos(h * oi / 360), g = v * (r - n) / 2 + m * (i - s) / 2, y = -m * (r - n) / 2 + v * (i - s) / 2;
|
|
@@ -14305,15 +14305,15 @@ var Cw = function() {
|
|
|
14305
14305
|
a = Math.abs(a), o = Math.abs(o);
|
|
14306
14306
|
var _ = Math.pow(g, 2) / Math.pow(a, 2) + Math.pow(y, 2) / Math.pow(o, 2);
|
|
14307
14307
|
_ > 1 && (a *= Math.sqrt(_), o *= Math.sqrt(_));
|
|
14308
|
-
var x = Rw(r, i, n, s, a, o, l,
|
|
14308
|
+
var x = Rw(r, i, n, s, a, o, l, d, m, v, g, y), b = Cw(x, 4), T = b[0], w = b[1], S = b[2], A = b[3], C = Math.abs(A) / (oi / 4);
|
|
14309
14309
|
Math.abs(1 - C) < 1e-7 && (C = 1);
|
|
14310
14310
|
var M = Math.max(Math.ceil(C), 1);
|
|
14311
14311
|
A /= M;
|
|
14312
14312
|
for (var G = 0; G < M; G++)
|
|
14313
14313
|
p.push(Iw(S, A)), S += A;
|
|
14314
14314
|
return p.map(function(I) {
|
|
14315
|
-
var E = Ps(I[0], a, o, v, m, T, w), L = E.x, B = E.y, R = Ps(I[1], a, o, v, m, T, w), U = R.x, X = R.y, P = Ps(I[2], a, o, v, m, T, w), F = P.x,
|
|
14316
|
-
return { x1: L, y1: B, x2: U, y2: X, x: F, y:
|
|
14315
|
+
var E = Ps(I[0], a, o, v, m, T, w), L = E.x, B = E.y, R = Ps(I[1], a, o, v, m, T, w), U = R.x, X = R.y, P = Ps(I[2], a, o, v, m, T, w), F = P.x, j = P.y;
|
|
14316
|
+
return { x1: L, y1: B, x2: U, y2: X, x: F, y: j };
|
|
14317
14317
|
});
|
|
14318
14318
|
};
|
|
14319
14319
|
class Pw extends Ya {
|
|
@@ -14393,8 +14393,8 @@ class Pw extends Ya {
|
|
|
14393
14393
|
const n = e.nodeName === "elipse";
|
|
14394
14394
|
n && (r += "x", i += "y");
|
|
14395
14395
|
const s = parseFloat(e.getAttribute(i)), a = parseFloat(e.getAttribute(r)), o = e.getAttribute("cx"), u = e.getAttribute("cy");
|
|
14396
|
-
let h = 0,
|
|
14397
|
-
o !== null && (h = parseFloat(o)), u !== null && (
|
|
14396
|
+
let h = 0, f = 0;
|
|
14397
|
+
o !== null && (h = parseFloat(o)), u !== null && (f = parseFloat(u)), n ? this.drawEllipse(h, f, s, a) : this.drawCircle(h, f, s);
|
|
14398
14398
|
}
|
|
14399
14399
|
/**
|
|
14400
14400
|
* Render a <rect> element
|
|
@@ -14451,17 +14451,17 @@ class Pw extends Ya {
|
|
|
14451
14451
|
* @param inherit - Inherit the fill style
|
|
14452
14452
|
*/
|
|
14453
14453
|
_svgFill(e, r) {
|
|
14454
|
-
const { fill: i, opacity: n, stroke: s, strokeOpacity: a, strokeWidth: o, cap: u, join: h, miterLimit:
|
|
14454
|
+
const { fill: i, opacity: n, stroke: s, strokeOpacity: a, strokeWidth: o, cap: u, join: h, miterLimit: f } = this._svgStyle(e), c = o !== null ? parseFloat(o) : s !== null ? 1 : 0, d = s !== null ? this._hexToUint(s) : this.lineColor;
|
|
14455
14455
|
i ? i === "none" ? this.beginFill(0, 0) : this.beginFill(
|
|
14456
14456
|
this._hexToUint(i),
|
|
14457
14457
|
n !== null ? parseFloat(n) : 1
|
|
14458
14458
|
) : r || this.beginFill(0), this.lineStyle({
|
|
14459
14459
|
width: s === null && o === null && r ? this.line.width : c,
|
|
14460
14460
|
alpha: a === null ? this.line.alpha : parseFloat(a),
|
|
14461
|
-
color: s === null && r ? this.line.color :
|
|
14461
|
+
color: s === null && r ? this.line.color : d,
|
|
14462
14462
|
cap: u === null && r ? this.line.cap : u,
|
|
14463
14463
|
join: h === null && r ? this.line.join : h,
|
|
14464
|
-
miterLimit:
|
|
14464
|
+
miterLimit: f === null && r ? this.line.miterLimit : parseFloat(f)
|
|
14465
14465
|
}), e.getAttribute("fill-rule") && console.info('[PIXI.SVG] "fill-rule" attribute is not supported');
|
|
14466
14466
|
}
|
|
14467
14467
|
/**
|
|
@@ -14578,7 +14578,7 @@ class Pw extends Ya {
|
|
|
14578
14578
|
xAxisRotation: o.rotation,
|
|
14579
14579
|
largeArcFlag: o.large ? 1 : 0,
|
|
14580
14580
|
sweepFlag: o.clockwise ? 1 : 0
|
|
14581
|
-
}).forEach(({ x1: u, y1: h, x2:
|
|
14581
|
+
}).forEach(({ x1: u, y1: h, x2: f, y2: l, x: c, y: d }) => this.bezierCurveTo(u, h, f, l, c, d));
|
|
14582
14582
|
break;
|
|
14583
14583
|
}
|
|
14584
14584
|
case "A": {
|
|
@@ -14592,7 +14592,7 @@ class Pw extends Ya {
|
|
|
14592
14592
|
xAxisRotation: o.rotation,
|
|
14593
14593
|
largeArcFlag: o.large ? 1 : 0,
|
|
14594
14594
|
sweepFlag: o.clockwise ? 1 : 0
|
|
14595
|
-
}).forEach(({ x1: u, y1: h, x2:
|
|
14595
|
+
}).forEach(({ x1: u, y1: h, x2: f, y2: l, x: c, y: d }) => this.bezierCurveTo(u, h, f, l, c, d));
|
|
14596
14596
|
break;
|
|
14597
14597
|
}
|
|
14598
14598
|
default: {
|
|
@@ -14853,9 +14853,9 @@ function fu(t, e, r, i) {
|
|
|
14853
14853
|
return s > 1 && (s = 1), s < -1 && (s = -1), n * Math.acos(s);
|
|
14854
14854
|
}
|
|
14855
14855
|
function Ww(t, e, r, i, n, s, a, o, u, h) {
|
|
14856
|
-
var
|
|
14857
|
-
v < 0 && (v = 0), v /= c * m +
|
|
14858
|
-
var g = v * a / o * l, y = v * -o / a *
|
|
14856
|
+
var f = h * (t - r) / 2 + u * (e - i) / 2, l = -u * (t - r) / 2 + h * (e - i) / 2, c = a * a, d = o * o, p = f * f, m = l * l, v = c * d - c * m - d * p;
|
|
14857
|
+
v < 0 && (v = 0), v /= c * m + d * p, v = Math.sqrt(v) * (n === s ? -1 : 1);
|
|
14858
|
+
var g = v * a / o * l, y = v * -o / a * f, _ = h * g - u * y + (t + r) / 2, x = u * g + h * y + (e + i) / 2, b = (f - g) / a, T = (l - y) / o, w = (-f - g) / a, S = (-l - y) / o, A = fu(1, 0, b, T), C = fu(b, T, w, S);
|
|
14859
14859
|
return s === 0 && C > 0 && (C -= li), s === 1 && C < 0 && (C += li), [_, x, A, C];
|
|
14860
14860
|
}
|
|
14861
14861
|
function qw(t, e) {
|
|
@@ -14863,15 +14863,15 @@ function qw(t, e) {
|
|
|
14863
14863
|
return [i, n, i - n * r, n + i * r, s + a * r, a - s * r, s, a];
|
|
14864
14864
|
}
|
|
14865
14865
|
var Yw = function(e, r, i, n, s, a, o, u, h) {
|
|
14866
|
-
var
|
|
14867
|
-
if (c === 0 &&
|
|
14866
|
+
var f = Math.sin(h * li / 360), l = Math.cos(h * li / 360), c = l * (e - i) / 2 + f * (r - n) / 2, d = -f * (e - i) / 2 + l * (r - n) / 2;
|
|
14867
|
+
if (c === 0 && d === 0)
|
|
14868
14868
|
return [];
|
|
14869
14869
|
if (o === 0 || u === 0)
|
|
14870
14870
|
return [];
|
|
14871
14871
|
o = Math.abs(o), u = Math.abs(u);
|
|
14872
|
-
var p = c * c / (o * o) +
|
|
14872
|
+
var p = c * c / (o * o) + d * d / (u * u);
|
|
14873
14873
|
p > 1 && (o *= Math.sqrt(p), u *= Math.sqrt(p));
|
|
14874
|
-
var m = Ww(e, r, i, n, s, a, o, u,
|
|
14874
|
+
var m = Ww(e, r, i, n, s, a, o, u, f, l), v = [], g = m[2], y = m[3], _ = Math.max(Math.ceil(Math.abs(y) / (li / 4)), 1);
|
|
14875
14875
|
y /= _;
|
|
14876
14876
|
for (var x = 0; x < _; x++)
|
|
14877
14877
|
v.push(qw(g, y)), g += y;
|
|
@@ -14879,7 +14879,7 @@ var Yw = function(e, r, i, n, s, a, o, u, h) {
|
|
|
14879
14879
|
for (var T = 0; T < b.length; T += 2) {
|
|
14880
14880
|
var w = b[T + 0], S = b[T + 1];
|
|
14881
14881
|
w *= o, S *= u;
|
|
14882
|
-
var A = l * w -
|
|
14882
|
+
var A = l * w - f * S, C = f * w + l * S;
|
|
14883
14883
|
b[T + 0] = A + m[0], b[T + 1] = C + m[1];
|
|
14884
14884
|
}
|
|
14885
14885
|
return b;
|
|
@@ -14901,10 +14901,10 @@ _i.prototype.transform = function(t) {
|
|
|
14901
14901
|
return this.rx = this.ry = Math.sqrt(o), this.ax = 0, this;
|
|
14902
14902
|
var u = i[0] * i[1] + i[2] * i[3];
|
|
14903
14903
|
a = Math.sqrt(a);
|
|
14904
|
-
var h = o + a / 2,
|
|
14904
|
+
var h = o + a / 2, f = o - a / 2;
|
|
14905
14905
|
return this.ax = Math.abs(u) < ui && Math.abs(h - s) < ui ? 90 : Math.atan(
|
|
14906
14906
|
Math.abs(u) > Math.abs(h - s) ? (h - n) / u : u / (h - s)
|
|
14907
|
-
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(h), this.ry = Math.sqrt(
|
|
14907
|
+
) * 180 / Math.PI, this.ax >= 0 ? (this.rx = Math.sqrt(h), this.ry = Math.sqrt(f)) : (this.ax += 90, this.rx = Math.sqrt(f), this.ry = Math.sqrt(h)), this;
|
|
14908
14908
|
};
|
|
14909
14909
|
_i.prototype.isDegenerate = function() {
|
|
14910
14910
|
return this.rx < ui * this.ry || this.ry < ui * this.rx;
|
|
@@ -14932,7 +14932,7 @@ be.from = function(t) {
|
|
|
14932
14932
|
be.prototype.__matrix = function(t) {
|
|
14933
14933
|
var e = this, r;
|
|
14934
14934
|
t.queue.length && this.iterate(function(i, n, s, a) {
|
|
14935
|
-
var o, u, h,
|
|
14935
|
+
var o, u, h, f;
|
|
14936
14936
|
switch (i[0]) {
|
|
14937
14937
|
case "v":
|
|
14938
14938
|
o = t.calc(0, i[1], !0), u = o[0] === 0 ? ["v", o[1]] : ["l", o[0], o[1]];
|
|
@@ -14956,11 +14956,11 @@ be.prototype.__matrix = function(t) {
|
|
|
14956
14956
|
c.isDegenerate() ? u = [i[0] === "a" ? "l" : "L", o[0], o[1]] : u = [i[0], c.rx, c.ry, c.ax, i[4], i[5], o[0], o[1]];
|
|
14957
14957
|
break;
|
|
14958
14958
|
case "m":
|
|
14959
|
-
|
|
14959
|
+
f = n > 0, o = t.calc(i[1], i[2], f), u = ["m", o[0], o[1]];
|
|
14960
14960
|
break;
|
|
14961
14961
|
default:
|
|
14962
|
-
for (h = i[0], u = [h],
|
|
14963
|
-
o = t.calc(i[r], i[r + 1],
|
|
14962
|
+
for (h = i[0], u = [h], f = h.toLowerCase() === h, r = 1; r < i.length; r += 2)
|
|
14963
|
+
o = t.calc(i[r], i[r + 1], f), u.push(o[0], o[1]);
|
|
14964
14964
|
}
|
|
14965
14965
|
e.segments[n] = u;
|
|
14966
14966
|
}, !0);
|
|
@@ -15046,10 +15046,10 @@ be.prototype.round = function(t) {
|
|
|
15046
15046
|
}), this;
|
|
15047
15047
|
};
|
|
15048
15048
|
be.prototype.iterate = function(t, e) {
|
|
15049
|
-
var r = this.segments, i = {}, n = !1, s = 0, a = 0, o = 0, u = 0, h,
|
|
15050
|
-
if (e || this.__evaluateStack(), r.forEach(function(c,
|
|
15051
|
-
var p = t(c,
|
|
15052
|
-
Array.isArray(p) && (i[
|
|
15049
|
+
var r = this.segments, i = {}, n = !1, s = 0, a = 0, o = 0, u = 0, h, f, l;
|
|
15050
|
+
if (e || this.__evaluateStack(), r.forEach(function(c, d) {
|
|
15051
|
+
var p = t(c, d, s, a);
|
|
15052
|
+
Array.isArray(p) && (i[d] = p, n = !0);
|
|
15053
15053
|
var m = c[0] === c[0].toLowerCase();
|
|
15054
15054
|
switch (c[0]) {
|
|
15055
15055
|
case "m":
|
|
@@ -15075,8 +15075,8 @@ be.prototype.iterate = function(t, e) {
|
|
|
15075
15075
|
return this;
|
|
15076
15076
|
for (l = [], h = 0; h < r.length; h++)
|
|
15077
15077
|
if (typeof i[h] < "u")
|
|
15078
|
-
for (
|
|
15079
|
-
l.push(i[h][
|
|
15078
|
+
for (f = 0; f < i[h].length; f++)
|
|
15079
|
+
l.push(i[h][f]);
|
|
15080
15080
|
else
|
|
15081
15081
|
l.push(r[h]);
|
|
15082
15082
|
return this.segments = l, this;
|
|
@@ -15126,14 +15126,14 @@ be.prototype.unarc = function() {
|
|
|
15126
15126
|
be.prototype.unshort = function() {
|
|
15127
15127
|
var t = this.segments, e, r, i, n, s;
|
|
15128
15128
|
return this.iterate(function(a, o, u, h) {
|
|
15129
|
-
var
|
|
15130
|
-
o && (l === "T" ? (c =
|
|
15129
|
+
var f = a[0], l = f.toUpperCase(), c;
|
|
15130
|
+
o && (l === "T" ? (c = f === "t", i = t[o - 1], i[0] === "Q" ? (e = i[1] - u, r = i[2] - h) : i[0] === "q" ? (e = i[1] - i[3], r = i[2] - i[4]) : (e = 0, r = 0), n = -e, s = -r, c || (n += u, s += h), t[o] = [
|
|
15131
15131
|
c ? "q" : "Q",
|
|
15132
15132
|
n,
|
|
15133
15133
|
s,
|
|
15134
15134
|
a[1],
|
|
15135
15135
|
a[2]
|
|
15136
|
-
]) : l === "S" && (c =
|
|
15136
|
+
]) : l === "S" && (c = f === "s", i = t[o - 1], i[0] === "C" ? (e = i[3] - u, r = i[4] - h) : i[0] === "c" ? (e = i[3] - i[5], r = i[4] - i[6]) : (e = 0, r = 0), n = -e, s = -r, c || (n += u, s += h), t[o] = [
|
|
15137
15137
|
c ? "c" : "C",
|
|
15138
15138
|
n,
|
|
15139
15139
|
s,
|
|
@@ -15146,15 +15146,15 @@ be.prototype.unshort = function() {
|
|
|
15146
15146
|
};
|
|
15147
15147
|
var tS = be, rS = tS;
|
|
15148
15148
|
const iS = /* @__PURE__ */ rr(rS), u2 = k.forwardRef((t, e) => {
|
|
15149
|
-
const [r, i] = k.useState(null), n =
|
|
15149
|
+
const [r, i] = k.useState(null), n = z(null), s = z(null), a = z(null), {
|
|
15150
15150
|
path: o,
|
|
15151
15151
|
visible: u,
|
|
15152
15152
|
disabled: h,
|
|
15153
15153
|
transformation: {
|
|
15154
|
-
x:
|
|
15154
|
+
x: f,
|
|
15155
15155
|
y: l,
|
|
15156
15156
|
width: c,
|
|
15157
|
-
height:
|
|
15157
|
+
height: d,
|
|
15158
15158
|
anchor: p,
|
|
15159
15159
|
hexColor: m,
|
|
15160
15160
|
fill: v,
|
|
@@ -15174,7 +15174,7 @@ const iS = /* @__PURE__ */ rr(rS), u2 = k.forwardRef((t, e) => {
|
|
|
15174
15174
|
noiseFilter: I
|
|
15175
15175
|
} = or(_), { blurRadius: E = 0, vignette: L = 0, noise: B = 0 } = _;
|
|
15176
15176
|
return k.useEffect(() => {
|
|
15177
|
-
const R = iS(o).scale(5).translate(0, 0).toString(), U = `<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${
|
|
15177
|
+
const R = iS(o).scale(5).translate(0, 0).toString(), U = `<svg xmlns="http://www.w3.org/2000/svg" width="${c}" height="${d}">
|
|
15178
15178
|
<path stroke="${g}" stroke-width="${y}" fill="${m || v}" d="${R}">
|
|
15179
15179
|
</path>
|
|
15180
15180
|
</svg>`, X = new Pw(U), P = T.renderer.generateTexture(X);
|
|
@@ -15185,10 +15185,10 @@ const iS = /* @__PURE__ */ rr(rS), u2 = k.forwardRef((t, e) => {
|
|
|
15185
15185
|
{
|
|
15186
15186
|
texture: r,
|
|
15187
15187
|
width: c,
|
|
15188
|
-
height:
|
|
15188
|
+
height: d,
|
|
15189
15189
|
anchor: p,
|
|
15190
15190
|
ref: n,
|
|
15191
|
-
x:
|
|
15191
|
+
x: f,
|
|
15192
15192
|
y: l,
|
|
15193
15193
|
alpha: u ? 1 : 0,
|
|
15194
15194
|
...!h && u && {
|
|
@@ -15242,14 +15242,14 @@ var wh = {};
|
|
|
15242
15242
|
*/
|
|
15243
15243
|
volume: function(l) {
|
|
15244
15244
|
var c = this || r;
|
|
15245
|
-
if (l = parseFloat(l), c.ctx ||
|
|
15245
|
+
if (l = parseFloat(l), c.ctx || f(), typeof l < "u" && l >= 0 && l <= 1) {
|
|
15246
15246
|
if (c._volume = l, c._muted)
|
|
15247
15247
|
return c;
|
|
15248
15248
|
c.usingWebAudio && c.masterGain.gain.setValueAtTime(l, r.ctx.currentTime);
|
|
15249
|
-
for (var
|
|
15250
|
-
if (!c._howls[
|
|
15251
|
-
for (var p = c._howls[
|
|
15252
|
-
var v = c._howls[
|
|
15249
|
+
for (var d = 0; d < c._howls.length; d++)
|
|
15250
|
+
if (!c._howls[d]._webAudio)
|
|
15251
|
+
for (var p = c._howls[d]._getSoundIds(), m = 0; m < p.length; m++) {
|
|
15252
|
+
var v = c._howls[d]._soundById(p[m]);
|
|
15253
15253
|
v && v._node && (v._node.volume = v._volume * l);
|
|
15254
15254
|
}
|
|
15255
15255
|
return c;
|
|
@@ -15262,11 +15262,11 @@ var wh = {};
|
|
|
15262
15262
|
*/
|
|
15263
15263
|
mute: function(l) {
|
|
15264
15264
|
var c = this || r;
|
|
15265
|
-
c.ctx ||
|
|
15266
|
-
for (var
|
|
15267
|
-
if (!c._howls[
|
|
15268
|
-
for (var p = c._howls[
|
|
15269
|
-
var v = c._howls[
|
|
15265
|
+
c.ctx || f(), c._muted = l, c.usingWebAudio && c.masterGain.gain.setValueAtTime(l ? 0 : c._volume, r.ctx.currentTime);
|
|
15266
|
+
for (var d = 0; d < c._howls.length; d++)
|
|
15267
|
+
if (!c._howls[d]._webAudio)
|
|
15268
|
+
for (var p = c._howls[d]._getSoundIds(), m = 0; m < p.length; m++) {
|
|
15269
|
+
var v = c._howls[d]._soundById(p[m]);
|
|
15270
15270
|
v && v._node && (v._node.muted = l ? !0 : v._muted);
|
|
15271
15271
|
}
|
|
15272
15272
|
return c;
|
|
@@ -15286,7 +15286,7 @@ var wh = {};
|
|
|
15286
15286
|
unload: function() {
|
|
15287
15287
|
for (var l = this || r, c = l._howls.length - 1; c >= 0; c--)
|
|
15288
15288
|
l._howls[c].unload();
|
|
15289
|
-
return l.usingWebAudio && l.ctx && typeof l.ctx.close < "u" && (l.ctx.close(), l.ctx = null,
|
|
15289
|
+
return l.usingWebAudio && l.ctx && typeof l.ctx.close < "u" && (l.ctx.close(), l.ctx = null, f()), l;
|
|
15290
15290
|
},
|
|
15291
15291
|
/**
|
|
15292
15292
|
* Check for codec support of specific extension.
|
|
@@ -15332,10 +15332,10 @@ var wh = {};
|
|
|
15332
15332
|
}
|
|
15333
15333
|
if (!c || typeof c.canPlayType != "function")
|
|
15334
15334
|
return l;
|
|
15335
|
-
var
|
|
15335
|
+
var d = c.canPlayType("audio/mpeg;").replace(/^no$/, ""), p = l._navigator ? l._navigator.userAgent : "", m = p.match(/OPR\/([0-6].)/g), v = m && parseInt(m[0].split("/")[1], 10) < 33, g = p.indexOf("Safari") !== -1 && p.indexOf("Chrome") === -1, y = p.match(/Version\/(.*?) /), _ = g && y && parseInt(y[1], 10) < 15;
|
|
15336
15336
|
return l._codecs = {
|
|
15337
|
-
mp3: !!(!v && (
|
|
15338
|
-
mpeg: !!
|
|
15337
|
+
mp3: !!(!v && (d || c.canPlayType("audio/mp3;").replace(/^no$/, ""))),
|
|
15338
|
+
mpeg: !!d,
|
|
15339
15339
|
opus: !!c.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
|
|
15340
15340
|
ogg: !!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
|
|
15341
15341
|
oga: !!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
|
|
@@ -15361,7 +15361,7 @@ var wh = {};
|
|
|
15361
15361
|
var l = this || r;
|
|
15362
15362
|
if (!(l._audioUnlocked || !l.ctx)) {
|
|
15363
15363
|
l._audioUnlocked = !1, l.autoUnlock = !1, !l._mobileUnloaded && l.ctx.sampleRate !== 44100 && (l._mobileUnloaded = !0, l.unload()), l._scratchBuffer = l.ctx.createBuffer(1, 1, 22050);
|
|
15364
|
-
var c = function(
|
|
15364
|
+
var c = function(d) {
|
|
15365
15365
|
for (; l._html5AudioPool.length < l.html5PoolSize; )
|
|
15366
15366
|
try {
|
|
15367
15367
|
var p = new Audio();
|
|
@@ -15419,8 +15419,8 @@ var wh = {};
|
|
|
15419
15419
|
if (!(!l.autoSuspend || !l.ctx || typeof l.ctx.suspend > "u" || !r.usingWebAudio)) {
|
|
15420
15420
|
for (var c = 0; c < l._howls.length; c++)
|
|
15421
15421
|
if (l._howls[c]._webAudio) {
|
|
15422
|
-
for (var
|
|
15423
|
-
if (!l._howls[c]._sounds[
|
|
15422
|
+
for (var d = 0; d < l._howls[c]._sounds.length; d++)
|
|
15423
|
+
if (!l._howls[c]._sounds[d]._paused)
|
|
15424
15424
|
return l;
|
|
15425
15425
|
}
|
|
15426
15426
|
return l._suspendTimer && clearTimeout(l._suspendTimer), l._suspendTimer = setTimeout(function() {
|
|
@@ -15464,7 +15464,7 @@ var wh = {};
|
|
|
15464
15464
|
*/
|
|
15465
15465
|
init: function(l) {
|
|
15466
15466
|
var c = this;
|
|
15467
|
-
return r.ctx ||
|
|
15467
|
+
return r.ctx || f(), c._autoplay = l.autoplay || !1, c._format = typeof l.format != "string" ? l.format : [l.format], c._html5 = l.html5 || !1, c._muted = l.mute || !1, c._loop = l.loop || !1, c._pool = l.pool || 5, c._preload = typeof l.preload == "boolean" || l.preload === "metadata" ? l.preload : !0, c._rate = l.rate || 1, c._sprite = l.sprite || {}, c._src = typeof l.src != "string" ? l.src : [l.src], c._volume = l.volume !== void 0 ? l.volume : 1, c._xhr = {
|
|
15468
15468
|
method: l.xhr && l.xhr.method ? l.xhr.method : "GET",
|
|
15469
15469
|
headers: l.xhr && l.xhr.headers ? l.xhr.headers : null,
|
|
15470
15470
|
withCredentials: l.xhr && l.xhr.withCredentials ? l.xhr.withCredentials : !1
|
|
@@ -15486,19 +15486,19 @@ var wh = {};
|
|
|
15486
15486
|
return;
|
|
15487
15487
|
}
|
|
15488
15488
|
typeof l._src == "string" && (l._src = [l._src]);
|
|
15489
|
-
for (var
|
|
15489
|
+
for (var d = 0; d < l._src.length; d++) {
|
|
15490
15490
|
var p, m;
|
|
15491
|
-
if (l._format && l._format[
|
|
15492
|
-
p = l._format[
|
|
15491
|
+
if (l._format && l._format[d])
|
|
15492
|
+
p = l._format[d];
|
|
15493
15493
|
else {
|
|
15494
|
-
if (m = l._src[
|
|
15494
|
+
if (m = l._src[d], typeof m != "string") {
|
|
15495
15495
|
l._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
|
|
15496
15496
|
continue;
|
|
15497
15497
|
}
|
|
15498
15498
|
p = /^data:audio\/([^;,]+);/i.exec(m), p || (p = /\.([^.]+)$/.exec(m.split("?", 1)[0])), p && (p = p[1].toLowerCase());
|
|
15499
15499
|
}
|
|
15500
15500
|
if (p || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), p && r.codecs(p)) {
|
|
15501
|
-
c = l._src[
|
|
15501
|
+
c = l._src[d];
|
|
15502
15502
|
break;
|
|
15503
15503
|
}
|
|
15504
15504
|
}
|
|
@@ -15515,83 +15515,83 @@ var wh = {};
|
|
|
15515
15515
|
* @return {Number} Sound ID.
|
|
15516
15516
|
*/
|
|
15517
15517
|
play: function(l, c) {
|
|
15518
|
-
var
|
|
15518
|
+
var d = this, p = null;
|
|
15519
15519
|
if (typeof l == "number")
|
|
15520
15520
|
p = l, l = null;
|
|
15521
15521
|
else {
|
|
15522
|
-
if (typeof l == "string" &&
|
|
15522
|
+
if (typeof l == "string" && d._state === "loaded" && !d._sprite[l])
|
|
15523
15523
|
return null;
|
|
15524
|
-
if (typeof l > "u" && (l = "__default", !
|
|
15525
|
-
for (var m = 0, v = 0; v <
|
|
15526
|
-
|
|
15524
|
+
if (typeof l > "u" && (l = "__default", !d._playLock)) {
|
|
15525
|
+
for (var m = 0, v = 0; v < d._sounds.length; v++)
|
|
15526
|
+
d._sounds[v]._paused && !d._sounds[v]._ended && (m++, p = d._sounds[v]._id);
|
|
15527
15527
|
m === 1 ? l = null : p = null;
|
|
15528
15528
|
}
|
|
15529
15529
|
}
|
|
15530
|
-
var g = p ?
|
|
15530
|
+
var g = p ? d._soundById(p) : d._inactiveSound();
|
|
15531
15531
|
if (!g)
|
|
15532
15532
|
return null;
|
|
15533
|
-
if (p && !l && (l = g._sprite || "__default"),
|
|
15533
|
+
if (p && !l && (l = g._sprite || "__default"), d._state !== "loaded") {
|
|
15534
15534
|
g._sprite = l, g._ended = !1;
|
|
15535
15535
|
var y = g._id;
|
|
15536
|
-
return
|
|
15536
|
+
return d._queue.push({
|
|
15537
15537
|
event: "play",
|
|
15538
15538
|
action: function() {
|
|
15539
|
-
|
|
15539
|
+
d.play(y);
|
|
15540
15540
|
}
|
|
15541
15541
|
}), y;
|
|
15542
15542
|
}
|
|
15543
15543
|
if (p && !g._paused)
|
|
15544
|
-
return c ||
|
|
15545
|
-
|
|
15546
|
-
var _ = Math.max(0, g._seek > 0 ? g._seek :
|
|
15544
|
+
return c || d._loadQueue("play"), g._id;
|
|
15545
|
+
d._webAudio && r._autoResume();
|
|
15546
|
+
var _ = Math.max(0, g._seek > 0 ? g._seek : d._sprite[l][0] / 1e3), x = Math.max(0, (d._sprite[l][0] + d._sprite[l][1]) / 1e3 - _), b = x * 1e3 / Math.abs(g._rate), T = d._sprite[l][0] / 1e3, w = (d._sprite[l][0] + d._sprite[l][1]) / 1e3;
|
|
15547
15547
|
g._sprite = l, g._ended = !1;
|
|
15548
15548
|
var S = function() {
|
|
15549
|
-
g._paused = !1, g._seek = _, g._start = T, g._stop = w, g._loop = !!(g._loop ||
|
|
15549
|
+
g._paused = !1, g._seek = _, g._start = T, g._stop = w, g._loop = !!(g._loop || d._sprite[l][2]);
|
|
15550
15550
|
};
|
|
15551
15551
|
if (_ >= w) {
|
|
15552
|
-
|
|
15552
|
+
d._ended(g);
|
|
15553
15553
|
return;
|
|
15554
15554
|
}
|
|
15555
15555
|
var A = g._node;
|
|
15556
|
-
if (
|
|
15556
|
+
if (d._webAudio) {
|
|
15557
15557
|
var C = function() {
|
|
15558
|
-
|
|
15559
|
-
var E = g._muted ||
|
|
15560
|
-
A.gain.setValueAtTime(E, r.ctx.currentTime), g._playStart = r.ctx.currentTime, typeof A.bufferSource.start > "u" ? g._loop ? A.bufferSource.noteGrainOn(0, _, 86400) : A.bufferSource.noteGrainOn(0, _, x) : g._loop ? A.bufferSource.start(0, _, 86400) : A.bufferSource.start(0, _, x), b !== 1 / 0 && (
|
|
15561
|
-
|
|
15558
|
+
d._playLock = !1, S(), d._refreshBuffer(g);
|
|
15559
|
+
var E = g._muted || d._muted ? 0 : g._volume;
|
|
15560
|
+
A.gain.setValueAtTime(E, r.ctx.currentTime), g._playStart = r.ctx.currentTime, typeof A.bufferSource.start > "u" ? g._loop ? A.bufferSource.noteGrainOn(0, _, 86400) : A.bufferSource.noteGrainOn(0, _, x) : g._loop ? A.bufferSource.start(0, _, 86400) : A.bufferSource.start(0, _, x), b !== 1 / 0 && (d._endTimers[g._id] = setTimeout(d._ended.bind(d, g), b)), c || setTimeout(function() {
|
|
15561
|
+
d._emit("play", g._id), d._loadQueue();
|
|
15562
15562
|
}, 0);
|
|
15563
15563
|
};
|
|
15564
|
-
r.state === "running" && r.ctx.state !== "interrupted" ? C() : (
|
|
15564
|
+
r.state === "running" && r.ctx.state !== "interrupted" ? C() : (d._playLock = !0, d.once("resume", C), d._clearTimer(g._id));
|
|
15565
15565
|
} else {
|
|
15566
15566
|
var M = function() {
|
|
15567
|
-
A.currentTime = _, A.muted = g._muted ||
|
|
15567
|
+
A.currentTime = _, A.muted = g._muted || d._muted || r._muted || A.muted, A.volume = g._volume * r.volume(), A.playbackRate = g._rate;
|
|
15568
15568
|
try {
|
|
15569
15569
|
var E = A.play();
|
|
15570
|
-
if (E && typeof Promise < "u" && (E instanceof Promise || typeof E.then == "function") ? (
|
|
15571
|
-
|
|
15570
|
+
if (E && typeof Promise < "u" && (E instanceof Promise || typeof E.then == "function") ? (d._playLock = !0, S(), E.then(function() {
|
|
15571
|
+
d._playLock = !1, A._unlocked = !0, c ? d._loadQueue() : d._emit("play", g._id);
|
|
15572
15572
|
}).catch(function() {
|
|
15573
|
-
|
|
15574
|
-
})) : c || (
|
|
15575
|
-
|
|
15573
|
+
d._playLock = !1, d._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), g._ended = !0, g._paused = !0;
|
|
15574
|
+
})) : c || (d._playLock = !1, S(), d._emit("play", g._id)), A.playbackRate = g._rate, A.paused) {
|
|
15575
|
+
d._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
|
|
15576
15576
|
return;
|
|
15577
15577
|
}
|
|
15578
|
-
l !== "__default" || g._loop ?
|
|
15579
|
-
|
|
15580
|
-
}, A.addEventListener("ended",
|
|
15578
|
+
l !== "__default" || g._loop ? d._endTimers[g._id] = setTimeout(d._ended.bind(d, g), b) : (d._endTimers[g._id] = function() {
|
|
15579
|
+
d._ended(g), A.removeEventListener("ended", d._endTimers[g._id], !1);
|
|
15580
|
+
}, A.addEventListener("ended", d._endTimers[g._id], !1));
|
|
15581
15581
|
} catch (L) {
|
|
15582
|
-
|
|
15582
|
+
d._emit("playerror", g._id, L);
|
|
15583
15583
|
}
|
|
15584
15584
|
};
|
|
15585
|
-
A.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (A.src =
|
|
15585
|
+
A.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (A.src = d._src, A.load());
|
|
15586
15586
|
var G = window && window.ejecta || !A.readyState && r._navigator.isCocoonJS;
|
|
15587
15587
|
if (A.readyState >= 3 || G)
|
|
15588
15588
|
M();
|
|
15589
15589
|
else {
|
|
15590
|
-
|
|
15590
|
+
d._playLock = !0, d._state = "loading";
|
|
15591
15591
|
var I = function() {
|
|
15592
|
-
|
|
15592
|
+
d._state = "loaded", M(), A.removeEventListener(r._canPlayEvent, I, !1);
|
|
15593
15593
|
};
|
|
15594
|
-
A.addEventListener(r._canPlayEvent, I, !1),
|
|
15594
|
+
A.addEventListener(r._canPlayEvent, I, !1), d._clearTimer(g._id);
|
|
15595
15595
|
}
|
|
15596
15596
|
}
|
|
15597
15597
|
return g._id;
|
|
@@ -15610,10 +15610,10 @@ var wh = {};
|
|
|
15610
15610
|
c.pause(l);
|
|
15611
15611
|
}
|
|
15612
15612
|
}), c;
|
|
15613
|
-
for (var
|
|
15614
|
-
c._clearTimer(
|
|
15615
|
-
var m = c._soundById(
|
|
15616
|
-
if (m && !m._paused && (m._seek = c.seek(
|
|
15613
|
+
for (var d = c._getSoundIds(l), p = 0; p < d.length; p++) {
|
|
15614
|
+
c._clearTimer(d[p]);
|
|
15615
|
+
var m = c._soundById(d[p]);
|
|
15616
|
+
if (m && !m._paused && (m._seek = c.seek(d[p]), m._rateSeek = 0, m._paused = !0, c._stopFade(d[p]), m._node))
|
|
15617
15617
|
if (c._webAudio) {
|
|
15618
15618
|
if (!m._node.bufferSource)
|
|
15619
15619
|
continue;
|
|
@@ -15631,20 +15631,20 @@ var wh = {};
|
|
|
15631
15631
|
* @return {Howl}
|
|
15632
15632
|
*/
|
|
15633
15633
|
stop: function(l, c) {
|
|
15634
|
-
var
|
|
15635
|
-
if (
|
|
15636
|
-
return
|
|
15634
|
+
var d = this;
|
|
15635
|
+
if (d._state !== "loaded" || d._playLock)
|
|
15636
|
+
return d._queue.push({
|
|
15637
15637
|
event: "stop",
|
|
15638
15638
|
action: function() {
|
|
15639
|
-
|
|
15639
|
+
d.stop(l);
|
|
15640
15640
|
}
|
|
15641
|
-
}),
|
|
15642
|
-
for (var p =
|
|
15643
|
-
|
|
15644
|
-
var v =
|
|
15645
|
-
v && (v._seek = v._start || 0, v._rateSeek = 0, v._paused = !0, v._ended = !0,
|
|
15641
|
+
}), d;
|
|
15642
|
+
for (var p = d._getSoundIds(l), m = 0; m < p.length; m++) {
|
|
15643
|
+
d._clearTimer(p[m]);
|
|
15644
|
+
var v = d._soundById(p[m]);
|
|
15645
|
+
v && (v._seek = v._start || 0, v._rateSeek = 0, v._paused = !0, v._ended = !0, d._stopFade(p[m]), v._node && (d._webAudio ? v._node.bufferSource && (typeof v._node.bufferSource.stop > "u" ? v._node.bufferSource.noteOff(0) : v._node.bufferSource.stop(0), d._cleanBuffer(v._node)) : (!isNaN(v._node.duration) || v._node.duration === 1 / 0) && (v._node.currentTime = v._start || 0, v._node.pause(), v._node.duration === 1 / 0 && d._clearSound(v._node))), c || d._emit("stop", v._id));
|
|
15646
15646
|
}
|
|
15647
|
-
return
|
|
15647
|
+
return d;
|
|
15648
15648
|
},
|
|
15649
15649
|
/**
|
|
15650
15650
|
* Mute/unmute a single sound or all sounds in this Howl group.
|
|
@@ -15653,24 +15653,24 @@ var wh = {};
|
|
|
15653
15653
|
* @return {Howl}
|
|
15654
15654
|
*/
|
|
15655
15655
|
mute: function(l, c) {
|
|
15656
|
-
var
|
|
15657
|
-
if (
|
|
15658
|
-
return
|
|
15656
|
+
var d = this;
|
|
15657
|
+
if (d._state !== "loaded" || d._playLock)
|
|
15658
|
+
return d._queue.push({
|
|
15659
15659
|
event: "mute",
|
|
15660
15660
|
action: function() {
|
|
15661
|
-
|
|
15661
|
+
d.mute(l, c);
|
|
15662
15662
|
}
|
|
15663
|
-
}),
|
|
15663
|
+
}), d;
|
|
15664
15664
|
if (typeof c > "u")
|
|
15665
15665
|
if (typeof l == "boolean")
|
|
15666
|
-
|
|
15666
|
+
d._muted = l;
|
|
15667
15667
|
else
|
|
15668
|
-
return
|
|
15669
|
-
for (var p =
|
|
15670
|
-
var v =
|
|
15671
|
-
v && (v._muted = l, v._interval &&
|
|
15668
|
+
return d._muted;
|
|
15669
|
+
for (var p = d._getSoundIds(c), m = 0; m < p.length; m++) {
|
|
15670
|
+
var v = d._soundById(p[m]);
|
|
15671
|
+
v && (v._muted = l, v._interval && d._stopFade(v._id), d._webAudio && v._node ? v._node.gain.setValueAtTime(l ? 0 : v._volume, r.ctx.currentTime) : v._node && (v._node.muted = r._muted ? !0 : l), d._emit("mute", v._id));
|
|
15672
15672
|
}
|
|
15673
|
-
return
|
|
15673
|
+
return d;
|
|
15674
15674
|
},
|
|
15675
15675
|
/**
|
|
15676
15676
|
* Get/set the volume of this sound or of the Howl group. This method can optionally take 0, 1 or 2 arguments.
|
|
@@ -15681,16 +15681,16 @@ var wh = {};
|
|
|
15681
15681
|
* @return {Howl/Number} Returns self or current volume.
|
|
15682
15682
|
*/
|
|
15683
15683
|
volume: function() {
|
|
15684
|
-
var l = this, c = arguments,
|
|
15684
|
+
var l = this, c = arguments, d, p;
|
|
15685
15685
|
if (c.length === 0)
|
|
15686
15686
|
return l._volume;
|
|
15687
15687
|
if (c.length === 1 || c.length === 2 && typeof c[1] > "u") {
|
|
15688
15688
|
var m = l._getSoundIds(), v = m.indexOf(c[0]);
|
|
15689
|
-
v >= 0 ? p = parseInt(c[0], 10) :
|
|
15689
|
+
v >= 0 ? p = parseInt(c[0], 10) : d = parseFloat(c[0]);
|
|
15690
15690
|
} else
|
|
15691
|
-
c.length >= 2 && (
|
|
15691
|
+
c.length >= 2 && (d = parseFloat(c[0]), p = parseInt(c[1], 10));
|
|
15692
15692
|
var g;
|
|
15693
|
-
if (typeof
|
|
15693
|
+
if (typeof d < "u" && d >= 0 && d <= 1) {
|
|
15694
15694
|
if (l._state !== "loaded" || l._playLock)
|
|
15695
15695
|
return l._queue.push({
|
|
15696
15696
|
event: "volume",
|
|
@@ -15698,9 +15698,9 @@ var wh = {};
|
|
|
15698
15698
|
l.volume.apply(l, c);
|
|
15699
15699
|
}
|
|
15700
15700
|
}), l;
|
|
15701
|
-
typeof p > "u" && (l._volume =
|
|
15701
|
+
typeof p > "u" && (l._volume = d), p = l._getSoundIds(p);
|
|
15702
15702
|
for (var y = 0; y < p.length; y++)
|
|
15703
|
-
g = l._soundById(p[y]), g && (g._volume =
|
|
15703
|
+
g = l._soundById(p[y]), g && (g._volume = d, c[2] || l._stopFade(p[y]), l._webAudio && g._node && !g._muted ? g._node.gain.setValueAtTime(d, r.ctx.currentTime) : g._node && !g._muted && (g._node.volume = d * r.volume()), l._emit("volume", g._id));
|
|
15704
15704
|
} else
|
|
15705
15705
|
return g = p ? l._soundById(p) : l._sounds[0], g ? g._volume : 0;
|
|
15706
15706
|
return l;
|
|
@@ -15713,24 +15713,24 @@ var wh = {};
|
|
|
15713
15713
|
* @param {Number} id The sound id (omit to fade all sounds).
|
|
15714
15714
|
* @return {Howl}
|
|
15715
15715
|
*/
|
|
15716
|
-
fade: function(l, c,
|
|
15716
|
+
fade: function(l, c, d, p) {
|
|
15717
15717
|
var m = this;
|
|
15718
15718
|
if (m._state !== "loaded" || m._playLock)
|
|
15719
15719
|
return m._queue.push({
|
|
15720
15720
|
event: "fade",
|
|
15721
15721
|
action: function() {
|
|
15722
|
-
m.fade(l, c,
|
|
15722
|
+
m.fade(l, c, d, p);
|
|
15723
15723
|
}
|
|
15724
15724
|
}), m;
|
|
15725
|
-
l = Math.min(Math.max(0, parseFloat(l)), 1), c = Math.min(Math.max(0, parseFloat(c)), 1),
|
|
15725
|
+
l = Math.min(Math.max(0, parseFloat(l)), 1), c = Math.min(Math.max(0, parseFloat(c)), 1), d = parseFloat(d), m.volume(l, p);
|
|
15726
15726
|
for (var v = m._getSoundIds(p), g = 0; g < v.length; g++) {
|
|
15727
15727
|
var y = m._soundById(v[g]);
|
|
15728
15728
|
if (y) {
|
|
15729
15729
|
if (p || m._stopFade(v[g]), m._webAudio && !y._muted) {
|
|
15730
|
-
var _ = r.ctx.currentTime, x = _ +
|
|
15730
|
+
var _ = r.ctx.currentTime, x = _ + d / 1e3;
|
|
15731
15731
|
y._volume = l, y._node.gain.setValueAtTime(l, _), y._node.gain.linearRampToValueAtTime(c, x);
|
|
15732
15732
|
}
|
|
15733
|
-
m._startFadeInterval(y, l, c,
|
|
15733
|
+
m._startFadeInterval(y, l, c, d, v[g], typeof p > "u");
|
|
15734
15734
|
}
|
|
15735
15735
|
}
|
|
15736
15736
|
return m;
|
|
@@ -15744,11 +15744,11 @@ var wh = {};
|
|
|
15744
15744
|
* @param {Number} id The sound id to fade.
|
|
15745
15745
|
* @param {Boolean} isGroup If true, set the volume on the group.
|
|
15746
15746
|
*/
|
|
15747
|
-
_startFadeInterval: function(l, c,
|
|
15748
|
-
var g = this, y = c, _ =
|
|
15749
|
-
l._fadeTo =
|
|
15747
|
+
_startFadeInterval: function(l, c, d, p, m, v) {
|
|
15748
|
+
var g = this, y = c, _ = d - c, x = Math.abs(_ / 0.01), b = Math.max(4, x > 0 ? p / x : p), T = Date.now();
|
|
15749
|
+
l._fadeTo = d, l._interval = setInterval(function() {
|
|
15750
15750
|
var w = (Date.now() - T) / p;
|
|
15751
|
-
T = Date.now(), y += _ * w, y = Math.round(y * 100) / 100, _ < 0 ? y = Math.max(
|
|
15751
|
+
T = Date.now(), y += _ * w, y = Math.round(y * 100) / 100, _ < 0 ? y = Math.max(d, y) : y = Math.min(d, y), g._webAudio ? l._volume = y : g.volume(y, l._id, !0), v && (g._volume = y), (d < c && y <= d || d > c && y >= d) && (clearInterval(l._interval), l._interval = null, l._fadeTo = null, g.volume(d, l._id), g._emit("fade", l._id));
|
|
15752
15752
|
}, b);
|
|
15753
15753
|
},
|
|
15754
15754
|
/**
|
|
@@ -15758,8 +15758,8 @@ var wh = {};
|
|
|
15758
15758
|
* @return {Howl}
|
|
15759
15759
|
*/
|
|
15760
15760
|
_stopFade: function(l) {
|
|
15761
|
-
var c = this,
|
|
15762
|
-
return
|
|
15761
|
+
var c = this, d = c._soundById(l);
|
|
15762
|
+
return d && d._interval && (c._webAudio && d._node.gain.cancelScheduledValues(r.ctx.currentTime), clearInterval(d._interval), d._interval = null, c.volume(d._fadeTo, l), d._fadeTo = null, c._emit("fade", l)), c;
|
|
15763
15763
|
},
|
|
15764
15764
|
/**
|
|
15765
15765
|
* Get/set the loop parameter on a sound. This method can optionally take 0, 1 or 2 arguments.
|
|
@@ -15770,18 +15770,18 @@ var wh = {};
|
|
|
15770
15770
|
* @return {Howl/Boolean} Returns self or current loop value.
|
|
15771
15771
|
*/
|
|
15772
15772
|
loop: function() {
|
|
15773
|
-
var l = this, c = arguments,
|
|
15773
|
+
var l = this, c = arguments, d, p, m;
|
|
15774
15774
|
if (c.length === 0)
|
|
15775
15775
|
return l._loop;
|
|
15776
15776
|
if (c.length === 1)
|
|
15777
15777
|
if (typeof c[0] == "boolean")
|
|
15778
|
-
|
|
15778
|
+
d = c[0], l._loop = d;
|
|
15779
15779
|
else
|
|
15780
15780
|
return m = l._soundById(parseInt(c[0], 10)), m ? m._loop : !1;
|
|
15781
15781
|
else
|
|
15782
|
-
c.length === 2 && (
|
|
15782
|
+
c.length === 2 && (d = c[0], p = parseInt(c[1], 10));
|
|
15783
15783
|
for (var v = l._getSoundIds(p), g = 0; g < v.length; g++)
|
|
15784
|
-
m = l._soundById(v[g]), m && (m._loop =
|
|
15784
|
+
m = l._soundById(v[g]), m && (m._loop = d, l._webAudio && m._node && m._node.bufferSource && (m._node.bufferSource.loop = d, d && (m._node.bufferSource.loopStart = m._start || 0, m._node.bufferSource.loopEnd = m._stop, l.playing(v[g]) && (l.pause(v[g], !0), l.play(v[g], !0)))));
|
|
15785
15785
|
return l;
|
|
15786
15786
|
},
|
|
15787
15787
|
/**
|
|
@@ -15793,16 +15793,16 @@ var wh = {};
|
|
|
15793
15793
|
* @return {Howl/Number} Returns self or the current playback rate.
|
|
15794
15794
|
*/
|
|
15795
15795
|
rate: function() {
|
|
15796
|
-
var l = this, c = arguments,
|
|
15796
|
+
var l = this, c = arguments, d, p;
|
|
15797
15797
|
if (c.length === 0)
|
|
15798
15798
|
p = l._sounds[0]._id;
|
|
15799
15799
|
else if (c.length === 1) {
|
|
15800
15800
|
var m = l._getSoundIds(), v = m.indexOf(c[0]);
|
|
15801
|
-
v >= 0 ? p = parseInt(c[0], 10) :
|
|
15801
|
+
v >= 0 ? p = parseInt(c[0], 10) : d = parseFloat(c[0]);
|
|
15802
15802
|
} else
|
|
15803
|
-
c.length === 2 && (
|
|
15803
|
+
c.length === 2 && (d = parseFloat(c[0]), p = parseInt(c[1], 10));
|
|
15804
15804
|
var g;
|
|
15805
|
-
if (typeof
|
|
15805
|
+
if (typeof d == "number") {
|
|
15806
15806
|
if (l._state !== "loaded" || l._playLock)
|
|
15807
15807
|
return l._queue.push({
|
|
15808
15808
|
event: "rate",
|
|
@@ -15810,10 +15810,10 @@ var wh = {};
|
|
|
15810
15810
|
l.rate.apply(l, c);
|
|
15811
15811
|
}
|
|
15812
15812
|
}), l;
|
|
15813
|
-
typeof p > "u" && (l._rate =
|
|
15813
|
+
typeof p > "u" && (l._rate = d), p = l._getSoundIds(p);
|
|
15814
15814
|
for (var y = 0; y < p.length; y++)
|
|
15815
15815
|
if (g = l._soundById(p[y]), g) {
|
|
15816
|
-
l.playing(p[y]) && (g._rateSeek = l.seek(p[y]), g._playStart = l._webAudio ? r.ctx.currentTime : g._playStart), g._rate =
|
|
15816
|
+
l.playing(p[y]) && (g._rateSeek = l.seek(p[y]), g._playStart = l._webAudio ? r.ctx.currentTime : g._playStart), g._rate = d, l._webAudio && g._node && g._node.bufferSource ? g._node.bufferSource.playbackRate.setValueAtTime(d, r.ctx.currentTime) : g._node && (g._node.playbackRate = d);
|
|
15817
15817
|
var _ = l.seek(p[y]), x = (l._sprite[g._sprite][0] + l._sprite[g._sprite][1]) / 1e3 - _, b = x * 1e3 / Math.abs(g._rate);
|
|
15818
15818
|
(l._endTimers[p[y]] || !g._paused) && (l._clearTimer(p[y]), l._endTimers[p[y]] = setTimeout(l._ended.bind(l, g), b)), l._emit("rate", g._id);
|
|
15819
15819
|
}
|
|
@@ -15830,17 +15830,17 @@ var wh = {};
|
|
|
15830
15830
|
* @return {Howl/Number} Returns self or the current seek position.
|
|
15831
15831
|
*/
|
|
15832
15832
|
seek: function() {
|
|
15833
|
-
var l = this, c = arguments,
|
|
15833
|
+
var l = this, c = arguments, d, p;
|
|
15834
15834
|
if (c.length === 0)
|
|
15835
15835
|
l._sounds.length && (p = l._sounds[0]._id);
|
|
15836
15836
|
else if (c.length === 1) {
|
|
15837
15837
|
var m = l._getSoundIds(), v = m.indexOf(c[0]);
|
|
15838
|
-
v >= 0 ? p = parseInt(c[0], 10) : l._sounds.length && (p = l._sounds[0]._id,
|
|
15838
|
+
v >= 0 ? p = parseInt(c[0], 10) : l._sounds.length && (p = l._sounds[0]._id, d = parseFloat(c[0]));
|
|
15839
15839
|
} else
|
|
15840
|
-
c.length === 2 && (
|
|
15840
|
+
c.length === 2 && (d = parseFloat(c[0]), p = parseInt(c[1], 10));
|
|
15841
15841
|
if (typeof p > "u")
|
|
15842
15842
|
return 0;
|
|
15843
|
-
if (typeof
|
|
15843
|
+
if (typeof d == "number" && (l._state !== "loaded" || l._playLock))
|
|
15844
15844
|
return l._queue.push({
|
|
15845
15845
|
event: "seek",
|
|
15846
15846
|
action: function() {
|
|
@@ -15849,9 +15849,9 @@ var wh = {};
|
|
|
15849
15849
|
}), l;
|
|
15850
15850
|
var g = l._soundById(p);
|
|
15851
15851
|
if (g)
|
|
15852
|
-
if (typeof
|
|
15852
|
+
if (typeof d == "number" && d >= 0) {
|
|
15853
15853
|
var y = l.playing(p);
|
|
15854
|
-
y && l.pause(p, !0), g._seek =
|
|
15854
|
+
y && l.pause(p, !0), g._seek = d, g._ended = !1, l._clearTimer(p), !l._webAudio && g._node && !isNaN(g._node.duration) && (g._node.currentTime = d);
|
|
15855
15855
|
var _ = function() {
|
|
15856
15856
|
y && l.play(p, !0), l._emit("seek", p);
|
|
15857
15857
|
};
|
|
@@ -15877,8 +15877,8 @@ var wh = {};
|
|
|
15877
15877
|
playing: function(l) {
|
|
15878
15878
|
var c = this;
|
|
15879
15879
|
if (typeof l == "number") {
|
|
15880
|
-
var
|
|
15881
|
-
return
|
|
15880
|
+
var d = c._soundById(l);
|
|
15881
|
+
return d ? !d._paused : !1;
|
|
15882
15882
|
}
|
|
15883
15883
|
for (var p = 0; p < c._sounds.length; p++)
|
|
15884
15884
|
if (!c._sounds[p]._paused)
|
|
@@ -15891,8 +15891,8 @@ var wh = {};
|
|
|
15891
15891
|
* @return {Number} Audio duration in seconds.
|
|
15892
15892
|
*/
|
|
15893
15893
|
duration: function(l) {
|
|
15894
|
-
var c = this,
|
|
15895
|
-
return p && (
|
|
15894
|
+
var c = this, d = c._duration, p = c._soundById(l);
|
|
15895
|
+
return p && (d = c._sprite[p._sprite][1] / 1e3), d;
|
|
15896
15896
|
},
|
|
15897
15897
|
/**
|
|
15898
15898
|
* Returns the current loaded state of this Howl.
|
|
@@ -15906,13 +15906,13 @@ var wh = {};
|
|
|
15906
15906
|
* This will immediately stop all sound instances attached to this group.
|
|
15907
15907
|
*/
|
|
15908
15908
|
unload: function() {
|
|
15909
|
-
for (var l = this, c = l._sounds,
|
|
15910
|
-
c[
|
|
15909
|
+
for (var l = this, c = l._sounds, d = 0; d < c.length; d++)
|
|
15910
|
+
c[d]._paused || l.stop(c[d]._id), l._webAudio || (l._clearSound(c[d]._node), c[d]._node.removeEventListener("error", c[d]._errorFn, !1), c[d]._node.removeEventListener(r._canPlayEvent, c[d]._loadFn, !1), c[d]._node.removeEventListener("ended", c[d]._endFn, !1), r._releaseHtml5Audio(c[d]._node)), delete c[d]._node, l._clearTimer(c[d]._id);
|
|
15911
15911
|
var p = r._howls.indexOf(l);
|
|
15912
15912
|
p >= 0 && r._howls.splice(p, 1);
|
|
15913
15913
|
var m = !0;
|
|
15914
|
-
for (
|
|
15915
|
-
if (r._howls[
|
|
15914
|
+
for (d = 0; d < r._howls.length; d++)
|
|
15915
|
+
if (r._howls[d]._src === l._src || l._src.indexOf(r._howls[d]._src) >= 0) {
|
|
15916
15916
|
m = !1;
|
|
15917
15917
|
break;
|
|
15918
15918
|
}
|
|
@@ -15926,9 +15926,9 @@ var wh = {};
|
|
|
15926
15926
|
* @param {Number} once (INTERNAL) Marks event to fire only once.
|
|
15927
15927
|
* @return {Howl}
|
|
15928
15928
|
*/
|
|
15929
|
-
on: function(l, c,
|
|
15929
|
+
on: function(l, c, d, p) {
|
|
15930
15930
|
var m = this, v = m["_on" + l];
|
|
15931
|
-
return typeof c == "function" && v.push(p ? { id:
|
|
15931
|
+
return typeof c == "function" && v.push(p ? { id: d, fn: c, once: p } : { id: d, fn: c }), m;
|
|
15932
15932
|
},
|
|
15933
15933
|
/**
|
|
15934
15934
|
* Remove a custom event. Call without parameters to remove all events.
|
|
@@ -15937,11 +15937,11 @@ var wh = {};
|
|
|
15937
15937
|
* @param {Number} id (optional) Only remove events for this sound.
|
|
15938
15938
|
* @return {Howl}
|
|
15939
15939
|
*/
|
|
15940
|
-
off: function(l, c,
|
|
15940
|
+
off: function(l, c, d) {
|
|
15941
15941
|
var p = this, m = p["_on" + l], v = 0;
|
|
15942
|
-
if (typeof c == "number" && (
|
|
15942
|
+
if (typeof c == "number" && (d = c, c = null), c || d)
|
|
15943
15943
|
for (v = 0; v < m.length; v++) {
|
|
15944
|
-
var g =
|
|
15944
|
+
var g = d === m[v].id;
|
|
15945
15945
|
if (c === m[v].fn && g || !c && g) {
|
|
15946
15946
|
m.splice(v, 1);
|
|
15947
15947
|
break;
|
|
@@ -15963,9 +15963,9 @@ var wh = {};
|
|
|
15963
15963
|
* @param {Number} id (optional) Only listen to events for this sound.
|
|
15964
15964
|
* @return {Howl}
|
|
15965
15965
|
*/
|
|
15966
|
-
once: function(l, c,
|
|
15966
|
+
once: function(l, c, d) {
|
|
15967
15967
|
var p = this;
|
|
15968
|
-
return p.on(l, c,
|
|
15968
|
+
return p.on(l, c, d, 1), p;
|
|
15969
15969
|
},
|
|
15970
15970
|
/**
|
|
15971
15971
|
* Emit all events of a specific type and pass the sound id.
|
|
@@ -15974,10 +15974,10 @@ var wh = {};
|
|
|
15974
15974
|
* @param {Number} msg Message to go with event.
|
|
15975
15975
|
* @return {Howl}
|
|
15976
15976
|
*/
|
|
15977
|
-
_emit: function(l, c,
|
|
15977
|
+
_emit: function(l, c, d) {
|
|
15978
15978
|
for (var p = this, m = p["_on" + l], v = m.length - 1; v >= 0; v--)
|
|
15979
15979
|
(!m[v].id || m[v].id === c || l === "load") && (setTimeout((function(g) {
|
|
15980
|
-
g.call(this, c,
|
|
15980
|
+
g.call(this, c, d);
|
|
15981
15981
|
}).bind(p, m[v].fn), 0), m[v].once && p.off(l, m[v].fn, m[v].id));
|
|
15982
15982
|
return p._loadQueue(l), p;
|
|
15983
15983
|
},
|
|
@@ -15990,8 +15990,8 @@ var wh = {};
|
|
|
15990
15990
|
_loadQueue: function(l) {
|
|
15991
15991
|
var c = this;
|
|
15992
15992
|
if (c._queue.length > 0) {
|
|
15993
|
-
var
|
|
15994
|
-
|
|
15993
|
+
var d = c._queue[0];
|
|
15994
|
+
d.event === l && (c._queue.shift(), c._loadQueue()), l || d.action();
|
|
15995
15995
|
}
|
|
15996
15996
|
return c;
|
|
15997
15997
|
},
|
|
@@ -16001,10 +16001,10 @@ var wh = {};
|
|
|
16001
16001
|
* @return {Howl}
|
|
16002
16002
|
*/
|
|
16003
16003
|
_ended: function(l) {
|
|
16004
|
-
var c = this,
|
|
16004
|
+
var c = this, d = l._sprite;
|
|
16005
16005
|
if (!c._webAudio && l._node && !l._node.paused && !l._node.ended && l._node.currentTime < l._stop)
|
|
16006
16006
|
return setTimeout(c._ended.bind(c, l), 100), c;
|
|
16007
|
-
var p = !!(l._loop || c._sprite[
|
|
16007
|
+
var p = !!(l._loop || c._sprite[d][2]);
|
|
16008
16008
|
if (c._emit("end", l._id), !c._webAudio && p && c.stop(l._id, !0).play(l._id), c._webAudio && p) {
|
|
16009
16009
|
c._emit("play", l._id), l._seek = l._start || 0, l._rateSeek = 0, l._playStart = r.ctx.currentTime;
|
|
16010
16010
|
var m = (l._stop - l._start) * 1e3 / Math.abs(l._rate);
|
|
@@ -16023,8 +16023,8 @@ var wh = {};
|
|
|
16023
16023
|
if (typeof c._endTimers[l] != "function")
|
|
16024
16024
|
clearTimeout(c._endTimers[l]);
|
|
16025
16025
|
else {
|
|
16026
|
-
var
|
|
16027
|
-
|
|
16026
|
+
var d = c._soundById(l);
|
|
16027
|
+
d && d._node && d._node.removeEventListener("ended", c._endTimers[l], !1);
|
|
16028
16028
|
}
|
|
16029
16029
|
delete c._endTimers[l];
|
|
16030
16030
|
}
|
|
@@ -16036,9 +16036,9 @@ var wh = {};
|
|
|
16036
16036
|
* @return {Object} Sound object or null.
|
|
16037
16037
|
*/
|
|
16038
16038
|
_soundById: function(l) {
|
|
16039
|
-
for (var c = this,
|
|
16040
|
-
if (l === c._sounds[
|
|
16041
|
-
return c._sounds[
|
|
16039
|
+
for (var c = this, d = 0; d < c._sounds.length; d++)
|
|
16040
|
+
if (l === c._sounds[d]._id)
|
|
16041
|
+
return c._sounds[d];
|
|
16042
16042
|
return null;
|
|
16043
16043
|
},
|
|
16044
16044
|
/**
|
|
@@ -16057,14 +16057,14 @@ var wh = {};
|
|
|
16057
16057
|
* Drain excess inactive sounds from the pool.
|
|
16058
16058
|
*/
|
|
16059
16059
|
_drain: function() {
|
|
16060
|
-
var l = this, c = l._pool,
|
|
16060
|
+
var l = this, c = l._pool, d = 0, p = 0;
|
|
16061
16061
|
if (!(l._sounds.length < c)) {
|
|
16062
16062
|
for (p = 0; p < l._sounds.length; p++)
|
|
16063
|
-
l._sounds[p]._ended &&
|
|
16063
|
+
l._sounds[p]._ended && d++;
|
|
16064
16064
|
for (p = l._sounds.length - 1; p >= 0; p--) {
|
|
16065
|
-
if (
|
|
16065
|
+
if (d <= c)
|
|
16066
16066
|
return;
|
|
16067
|
-
l._sounds[p]._ended && (l._webAudio && l._sounds[p]._node && l._sounds[p]._node.disconnect(0), l._sounds.splice(p, 1),
|
|
16067
|
+
l._sounds[p]._ended && (l._webAudio && l._sounds[p]._node && l._sounds[p]._node.disconnect(0), l._sounds.splice(p, 1), d--);
|
|
16068
16068
|
}
|
|
16069
16069
|
}
|
|
16070
16070
|
},
|
|
@@ -16076,9 +16076,9 @@ var wh = {};
|
|
|
16076
16076
|
_getSoundIds: function(l) {
|
|
16077
16077
|
var c = this;
|
|
16078
16078
|
if (typeof l > "u") {
|
|
16079
|
-
for (var
|
|
16080
|
-
|
|
16081
|
-
return
|
|
16079
|
+
for (var d = [], p = 0; p < c._sounds.length; p++)
|
|
16080
|
+
d.push(c._sounds[p]._id);
|
|
16081
|
+
return d;
|
|
16082
16082
|
} else
|
|
16083
16083
|
return [l];
|
|
16084
16084
|
},
|
|
@@ -16097,8 +16097,8 @@ var wh = {};
|
|
|
16097
16097
|
* @return {Howl}
|
|
16098
16098
|
*/
|
|
16099
16099
|
_cleanBuffer: function(l) {
|
|
16100
|
-
var c = this,
|
|
16101
|
-
if (r._scratchBuffer && l.bufferSource && (l.bufferSource.onended = null, l.bufferSource.disconnect(0),
|
|
16100
|
+
var c = this, d = r._navigator && r._navigator.vendor.indexOf("Apple") >= 0;
|
|
16101
|
+
if (r._scratchBuffer && l.bufferSource && (l.bufferSource.onended = null, l.bufferSource.disconnect(0), d))
|
|
16102
16102
|
try {
|
|
16103
16103
|
l.bufferSource.buffer = r._scratchBuffer;
|
|
16104
16104
|
} catch {
|
|
@@ -16131,8 +16131,8 @@ var wh = {};
|
|
|
16131
16131
|
* @return {Sound}
|
|
16132
16132
|
*/
|
|
16133
16133
|
create: function() {
|
|
16134
|
-
var l = this, c = l._parent,
|
|
16135
|
-
return c._webAudio ? (l._node = typeof r.ctx.createGain > "u" ? r.ctx.createGainNode() : r.ctx.createGain(), l._node.gain.setValueAtTime(
|
|
16134
|
+
var l = this, c = l._parent, d = r._muted || l._muted || l._parent._muted ? 0 : l._volume;
|
|
16135
|
+
return c._webAudio ? (l._node = typeof r.ctx.createGain > "u" ? r.ctx.createGainNode() : r.ctx.createGain(), l._node.gain.setValueAtTime(d, r.ctx.currentTime), l._node.paused = !0, l._node.connect(r.masterGain)) : r.noAudio || (l._node = r._obtainHtml5Audio(), l._errorFn = l._errorListener.bind(l), l._node.addEventListener("error", l._errorFn, !1), l._loadFn = l._loadListener.bind(l), l._node.addEventListener(r._canPlayEvent, l._loadFn, !1), l._endFn = l._endListener.bind(l), l._node.addEventListener("ended", l._endFn, !1), l._node.src = c._src, l._node.preload = c._preload === !0 ? "auto" : c._preload, l._node.volume = d * r.volume(), l._node.load()), l;
|
|
16136
16136
|
},
|
|
16137
16137
|
/**
|
|
16138
16138
|
* Reset the parameters of this sound to the original state (for recycle).
|
|
@@ -16171,8 +16171,8 @@ var wh = {};
|
|
|
16171
16171
|
return;
|
|
16172
16172
|
}
|
|
16173
16173
|
if (/^data:[^;]+;base64,/.test(c)) {
|
|
16174
|
-
for (var
|
|
16175
|
-
p[m] =
|
|
16174
|
+
for (var d = atob(c.split(",")[1]), p = new Uint8Array(d.length), m = 0; m < d.length; ++m)
|
|
16175
|
+
p[m] = d.charCodeAt(m);
|
|
16176
16176
|
u(p.buffer, l);
|
|
16177
16177
|
} else {
|
|
16178
16178
|
var v = new XMLHttpRequest();
|
|
@@ -16196,15 +16196,15 @@ var wh = {};
|
|
|
16196
16196
|
l.onerror();
|
|
16197
16197
|
}
|
|
16198
16198
|
}, u = function(l, c) {
|
|
16199
|
-
var
|
|
16199
|
+
var d = function() {
|
|
16200
16200
|
c._emit("loaderror", null, "Decoding audio data failed.");
|
|
16201
16201
|
}, p = function(m) {
|
|
16202
|
-
m && c._sounds.length > 0 ? (s[c._src] = m, h(c, m)) :
|
|
16202
|
+
m && c._sounds.length > 0 ? (s[c._src] = m, h(c, m)) : d();
|
|
16203
16203
|
};
|
|
16204
|
-
typeof Promise < "u" && r.ctx.decodeAudioData.length === 1 ? r.ctx.decodeAudioData(l).then(p).catch(
|
|
16204
|
+
typeof Promise < "u" && r.ctx.decodeAudioData.length === 1 ? r.ctx.decodeAudioData(l).then(p).catch(d) : r.ctx.decodeAudioData(l, p, d);
|
|
16205
16205
|
}, h = function(l, c) {
|
|
16206
16206
|
c && !l._duration && (l._duration = c.duration), Object.keys(l._sprite).length === 0 && (l._sprite = { __default: [0, l._duration * 1e3] }), l._state !== "loaded" && (l._state = "loaded", l._emit("load"), l._loadQueue());
|
|
16207
|
-
},
|
|
16207
|
+
}, f = function() {
|
|
16208
16208
|
if (r.usingWebAudio) {
|
|
16209
16209
|
try {
|
|
16210
16210
|
typeof AudioContext < "u" ? r.ctx = new AudioContext() : typeof webkitAudioContext < "u" ? r.ctx = new webkitAudioContext() : r.usingWebAudio = !1;
|
|
@@ -16212,8 +16212,8 @@ var wh = {};
|
|
|
16212
16212
|
r.usingWebAudio = !1;
|
|
16213
16213
|
}
|
|
16214
16214
|
r.ctx || (r.usingWebAudio = !1);
|
|
16215
|
-
var l = /iP(hone|od|ad)/.test(r._navigator && r._navigator.platform), c = r._navigator && r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),
|
|
16216
|
-
if (l &&
|
|
16215
|
+
var l = /iP(hone|od|ad)/.test(r._navigator && r._navigator.platform), c = r._navigator && r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), d = c ? parseInt(c[1], 10) : null;
|
|
16216
|
+
if (l && d && d < 9) {
|
|
16217
16217
|
var p = /safari/.test(r._navigator && r._navigator.userAgent.toLowerCase());
|
|
16218
16218
|
r._navigator && !p && (r.usingWebAudio = !1);
|
|
16219
16219
|
}
|
|
@@ -16394,8 +16394,8 @@ var wh = {};
|
|
|
16394
16394
|
rolloffFactor: typeof n.rolloffFactor < "u" ? n.rolloffFactor : h.rolloffFactor,
|
|
16395
16395
|
panningModel: typeof n.panningModel < "u" ? n.panningModel : h.panningModel
|
|
16396
16396
|
};
|
|
16397
|
-
var
|
|
16398
|
-
|
|
16397
|
+
var f = a._panner;
|
|
16398
|
+
f ? (f.coneInnerAngle = h.coneInnerAngle, f.coneOuterAngle = h.coneOuterAngle, f.coneOuterGain = h.coneOuterGain, f.distanceModel = h.distanceModel, f.maxDistance = h.maxDistance, f.refDistance = h.refDistance, f.rolloffFactor = h.rolloffFactor, f.panningModel = h.panningModel) : (a._pos || (a._pos = r._pos || [0, 0, -0.5]), e(a, "spatial"));
|
|
16399
16399
|
}
|
|
16400
16400
|
return r;
|
|
16401
16401
|
}, Sound.prototype.init = function(r) {
|
|
@@ -16424,12 +16424,12 @@ const c2 = (t) => {
|
|
|
16424
16424
|
loaded: !1,
|
|
16425
16425
|
size: { width: 50, height: 50 },
|
|
16426
16426
|
isDragging: !1
|
|
16427
|
-
}, [, r] = k.useState(!1), i =
|
|
16427
|
+
}, [, r] = k.useState(!1), i = z(null), n = z(e), s = z(null), a = k.useRef(null), { tl: o, dragModeRef: u } = kr(ir), {
|
|
16428
16428
|
uniqueId: h,
|
|
16429
|
-
src:
|
|
16429
|
+
src: f,
|
|
16430
16430
|
startAt: l,
|
|
16431
16431
|
endAt: c,
|
|
16432
|
-
mute:
|
|
16432
|
+
mute: d,
|
|
16433
16433
|
speed: p,
|
|
16434
16434
|
audioStartAt: m,
|
|
16435
16435
|
audioEndAt: v,
|
|
@@ -16485,17 +16485,17 @@ const c2 = (t) => {
|
|
|
16485
16485
|
};
|
|
16486
16486
|
}, [l, c, m, v]), k.useEffect(() => {
|
|
16487
16487
|
i.current && r(!0);
|
|
16488
|
-
}, []), k.useEffect(() => (Cr(
|
|
16489
|
-
src: [
|
|
16488
|
+
}, []), k.useEffect(() => (Cr(f) || (a.current = new wh.Howl({
|
|
16489
|
+
src: [f],
|
|
16490
16490
|
// sprite: {
|
|
16491
16491
|
// [uniqueId]: [audioStartAt * 1000, (audioEndAt - audioStartAt) * 1000],
|
|
16492
16492
|
// },
|
|
16493
16493
|
autoplay: !1,
|
|
16494
16494
|
loop: !1,
|
|
16495
16495
|
rate: p || 1,
|
|
16496
|
-
volume: !
|
|
16496
|
+
volume: !d && g ? 1 : 0,
|
|
16497
16497
|
onload: () => {
|
|
16498
|
-
console.log("loaded audio sprite" + h), n.current.loaded = !0, a.current && (m > 0 && a.current.seek(m), a.current.volume(!
|
|
16498
|
+
console.log("loaded audio sprite" + h), n.current.loaded = !0, a.current && (m > 0 && a.current.seek(m), a.current.volume(!d && g ? 1 : 0), a.current.rate(p || 1), a.current.pause(), n.current.isPlaying = !1, n.current.completed = !1);
|
|
16499
16499
|
},
|
|
16500
16500
|
onend: () => {
|
|
16501
16501
|
console.log("end of playing audio sprite" + h), n.current.isPlaying = !1, n.current.completed = !0;
|
|
@@ -16513,17 +16513,17 @@ const c2 = (t) => {
|
|
|
16513
16513
|
a.current && a.current.unload();
|
|
16514
16514
|
}), [
|
|
16515
16515
|
h,
|
|
16516
|
-
|
|
16516
|
+
f,
|
|
16517
16517
|
l,
|
|
16518
16518
|
c,
|
|
16519
16519
|
m,
|
|
16520
16520
|
v,
|
|
16521
|
-
|
|
16521
|
+
d,
|
|
16522
16522
|
g,
|
|
16523
16523
|
p
|
|
16524
16524
|
]), k.useEffect(() => {
|
|
16525
|
-
a.current && (console.log("running updateEffect 2002", h, v), a.current.volume(!
|
|
16526
|
-
}, [
|
|
16525
|
+
a.current && (console.log("running updateEffect 2002", h, v), a.current.volume(!d && g ? 1 : 0), a.current.rate(p || 1), n.current.isPlaying = !0);
|
|
16526
|
+
}, [d, g, p]), // @ts-ignore
|
|
16527
16527
|
/* @__PURE__ */ K.jsx(Ae, { ref: i });
|
|
16528
16528
|
};
|
|
16529
16529
|
function nS(t, e) {
|
|
@@ -16543,15 +16543,15 @@ function uS(t, e, r, i) {
|
|
|
16543
16543
|
}
|
|
16544
16544
|
for (; ++n < s; ) {
|
|
16545
16545
|
o = r[n];
|
|
16546
|
-
var u = o[0], h = t[u],
|
|
16546
|
+
var u = o[0], h = t[u], f = o[1];
|
|
16547
16547
|
if (a && o[2]) {
|
|
16548
16548
|
if (h === void 0 && !(u in t))
|
|
16549
16549
|
return !1;
|
|
16550
16550
|
} else {
|
|
16551
16551
|
var l = new sS();
|
|
16552
16552
|
if (i)
|
|
16553
|
-
var c = i(h,
|
|
16554
|
-
if (!(c === void 0 ? aS(
|
|
16553
|
+
var c = i(h, f, u, t, e, l);
|
|
16554
|
+
if (!(c === void 0 ? aS(f, h, oS | lS, i, l) : c))
|
|
16555
16555
|
return !1;
|
|
16556
16556
|
}
|
|
16557
16557
|
}
|
|
@@ -16867,7 +16867,7 @@ Te.readBits = UE;
|
|
|
16867
16867
|
}), t.default = void 0;
|
|
16868
16868
|
var e = At, r = Te, i = {
|
|
16869
16869
|
blocks: function(c) {
|
|
16870
|
-
for (var
|
|
16870
|
+
for (var d = 0, p = [], m = c.data.length, v = 0, g = (0, r.readByte)()(c); g !== d && g; g = (0, r.readByte)()(c)) {
|
|
16871
16871
|
if (c.pos + g >= m) {
|
|
16872
16872
|
var y = m - c.pos;
|
|
16873
16873
|
p.push((0, r.readBytes)(y)(c)), v += y;
|
|
@@ -16945,11 +16945,11 @@ Te.readBits = UE;
|
|
|
16945
16945
|
})
|
|
16946
16946
|
}]
|
|
16947
16947
|
}, (0, e.conditional)({
|
|
16948
|
-
lct: (0, r.readArray)(3, function(l, c,
|
|
16949
|
-
return Math.pow(2,
|
|
16948
|
+
lct: (0, r.readArray)(3, function(l, c, d) {
|
|
16949
|
+
return Math.pow(2, d.descriptor.lct.size + 1);
|
|
16950
16950
|
})
|
|
16951
|
-
}, function(l, c,
|
|
16952
|
-
return
|
|
16951
|
+
}, function(l, c, d) {
|
|
16952
|
+
return d.descriptor.lct.exists;
|
|
16953
16953
|
}), {
|
|
16954
16954
|
data: [{
|
|
16955
16955
|
minCodeSize: (0, r.readByte)()
|
|
@@ -16963,7 +16963,7 @@ Te.readBits = UE;
|
|
|
16963
16963
|
}, {
|
|
16964
16964
|
blockSize: (0, r.readByte)()
|
|
16965
16965
|
}, {
|
|
16966
|
-
preData: function(c,
|
|
16966
|
+
preData: function(c, d, p) {
|
|
16967
16967
|
return (0, r.readBytes)(p.text.blockSize)(c);
|
|
16968
16968
|
}
|
|
16969
16969
|
}, i]
|
|
@@ -16976,7 +16976,7 @@ Te.readBits = UE;
|
|
|
16976
16976
|
}, {
|
|
16977
16977
|
blockSize: (0, r.readByte)()
|
|
16978
16978
|
}, {
|
|
16979
|
-
id: function(c,
|
|
16979
|
+
id: function(c, d, p) {
|
|
16980
16980
|
return (0, r.readString)(p.blockSize)(c);
|
|
16981
16981
|
}
|
|
16982
16982
|
}, i]
|
|
@@ -17040,8 +17040,8 @@ Te.readBits = UE;
|
|
|
17040
17040
|
return c === 33 || c === 44;
|
|
17041
17041
|
})
|
|
17042
17042
|
}
|
|
17043
|
-
],
|
|
17044
|
-
t.default =
|
|
17043
|
+
], f = h;
|
|
17044
|
+
t.default = f;
|
|
17045
17045
|
})(Mh);
|
|
17046
17046
|
var qn = {};
|
|
17047
17047
|
Object.defineProperty(qn, "__esModule", {
|
|
@@ -17049,12 +17049,12 @@ Object.defineProperty(qn, "__esModule", {
|
|
|
17049
17049
|
});
|
|
17050
17050
|
qn.deinterlace = void 0;
|
|
17051
17051
|
var $E = function(e, r) {
|
|
17052
|
-
for (var i = new Array(e.length), n = e.length / r, s = function(c,
|
|
17053
|
-
var p = e.slice(
|
|
17052
|
+
for (var i = new Array(e.length), n = e.length / r, s = function(c, d) {
|
|
17053
|
+
var p = e.slice(d * r, (d + 1) * r);
|
|
17054
17054
|
i.splice.apply(i, [c * r, r].concat(p));
|
|
17055
17055
|
}, a = [0, 4, 2, 1], o = [8, 8, 4, 2], u = 0, h = 0; h < 4; h++)
|
|
17056
|
-
for (var
|
|
17057
|
-
s(
|
|
17056
|
+
for (var f = a[h]; f < n; f += o[h])
|
|
17057
|
+
s(f, u), u++;
|
|
17058
17058
|
return i;
|
|
17059
17059
|
};
|
|
17060
17060
|
qn.deinterlace = $E;
|
|
@@ -17064,29 +17064,29 @@ Object.defineProperty(Yn, "__esModule", {
|
|
|
17064
17064
|
});
|
|
17065
17065
|
Yn.lzw = void 0;
|
|
17066
17066
|
var GE = function(e, r, i) {
|
|
17067
|
-
var n = 4096, s = -1, a = i, o, u, h,
|
|
17068
|
-
for (v = e, u = 1 << v, l = u + 1, o = u + 2,
|
|
17067
|
+
var n = 4096, s = -1, a = i, o, u, h, f, l, c, d, T, p, m, b, v, w, S, C, A, g = new Array(i), y = new Array(n), _ = new Array(n), x = new Array(n + 1);
|
|
17068
|
+
for (v = e, u = 1 << v, l = u + 1, o = u + 2, d = s, f = v + 1, h = (1 << f) - 1, p = 0; p < u; p++)
|
|
17069
17069
|
y[p] = 0, _[p] = p;
|
|
17070
17070
|
var b, T, w, S, A, C;
|
|
17071
17071
|
for (b = T = w = S = A = C = 0, m = 0; m < a; ) {
|
|
17072
17072
|
if (S === 0) {
|
|
17073
|
-
if (T <
|
|
17073
|
+
if (T < f) {
|
|
17074
17074
|
b += r[C] << T, T += 8, C++;
|
|
17075
17075
|
continue;
|
|
17076
17076
|
}
|
|
17077
|
-
if (p = b & h, b >>=
|
|
17077
|
+
if (p = b & h, b >>= f, T -= f, p > o || p == l)
|
|
17078
17078
|
break;
|
|
17079
17079
|
if (p == u) {
|
|
17080
|
-
|
|
17080
|
+
f = v + 1, h = (1 << f) - 1, o = u + 2, d = s;
|
|
17081
17081
|
continue;
|
|
17082
17082
|
}
|
|
17083
|
-
if (
|
|
17084
|
-
x[S++] = _[p],
|
|
17083
|
+
if (d == s) {
|
|
17084
|
+
x[S++] = _[p], d = p, w = p;
|
|
17085
17085
|
continue;
|
|
17086
17086
|
}
|
|
17087
|
-
for (c = p, p == o && (x[S++] = w, p =
|
|
17087
|
+
for (c = p, p == o && (x[S++] = w, p = d); p > u; )
|
|
17088
17088
|
x[S++] = _[p], p = y[p];
|
|
17089
|
-
w = _[p] & 255, x[S++] = w, o < n && (y[o] =
|
|
17089
|
+
w = _[p] & 255, x[S++] = w, o < n && (y[o] = d, _[o] = w, o++, !(o & h) && o < n && (f++, h += o)), d = c;
|
|
17090
17090
|
}
|
|
17091
17091
|
S--, g[A++] = x[S], m++;
|
|
17092
17092
|
}
|
|
@@ -17191,7 +17191,7 @@ const tC = (t) => ({
|
|
|
17191
17191
|
});
|
|
17192
17192
|
}), [r, e]), r.instance);
|
|
17193
17193
|
}, iC = (t) => {
|
|
17194
|
-
const e =
|
|
17194
|
+
const e = z(t);
|
|
17195
17195
|
return Nt(() => {
|
|
17196
17196
|
e.current = t;
|
|
17197
17197
|
}, [t]), e;
|
|
@@ -17254,7 +17254,7 @@ const tC = (t) => ({
|
|
|
17254
17254
|
totalDuration: 0,
|
|
17255
17255
|
currentFrame: 0
|
|
17256
17256
|
}, h2 = k.forwardRef((t, e) => {
|
|
17257
|
-
const [r, i] = k.useState(0), [n, s] = k.useState([]), [, a] = Kt(!1), o =
|
|
17257
|
+
const [r, i] = k.useState(0), [n, s] = k.useState([]), [, a] = Kt(!1), o = z(null), u = z(null), h = z(uC), f = z(), [l, c] = QE({ autoPlay: !1 }), { tl: d } = kr(ir), {
|
|
17258
17258
|
src: p,
|
|
17259
17259
|
uniqueId: m,
|
|
17260
17260
|
startAt: v,
|
|
@@ -17276,7 +17276,7 @@ const tC = (t) => ({
|
|
|
17276
17276
|
adjustmentFilter: X,
|
|
17277
17277
|
vignetteFilter: P,
|
|
17278
17278
|
noiseFilter: F
|
|
17279
|
-
} = or(M), { blurRadius:
|
|
17279
|
+
} = or(M), { blurRadius: j = 0, vignette: V = 0, noise: W = 0 } = M, re = 0.1;
|
|
17280
17280
|
k.useEffect(() => {
|
|
17281
17281
|
if (!Cr(I)) {
|
|
17282
17282
|
const $ = IE(I, (Y) => {
|
|
@@ -17298,8 +17298,8 @@ const tC = (t) => ({
|
|
|
17298
17298
|
const ne = () => {
|
|
17299
17299
|
o.current && (o.current.stop(), h.current.isPlaying = !1);
|
|
17300
17300
|
}, oe = () => {
|
|
17301
|
-
if (o.current &&
|
|
17302
|
-
const he =
|
|
17301
|
+
if (o.current && f.current) {
|
|
17302
|
+
const he = f.current.time();
|
|
17303
17303
|
let $ = he === 0 ? 0 : he / re;
|
|
17304
17304
|
$ = isNaN($) ? 0 : $;
|
|
17305
17305
|
const q = h.current.totalFrames;
|
|
@@ -17311,7 +17311,7 @@ const tC = (t) => ({
|
|
|
17311
17311
|
return Nt(() => {
|
|
17312
17312
|
let he = N.context(() => {
|
|
17313
17313
|
});
|
|
17314
|
-
if (u.current &&
|
|
17314
|
+
if (u.current && d.current && r > 0) {
|
|
17315
17315
|
const $ = {
|
|
17316
17316
|
duration: Number(r),
|
|
17317
17317
|
onInterrupt: ne,
|
|
@@ -17321,17 +17321,17 @@ const tC = (t) => ({
|
|
|
17321
17321
|
0,
|
|
17322
17322
|
Math.floor(q / r) - 1
|
|
17323
17323
|
);
|
|
17324
|
-
|
|
17325
|
-
|
|
17324
|
+
f.current && f.current.kill(), he = N.context(() => {
|
|
17325
|
+
f.current = N.timeline({ repeat: x ? Y : 0, repeatDelay: 0 }).from(
|
|
17326
17326
|
u.current,
|
|
17327
17327
|
// @ts-ignore
|
|
17328
17328
|
$,
|
|
17329
17329
|
y
|
|
17330
|
-
),
|
|
17330
|
+
), d.current.add(f.current, v);
|
|
17331
17331
|
});
|
|
17332
17332
|
}
|
|
17333
17333
|
return () => {
|
|
17334
|
-
|
|
17334
|
+
f.current && (f.current.kill(), N.killTweensOf(f.current)), he.revert();
|
|
17335
17335
|
};
|
|
17336
17336
|
}, [
|
|
17337
17337
|
p,
|
|
@@ -17370,7 +17370,7 @@ const tC = (t) => ({
|
|
|
17370
17370
|
R,
|
|
17371
17371
|
X,
|
|
17372
17372
|
// conditionally add blur filter
|
|
17373
|
-
...
|
|
17373
|
+
...j > 0 ? [U] : [],
|
|
17374
17374
|
// conditionally add vignette filter
|
|
17375
17375
|
...V > 0 ? [P] : [],
|
|
17376
17376
|
// conditionally add noise filter
|
|
@@ -17381,12 +17381,12 @@ const tC = (t) => ({
|
|
|
17381
17381
|
}
|
|
17382
17382
|
);
|
|
17383
17383
|
}), f2 = k.forwardRef((t, e) => {
|
|
17384
|
-
const i =
|
|
17384
|
+
const i = z(null), n = z(0), s = z(null), a = z(null), o = z(16), u = z(null), {
|
|
17385
17385
|
visible: h,
|
|
17386
|
-
text:
|
|
17386
|
+
text: f,
|
|
17387
17387
|
disabled: l,
|
|
17388
17388
|
transformation: c,
|
|
17389
|
-
pointerdown:
|
|
17389
|
+
pointerdown: d,
|
|
17390
17390
|
onDobuleClick: p
|
|
17391
17391
|
} = t, {
|
|
17392
17392
|
x: m,
|
|
@@ -17418,7 +17418,7 @@ const tC = (t) => ({
|
|
|
17418
17418
|
sharpnessFilter: X,
|
|
17419
17419
|
hueFilter: P,
|
|
17420
17420
|
blurFilter: F,
|
|
17421
|
-
adjustmentFilter:
|
|
17421
|
+
adjustmentFilter: j
|
|
17422
17422
|
} = or(R), { blurRadius: V = 0 } = R;
|
|
17423
17423
|
k.useEffect(() => {
|
|
17424
17424
|
o.current = Number(x);
|
|
@@ -17494,7 +17494,7 @@ const tC = (t) => ({
|
|
|
17494
17494
|
}, [c]);
|
|
17495
17495
|
const he = () => {
|
|
17496
17496
|
const q = (/* @__PURE__ */ new Date()).getTime();
|
|
17497
|
-
q - n.current < 300 && p ? p() :
|
|
17497
|
+
q - n.current < 300 && p ? p() : d && d(), n.current = q;
|
|
17498
17498
|
}, $ = () => {
|
|
17499
17499
|
!l && p && p();
|
|
17500
17500
|
};
|
|
@@ -17512,7 +17512,7 @@ const tC = (t) => ({
|
|
|
17512
17512
|
x: m,
|
|
17513
17513
|
y: v,
|
|
17514
17514
|
anchor: 0.5,
|
|
17515
|
-
text:
|
|
17515
|
+
text: f,
|
|
17516
17516
|
alpha: h ? 1 : 0,
|
|
17517
17517
|
...h && !l && {
|
|
17518
17518
|
interactive: !0,
|
|
@@ -17524,7 +17524,7 @@ const tC = (t) => ({
|
|
|
17524
17524
|
U,
|
|
17525
17525
|
X,
|
|
17526
17526
|
P,
|
|
17527
|
-
|
|
17527
|
+
j,
|
|
17528
17528
|
// conditionally add blur filter
|
|
17529
17529
|
...V > 0 ? [F] : []
|
|
17530
17530
|
]
|
|
@@ -17563,16 +17563,16 @@ function EC(t) {
|
|
|
17563
17563
|
}
|
|
17564
17564
|
var CC = EC, IC = bi, Fs = fC, yu = CC, RC = "Expected a function", PC = Math.max, MC = Math.min;
|
|
17565
17565
|
function FC(t, e, r) {
|
|
17566
|
-
var i, n, s, a, o, u, h = 0,
|
|
17566
|
+
var i, n, s, a, o, u, h = 0, f = !1, l = !1, c = !0;
|
|
17567
17567
|
if (typeof t != "function")
|
|
17568
17568
|
throw new TypeError(RC);
|
|
17569
|
-
e = yu(e) || 0, IC(r) && (
|
|
17570
|
-
function
|
|
17569
|
+
e = yu(e) || 0, IC(r) && (f = !!r.leading, l = "maxWait" in r, s = l ? PC(yu(r.maxWait) || 0, e) : s, c = "trailing" in r ? !!r.trailing : c);
|
|
17570
|
+
function d(T) {
|
|
17571
17571
|
var w = i, S = n;
|
|
17572
17572
|
return i = n = void 0, h = T, a = t.apply(S, w), a;
|
|
17573
17573
|
}
|
|
17574
17574
|
function p(T) {
|
|
17575
|
-
return h = T, o = setTimeout(g, e),
|
|
17575
|
+
return h = T, o = setTimeout(g, e), f ? d(T) : a;
|
|
17576
17576
|
}
|
|
17577
17577
|
function m(T) {
|
|
17578
17578
|
var w = T - u, S = T - h, A = e - w;
|
|
@@ -17589,7 +17589,7 @@ function FC(t, e, r) {
|
|
|
17589
17589
|
o = setTimeout(g, m(T));
|
|
17590
17590
|
}
|
|
17591
17591
|
function y(T) {
|
|
17592
|
-
return o = void 0, c && i ?
|
|
17592
|
+
return o = void 0, c && i ? d(T) : (i = n = void 0, a);
|
|
17593
17593
|
}
|
|
17594
17594
|
function _() {
|
|
17595
17595
|
o !== void 0 && clearTimeout(o), h = 0, i = u = n = o = void 0;
|
|
@@ -17603,7 +17603,7 @@ function FC(t, e, r) {
|
|
|
17603
17603
|
if (o === void 0)
|
|
17604
17604
|
return p(u);
|
|
17605
17605
|
if (l)
|
|
17606
|
-
return clearTimeout(o), o = setTimeout(g, e),
|
|
17606
|
+
return clearTimeout(o), o = setTimeout(g, e), d(u);
|
|
17607
17607
|
}
|
|
17608
17608
|
return o === void 0 && (o = setTimeout(g, e)), a;
|
|
17609
17609
|
}
|
|
@@ -17644,10 +17644,10 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17644
17644
|
isDragging: !1,
|
|
17645
17645
|
timeDiff: 0
|
|
17646
17646
|
}, kC = k.forwardRef((t, e) => {
|
|
17647
|
-
const [r, i] = k.useState(0), [n, s] = k.useState(), a =
|
|
17647
|
+
const [r, i] = k.useState(0), [n, s] = k.useState(), a = z(null), o = z(null), u = z(null), h = z(NC), f = z(), {
|
|
17648
17648
|
uniqueId: l,
|
|
17649
17649
|
mute: c = !1,
|
|
17650
|
-
src:
|
|
17650
|
+
src: d,
|
|
17651
17651
|
startAt: p,
|
|
17652
17652
|
endAt: m,
|
|
17653
17653
|
frameStartAt: v,
|
|
@@ -17662,7 +17662,7 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17662
17662
|
pointerover: G = () => {
|
|
17663
17663
|
},
|
|
17664
17664
|
fps: I = 0
|
|
17665
|
-
} = t, { tl: E, dragModeRef: L, isRemotion: B } = kr(ir), { onPointerDown: R, onPointerOut: U, onPointerOver: X } = Qa(G, C, M, 1), { blurRadius: P = 0, vignette: F = 0, noise:
|
|
17665
|
+
} = t, { tl: E, dragModeRef: L, isRemotion: B } = kr(ir), { onPointerDown: R, onPointerOut: U, onPointerOver: X } = Qa(G, C, M, 1), { blurRadius: P = 0, vignette: F = 0, noise: j = 0 } = A, {
|
|
17666
17666
|
temperatureFilter: V,
|
|
17667
17667
|
sharpnessFilter: W,
|
|
17668
17668
|
hueFilter: re,
|
|
@@ -17670,10 +17670,10 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17670
17670
|
adjustmentFilter: oe,
|
|
17671
17671
|
vignetteFilter: pe,
|
|
17672
17672
|
noiseFilter: he
|
|
17673
|
-
} = or(A), $ =
|
|
17673
|
+
} = or(A), $ = d || "", q = k.useMemo(() => {
|
|
17674
17674
|
const Z = document.createElement("video");
|
|
17675
|
-
return Z.src =
|
|
17676
|
-
}, [
|
|
17675
|
+
return Z.src = d, Z.crossOrigin = "Anonymus", Z.autoplay = !1, Z.currentTime = v === 0 ? 1e-3 : v, Z;
|
|
17676
|
+
}, [d, v]);
|
|
17677
17677
|
Pe(ye.PAUSE, () => {
|
|
17678
17678
|
u.current && (u.current.pause(), h.current.isPlaying = !1);
|
|
17679
17679
|
}), Pe(ye.SCRUBBER_CLICKED, () => {
|
|
@@ -17697,27 +17697,27 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17697
17697
|
if (u.current) {
|
|
17698
17698
|
if (u.current.currentTime = Number(Z), !L.current) {
|
|
17699
17699
|
const le = u.current, Ee = le.currentTime > 0 && !le.paused && !le.ended && le.readyState > le.HAVE_CURRENT_DATA;
|
|
17700
|
-
E.current && E.current.isActive() &&
|
|
17700
|
+
E.current && E.current.isActive() && f.current && f.current.isActive() && (Ee || u.current.play(), h.current.isPlaying = !0, i((lr) => lr + 1));
|
|
17701
17701
|
}
|
|
17702
17702
|
h.current.progress = 0;
|
|
17703
17703
|
}
|
|
17704
17704
|
}, Oe = () => {
|
|
17705
17705
|
if (u.current) {
|
|
17706
17706
|
const Z = u.current;
|
|
17707
|
-
Z.currentTime > 0 && !Z.paused && !Z.ended && Z.readyState > Z.HAVE_CURRENT_DATA && u.current.pause(), h.current.isPlaying = !1,
|
|
17707
|
+
Z.currentTime > 0 && !Z.paused && !Z.ended && Z.readyState > Z.HAVE_CURRENT_DATA && u.current.pause(), h.current.isPlaying = !1, f.current && (h.current.progress = f.current.progress());
|
|
17708
17708
|
}
|
|
17709
17709
|
}, Ne = () => {
|
|
17710
17710
|
}, Je = () => {
|
|
17711
17711
|
var Z, le;
|
|
17712
|
-
if (
|
|
17713
|
-
const Ee = v + ((Z =
|
|
17712
|
+
if (f.current && (h.current.progress = f.current.progress()), u.current && f.current) {
|
|
17713
|
+
const Ee = v + ((Z = f == null ? void 0 : f.current) == null ? void 0 : Z.time()), lr = Math.abs(
|
|
17714
17714
|
u.current.currentTime - Ee
|
|
17715
17715
|
), Et = u.current, ur = Et.currentTime > 0 && !Et.paused && !Et.ended && Et.readyState > Et.HAVE_CURRENT_DATA;
|
|
17716
17716
|
L.current ? (u.current.currentTime = Ee, setTimeout(() => {
|
|
17717
17717
|
u.current && u.current.play().then(() => {
|
|
17718
17718
|
h.current.isPlaying = !1, u.current && u.current.pause();
|
|
17719
17719
|
});
|
|
17720
|
-
}, 100), h.current.isPlaying = !1) : (ur !== h.current.isPlaying || !ur) && h.current.progress > 0.01 && h.current.progress < 0.99 ? (le = E.current) != null && le.isActive() &&
|
|
17720
|
+
}, 100), h.current.isPlaying = !1) : (ur !== h.current.isPlaying || !ur) && h.current.progress > 0.01 && h.current.progress < 0.99 ? (le = E.current) != null && le.isActive() && f.current && f.current.isActive() && (ur || u.current.play(), h.current.isPlaying = !0) : lr > 0.3 && h.current.progress > 0.01 && h.current.progress < 0.99 && (u.current.currentTime = Ee);
|
|
17721
17721
|
}
|
|
17722
17722
|
};
|
|
17723
17723
|
return Nt(() => {
|
|
@@ -17750,16 +17750,16 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17750
17750
|
}
|
|
17751
17751
|
};
|
|
17752
17752
|
Z = N.context(() => {
|
|
17753
|
-
|
|
17753
|
+
f.current = N.from(
|
|
17754
17754
|
o.current,
|
|
17755
17755
|
// @ts-ignore
|
|
17756
17756
|
le,
|
|
17757
17757
|
v
|
|
17758
|
-
), E.current.add(
|
|
17758
|
+
), E.current.add(f.current, p);
|
|
17759
17759
|
});
|
|
17760
17760
|
}
|
|
17761
17761
|
return () => {
|
|
17762
|
-
|
|
17762
|
+
f.current && (f.current.kill(), N.killTweensOf(f.current)), Z.revert();
|
|
17763
17763
|
};
|
|
17764
17764
|
}, [S, p, m, v, g]), k.useEffect(() => {
|
|
17765
17765
|
u.current && (u.current.muted = c, h.current.isMuted = c);
|
|
@@ -17802,7 +17802,7 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17802
17802
|
};
|
|
17803
17803
|
}, [$, l, v, g, q]), k.useEffect(() => {
|
|
17804
17804
|
const Z = setTimeout(() => {
|
|
17805
|
-
n &&
|
|
17805
|
+
n && f.current && E.current && f.current.progress() < 0.1 && u.current && !f.current.isActive() && !B && u.current.play().then(() => {
|
|
17806
17806
|
h.current.isPlaying = !1, u.current && u.current.pause();
|
|
17807
17807
|
});
|
|
17808
17808
|
}, 30);
|
|
@@ -17815,7 +17815,7 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17815
17815
|
if (n && E.current && r > 0 && !B) {
|
|
17816
17816
|
E.current.isActive() || (h.current.isPlaying = !1, u.current && u.current.pause());
|
|
17817
17817
|
const le = u.current;
|
|
17818
|
-
le && E.current.isActive() &&
|
|
17818
|
+
le && E.current.isActive() && f.current && f.current.isActive() && (le.currentTime > 0 && !le.paused && !le.ended && le.readyState > le.HAVE_CURRENT_DATA || u.current.play(), h.current.isPlaying = !0);
|
|
17819
17819
|
}
|
|
17820
17820
|
}, 10);
|
|
17821
17821
|
return () => {
|
|
@@ -17852,7 +17852,7 @@ const an = /* @__PURE__ */ rr(OC), Qa = (t, e, r, i) => {
|
|
|
17852
17852
|
// conditionally add vignette filter
|
|
17853
17853
|
...F > 0 ? [pe] : [],
|
|
17854
17854
|
// conditionally add noise filter
|
|
17855
|
-
...
|
|
17855
|
+
...j > 0 ? [he] : []
|
|
17856
17856
|
]
|
|
17857
17857
|
}
|
|
17858
17858
|
) })
|
|
@@ -17864,18 +17864,18 @@ kC.whyDidYouRender = {
|
|
|
17864
17864
|
customName: "PixiVideoSprite"
|
|
17865
17865
|
};
|
|
17866
17866
|
const d2 = k.forwardRef((t, e) => {
|
|
17867
|
-
const [r, i] = k.useState(), n =
|
|
17867
|
+
const [r, i] = k.useState(), n = z(null), s = z(null), {
|
|
17868
17868
|
visible: a,
|
|
17869
17869
|
disabled: o,
|
|
17870
|
-
transformation: { x: u, y: h, width:
|
|
17871
|
-
pointerdown:
|
|
17870
|
+
transformation: { x: u, y: h, width: f, height: l, colorCorrection: c = {} },
|
|
17871
|
+
pointerdown: d = () => {
|
|
17872
17872
|
},
|
|
17873
17873
|
pointerout: p = () => {
|
|
17874
17874
|
},
|
|
17875
17875
|
pointerover: m = () => {
|
|
17876
17876
|
},
|
|
17877
17877
|
canvasImageRef: v
|
|
17878
|
-
} = t, g = v && (v == null ? void 0 : v.getCanvas()), y = wn(), { onPointerDown: _, onPointerOut: x, onPointerOver: b } = Qa(m,
|
|
17878
|
+
} = t, g = v && (v == null ? void 0 : v.getCanvas()), y = wn(), { onPointerDown: _, onPointerOut: x, onPointerOver: b } = Qa(m, d, p, 1), { blurRadius: T = 0, vignette: w = 0, noise: S = 0 } = c, {
|
|
17879
17879
|
temperatureFilter: A,
|
|
17880
17880
|
sharpnessFilter: C,
|
|
17881
17881
|
hueFilter: M,
|
|
@@ -17907,14 +17907,14 @@ const d2 = k.forwardRef((t, e) => {
|
|
|
17907
17907
|
yi,
|
|
17908
17908
|
{
|
|
17909
17909
|
texture: r,
|
|
17910
|
-
width:
|
|
17910
|
+
width: f,
|
|
17911
17911
|
height: l,
|
|
17912
17912
|
anchor: 0.5,
|
|
17913
17913
|
x: u,
|
|
17914
17914
|
y: h,
|
|
17915
17915
|
ref: n,
|
|
17916
17916
|
alpha: a ? 1 : 0,
|
|
17917
|
-
...!o && a && { interactive: !0, pointerdown:
|
|
17917
|
+
...!o && a && { interactive: !0, pointerdown: d },
|
|
17918
17918
|
filters: [
|
|
17919
17919
|
A,
|
|
17920
17920
|
C,
|
|
@@ -17932,51 +17932,61 @@ const d2 = k.forwardRef((t, e) => {
|
|
|
17932
17932
|
}
|
|
17933
17933
|
);
|
|
17934
17934
|
}), p2 = (t) => {
|
|
17935
|
-
const { startAt: e, endAt: r, uniqueId: i } = t, n =
|
|
17936
|
-
tl:
|
|
17937
|
-
totalDuration:
|
|
17938
|
-
reverseModeRef:
|
|
17939
|
-
} = kr(ir),
|
|
17935
|
+
const { startAt: e, endAt: r, uniqueId: i } = t, n = z(null), s = z(null), a = z(null), o = z(null), u = z(null), h = z(!1), {
|
|
17936
|
+
tl: f,
|
|
17937
|
+
totalDuration: l = 0,
|
|
17938
|
+
reverseModeRef: c
|
|
17939
|
+
} = kr(ir), d = e < 0.2 ? "static" : "none", p = z(1);
|
|
17940
17940
|
Pe(ye.COMPLETE, () => {
|
|
17941
|
-
n.current && (n.current.eventMode =
|
|
17941
|
+
n.current && (n.current.eventMode = d);
|
|
17942
17942
|
}), Pe(ye.REVERSE_MODE_END, () => {
|
|
17943
|
-
if (
|
|
17944
|
-
const
|
|
17945
|
-
|
|
17943
|
+
if (f.current) {
|
|
17944
|
+
const v = f.current.time();
|
|
17945
|
+
v > e && v < r ? (s.current && (s.current.alpha = 1), n.current && (n.current.alpha = 1, n.current.eventMode = "static")) : (s.current && (s.current.alpha = 0), n.current && (n.current.alpha = 0, n.current.eventMode = "none"));
|
|
17946
17946
|
}
|
|
17947
17947
|
});
|
|
17948
|
-
const
|
|
17949
|
-
if (
|
|
17950
|
-
|
|
17951
|
-
const
|
|
17952
|
-
|
|
17948
|
+
const m = () => {
|
|
17949
|
+
if (c.current && o.current && f.current) {
|
|
17950
|
+
h.current = !0;
|
|
17951
|
+
const v = f.current.time();
|
|
17952
|
+
v > e && v < r ? (s.current && (s.current.alpha = 1), n.current && (n.current.alpha = 1)) : (s.current && (s.current.alpha = 0), n.current && (n.current.alpha = 0));
|
|
17953
17953
|
}
|
|
17954
17954
|
};
|
|
17955
17955
|
return Pe(ye.COMPLETE, () => {
|
|
17956
17956
|
}), k.useEffect(() => {
|
|
17957
|
-
const
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
|
|
17961
|
-
|
|
17962
|
-
|
|
17963
|
-
|
|
17964
|
-
|
|
17965
|
-
|
|
17966
|
-
onStart: () => {
|
|
17967
|
-
n.current && (n.current.alpha = 1, n.current.eventMode = "static", f.current = 1);
|
|
17968
|
-
},
|
|
17969
|
-
onUpdate: p,
|
|
17970
|
-
onComplete: () => {
|
|
17971
|
-
n.current && (n.current.alpha = 0, n.current.eventMode = "none", f.current = 0);
|
|
17957
|
+
const v = N.context(() => {
|
|
17958
|
+
n.current && f.current && (u.current && (u.current.kill(), f.current.remove(u.current)), u.current = N.to(n.current, {
|
|
17959
|
+
alpha: 1,
|
|
17960
|
+
duration: 0.1
|
|
17961
|
+
}), o.current && (o.current.kill(), f.current.remove(o.current)), o.current = N.timeline().fromTo(
|
|
17962
|
+
s,
|
|
17963
|
+
{
|
|
17964
|
+
pixi: {
|
|
17965
|
+
alpha: e < 0.2 ? 1 : 0
|
|
17972
17966
|
}
|
|
17973
|
-
}
|
|
17974
|
-
|
|
17967
|
+
},
|
|
17968
|
+
{
|
|
17969
|
+
pixi: {
|
|
17970
|
+
alpha: 1,
|
|
17971
|
+
duration: 0.1
|
|
17972
|
+
}
|
|
17973
|
+
}
|
|
17974
|
+
).to(s.current, {
|
|
17975
|
+
alpha: 1,
|
|
17976
|
+
duration: Number(r) - Number(e),
|
|
17977
|
+
onStart: () => {
|
|
17978
|
+
n.current && (n.current.alpha = 1, n.current.eventMode = "static", p.current = 1);
|
|
17979
|
+
},
|
|
17980
|
+
onUpdate: m,
|
|
17981
|
+
onComplete: () => {
|
|
17982
|
+
n.current && (n.current.alpha = 0, n.current.eventMode = "none", p.current = 0);
|
|
17983
|
+
}
|
|
17984
|
+
}), f.current.add([u.current, o.current], e));
|
|
17975
17985
|
});
|
|
17976
17986
|
return () => {
|
|
17977
|
-
o.current && (
|
|
17987
|
+
o.current && (f.current.remove(o.current), o.current.progress(0).kill()), u.current && (f.current.remove(u.current), u.current.progress(0).kill()), v.revert();
|
|
17978
17988
|
};
|
|
17979
|
-
}, [e, r,
|
|
17989
|
+
}, [e, r, l, i]), /* @__PURE__ */ K.jsx(
|
|
17980
17990
|
Ae,
|
|
17981
17991
|
{
|
|
17982
17992
|
ref: n,
|
|
@@ -17991,18 +18001,18 @@ const d2 = k.forwardRef((t, e) => {
|
|
|
17991
18001
|
i && i(Number(r) + 0.2);
|
|
17992
18002
|
}, [e, r]), t.children;
|
|
17993
18003
|
}, g2 = k.forwardRef((t, e) => {
|
|
17994
|
-
const [r, i] = k.useState(), n =
|
|
18004
|
+
const [r, i] = k.useState(), n = z(null), s = z(null), {
|
|
17995
18005
|
visible: a,
|
|
17996
18006
|
disabled: o,
|
|
17997
|
-
transformation: { x: u, y: h, width:
|
|
17998
|
-
pointerdown:
|
|
18007
|
+
transformation: { x: u, y: h, width: f, height: l, colorCorrection: c = {} },
|
|
18008
|
+
pointerdown: d = () => {
|
|
17999
18009
|
},
|
|
18000
18010
|
pointerout: p = () => {
|
|
18001
18011
|
},
|
|
18002
18012
|
pointerover: m = () => {
|
|
18003
18013
|
},
|
|
18004
18014
|
canvasImageRef: v
|
|
18005
|
-
} = t, g = v && (v == null ? void 0 : v.getCanvas()), y = wn(), { onPointerDown: _, onPointerOut: x, onPointerOver: b } = Qa(m,
|
|
18015
|
+
} = t, g = v && (v == null ? void 0 : v.getCanvas()), y = wn(), { onPointerDown: _, onPointerOut: x, onPointerOver: b } = Qa(m, d, p, 1), { blurRadius: T = 0, vignette: w = 0, noise: S = 0 } = c, {
|
|
18006
18016
|
temperatureFilter: A,
|
|
18007
18017
|
sharpnessFilter: C,
|
|
18008
18018
|
hueFilter: M,
|
|
@@ -18034,14 +18044,14 @@ const d2 = k.forwardRef((t, e) => {
|
|
|
18034
18044
|
yi,
|
|
18035
18045
|
{
|
|
18036
18046
|
texture: r,
|
|
18037
|
-
width:
|
|
18047
|
+
width: f,
|
|
18038
18048
|
height: l,
|
|
18039
18049
|
anchor: 0.5,
|
|
18040
18050
|
x: u,
|
|
18041
18051
|
y: h,
|
|
18042
18052
|
ref: n,
|
|
18043
18053
|
alpha: a ? 1 : 0,
|
|
18044
|
-
...!o && a && { interactive: !0, pointerdown:
|
|
18054
|
+
...!o && a && { interactive: !0, pointerdown: d },
|
|
18045
18055
|
filters: [
|
|
18046
18056
|
A,
|
|
18047
18057
|
C,
|