aptechka 0.81.1 → 0.82.0
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/lib/{Animation-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
- package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
- package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
- package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
- package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
- package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
- package/lib/LocalLinks-TQkTpAMx.js +62 -0
- package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
- package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
- package/lib/PageScroll-C7QBpx0G.cjs +1 -0
- package/lib/PageScroll-cQ3B5-6N.js +62 -0
- package/lib/SourceElement-BQ7g2KWK.js +260 -0
- package/lib/SourceElement-TzgPNQOd.cjs +5 -0
- package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
- package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
- package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
- package/lib/accordion/index.js +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.js +3 -3
- package/lib/billboard/index.js +2 -2
- package/lib/cache/Cache.d.ts +8 -0
- package/lib/cache/index.cjs +1 -0
- package/lib/cache/index.d.ts +1 -0
- package/lib/cache/index.js +37 -0
- package/lib/canvas/index.js +2 -2
- package/lib/controls/index.js +1 -1
- package/lib/css-property/index.js +3 -3
- package/lib/css-value-parser/index.js +1 -1
- package/lib/dev/index.js +2 -2
- package/lib/device/index.js +1 -1
- package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
- package/lib/element-linked-store/index.js +2 -2
- package/lib/element-resizer/index.js +2 -2
- package/lib/en3/index.js +2 -2
- package/lib/history/History.d.ts +10 -0
- package/lib/history/index.cjs +1 -0
- package/lib/history/index.d.ts +1 -0
- package/lib/history/index.js +34 -0
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +3 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +4 -4
- package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/index.js +6 -6
- package/lib/ladder/index.js +2 -2
- package/lib/layout-box/index.js +2 -2
- package/lib/loading/index.js +1 -1
- package/lib/local-links/LocalLinks.d.ts +17 -0
- package/lib/local-links/index.cjs +1 -0
- package/lib/local-links/index.d.ts +1 -0
- package/lib/local-links/index.js +4 -0
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.js +2 -2
- package/lib/metadata-BcYZ5w3T.cjs +1 -0
- package/lib/metadata-jfowcCyz.js +12 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +141 -140
- package/lib/morph-B6sGhLCi.cjs +1 -0
- package/lib/morph-BQErz7qP.js +242 -0
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +4 -4
- package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
- package/lib/object-baN9pgbU.cjs +1 -0
- package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
- package/lib/page-announcer/index.cjs +1 -0
- package/lib/page-announcer/index.d.ts +1 -0
- package/lib/page-announcer/index.js +4 -0
- package/lib/page-scroll/PageScroll.d.ts +23 -0
- package/lib/page-scroll/index.cjs +1 -0
- package/lib/page-scroll/index.d.ts +1 -0
- package/lib/page-scroll/index.js +4 -0
- package/lib/pixel-perfect/index.js +3 -3
- package/lib/pointer/index.js +4 -4
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -3
- package/lib/radio/index.js +1 -1
- package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
- package/lib/router/Route.d.ts +1 -2
- package/lib/router/Router.d.ts +18 -23
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +183 -249
- package/lib/scroll/index.js +8 -8
- package/lib/scroll-entries/index.js +1 -1
- package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
- package/lib/scroll-kit/index.js +4 -4
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +3 -3
- package/lib/size-element/index.js +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/spa/SPA.d.ts +29 -0
- package/lib/spa/index.cjs +1 -0
- package/lib/spa/index.d.ts +1 -0
- package/lib/spa/index.js +130 -0
- package/lib/store/index.js +3 -3
- package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/url-CPgw9bd5.cjs +1 -0
- package/lib/url-DAl-mgbC.js +97 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +141 -120
- package/lib/utils/morph.d.ts +49 -0
- package/lib/utils/object.d.ts +1 -1
- package/lib/utils/url.d.ts +6 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +3 -3
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +3 -3
- package/package.json +49 -1
- package/lib/SourceElement-BweVAYgJ.js +0 -268
- package/lib/SourceElement-DMS25FM0.cjs +0 -5
- package/lib/object-CCiXnER2.cjs +0 -1
- package/lib/router/Link.d.ts +0 -8
- package/lib/url-BRY7C6vT.cjs +0 -1
- package/lib/url-DQgGZl_e.js +0 -66
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
var X = (l) => {
|
|
2
|
-
throw TypeError(l);
|
|
3
|
-
};
|
|
4
|
-
var Z = (l, a, e) => a.has(l) || X("Cannot " + e);
|
|
5
|
-
var t = (l, a, e) => (Z(l, a, "read from private field"), e ? e.call(l) : a.get(l)), i = (l, a, e) => a.has(l) ? X("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(l) : a.set(l, e), s = (l, a, e, h) => (Z(l, a, "write to private field"), h ? h.call(l, e) : a.set(l, e), e), j = (l, a, e) => (Z(l, a, "access private method"), e);
|
|
6
|
-
import { ElementLinkedStore as st } from "./element-linked-store/index.js";
|
|
7
|
-
import { loading as J } from "./loading/index.js";
|
|
8
|
-
import { i as it } from "./index-JqYHGoo6.js";
|
|
9
|
-
import { d as w } from "./events-CsVF98U6.js";
|
|
10
|
-
import { k as Y } from "./string-BlMQbe8b.js";
|
|
11
|
-
import "construct-style-sheets-polyfill";
|
|
12
|
-
import { RESIZE_ORDER as rt } from "./order/index.js";
|
|
13
|
-
import { windowResizer as tt } from "./window-resizer/index.js";
|
|
14
|
-
import { S as at } from "./Store-BtVtCGLk.js";
|
|
15
|
-
var V, S, z, L, m, p, q;
|
|
16
|
-
class nt {
|
|
17
|
-
constructor(a) {
|
|
18
|
-
i(this, V);
|
|
19
|
-
i(this, S);
|
|
20
|
-
i(this, z);
|
|
21
|
-
i(this, L);
|
|
22
|
-
i(this, m);
|
|
23
|
-
i(this, p);
|
|
24
|
-
i(this, q);
|
|
25
|
-
s(this, V, a);
|
|
26
|
-
let e = a.split(".");
|
|
27
|
-
const h = /\b\d{1,2}x\b/g, n = e.find((y) => y.match(h) && parseInt(y));
|
|
28
|
-
s(this, z, n ? parseInt(n) : 1), n && (e = e.slice(0, -1)), s(this, S, e.length > 1 ? e.slice(0, -1).join(".") : e.join("."));
|
|
29
|
-
const o = /\d+max/g, d = /\d+min/g, U = /\d+mar/g, F = /\d+mir/g, W = e.find((y) => y.match(o)), u = e.find((y) => y.match(d)), x = e.find((y) => y.match(U)), Q = e.find((y) => y.match(F));
|
|
30
|
-
x ? (s(this, m, parseInt(x)), s(this, p, "max"), s(this, L, `(max-aspect-ratio: ${t(this, m)})`)) : Q ? (s(this, m, parseInt(Q)), s(this, p, "max"), s(this, L, `(min-aspect-ratio: ${t(this, m)})`)) : W ? (s(this, m, parseInt(W)), s(this, p, "max"), s(this, L, `(max-width: ${t(this, m)}px)`)) : u ? (s(this, m, parseInt(u)), s(this, L, `(min-width: ${t(this, m)}px)`), s(this, p, "min")) : (s(this, m, 0), s(this, L, `(min-width: ${t(this, m)}px)`), s(this, p, "min")), s(this, S, t(this, S).replace(
|
|
31
|
-
`.${t(this, m)}${t(this, p)}`,
|
|
32
|
-
""
|
|
33
|
-
)), s(this, q, e[e.length - 1] === t(this, S) ? "" : "." + e[e.length - 1]), s(this, q, t(this, q).replace(
|
|
34
|
-
`.${t(this, m)}${t(this, p)}`,
|
|
35
|
-
""
|
|
36
|
-
));
|
|
37
|
-
}
|
|
38
|
-
get url() {
|
|
39
|
-
return t(this, V);
|
|
40
|
-
}
|
|
41
|
-
get name() {
|
|
42
|
-
return t(this, S);
|
|
43
|
-
}
|
|
44
|
-
get density() {
|
|
45
|
-
return t(this, z);
|
|
46
|
-
}
|
|
47
|
-
get query() {
|
|
48
|
-
return t(this, L);
|
|
49
|
-
}
|
|
50
|
-
get extension() {
|
|
51
|
-
return t(this, q);
|
|
52
|
-
}
|
|
53
|
-
get queryType() {
|
|
54
|
-
return t(this, p);
|
|
55
|
-
}
|
|
56
|
-
get queryValue() {
|
|
57
|
-
return t(this, m);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
V = new WeakMap(), S = new WeakMap(), z = new WeakMap(), L = new WeakMap(), m = new WeakMap(), p = new WeakMap(), q = new WeakMap();
|
|
61
|
-
function ht(l) {
|
|
62
|
-
if (isNaN(l)) return "0:00";
|
|
63
|
-
const a = Math.floor(Math.max(0, l)), e = Math.floor(a / 3600), h = Math.floor(a % 3600 / 60), o = (a % 60).toString().padStart(2, "0");
|
|
64
|
-
if (e > 0) {
|
|
65
|
-
const d = h.toString().padStart(2, "0");
|
|
66
|
-
return `${e}:${d}:${o}`;
|
|
67
|
-
} else
|
|
68
|
-
return `${h}:${o}`;
|
|
69
|
-
}
|
|
70
|
-
var v;
|
|
71
|
-
class et {
|
|
72
|
-
constructor(a, e) {
|
|
73
|
-
i(this, v);
|
|
74
|
-
s(this, v, /* @__PURE__ */ new Map());
|
|
75
|
-
const h = (e == null ? void 0 : e.mediaBuckets) !== !1, n = typeof a == "string" ? h ? a.trim().split(",").map((u) => u.trim()).filter((u) => !!u) : [a] : a, o = [];
|
|
76
|
-
n.forEach((u) => {
|
|
77
|
-
const x = new nt(u);
|
|
78
|
-
o.push([x.query, x]);
|
|
79
|
-
});
|
|
80
|
-
const d = o.filter((u) => u[1].queryType.includes("max")).sort((u, x) => x[1].queryValue - u[1].queryValue), U = o.filter((u) => u[1].queryType.includes("min") && u[1].queryValue !== 0).sort((u, x) => u[1].queryValue - x[1].queryValue), F = o.filter((u) => u[0] === "(min-width: 0px)");
|
|
81
|
-
(F ? [...F, ...d, ...U] : [...d, ...U]).forEach((u) => {
|
|
82
|
-
t(this, v).has(u[0]) || t(this, v).set(u[0], []), t(this, v).get(u[0]).push(u[1]);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
get mediaBuckets() {
|
|
86
|
-
return t(this, v);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
v = new WeakMap();
|
|
90
|
-
var k, $;
|
|
91
|
-
class ot extends at {
|
|
92
|
-
constructor(e) {
|
|
93
|
-
super(void 0);
|
|
94
|
-
i(this, k);
|
|
95
|
-
i(this, $, () => {
|
|
96
|
-
let e;
|
|
97
|
-
t(this, k).mediaBuckets.forEach((o, d) => {
|
|
98
|
-
matchMedia(d).matches && (e = o);
|
|
99
|
-
});
|
|
100
|
-
let h, n = 0;
|
|
101
|
-
e == null || e.forEach((o) => {
|
|
102
|
-
o.density > n && o.density <= Math.max(devicePixelRatio, 1) && (n = o.density, h = o);
|
|
103
|
-
}), e != null && e.length && !h && (h = e[0]), this.current = h;
|
|
104
|
-
});
|
|
105
|
-
s(this, k, new et(e.srcset, e.sourceSetOptions));
|
|
106
|
-
}
|
|
107
|
-
updateSource(e) {
|
|
108
|
-
s(this, k, new et(e.srcset, e.sourceSetOptions)), t(this, $).call(this);
|
|
109
|
-
}
|
|
110
|
-
close() {
|
|
111
|
-
super.close(), this.disconnect();
|
|
112
|
-
}
|
|
113
|
-
connect() {
|
|
114
|
-
tt.subscribe(t(this, $), rt.SOURCE_MANAGER), t(this, $).call(this);
|
|
115
|
-
}
|
|
116
|
-
disconnect() {
|
|
117
|
-
tt.unsubscribe(t(this, $));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
k = new WeakMap(), $ = new WeakMap();
|
|
121
|
-
let ct = 0;
|
|
122
|
-
var f, r, I, E, b, g, B, A, c, O, R, M, P, T, _, G, D, K, H, N, C;
|
|
123
|
-
class Lt extends HTMLElement {
|
|
124
|
-
constructor(e) {
|
|
125
|
-
super();
|
|
126
|
-
i(this, T);
|
|
127
|
-
i(this, f, null);
|
|
128
|
-
i(this, r, null);
|
|
129
|
-
i(this, I, this);
|
|
130
|
-
i(this, E, !1);
|
|
131
|
-
i(this, b, !1);
|
|
132
|
-
i(this, g, !1);
|
|
133
|
-
i(this, B, "");
|
|
134
|
-
i(this, A, "");
|
|
135
|
-
i(this, c, new st(this, {
|
|
136
|
-
loading: !1,
|
|
137
|
-
loaded: !1,
|
|
138
|
-
error: !1,
|
|
139
|
-
clear: !1,
|
|
140
|
-
playing: !1,
|
|
141
|
-
metadata: !1
|
|
142
|
-
}));
|
|
143
|
-
i(this, O, null);
|
|
144
|
-
i(this, R);
|
|
145
|
-
i(this, M, null);
|
|
146
|
-
i(this, P);
|
|
147
|
-
i(this, G, (e) => {
|
|
148
|
-
const h = e[0];
|
|
149
|
-
t(this, g) && (!t(this, b) || this.hasAttribute("reload-source")) && h.isIntersecting && this.triggerLazyLoad(), h.isIntersecting ? w(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && (j(this, T, _).call(this, void 0), s(this, b, !1)), w(this, "sourceRelease", { custom: !0 }));
|
|
150
|
-
});
|
|
151
|
-
i(this, D, () => {
|
|
152
|
-
t(this, c).set("loaded", !0), t(this, c).set("error", !1), t(this, c).set("loading", !1), !t(this, g) && !t(this, E) && J.complete(t(this, A)), w(this, "sourceLoaded", { custom: !0 });
|
|
153
|
-
const e = getComputedStyle(this).getPropertyValue("--clear-duration");
|
|
154
|
-
e ? s(this, R, setTimeout(
|
|
155
|
-
() => {
|
|
156
|
-
t(this, c).set("clear", !0);
|
|
157
|
-
},
|
|
158
|
-
parseFloat(e) * 1e3
|
|
159
|
-
)) : t(this, c).set("clear", !0), s(this, E, !0);
|
|
160
|
-
});
|
|
161
|
-
i(this, K, (e) => {
|
|
162
|
-
t(this, c).set("loaded", !1), t(this, c).set("error", !0), t(this, c).set("loading", !1), !t(this, g) && !t(this, E) && J.error(t(this, A)), w(this, "sourceError", { custom: !0 }), s(this, E, !0);
|
|
163
|
-
});
|
|
164
|
-
i(this, H, () => {
|
|
165
|
-
t(this, c).set("playing", !0), w(this, "sourcePlay", { custom: !0 });
|
|
166
|
-
});
|
|
167
|
-
i(this, N, () => {
|
|
168
|
-
t(this, c).set("playing", !1), w(this, "sourcePause", { custom: !0 });
|
|
169
|
-
});
|
|
170
|
-
i(this, C, () => {
|
|
171
|
-
const e = t(this, r);
|
|
172
|
-
(e.tagName === "VIDEO" || e.tagName === "AUDIO") && e.readyState >= 1 && (t(this, c).set("metadata", !0), w(this, "sourceMetadataLoaded", { custom: !0 }), this.querySelectorAll("[data-source-duration]").forEach((h) => {
|
|
173
|
-
h.textContent = ht(e.duration);
|
|
174
|
-
}));
|
|
175
|
-
});
|
|
176
|
-
s(this, P, e == null ? void 0 : e.sourceSetOptions), it && window.IntersectionObserver && s(this, O, new IntersectionObserver(
|
|
177
|
-
t(this, G)
|
|
178
|
-
)), t(this, c).subscribe((h) => {
|
|
179
|
-
var o;
|
|
180
|
-
const n = (o = this.getAttribute("data-global-play-class")) == null ? void 0 : o.split(
|
|
181
|
-
","
|
|
182
|
-
);
|
|
183
|
-
n != null && n.length && (h.current.playing ? n.forEach((d) => {
|
|
184
|
-
document.documentElement.classList.add(d.trim());
|
|
185
|
-
}) : n.forEach((d) => {
|
|
186
|
-
document.documentElement.classList.remove(d.trim());
|
|
187
|
-
}));
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
get consumerElement() {
|
|
191
|
-
return t(this, r);
|
|
192
|
-
}
|
|
193
|
-
get consumerHolderElement() {
|
|
194
|
-
return t(this, I);
|
|
195
|
-
}
|
|
196
|
-
get sourceManager() {
|
|
197
|
-
return t(this, f);
|
|
198
|
-
}
|
|
199
|
-
get status() {
|
|
200
|
-
return t(this, c);
|
|
201
|
-
}
|
|
202
|
-
get isLazy() {
|
|
203
|
-
return t(this, g);
|
|
204
|
-
}
|
|
205
|
-
get currentURL() {
|
|
206
|
-
return t(this, M);
|
|
207
|
-
}
|
|
208
|
-
get isFirstLoadHappened() {
|
|
209
|
-
return t(this, E);
|
|
210
|
-
}
|
|
211
|
-
triggerLazyLoad() {
|
|
212
|
-
!t(this, b) && t(this, f).current && t(this, f).current !== t(this, f).previous && (s(this, b, !0), j(this, T, _).call(this, t(this, f).current));
|
|
213
|
-
}
|
|
214
|
-
connectedCallback() {
|
|
215
|
-
s(this, B, `source-consumer-${++ct}`);
|
|
216
|
-
const e = this.getAttribute("srcset") || "", h = this.hasAttribute("notify") ? this.closest(this.getAttribute("notify")) : null;
|
|
217
|
-
h && t(this, c).addElement(h), s(this, I, this.querySelector("[data-consumer-holder]") || this), this.querySelectorAll(".source-consumer").forEach((n) => n == null ? void 0 : n.remove()), s(this, r, this.createConsumer()), t(this, r).style.cssText = `
|
|
218
|
-
display: block;
|
|
219
|
-
width: 100%;
|
|
220
|
-
height: 100%;
|
|
221
|
-
`, t(this, r).classList.add("source-consumer"), t(this, r).addEventListener("play", t(this, H)), t(this, r).addEventListener("pause", t(this, N)), t(this, r).addEventListener(
|
|
222
|
-
"loadedmetadata",
|
|
223
|
-
t(this, C)
|
|
224
|
-
), t(this, C).call(this), Array.from(this.attributes).forEach((n) => {
|
|
225
|
-
if (n.name !== "srcset") {
|
|
226
|
-
const o = n.nodeValue || "", d = Y(n.name);
|
|
227
|
-
d in t(this, r) && (t(this, r)[d] = o || !0);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
for (const n in this.dataset) {
|
|
231
|
-
const o = this.dataset[n], d = Y(n);
|
|
232
|
-
d in t(this, r) && (t(this, r)[d] = o ? o === "false" ? !1 : o : !0);
|
|
233
|
-
}
|
|
234
|
-
t(this, I).appendChild(t(this, r)), s(this, f, new ot({
|
|
235
|
-
srcset: e,
|
|
236
|
-
sourceSetOptions: t(this, P)
|
|
237
|
-
})), s(this, g, this.hasAttribute("lazy")), t(this, f).subscribe((n) => {
|
|
238
|
-
(!t(this, g) || t(this, g) && t(this, b)) && j(this, T, _).call(this, n.current);
|
|
239
|
-
}), t(this, f).connect(), t(this, O).observe(this);
|
|
240
|
-
}
|
|
241
|
-
disconnectedCallback() {
|
|
242
|
-
var e;
|
|
243
|
-
clearTimeout(t(this, R)), t(this, O).disconnect(), (e = t(this, f)) == null || e.close(), t(this, r) && (this.consumeSource(null), t(this, r).removeEventListener("play", t(this, H)), t(this, r).removeEventListener("pause", t(this, N)), t(this, r).removeEventListener(
|
|
244
|
-
"loadedmetadata",
|
|
245
|
-
t(this, C)
|
|
246
|
-
), t(this, r).onloadeddata = null, t(this, r).onload = null, t(this, r).onerror = null, t(this, r).onerror = null, t(this, r).remove()), s(this, E, !1), s(this, b, !1), t(this, c).reset();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
f = new WeakMap(), r = new WeakMap(), I = new WeakMap(), E = new WeakMap(), b = new WeakMap(), g = new WeakMap(), B = new WeakMap(), A = new WeakMap(), c = new WeakMap(), O = new WeakMap(), R = new WeakMap(), M = new WeakMap(), P = new WeakMap(), T = new WeakSet(), _ = function(e) {
|
|
250
|
-
if (clearTimeout(t(this, R)), t(this, r).onloadeddata = null, t(this, r).onload = null, t(this, r).onerror = null, t(this, c).set("loaded", !1), t(this, c).set("error", !1), t(this, c).set("loading", !1), t(this, c).set("clear", !1), t(this, c).set("playing", !1), t(this, c).set("metadata", !1), e) {
|
|
251
|
-
s(this, A, `${t(this, B)}-${e.url}`);
|
|
252
|
-
const h = this.hasAttribute("keep-source-parameters");
|
|
253
|
-
t(this, c).set("loading", !0), s(this, M, h ? e.url : e.name + e.extension), this.consumeSource(t(this, M)), !t(this, g) && !t(this, E) && J.add(t(this, A)), t(this, r).onloadeddata = () => {
|
|
254
|
-
t(this, D).call(this);
|
|
255
|
-
}, t(this, r).onload = () => {
|
|
256
|
-
t(this, D).call(this);
|
|
257
|
-
}, t(this, r).onerror = () => {
|
|
258
|
-
t(this, K).call(this, t(this, M));
|
|
259
|
-
};
|
|
260
|
-
} else
|
|
261
|
-
s(this, M, null), this.consumeSource(null);
|
|
262
|
-
}, G = new WeakMap(), D = new WeakMap(), K = new WeakMap(), H = new WeakMap(), N = new WeakMap(), C = new WeakMap();
|
|
263
|
-
export {
|
|
264
|
-
nt as S,
|
|
265
|
-
Lt as a,
|
|
266
|
-
et as b,
|
|
267
|
-
ot as c
|
|
268
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";var Y=l=>{throw TypeError(l)};var Z=(l,n,e)=>n.has(l)||Y("Cannot "+e);var t=(l,n,e)=>(Z(l,n,"read from private field"),e?e.call(l):n.get(l)),i=(l,n,e)=>n.has(l)?Y("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(l):n.set(l,e),s=(l,n,e,h)=>(Z(l,n,"write to private field"),h?h.call(l,e):n.set(l,e),e),F=(l,n,e)=>(Z(l,n,"access private method"),e);const rt=require("./element-linked-store/index.cjs"),J=require("./loading/index.cjs"),nt=require("./index-CKTweR3M.cjs"),w=require("./events-KVanG9sR.cjs"),tt=require("./string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");const at=require("./order/index.cjs"),et=require("./window-resizer/index.cjs"),ht=require("./Store-1JrMCgdX.cjs");var z,b,V,S,m,p,M;class st{constructor(n){i(this,z);i(this,b);i(this,V);i(this,S);i(this,m);i(this,p);i(this,M);s(this,z,n);let e=n.split(".");const h=/\b\d{1,2}x\b/g,a=e.find(y=>y.match(h)&&parseInt(y));s(this,V,a?parseInt(a):1),a&&(e=e.slice(0,-1)),s(this,b,e.length>1?e.slice(0,-1).join("."):e.join("."));const o=/\d+max/g,d=/\d+min/g,N=/\d+mar/g,U=/\d+mir/g,W=e.find(y=>y.match(o)),u=e.find(y=>y.match(d)),x=e.find(y=>y.match(N)),X=e.find(y=>y.match(U));x?(s(this,m,parseInt(x)),s(this,p,"max"),s(this,S,`(max-aspect-ratio: ${t(this,m)})`)):X?(s(this,m,parseInt(X)),s(this,p,"max"),s(this,S,`(min-aspect-ratio: ${t(this,m)})`)):W?(s(this,m,parseInt(W)),s(this,p,"max"),s(this,S,`(max-width: ${t(this,m)}px)`)):u?(s(this,m,parseInt(u)),s(this,S,`(min-width: ${t(this,m)}px)`),s(this,p,"min")):(s(this,m,0),s(this,S,`(min-width: ${t(this,m)}px)`),s(this,p,"min")),s(this,b,t(this,b).replace(`.${t(this,m)}${t(this,p)}`,"")),s(this,M,e[e.length-1]===t(this,b)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,m)}${t(this,p)}`,""))}get url(){return t(this,z)}get name(){return t(this,b)}get density(){return t(this,V)}get query(){return t(this,S)}get extension(){return t(this,M)}get queryType(){return t(this,p)}get queryValue(){return t(this,m)}}z=new WeakMap,b=new WeakMap,V=new WeakMap,S=new WeakMap,m=new WeakMap,p=new WeakMap,M=new WeakMap;function ot(l){if(isNaN(l))return"0:00";const n=Math.floor(Math.max(0,l)),e=Math.floor(n/3600),h=Math.floor(n%3600/60),o=(n%60).toString().padStart(2,"0");if(e>0){const d=h.toString().padStart(2,"0");return`${e}:${d}:${o}`}else return`${h}:${o}`}var q;class Q{constructor(n,e){i(this,q);s(this,q,new Map);const h=(e==null?void 0:e.mediaBuckets)!==!1,a=typeof n=="string"?h?n.trim().split(",").map(u=>u.trim()).filter(u=>!!u):[n]:n,o=[];a.forEach(u=>{const x=new st(u);o.push([x.query,x])});const d=o.filter(u=>u[1].queryType.includes("max")).sort((u,x)=>x[1].queryValue-u[1].queryValue),N=o.filter(u=>u[1].queryType.includes("min")&&u[1].queryValue!==0).sort((u,x)=>u[1].queryValue-x[1].queryValue),U=o.filter(u=>u[0]==="(min-width: 0px)");(U?[...U,...d,...N]:[...d,...N]).forEach(u=>{t(this,q).has(u[0])||t(this,q).set(u[0],[]),t(this,q).get(u[0]).push(u[1])})}get mediaBuckets(){return t(this,q)}}q=new WeakMap;var k,$;class it extends ht.Store{constructor(e){super(void 0);i(this,k);i(this,$,()=>{let e;t(this,k).mediaBuckets.forEach((o,d)=>{matchMedia(d).matches&&(e=o)});let h,a=0;e==null||e.forEach(o=>{o.density>a&&o.density<=Math.max(devicePixelRatio,1)&&(a=o.density,h=o)}),e!=null&&e.length&&!h&&(h=e[0]),this.current=h});s(this,k,new Q(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,k,new Q(e.srcset,e.sourceSetOptions)),t(this,$).call(this)}close(){super.close(),this.disconnect()}connect(){et.windowResizer.subscribe(t(this,$),at.RESIZE_ORDER.SOURCE_MANAGER),t(this,$).call(this)}disconnect(){et.windowResizer.unsubscribe(t(this,$))}}k=new WeakMap,$=new WeakMap;let ct=0;var f,r,I,E,L,g,B,A,c,R,O,v,P,T,j,G,_,K,D,H,C;class lt extends HTMLElement{constructor(e){super();i(this,T);i(this,f,null);i(this,r,null);i(this,I,this);i(this,E,!1);i(this,L,!1);i(this,g,!1);i(this,B,"");i(this,A,"");i(this,c,new rt.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));i(this,R,null);i(this,O);i(this,v,null);i(this,P);i(this,G,e=>{const h=e[0];t(this,g)&&(!t(this,L)||this.hasAttribute("reload-source"))&&h.isIntersecting&&this.triggerLazyLoad(),h.isIntersecting?w.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(F(this,T,j).call(this,void 0),s(this,L,!1)),w.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,_,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.complete(t(this,A)),w.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,O,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,E,!0)});i(this,K,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.error(t(this,A)),w.dispatchEvent(this,"sourceError",{custom:!0}),s(this,E,!0)});i(this,D,()=>{t(this,c).set("playing",!0),w.dispatchEvent(this,"sourcePlay",{custom:!0})});i(this,H,()=>{t(this,c).set("playing",!1),w.dispatchEvent(this,"sourcePause",{custom:!0})});i(this,C,()=>{const e=t(this,r);(e.tagName==="VIDEO"||e.tagName==="AUDIO")&&e.readyState>=1&&(t(this,c).set("metadata",!0),w.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(h=>{h.textContent=ot(e.duration)}))});s(this,P,e==null?void 0:e.sourceSetOptions),nt.isBrowser&&window.IntersectionObserver&&s(this,R,new IntersectionObserver(t(this,G))),t(this,c).subscribe(h=>{var o;const a=(o=this.getAttribute("data-global-play-class"))==null?void 0:o.split(",");a!=null&&a.length&&(h.current.playing?a.forEach(d=>{document.documentElement.classList.add(d.trim())}):a.forEach(d=>{document.documentElement.classList.remove(d.trim())}))})}get consumerElement(){return t(this,r)}get consumerHolderElement(){return t(this,I)}get sourceManager(){return t(this,f)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,v)}get isFirstLoadHappened(){return t(this,E)}triggerLazyLoad(){!t(this,L)&&t(this,f).current&&t(this,f).current!==t(this,f).previous&&(s(this,L,!0),F(this,T,j).call(this,t(this,f).current))}connectedCallback(){s(this,B,`source-consumer-${++ct}`);const e=this.getAttribute("srcset")||"",h=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;h&&t(this,c).addElement(h),s(this,I,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(a=>a==null?void 0:a.remove()),s(this,r,this.createConsumer()),t(this,r).style.cssText=`
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
`,t(this,r).classList.add("source-consumer"),t(this,r).addEventListener("play",t(this,D)),t(this,r).addEventListener("pause",t(this,H)),t(this,r).addEventListener("loadedmetadata",t(this,C)),t(this,C).call(this),Array.from(this.attributes).forEach(a=>{if(a.name!=="srcset"){const o=a.nodeValue||"",d=tt.kebabToCamel(a.name);d in t(this,r)&&(t(this,r)[d]=o||!0)}});for(const a in this.dataset){const o=this.dataset[a],d=tt.kebabToCamel(a);d in t(this,r)&&(t(this,r)[d]=o?o==="false"?!1:o:!0)}t(this,I).appendChild(t(this,r)),s(this,f,new it({srcset:e,sourceSetOptions:t(this,P)})),s(this,g,this.hasAttribute("lazy")),t(this,f).subscribe(a=>{(!t(this,g)||t(this,g)&&t(this,L))&&F(this,T,j).call(this,a.current)}),t(this,f).connect(),t(this,R).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,O)),t(this,R).disconnect(),(e=t(this,f))==null||e.close(),t(this,r)&&(this.consumeSource(null),t(this,r).removeEventListener("play",t(this,D)),t(this,r).removeEventListener("pause",t(this,H)),t(this,r).removeEventListener("loadedmetadata",t(this,C)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,r).onerror=null,t(this,r).remove()),s(this,E,!1),s(this,L,!1),t(this,c).reset()}}f=new WeakMap,r=new WeakMap,I=new WeakMap,E=new WeakMap,L=new WeakMap,g=new WeakMap,B=new WeakMap,A=new WeakMap,c=new WeakMap,R=new WeakMap,O=new WeakMap,v=new WeakMap,P=new WeakMap,T=new WeakSet,j=function(e){if(clearTimeout(t(this,O)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),t(this,c).set("playing",!1),t(this,c).set("metadata",!1),e){s(this,A,`${t(this,B)}-${e.url}`);const h=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,v,h?e.url:e.name+e.extension),this.consumeSource(t(this,v)),!t(this,g)&&!t(this,E)&&J.loading.add(t(this,A)),t(this,r).onloadeddata=()=>{t(this,_).call(this)},t(this,r).onload=()=>{t(this,_).call(this)},t(this,r).onerror=()=>{t(this,K).call(this,t(this,v))}}else s(this,v,null),this.consumeSource(null)},G=new WeakMap,_=new WeakMap,K=new WeakMap,D=new WeakMap,H=new WeakMap,C=new WeakMap;exports.Source=st;exports.SourceElement=lt;exports.SourceManager=it;exports.SourceSet=Q;
|
package/lib/object-CCiXnER2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function f(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=f(e[r]));return t}function c(e,t,r=s){for(const n in t)r(t[n])?(e[n]||Object.assign(e,{[n]:{}}),c(e[n],t[n],r)):Object.assign(e,{[n]:t[n]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(r=>u(r)))return e===t;if(Array.isArray(e)){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;return r.every((p,y)=>i(p,n[y]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const r in e){if(!t.hasOwnProperty(r))return!1;if(typeof e[r]=="object"&&typeof t[r]=="object"){if(!i(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1}return!0}function l(e,t){const r={};for(const n in e)t.includes(n)&&(r[n]=e[n]);return r}function o(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function a(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(r.prototype,n)||Object.create(null))})})}exports.cloneDeep=f;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=c;exports.mixin=O;exports.omit=o;exports.pick=l;
|
package/lib/router/Link.d.ts
DELETED
package/lib/url-BRY7C6vT.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,g=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var p=(t,s,e)=>s in t?$(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,P=(t,s)=>{for(var e in s||(s={}))L.call(s,e)&&p(t,e,s[e]);if(S)for(var e of S(s))R.call(s,e)&&p(t,e,s[e]);return t},W=(t,s)=>g(t,w(s));function U(t,{base:s="",trailingSlash:e=!1,mergeParams:n,removeParams:r}={}){s=s.endsWith("/")?s.slice(0,-1):s,t=t.replace(s,""),t.startsWith("/")&&(t=t.slice(1));const h=t.split("#"),f=h[0].split("?");let a=f[0].startsWith("/")?f[0]:"/"+f[0];e?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let i=f[1]||"";if(n){const c=new URLSearchParams(i),y=new URLSearchParams(n);for(const[o,d]of y)c.has(o)||c.set(o,d);r==null||r.split(",").forEach(o=>{c.has(o)&&c.delete(o)}),i=c.toString()}const u=s+a,l=h[1],m=`${u}${i?"?"+i:""}${l?"#"+l:""}`;return{leaf:a,pathname:u,parameters:i,hash:l,path:m}}function k(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function z(t){if(t.action==="none")return;const s=t==null?void 0:t.searchParameters,e=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",n=s?s.startsWith("?")?s:"?"+s:"",r=`${t.pathname}${n}${e}`,h=W(P({},t.state),{path:r});t.action==="push"?history.pushState(h,"",r):t.action==="replace"&&history.replaceState(h,"",r)}function B(t){const s=new URLSearchParams(t),e={};for(const[n,r]of s)e[n]=r;return e}function H(t,s){const e=new URL(location.href),n=(s==null?void 0:s.toString())||"";e.searchParams.set(t,n),history.replaceState(history.state,"",e.href)}exports.changeHistory=z;exports.normalizeBase=k;exports.parseSearchParameters=B;exports.splitPath=U;exports.updateSearchParameter=H;
|
package/lib/url-DQgGZl_e.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
-
var w = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var p = Object.getOwnPropertySymbols;
|
|
4
|
-
var L = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var S = (t, s, n) => s in t ? m(t, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[s] = n, W = (t, s) => {
|
|
6
|
-
for (var n in s || (s = {}))
|
|
7
|
-
L.call(s, n) && S(t, n, s[n]);
|
|
8
|
-
if (p)
|
|
9
|
-
for (var n of p(s))
|
|
10
|
-
R.call(s, n) && S(t, n, s[n]);
|
|
11
|
-
return t;
|
|
12
|
-
}, y = (t, s) => g(t, w(s));
|
|
13
|
-
function x(t, {
|
|
14
|
-
base: s = "",
|
|
15
|
-
trailingSlash: n = !1,
|
|
16
|
-
mergeParams: r,
|
|
17
|
-
removeParams: e
|
|
18
|
-
} = {}) {
|
|
19
|
-
s = s.endsWith("/") ? s.slice(0, -1) : s, t = t.replace(s, ""), t.startsWith("/") && (t = t.slice(1));
|
|
20
|
-
const h = t.split("#"), f = h[0].split("?");
|
|
21
|
-
let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
|
|
22
|
-
n ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
|
|
23
|
-
let i = f[1] || "";
|
|
24
|
-
if (r) {
|
|
25
|
-
const c = new URLSearchParams(i), d = new URLSearchParams(r);
|
|
26
|
-
for (const [o, $] of d)
|
|
27
|
-
c.has(o) || c.set(o, $);
|
|
28
|
-
e == null || e.split(",").forEach((o) => {
|
|
29
|
-
c.has(o) && c.delete(o);
|
|
30
|
-
}), i = c.toString();
|
|
31
|
-
}
|
|
32
|
-
const u = s + a, l = h[1], P = `${u}${i ? "?" + i : ""}${l ? "#" + l : ""}`;
|
|
33
|
-
return {
|
|
34
|
-
leaf: a,
|
|
35
|
-
pathname: u,
|
|
36
|
-
parameters: i,
|
|
37
|
-
hash: l,
|
|
38
|
-
path: P
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function j(t = "/") {
|
|
42
|
-
return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
|
|
43
|
-
}
|
|
44
|
-
function z(t) {
|
|
45
|
-
if (t.action === "none")
|
|
46
|
-
return;
|
|
47
|
-
const s = t == null ? void 0 : t.searchParameters, n = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", r = s ? s.startsWith("?") ? s : "?" + s : "", e = `${t.pathname}${r}${n}`, h = y(W({}, t.state), { path: e });
|
|
48
|
-
t.action === "push" ? history.pushState(h, "", e) : t.action === "replace" && history.replaceState(h, "", e);
|
|
49
|
-
}
|
|
50
|
-
function B(t) {
|
|
51
|
-
const s = new URLSearchParams(t), n = {};
|
|
52
|
-
for (const [r, e] of s)
|
|
53
|
-
n[r] = e;
|
|
54
|
-
return n;
|
|
55
|
-
}
|
|
56
|
-
function E(t, s) {
|
|
57
|
-
const n = new URL(location.href), r = (s == null ? void 0 : s.toString()) || "";
|
|
58
|
-
n.searchParams.set(t, r), history.replaceState(history.state, "", n.href);
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
z as c,
|
|
62
|
-
j as n,
|
|
63
|
-
B as p,
|
|
64
|
-
x as s,
|
|
65
|
-
E as u
|
|
66
|
-
};
|