@zerops/web-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -0
- package/chunks/browser-DeGg1Z-r.js +2927 -0
- package/chunks/register-C5_R6XU0.js +24212 -0
- package/package.json +24 -0
- package/recipe-card.d.ts +51 -0
- package/recipe-card.js +1 -0
- package/recipes/zerops-showcase.json +1 -0
- package/style.css +1 -0
|
@@ -0,0 +1,2927 @@
|
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var Pt = (n, e, t) => e in n ? At(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var l = (n, e, t) => Pt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { R as T, ɵ as Nt } from "./register-C5_R6XU0.js";
|
|
5
|
+
var S = /* @__PURE__ */ (function(n) {
|
|
6
|
+
return n[n.State = 0] = "State", n[n.Transition = 1] = "Transition", n[n.Sequence = 2] = "Sequence", n[n.Group = 3] = "Group", n[n.Animate = 4] = "Animate", n[n.Keyframes = 5] = "Keyframes", n[n.Style = 6] = "Style", n[n.Trigger = 7] = "Trigger", n[n.Reference = 8] = "Reference", n[n.AnimateChild = 9] = "AnimateChild", n[n.AnimateRef = 10] = "AnimateRef", n[n.Query = 11] = "Query", n[n.Stagger = 12] = "Stagger", n;
|
|
7
|
+
})(S || {});
|
|
8
|
+
const G = "*";
|
|
9
|
+
function Ct(n, e = null) {
|
|
10
|
+
return {
|
|
11
|
+
type: S.Sequence,
|
|
12
|
+
steps: n,
|
|
13
|
+
options: e
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function je(n) {
|
|
17
|
+
return {
|
|
18
|
+
type: S.Style,
|
|
19
|
+
styles: n,
|
|
20
|
+
offset: null
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
class ie {
|
|
24
|
+
constructor(e = 0, t = 0) {
|
|
25
|
+
l(this, "_onDoneFns", []);
|
|
26
|
+
l(this, "_onStartFns", []);
|
|
27
|
+
l(this, "_onDestroyFns", []);
|
|
28
|
+
l(this, "_originalOnDoneFns", []);
|
|
29
|
+
l(this, "_originalOnStartFns", []);
|
|
30
|
+
l(this, "_started", !1);
|
|
31
|
+
l(this, "_destroyed", !1);
|
|
32
|
+
l(this, "_finished", !1);
|
|
33
|
+
l(this, "_position", 0);
|
|
34
|
+
l(this, "parentPlayer", null);
|
|
35
|
+
l(this, "totalTime");
|
|
36
|
+
this.totalTime = e + t;
|
|
37
|
+
}
|
|
38
|
+
_onFinish() {
|
|
39
|
+
this._finished || (this._finished = !0, this._onDoneFns.forEach((e) => e()), this._onDoneFns = []);
|
|
40
|
+
}
|
|
41
|
+
onStart(e) {
|
|
42
|
+
this._originalOnStartFns.push(e), this._onStartFns.push(e);
|
|
43
|
+
}
|
|
44
|
+
onDone(e) {
|
|
45
|
+
this._originalOnDoneFns.push(e), this._onDoneFns.push(e);
|
|
46
|
+
}
|
|
47
|
+
onDestroy(e) {
|
|
48
|
+
this._onDestroyFns.push(e);
|
|
49
|
+
}
|
|
50
|
+
hasStarted() {
|
|
51
|
+
return this._started;
|
|
52
|
+
}
|
|
53
|
+
init() {
|
|
54
|
+
}
|
|
55
|
+
play() {
|
|
56
|
+
this.hasStarted() || (this._onStart(), this.triggerMicrotask()), this._started = !0;
|
|
57
|
+
}
|
|
58
|
+
triggerMicrotask() {
|
|
59
|
+
queueMicrotask(() => this._onFinish());
|
|
60
|
+
}
|
|
61
|
+
_onStart() {
|
|
62
|
+
this._onStartFns.forEach((e) => e()), this._onStartFns = [];
|
|
63
|
+
}
|
|
64
|
+
pause() {
|
|
65
|
+
}
|
|
66
|
+
restart() {
|
|
67
|
+
}
|
|
68
|
+
finish() {
|
|
69
|
+
this._onFinish();
|
|
70
|
+
}
|
|
71
|
+
destroy() {
|
|
72
|
+
this._destroyed || (this._destroyed = !0, this.hasStarted() || this._onStart(), this.finish(), this._onDestroyFns.forEach((e) => e()), this._onDestroyFns = []);
|
|
73
|
+
}
|
|
74
|
+
reset() {
|
|
75
|
+
this._started = !1, this._finished = !1, this._onStartFns = this._originalOnStartFns, this._onDoneFns = this._originalOnDoneFns;
|
|
76
|
+
}
|
|
77
|
+
setPosition(e) {
|
|
78
|
+
this._position = this.totalTime ? e * this.totalTime : 1;
|
|
79
|
+
}
|
|
80
|
+
getPosition() {
|
|
81
|
+
return this.totalTime ? this._position / this.totalTime : 1;
|
|
82
|
+
}
|
|
83
|
+
triggerCallback(e) {
|
|
84
|
+
const t = e == "start" ? this._onStartFns : this._onDoneFns;
|
|
85
|
+
t.forEach((s) => s()), t.length = 0;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
class ut {
|
|
89
|
+
constructor(e) {
|
|
90
|
+
l(this, "_onDoneFns", []);
|
|
91
|
+
l(this, "_onStartFns", []);
|
|
92
|
+
l(this, "_finished", !1);
|
|
93
|
+
l(this, "_started", !1);
|
|
94
|
+
l(this, "_destroyed", !1);
|
|
95
|
+
l(this, "_onDestroyFns", []);
|
|
96
|
+
l(this, "parentPlayer", null);
|
|
97
|
+
l(this, "totalTime", 0);
|
|
98
|
+
l(this, "players");
|
|
99
|
+
this.players = e;
|
|
100
|
+
let t = 0, s = 0, i = 0;
|
|
101
|
+
const r = this.players.length;
|
|
102
|
+
r == 0 ? queueMicrotask(() => this._onFinish()) : this.players.forEach((a) => {
|
|
103
|
+
a.onDone(() => {
|
|
104
|
+
++t == r && this._onFinish();
|
|
105
|
+
}), a.onDestroy(() => {
|
|
106
|
+
++s == r && this._onDestroy();
|
|
107
|
+
}), a.onStart(() => {
|
|
108
|
+
++i == r && this._onStart();
|
|
109
|
+
});
|
|
110
|
+
}), this.totalTime = this.players.reduce((a, o) => Math.max(a, o.totalTime), 0);
|
|
111
|
+
}
|
|
112
|
+
_onFinish() {
|
|
113
|
+
this._finished || (this._finished = !0, this._onDoneFns.forEach((e) => e()), this._onDoneFns = []);
|
|
114
|
+
}
|
|
115
|
+
init() {
|
|
116
|
+
this.players.forEach((e) => e.init());
|
|
117
|
+
}
|
|
118
|
+
onStart(e) {
|
|
119
|
+
this._onStartFns.push(e);
|
|
120
|
+
}
|
|
121
|
+
_onStart() {
|
|
122
|
+
this.hasStarted() || (this._started = !0, this._onStartFns.forEach((e) => e()), this._onStartFns = []);
|
|
123
|
+
}
|
|
124
|
+
onDone(e) {
|
|
125
|
+
this._onDoneFns.push(e);
|
|
126
|
+
}
|
|
127
|
+
onDestroy(e) {
|
|
128
|
+
this._onDestroyFns.push(e);
|
|
129
|
+
}
|
|
130
|
+
hasStarted() {
|
|
131
|
+
return this._started;
|
|
132
|
+
}
|
|
133
|
+
play() {
|
|
134
|
+
this.parentPlayer || this.init(), this._onStart(), this.players.forEach((e) => e.play());
|
|
135
|
+
}
|
|
136
|
+
pause() {
|
|
137
|
+
this.players.forEach((e) => e.pause());
|
|
138
|
+
}
|
|
139
|
+
restart() {
|
|
140
|
+
this.players.forEach((e) => e.restart());
|
|
141
|
+
}
|
|
142
|
+
finish() {
|
|
143
|
+
this._onFinish(), this.players.forEach((e) => e.finish());
|
|
144
|
+
}
|
|
145
|
+
destroy() {
|
|
146
|
+
this._onDestroy();
|
|
147
|
+
}
|
|
148
|
+
_onDestroy() {
|
|
149
|
+
this._destroyed || (this._destroyed = !0, this._onFinish(), this.players.forEach((e) => e.destroy()), this._onDestroyFns.forEach((e) => e()), this._onDestroyFns = []);
|
|
150
|
+
}
|
|
151
|
+
reset() {
|
|
152
|
+
this.players.forEach((e) => e.reset()), this._destroyed = !1, this._finished = !1, this._started = !1;
|
|
153
|
+
}
|
|
154
|
+
setPosition(e) {
|
|
155
|
+
const t = e * this.totalTime;
|
|
156
|
+
this.players.forEach((s) => {
|
|
157
|
+
const i = s.totalTime ? Math.min(1, t / s.totalTime) : 1;
|
|
158
|
+
s.setPosition(i);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
getPosition() {
|
|
162
|
+
const e = this.players.reduce((t, s) => t === null || s.totalTime > t.totalTime ? s : t, null);
|
|
163
|
+
return e != null ? e.getPosition() : 0;
|
|
164
|
+
}
|
|
165
|
+
beforeDestroy() {
|
|
166
|
+
this.players.forEach((e) => {
|
|
167
|
+
e.beforeDestroy && e.beforeDestroy();
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
triggerCallback(e) {
|
|
171
|
+
const t = e == "start" ? this._onStartFns : this._onDoneFns;
|
|
172
|
+
t.forEach((s) => s()), t.length = 0;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const Re = "!";
|
|
176
|
+
function He(n) {
|
|
177
|
+
return new T(3e3, !1);
|
|
178
|
+
}
|
|
179
|
+
function kt() {
|
|
180
|
+
return new T(3100, !1);
|
|
181
|
+
}
|
|
182
|
+
function Ft() {
|
|
183
|
+
return new T(3101, !1);
|
|
184
|
+
}
|
|
185
|
+
function Rt(n) {
|
|
186
|
+
return new T(3001, !1);
|
|
187
|
+
}
|
|
188
|
+
function Dt(n) {
|
|
189
|
+
return new T(3003, !1);
|
|
190
|
+
}
|
|
191
|
+
function Ot(n) {
|
|
192
|
+
return new T(3004, !1);
|
|
193
|
+
}
|
|
194
|
+
function Mt(n, e) {
|
|
195
|
+
return new T(3005, !1);
|
|
196
|
+
}
|
|
197
|
+
function Lt() {
|
|
198
|
+
return new T(3006, !1);
|
|
199
|
+
}
|
|
200
|
+
function It() {
|
|
201
|
+
return new T(3007, !1);
|
|
202
|
+
}
|
|
203
|
+
function zt(n, e) {
|
|
204
|
+
return new T(3008, !1);
|
|
205
|
+
}
|
|
206
|
+
function Kt(n) {
|
|
207
|
+
return new T(3002, !1);
|
|
208
|
+
}
|
|
209
|
+
function Bt(n, e, t, s, i) {
|
|
210
|
+
return new T(3010, !1);
|
|
211
|
+
}
|
|
212
|
+
function qt() {
|
|
213
|
+
return new T(3011, !1);
|
|
214
|
+
}
|
|
215
|
+
function Qt() {
|
|
216
|
+
return new T(3012, !1);
|
|
217
|
+
}
|
|
218
|
+
function Vt() {
|
|
219
|
+
return new T(3200, !1);
|
|
220
|
+
}
|
|
221
|
+
function Gt() {
|
|
222
|
+
return new T(3202, !1);
|
|
223
|
+
}
|
|
224
|
+
function Ut() {
|
|
225
|
+
return new T(3013, !1);
|
|
226
|
+
}
|
|
227
|
+
function Wt(n) {
|
|
228
|
+
return new T(3014, !1);
|
|
229
|
+
}
|
|
230
|
+
function jt(n) {
|
|
231
|
+
return new T(3015, !1);
|
|
232
|
+
}
|
|
233
|
+
function Ht(n) {
|
|
234
|
+
return new T(3016, !1);
|
|
235
|
+
}
|
|
236
|
+
function Yt(n) {
|
|
237
|
+
return new T(3500, !1);
|
|
238
|
+
}
|
|
239
|
+
function Xt(n) {
|
|
240
|
+
return new T(3501, !1);
|
|
241
|
+
}
|
|
242
|
+
function $t(n, e) {
|
|
243
|
+
return new T(3404, !1);
|
|
244
|
+
}
|
|
245
|
+
function Jt(n) {
|
|
246
|
+
return new T(3502, !1);
|
|
247
|
+
}
|
|
248
|
+
function Zt(n) {
|
|
249
|
+
return new T(3503, !1);
|
|
250
|
+
}
|
|
251
|
+
function xt() {
|
|
252
|
+
return new T(3300, !1);
|
|
253
|
+
}
|
|
254
|
+
function es(n) {
|
|
255
|
+
return new T(3504, !1);
|
|
256
|
+
}
|
|
257
|
+
function ts(n) {
|
|
258
|
+
return new T(3301, !1);
|
|
259
|
+
}
|
|
260
|
+
function ss(n, e) {
|
|
261
|
+
return new T(3302, !1);
|
|
262
|
+
}
|
|
263
|
+
function is(n) {
|
|
264
|
+
return new T(3303, !1);
|
|
265
|
+
}
|
|
266
|
+
function ns(n, e) {
|
|
267
|
+
return new T(3400, !1);
|
|
268
|
+
}
|
|
269
|
+
function rs(n) {
|
|
270
|
+
return new T(3401, !1);
|
|
271
|
+
}
|
|
272
|
+
function as(n) {
|
|
273
|
+
return new T(3402, !1);
|
|
274
|
+
}
|
|
275
|
+
function os(n, e) {
|
|
276
|
+
return new T(3505, !1);
|
|
277
|
+
}
|
|
278
|
+
const ls = /* @__PURE__ */ new Set(["-moz-outline-radius", "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright", "-ms-grid-columns", "-ms-grid-rows", "-webkit-line-clamp", "-webkit-text-fill-color", "-webkit-text-stroke", "-webkit-text-stroke-color", "accent-color", "all", "backdrop-filter", "background", "background-color", "background-position", "background-size", "block-size", "border", "border-block-end", "border-block-end-color", "border-block-end-width", "border-block-start", "border-block-start-color", "border-block-start-width", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-width", "border-color", "border-end-end-radius", "border-end-start-radius", "border-image-outset", "border-image-slice", "border-image-width", "border-inline-end", "border-inline-end-color", "border-inline-end-width", "border-inline-start", "border-inline-start-color", "border-inline-start-width", "border-left", "border-left-color", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-width", "border-start-end-radius", "border-start-start-radius", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-width", "border-width", "bottom", "box-shadow", "caret-color", "clip", "clip-path", "color", "column-count", "column-gap", "column-rule", "column-rule-color", "column-rule-width", "column-width", "columns", "filter", "flex", "flex-basis", "flex-grow", "flex-shrink", "font", "font-size", "font-size-adjust", "font-stretch", "font-variation-settings", "font-weight", "gap", "grid-column-gap", "grid-gap", "grid-row-gap", "grid-template-columns", "grid-template-rows", "height", "inline-size", "input-security", "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline", "inset-inline-end", "inset-inline-start", "left", "letter-spacing", "line-clamp", "line-height", "margin", "margin-block-end", "margin-block-start", "margin-bottom", "margin-inline-end", "margin-inline-start", "margin-left", "margin-right", "margin-top", "mask", "mask-border", "mask-position", "mask-size", "max-block-size", "max-height", "max-inline-size", "max-lines", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "object-position", "offset", "offset-anchor", "offset-distance", "offset-path", "offset-position", "offset-rotate", "opacity", "order", "outline", "outline-color", "outline-offset", "outline-width", "padding", "padding-block-end", "padding-block-start", "padding-bottom", "padding-inline-end", "padding-inline-start", "padding-left", "padding-right", "padding-top", "perspective", "perspective-origin", "right", "rotate", "row-gap", "scale", "scroll-margin", "scroll-margin-block", "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", "scroll-margin-inline", "scroll-margin-inline-end", "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right", "scroll-margin-top", "scroll-padding", "scroll-padding-block", "scroll-padding-block-end", "scroll-padding-block-start", "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", "scroll-padding-top", "scroll-snap-coordinate", "scroll-snap-destination", "scrollbar-color", "shape-image-threshold", "shape-margin", "shape-outside", "tab-size", "text-decoration", "text-decoration-color", "text-decoration-thickness", "text-emphasis", "text-emphasis-color", "text-indent", "text-shadow", "text-underline-offset", "top", "transform", "transform-origin", "translate", "vertical-align", "visibility", "width", "word-spacing", "z-index", "zoom"]);
|
|
279
|
+
function W(n) {
|
|
280
|
+
switch (n.length) {
|
|
281
|
+
case 0:
|
|
282
|
+
return new ie();
|
|
283
|
+
case 1:
|
|
284
|
+
return n[0];
|
|
285
|
+
default:
|
|
286
|
+
return new ut(n);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function ct(n, e, t = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map()) {
|
|
290
|
+
const i = [], r = [];
|
|
291
|
+
let a = -1, o = null;
|
|
292
|
+
if (e.forEach((h) => {
|
|
293
|
+
const u = h.get("offset"), c = u == a, f = c && o || /* @__PURE__ */ new Map();
|
|
294
|
+
h.forEach((E, _) => {
|
|
295
|
+
let d = _, g = E;
|
|
296
|
+
if (_ !== "offset")
|
|
297
|
+
switch (d = n.normalizePropertyName(d, i), g) {
|
|
298
|
+
case Re:
|
|
299
|
+
g = t.get(_);
|
|
300
|
+
break;
|
|
301
|
+
case G:
|
|
302
|
+
g = s.get(_);
|
|
303
|
+
break;
|
|
304
|
+
default:
|
|
305
|
+
g = n.normalizeStyleValue(_, d, g, i);
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
f.set(d, g);
|
|
309
|
+
}), c || r.push(f), o = f, a = u;
|
|
310
|
+
}), i.length)
|
|
311
|
+
throw Jt();
|
|
312
|
+
return r;
|
|
313
|
+
}
|
|
314
|
+
function De(n, e, t, s) {
|
|
315
|
+
switch (e) {
|
|
316
|
+
case "start":
|
|
317
|
+
n.onStart(() => s(t && Ee(t, "start", n)));
|
|
318
|
+
break;
|
|
319
|
+
case "done":
|
|
320
|
+
n.onDone(() => s(t && Ee(t, "done", n)));
|
|
321
|
+
break;
|
|
322
|
+
case "destroy":
|
|
323
|
+
n.onDestroy(() => s(t && Ee(t, "destroy", n)));
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
function Ee(n, e, t) {
|
|
328
|
+
const s = t.totalTime, i = !!t.disabled, r = Oe(n.element, n.triggerName, n.fromState, n.toState, e || n.phaseName, s ?? n.totalTime, i), a = n._data;
|
|
329
|
+
return a != null && (r._data = a), r;
|
|
330
|
+
}
|
|
331
|
+
function Oe(n, e, t, s, i = "", r = 0, a) {
|
|
332
|
+
return {
|
|
333
|
+
element: n,
|
|
334
|
+
triggerName: e,
|
|
335
|
+
fromState: t,
|
|
336
|
+
toState: s,
|
|
337
|
+
phaseName: i,
|
|
338
|
+
totalTime: r,
|
|
339
|
+
disabled: !!a
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function L(n, e, t) {
|
|
343
|
+
let s = n.get(e);
|
|
344
|
+
return s || n.set(e, s = t), s;
|
|
345
|
+
}
|
|
346
|
+
function Ye(n) {
|
|
347
|
+
const e = n.indexOf(":"), t = n.substring(1, e), s = n.slice(e + 1);
|
|
348
|
+
return [t, s];
|
|
349
|
+
}
|
|
350
|
+
const hs = typeof document > "u" ? null : document.documentElement;
|
|
351
|
+
function Me(n) {
|
|
352
|
+
const e = n.parentNode || n.host || null;
|
|
353
|
+
return e === hs ? null : e;
|
|
354
|
+
}
|
|
355
|
+
function us(n) {
|
|
356
|
+
return n.substring(1, 6) == "ebkit";
|
|
357
|
+
}
|
|
358
|
+
let X = null, Xe = !1;
|
|
359
|
+
function cs(n) {
|
|
360
|
+
X || (X = fs() || {}, Xe = X.style ? "WebkitAppearance" in X.style : !1);
|
|
361
|
+
let e = !0;
|
|
362
|
+
return X.style && !us(n) && (e = n in X.style, !e && Xe && (e = "Webkit" + n.charAt(0).toUpperCase() + n.slice(1) in X.style)), e;
|
|
363
|
+
}
|
|
364
|
+
function Ti(n) {
|
|
365
|
+
return ls.has(n);
|
|
366
|
+
}
|
|
367
|
+
function fs() {
|
|
368
|
+
return typeof document < "u" ? document.body : null;
|
|
369
|
+
}
|
|
370
|
+
function ft(n, e) {
|
|
371
|
+
for (; e; ) {
|
|
372
|
+
if (e === n)
|
|
373
|
+
return !0;
|
|
374
|
+
e = Me(e);
|
|
375
|
+
}
|
|
376
|
+
return !1;
|
|
377
|
+
}
|
|
378
|
+
function mt(n, e, t) {
|
|
379
|
+
if (t)
|
|
380
|
+
return Array.from(n.querySelectorAll(e));
|
|
381
|
+
const s = n.querySelector(e);
|
|
382
|
+
return s ? [s] : [];
|
|
383
|
+
}
|
|
384
|
+
const ms = 1e3, dt = "{{", ds = "}}", Le = "ng-enter", ce = "ng-leave", ae = "ng-trigger", fe = ".ng-trigger", $e = "ng-animating", Pe = ".ng-animating";
|
|
385
|
+
function V(n) {
|
|
386
|
+
if (typeof n == "number") return n;
|
|
387
|
+
const e = n.match(/^(-?[\.\d]+)(m?s)/);
|
|
388
|
+
return !e || e.length < 2 ? 0 : Ne(parseFloat(e[1]), e[2]);
|
|
389
|
+
}
|
|
390
|
+
function Ne(n, e) {
|
|
391
|
+
return e === "s" ? n * ms : n;
|
|
392
|
+
}
|
|
393
|
+
function me(n, e, t) {
|
|
394
|
+
return n.hasOwnProperty("duration") ? n : ys(n, e, t);
|
|
395
|
+
}
|
|
396
|
+
const ps = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;
|
|
397
|
+
function ys(n, e, t) {
|
|
398
|
+
let s, i = 0, r = "";
|
|
399
|
+
if (typeof n == "string") {
|
|
400
|
+
const a = n.match(ps);
|
|
401
|
+
if (a === null)
|
|
402
|
+
return e.push(He()), {
|
|
403
|
+
duration: 0,
|
|
404
|
+
delay: 0,
|
|
405
|
+
easing: ""
|
|
406
|
+
};
|
|
407
|
+
s = Ne(parseFloat(a[1]), a[2]);
|
|
408
|
+
const o = a[3];
|
|
409
|
+
o != null && (i = Ne(parseFloat(o), a[4]));
|
|
410
|
+
const h = a[5];
|
|
411
|
+
h && (r = h);
|
|
412
|
+
} else
|
|
413
|
+
s = n;
|
|
414
|
+
if (!t) {
|
|
415
|
+
let a = !1, o = e.length;
|
|
416
|
+
s < 0 && (e.push(kt()), a = !0), i < 0 && (e.push(Ft()), a = !0), a && e.splice(o, 0, He());
|
|
417
|
+
}
|
|
418
|
+
return {
|
|
419
|
+
duration: s,
|
|
420
|
+
delay: i,
|
|
421
|
+
easing: r
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
function gs(n) {
|
|
425
|
+
return n.length ? n[0] instanceof Map ? n : n.map((e) => new Map(Object.entries(e))) : [];
|
|
426
|
+
}
|
|
427
|
+
function Je(n) {
|
|
428
|
+
return Array.isArray(n) ? new Map(...n) : new Map(n);
|
|
429
|
+
}
|
|
430
|
+
function Q(n, e, t) {
|
|
431
|
+
e.forEach((s, i) => {
|
|
432
|
+
const r = Ie(i);
|
|
433
|
+
t && !t.has(i) && t.set(i, n.style[r]), n.style[r] = s;
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
function J(n, e) {
|
|
437
|
+
e.forEach((t, s) => {
|
|
438
|
+
const i = Ie(s);
|
|
439
|
+
n.style[i] = "";
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
function te(n) {
|
|
443
|
+
return Array.isArray(n) ? n.length == 1 ? n[0] : Ct(n) : n;
|
|
444
|
+
}
|
|
445
|
+
function _s(n, e, t) {
|
|
446
|
+
const s = e.params || {}, i = pt(n);
|
|
447
|
+
i.length && i.forEach((r) => {
|
|
448
|
+
s.hasOwnProperty(r) || t.push(Rt());
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
const Ce = /* @__PURE__ */ new RegExp(`${dt}\\s*(.+?)\\s*${ds}`, "g");
|
|
452
|
+
function pt(n) {
|
|
453
|
+
let e = [];
|
|
454
|
+
if (typeof n == "string") {
|
|
455
|
+
let t;
|
|
456
|
+
for (; t = Ce.exec(n); )
|
|
457
|
+
e.push(t[1]);
|
|
458
|
+
Ce.lastIndex = 0;
|
|
459
|
+
}
|
|
460
|
+
return e;
|
|
461
|
+
}
|
|
462
|
+
function ne(n, e, t) {
|
|
463
|
+
const s = `${n}`, i = s.replace(Ce, (r, a) => {
|
|
464
|
+
let o = e[a];
|
|
465
|
+
return o == null && (t.push(Dt()), o = ""), o.toString();
|
|
466
|
+
});
|
|
467
|
+
return i == s ? n : i;
|
|
468
|
+
}
|
|
469
|
+
const Ss = /-+([a-z0-9])/g;
|
|
470
|
+
function Ie(n) {
|
|
471
|
+
return n.replace(Ss, (...e) => e[1].toUpperCase());
|
|
472
|
+
}
|
|
473
|
+
function bi(n) {
|
|
474
|
+
return n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
475
|
+
}
|
|
476
|
+
function Es(n, e) {
|
|
477
|
+
return n === 0 || e === 0;
|
|
478
|
+
}
|
|
479
|
+
function Ts(n, e, t) {
|
|
480
|
+
if (t.size && e.length) {
|
|
481
|
+
let s = e[0], i = [];
|
|
482
|
+
if (t.forEach((r, a) => {
|
|
483
|
+
s.has(a) || i.push(a), s.set(a, r);
|
|
484
|
+
}), i.length)
|
|
485
|
+
for (let r = 1; r < e.length; r++) {
|
|
486
|
+
let a = e[r];
|
|
487
|
+
i.forEach((o) => a.set(o, ze(n, o)));
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return e;
|
|
491
|
+
}
|
|
492
|
+
function M(n, e, t) {
|
|
493
|
+
switch (e.type) {
|
|
494
|
+
case S.Trigger:
|
|
495
|
+
return n.visitTrigger(e, t);
|
|
496
|
+
case S.State:
|
|
497
|
+
return n.visitState(e, t);
|
|
498
|
+
case S.Transition:
|
|
499
|
+
return n.visitTransition(e, t);
|
|
500
|
+
case S.Sequence:
|
|
501
|
+
return n.visitSequence(e, t);
|
|
502
|
+
case S.Group:
|
|
503
|
+
return n.visitGroup(e, t);
|
|
504
|
+
case S.Animate:
|
|
505
|
+
return n.visitAnimate(e, t);
|
|
506
|
+
case S.Keyframes:
|
|
507
|
+
return n.visitKeyframes(e, t);
|
|
508
|
+
case S.Style:
|
|
509
|
+
return n.visitStyle(e, t);
|
|
510
|
+
case S.Reference:
|
|
511
|
+
return n.visitReference(e, t);
|
|
512
|
+
case S.AnimateChild:
|
|
513
|
+
return n.visitAnimateChild(e, t);
|
|
514
|
+
case S.AnimateRef:
|
|
515
|
+
return n.visitAnimateRef(e, t);
|
|
516
|
+
case S.Query:
|
|
517
|
+
return n.visitQuery(e, t);
|
|
518
|
+
case S.Stagger:
|
|
519
|
+
return n.visitStagger(e, t);
|
|
520
|
+
default:
|
|
521
|
+
throw Ot(e.type);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function ze(n, e) {
|
|
525
|
+
return window.getComputedStyle(n)[e];
|
|
526
|
+
}
|
|
527
|
+
let yt = /* @__PURE__ */ (() => {
|
|
528
|
+
const e = class e {
|
|
529
|
+
validateStyleProperty(s) {
|
|
530
|
+
return cs(s);
|
|
531
|
+
}
|
|
532
|
+
containsElement(s, i) {
|
|
533
|
+
return ft(s, i);
|
|
534
|
+
}
|
|
535
|
+
getParentElement(s) {
|
|
536
|
+
return Me(s);
|
|
537
|
+
}
|
|
538
|
+
query(s, i, r) {
|
|
539
|
+
return mt(s, i, r);
|
|
540
|
+
}
|
|
541
|
+
computeStyle(s, i, r) {
|
|
542
|
+
return r || "";
|
|
543
|
+
}
|
|
544
|
+
animate(s, i, r, a, o, h = [], u) {
|
|
545
|
+
return new ie(r, a);
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
l(e, "ɵfac", function(i) {
|
|
549
|
+
return new (i || e)();
|
|
550
|
+
}), l(e, "ɵprov", /* @__PURE__ */ Nt({
|
|
551
|
+
token: e,
|
|
552
|
+
factory: e.ɵfac
|
|
553
|
+
}));
|
|
554
|
+
let n = e;
|
|
555
|
+
return n;
|
|
556
|
+
})();
|
|
557
|
+
class bs {
|
|
558
|
+
}
|
|
559
|
+
l(bs, "NOOP", /* @__PURE__ */ new yt());
|
|
560
|
+
class ws {
|
|
561
|
+
}
|
|
562
|
+
class vs {
|
|
563
|
+
normalizePropertyName(e, t) {
|
|
564
|
+
return e;
|
|
565
|
+
}
|
|
566
|
+
normalizeStyleValue(e, t, s, i) {
|
|
567
|
+
return s;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const As = /* @__PURE__ */ new Set(["width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "left", "top", "bottom", "right", "fontSize", "outlineWidth", "outlineOffset", "paddingTop", "paddingLeft", "paddingBottom", "paddingRight", "marginTop", "marginLeft", "marginBottom", "marginRight", "borderRadius", "borderWidth", "borderTopWidth", "borderLeftWidth", "borderRightWidth", "borderBottomWidth", "textIndent", "perspective"]);
|
|
571
|
+
class Ps extends ws {
|
|
572
|
+
normalizePropertyName(e, t) {
|
|
573
|
+
return Ie(e);
|
|
574
|
+
}
|
|
575
|
+
normalizeStyleValue(e, t, s, i) {
|
|
576
|
+
let r = "";
|
|
577
|
+
const a = s.toString().trim();
|
|
578
|
+
if (As.has(t) && s !== 0 && s !== "0")
|
|
579
|
+
if (typeof s == "number")
|
|
580
|
+
r = "px";
|
|
581
|
+
else {
|
|
582
|
+
const o = s.match(/^[+-]?[\d\.]+([a-z]*)$/);
|
|
583
|
+
o && o[1].length == 0 && i.push(Mt());
|
|
584
|
+
}
|
|
585
|
+
return a + r;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
const de = "*";
|
|
589
|
+
function Ns(n, e) {
|
|
590
|
+
const t = [];
|
|
591
|
+
return typeof n == "string" ? n.split(/\s*,\s*/).forEach((s) => Cs(s, t, e)) : t.push(n), t;
|
|
592
|
+
}
|
|
593
|
+
function Cs(n, e, t) {
|
|
594
|
+
if (n[0] == ":") {
|
|
595
|
+
const h = ks(n, t);
|
|
596
|
+
if (typeof h == "function") {
|
|
597
|
+
e.push(h);
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
n = h;
|
|
601
|
+
}
|
|
602
|
+
const s = n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);
|
|
603
|
+
if (s == null || s.length < 4)
|
|
604
|
+
return t.push(jt()), e;
|
|
605
|
+
const i = s[1], r = s[2], a = s[3];
|
|
606
|
+
e.push(Ze(i, a));
|
|
607
|
+
const o = i == de && a == de;
|
|
608
|
+
r[0] == "<" && !o && e.push(Ze(a, i));
|
|
609
|
+
}
|
|
610
|
+
function ks(n, e) {
|
|
611
|
+
switch (n) {
|
|
612
|
+
case ":enter":
|
|
613
|
+
return "void => *";
|
|
614
|
+
case ":leave":
|
|
615
|
+
return "* => void";
|
|
616
|
+
case ":increment":
|
|
617
|
+
return (t, s) => parseFloat(s) > parseFloat(t);
|
|
618
|
+
case ":decrement":
|
|
619
|
+
return (t, s) => parseFloat(s) < parseFloat(t);
|
|
620
|
+
default:
|
|
621
|
+
return e.push(Ht()), "* => *";
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
const oe = /* @__PURE__ */ new Set(["true", "1"]), le = /* @__PURE__ */ new Set(["false", "0"]);
|
|
625
|
+
function Ze(n, e) {
|
|
626
|
+
const t = oe.has(n) || le.has(n), s = oe.has(e) || le.has(e);
|
|
627
|
+
return (i, r) => {
|
|
628
|
+
let a = n == de || n == i, o = e == de || e == r;
|
|
629
|
+
return !a && t && typeof i == "boolean" && (a = i ? oe.has(n) : le.has(n)), !o && s && typeof r == "boolean" && (o = r ? oe.has(e) : le.has(e)), a && o;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
const gt = ":self", Fs = /* @__PURE__ */ new RegExp(`s*${gt}s*,?`, "g");
|
|
633
|
+
function Ke(n, e, t, s) {
|
|
634
|
+
return new Rs(n).build(e, t, s);
|
|
635
|
+
}
|
|
636
|
+
const xe = "";
|
|
637
|
+
class Rs {
|
|
638
|
+
constructor(e) {
|
|
639
|
+
l(this, "_driver");
|
|
640
|
+
this._driver = e;
|
|
641
|
+
}
|
|
642
|
+
build(e, t, s) {
|
|
643
|
+
const i = new Ms(t);
|
|
644
|
+
return this._resetContextStyleTimingState(i), M(this, te(e), i);
|
|
645
|
+
}
|
|
646
|
+
_resetContextStyleTimingState(e) {
|
|
647
|
+
e.currentQuerySelector = xe, e.collectedStyles = /* @__PURE__ */ new Map(), e.collectedStyles.set(xe, /* @__PURE__ */ new Map()), e.currentTime = 0;
|
|
648
|
+
}
|
|
649
|
+
visitTrigger(e, t) {
|
|
650
|
+
let s = t.queryCount = 0, i = t.depCount = 0;
|
|
651
|
+
const r = [], a = [];
|
|
652
|
+
return e.name.charAt(0) == "@" && t.errors.push(Lt()), e.definitions.forEach((o) => {
|
|
653
|
+
if (this._resetContextStyleTimingState(t), o.type == S.State) {
|
|
654
|
+
const h = o, u = h.name;
|
|
655
|
+
u.toString().split(/\s*,\s*/).forEach((c) => {
|
|
656
|
+
h.name = c, r.push(this.visitState(h, t));
|
|
657
|
+
}), h.name = u;
|
|
658
|
+
} else if (o.type == S.Transition) {
|
|
659
|
+
const h = this.visitTransition(o, t);
|
|
660
|
+
s += h.queryCount, i += h.depCount, a.push(h);
|
|
661
|
+
} else
|
|
662
|
+
t.errors.push(It());
|
|
663
|
+
}), {
|
|
664
|
+
type: S.Trigger,
|
|
665
|
+
name: e.name,
|
|
666
|
+
states: r,
|
|
667
|
+
transitions: a,
|
|
668
|
+
queryCount: s,
|
|
669
|
+
depCount: i,
|
|
670
|
+
options: null
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
visitState(e, t) {
|
|
674
|
+
const s = this.visitStyle(e.styles, t), i = e.options && e.options.params || null;
|
|
675
|
+
if (s.containsDynamicStyles) {
|
|
676
|
+
const r = /* @__PURE__ */ new Set(), a = i || {};
|
|
677
|
+
s.styles.forEach((o) => {
|
|
678
|
+
o instanceof Map && o.forEach((h) => {
|
|
679
|
+
pt(h).forEach((u) => {
|
|
680
|
+
a.hasOwnProperty(u) || r.add(u);
|
|
681
|
+
});
|
|
682
|
+
});
|
|
683
|
+
}), r.size && t.errors.push(zt(e.name, [...r.values()]));
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
type: S.State,
|
|
687
|
+
name: e.name,
|
|
688
|
+
style: s,
|
|
689
|
+
options: i ? {
|
|
690
|
+
params: i
|
|
691
|
+
} : null
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
visitTransition(e, t) {
|
|
695
|
+
t.queryCount = 0, t.depCount = 0;
|
|
696
|
+
const s = M(this, te(e.animation), t), i = Ns(e.expr, t.errors);
|
|
697
|
+
return {
|
|
698
|
+
type: S.Transition,
|
|
699
|
+
matchers: i,
|
|
700
|
+
animation: s,
|
|
701
|
+
queryCount: t.queryCount,
|
|
702
|
+
depCount: t.depCount,
|
|
703
|
+
options: $(e.options)
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
visitSequence(e, t) {
|
|
707
|
+
return {
|
|
708
|
+
type: S.Sequence,
|
|
709
|
+
steps: e.steps.map((s) => M(this, s, t)),
|
|
710
|
+
options: $(e.options)
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
visitGroup(e, t) {
|
|
714
|
+
const s = t.currentTime;
|
|
715
|
+
let i = 0;
|
|
716
|
+
const r = e.steps.map((a) => {
|
|
717
|
+
t.currentTime = s;
|
|
718
|
+
const o = M(this, a, t);
|
|
719
|
+
return i = Math.max(i, t.currentTime), o;
|
|
720
|
+
});
|
|
721
|
+
return t.currentTime = i, {
|
|
722
|
+
type: S.Group,
|
|
723
|
+
steps: r,
|
|
724
|
+
options: $(e.options)
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
visitAnimate(e, t) {
|
|
728
|
+
const s = Is(e.timings, t.errors);
|
|
729
|
+
t.currentAnimateTimings = s;
|
|
730
|
+
let i, r = e.styles ? e.styles : je({});
|
|
731
|
+
if (r.type == S.Keyframes)
|
|
732
|
+
i = this.visitKeyframes(r, t);
|
|
733
|
+
else {
|
|
734
|
+
let a = e.styles, o = !1;
|
|
735
|
+
if (!a) {
|
|
736
|
+
o = !0;
|
|
737
|
+
const u = {};
|
|
738
|
+
s.easing && (u.easing = s.easing), a = je(u);
|
|
739
|
+
}
|
|
740
|
+
t.currentTime += s.duration + s.delay;
|
|
741
|
+
const h = this.visitStyle(a, t);
|
|
742
|
+
h.isEmptyStep = o, i = h;
|
|
743
|
+
}
|
|
744
|
+
return t.currentAnimateTimings = null, {
|
|
745
|
+
type: S.Animate,
|
|
746
|
+
timings: s,
|
|
747
|
+
style: i,
|
|
748
|
+
options: null
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
visitStyle(e, t) {
|
|
752
|
+
const s = this._makeStyleAst(e, t);
|
|
753
|
+
return this._validateStyleAst(s, t), s;
|
|
754
|
+
}
|
|
755
|
+
_makeStyleAst(e, t) {
|
|
756
|
+
const s = [], i = Array.isArray(e.styles) ? e.styles : [e.styles];
|
|
757
|
+
for (let o of i)
|
|
758
|
+
typeof o == "string" ? o === G ? s.push(o) : t.errors.push(Kt()) : s.push(new Map(Object.entries(o)));
|
|
759
|
+
let r = !1, a = null;
|
|
760
|
+
return s.forEach((o) => {
|
|
761
|
+
if (o instanceof Map && (o.has("easing") && (a = o.get("easing"), o.delete("easing")), !r)) {
|
|
762
|
+
for (let h of o.values())
|
|
763
|
+
if (h.toString().indexOf(dt) >= 0) {
|
|
764
|
+
r = !0;
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}), {
|
|
769
|
+
type: S.Style,
|
|
770
|
+
styles: s,
|
|
771
|
+
easing: a,
|
|
772
|
+
offset: e.offset,
|
|
773
|
+
containsDynamicStyles: r,
|
|
774
|
+
options: null
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
_validateStyleAst(e, t) {
|
|
778
|
+
const s = t.currentAnimateTimings;
|
|
779
|
+
let i = t.currentTime, r = t.currentTime;
|
|
780
|
+
s && r > 0 && (r -= s.duration + s.delay), e.styles.forEach((a) => {
|
|
781
|
+
typeof a != "string" && a.forEach((o, h) => {
|
|
782
|
+
const u = t.collectedStyles.get(t.currentQuerySelector), c = u.get(h);
|
|
783
|
+
let f = !0;
|
|
784
|
+
c && (r != i && r >= c.startTime && i <= c.endTime && (t.errors.push(Bt(h, c.startTime, c.endTime)), f = !1), r = c.startTime), f && u.set(h, {
|
|
785
|
+
startTime: r,
|
|
786
|
+
endTime: i
|
|
787
|
+
}), t.options && _s(o, t.options, t.errors);
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
visitKeyframes(e, t) {
|
|
792
|
+
const s = {
|
|
793
|
+
type: S.Keyframes,
|
|
794
|
+
styles: [],
|
|
795
|
+
options: null
|
|
796
|
+
};
|
|
797
|
+
if (!t.currentAnimateTimings)
|
|
798
|
+
return t.errors.push(qt()), s;
|
|
799
|
+
const i = 1;
|
|
800
|
+
let r = 0;
|
|
801
|
+
const a = [];
|
|
802
|
+
let o = !1, h = !1, u = 0;
|
|
803
|
+
const c = e.steps.map((A) => {
|
|
804
|
+
const P = this._makeStyleAst(A, t);
|
|
805
|
+
let F = P.offset != null ? P.offset : Ls(P.styles), C = 0;
|
|
806
|
+
return F != null && (r++, C = P.offset = F), h = h || C < 0 || C > 1, o = o || C < u, u = C, a.push(C), P;
|
|
807
|
+
});
|
|
808
|
+
h && t.errors.push(Qt()), o && t.errors.push(Vt());
|
|
809
|
+
const f = e.steps.length;
|
|
810
|
+
let E = 0;
|
|
811
|
+
r > 0 && r < f ? t.errors.push(Gt()) : r == 0 && (E = i / (f - 1));
|
|
812
|
+
const _ = f - 1, d = t.currentTime, g = t.currentAnimateTimings, w = g.duration;
|
|
813
|
+
return c.forEach((A, P) => {
|
|
814
|
+
const F = E > 0 ? P == _ ? 1 : E * P : a[P], C = F * w;
|
|
815
|
+
t.currentTime = d + g.delay + C, g.duration = C, this._validateStyleAst(A, t), A.offset = F, s.styles.push(A);
|
|
816
|
+
}), s;
|
|
817
|
+
}
|
|
818
|
+
visitReference(e, t) {
|
|
819
|
+
return {
|
|
820
|
+
type: S.Reference,
|
|
821
|
+
animation: M(this, te(e.animation), t),
|
|
822
|
+
options: $(e.options)
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
visitAnimateChild(e, t) {
|
|
826
|
+
return t.depCount++, {
|
|
827
|
+
type: S.AnimateChild,
|
|
828
|
+
options: $(e.options)
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
visitAnimateRef(e, t) {
|
|
832
|
+
return {
|
|
833
|
+
type: S.AnimateRef,
|
|
834
|
+
animation: this.visitReference(e.animation, t),
|
|
835
|
+
options: $(e.options)
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
visitQuery(e, t) {
|
|
839
|
+
const s = t.currentQuerySelector, i = e.options || {};
|
|
840
|
+
t.queryCount++, t.currentQuery = e;
|
|
841
|
+
const [r, a] = Ds(e.selector);
|
|
842
|
+
t.currentQuerySelector = s.length ? s + " " + r : r, L(t.collectedStyles, t.currentQuerySelector, /* @__PURE__ */ new Map());
|
|
843
|
+
const o = M(this, te(e.animation), t);
|
|
844
|
+
return t.currentQuery = null, t.currentQuerySelector = s, {
|
|
845
|
+
type: S.Query,
|
|
846
|
+
selector: r,
|
|
847
|
+
limit: i.limit || 0,
|
|
848
|
+
optional: !!i.optional,
|
|
849
|
+
includeSelf: a,
|
|
850
|
+
animation: o,
|
|
851
|
+
originalSelector: e.selector,
|
|
852
|
+
options: $(e.options)
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
visitStagger(e, t) {
|
|
856
|
+
t.currentQuery || t.errors.push(Ut());
|
|
857
|
+
const s = e.timings === "full" ? {
|
|
858
|
+
duration: 0,
|
|
859
|
+
delay: 0,
|
|
860
|
+
easing: "full"
|
|
861
|
+
} : me(e.timings, t.errors, !0);
|
|
862
|
+
return {
|
|
863
|
+
type: S.Stagger,
|
|
864
|
+
animation: M(this, te(e.animation), t),
|
|
865
|
+
timings: s,
|
|
866
|
+
options: null
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
function Ds(n) {
|
|
871
|
+
const e = !!n.split(/\s*,\s*/).find((t) => t == gt);
|
|
872
|
+
return e && (n = n.replace(Fs, "")), n = n.replace(/@\*/g, fe).replace(/@\w+/g, (t) => fe + "-" + t.slice(1)).replace(/:animating/g, Pe), [n, e];
|
|
873
|
+
}
|
|
874
|
+
function Os(n) {
|
|
875
|
+
return n ? {
|
|
876
|
+
...n
|
|
877
|
+
} : null;
|
|
878
|
+
}
|
|
879
|
+
class Ms {
|
|
880
|
+
constructor(e) {
|
|
881
|
+
l(this, "errors");
|
|
882
|
+
l(this, "queryCount", 0);
|
|
883
|
+
l(this, "depCount", 0);
|
|
884
|
+
l(this, "currentTransition", null);
|
|
885
|
+
l(this, "currentQuery", null);
|
|
886
|
+
l(this, "currentQuerySelector", null);
|
|
887
|
+
l(this, "currentAnimateTimings", null);
|
|
888
|
+
l(this, "currentTime", 0);
|
|
889
|
+
l(this, "collectedStyles", /* @__PURE__ */ new Map());
|
|
890
|
+
l(this, "options", null);
|
|
891
|
+
l(this, "unsupportedCSSPropertiesFound", /* @__PURE__ */ new Set());
|
|
892
|
+
this.errors = e;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
function Ls(n) {
|
|
896
|
+
if (typeof n == "string") return null;
|
|
897
|
+
let e = null;
|
|
898
|
+
if (Array.isArray(n))
|
|
899
|
+
n.forEach((t) => {
|
|
900
|
+
if (t instanceof Map && t.has("offset")) {
|
|
901
|
+
const s = t;
|
|
902
|
+
e = parseFloat(s.get("offset")), s.delete("offset");
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
else if (n instanceof Map && n.has("offset")) {
|
|
906
|
+
const t = n;
|
|
907
|
+
e = parseFloat(t.get("offset")), t.delete("offset");
|
|
908
|
+
}
|
|
909
|
+
return e;
|
|
910
|
+
}
|
|
911
|
+
function Is(n, e) {
|
|
912
|
+
if (n.hasOwnProperty("duration"))
|
|
913
|
+
return n;
|
|
914
|
+
if (typeof n == "number") {
|
|
915
|
+
const r = me(n, e).duration;
|
|
916
|
+
return Te(r, 0, "");
|
|
917
|
+
}
|
|
918
|
+
const t = n;
|
|
919
|
+
if (t.split(/\s+/).some((r) => r.charAt(0) == "{" && r.charAt(1) == "{")) {
|
|
920
|
+
const r = Te(0, 0, "");
|
|
921
|
+
return r.dynamic = !0, r.strValue = t, r;
|
|
922
|
+
}
|
|
923
|
+
const i = me(t, e);
|
|
924
|
+
return Te(i.duration, i.delay, i.easing);
|
|
925
|
+
}
|
|
926
|
+
function $(n) {
|
|
927
|
+
return n ? (n = {
|
|
928
|
+
...n
|
|
929
|
+
}, n.params && (n.params = Os(n.params))) : n = {}, n;
|
|
930
|
+
}
|
|
931
|
+
function Te(n, e, t) {
|
|
932
|
+
return {
|
|
933
|
+
duration: n,
|
|
934
|
+
delay: e,
|
|
935
|
+
easing: t
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
function Be(n, e, t, s, i, r, a = null, o = !1) {
|
|
939
|
+
return {
|
|
940
|
+
type: 1,
|
|
941
|
+
element: n,
|
|
942
|
+
keyframes: e,
|
|
943
|
+
preStyleProps: t,
|
|
944
|
+
postStyleProps: s,
|
|
945
|
+
duration: i,
|
|
946
|
+
delay: r,
|
|
947
|
+
totalTime: i + r,
|
|
948
|
+
easing: a,
|
|
949
|
+
subTimeline: o
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
class ye {
|
|
953
|
+
constructor() {
|
|
954
|
+
l(this, "_map", /* @__PURE__ */ new Map());
|
|
955
|
+
}
|
|
956
|
+
get(e) {
|
|
957
|
+
return this._map.get(e) || [];
|
|
958
|
+
}
|
|
959
|
+
append(e, t) {
|
|
960
|
+
let s = this._map.get(e);
|
|
961
|
+
s || this._map.set(e, s = []), s.push(...t);
|
|
962
|
+
}
|
|
963
|
+
has(e) {
|
|
964
|
+
return this._map.has(e);
|
|
965
|
+
}
|
|
966
|
+
clear() {
|
|
967
|
+
this._map.clear();
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
const zs = 1, Ks = ":enter", Bs = /* @__PURE__ */ new RegExp(Ks, "g"), qs = ":leave", Qs = /* @__PURE__ */ new RegExp(qs, "g");
|
|
971
|
+
function qe(n, e, t, s, i, r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o, h, u = []) {
|
|
972
|
+
return new Vs().buildKeyframes(n, e, t, s, i, r, a, o, h, u);
|
|
973
|
+
}
|
|
974
|
+
class Vs {
|
|
975
|
+
buildKeyframes(e, t, s, i, r, a, o, h, u, c = []) {
|
|
976
|
+
u = u || new ye();
|
|
977
|
+
const f = new Qe(e, t, u, i, r, c, []);
|
|
978
|
+
f.options = h;
|
|
979
|
+
const E = h.delay ? V(h.delay) : 0;
|
|
980
|
+
f.currentTimeline.delayNextStep(E), f.currentTimeline.setStyles([a], null, f.errors, h), M(this, s, f);
|
|
981
|
+
const _ = f.timelines.filter((d) => d.containsAnimation());
|
|
982
|
+
if (_.length && o.size) {
|
|
983
|
+
let d;
|
|
984
|
+
for (let g = _.length - 1; g >= 0; g--) {
|
|
985
|
+
const w = _[g];
|
|
986
|
+
if (w.element === t) {
|
|
987
|
+
d = w;
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
d && !d.allowOnlyTimelineStyles() && d.setStyles([o], null, f.errors, h);
|
|
992
|
+
}
|
|
993
|
+
return _.length ? _.map((d) => d.buildKeyframes()) : [Be(t, [], [], [], 0, E, "", !1)];
|
|
994
|
+
}
|
|
995
|
+
visitTrigger(e, t) {
|
|
996
|
+
}
|
|
997
|
+
visitState(e, t) {
|
|
998
|
+
}
|
|
999
|
+
visitTransition(e, t) {
|
|
1000
|
+
}
|
|
1001
|
+
visitAnimateChild(e, t) {
|
|
1002
|
+
const s = t.subInstructions.get(t.element);
|
|
1003
|
+
if (s) {
|
|
1004
|
+
const i = t.createSubContext(e.options), r = t.currentTimeline.currentTime, a = this._visitSubInstructions(s, i, i.options);
|
|
1005
|
+
r != a && t.transformIntoNewTimeline(a);
|
|
1006
|
+
}
|
|
1007
|
+
t.previousNode = e;
|
|
1008
|
+
}
|
|
1009
|
+
visitAnimateRef(e, t) {
|
|
1010
|
+
const s = t.createSubContext(e.options);
|
|
1011
|
+
s.transformIntoNewTimeline(), this._applyAnimationRefDelays([e.options, e.animation.options], t, s), this.visitReference(e.animation, s), t.transformIntoNewTimeline(s.currentTimeline.currentTime), t.previousNode = e;
|
|
1012
|
+
}
|
|
1013
|
+
_applyAnimationRefDelays(e, t, s) {
|
|
1014
|
+
for (const i of e) {
|
|
1015
|
+
const r = i?.delay;
|
|
1016
|
+
if (r) {
|
|
1017
|
+
const a = typeof r == "number" ? r : V(ne(r, i?.params ?? {}, t.errors));
|
|
1018
|
+
s.delayNextStep(a);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
_visitSubInstructions(e, t, s) {
|
|
1023
|
+
let r = t.currentTimeline.currentTime;
|
|
1024
|
+
const a = s.duration != null ? V(s.duration) : null, o = s.delay != null ? V(s.delay) : null;
|
|
1025
|
+
return a !== 0 && e.forEach((h) => {
|
|
1026
|
+
const u = t.appendInstructionToTimeline(h, a, o);
|
|
1027
|
+
r = Math.max(r, u.duration + u.delay);
|
|
1028
|
+
}), r;
|
|
1029
|
+
}
|
|
1030
|
+
visitReference(e, t) {
|
|
1031
|
+
t.updateOptions(e.options, !0), M(this, e.animation, t), t.previousNode = e;
|
|
1032
|
+
}
|
|
1033
|
+
visitSequence(e, t) {
|
|
1034
|
+
const s = t.subContextCount;
|
|
1035
|
+
let i = t;
|
|
1036
|
+
const r = e.options;
|
|
1037
|
+
if (r && (r.params || r.delay) && (i = t.createSubContext(r), i.transformIntoNewTimeline(), r.delay != null)) {
|
|
1038
|
+
i.previousNode.type == S.Style && (i.currentTimeline.snapshotCurrentStyles(), i.previousNode = pe);
|
|
1039
|
+
const a = V(r.delay);
|
|
1040
|
+
i.delayNextStep(a);
|
|
1041
|
+
}
|
|
1042
|
+
e.steps.length && (e.steps.forEach((a) => M(this, a, i)), i.currentTimeline.applyStylesToKeyframe(), i.subContextCount > s && i.transformIntoNewTimeline()), t.previousNode = e;
|
|
1043
|
+
}
|
|
1044
|
+
visitGroup(e, t) {
|
|
1045
|
+
const s = [];
|
|
1046
|
+
let i = t.currentTimeline.currentTime;
|
|
1047
|
+
const r = e.options && e.options.delay ? V(e.options.delay) : 0;
|
|
1048
|
+
e.steps.forEach((a) => {
|
|
1049
|
+
const o = t.createSubContext(e.options);
|
|
1050
|
+
r && o.delayNextStep(r), M(this, a, o), i = Math.max(i, o.currentTimeline.currentTime), s.push(o.currentTimeline);
|
|
1051
|
+
}), s.forEach((a) => t.currentTimeline.mergeTimelineCollectedStyles(a)), t.transformIntoNewTimeline(i), t.previousNode = e;
|
|
1052
|
+
}
|
|
1053
|
+
_visitTiming(e, t) {
|
|
1054
|
+
if (e.dynamic) {
|
|
1055
|
+
const s = e.strValue, i = t.params ? ne(s, t.params, t.errors) : s;
|
|
1056
|
+
return me(i, t.errors);
|
|
1057
|
+
} else
|
|
1058
|
+
return {
|
|
1059
|
+
duration: e.duration,
|
|
1060
|
+
delay: e.delay,
|
|
1061
|
+
easing: e.easing
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
visitAnimate(e, t) {
|
|
1065
|
+
const s = t.currentAnimateTimings = this._visitTiming(e.timings, t), i = t.currentTimeline;
|
|
1066
|
+
s.delay && (t.incrementTime(s.delay), i.snapshotCurrentStyles());
|
|
1067
|
+
const r = e.style;
|
|
1068
|
+
r.type == S.Keyframes ? this.visitKeyframes(r, t) : (t.incrementTime(s.duration), this.visitStyle(r, t), i.applyStylesToKeyframe()), t.currentAnimateTimings = null, t.previousNode = e;
|
|
1069
|
+
}
|
|
1070
|
+
visitStyle(e, t) {
|
|
1071
|
+
const s = t.currentTimeline, i = t.currentAnimateTimings;
|
|
1072
|
+
!i && s.hasCurrentStyleProperties() && s.forwardFrame();
|
|
1073
|
+
const r = i && i.easing || e.easing;
|
|
1074
|
+
e.isEmptyStep ? s.applyEmptyStep(r) : s.setStyles(e.styles, r, t.errors, t.options), t.previousNode = e;
|
|
1075
|
+
}
|
|
1076
|
+
visitKeyframes(e, t) {
|
|
1077
|
+
const s = t.currentAnimateTimings, i = t.currentTimeline.duration, r = s.duration, o = t.createSubContext().currentTimeline;
|
|
1078
|
+
o.easing = s.easing, e.styles.forEach((h) => {
|
|
1079
|
+
const u = h.offset || 0;
|
|
1080
|
+
o.forwardTime(u * r), o.setStyles(h.styles, h.easing, t.errors, t.options), o.applyStylesToKeyframe();
|
|
1081
|
+
}), t.currentTimeline.mergeTimelineCollectedStyles(o), t.transformIntoNewTimeline(i + r), t.previousNode = e;
|
|
1082
|
+
}
|
|
1083
|
+
visitQuery(e, t) {
|
|
1084
|
+
const s = t.currentTimeline.currentTime, i = e.options || {}, r = i.delay ? V(i.delay) : 0;
|
|
1085
|
+
r && (t.previousNode.type === S.Style || s == 0 && t.currentTimeline.hasCurrentStyleProperties()) && (t.currentTimeline.snapshotCurrentStyles(), t.previousNode = pe);
|
|
1086
|
+
let a = s;
|
|
1087
|
+
const o = t.invokeQuery(e.selector, e.originalSelector, e.limit, e.includeSelf, !!i.optional, t.errors);
|
|
1088
|
+
t.currentQueryTotal = o.length;
|
|
1089
|
+
let h = null;
|
|
1090
|
+
o.forEach((u, c) => {
|
|
1091
|
+
t.currentQueryIndex = c;
|
|
1092
|
+
const f = t.createSubContext(e.options, u);
|
|
1093
|
+
r && f.delayNextStep(r), u === t.element && (h = f.currentTimeline), M(this, e.animation, f), f.currentTimeline.applyStylesToKeyframe();
|
|
1094
|
+
const E = f.currentTimeline.currentTime;
|
|
1095
|
+
a = Math.max(a, E);
|
|
1096
|
+
}), t.currentQueryIndex = 0, t.currentQueryTotal = 0, t.transformIntoNewTimeline(a), h && (t.currentTimeline.mergeTimelineCollectedStyles(h), t.currentTimeline.snapshotCurrentStyles()), t.previousNode = e;
|
|
1097
|
+
}
|
|
1098
|
+
visitStagger(e, t) {
|
|
1099
|
+
const s = t.parentContext, i = t.currentTimeline, r = e.timings, a = Math.abs(r.duration), o = a * (t.currentQueryTotal - 1);
|
|
1100
|
+
let h = a * t.currentQueryIndex;
|
|
1101
|
+
switch (r.duration < 0 ? "reverse" : r.easing) {
|
|
1102
|
+
case "reverse":
|
|
1103
|
+
h = o - h;
|
|
1104
|
+
break;
|
|
1105
|
+
case "full":
|
|
1106
|
+
h = s.currentStaggerTime;
|
|
1107
|
+
break;
|
|
1108
|
+
}
|
|
1109
|
+
const c = t.currentTimeline;
|
|
1110
|
+
h && c.delayNextStep(h);
|
|
1111
|
+
const f = c.currentTime;
|
|
1112
|
+
M(this, e.animation, t), t.previousNode = e, s.currentStaggerTime = i.currentTime - f + (i.startTime - s.currentTimeline.startTime);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
const pe = {};
|
|
1116
|
+
class Qe {
|
|
1117
|
+
constructor(e, t, s, i, r, a, o, h) {
|
|
1118
|
+
l(this, "_driver");
|
|
1119
|
+
l(this, "element");
|
|
1120
|
+
l(this, "subInstructions");
|
|
1121
|
+
l(this, "_enterClassName");
|
|
1122
|
+
l(this, "_leaveClassName");
|
|
1123
|
+
l(this, "errors");
|
|
1124
|
+
l(this, "timelines");
|
|
1125
|
+
l(this, "parentContext", null);
|
|
1126
|
+
l(this, "currentTimeline");
|
|
1127
|
+
l(this, "currentAnimateTimings", null);
|
|
1128
|
+
l(this, "previousNode", pe);
|
|
1129
|
+
l(this, "subContextCount", 0);
|
|
1130
|
+
l(this, "options", {});
|
|
1131
|
+
l(this, "currentQueryIndex", 0);
|
|
1132
|
+
l(this, "currentQueryTotal", 0);
|
|
1133
|
+
l(this, "currentStaggerTime", 0);
|
|
1134
|
+
this._driver = e, this.element = t, this.subInstructions = s, this._enterClassName = i, this._leaveClassName = r, this.errors = a, this.timelines = o, this.currentTimeline = h || new ge(this._driver, t, 0), o.push(this.currentTimeline);
|
|
1135
|
+
}
|
|
1136
|
+
get params() {
|
|
1137
|
+
return this.options.params;
|
|
1138
|
+
}
|
|
1139
|
+
updateOptions(e, t) {
|
|
1140
|
+
if (!e) return;
|
|
1141
|
+
const s = e;
|
|
1142
|
+
let i = this.options;
|
|
1143
|
+
s.duration != null && (i.duration = V(s.duration)), s.delay != null && (i.delay = V(s.delay));
|
|
1144
|
+
const r = s.params;
|
|
1145
|
+
if (r) {
|
|
1146
|
+
let a = i.params;
|
|
1147
|
+
a || (a = this.options.params = {}), Object.keys(r).forEach((o) => {
|
|
1148
|
+
(!t || !a.hasOwnProperty(o)) && (a[o] = ne(r[o], a, this.errors));
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
_copyOptions() {
|
|
1153
|
+
const e = {};
|
|
1154
|
+
if (this.options) {
|
|
1155
|
+
const t = this.options.params;
|
|
1156
|
+
if (t) {
|
|
1157
|
+
const s = e.params = {};
|
|
1158
|
+
Object.keys(t).forEach((i) => {
|
|
1159
|
+
s[i] = t[i];
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
return e;
|
|
1164
|
+
}
|
|
1165
|
+
createSubContext(e = null, t, s) {
|
|
1166
|
+
const i = t || this.element, r = new Qe(this._driver, i, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(i, s || 0));
|
|
1167
|
+
return r.previousNode = this.previousNode, r.currentAnimateTimings = this.currentAnimateTimings, r.options = this._copyOptions(), r.updateOptions(e), r.currentQueryIndex = this.currentQueryIndex, r.currentQueryTotal = this.currentQueryTotal, r.parentContext = this, this.subContextCount++, r;
|
|
1168
|
+
}
|
|
1169
|
+
transformIntoNewTimeline(e) {
|
|
1170
|
+
return this.previousNode = pe, this.currentTimeline = this.currentTimeline.fork(this.element, e), this.timelines.push(this.currentTimeline), this.currentTimeline;
|
|
1171
|
+
}
|
|
1172
|
+
appendInstructionToTimeline(e, t, s) {
|
|
1173
|
+
const i = {
|
|
1174
|
+
duration: t ?? e.duration,
|
|
1175
|
+
delay: this.currentTimeline.currentTime + (s ?? 0) + e.delay,
|
|
1176
|
+
easing: ""
|
|
1177
|
+
}, r = new Gs(this._driver, e.element, e.keyframes, e.preStyleProps, e.postStyleProps, i, e.stretchStartingKeyframe);
|
|
1178
|
+
return this.timelines.push(r), i;
|
|
1179
|
+
}
|
|
1180
|
+
incrementTime(e) {
|
|
1181
|
+
this.currentTimeline.forwardTime(this.currentTimeline.duration + e);
|
|
1182
|
+
}
|
|
1183
|
+
delayNextStep(e) {
|
|
1184
|
+
e > 0 && this.currentTimeline.delayNextStep(e);
|
|
1185
|
+
}
|
|
1186
|
+
invokeQuery(e, t, s, i, r, a) {
|
|
1187
|
+
let o = [];
|
|
1188
|
+
if (i && o.push(this.element), e.length > 0) {
|
|
1189
|
+
e = e.replace(Bs, "." + this._enterClassName), e = e.replace(Qs, "." + this._leaveClassName);
|
|
1190
|
+
const h = s != 1;
|
|
1191
|
+
let u = this._driver.query(this.element, e, h);
|
|
1192
|
+
s !== 0 && (u = s < 0 ? u.slice(u.length + s, u.length) : u.slice(0, s)), o.push(...u);
|
|
1193
|
+
}
|
|
1194
|
+
return !r && o.length == 0 && a.push(Wt()), o;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
class ge {
|
|
1198
|
+
constructor(e, t, s, i) {
|
|
1199
|
+
l(this, "_driver");
|
|
1200
|
+
l(this, "element");
|
|
1201
|
+
l(this, "startTime");
|
|
1202
|
+
l(this, "_elementTimelineStylesLookup");
|
|
1203
|
+
l(this, "duration", 0);
|
|
1204
|
+
l(this, "easing", null);
|
|
1205
|
+
l(this, "_previousKeyframe", /* @__PURE__ */ new Map());
|
|
1206
|
+
l(this, "_currentKeyframe", /* @__PURE__ */ new Map());
|
|
1207
|
+
l(this, "_keyframes", /* @__PURE__ */ new Map());
|
|
1208
|
+
l(this, "_styleSummary", /* @__PURE__ */ new Map());
|
|
1209
|
+
l(this, "_localTimelineStyles", /* @__PURE__ */ new Map());
|
|
1210
|
+
l(this, "_globalTimelineStyles");
|
|
1211
|
+
l(this, "_pendingStyles", /* @__PURE__ */ new Map());
|
|
1212
|
+
l(this, "_backFill", /* @__PURE__ */ new Map());
|
|
1213
|
+
l(this, "_currentEmptyStepKeyframe", null);
|
|
1214
|
+
this._driver = e, this.element = t, this.startTime = s, this._elementTimelineStylesLookup = i, this._elementTimelineStylesLookup || (this._elementTimelineStylesLookup = /* @__PURE__ */ new Map()), this._globalTimelineStyles = this._elementTimelineStylesLookup.get(t), this._globalTimelineStyles || (this._globalTimelineStyles = this._localTimelineStyles, this._elementTimelineStylesLookup.set(t, this._localTimelineStyles)), this._loadKeyframe();
|
|
1215
|
+
}
|
|
1216
|
+
containsAnimation() {
|
|
1217
|
+
switch (this._keyframes.size) {
|
|
1218
|
+
case 0:
|
|
1219
|
+
return !1;
|
|
1220
|
+
case 1:
|
|
1221
|
+
return this.hasCurrentStyleProperties();
|
|
1222
|
+
default:
|
|
1223
|
+
return !0;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
hasCurrentStyleProperties() {
|
|
1227
|
+
return this._currentKeyframe.size > 0;
|
|
1228
|
+
}
|
|
1229
|
+
get currentTime() {
|
|
1230
|
+
return this.startTime + this.duration;
|
|
1231
|
+
}
|
|
1232
|
+
delayNextStep(e) {
|
|
1233
|
+
const t = this._keyframes.size === 1 && this._pendingStyles.size;
|
|
1234
|
+
this.duration || t ? (this.forwardTime(this.currentTime + e), t && this.snapshotCurrentStyles()) : this.startTime += e;
|
|
1235
|
+
}
|
|
1236
|
+
fork(e, t) {
|
|
1237
|
+
return this.applyStylesToKeyframe(), new ge(this._driver, e, t || this.currentTime, this._elementTimelineStylesLookup);
|
|
1238
|
+
}
|
|
1239
|
+
_loadKeyframe() {
|
|
1240
|
+
this._currentKeyframe && (this._previousKeyframe = this._currentKeyframe), this._currentKeyframe = this._keyframes.get(this.duration), this._currentKeyframe || (this._currentKeyframe = /* @__PURE__ */ new Map(), this._keyframes.set(this.duration, this._currentKeyframe));
|
|
1241
|
+
}
|
|
1242
|
+
forwardFrame() {
|
|
1243
|
+
this.duration += zs, this._loadKeyframe();
|
|
1244
|
+
}
|
|
1245
|
+
forwardTime(e) {
|
|
1246
|
+
this.applyStylesToKeyframe(), this.duration = e, this._loadKeyframe();
|
|
1247
|
+
}
|
|
1248
|
+
_updateStyle(e, t) {
|
|
1249
|
+
this._localTimelineStyles.set(e, t), this._globalTimelineStyles.set(e, t), this._styleSummary.set(e, {
|
|
1250
|
+
time: this.currentTime,
|
|
1251
|
+
value: t
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
allowOnlyTimelineStyles() {
|
|
1255
|
+
return this._currentEmptyStepKeyframe !== this._currentKeyframe;
|
|
1256
|
+
}
|
|
1257
|
+
applyEmptyStep(e) {
|
|
1258
|
+
e && this._previousKeyframe.set("easing", e);
|
|
1259
|
+
for (let [t, s] of this._globalTimelineStyles)
|
|
1260
|
+
this._backFill.set(t, s || G), this._currentKeyframe.set(t, G);
|
|
1261
|
+
this._currentEmptyStepKeyframe = this._currentKeyframe;
|
|
1262
|
+
}
|
|
1263
|
+
setStyles(e, t, s, i) {
|
|
1264
|
+
t && this._previousKeyframe.set("easing", t);
|
|
1265
|
+
const r = i && i.params || {}, a = Us(e, this._globalTimelineStyles);
|
|
1266
|
+
for (let [o, h] of a) {
|
|
1267
|
+
const u = ne(h, r, s);
|
|
1268
|
+
this._pendingStyles.set(o, u), this._localTimelineStyles.has(o) || this._backFill.set(o, this._globalTimelineStyles.get(o) ?? G), this._updateStyle(o, u);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
applyStylesToKeyframe() {
|
|
1272
|
+
this._pendingStyles.size != 0 && (this._pendingStyles.forEach((e, t) => {
|
|
1273
|
+
this._currentKeyframe.set(t, e);
|
|
1274
|
+
}), this._pendingStyles.clear(), this._localTimelineStyles.forEach((e, t) => {
|
|
1275
|
+
this._currentKeyframe.has(t) || this._currentKeyframe.set(t, e);
|
|
1276
|
+
}));
|
|
1277
|
+
}
|
|
1278
|
+
snapshotCurrentStyles() {
|
|
1279
|
+
for (let [e, t] of this._localTimelineStyles)
|
|
1280
|
+
this._pendingStyles.set(e, t), this._updateStyle(e, t);
|
|
1281
|
+
}
|
|
1282
|
+
getFinalKeyframe() {
|
|
1283
|
+
return this._keyframes.get(this.duration);
|
|
1284
|
+
}
|
|
1285
|
+
get properties() {
|
|
1286
|
+
const e = [];
|
|
1287
|
+
for (let t in this._currentKeyframe)
|
|
1288
|
+
e.push(t);
|
|
1289
|
+
return e;
|
|
1290
|
+
}
|
|
1291
|
+
mergeTimelineCollectedStyles(e) {
|
|
1292
|
+
e._styleSummary.forEach((t, s) => {
|
|
1293
|
+
const i = this._styleSummary.get(s);
|
|
1294
|
+
(!i || t.time > i.time) && this._updateStyle(s, t.value);
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
buildKeyframes() {
|
|
1298
|
+
this.applyStylesToKeyframe();
|
|
1299
|
+
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), s = this._keyframes.size === 1 && this.duration === 0;
|
|
1300
|
+
let i = [];
|
|
1301
|
+
this._keyframes.forEach((o, h) => {
|
|
1302
|
+
const u = new Map([...this._backFill, ...o]);
|
|
1303
|
+
u.forEach((c, f) => {
|
|
1304
|
+
c === Re ? e.add(f) : c === G && t.add(f);
|
|
1305
|
+
}), s || u.set("offset", h / this.duration), i.push(u);
|
|
1306
|
+
});
|
|
1307
|
+
const r = [...e.values()], a = [...t.values()];
|
|
1308
|
+
if (s) {
|
|
1309
|
+
const o = i[0], h = new Map(o);
|
|
1310
|
+
o.set("offset", 0), h.set("offset", 1), i = [o, h];
|
|
1311
|
+
}
|
|
1312
|
+
return Be(this.element, i, r, a, this.duration, this.startTime, this.easing, !1);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
class Gs extends ge {
|
|
1316
|
+
constructor(t, s, i, r, a, o, h = !1) {
|
|
1317
|
+
super(t, s, o.delay);
|
|
1318
|
+
l(this, "keyframes");
|
|
1319
|
+
l(this, "preStyleProps");
|
|
1320
|
+
l(this, "postStyleProps");
|
|
1321
|
+
l(this, "_stretchStartingKeyframe");
|
|
1322
|
+
l(this, "timings");
|
|
1323
|
+
this.keyframes = i, this.preStyleProps = r, this.postStyleProps = a, this._stretchStartingKeyframe = h, this.timings = {
|
|
1324
|
+
duration: o.duration,
|
|
1325
|
+
delay: o.delay,
|
|
1326
|
+
easing: o.easing
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
containsAnimation() {
|
|
1330
|
+
return this.keyframes.length > 1;
|
|
1331
|
+
}
|
|
1332
|
+
buildKeyframes() {
|
|
1333
|
+
let t = this.keyframes, {
|
|
1334
|
+
delay: s,
|
|
1335
|
+
duration: i,
|
|
1336
|
+
easing: r
|
|
1337
|
+
} = this.timings;
|
|
1338
|
+
if (this._stretchStartingKeyframe && s) {
|
|
1339
|
+
const a = [], o = i + s, h = s / o, u = new Map(t[0]);
|
|
1340
|
+
u.set("offset", 0), a.push(u);
|
|
1341
|
+
const c = new Map(t[0]);
|
|
1342
|
+
c.set("offset", et(h)), a.push(c);
|
|
1343
|
+
const f = t.length - 1;
|
|
1344
|
+
for (let E = 1; E <= f; E++) {
|
|
1345
|
+
let _ = new Map(t[E]);
|
|
1346
|
+
const d = _.get("offset"), g = s + d * i;
|
|
1347
|
+
_.set("offset", et(g / o)), a.push(_);
|
|
1348
|
+
}
|
|
1349
|
+
i = o, s = 0, r = "", t = a;
|
|
1350
|
+
}
|
|
1351
|
+
return Be(this.element, t, this.preStyleProps, this.postStyleProps, i, s, r, !0);
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
function et(n, e = 3) {
|
|
1355
|
+
const t = Math.pow(10, e - 1);
|
|
1356
|
+
return Math.round(n * t) / t;
|
|
1357
|
+
}
|
|
1358
|
+
function Us(n, e) {
|
|
1359
|
+
const t = /* @__PURE__ */ new Map();
|
|
1360
|
+
let s;
|
|
1361
|
+
return n.forEach((i) => {
|
|
1362
|
+
if (i === "*") {
|
|
1363
|
+
s ?? (s = e.keys());
|
|
1364
|
+
for (let r of s)
|
|
1365
|
+
t.set(r, G);
|
|
1366
|
+
} else
|
|
1367
|
+
for (let [r, a] of i)
|
|
1368
|
+
t.set(r, a);
|
|
1369
|
+
}), t;
|
|
1370
|
+
}
|
|
1371
|
+
function tt(n, e, t, s, i, r, a, o, h, u, c, f, E) {
|
|
1372
|
+
return {
|
|
1373
|
+
type: 0,
|
|
1374
|
+
element: n,
|
|
1375
|
+
triggerName: e,
|
|
1376
|
+
isRemovalTransition: i,
|
|
1377
|
+
fromState: t,
|
|
1378
|
+
fromStyles: r,
|
|
1379
|
+
toState: s,
|
|
1380
|
+
toStyles: a,
|
|
1381
|
+
timelines: o,
|
|
1382
|
+
queriedElements: h,
|
|
1383
|
+
preStyleProps: u,
|
|
1384
|
+
postStyleProps: c,
|
|
1385
|
+
totalTime: f,
|
|
1386
|
+
errors: E
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
const be = {};
|
|
1390
|
+
class _t {
|
|
1391
|
+
constructor(e, t, s) {
|
|
1392
|
+
l(this, "_triggerName");
|
|
1393
|
+
l(this, "ast");
|
|
1394
|
+
l(this, "_stateStyles");
|
|
1395
|
+
this._triggerName = e, this.ast = t, this._stateStyles = s;
|
|
1396
|
+
}
|
|
1397
|
+
match(e, t, s, i) {
|
|
1398
|
+
return Ws(this.ast.matchers, e, t, s, i);
|
|
1399
|
+
}
|
|
1400
|
+
buildStyles(e, t, s) {
|
|
1401
|
+
let i = this._stateStyles.get("*");
|
|
1402
|
+
return e !== void 0 && (i = this._stateStyles.get(e?.toString()) || i), i ? i.buildStyles(t, s) : /* @__PURE__ */ new Map();
|
|
1403
|
+
}
|
|
1404
|
+
build(e, t, s, i, r, a, o, h, u, c) {
|
|
1405
|
+
const f = [], E = this.ast.options && this.ast.options.params || be, _ = o && o.params || be, d = this.buildStyles(s, _, f), g = h && h.params || be, w = this.buildStyles(i, g, f), A = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), C = i === "void", Z = {
|
|
1406
|
+
params: St(g, E),
|
|
1407
|
+
delay: this.ast.options?.delay
|
|
1408
|
+
}, B = c ? [] : qe(e, t, this.ast.animation, r, a, d, w, Z, u, f);
|
|
1409
|
+
let R = 0;
|
|
1410
|
+
return B.forEach((D) => {
|
|
1411
|
+
R = Math.max(D.duration + D.delay, R);
|
|
1412
|
+
}), f.length ? tt(t, this._triggerName, s, i, C, d, w, [], [], P, F, R, f) : (B.forEach((D) => {
|
|
1413
|
+
const j = D.element, x = L(P, j, /* @__PURE__ */ new Set());
|
|
1414
|
+
D.preStyleProps.forEach((H) => x.add(H));
|
|
1415
|
+
const Ve = L(F, j, /* @__PURE__ */ new Set());
|
|
1416
|
+
D.postStyleProps.forEach((H) => Ve.add(H)), j !== t && A.add(j);
|
|
1417
|
+
}), tt(t, this._triggerName, s, i, C, d, w, B, [...A.values()], P, F, R));
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function Ws(n, e, t, s, i) {
|
|
1421
|
+
return n.some((r) => r(e, t, s, i));
|
|
1422
|
+
}
|
|
1423
|
+
function St(n, e) {
|
|
1424
|
+
const t = {
|
|
1425
|
+
...e
|
|
1426
|
+
};
|
|
1427
|
+
return Object.entries(n).forEach(([s, i]) => {
|
|
1428
|
+
i != null && (t[s] = i);
|
|
1429
|
+
}), t;
|
|
1430
|
+
}
|
|
1431
|
+
class js {
|
|
1432
|
+
constructor(e, t, s) {
|
|
1433
|
+
l(this, "styles");
|
|
1434
|
+
l(this, "defaultParams");
|
|
1435
|
+
l(this, "normalizer");
|
|
1436
|
+
this.styles = e, this.defaultParams = t, this.normalizer = s;
|
|
1437
|
+
}
|
|
1438
|
+
buildStyles(e, t) {
|
|
1439
|
+
const s = /* @__PURE__ */ new Map(), i = St(e, this.defaultParams);
|
|
1440
|
+
return this.styles.styles.forEach((r) => {
|
|
1441
|
+
typeof r != "string" && r.forEach((a, o) => {
|
|
1442
|
+
a && (a = ne(a, i, t));
|
|
1443
|
+
const h = this.normalizer.normalizePropertyName(o, t);
|
|
1444
|
+
a = this.normalizer.normalizeStyleValue(o, h, a, t), s.set(o, a);
|
|
1445
|
+
});
|
|
1446
|
+
}), s;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function Hs(n, e, t) {
|
|
1450
|
+
return new Ys(n, e, t);
|
|
1451
|
+
}
|
|
1452
|
+
class Ys {
|
|
1453
|
+
constructor(e, t, s) {
|
|
1454
|
+
l(this, "name");
|
|
1455
|
+
l(this, "ast");
|
|
1456
|
+
l(this, "_normalizer");
|
|
1457
|
+
l(this, "transitionFactories", []);
|
|
1458
|
+
l(this, "fallbackTransition");
|
|
1459
|
+
l(this, "states", /* @__PURE__ */ new Map());
|
|
1460
|
+
this.name = e, this.ast = t, this._normalizer = s, t.states.forEach((i) => {
|
|
1461
|
+
const r = i.options && i.options.params || {};
|
|
1462
|
+
this.states.set(i.name, new js(i.style, r, s));
|
|
1463
|
+
}), st(this.states, "true", "1"), st(this.states, "false", "0"), t.transitions.forEach((i) => {
|
|
1464
|
+
this.transitionFactories.push(new _t(e, i, this.states));
|
|
1465
|
+
}), this.fallbackTransition = Xs(e, this.states);
|
|
1466
|
+
}
|
|
1467
|
+
get containsQueries() {
|
|
1468
|
+
return this.ast.queryCount > 0;
|
|
1469
|
+
}
|
|
1470
|
+
matchTransition(e, t, s, i) {
|
|
1471
|
+
return this.transitionFactories.find((a) => a.match(e, t, s, i)) || null;
|
|
1472
|
+
}
|
|
1473
|
+
matchStyles(e, t, s) {
|
|
1474
|
+
return this.fallbackTransition.buildStyles(e, t, s);
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
function Xs(n, e, t) {
|
|
1478
|
+
const s = [(a, o) => !0], i = {
|
|
1479
|
+
type: S.Sequence,
|
|
1480
|
+
steps: [],
|
|
1481
|
+
options: null
|
|
1482
|
+
}, r = {
|
|
1483
|
+
type: S.Transition,
|
|
1484
|
+
animation: i,
|
|
1485
|
+
matchers: s,
|
|
1486
|
+
options: null,
|
|
1487
|
+
queryCount: 0,
|
|
1488
|
+
depCount: 0
|
|
1489
|
+
};
|
|
1490
|
+
return new _t(n, r, e);
|
|
1491
|
+
}
|
|
1492
|
+
function st(n, e, t) {
|
|
1493
|
+
n.has(e) ? n.has(t) || n.set(t, n.get(e)) : n.has(t) && n.set(e, n.get(t));
|
|
1494
|
+
}
|
|
1495
|
+
const $s = /* @__PURE__ */ new ye();
|
|
1496
|
+
class Js {
|
|
1497
|
+
constructor(e, t, s) {
|
|
1498
|
+
l(this, "bodyNode");
|
|
1499
|
+
l(this, "_driver");
|
|
1500
|
+
l(this, "_normalizer");
|
|
1501
|
+
l(this, "_animations", /* @__PURE__ */ new Map());
|
|
1502
|
+
l(this, "_playersById", /* @__PURE__ */ new Map());
|
|
1503
|
+
l(this, "players", []);
|
|
1504
|
+
this.bodyNode = e, this._driver = t, this._normalizer = s;
|
|
1505
|
+
}
|
|
1506
|
+
register(e, t) {
|
|
1507
|
+
const s = [], i = [], r = Ke(this._driver, t, s, i);
|
|
1508
|
+
if (s.length)
|
|
1509
|
+
throw Zt();
|
|
1510
|
+
this._animations.set(e, r);
|
|
1511
|
+
}
|
|
1512
|
+
_buildPlayer(e, t, s) {
|
|
1513
|
+
const i = e.element, r = ct(this._normalizer, e.keyframes, t, s);
|
|
1514
|
+
return this._driver.animate(i, r, e.duration, e.delay, e.easing, [], !0);
|
|
1515
|
+
}
|
|
1516
|
+
create(e, t, s = {}) {
|
|
1517
|
+
const i = [], r = this._animations.get(e);
|
|
1518
|
+
let a;
|
|
1519
|
+
const o = /* @__PURE__ */ new Map();
|
|
1520
|
+
if (r ? (a = qe(this._driver, t, r, Le, ce, /* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), s, $s, i), a.forEach((c) => {
|
|
1521
|
+
const f = L(o, c.element, /* @__PURE__ */ new Map());
|
|
1522
|
+
c.postStyleProps.forEach((E) => f.set(E, null));
|
|
1523
|
+
})) : (i.push(xt()), a = []), i.length)
|
|
1524
|
+
throw es();
|
|
1525
|
+
o.forEach((c, f) => {
|
|
1526
|
+
c.forEach((E, _) => {
|
|
1527
|
+
c.set(_, this._driver.computeStyle(f, _, G));
|
|
1528
|
+
});
|
|
1529
|
+
});
|
|
1530
|
+
const h = a.map((c) => {
|
|
1531
|
+
const f = o.get(c.element);
|
|
1532
|
+
return this._buildPlayer(c, /* @__PURE__ */ new Map(), f);
|
|
1533
|
+
}), u = W(h);
|
|
1534
|
+
return this._playersById.set(e, u), u.onDestroy(() => this.destroy(e)), this.players.push(u), u;
|
|
1535
|
+
}
|
|
1536
|
+
destroy(e) {
|
|
1537
|
+
const t = this._getPlayer(e);
|
|
1538
|
+
t.destroy(), this._playersById.delete(e);
|
|
1539
|
+
const s = this.players.indexOf(t);
|
|
1540
|
+
s >= 0 && this.players.splice(s, 1);
|
|
1541
|
+
}
|
|
1542
|
+
_getPlayer(e) {
|
|
1543
|
+
const t = this._playersById.get(e);
|
|
1544
|
+
if (!t)
|
|
1545
|
+
throw ts();
|
|
1546
|
+
return t;
|
|
1547
|
+
}
|
|
1548
|
+
listen(e, t, s, i) {
|
|
1549
|
+
const r = Oe(t, "", "", "");
|
|
1550
|
+
return De(this._getPlayer(e), s, r, i), () => {
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
command(e, t, s, i) {
|
|
1554
|
+
if (s == "register") {
|
|
1555
|
+
this.register(e, i[0]);
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
if (s == "create") {
|
|
1559
|
+
const a = i[0] || {};
|
|
1560
|
+
this.create(e, t, a);
|
|
1561
|
+
return;
|
|
1562
|
+
}
|
|
1563
|
+
const r = this._getPlayer(e);
|
|
1564
|
+
switch (s) {
|
|
1565
|
+
case "play":
|
|
1566
|
+
r.play();
|
|
1567
|
+
break;
|
|
1568
|
+
case "pause":
|
|
1569
|
+
r.pause();
|
|
1570
|
+
break;
|
|
1571
|
+
case "reset":
|
|
1572
|
+
r.reset();
|
|
1573
|
+
break;
|
|
1574
|
+
case "restart":
|
|
1575
|
+
r.restart();
|
|
1576
|
+
break;
|
|
1577
|
+
case "finish":
|
|
1578
|
+
r.finish();
|
|
1579
|
+
break;
|
|
1580
|
+
case "init":
|
|
1581
|
+
r.init();
|
|
1582
|
+
break;
|
|
1583
|
+
case "setPosition":
|
|
1584
|
+
r.setPosition(parseFloat(i[0]));
|
|
1585
|
+
break;
|
|
1586
|
+
case "destroy":
|
|
1587
|
+
this.destroy(e);
|
|
1588
|
+
break;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
const it = "ng-animate-queued", Zs = ".ng-animate-queued", we = "ng-animate-disabled", xs = ".ng-animate-disabled", ei = "ng-star-inserted", ti = ".ng-star-inserted", si = [], Et = {
|
|
1593
|
+
namespaceId: "",
|
|
1594
|
+
setForRemoval: !1,
|
|
1595
|
+
setForMove: !1,
|
|
1596
|
+
hasAnimation: !1,
|
|
1597
|
+
removedBeforeQueried: !1
|
|
1598
|
+
}, ii = {
|
|
1599
|
+
namespaceId: "",
|
|
1600
|
+
setForMove: !1,
|
|
1601
|
+
setForRemoval: !1,
|
|
1602
|
+
hasAnimation: !1,
|
|
1603
|
+
removedBeforeQueried: !0
|
|
1604
|
+
}, K = "__ng_removed";
|
|
1605
|
+
class ke {
|
|
1606
|
+
constructor(e, t = "") {
|
|
1607
|
+
l(this, "namespaceId");
|
|
1608
|
+
l(this, "value");
|
|
1609
|
+
l(this, "options");
|
|
1610
|
+
this.namespaceId = t;
|
|
1611
|
+
const s = e && e.hasOwnProperty("value"), i = s ? e.value : e;
|
|
1612
|
+
if (this.value = oi(i), s) {
|
|
1613
|
+
const {
|
|
1614
|
+
value: r,
|
|
1615
|
+
...a
|
|
1616
|
+
} = e;
|
|
1617
|
+
this.options = a;
|
|
1618
|
+
} else
|
|
1619
|
+
this.options = {};
|
|
1620
|
+
this.options.params || (this.options.params = {});
|
|
1621
|
+
}
|
|
1622
|
+
get params() {
|
|
1623
|
+
return this.options.params;
|
|
1624
|
+
}
|
|
1625
|
+
absorbOptions(e) {
|
|
1626
|
+
const t = e.params;
|
|
1627
|
+
if (t) {
|
|
1628
|
+
const s = this.options.params;
|
|
1629
|
+
Object.keys(t).forEach((i) => {
|
|
1630
|
+
s[i] == null && (s[i] = t[i]);
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
const se = "void", ve = /* @__PURE__ */ new ke(se);
|
|
1636
|
+
class ni {
|
|
1637
|
+
constructor(e, t, s) {
|
|
1638
|
+
l(this, "id");
|
|
1639
|
+
l(this, "hostElement");
|
|
1640
|
+
l(this, "_engine");
|
|
1641
|
+
l(this, "players", []);
|
|
1642
|
+
l(this, "_triggers", /* @__PURE__ */ new Map());
|
|
1643
|
+
l(this, "_queue", []);
|
|
1644
|
+
l(this, "_elementListeners", /* @__PURE__ */ new Map());
|
|
1645
|
+
l(this, "_hostClassName");
|
|
1646
|
+
this.id = e, this.hostElement = t, this._engine = s, this._hostClassName = "ng-tns-" + e, z(t, this._hostClassName);
|
|
1647
|
+
}
|
|
1648
|
+
listen(e, t, s, i) {
|
|
1649
|
+
if (!this._triggers.has(t))
|
|
1650
|
+
throw ss();
|
|
1651
|
+
if (s == null || s.length == 0)
|
|
1652
|
+
throw is();
|
|
1653
|
+
if (!li(s))
|
|
1654
|
+
throw ns();
|
|
1655
|
+
const r = L(this._elementListeners, e, []), a = {
|
|
1656
|
+
name: t,
|
|
1657
|
+
phase: s,
|
|
1658
|
+
callback: i
|
|
1659
|
+
};
|
|
1660
|
+
r.push(a);
|
|
1661
|
+
const o = L(this._engine.statesByElement, e, /* @__PURE__ */ new Map());
|
|
1662
|
+
return o.has(t) || (z(e, ae), z(e, ae + "-" + t), o.set(t, ve)), () => {
|
|
1663
|
+
this._engine.afterFlush(() => {
|
|
1664
|
+
const h = r.indexOf(a);
|
|
1665
|
+
h >= 0 && r.splice(h, 1), this._triggers.has(t) || o.delete(t);
|
|
1666
|
+
});
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
register(e, t) {
|
|
1670
|
+
return this._triggers.has(e) ? !1 : (this._triggers.set(e, t), !0);
|
|
1671
|
+
}
|
|
1672
|
+
_getTrigger(e) {
|
|
1673
|
+
const t = this._triggers.get(e);
|
|
1674
|
+
if (!t)
|
|
1675
|
+
throw rs();
|
|
1676
|
+
return t;
|
|
1677
|
+
}
|
|
1678
|
+
trigger(e, t, s, i = !0) {
|
|
1679
|
+
const r = this._getTrigger(t), a = new Fe(this.id, t, e);
|
|
1680
|
+
let o = this._engine.statesByElement.get(e);
|
|
1681
|
+
o || (z(e, ae), z(e, ae + "-" + t), this._engine.statesByElement.set(e, o = /* @__PURE__ */ new Map()));
|
|
1682
|
+
let h = o.get(t);
|
|
1683
|
+
const u = new ke(s, this.id);
|
|
1684
|
+
if (!(s && s.hasOwnProperty("value")) && h && u.absorbOptions(h.options), o.set(t, u), h || (h = ve), !(u.value === se) && h.value === u.value) {
|
|
1685
|
+
if (!ci(h.params, u.params)) {
|
|
1686
|
+
const g = [], w = r.matchStyles(h.value, h.params, g), A = r.matchStyles(u.value, u.params, g);
|
|
1687
|
+
g.length ? this._engine.reportError(g) : this._engine.afterFlush(() => {
|
|
1688
|
+
J(e, w), Q(e, A);
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
return;
|
|
1692
|
+
}
|
|
1693
|
+
const E = L(this._engine.playersByElement, e, []);
|
|
1694
|
+
E.forEach((g) => {
|
|
1695
|
+
g.namespaceId == this.id && g.triggerName == t && g.queued && g.destroy();
|
|
1696
|
+
});
|
|
1697
|
+
let _ = r.matchTransition(h.value, u.value, e, u.params), d = !1;
|
|
1698
|
+
if (!_) {
|
|
1699
|
+
if (!i) return;
|
|
1700
|
+
_ = r.fallbackTransition, d = !0;
|
|
1701
|
+
}
|
|
1702
|
+
return this._engine.totalQueuedPlayers++, this._queue.push({
|
|
1703
|
+
element: e,
|
|
1704
|
+
triggerName: t,
|
|
1705
|
+
transition: _,
|
|
1706
|
+
fromState: h,
|
|
1707
|
+
toState: u,
|
|
1708
|
+
player: a,
|
|
1709
|
+
isFallbackTransition: d
|
|
1710
|
+
}), d || (z(e, it), a.onStart(() => {
|
|
1711
|
+
ee(e, it);
|
|
1712
|
+
})), a.onDone(() => {
|
|
1713
|
+
let g = this.players.indexOf(a);
|
|
1714
|
+
g >= 0 && this.players.splice(g, 1);
|
|
1715
|
+
const w = this._engine.playersByElement.get(e);
|
|
1716
|
+
if (w) {
|
|
1717
|
+
let A = w.indexOf(a);
|
|
1718
|
+
A >= 0 && w.splice(A, 1);
|
|
1719
|
+
}
|
|
1720
|
+
}), this.players.push(a), E.push(a), a;
|
|
1721
|
+
}
|
|
1722
|
+
deregister(e) {
|
|
1723
|
+
this._triggers.delete(e), this._engine.statesByElement.forEach((t) => t.delete(e)), this._elementListeners.forEach((t, s) => {
|
|
1724
|
+
this._elementListeners.set(s, t.filter((i) => i.name != e));
|
|
1725
|
+
});
|
|
1726
|
+
}
|
|
1727
|
+
clearElementCache(e) {
|
|
1728
|
+
this._engine.statesByElement.delete(e), this._elementListeners.delete(e);
|
|
1729
|
+
const t = this._engine.playersByElement.get(e);
|
|
1730
|
+
t && (t.forEach((s) => s.destroy()), this._engine.playersByElement.delete(e));
|
|
1731
|
+
}
|
|
1732
|
+
_signalRemovalForInnerTriggers(e, t) {
|
|
1733
|
+
const s = this._engine.driver.query(e, fe, !0);
|
|
1734
|
+
s.forEach((i) => {
|
|
1735
|
+
if (i[K]) return;
|
|
1736
|
+
const r = this._engine.fetchNamespacesByElement(i);
|
|
1737
|
+
r.size ? r.forEach((a) => a.triggerLeaveAnimation(i, t, !1, !0)) : this.clearElementCache(i);
|
|
1738
|
+
}), this._engine.afterFlushAnimationsDone(() => s.forEach((i) => this.clearElementCache(i)));
|
|
1739
|
+
}
|
|
1740
|
+
triggerLeaveAnimation(e, t, s, i) {
|
|
1741
|
+
const r = this._engine.statesByElement.get(e), a = /* @__PURE__ */ new Map();
|
|
1742
|
+
if (r) {
|
|
1743
|
+
const o = [];
|
|
1744
|
+
if (r.forEach((h, u) => {
|
|
1745
|
+
if (a.set(u, h.value), this._triggers.has(u)) {
|
|
1746
|
+
const c = this.trigger(e, u, se, i);
|
|
1747
|
+
c && o.push(c);
|
|
1748
|
+
}
|
|
1749
|
+
}), o.length)
|
|
1750
|
+
return this._engine.markElementAsRemoved(this.id, e, !0, t, a), s && W(o).onDone(() => this._engine.processLeaveNode(e)), !0;
|
|
1751
|
+
}
|
|
1752
|
+
return !1;
|
|
1753
|
+
}
|
|
1754
|
+
prepareLeaveAnimationListeners(e) {
|
|
1755
|
+
const t = this._elementListeners.get(e), s = this._engine.statesByElement.get(e);
|
|
1756
|
+
if (t && s) {
|
|
1757
|
+
const i = /* @__PURE__ */ new Set();
|
|
1758
|
+
t.forEach((r) => {
|
|
1759
|
+
const a = r.name;
|
|
1760
|
+
if (i.has(a)) return;
|
|
1761
|
+
i.add(a);
|
|
1762
|
+
const h = this._triggers.get(a).fallbackTransition, u = s.get(a) || ve, c = new ke(se), f = new Fe(this.id, a, e);
|
|
1763
|
+
this._engine.totalQueuedPlayers++, this._queue.push({
|
|
1764
|
+
element: e,
|
|
1765
|
+
triggerName: a,
|
|
1766
|
+
transition: h,
|
|
1767
|
+
fromState: u,
|
|
1768
|
+
toState: c,
|
|
1769
|
+
player: f,
|
|
1770
|
+
isFallbackTransition: !0
|
|
1771
|
+
});
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
removeNode(e, t) {
|
|
1776
|
+
const s = this._engine;
|
|
1777
|
+
if (e.childElementCount && this._signalRemovalForInnerTriggers(e, t), this.triggerLeaveAnimation(e, t, !0)) return;
|
|
1778
|
+
let i = !1;
|
|
1779
|
+
if (s.totalAnimations) {
|
|
1780
|
+
const r = s.players.length ? s.playersByQueriedElement.get(e) : [];
|
|
1781
|
+
if (r && r.length)
|
|
1782
|
+
i = !0;
|
|
1783
|
+
else {
|
|
1784
|
+
let a = e;
|
|
1785
|
+
for (; a = a.parentNode; )
|
|
1786
|
+
if (s.statesByElement.get(a)) {
|
|
1787
|
+
i = !0;
|
|
1788
|
+
break;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
if (this.prepareLeaveAnimationListeners(e), i)
|
|
1793
|
+
s.markElementAsRemoved(this.id, e, !1, t);
|
|
1794
|
+
else {
|
|
1795
|
+
const r = e[K];
|
|
1796
|
+
(!r || r === Et) && (s.afterFlush(() => this.clearElementCache(e)), s.destroyInnerAnimations(e), s._onRemovalComplete(e, t));
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
insertNode(e, t) {
|
|
1800
|
+
z(e, this._hostClassName);
|
|
1801
|
+
}
|
|
1802
|
+
drainQueuedTransitions(e) {
|
|
1803
|
+
const t = [];
|
|
1804
|
+
return this._queue.forEach((s) => {
|
|
1805
|
+
const i = s.player;
|
|
1806
|
+
if (i.destroyed) return;
|
|
1807
|
+
const r = s.element, a = this._elementListeners.get(r);
|
|
1808
|
+
a && a.forEach((o) => {
|
|
1809
|
+
if (o.name == s.triggerName) {
|
|
1810
|
+
const h = Oe(r, s.triggerName, s.fromState.value, s.toState.value);
|
|
1811
|
+
h._data = e, De(s.player, o.phase, h, o.callback);
|
|
1812
|
+
}
|
|
1813
|
+
}), i.markedForDestroy ? this._engine.afterFlush(() => {
|
|
1814
|
+
i.destroy();
|
|
1815
|
+
}) : t.push(s);
|
|
1816
|
+
}), this._queue = [], t.sort((s, i) => {
|
|
1817
|
+
const r = s.transition.ast.depCount, a = i.transition.ast.depCount;
|
|
1818
|
+
return r == 0 || a == 0 ? r - a : this._engine.driver.containsElement(s.element, i.element) ? 1 : -1;
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
destroy(e) {
|
|
1822
|
+
this.players.forEach((t) => t.destroy()), this._signalRemovalForInnerTriggers(this.hostElement, e);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
class ri {
|
|
1826
|
+
constructor(e, t, s) {
|
|
1827
|
+
l(this, "bodyNode");
|
|
1828
|
+
l(this, "driver");
|
|
1829
|
+
l(this, "_normalizer");
|
|
1830
|
+
l(this, "players", []);
|
|
1831
|
+
l(this, "newHostElements", /* @__PURE__ */ new Map());
|
|
1832
|
+
l(this, "playersByElement", /* @__PURE__ */ new Map());
|
|
1833
|
+
l(this, "playersByQueriedElement", /* @__PURE__ */ new Map());
|
|
1834
|
+
l(this, "statesByElement", /* @__PURE__ */ new Map());
|
|
1835
|
+
l(this, "disabledNodes", /* @__PURE__ */ new Set());
|
|
1836
|
+
l(this, "totalAnimations", 0);
|
|
1837
|
+
l(this, "totalQueuedPlayers", 0);
|
|
1838
|
+
l(this, "_namespaceLookup", {});
|
|
1839
|
+
l(this, "_namespaceList", []);
|
|
1840
|
+
l(this, "_flushFns", []);
|
|
1841
|
+
l(this, "_whenQuietFns", []);
|
|
1842
|
+
l(this, "namespacesByHostElement", /* @__PURE__ */ new Map());
|
|
1843
|
+
l(this, "collectedEnterElements", []);
|
|
1844
|
+
l(this, "collectedLeaveElements", []);
|
|
1845
|
+
l(this, "onRemovalComplete", (e, t) => {
|
|
1846
|
+
});
|
|
1847
|
+
this.bodyNode = e, this.driver = t, this._normalizer = s;
|
|
1848
|
+
}
|
|
1849
|
+
_onRemovalComplete(e, t) {
|
|
1850
|
+
this.onRemovalComplete(e, t);
|
|
1851
|
+
}
|
|
1852
|
+
get queuedPlayers() {
|
|
1853
|
+
const e = [];
|
|
1854
|
+
return this._namespaceList.forEach((t) => {
|
|
1855
|
+
t.players.forEach((s) => {
|
|
1856
|
+
s.queued && e.push(s);
|
|
1857
|
+
});
|
|
1858
|
+
}), e;
|
|
1859
|
+
}
|
|
1860
|
+
createNamespace(e, t) {
|
|
1861
|
+
const s = new ni(e, t, this);
|
|
1862
|
+
return this.bodyNode && this.driver.containsElement(this.bodyNode, t) ? this._balanceNamespaceList(s, t) : (this.newHostElements.set(t, s), this.collectEnterElement(t)), this._namespaceLookup[e] = s;
|
|
1863
|
+
}
|
|
1864
|
+
_balanceNamespaceList(e, t) {
|
|
1865
|
+
const s = this._namespaceList, i = this.namespacesByHostElement;
|
|
1866
|
+
if (s.length - 1 >= 0) {
|
|
1867
|
+
let a = !1, o = this.driver.getParentElement(t);
|
|
1868
|
+
for (; o; ) {
|
|
1869
|
+
const h = i.get(o);
|
|
1870
|
+
if (h) {
|
|
1871
|
+
const u = s.indexOf(h);
|
|
1872
|
+
s.splice(u + 1, 0, e), a = !0;
|
|
1873
|
+
break;
|
|
1874
|
+
}
|
|
1875
|
+
o = this.driver.getParentElement(o);
|
|
1876
|
+
}
|
|
1877
|
+
a || s.unshift(e);
|
|
1878
|
+
} else
|
|
1879
|
+
s.push(e);
|
|
1880
|
+
return i.set(t, e), e;
|
|
1881
|
+
}
|
|
1882
|
+
register(e, t) {
|
|
1883
|
+
let s = this._namespaceLookup[e];
|
|
1884
|
+
return s || (s = this.createNamespace(e, t)), s;
|
|
1885
|
+
}
|
|
1886
|
+
registerTrigger(e, t, s) {
|
|
1887
|
+
let i = this._namespaceLookup[e];
|
|
1888
|
+
i && i.register(t, s) && this.totalAnimations++;
|
|
1889
|
+
}
|
|
1890
|
+
destroy(e, t) {
|
|
1891
|
+
e && (this.afterFlush(() => {
|
|
1892
|
+
}), this.afterFlushAnimationsDone(() => {
|
|
1893
|
+
const s = this._fetchNamespace(e);
|
|
1894
|
+
this.namespacesByHostElement.delete(s.hostElement);
|
|
1895
|
+
const i = this._namespaceList.indexOf(s);
|
|
1896
|
+
i >= 0 && this._namespaceList.splice(i, 1), s.destroy(t), delete this._namespaceLookup[e];
|
|
1897
|
+
}));
|
|
1898
|
+
}
|
|
1899
|
+
_fetchNamespace(e) {
|
|
1900
|
+
return this._namespaceLookup[e];
|
|
1901
|
+
}
|
|
1902
|
+
fetchNamespacesByElement(e) {
|
|
1903
|
+
const t = /* @__PURE__ */ new Set(), s = this.statesByElement.get(e);
|
|
1904
|
+
if (s) {
|
|
1905
|
+
for (let i of s.values())
|
|
1906
|
+
if (i.namespaceId) {
|
|
1907
|
+
const r = this._fetchNamespace(i.namespaceId);
|
|
1908
|
+
r && t.add(r);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
return t;
|
|
1912
|
+
}
|
|
1913
|
+
trigger(e, t, s, i) {
|
|
1914
|
+
if (he(t)) {
|
|
1915
|
+
const r = this._fetchNamespace(e);
|
|
1916
|
+
if (r)
|
|
1917
|
+
return r.trigger(t, s, i), !0;
|
|
1918
|
+
}
|
|
1919
|
+
return !1;
|
|
1920
|
+
}
|
|
1921
|
+
insertNode(e, t, s, i) {
|
|
1922
|
+
if (!he(t)) return;
|
|
1923
|
+
const r = t[K];
|
|
1924
|
+
if (r && r.setForRemoval) {
|
|
1925
|
+
r.setForRemoval = !1, r.setForMove = !0;
|
|
1926
|
+
const a = this.collectedLeaveElements.indexOf(t);
|
|
1927
|
+
a >= 0 && this.collectedLeaveElements.splice(a, 1);
|
|
1928
|
+
}
|
|
1929
|
+
if (e) {
|
|
1930
|
+
const a = this._fetchNamespace(e);
|
|
1931
|
+
a && a.insertNode(t, s);
|
|
1932
|
+
}
|
|
1933
|
+
i && this.collectEnterElement(t);
|
|
1934
|
+
}
|
|
1935
|
+
collectEnterElement(e) {
|
|
1936
|
+
this.collectedEnterElements.push(e);
|
|
1937
|
+
}
|
|
1938
|
+
markElementAsDisabled(e, t) {
|
|
1939
|
+
t ? this.disabledNodes.has(e) || (this.disabledNodes.add(e), z(e, we)) : this.disabledNodes.has(e) && (this.disabledNodes.delete(e), ee(e, we));
|
|
1940
|
+
}
|
|
1941
|
+
removeNode(e, t, s) {
|
|
1942
|
+
if (he(t)) {
|
|
1943
|
+
const i = e ? this._fetchNamespace(e) : null;
|
|
1944
|
+
i ? i.removeNode(t, s) : this.markElementAsRemoved(e, t, !1, s);
|
|
1945
|
+
const r = this.namespacesByHostElement.get(t);
|
|
1946
|
+
r && r.id !== e && r.removeNode(t, s);
|
|
1947
|
+
} else
|
|
1948
|
+
this._onRemovalComplete(t, s);
|
|
1949
|
+
}
|
|
1950
|
+
markElementAsRemoved(e, t, s, i, r) {
|
|
1951
|
+
this.collectedLeaveElements.push(t), t[K] = {
|
|
1952
|
+
namespaceId: e,
|
|
1953
|
+
setForRemoval: i,
|
|
1954
|
+
hasAnimation: s,
|
|
1955
|
+
removedBeforeQueried: !1,
|
|
1956
|
+
previousTriggersValues: r
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
listen(e, t, s, i, r) {
|
|
1960
|
+
return he(t) ? this._fetchNamespace(e).listen(t, s, i, r) : () => {
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
_buildInstruction(e, t, s, i, r) {
|
|
1964
|
+
return e.transition.build(this.driver, e.element, e.fromState.value, e.toState.value, s, i, e.fromState.options, e.toState.options, t, r);
|
|
1965
|
+
}
|
|
1966
|
+
destroyInnerAnimations(e) {
|
|
1967
|
+
let t = this.driver.query(e, fe, !0);
|
|
1968
|
+
t.forEach((s) => this.destroyActiveAnimationsForElement(s)), this.playersByQueriedElement.size != 0 && (t = this.driver.query(e, Pe, !0), t.forEach((s) => this.finishActiveQueriedAnimationOnElement(s)));
|
|
1969
|
+
}
|
|
1970
|
+
destroyActiveAnimationsForElement(e) {
|
|
1971
|
+
const t = this.playersByElement.get(e);
|
|
1972
|
+
t && t.forEach((s) => {
|
|
1973
|
+
s.queued ? s.markedForDestroy = !0 : s.destroy();
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
finishActiveQueriedAnimationOnElement(e) {
|
|
1977
|
+
const t = this.playersByQueriedElement.get(e);
|
|
1978
|
+
t && t.forEach((s) => s.finish());
|
|
1979
|
+
}
|
|
1980
|
+
whenRenderingDone() {
|
|
1981
|
+
return new Promise((e) => {
|
|
1982
|
+
if (this.players.length)
|
|
1983
|
+
return W(this.players).onDone(() => e());
|
|
1984
|
+
e();
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1987
|
+
processLeaveNode(e) {
|
|
1988
|
+
const t = e[K];
|
|
1989
|
+
if (t && t.setForRemoval) {
|
|
1990
|
+
if (e[K] = Et, t.namespaceId) {
|
|
1991
|
+
this.destroyInnerAnimations(e);
|
|
1992
|
+
const s = this._fetchNamespace(t.namespaceId);
|
|
1993
|
+
s && s.clearElementCache(e);
|
|
1994
|
+
}
|
|
1995
|
+
this._onRemovalComplete(e, t.setForRemoval);
|
|
1996
|
+
}
|
|
1997
|
+
e.classList?.contains(we) && this.markElementAsDisabled(e, !1), this.driver.query(e, xs, !0).forEach((s) => {
|
|
1998
|
+
this.markElementAsDisabled(s, !1);
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
flush(e = -1) {
|
|
2002
|
+
let t = [];
|
|
2003
|
+
if (this.newHostElements.size && (this.newHostElements.forEach((s, i) => this._balanceNamespaceList(s, i)), this.newHostElements.clear()), this.totalAnimations && this.collectedEnterElements.length)
|
|
2004
|
+
for (let s = 0; s < this.collectedEnterElements.length; s++) {
|
|
2005
|
+
const i = this.collectedEnterElements[s];
|
|
2006
|
+
z(i, ei);
|
|
2007
|
+
}
|
|
2008
|
+
if (this._namespaceList.length && (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {
|
|
2009
|
+
const s = [];
|
|
2010
|
+
try {
|
|
2011
|
+
t = this._flushAnimations(s, e);
|
|
2012
|
+
} finally {
|
|
2013
|
+
for (let i = 0; i < s.length; i++)
|
|
2014
|
+
s[i]();
|
|
2015
|
+
}
|
|
2016
|
+
} else
|
|
2017
|
+
for (let s = 0; s < this.collectedLeaveElements.length; s++) {
|
|
2018
|
+
const i = this.collectedLeaveElements[s];
|
|
2019
|
+
this.processLeaveNode(i);
|
|
2020
|
+
}
|
|
2021
|
+
if (this.totalQueuedPlayers = 0, this.collectedEnterElements.length = 0, this.collectedLeaveElements.length = 0, this._flushFns.forEach((s) => s()), this._flushFns = [], this._whenQuietFns.length) {
|
|
2022
|
+
const s = this._whenQuietFns;
|
|
2023
|
+
this._whenQuietFns = [], t.length ? W(t).onDone(() => {
|
|
2024
|
+
s.forEach((i) => i());
|
|
2025
|
+
}) : s.forEach((i) => i());
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
reportError(e) {
|
|
2029
|
+
throw as();
|
|
2030
|
+
}
|
|
2031
|
+
_flushAnimations(e, t) {
|
|
2032
|
+
const s = new ye(), i = [], r = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
2033
|
+
this.disabledNodes.forEach((m) => {
|
|
2034
|
+
c.add(m);
|
|
2035
|
+
const p = this.driver.query(m, Zs, !0);
|
|
2036
|
+
for (let y = 0; y < p.length; y++)
|
|
2037
|
+
c.add(p[y]);
|
|
2038
|
+
});
|
|
2039
|
+
const f = this.bodyNode, E = Array.from(this.statesByElement.keys()), _ = at(E, this.collectedEnterElements), d = /* @__PURE__ */ new Map();
|
|
2040
|
+
let g = 0;
|
|
2041
|
+
_.forEach((m, p) => {
|
|
2042
|
+
const y = Le + g++;
|
|
2043
|
+
d.set(p, y), m.forEach((b) => z(b, y));
|
|
2044
|
+
});
|
|
2045
|
+
const w = [], A = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set();
|
|
2046
|
+
for (let m = 0; m < this.collectedLeaveElements.length; m++) {
|
|
2047
|
+
const p = this.collectedLeaveElements[m], y = p[K];
|
|
2048
|
+
y && y.setForRemoval && (w.push(p), A.add(p), y.hasAnimation ? this.driver.query(p, ti, !0).forEach((b) => A.add(b)) : P.add(p));
|
|
2049
|
+
}
|
|
2050
|
+
const F = /* @__PURE__ */ new Map(), C = at(E, Array.from(A));
|
|
2051
|
+
C.forEach((m, p) => {
|
|
2052
|
+
const y = ce + g++;
|
|
2053
|
+
F.set(p, y), m.forEach((b) => z(b, y));
|
|
2054
|
+
}), e.push(() => {
|
|
2055
|
+
_.forEach((m, p) => {
|
|
2056
|
+
const y = d.get(p);
|
|
2057
|
+
m.forEach((b) => ee(b, y));
|
|
2058
|
+
}), C.forEach((m, p) => {
|
|
2059
|
+
const y = F.get(p);
|
|
2060
|
+
m.forEach((b) => ee(b, y));
|
|
2061
|
+
}), w.forEach((m) => {
|
|
2062
|
+
this.processLeaveNode(m);
|
|
2063
|
+
});
|
|
2064
|
+
});
|
|
2065
|
+
const Z = [], B = [];
|
|
2066
|
+
for (let m = this._namespaceList.length - 1; m >= 0; m--)
|
|
2067
|
+
this._namespaceList[m].drainQueuedTransitions(t).forEach((y) => {
|
|
2068
|
+
const b = y.player, N = y.element;
|
|
2069
|
+
if (Z.push(b), this.collectedEnterElements.length) {
|
|
2070
|
+
const k = N[K];
|
|
2071
|
+
if (k && k.setForMove) {
|
|
2072
|
+
if (k.previousTriggersValues && k.previousTriggersValues.has(y.triggerName)) {
|
|
2073
|
+
const Y = k.previousTriggersValues.get(y.triggerName), I = this.statesByElement.get(y.element);
|
|
2074
|
+
if (I && I.has(y.triggerName)) {
|
|
2075
|
+
const re = I.get(y.triggerName);
|
|
2076
|
+
re.value = Y, I.set(y.triggerName, re);
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
b.destroy();
|
|
2080
|
+
return;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
const q = !f || !this.driver.containsElement(f, N), O = F.get(N), U = d.get(N), v = this._buildInstruction(y, s, U, O, q);
|
|
2084
|
+
if (v.errors && v.errors.length) {
|
|
2085
|
+
B.push(v);
|
|
2086
|
+
return;
|
|
2087
|
+
}
|
|
2088
|
+
if (q) {
|
|
2089
|
+
b.onStart(() => J(N, v.fromStyles)), b.onDestroy(() => Q(N, v.toStyles)), i.push(b);
|
|
2090
|
+
return;
|
|
2091
|
+
}
|
|
2092
|
+
if (y.isFallbackTransition) {
|
|
2093
|
+
b.onStart(() => J(N, v.fromStyles)), b.onDestroy(() => Q(N, v.toStyles)), i.push(b);
|
|
2094
|
+
return;
|
|
2095
|
+
}
|
|
2096
|
+
const We = [];
|
|
2097
|
+
v.timelines.forEach((k) => {
|
|
2098
|
+
k.stretchStartingKeyframe = !0, this.disabledNodes.has(k.element) || We.push(k);
|
|
2099
|
+
}), v.timelines = We, s.append(N, v.timelines);
|
|
2100
|
+
const vt = {
|
|
2101
|
+
instruction: v,
|
|
2102
|
+
player: b,
|
|
2103
|
+
element: N
|
|
2104
|
+
};
|
|
2105
|
+
a.push(vt), v.queriedElements.forEach((k) => L(o, k, []).push(b)), v.preStyleProps.forEach((k, Y) => {
|
|
2106
|
+
if (k.size) {
|
|
2107
|
+
let I = h.get(Y);
|
|
2108
|
+
I || h.set(Y, I = /* @__PURE__ */ new Set()), k.forEach((re, Se) => I.add(Se));
|
|
2109
|
+
}
|
|
2110
|
+
}), v.postStyleProps.forEach((k, Y) => {
|
|
2111
|
+
let I = u.get(Y);
|
|
2112
|
+
I || u.set(Y, I = /* @__PURE__ */ new Set()), k.forEach((re, Se) => I.add(Se));
|
|
2113
|
+
});
|
|
2114
|
+
});
|
|
2115
|
+
if (B.length) {
|
|
2116
|
+
const m = [];
|
|
2117
|
+
B.forEach((p) => {
|
|
2118
|
+
m.push(os(p.triggerName, p.errors));
|
|
2119
|
+
}), Z.forEach((p) => p.destroy()), this.reportError(m);
|
|
2120
|
+
}
|
|
2121
|
+
const R = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map();
|
|
2122
|
+
a.forEach((m) => {
|
|
2123
|
+
const p = m.element;
|
|
2124
|
+
s.has(p) && (D.set(p, p), this._beforeAnimationBuild(m.player.namespaceId, m.instruction, R));
|
|
2125
|
+
}), i.forEach((m) => {
|
|
2126
|
+
const p = m.element;
|
|
2127
|
+
this._getPreviousPlayers(p, !1, m.namespaceId, m.triggerName, null).forEach((b) => {
|
|
2128
|
+
L(R, p, []).push(b), b.destroy();
|
|
2129
|
+
});
|
|
2130
|
+
});
|
|
2131
|
+
const j = w.filter((m) => ot(m, h, u)), x = /* @__PURE__ */ new Map();
|
|
2132
|
+
rt(x, this.driver, P, u, G).forEach((m) => {
|
|
2133
|
+
ot(m, h, u) && j.push(m);
|
|
2134
|
+
});
|
|
2135
|
+
const H = /* @__PURE__ */ new Map();
|
|
2136
|
+
_.forEach((m, p) => {
|
|
2137
|
+
rt(H, this.driver, new Set(m), h, Re);
|
|
2138
|
+
}), j.forEach((m) => {
|
|
2139
|
+
const p = x.get(m), y = H.get(m);
|
|
2140
|
+
x.set(m, new Map([...p?.entries() ?? [], ...y?.entries() ?? []]));
|
|
2141
|
+
});
|
|
2142
|
+
const _e = [], Ge = [], Ue = {};
|
|
2143
|
+
a.forEach((m) => {
|
|
2144
|
+
const {
|
|
2145
|
+
element: p,
|
|
2146
|
+
player: y,
|
|
2147
|
+
instruction: b
|
|
2148
|
+
} = m;
|
|
2149
|
+
if (s.has(p)) {
|
|
2150
|
+
if (c.has(p)) {
|
|
2151
|
+
y.onDestroy(() => Q(p, b.toStyles)), y.disabled = !0, y.overrideTotalTime(b.totalTime), i.push(y);
|
|
2152
|
+
return;
|
|
2153
|
+
}
|
|
2154
|
+
let N = Ue;
|
|
2155
|
+
if (D.size > 1) {
|
|
2156
|
+
let O = p;
|
|
2157
|
+
const U = [];
|
|
2158
|
+
for (; O = O.parentNode; ) {
|
|
2159
|
+
const v = D.get(O);
|
|
2160
|
+
if (v) {
|
|
2161
|
+
N = v;
|
|
2162
|
+
break;
|
|
2163
|
+
}
|
|
2164
|
+
U.push(O);
|
|
2165
|
+
}
|
|
2166
|
+
U.forEach((v) => D.set(v, N));
|
|
2167
|
+
}
|
|
2168
|
+
const q = this._buildAnimation(y.namespaceId, b, R, r, H, x);
|
|
2169
|
+
if (y.setRealPlayer(q), N === Ue)
|
|
2170
|
+
_e.push(y);
|
|
2171
|
+
else {
|
|
2172
|
+
const O = this.playersByElement.get(N);
|
|
2173
|
+
O && O.length && (y.parentPlayer = W(O)), i.push(y);
|
|
2174
|
+
}
|
|
2175
|
+
} else
|
|
2176
|
+
J(p, b.fromStyles), y.onDestroy(() => Q(p, b.toStyles)), Ge.push(y), c.has(p) && i.push(y);
|
|
2177
|
+
}), Ge.forEach((m) => {
|
|
2178
|
+
const p = r.get(m.element);
|
|
2179
|
+
if (p && p.length) {
|
|
2180
|
+
const y = W(p);
|
|
2181
|
+
m.setRealPlayer(y);
|
|
2182
|
+
}
|
|
2183
|
+
}), i.forEach((m) => {
|
|
2184
|
+
m.parentPlayer ? m.syncPlayerEvents(m.parentPlayer) : m.destroy();
|
|
2185
|
+
});
|
|
2186
|
+
for (let m = 0; m < w.length; m++) {
|
|
2187
|
+
const p = w[m], y = p[K];
|
|
2188
|
+
if (ee(p, ce), y && y.hasAnimation) continue;
|
|
2189
|
+
let b = [];
|
|
2190
|
+
if (o.size) {
|
|
2191
|
+
let q = o.get(p);
|
|
2192
|
+
q && q.length && b.push(...q);
|
|
2193
|
+
let O = this.driver.query(p, Pe, !0);
|
|
2194
|
+
for (let U = 0; U < O.length; U++) {
|
|
2195
|
+
let v = o.get(O[U]);
|
|
2196
|
+
v && v.length && b.push(...v);
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
const N = b.filter((q) => !q.destroyed);
|
|
2200
|
+
N.length ? hi(this, p, N) : this.processLeaveNode(p);
|
|
2201
|
+
}
|
|
2202
|
+
return w.length = 0, _e.forEach((m) => {
|
|
2203
|
+
this.players.push(m), m.onDone(() => {
|
|
2204
|
+
m.destroy();
|
|
2205
|
+
const p = this.players.indexOf(m);
|
|
2206
|
+
this.players.splice(p, 1);
|
|
2207
|
+
}), m.play();
|
|
2208
|
+
}), _e;
|
|
2209
|
+
}
|
|
2210
|
+
afterFlush(e) {
|
|
2211
|
+
this._flushFns.push(e);
|
|
2212
|
+
}
|
|
2213
|
+
afterFlushAnimationsDone(e) {
|
|
2214
|
+
this._whenQuietFns.push(e);
|
|
2215
|
+
}
|
|
2216
|
+
_getPreviousPlayers(e, t, s, i, r) {
|
|
2217
|
+
let a = [];
|
|
2218
|
+
if (t) {
|
|
2219
|
+
const o = this.playersByQueriedElement.get(e);
|
|
2220
|
+
o && (a = o);
|
|
2221
|
+
} else {
|
|
2222
|
+
const o = this.playersByElement.get(e);
|
|
2223
|
+
if (o) {
|
|
2224
|
+
const h = !r || r == se;
|
|
2225
|
+
o.forEach((u) => {
|
|
2226
|
+
u.queued || !h && u.triggerName != i || a.push(u);
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
return (s || i) && (a = a.filter((o) => !(s && s != o.namespaceId || i && i != o.triggerName))), a;
|
|
2231
|
+
}
|
|
2232
|
+
_beforeAnimationBuild(e, t, s) {
|
|
2233
|
+
const i = t.triggerName, r = t.element, a = t.isRemovalTransition ? void 0 : e, o = t.isRemovalTransition ? void 0 : i;
|
|
2234
|
+
for (const h of t.timelines) {
|
|
2235
|
+
const u = h.element, c = u !== r, f = L(s, u, []);
|
|
2236
|
+
this._getPreviousPlayers(u, c, a, o, t.toState).forEach((_) => {
|
|
2237
|
+
const d = _.getRealPlayer();
|
|
2238
|
+
d.beforeDestroy && d.beforeDestroy(), _.destroy(), f.push(_);
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
J(r, t.fromStyles);
|
|
2242
|
+
}
|
|
2243
|
+
_buildAnimation(e, t, s, i, r, a) {
|
|
2244
|
+
const o = t.triggerName, h = t.element, u = [], c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), E = t.timelines.map((d) => {
|
|
2245
|
+
const g = d.element;
|
|
2246
|
+
c.add(g);
|
|
2247
|
+
const w = g[K];
|
|
2248
|
+
if (w && w.removedBeforeQueried) return new ie(d.duration, d.delay);
|
|
2249
|
+
const A = g !== h, P = ui((s.get(g) || si).map((R) => R.getRealPlayer())).filter((R) => {
|
|
2250
|
+
const D = R;
|
|
2251
|
+
return D.element ? D.element === g : !1;
|
|
2252
|
+
}), F = r.get(g), C = a.get(g), Z = ct(this._normalizer, d.keyframes, F, C), B = this._buildPlayer(d, Z, P);
|
|
2253
|
+
if (d.subTimeline && i && f.add(g), A) {
|
|
2254
|
+
const R = new Fe(e, o, g);
|
|
2255
|
+
R.setRealPlayer(B), u.push(R);
|
|
2256
|
+
}
|
|
2257
|
+
return B;
|
|
2258
|
+
});
|
|
2259
|
+
u.forEach((d) => {
|
|
2260
|
+
L(this.playersByQueriedElement, d.element, []).push(d), d.onDone(() => ai(this.playersByQueriedElement, d.element, d));
|
|
2261
|
+
}), c.forEach((d) => z(d, $e));
|
|
2262
|
+
const _ = W(E);
|
|
2263
|
+
return _.onDestroy(() => {
|
|
2264
|
+
c.forEach((d) => ee(d, $e)), Q(h, t.toStyles);
|
|
2265
|
+
}), f.forEach((d) => {
|
|
2266
|
+
L(i, d, []).push(_);
|
|
2267
|
+
}), _;
|
|
2268
|
+
}
|
|
2269
|
+
_buildPlayer(e, t, s) {
|
|
2270
|
+
return t.length > 0 ? this.driver.animate(e.element, t, e.duration, e.delay, e.easing, s) : new ie(e.duration, e.delay);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
class Fe {
|
|
2274
|
+
constructor(e, t, s) {
|
|
2275
|
+
l(this, "namespaceId");
|
|
2276
|
+
l(this, "triggerName");
|
|
2277
|
+
l(this, "element");
|
|
2278
|
+
l(this, "_player", /* @__PURE__ */ new ie());
|
|
2279
|
+
l(this, "_containsRealPlayer", !1);
|
|
2280
|
+
l(this, "_queuedCallbacks", /* @__PURE__ */ new Map());
|
|
2281
|
+
l(this, "destroyed", !1);
|
|
2282
|
+
l(this, "parentPlayer", null);
|
|
2283
|
+
l(this, "markedForDestroy", !1);
|
|
2284
|
+
l(this, "disabled", !1);
|
|
2285
|
+
l(this, "queued", !0);
|
|
2286
|
+
l(this, "totalTime", 0);
|
|
2287
|
+
this.namespaceId = e, this.triggerName = t, this.element = s;
|
|
2288
|
+
}
|
|
2289
|
+
setRealPlayer(e) {
|
|
2290
|
+
this._containsRealPlayer || (this._player = e, this._queuedCallbacks.forEach((t, s) => {
|
|
2291
|
+
t.forEach((i) => De(e, s, void 0, i));
|
|
2292
|
+
}), this._queuedCallbacks.clear(), this._containsRealPlayer = !0, this.overrideTotalTime(e.totalTime), this.queued = !1);
|
|
2293
|
+
}
|
|
2294
|
+
getRealPlayer() {
|
|
2295
|
+
return this._player;
|
|
2296
|
+
}
|
|
2297
|
+
overrideTotalTime(e) {
|
|
2298
|
+
this.totalTime = e;
|
|
2299
|
+
}
|
|
2300
|
+
syncPlayerEvents(e) {
|
|
2301
|
+
const t = this._player;
|
|
2302
|
+
t.triggerCallback && e.onStart(() => t.triggerCallback("start")), e.onDone(() => this.finish()), e.onDestroy(() => this.destroy());
|
|
2303
|
+
}
|
|
2304
|
+
_queueEvent(e, t) {
|
|
2305
|
+
L(this._queuedCallbacks, e, []).push(t);
|
|
2306
|
+
}
|
|
2307
|
+
onDone(e) {
|
|
2308
|
+
this.queued && this._queueEvent("done", e), this._player.onDone(e);
|
|
2309
|
+
}
|
|
2310
|
+
onStart(e) {
|
|
2311
|
+
this.queued && this._queueEvent("start", e), this._player.onStart(e);
|
|
2312
|
+
}
|
|
2313
|
+
onDestroy(e) {
|
|
2314
|
+
this.queued && this._queueEvent("destroy", e), this._player.onDestroy(e);
|
|
2315
|
+
}
|
|
2316
|
+
init() {
|
|
2317
|
+
this._player.init();
|
|
2318
|
+
}
|
|
2319
|
+
hasStarted() {
|
|
2320
|
+
return this.queued ? !1 : this._player.hasStarted();
|
|
2321
|
+
}
|
|
2322
|
+
play() {
|
|
2323
|
+
!this.queued && this._player.play();
|
|
2324
|
+
}
|
|
2325
|
+
pause() {
|
|
2326
|
+
!this.queued && this._player.pause();
|
|
2327
|
+
}
|
|
2328
|
+
restart() {
|
|
2329
|
+
!this.queued && this._player.restart();
|
|
2330
|
+
}
|
|
2331
|
+
finish() {
|
|
2332
|
+
this._player.finish();
|
|
2333
|
+
}
|
|
2334
|
+
destroy() {
|
|
2335
|
+
this.destroyed = !0, this._player.destroy();
|
|
2336
|
+
}
|
|
2337
|
+
reset() {
|
|
2338
|
+
!this.queued && this._player.reset();
|
|
2339
|
+
}
|
|
2340
|
+
setPosition(e) {
|
|
2341
|
+
this.queued || this._player.setPosition(e);
|
|
2342
|
+
}
|
|
2343
|
+
getPosition() {
|
|
2344
|
+
return this.queued ? 0 : this._player.getPosition();
|
|
2345
|
+
}
|
|
2346
|
+
triggerCallback(e) {
|
|
2347
|
+
const t = this._player;
|
|
2348
|
+
t.triggerCallback && t.triggerCallback(e);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
function ai(n, e, t) {
|
|
2352
|
+
let s = n.get(e);
|
|
2353
|
+
if (s) {
|
|
2354
|
+
if (s.length) {
|
|
2355
|
+
const i = s.indexOf(t);
|
|
2356
|
+
s.splice(i, 1);
|
|
2357
|
+
}
|
|
2358
|
+
s.length == 0 && n.delete(e);
|
|
2359
|
+
}
|
|
2360
|
+
return s;
|
|
2361
|
+
}
|
|
2362
|
+
function oi(n) {
|
|
2363
|
+
return n ?? null;
|
|
2364
|
+
}
|
|
2365
|
+
function he(n) {
|
|
2366
|
+
return n && n.nodeType === 1;
|
|
2367
|
+
}
|
|
2368
|
+
function li(n) {
|
|
2369
|
+
return n == "start" || n == "done";
|
|
2370
|
+
}
|
|
2371
|
+
function nt(n, e) {
|
|
2372
|
+
const t = n.style.display;
|
|
2373
|
+
return n.style.display = e ?? "none", t;
|
|
2374
|
+
}
|
|
2375
|
+
function rt(n, e, t, s, i) {
|
|
2376
|
+
const r = [];
|
|
2377
|
+
t.forEach((h) => r.push(nt(h)));
|
|
2378
|
+
const a = [];
|
|
2379
|
+
s.forEach((h, u) => {
|
|
2380
|
+
const c = /* @__PURE__ */ new Map();
|
|
2381
|
+
h.forEach((f) => {
|
|
2382
|
+
const E = e.computeStyle(u, f, i);
|
|
2383
|
+
c.set(f, E), (!E || E.length == 0) && (u[K] = ii, a.push(u));
|
|
2384
|
+
}), n.set(u, c);
|
|
2385
|
+
});
|
|
2386
|
+
let o = 0;
|
|
2387
|
+
return t.forEach((h) => nt(h, r[o++])), a;
|
|
2388
|
+
}
|
|
2389
|
+
function at(n, e) {
|
|
2390
|
+
const t = /* @__PURE__ */ new Map();
|
|
2391
|
+
if (n.forEach((o) => t.set(o, [])), e.length == 0) return t;
|
|
2392
|
+
const s = 1, i = new Set(e), r = /* @__PURE__ */ new Map();
|
|
2393
|
+
function a(o) {
|
|
2394
|
+
if (!o) return s;
|
|
2395
|
+
let h = r.get(o);
|
|
2396
|
+
if (h) return h;
|
|
2397
|
+
const u = o.parentNode;
|
|
2398
|
+
return t.has(u) ? h = u : i.has(u) ? h = s : h = a(u), r.set(o, h), h;
|
|
2399
|
+
}
|
|
2400
|
+
return e.forEach((o) => {
|
|
2401
|
+
const h = a(o);
|
|
2402
|
+
h !== s && t.get(h).push(o);
|
|
2403
|
+
}), t;
|
|
2404
|
+
}
|
|
2405
|
+
function z(n, e) {
|
|
2406
|
+
n.classList?.add(e);
|
|
2407
|
+
}
|
|
2408
|
+
function ee(n, e) {
|
|
2409
|
+
n.classList?.remove(e);
|
|
2410
|
+
}
|
|
2411
|
+
function hi(n, e, t) {
|
|
2412
|
+
W(t).onDone(() => n.processLeaveNode(e));
|
|
2413
|
+
}
|
|
2414
|
+
function ui(n) {
|
|
2415
|
+
const e = [];
|
|
2416
|
+
return Tt(n, e), e;
|
|
2417
|
+
}
|
|
2418
|
+
function Tt(n, e) {
|
|
2419
|
+
for (let t = 0; t < n.length; t++) {
|
|
2420
|
+
const s = n[t];
|
|
2421
|
+
s instanceof ut ? Tt(s.players, e) : e.push(s);
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
function ci(n, e) {
|
|
2425
|
+
const t = Object.keys(n), s = Object.keys(e);
|
|
2426
|
+
if (t.length != s.length) return !1;
|
|
2427
|
+
for (let i = 0; i < t.length; i++) {
|
|
2428
|
+
const r = t[i];
|
|
2429
|
+
if (!e.hasOwnProperty(r) || n[r] !== e[r]) return !1;
|
|
2430
|
+
}
|
|
2431
|
+
return !0;
|
|
2432
|
+
}
|
|
2433
|
+
function ot(n, e, t) {
|
|
2434
|
+
const s = t.get(n);
|
|
2435
|
+
if (!s) return !1;
|
|
2436
|
+
let i = e.get(n);
|
|
2437
|
+
return i ? s.forEach((r) => i.add(r)) : e.set(n, s), t.delete(n), !0;
|
|
2438
|
+
}
|
|
2439
|
+
class lt {
|
|
2440
|
+
constructor(e, t, s) {
|
|
2441
|
+
l(this, "_driver");
|
|
2442
|
+
l(this, "_normalizer");
|
|
2443
|
+
l(this, "_transitionEngine");
|
|
2444
|
+
l(this, "_timelineEngine");
|
|
2445
|
+
l(this, "_triggerCache", {});
|
|
2446
|
+
l(this, "onRemovalComplete", (e, t) => {
|
|
2447
|
+
});
|
|
2448
|
+
this._driver = t, this._normalizer = s, this._transitionEngine = new ri(e.body, t, s), this._timelineEngine = new Js(e.body, t, s), this._transitionEngine.onRemovalComplete = (i, r) => this.onRemovalComplete(i, r);
|
|
2449
|
+
}
|
|
2450
|
+
registerTrigger(e, t, s, i, r) {
|
|
2451
|
+
const a = e + "-" + i;
|
|
2452
|
+
let o = this._triggerCache[a];
|
|
2453
|
+
if (!o) {
|
|
2454
|
+
const h = [], u = [], c = Ke(this._driver, r, h, u);
|
|
2455
|
+
if (h.length)
|
|
2456
|
+
throw $t();
|
|
2457
|
+
o = Hs(i, c, this._normalizer), this._triggerCache[a] = o;
|
|
2458
|
+
}
|
|
2459
|
+
this._transitionEngine.registerTrigger(t, i, o);
|
|
2460
|
+
}
|
|
2461
|
+
register(e, t) {
|
|
2462
|
+
this._transitionEngine.register(e, t);
|
|
2463
|
+
}
|
|
2464
|
+
destroy(e, t) {
|
|
2465
|
+
this._transitionEngine.destroy(e, t);
|
|
2466
|
+
}
|
|
2467
|
+
onInsert(e, t, s, i) {
|
|
2468
|
+
this._transitionEngine.insertNode(e, t, s, i);
|
|
2469
|
+
}
|
|
2470
|
+
onRemove(e, t, s) {
|
|
2471
|
+
this._transitionEngine.removeNode(e, t, s);
|
|
2472
|
+
}
|
|
2473
|
+
disableAnimations(e, t) {
|
|
2474
|
+
this._transitionEngine.markElementAsDisabled(e, t);
|
|
2475
|
+
}
|
|
2476
|
+
process(e, t, s, i) {
|
|
2477
|
+
if (s.charAt(0) == "@") {
|
|
2478
|
+
const [r, a] = Ye(s), o = i;
|
|
2479
|
+
this._timelineEngine.command(r, t, a, o);
|
|
2480
|
+
} else
|
|
2481
|
+
this._transitionEngine.trigger(e, t, s, i);
|
|
2482
|
+
}
|
|
2483
|
+
listen(e, t, s, i, r) {
|
|
2484
|
+
if (s.charAt(0) == "@") {
|
|
2485
|
+
const [a, o] = Ye(s);
|
|
2486
|
+
return this._timelineEngine.listen(a, t, o, r);
|
|
2487
|
+
}
|
|
2488
|
+
return this._transitionEngine.listen(e, t, s, i, r);
|
|
2489
|
+
}
|
|
2490
|
+
flush(e = -1) {
|
|
2491
|
+
this._transitionEngine.flush(e);
|
|
2492
|
+
}
|
|
2493
|
+
get players() {
|
|
2494
|
+
return [...this._transitionEngine.players, ...this._timelineEngine.players];
|
|
2495
|
+
}
|
|
2496
|
+
whenRenderingDone() {
|
|
2497
|
+
return this._transitionEngine.whenRenderingDone();
|
|
2498
|
+
}
|
|
2499
|
+
afterFlushAnimationsDone(e) {
|
|
2500
|
+
this._transitionEngine.afterFlushAnimationsDone(e);
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
function fi(n, e) {
|
|
2504
|
+
let t = null, s = null;
|
|
2505
|
+
return Array.isArray(e) && e.length ? (t = Ae(e[0]), e.length > 1 && (s = Ae(e[e.length - 1]))) : e instanceof Map && (t = Ae(e)), t || s ? new mi(n, t, s) : null;
|
|
2506
|
+
}
|
|
2507
|
+
let mi = /* @__PURE__ */ (() => {
|
|
2508
|
+
const e = class e {
|
|
2509
|
+
constructor(s, i, r) {
|
|
2510
|
+
l(this, "_element");
|
|
2511
|
+
l(this, "_startStyles");
|
|
2512
|
+
l(this, "_endStyles");
|
|
2513
|
+
l(this, "_state", 0);
|
|
2514
|
+
l(this, "_initialStyles");
|
|
2515
|
+
this._element = s, this._startStyles = i, this._endStyles = r;
|
|
2516
|
+
let a = e.initialStylesByElement.get(s);
|
|
2517
|
+
a || e.initialStylesByElement.set(s, a = /* @__PURE__ */ new Map()), this._initialStyles = a;
|
|
2518
|
+
}
|
|
2519
|
+
start() {
|
|
2520
|
+
this._state < 1 && (this._startStyles && Q(this._element, this._startStyles, this._initialStyles), this._state = 1);
|
|
2521
|
+
}
|
|
2522
|
+
finish() {
|
|
2523
|
+
this.start(), this._state < 2 && (Q(this._element, this._initialStyles), this._endStyles && (Q(this._element, this._endStyles), this._endStyles = null), this._state = 1);
|
|
2524
|
+
}
|
|
2525
|
+
destroy() {
|
|
2526
|
+
this.finish(), this._state < 3 && (e.initialStylesByElement.delete(this._element), this._startStyles && (J(this._element, this._startStyles), this._endStyles = null), this._endStyles && (J(this._element, this._endStyles), this._endStyles = null), Q(this._element, this._initialStyles), this._state = 3);
|
|
2527
|
+
}
|
|
2528
|
+
};
|
|
2529
|
+
l(e, "initialStylesByElement", /* @__PURE__ */ new WeakMap());
|
|
2530
|
+
let n = e;
|
|
2531
|
+
return n;
|
|
2532
|
+
})();
|
|
2533
|
+
function Ae(n) {
|
|
2534
|
+
let e = null;
|
|
2535
|
+
return n.forEach((t, s) => {
|
|
2536
|
+
di(s) && (e = e || /* @__PURE__ */ new Map(), e.set(s, t));
|
|
2537
|
+
}), e;
|
|
2538
|
+
}
|
|
2539
|
+
function di(n) {
|
|
2540
|
+
return n === "display" || n === "position";
|
|
2541
|
+
}
|
|
2542
|
+
class ht {
|
|
2543
|
+
constructor(e, t, s, i) {
|
|
2544
|
+
l(this, "element");
|
|
2545
|
+
l(this, "keyframes");
|
|
2546
|
+
l(this, "options");
|
|
2547
|
+
l(this, "_specialStyles");
|
|
2548
|
+
l(this, "_onDoneFns", []);
|
|
2549
|
+
l(this, "_onStartFns", []);
|
|
2550
|
+
l(this, "_onDestroyFns", []);
|
|
2551
|
+
l(this, "_duration");
|
|
2552
|
+
l(this, "_delay");
|
|
2553
|
+
l(this, "_initialized", !1);
|
|
2554
|
+
l(this, "_finished", !1);
|
|
2555
|
+
l(this, "_started", !1);
|
|
2556
|
+
l(this, "_destroyed", !1);
|
|
2557
|
+
l(this, "_finalKeyframe");
|
|
2558
|
+
l(this, "_originalOnDoneFns", []);
|
|
2559
|
+
l(this, "_originalOnStartFns", []);
|
|
2560
|
+
l(this, "domPlayer", null);
|
|
2561
|
+
l(this, "time", 0);
|
|
2562
|
+
l(this, "parentPlayer", null);
|
|
2563
|
+
l(this, "currentSnapshot", /* @__PURE__ */ new Map());
|
|
2564
|
+
this.element = e, this.keyframes = t, this.options = s, this._specialStyles = i, this._duration = s.duration, this._delay = s.delay || 0, this.time = this._duration + this._delay;
|
|
2565
|
+
}
|
|
2566
|
+
_onFinish() {
|
|
2567
|
+
this._finished || (this._finished = !0, this._onDoneFns.forEach((e) => e()), this._onDoneFns = []);
|
|
2568
|
+
}
|
|
2569
|
+
init() {
|
|
2570
|
+
this._buildPlayer() && this._preparePlayerBeforeStart();
|
|
2571
|
+
}
|
|
2572
|
+
_buildPlayer() {
|
|
2573
|
+
if (this._initialized) return this.domPlayer;
|
|
2574
|
+
this._initialized = !0;
|
|
2575
|
+
const e = this.keyframes, t = this._triggerWebAnimation(this.element, e, this.options);
|
|
2576
|
+
if (!t)
|
|
2577
|
+
return this._onFinish(), null;
|
|
2578
|
+
this.domPlayer = t, this._finalKeyframe = e.length ? e[e.length - 1] : /* @__PURE__ */ new Map();
|
|
2579
|
+
const s = () => this._onFinish();
|
|
2580
|
+
return t.addEventListener("finish", s), this.onDestroy(() => {
|
|
2581
|
+
t.removeEventListener("finish", s);
|
|
2582
|
+
}), t;
|
|
2583
|
+
}
|
|
2584
|
+
_preparePlayerBeforeStart() {
|
|
2585
|
+
this._delay ? this._resetDomPlayerState() : this.domPlayer?.pause();
|
|
2586
|
+
}
|
|
2587
|
+
_convertKeyframesToObject(e) {
|
|
2588
|
+
const t = [];
|
|
2589
|
+
return e.forEach((s) => {
|
|
2590
|
+
t.push(Object.fromEntries(s));
|
|
2591
|
+
}), t;
|
|
2592
|
+
}
|
|
2593
|
+
_triggerWebAnimation(e, t, s) {
|
|
2594
|
+
const i = this._convertKeyframesToObject(t);
|
|
2595
|
+
try {
|
|
2596
|
+
return e.animate(i, s);
|
|
2597
|
+
} catch {
|
|
2598
|
+
return null;
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
onStart(e) {
|
|
2602
|
+
this._originalOnStartFns.push(e), this._onStartFns.push(e);
|
|
2603
|
+
}
|
|
2604
|
+
onDone(e) {
|
|
2605
|
+
this._originalOnDoneFns.push(e), this._onDoneFns.push(e);
|
|
2606
|
+
}
|
|
2607
|
+
onDestroy(e) {
|
|
2608
|
+
this._onDestroyFns.push(e);
|
|
2609
|
+
}
|
|
2610
|
+
play() {
|
|
2611
|
+
const e = this._buildPlayer();
|
|
2612
|
+
e && (this.hasStarted() || (this._onStartFns.forEach((t) => t()), this._onStartFns = [], this._started = !0, this._specialStyles && this._specialStyles.start()), e.play());
|
|
2613
|
+
}
|
|
2614
|
+
pause() {
|
|
2615
|
+
this.init(), this.domPlayer?.pause();
|
|
2616
|
+
}
|
|
2617
|
+
finish() {
|
|
2618
|
+
this.init(), this.domPlayer && (this._specialStyles && this._specialStyles.finish(), this._onFinish(), this.domPlayer.finish());
|
|
2619
|
+
}
|
|
2620
|
+
reset() {
|
|
2621
|
+
this._resetDomPlayerState(), this._destroyed = !1, this._finished = !1, this._started = !1, this._onStartFns = this._originalOnStartFns, this._onDoneFns = this._originalOnDoneFns;
|
|
2622
|
+
}
|
|
2623
|
+
_resetDomPlayerState() {
|
|
2624
|
+
this.domPlayer?.cancel();
|
|
2625
|
+
}
|
|
2626
|
+
restart() {
|
|
2627
|
+
this.reset(), this.play();
|
|
2628
|
+
}
|
|
2629
|
+
hasStarted() {
|
|
2630
|
+
return this._started;
|
|
2631
|
+
}
|
|
2632
|
+
destroy() {
|
|
2633
|
+
this._destroyed || (this._destroyed = !0, this._resetDomPlayerState(), this._onFinish(), this._specialStyles && this._specialStyles.destroy(), this._onDestroyFns.forEach((e) => e()), this._onDestroyFns = []);
|
|
2634
|
+
}
|
|
2635
|
+
setPosition(e) {
|
|
2636
|
+
this.domPlayer || this.init(), this.domPlayer && (this.domPlayer.currentTime = e * this.time);
|
|
2637
|
+
}
|
|
2638
|
+
getPosition() {
|
|
2639
|
+
return this.domPlayer ? +(this.domPlayer.currentTime ?? 0) / this.time : this._initialized ? 1 : 0;
|
|
2640
|
+
}
|
|
2641
|
+
get totalTime() {
|
|
2642
|
+
return this._delay + this._duration;
|
|
2643
|
+
}
|
|
2644
|
+
beforeDestroy() {
|
|
2645
|
+
const e = /* @__PURE__ */ new Map();
|
|
2646
|
+
this.hasStarted() && this._finalKeyframe.forEach((s, i) => {
|
|
2647
|
+
i !== "offset" && e.set(i, this._finished ? s : ze(this.element, i));
|
|
2648
|
+
}), this.currentSnapshot = e;
|
|
2649
|
+
}
|
|
2650
|
+
triggerCallback(e) {
|
|
2651
|
+
const t = e === "start" ? this._onStartFns : this._onDoneFns;
|
|
2652
|
+
t.forEach((s) => s()), t.length = 0;
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
class pi {
|
|
2656
|
+
validateStyleProperty(e) {
|
|
2657
|
+
return !0;
|
|
2658
|
+
}
|
|
2659
|
+
validateAnimatableStyleProperty(e) {
|
|
2660
|
+
return !0;
|
|
2661
|
+
}
|
|
2662
|
+
containsElement(e, t) {
|
|
2663
|
+
return ft(e, t);
|
|
2664
|
+
}
|
|
2665
|
+
getParentElement(e) {
|
|
2666
|
+
return Me(e);
|
|
2667
|
+
}
|
|
2668
|
+
query(e, t, s) {
|
|
2669
|
+
return mt(e, t, s);
|
|
2670
|
+
}
|
|
2671
|
+
computeStyle(e, t, s) {
|
|
2672
|
+
return ze(e, t);
|
|
2673
|
+
}
|
|
2674
|
+
animate(e, t, s, i, r, a = []) {
|
|
2675
|
+
const o = i == 0 ? "both" : "forwards", h = {
|
|
2676
|
+
duration: s,
|
|
2677
|
+
delay: i,
|
|
2678
|
+
fill: o
|
|
2679
|
+
};
|
|
2680
|
+
r && (h.easing = r);
|
|
2681
|
+
const u = /* @__PURE__ */ new Map(), c = a.filter((_) => _ instanceof ht);
|
|
2682
|
+
Es(s, i) && c.forEach((_) => {
|
|
2683
|
+
_.currentSnapshot.forEach((d, g) => u.set(g, d));
|
|
2684
|
+
});
|
|
2685
|
+
let f = gs(t).map((_) => new Map(_));
|
|
2686
|
+
f = Ts(e, f, u);
|
|
2687
|
+
const E = fi(e, f);
|
|
2688
|
+
return new ht(e, f, h, E);
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
function wi(n, e) {
|
|
2692
|
+
return n === "noop" ? new lt(e, new yt(), new vs()) : new lt(e, new pi(), new Ps());
|
|
2693
|
+
}
|
|
2694
|
+
class vi {
|
|
2695
|
+
constructor(e, t) {
|
|
2696
|
+
l(this, "_driver");
|
|
2697
|
+
l(this, "_animationAst");
|
|
2698
|
+
this._driver = e;
|
|
2699
|
+
const s = [], r = Ke(e, t, s, []);
|
|
2700
|
+
if (s.length)
|
|
2701
|
+
throw Yt();
|
|
2702
|
+
this._animationAst = r;
|
|
2703
|
+
}
|
|
2704
|
+
buildTimelines(e, t, s, i, r) {
|
|
2705
|
+
const a = Array.isArray(t) ? Je(t) : t, o = Array.isArray(s) ? Je(s) : s, h = [];
|
|
2706
|
+
r = r || new ye();
|
|
2707
|
+
const u = qe(this._driver, e, this._animationAst, Le, ce, a, o, i, r, h);
|
|
2708
|
+
if (h.length)
|
|
2709
|
+
throw Xt();
|
|
2710
|
+
return u;
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
const ue = "@", bt = "@.disabled";
|
|
2714
|
+
class wt {
|
|
2715
|
+
constructor(e, t, s, i) {
|
|
2716
|
+
l(this, "namespaceId");
|
|
2717
|
+
l(this, "delegate");
|
|
2718
|
+
l(this, "engine");
|
|
2719
|
+
l(this, "_onDestroy");
|
|
2720
|
+
l(this, "ɵtype", 0);
|
|
2721
|
+
this.namespaceId = e, this.delegate = t, this.engine = s, this._onDestroy = i;
|
|
2722
|
+
}
|
|
2723
|
+
get data() {
|
|
2724
|
+
return this.delegate.data;
|
|
2725
|
+
}
|
|
2726
|
+
destroyNode(e) {
|
|
2727
|
+
this.delegate.destroyNode?.(e);
|
|
2728
|
+
}
|
|
2729
|
+
destroy() {
|
|
2730
|
+
this.engine.destroy(this.namespaceId, this.delegate), this.engine.afterFlushAnimationsDone(() => {
|
|
2731
|
+
queueMicrotask(() => {
|
|
2732
|
+
this.delegate.destroy();
|
|
2733
|
+
});
|
|
2734
|
+
}), this._onDestroy?.();
|
|
2735
|
+
}
|
|
2736
|
+
createElement(e, t) {
|
|
2737
|
+
return this.delegate.createElement(e, t);
|
|
2738
|
+
}
|
|
2739
|
+
createComment(e) {
|
|
2740
|
+
return this.delegate.createComment(e);
|
|
2741
|
+
}
|
|
2742
|
+
createText(e) {
|
|
2743
|
+
return this.delegate.createText(e);
|
|
2744
|
+
}
|
|
2745
|
+
appendChild(e, t) {
|
|
2746
|
+
this.delegate.appendChild(e, t), this.engine.onInsert(this.namespaceId, t, e, !1);
|
|
2747
|
+
}
|
|
2748
|
+
insertBefore(e, t, s, i = !0) {
|
|
2749
|
+
this.delegate.insertBefore(e, t, s), this.engine.onInsert(this.namespaceId, t, e, i);
|
|
2750
|
+
}
|
|
2751
|
+
removeChild(e, t, s, i) {
|
|
2752
|
+
if (i) {
|
|
2753
|
+
this.delegate.removeChild(e, t, s, i);
|
|
2754
|
+
return;
|
|
2755
|
+
}
|
|
2756
|
+
this.parentNode(t) && this.engine.onRemove(this.namespaceId, t, this.delegate);
|
|
2757
|
+
}
|
|
2758
|
+
selectRootElement(e, t) {
|
|
2759
|
+
return this.delegate.selectRootElement(e, t);
|
|
2760
|
+
}
|
|
2761
|
+
parentNode(e) {
|
|
2762
|
+
return this.delegate.parentNode(e);
|
|
2763
|
+
}
|
|
2764
|
+
nextSibling(e) {
|
|
2765
|
+
return this.delegate.nextSibling(e);
|
|
2766
|
+
}
|
|
2767
|
+
setAttribute(e, t, s, i) {
|
|
2768
|
+
this.delegate.setAttribute(e, t, s, i);
|
|
2769
|
+
}
|
|
2770
|
+
removeAttribute(e, t, s) {
|
|
2771
|
+
this.delegate.removeAttribute(e, t, s);
|
|
2772
|
+
}
|
|
2773
|
+
addClass(e, t) {
|
|
2774
|
+
this.delegate.addClass(e, t);
|
|
2775
|
+
}
|
|
2776
|
+
removeClass(e, t) {
|
|
2777
|
+
this.delegate.removeClass(e, t);
|
|
2778
|
+
}
|
|
2779
|
+
setStyle(e, t, s, i) {
|
|
2780
|
+
this.delegate.setStyle(e, t, s, i);
|
|
2781
|
+
}
|
|
2782
|
+
removeStyle(e, t, s) {
|
|
2783
|
+
this.delegate.removeStyle(e, t, s);
|
|
2784
|
+
}
|
|
2785
|
+
setProperty(e, t, s) {
|
|
2786
|
+
t.charAt(0) == ue && t == bt ? this.disableAnimations(e, !!s) : this.delegate.setProperty(e, t, s);
|
|
2787
|
+
}
|
|
2788
|
+
setValue(e, t) {
|
|
2789
|
+
this.delegate.setValue(e, t);
|
|
2790
|
+
}
|
|
2791
|
+
listen(e, t, s, i) {
|
|
2792
|
+
return this.delegate.listen(e, t, s, i);
|
|
2793
|
+
}
|
|
2794
|
+
disableAnimations(e, t) {
|
|
2795
|
+
this.engine.disableAnimations(e, t);
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
class yi extends wt {
|
|
2799
|
+
constructor(t, s, i, r, a) {
|
|
2800
|
+
super(s, i, r, a);
|
|
2801
|
+
l(this, "factory");
|
|
2802
|
+
this.factory = t, this.namespaceId = s;
|
|
2803
|
+
}
|
|
2804
|
+
setProperty(t, s, i) {
|
|
2805
|
+
s.charAt(0) == ue ? s.charAt(1) == "." && s == bt ? (i = i === void 0 ? !0 : !!i, this.disableAnimations(t, i)) : this.engine.process(this.namespaceId, t, s.slice(1), i) : this.delegate.setProperty(t, s, i);
|
|
2806
|
+
}
|
|
2807
|
+
listen(t, s, i, r) {
|
|
2808
|
+
if (s.charAt(0) == ue) {
|
|
2809
|
+
const a = gi(t);
|
|
2810
|
+
let o = s.slice(1), h = "";
|
|
2811
|
+
return o.charAt(0) != ue && ([o, h] = _i(o)), this.engine.listen(this.namespaceId, a, o, h, (u) => {
|
|
2812
|
+
const c = u._data || -1;
|
|
2813
|
+
this.factory.scheduleListenerCallback(c, i, u);
|
|
2814
|
+
});
|
|
2815
|
+
}
|
|
2816
|
+
return this.delegate.listen(t, s, i, r);
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
function gi(n) {
|
|
2820
|
+
switch (n) {
|
|
2821
|
+
case "body":
|
|
2822
|
+
return document.body;
|
|
2823
|
+
case "document":
|
|
2824
|
+
return document;
|
|
2825
|
+
case "window":
|
|
2826
|
+
return window;
|
|
2827
|
+
default:
|
|
2828
|
+
return n;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
function _i(n) {
|
|
2832
|
+
const e = n.indexOf("."), t = n.substring(0, e), s = n.slice(e + 1);
|
|
2833
|
+
return [t, s];
|
|
2834
|
+
}
|
|
2835
|
+
class Ai {
|
|
2836
|
+
constructor(e, t, s) {
|
|
2837
|
+
l(this, "delegate");
|
|
2838
|
+
l(this, "engine");
|
|
2839
|
+
l(this, "_zone");
|
|
2840
|
+
l(this, "_currentId", 0);
|
|
2841
|
+
l(this, "_microtaskId", 1);
|
|
2842
|
+
l(this, "_animationCallbacksBuffer", []);
|
|
2843
|
+
l(this, "_rendererCache", /* @__PURE__ */ new Map());
|
|
2844
|
+
l(this, "_cdRecurDepth", 0);
|
|
2845
|
+
this.delegate = e, this.engine = t, this._zone = s, t.onRemovalComplete = (i, r) => {
|
|
2846
|
+
r?.removeChild(null, i);
|
|
2847
|
+
};
|
|
2848
|
+
}
|
|
2849
|
+
createRenderer(e, t) {
|
|
2850
|
+
const i = this.delegate.createRenderer(e, t);
|
|
2851
|
+
if (!e || !t?.data?.animation) {
|
|
2852
|
+
const u = this._rendererCache;
|
|
2853
|
+
let c = u.get(i);
|
|
2854
|
+
if (!c) {
|
|
2855
|
+
const f = () => u.delete(i);
|
|
2856
|
+
c = new wt("", i, this.engine, f), u.set(i, c);
|
|
2857
|
+
}
|
|
2858
|
+
return c;
|
|
2859
|
+
}
|
|
2860
|
+
const r = t.id, a = t.id + "-" + this._currentId;
|
|
2861
|
+
this._currentId++, this.engine.register(a, e);
|
|
2862
|
+
const o = (u) => {
|
|
2863
|
+
Array.isArray(u) ? u.forEach(o) : this.engine.registerTrigger(r, a, e, u.name, u);
|
|
2864
|
+
};
|
|
2865
|
+
return t.data.animation.forEach(o), new yi(this, a, i, this.engine);
|
|
2866
|
+
}
|
|
2867
|
+
begin() {
|
|
2868
|
+
this._cdRecurDepth++, this.delegate.begin && this.delegate.begin();
|
|
2869
|
+
}
|
|
2870
|
+
_scheduleCountTask() {
|
|
2871
|
+
queueMicrotask(() => {
|
|
2872
|
+
this._microtaskId++;
|
|
2873
|
+
});
|
|
2874
|
+
}
|
|
2875
|
+
scheduleListenerCallback(e, t, s) {
|
|
2876
|
+
if (e >= 0 && e < this._microtaskId) {
|
|
2877
|
+
this._zone.run(() => t(s));
|
|
2878
|
+
return;
|
|
2879
|
+
}
|
|
2880
|
+
const i = this._animationCallbacksBuffer;
|
|
2881
|
+
i.length == 0 && queueMicrotask(() => {
|
|
2882
|
+
this._zone.run(() => {
|
|
2883
|
+
i.forEach((r) => {
|
|
2884
|
+
const [a, o] = r;
|
|
2885
|
+
a(o);
|
|
2886
|
+
}), this._animationCallbacksBuffer = [];
|
|
2887
|
+
});
|
|
2888
|
+
}), i.push([t, s]);
|
|
2889
|
+
}
|
|
2890
|
+
end() {
|
|
2891
|
+
this._cdRecurDepth--, this._cdRecurDepth == 0 && this._zone.runOutsideAngular(() => {
|
|
2892
|
+
this._scheduleCountTask(), this.engine.flush(this._microtaskId);
|
|
2893
|
+
}), this.delegate.end && this.delegate.end();
|
|
2894
|
+
}
|
|
2895
|
+
whenRenderingDone() {
|
|
2896
|
+
return this.engine.whenRenderingDone();
|
|
2897
|
+
}
|
|
2898
|
+
componentReplaced(e) {
|
|
2899
|
+
this.engine.flush(), this.delegate.componentReplaced?.(e);
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
export {
|
|
2903
|
+
bs as AnimationDriver,
|
|
2904
|
+
yt as NoopAnimationDriver,
|
|
2905
|
+
vi as ɵAnimation,
|
|
2906
|
+
lt as ɵAnimationEngine,
|
|
2907
|
+
yi as ɵAnimationRenderer,
|
|
2908
|
+
Ai as ɵAnimationRendererFactory,
|
|
2909
|
+
ws as ɵAnimationStyleNormalizer,
|
|
2910
|
+
wt as ɵBaseAnimationRenderer,
|
|
2911
|
+
Le as ɵENTER_CLASSNAME,
|
|
2912
|
+
ce as ɵLEAVE_CLASSNAME,
|
|
2913
|
+
vs as ɵNoopAnimationStyleNormalizer,
|
|
2914
|
+
Fe as ɵTransitionAnimationPlayer,
|
|
2915
|
+
pi as ɵWebAnimationsDriver,
|
|
2916
|
+
ht as ɵWebAnimationsPlayer,
|
|
2917
|
+
Ps as ɵWebAnimationsStyleNormalizer,
|
|
2918
|
+
Es as ɵallowPreviousPlayerStylesMerge,
|
|
2919
|
+
bi as ɵcamelCaseToDashCase,
|
|
2920
|
+
ft as ɵcontainsElement,
|
|
2921
|
+
wi as ɵcreateEngine,
|
|
2922
|
+
Me as ɵgetParentElement,
|
|
2923
|
+
mt as ɵinvokeQuery,
|
|
2924
|
+
gs as ɵnormalizeKeyframes,
|
|
2925
|
+
cs as ɵvalidateStyleProperty,
|
|
2926
|
+
Ti as ɵvalidateWebAnimatableStyleProperty
|
|
2927
|
+
};
|