@voidzero-dev/vitepress-theme 0.1.38 → 0.1.41

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.
Files changed (95) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index100.js +13 -6
  3. package/dist/index101.js +57 -4
  4. package/dist/index102.js +5 -3
  5. package/dist/index103.js +39 -7
  6. package/dist/index104.js +20 -32
  7. package/dist/index105.js +25 -57
  8. package/dist/index106.js +9 -8
  9. package/dist/index107.js +54 -11
  10. package/dist/index108.js +34 -56
  11. package/dist/index109.js +119 -6
  12. package/dist/index110.js +86 -33
  13. package/dist/index111.js +8 -21
  14. package/dist/index112.js +2 -25
  15. package/dist/index113.js +7204 -7
  16. package/dist/index114.js +1730 -52
  17. package/dist/index115.js +434 -31
  18. package/dist/index116.js +12 -117
  19. package/dist/index117.js +5323 -91
  20. package/dist/index118.js +2 -8
  21. package/dist/index119.js +32 -438
  22. package/dist/index120.js +1202 -5
  23. package/dist/index121.js +5 -2
  24. package/dist/index122.js +3 -1734
  25. package/dist/index18.js +2 -2
  26. package/dist/index27.js +1 -1
  27. package/dist/index3.js +3 -3
  28. package/dist/index30.js +8 -8
  29. package/dist/index34.js +12 -12
  30. package/dist/index36.js +7 -7
  31. package/dist/index38.js +40 -40
  32. package/dist/index40.js +6 -6
  33. package/dist/index41.js +4 -4
  34. package/dist/index42.js +3 -3
  35. package/dist/index43.js +4 -4
  36. package/dist/index44.js +1 -1
  37. package/dist/index45.js +1 -1
  38. package/dist/index46.js +1 -1
  39. package/dist/index47.js +1 -1
  40. package/dist/index48.js +1 -1
  41. package/dist/index49.js +1 -1
  42. package/dist/index50.js +2 -2
  43. package/dist/index51.js +2 -25
  44. package/dist/index52.js +16 -20
  45. package/dist/index53.js +16 -122
  46. package/dist/index54.js +18 -2
  47. package/dist/index55.js +1 -1
  48. package/dist/index56.js +34 -2
  49. package/dist/index57.js +1 -1
  50. package/dist/index58.js +1 -1
  51. package/dist/index59.js +2 -2
  52. package/dist/index6.js +29 -29
  53. package/dist/index60.js +2 -2
  54. package/dist/index61.js +1 -1
  55. package/dist/index62.js +2 -2
  56. package/dist/index63.js +2 -2
  57. package/dist/index64.js +2 -2
  58. package/dist/index65.js +2 -2
  59. package/dist/index66.js +2 -2
  60. package/dist/index67.js +2 -18
  61. package/dist/index68.js +20 -16
  62. package/dist/index69.js +122 -16
  63. package/dist/index7.js +2 -2
  64. package/dist/index70.js +2 -2
  65. package/dist/index71.js +2 -2
  66. package/dist/index72.js +3 -2
  67. package/dist/index73.js +52 -34
  68. package/dist/index74.js +44 -3
  69. package/dist/index75.js +53 -2
  70. package/dist/index76.js +2 -2
  71. package/dist/index77.js +2587 -2
  72. package/dist/index78.js +2 -2
  73. package/dist/index79.js +2 -2
  74. package/dist/index8.js +3 -3
  75. package/dist/index80.js +2 -2
  76. package/dist/index81.js +2 -2
  77. package/dist/index82.js +2 -49
  78. package/dist/index83.js +3 -44
  79. package/dist/index84.js +2 -2587
  80. package/dist/index85.js +2 -51
  81. package/dist/index86.js +2 -7207
  82. package/dist/index87.js +2 -14
  83. package/dist/index88.js +2 -5324
  84. package/dist/index89.js +2 -2
  85. package/dist/index90.js +1 -1
  86. package/dist/index91.js +1 -1
  87. package/dist/index92.js +10 -2
  88. package/dist/index93.js +7 -2
  89. package/dist/index94.js +5 -2
  90. package/dist/index95.js +4 -2
  91. package/dist/index96.js +6 -32
  92. package/dist/index97.js +31 -1200
  93. package/dist/index98.js +56 -3
  94. package/dist/index99.js +8 -9
  95. package/package.json +1 -1
package/dist/index118.js CHANGED
@@ -1,10 +1,4 @@
1
- function e(n, t) {
2
- return `${n}-trigger-${t}`;
3
- }
4
- function r(n, t) {
5
- return `${n}-content-${t}`;
6
- }
1
+ var e = { exports: {} };
7
2
  export {
8
- r as makeContentId,
9
- e as makeTriggerId
3
+ e as __module
10
4
  };
package/dist/index119.js CHANGED
@@ -1,441 +1,35 @@
1
- const m = (n, t, e) => {
2
- const i = document.createElement(n), [s, r] = Array.isArray(t) ? [void 0, t] : [t, e];
3
- return s && Object.assign(i, s), r?.forEach((a) => i.appendChild(a)), i;
4
- }, V = (n, t) => {
5
- var e;
6
- return t === "left" ? n.offsetLeft : (((e = n.offsetParent instanceof HTMLElement ? n.offsetParent : null) == null ? void 0 : e.offsetWidth) ?? 0) - n.offsetWidth - n.offsetLeft;
7
- }, B = (n) => n.offsetWidth > 0 && n.offsetHeight > 0, G = (n, t) => {
8
- !customElements.get(n) && customElements.define(n, t);
9
- };
10
- function X(n, t, { reverse: e = !1 } = {}) {
11
- const i = n.length;
12
- for (let s = e ? i - 1 : 0; e ? s >= 0 : s < i; e ? s-- : s++)
13
- t(n[s], s);
14
- }
15
- function J(n, t, e, i) {
16
- const s = t.formatToParts(n);
17
- e && s.unshift({ type: "prefix", value: e }), i && s.push({ type: "suffix", value: i });
18
- const r = [], a = [], o = [], c = [], d = {}, p = (h) => `${h}:${d[h] = (d[h] ?? -1) + 1}`;
19
- let $ = "", g = !1, v = !1;
20
- for (const h of s) {
21
- $ += h.value;
22
- const l = h.type === "minusSign" || h.type === "plusSign" ? "sign" : h.type;
23
- l === "integer" ? (g = !0, a.push(...h.value.split("").map((S) => ({ type: l, value: parseInt(S) })))) : l === "group" ? a.push({ type: l, value: h.value }) : l === "decimal" ? (v = !0, o.push({ type: l, value: h.value, key: p(l) })) : l === "fraction" ? o.push(...h.value.split("").map((S) => ({
24
- type: l,
25
- value: parseInt(S),
26
- key: p(l),
27
- pos: -1 - d[l]
28
- }))) : (g || v ? c : r).push({
29
- type: l,
30
- value: h.value,
31
- key: p(l)
32
- });
33
- }
34
- const R = [];
35
- for (let h = a.length - 1; h >= 0; h--) {
36
- const l = a[h];
37
- R.unshift(l.type === "integer" ? {
38
- ...l,
39
- key: p(l.type),
40
- pos: d[l.type]
41
- } : {
42
- ...l,
43
- key: p(l.type)
44
- });
45
- }
46
- return {
47
- pre: r,
48
- integer: R,
49
- fraction: o,
50
- post: c,
51
- valueAsString: $,
52
- value: typeof n == "string" ? parseFloat(n) : n
53
- };
54
- }
55
- const F = String.raw, W = (() => {
56
- try {
57
- document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
58
- } catch {
59
- return !1;
60
- }
61
- return !0;
62
- })(), O = typeof CSS < "u" && CSS.supports && CSS.supports("line-height", "mod(1,1)"), j = typeof matchMedia < "u" ? matchMedia("(prefers-reduced-motion: reduce)") : null, w = "--_number-flow-d-opacity", A = "--_number-flow-d-width", b = "--_number-flow-dx", E = "--_number-flow-d", D = (() => {
63
- try {
64
- return CSS.registerProperty({
65
- name: w,
66
- syntax: "<number>",
67
- inherits: !1,
68
- initialValue: "0"
69
- }), CSS.registerProperty({
70
- name: b,
71
- syntax: "<length>",
72
- inherits: !0,
73
- initialValue: "0px"
74
- }), CSS.registerProperty({
75
- name: A,
76
- syntax: "<number>",
77
- inherits: !1,
78
- initialValue: "0"
79
- }), CSS.registerProperty({
80
- name: E,
81
- syntax: "<number>",
82
- inherits: !0,
83
- initialValue: "0"
84
- }), !0;
85
- } catch {
86
- return !1;
87
- }
88
- })(), I = "var(--number-flow-char-height, 1em)", u = "var(--number-flow-mask-height, 0.25em)", k = `calc(${u} / 2)`, x = "var(--number-flow-mask-width, 0.5em)", f = `calc(${x} / var(--scale-x))`, y = "#000 0, transparent 71%", U = F`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${I} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${A}) / var(--width));transform:translateX(var(${b})) scaleX(var(--scale-x));margin:0 calc(-1 * ${x});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${u},#000 calc(100% - ${u}),transparent 100% ),radial-gradient(at bottom right,${y}),radial-gradient(at bottom left,${y}),radial-gradient(at top left,${y}),radial-gradient(at top right,${y});-webkit-mask-size:100% calc(100% - ${u} * 2),calc(100% - ${f} * 2) 100%,${f} ${u},${f} ${u},${f} ${u},${f} ${u};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${k} ${x};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${b})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${E})}.digit__num,.number .section::after{padding:${k} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${w}))}`, z = HTMLElement, H = O && W && D;
89
- let _;
90
- class Y extends z {
91
- constructor() {
92
- super(), this.created = !1, this.batched = !1;
93
- const { animated: t, ...e } = this.constructor.defaultProps;
94
- this._animated = this.computedAnimated = t, Object.assign(this, e);
95
- }
96
- get animated() {
97
- return this._animated;
98
- }
99
- set animated(t) {
100
- var e;
101
- this.animated !== t && (this._animated = t, (e = this.shadowRoot) == null || e.getAnimations().forEach((i) => i.finish()));
102
- }
103
- /**
104
- * @internal
105
- */
106
- set data(t) {
107
- var e;
108
- if (t == null)
109
- return;
110
- const { pre: i, integer: s, fraction: r, post: a, value: o } = t;
111
- if (this.created) {
112
- const c = this._data;
113
- this._data = t, this.computedTrend = typeof this.trend == "function" ? this.trend(c.value, o) : this.trend, this.computedAnimated = H && this._animated && (!this.respectMotionPreference || !(j != null && j.matches)) && // https://github.com/barvian/number-flow/issues/9
114
- B(this), (e = this.plugins) == null || e.forEach((d) => {
115
- var p;
116
- return (p = d.onUpdate) == null ? void 0 : p.call(d, t, c, this);
117
- }), this.batched || this.willUpdate(), this._pre.update(i), this._num.update({ integer: s, fraction: r }), this._post.update(a), this.batched || this.didUpdate();
118
- } else {
119
- this._data = t, this.attachShadow({ mode: "open" });
120
- try {
121
- this._internals ?? (this._internals = this.attachInternals()), this._internals.role = "img";
122
- } catch {
123
- }
124
- if (typeof CSSStyleSheet < "u" && this.shadowRoot.adoptedStyleSheets)
125
- _ || (_ = new CSSStyleSheet(), _.replaceSync(U)), this.shadowRoot.adoptedStyleSheets = [_];
126
- else {
127
- const c = document.createElement("style");
128
- c.textContent = U, this.shadowRoot.appendChild(c);
129
- }
130
- this._pre = new T(this, i, {
131
- justify: "right",
132
- part: "left"
133
- }), this.shadowRoot.appendChild(this._pre.el), this._num = new Z(this, s, r), this.shadowRoot.appendChild(this._num.el), this._post = new T(this, a, {
134
- justify: "left",
135
- part: "right"
136
- }), this.shadowRoot.appendChild(this._post.el), this.created = !0;
137
- }
138
- try {
139
- this._internals.ariaLabel = t.valueAsString;
140
- } catch {
141
- }
142
- }
143
- /**
144
- * @internal
145
- */
146
- willUpdate() {
147
- this._pre.willUpdate(), this._num.willUpdate(), this._post.willUpdate();
148
- }
149
- /**
150
- * @internal
151
- */
152
- didUpdate() {
153
- if (!this.computedAnimated)
154
- return;
155
- this._abortAnimationsFinish ? this._abortAnimationsFinish.abort() : this.dispatchEvent(new Event("animationsstart")), this._pre.didUpdate(), this._num.didUpdate(), this._post.didUpdate();
156
- const t = new AbortController();
157
- Promise.all(this.shadowRoot.getAnimations().map((e) => e.finished)).then(() => {
158
- t.signal.aborted || (this.dispatchEvent(new Event("animationsfinish")), this._abortAnimationsFinish = void 0);
159
- }), this._abortAnimationsFinish = t;
160
- }
161
- }
162
- Y.defaultProps = {
163
- transformTiming: {
164
- duration: 900,
165
- // Make sure to keep this minified:
166
- easing: "linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"
167
- },
168
- spinTiming: void 0,
169
- opacityTiming: { duration: 450, easing: "ease-out" },
170
- animated: !0,
171
- trend: (n, t) => Math.sign(t - n),
172
- respectMotionPreference: !0,
173
- plugins: void 0,
174
- digits: void 0
175
- };
176
- class Z {
177
- constructor(t, e, i, { className: s, ...r } = {}) {
178
- this.flow = t, this._integer = new P(t, e, {
179
- justify: "right",
180
- part: "integer"
181
- }), this._fraction = new P(t, i, {
182
- justify: "left",
183
- part: "fraction"
184
- }), this._inner = m("span", {
185
- className: "number__inner"
186
- }, [this._integer.el, this._fraction.el]), this.el = m("span", {
187
- ...r,
188
- part: "number",
189
- className: `number ${s ?? ""}`
190
- }, [this._inner]);
191
- }
192
- willUpdate() {
193
- this._prevWidth = this.el.offsetWidth, this._prevLeft = this.el.getBoundingClientRect().left, this._integer.willUpdate(), this._fraction.willUpdate();
194
- }
195
- update({ integer: t, fraction: e }) {
196
- this._integer.update(t), this._fraction.update(e);
197
- }
198
- didUpdate() {
199
- const t = this.el.getBoundingClientRect();
200
- this._integer.didUpdate(), this._fraction.didUpdate();
201
- const e = this._prevLeft - t.left, i = this.el.offsetWidth, s = this._prevWidth - i;
202
- this.el.style.setProperty("--width", String(i)), this.el.animate({
203
- [b]: [`${e}px`, "0px"],
204
- [A]: [s, 0]
205
- }, {
206
- ...this.flow.transformTiming,
207
- composite: "accumulate"
208
- });
209
- }
210
- }
211
- class N {
212
- constructor(t, e, { justify: i, className: s, ...r }, a) {
213
- this.flow = t, this.children = /* @__PURE__ */ new Map(), this.onCharRemove = (c) => () => {
214
- this.children.delete(c);
215
- }, this.justify = i;
216
- const o = e.map((c) => this.addChar(c).el);
217
- this.el = m("span", {
218
- ...r,
219
- className: `section section--justify-${i} ${s ?? ""}`
220
- }, a ? a(o) : o);
221
- }
222
- addChar(t, { startDigitsAtZero: e = !1, ...i } = {}) {
223
- const s = t.type === "integer" || t.type === "fraction" ? new L(this, t.type, e ? 0 : t.value, t.pos, {
224
- ...i,
225
- onRemove: this.onCharRemove(t.key)
226
- }) : new q(this, t.type, t.value, {
227
- ...i,
228
- onRemove: this.onCharRemove(t.key)
229
- });
230
- return this.children.set(t.key, s), s;
231
- }
232
- unpop(t) {
233
- t.el.removeAttribute("inert"), t.el.style.top = "", t.el.style[this.justify] = "";
234
- }
235
- pop(t) {
236
- t.forEach((e) => {
237
- e.el.style.top = `${e.el.offsetTop}px`, e.el.style[this.justify] = `${V(e.el, this.justify)}px`;
238
- }), t.forEach((e) => {
239
- e.el.setAttribute("inert", ""), e.present = !1;
240
- });
241
- }
242
- addNewAndUpdateExisting(t) {
243
- const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = this.justify === "left", r = s ? "prepend" : "append";
244
- if (X(t, (a) => {
245
- let o;
246
- this.children.has(a.key) ? (o = this.children.get(a.key), i.set(a, o), this.unpop(o), o.present = !0) : (o = this.addChar(a, { startDigitsAtZero: !0, animateIn: !0 }), e.set(a, o)), this.el[r](o.el);
247
- }, { reverse: s }), this.flow.computedAnimated) {
248
- const a = this.el.getBoundingClientRect();
249
- e.forEach((o) => {
250
- o.willUpdate(a);
251
- });
252
- }
253
- e.forEach((a, o) => {
254
- a.update(o.value);
255
- }), i.forEach((a, o) => {
256
- a.update(o.value);
257
- });
258
- }
259
- willUpdate() {
260
- const t = this.el.getBoundingClientRect();
261
- this._prevOffset = t[this.justify], this.children.forEach((e) => e.willUpdate(t));
262
- }
263
- didUpdate() {
264
- const t = this.el.getBoundingClientRect();
265
- this.children.forEach((s) => s.didUpdate(t));
266
- const e = t[this.justify], i = this._prevOffset - e;
267
- i && this.children.size && this.el.animate({
268
- transform: [`translateX(${i}px)`, "none"]
269
- }, {
270
- ...this.flow.transformTiming,
271
- composite: "accumulate"
272
- });
273
- }
274
- }
275
- class P extends N {
276
- update(t) {
277
- const e = /* @__PURE__ */ new Map();
278
- this.children.forEach((i, s) => {
279
- t.find((r) => r.key === s) || e.set(s, i), this.unpop(i);
280
- }), this.addNewAndUpdateExisting(t), e.forEach((i) => {
281
- i instanceof L && i.update(0);
282
- }), this.pop(e);
283
- }
284
- }
285
- class T extends N {
286
- update(t) {
287
- const e = /* @__PURE__ */ new Map();
288
- this.children.forEach((i, s) => {
289
- t.find((r) => r.key === s) || e.set(s, i);
290
- }), this.pop(e), this.addNewAndUpdateExisting(t);
291
- }
292
- }
293
- class C {
294
- constructor(t, e, { onRemove: i, animateIn: s = !1 } = {}) {
295
- this.flow = t, this.el = e, this._present = !0, this._remove = () => {
296
- var r;
297
- this.el.remove(), (r = this._onRemove) == null || r.call(this);
298
- }, this.el.classList.add("animate-presence"), this.flow.computedAnimated && s && this.el.animate({
299
- [w]: [-0.9999, 0]
300
- }, {
301
- ...this.flow.opacityTiming,
302
- composite: "accumulate"
303
- }), this._onRemove = i;
304
- }
305
- get present() {
306
- return this._present;
307
- }
308
- set present(t) {
309
- if (this._present !== t) {
310
- if (this._present = t, t ? this.el.removeAttribute("inert") : this.el.setAttribute("inert", ""), !this.flow.computedAnimated) {
311
- t || this._remove();
312
- return;
313
- }
314
- this.el.style.setProperty("--_number-flow-d-opacity", t ? "0" : "-.999"), this.el.animate({
315
- [w]: t ? [-0.9999, 0] : [0.999, 0]
316
- }, {
317
- ...this.flow.opacityTiming,
318
- composite: "accumulate"
319
- }), t ? this.flow.removeEventListener("animationsfinish", this._remove) : this.flow.addEventListener("animationsfinish", this._remove, {
320
- once: !0
321
- });
322
- }
323
- }
324
- }
325
- class M extends C {
326
- constructor(t, e, i, s) {
327
- super(t.flow, i, s), this.section = t, this.value = e, this.el = i;
328
- }
329
- }
330
- class L extends M {
331
- constructor(t, e, i, s, r) {
332
- var a, o;
333
- const c = (((o = (a = t.flow.digits) == null ? void 0 : a[s]) == null ? void 0 : o.max) ?? 9) + 1, d = Array.from({ length: c }).map(($, g) => {
334
- const v = m("span", { className: "digit__num" }, [
335
- document.createTextNode(String(g))
336
- ]);
337
- return g !== i && v.setAttribute("inert", ""), v.style.setProperty("--n", String(g)), v;
338
- }), p = m("span", {
339
- part: `digit ${e}-digit`,
340
- className: "digit"
341
- }, d);
342
- p.style.setProperty("--current", String(i)), p.style.setProperty("--length", String(c)), super(t, i, p, r), this.pos = s, this._onAnimationsFinish = () => {
343
- this.el.classList.remove("is-spinning");
344
- }, this._numbers = d, this.length = c;
345
- }
346
- willUpdate(t) {
347
- const e = this.el.getBoundingClientRect();
348
- this._prevValue = this.value;
349
- const i = e[this.section.justify] - t[this.section.justify], s = e.width / 2;
350
- this._prevCenter = this.section.justify === "left" ? i + s : i - s;
351
- }
352
- update(t) {
353
- this.el.style.setProperty("--current", String(t)), this._numbers.forEach((e, i) => i === t ? e.removeAttribute("inert") : e.setAttribute("inert", "")), this.value = t;
354
- }
355
- didUpdate(t) {
356
- const e = this.el.getBoundingClientRect(), i = e[this.section.justify] - t[this.section.justify], s = e.width / 2, r = this.section.justify === "left" ? i + s : i - s, a = this._prevCenter - r;
357
- a && this.el.animate({
358
- transform: [`translateX(${a}px)`, "none"]
359
- }, {
360
- ...this.flow.transformTiming,
361
- composite: "accumulate"
362
- });
363
- const o = this.getDelta();
364
- o && (this.el.classList.add("is-spinning"), this.el.animate({
365
- [E]: [-o, 0]
366
- }, {
367
- ...this.flow.spinTiming ?? this.flow.transformTiming,
368
- composite: "accumulate"
369
- }), this.flow.addEventListener("animationsfinish", this._onAnimationsFinish, { once: !0 }));
370
- }
371
- getDelta() {
372
- var t;
373
- if (this.flow.plugins)
374
- for (const s of this.flow.plugins) {
375
- const r = (t = s.getDelta) == null ? void 0 : t.call(s, this.value, this._prevValue, this);
376
- if (r != null)
377
- return r;
378
- }
379
- const e = this.value - this._prevValue, i = this.flow.computedTrend || Math.sign(e);
380
- return i < 0 && this.value > this._prevValue ? this.value - this.length - this._prevValue : i > 0 && this.value < this._prevValue ? this.length - this._prevValue + this.value : e;
381
- }
382
- }
383
- class q extends M {
384
- constructor(t, e, i, s) {
385
- const r = m("span", {
386
- className: "symbol__value",
387
- textContent: i
388
- });
389
- super(t, i, m("span", {
390
- part: `symbol ${e}`,
391
- className: "symbol"
392
- }, [r]), s), this.type = e, this._children = /* @__PURE__ */ new Map(), this._onChildRemove = (a) => () => {
393
- this._children.delete(a);
394
- }, this._children.set(i, new C(this.flow, r, {
395
- onRemove: this._onChildRemove(i)
396
- }));
397
- }
398
- willUpdate(t) {
399
- if (this.type === "decimal")
400
- return;
401
- const e = this.el.getBoundingClientRect();
402
- this._prevOffset = e[this.section.justify] - t[this.section.justify];
403
- }
404
- update(t) {
405
- if (this.value !== t) {
406
- const e = this._children.get(this.value);
407
- e && (e.present = !1);
408
- const i = this._children.get(t);
409
- if (i)
410
- i.present = !0;
411
- else {
412
- const s = m("span", {
413
- className: "symbol__value",
414
- textContent: t
415
- });
416
- this.el.appendChild(s), this._children.set(t, new C(this.flow, s, {
417
- animateIn: !0,
418
- onRemove: this._onChildRemove(t)
419
- }));
420
- }
421
- }
422
- this.value = t;
423
- }
424
- didUpdate(t) {
425
- if (this.type === "decimal")
426
- return;
427
- const e = this.el.getBoundingClientRect()[this.section.justify] - t[this.section.justify], i = this._prevOffset - e;
428
- i && this.el.animate({
429
- transform: [`translateX(${i}px)`, "none"]
430
- }, { ...this.flow.transformTiming, composite: "accumulate" });
431
- }
1
+ function y(n) {
2
+ return Object.prototype.toString.call(n) === "[object Object]";
3
+ }
4
+ function a(n) {
5
+ return y(n) || Array.isArray(n);
6
+ }
7
+ function p() {
8
+ return !!(typeof window < "u" && window.document && window.document.createElement);
9
+ }
10
+ function l(n, t) {
11
+ const e = Object.keys(n), c = Object.keys(t);
12
+ if (e.length !== c.length) return !1;
13
+ const s = JSON.stringify(Object.keys(n.breakpoints || {})), u = JSON.stringify(Object.keys(t.breakpoints || {}));
14
+ return s !== u ? !1 : e.every((o) => {
15
+ const r = n[o], i = t[o];
16
+ return typeof r == "function" ? `${r}` == `${i}` : !a(r) || !a(i) ? r === i : l(r, i);
17
+ });
18
+ }
19
+ function f(n) {
20
+ return n.concat().sort((t, e) => t.name > e.name ? 1 : -1).map((t) => t.options);
21
+ }
22
+ function O(n, t) {
23
+ if (n.length !== t.length) return !1;
24
+ const e = f(n), c = f(t);
25
+ return e.every((s, u) => {
26
+ const o = c[u];
27
+ return l(s, o);
28
+ });
432
29
  }
433
30
  export {
434
- L as D,
435
- Y as N,
436
- z as S,
437
- H as c,
438
- G as d,
439
- J as f,
440
- j as p
31
+ l as areOptionsEqual,
32
+ O as arePluginsEqual,
33
+ p as canUseDOM,
34
+ f as sortAndMapPluginToOptions
441
35
  };