aptechka 0.18.0 → 0.20.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-w6BLTCum.js → Animation-CuR3fbKl.js} +3 -4
- package/lib/Animation-Dt4Kc5VA.cjs +1 -0
- package/lib/Damped-C236fv4v.cjs +1 -0
- package/lib/{Damped-DEHDEq-b.js → Damped-OSAezqOR.js} +16 -17
- package/lib/Tweened-B7zGiekd.cjs +1 -0
- package/lib/Tweened-DfDr-AYv.js +43 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/polyfills-AItxku8u.js +76 -0
- package/lib/polyfills-Caa6z-Ay.cjs +1 -0
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.d.ts +0 -1
- package/lib/source/index.js +67 -152
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +168 -127
- package/package.json +1 -41
- package/lib/Animation-DI864E0i.cjs +0 -1
- package/lib/Damped-ipnDc0iX.cjs +0 -1
- package/lib/Tweened-B1TfANfR.cjs +0 -1
- package/lib/Tweened-C52xXDLY.js +0 -44
- package/lib/canvas/index.cjs +0 -1
- package/lib/canvas/index.d.ts +0 -34
- package/lib/canvas/index.js +0 -108
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/image/index.cjs +0 -1
- package/lib/image/index.d.ts +0 -10
- package/lib/image/index.js +0 -15
- package/lib/jss-CjccJC-K.js +0 -21
- package/lib/jss-GJLvaNfT.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.cjs +0 -1
- package/lib/polyfills-CM4SCDTt.cjs +0 -1
- package/lib/polyfills-X6KXuHg-.js +0 -33
- package/lib/scroll/ScrollBulletButtonsElement.d.ts +0 -11
- package/lib/scroll/ScrollButtonElement.d.ts +0 -5
- package/lib/scroll/ScrollElement.d.ts +0 -81
- package/lib/scroll/ScrollSection.d.ts +0 -22
- package/lib/scroll/ScrollSegmentElement.d.ts +0 -62
- package/lib/scroll/ScrollSetButtonElement.d.ts +0 -9
- package/lib/scroll/ScrollStepButtonElement.d.ts +0 -9
- package/lib/scroll/ScrollUserElement.d.ts +0 -6
- package/lib/scroll/ScrollbarElement.d.ts +0 -13
- package/lib/scroll/index.cjs +0 -1
- package/lib/scroll/index.d.ts +0 -6
- package/lib/scroll/index.js +0 -1098
- package/lib/sequence/index.cjs +0 -1
- package/lib/sequence/index.d.ts +0 -20
- package/lib/sequence/index.js +0 -158
- package/lib/source/SourceElement.d.ts +0 -24
- package/lib/test/starting-style/index.d.ts +0 -1
- package/lib/video/index.cjs +0 -1
- package/lib/video/index.d.ts +0 -21
- package/lib/video/index.js +0 -55
package/lib/source/index.cjs
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
`,t(this,h).classList.add("source-consumer"),Array.from(this.attributes).forEach(s=>{if(s.name!=="srcset"){const d=s.nodeValue||"",c=Y.kebabToCamel(s.name);c in t(this,h)&&(t(this,h)[c]=d||!0)}}),this.appendChild(t(this,h)),i(this,m,new U({srcset:e})),i(this,f,this.hasAttribute("lazy")),t(this,m).subscribe(s=>{(!t(this,f)||t(this,f)&&t(this,S))&&V(this,L,z).call(this,s.current)}),t(this,M).observe(this),t(this,m).connect())}disconnectedCallback(){t(this,M).disconnect(),t(this,m).close(),t(this,h).onloadeddata=null,t(this,h).onload=null,t(this,h).onerror=null,t(this,h).remove(),t(this,u).reset()}}m=new WeakMap,h=new WeakMap,q=new WeakMap,S=new WeakMap,f=new WeakMap,w=new WeakMap,u=new WeakMap,M=new WeakMap,L=new WeakSet,z=function(e){if(t(this,h).onloadeddata=null,t(this,h).onload=null,t(this,h).onerror=null,t(this,u).set("loaded",!1),t(this,u).set("error",!1),t(this,u).set("loading",!1),e){const s=this.hasAttribute("keep-source-parameters");t(this,u).set("loading",!0);const d=s?e.url:e.name+e.extension;this.consumeSource(d),!t(this,f)&&!t(this,q)&&B.loading.setTotal(t(this,w),1),t(this,h).onloadeddata=()=>{t(this,T).call(this)},t(this,h).onload=()=>{t(this,T).call(this)},t(this,h).onerror=()=>{t(this,_).call(this,d)}}else this.consumeSource(null)},O=new WeakMap,T=new WeakMap,_=new WeakMap;exports.Source=N;exports.SourceElement=et;exports.SourceManager=U;exports.SourceSet=Q;
|
|
1
|
+
"use strict";var T=c=>{throw TypeError(c)};var $=(c,e,t)=>e.has(c)||T("Cannot "+t);var r=(c,e,t)=>($(c,e,"read from private field"),t?t.call(c):e.get(c)),o=(c,e,t)=>e.has(c)?T("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(c):e.set(c,t),s=(c,e,t,n)=>($(c,e,"write to private field"),n?n.call(c,t):e.set(c,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../order/index.cjs"),k=require("../window-resizer/index.cjs"),O=require("../Store-CDb6RMce.cjs");var y,g,q,m,a,d,w;class z{constructor(e){o(this,y);o(this,g);o(this,q);o(this,m);o(this,a);o(this,d);o(this,w);s(this,y,e);const t=e.indexOf("?");t>=0&&(e=e.slice(0,t));const n=e.split(".");s(this,g,n[0]);const x=/\d+x/g,h=n.find(u=>u.match(x));s(this,q,h?parseInt(h):1);const f=/\d+max/g,S=/\d+min/g,i=/\d+mar/g,l=/\d+mir/g,E=n.find(u=>u.match(f)),I=n.find(u=>u.match(S)),V=n.find(u=>u.match(i)),b=n.find(u=>u.match(l));V?(s(this,a,parseInt(V)),s(this,d,"max"),s(this,m,`(max-aspect-ratio: ${r(this,a)})`)):b?(s(this,a,parseInt(b)),s(this,d,"max"),s(this,m,`(min-aspect-ratio: ${r(this,a)})`)):E?(s(this,a,parseInt(E)),s(this,d,"max"),s(this,m,`(max-width: ${r(this,a)}px)`)):I?(s(this,a,parseInt(I)),s(this,m,`(min-width: ${r(this,a)}px)`),s(this,d,"min")):(s(this,a,0),s(this,m,`(min-width: ${r(this,a)}px)`),s(this,d,"min")),s(this,w,"."+n[n.length-1])}get url(){return r(this,y)}get name(){return r(this,g)}get density(){return r(this,q)}get query(){return r(this,m)}get extension(){return r(this,w)}get queryType(){return r(this,d)}get queryValue(){return r(this,a)}}y=new WeakMap,g=new WeakMap,q=new WeakMap,m=new WeakMap,a=new WeakMap,d=new WeakMap,w=new WeakMap;var p;class A{constructor(e){o(this,p);s(this,p,new Map);const t=typeof e=="string"?e.trim().split(",").map(i=>i.trim()).filter(i=>!!i):e,n=[];t.forEach(i=>{const l=new z(i);n.push([l.query,l])});const x=n.filter(i=>i[1].queryType.includes("max")).sort((i,l)=>l[1].queryValue-i[1].queryValue),h=n.filter(i=>i[1].queryType.includes("min")&&i[1].queryValue!==0).sort((i,l)=>i[1].queryValue-l[1].queryValue),f=n.filter(i=>i[0]==="(min-width: 0px)");(f?[...f,...x,...h]:[...x,...h]).forEach(i=>{r(this,p).has(i[0])||r(this,p).set(i[0],[]),r(this,p).get(i[0]).push(i[1])})}get mediaBuckets(){return r(this,p)}}p=new WeakMap;var R,M;class P extends O.Store{constructor(t){super(void 0);o(this,R);o(this,M,()=>{let t;r(this,R).mediaBuckets.forEach((h,f)=>{matchMedia(f).matches&&(t=h)});let n,x=0;t==null||t.forEach(h=>{h.density>x&&h.density<=Math.max(devicePixelRatio,1)&&(x=h.density,n=h)}),t!=null&&t.length&&!n&&(n=t[0]),this.current=n});s(this,R,new A(t.srcset))}close(){super.close(),this.disconnect()}connect(){k.windowResizer.subscribe(r(this,M),B.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){k.windowResizer.unsubscribe(r(this,M))}}R=new WeakMap,M=new WeakMap;exports.Source=z;exports.SourceManager=P;exports.SourceSet=A;
|
package/lib/source/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { Source } from './SourceClass';
|
|
2
2
|
export { SourceSet, type SourceSetMediaSources, type SourceSetMediaBucket, } from './SourceSet';
|
|
3
3
|
export { SourceManager, type SourceManagerSourceSet, type SourceManagerParameters, } from './SourceManager';
|
|
4
|
-
export { SourceElement } from './SourceElement';
|
package/lib/source/index.js
CHANGED
|
@@ -1,189 +1,104 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var k = (a) => {
|
|
2
|
+
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { RESIZE_ORDER as
|
|
7
|
-
import { windowResizer as
|
|
8
|
-
import { S as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
i(this,
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const s =
|
|
27
|
-
i(this,
|
|
28
|
-
const d = /\d+x/g, c = s.find((p) => p.match(d));
|
|
29
|
-
i(this, I, c ? parseInt(c) : 1);
|
|
30
|
-
const q = /\d+max/g, H = /\d+min/g, n = /\d+mar/g, x = /\d+mir/g, D = s.find((p) => p.match(q)), _ = s.find((p) => p.match(H)), F = s.find((p) => p.match(n)), G = s.find((p) => p.match(x));
|
|
31
|
-
F ? (i(this, u, parseInt(F)), i(this, y, "max"), i(this, g, `(max-aspect-ratio: ${t(this, u)})`)) : G ? (i(this, u, parseInt(G)), i(this, y, "max"), i(this, g, `(min-aspect-ratio: ${t(this, u)})`)) : D ? (i(this, u, parseInt(D)), i(this, y, "max"), i(this, g, `(max-width: ${t(this, u)}px)`)) : _ ? (i(this, u, parseInt(_)), i(this, g, `(min-width: ${t(this, u)}px)`), i(this, y, "min")) : (i(this, u, 0), i(this, g, `(min-width: ${t(this, u)}px)`), i(this, y, "min")), i(this, R, "." + s[s.length - 1]);
|
|
4
|
+
var A = (a, e, t) => e.has(a) || k("Cannot " + t);
|
|
5
|
+
var r = (a, e, t) => (A(a, e, "read from private field"), t ? t.call(a) : e.get(a)), o = (a, e, t) => e.has(a) ? k("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), i = (a, e, t, n) => (A(a, e, "write to private field"), n ? n.call(a, t) : e.set(a, t), t);
|
|
6
|
+
import { RESIZE_ORDER as S } from "../order/index.js";
|
|
7
|
+
import { windowResizer as B } from "../window-resizer/index.js";
|
|
8
|
+
import { S as T } from "../Store-OTdcl6SX.js";
|
|
9
|
+
var y, g, q, u, c, d, w;
|
|
10
|
+
class O {
|
|
11
|
+
constructor(e) {
|
|
12
|
+
o(this, y);
|
|
13
|
+
o(this, g);
|
|
14
|
+
o(this, q);
|
|
15
|
+
o(this, u);
|
|
16
|
+
o(this, c);
|
|
17
|
+
o(this, d);
|
|
18
|
+
o(this, w);
|
|
19
|
+
i(this, y, e);
|
|
20
|
+
const t = e.indexOf("?");
|
|
21
|
+
t >= 0 && (e = e.slice(0, t));
|
|
22
|
+
const n = e.split(".");
|
|
23
|
+
i(this, g, n[0]);
|
|
24
|
+
const f = /\d+x/g, h = n.find((m) => m.match(f));
|
|
25
|
+
i(this, q, h ? parseInt(h) : 1);
|
|
26
|
+
const x = /\d+max/g, M = /\d+min/g, s = /\d+mar/g, p = /\d+mir/g, I = n.find((m) => m.match(x)), V = n.find((m) => m.match(M)), $ = n.find((m) => m.match(s)), b = n.find((m) => m.match(p));
|
|
27
|
+
$ ? (i(this, c, parseInt($)), i(this, d, "max"), i(this, u, `(max-aspect-ratio: ${r(this, c)})`)) : b ? (i(this, c, parseInt(b)), i(this, d, "max"), i(this, u, `(min-aspect-ratio: ${r(this, c)})`)) : I ? (i(this, c, parseInt(I)), i(this, d, "max"), i(this, u, `(max-width: ${r(this, c)}px)`)) : V ? (i(this, c, parseInt(V)), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")) : (i(this, c, 0), i(this, u, `(min-width: ${r(this, c)}px)`), i(this, d, "min")), i(this, w, "." + n[n.length - 1]);
|
|
32
28
|
}
|
|
33
29
|
get url() {
|
|
34
|
-
return
|
|
30
|
+
return r(this, y);
|
|
35
31
|
}
|
|
36
32
|
get name() {
|
|
37
|
-
return
|
|
33
|
+
return r(this, g);
|
|
38
34
|
}
|
|
39
35
|
get density() {
|
|
40
|
-
return
|
|
36
|
+
return r(this, q);
|
|
41
37
|
}
|
|
42
38
|
get query() {
|
|
43
|
-
return
|
|
39
|
+
return r(this, u);
|
|
44
40
|
}
|
|
45
41
|
get extension() {
|
|
46
|
-
return
|
|
42
|
+
return r(this, w);
|
|
47
43
|
}
|
|
48
44
|
get queryType() {
|
|
49
|
-
return
|
|
45
|
+
return r(this, d);
|
|
50
46
|
}
|
|
51
47
|
get queryValue() {
|
|
52
|
-
return
|
|
48
|
+
return r(this, c);
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
|
-
|
|
56
|
-
var
|
|
57
|
-
class
|
|
58
|
-
constructor(
|
|
59
|
-
|
|
60
|
-
i(this,
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
51
|
+
y = new WeakMap(), g = new WeakMap(), q = new WeakMap(), u = new WeakMap(), c = new WeakMap(), d = new WeakMap(), w = new WeakMap();
|
|
52
|
+
var l;
|
|
53
|
+
class P {
|
|
54
|
+
constructor(e) {
|
|
55
|
+
o(this, l);
|
|
56
|
+
i(this, l, /* @__PURE__ */ new Map());
|
|
57
|
+
const t = typeof e == "string" ? e.trim().split(",").map((s) => s.trim()).filter((s) => !!s) : e, n = [];
|
|
58
|
+
t.forEach((s) => {
|
|
59
|
+
const p = new O(s);
|
|
60
|
+
n.push([p.query, p]);
|
|
65
61
|
});
|
|
66
|
-
const
|
|
67
|
-
(
|
|
68
|
-
|
|
62
|
+
const f = n.filter((s) => s[1].queryType.includes("max")).sort((s, p) => p[1].queryValue - s[1].queryValue), h = n.filter((s) => s[1].queryType.includes("min") && s[1].queryValue !== 0).sort((s, p) => s[1].queryValue - p[1].queryValue), x = n.filter((s) => s[0] === "(min-width: 0px)");
|
|
63
|
+
(x ? [...x, ...f, ...h] : [...f, ...h]).forEach((s) => {
|
|
64
|
+
r(this, l).has(s[0]) || r(this, l).set(s[0], []), r(this, l).get(s[0]).push(s[1]);
|
|
69
65
|
});
|
|
70
66
|
}
|
|
71
67
|
get mediaBuckets() {
|
|
72
|
-
return
|
|
68
|
+
return r(this, l);
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
|
-
|
|
76
|
-
var
|
|
77
|
-
class
|
|
78
|
-
constructor(
|
|
71
|
+
l = new WeakMap();
|
|
72
|
+
var E, R;
|
|
73
|
+
class G extends T {
|
|
74
|
+
constructor(t) {
|
|
79
75
|
super(void 0);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
matchMedia(
|
|
76
|
+
o(this, E);
|
|
77
|
+
o(this, R, () => {
|
|
78
|
+
let t;
|
|
79
|
+
r(this, E).mediaBuckets.forEach((h, x) => {
|
|
80
|
+
matchMedia(x).matches && (t = h);
|
|
85
81
|
});
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}),
|
|
82
|
+
let n, f = 0;
|
|
83
|
+
t == null || t.forEach((h) => {
|
|
84
|
+
h.density > f && h.density <= Math.max(devicePixelRatio, 1) && (f = h.density, n = h);
|
|
85
|
+
}), t != null && t.length && !n && (n = t[0]), this.current = n;
|
|
90
86
|
});
|
|
91
|
-
i(this,
|
|
87
|
+
i(this, E, new P(t.srcset));
|
|
92
88
|
}
|
|
93
89
|
close() {
|
|
94
90
|
super.close(), this.disconnect();
|
|
95
91
|
}
|
|
96
92
|
connect() {
|
|
97
|
-
|
|
93
|
+
B.subscribe(r(this, R), S.SOURCE_MANAGER);
|
|
98
94
|
}
|
|
99
95
|
disconnect() {
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
S = new WeakMap(), v = new WeakMap();
|
|
104
|
-
let tt = 0;
|
|
105
|
-
var m, o, E, k, f, w, l, C, L, $, z, T, B;
|
|
106
|
-
class ct extends HTMLElement {
|
|
107
|
-
constructor() {
|
|
108
|
-
super();
|
|
109
|
-
a(this, L);
|
|
110
|
-
a(this, m, null);
|
|
111
|
-
a(this, o, null);
|
|
112
|
-
a(this, E, !1);
|
|
113
|
-
a(this, k, !1);
|
|
114
|
-
a(this, f, !1);
|
|
115
|
-
a(this, w, "");
|
|
116
|
-
a(this, l, new Z(this, {
|
|
117
|
-
loading: !1,
|
|
118
|
-
loaded: !1,
|
|
119
|
-
error: !1
|
|
120
|
-
}));
|
|
121
|
-
a(this, C, null);
|
|
122
|
-
a(this, z, (e) => {
|
|
123
|
-
const s = e[0];
|
|
124
|
-
t(this, f) && (!t(this, k) || this.hasAttribute("reload-source")) && s.isIntersecting && (t(this, m).current && t(this, m).current !== t(this, m).previous && V(this, L, $).call(this, t(this, m).current), i(this, k, !0)), s.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : (this.hasAttribute("reload-source") && V(this, L, $).call(this, void 0), this.dispatchEvent(new CustomEvent("sourceRelease")));
|
|
125
|
-
});
|
|
126
|
-
a(this, T, () => {
|
|
127
|
-
t(this, l).set("loaded", !0), t(this, l).set("error", !1), t(this, l).set("loading", !1), !t(this, f) && !t(this, E) && P.setLoaded(t(this, w), 1), i(this, E, !0);
|
|
128
|
-
});
|
|
129
|
-
a(this, B, (e) => {
|
|
130
|
-
t(this, l).set("loaded", !1), t(this, l).set("error", !0), t(this, l).set("loading", !1), !t(this, f) && !t(this, E) && P.setError(t(this, w), e), i(this, E, !0);
|
|
131
|
-
});
|
|
132
|
-
j && (i(this, w, `source-consumer-${++tt}`), i(this, C, new IntersectionObserver(
|
|
133
|
-
t(this, z)
|
|
134
|
-
)));
|
|
135
|
-
}
|
|
136
|
-
get consumerElement() {
|
|
137
|
-
return t(this, o);
|
|
138
|
-
}
|
|
139
|
-
get sourceManager() {
|
|
140
|
-
return t(this, m);
|
|
141
|
-
}
|
|
142
|
-
get status() {
|
|
143
|
-
return t(this, l);
|
|
144
|
-
}
|
|
145
|
-
get isLazy() {
|
|
146
|
-
return t(this, f);
|
|
147
|
-
}
|
|
148
|
-
connectedCallback() {
|
|
149
|
-
const e = this.getAttribute("srcset");
|
|
150
|
-
e && (i(this, o, this.createConsumer()), t(this, o).style.cssText = `
|
|
151
|
-
display: block;
|
|
152
|
-
width: 100%;
|
|
153
|
-
height: 100%;
|
|
154
|
-
`, t(this, o).classList.add("source-consumer"), Array.from(this.attributes).forEach((s) => {
|
|
155
|
-
if (s.name !== "srcset") {
|
|
156
|
-
const d = s.nodeValue || "", c = J(s.name);
|
|
157
|
-
c in t(this, o) && (t(this, o)[c] = d || !0);
|
|
158
|
-
}
|
|
159
|
-
}), this.appendChild(t(this, o)), i(this, m, new Y({
|
|
160
|
-
srcset: e
|
|
161
|
-
})), i(this, f, this.hasAttribute("lazy")), t(this, m).subscribe((s) => {
|
|
162
|
-
(!t(this, f) || t(this, f) && t(this, k)) && V(this, L, $).call(this, s.current);
|
|
163
|
-
}), t(this, C).observe(this), t(this, m).connect());
|
|
164
|
-
}
|
|
165
|
-
disconnectedCallback() {
|
|
166
|
-
t(this, C).disconnect(), t(this, m).close(), t(this, o).onloadeddata = null, t(this, o).onload = null, t(this, o).onerror = null, t(this, o).remove(), t(this, l).reset();
|
|
96
|
+
B.unsubscribe(r(this, R));
|
|
167
97
|
}
|
|
168
98
|
}
|
|
169
|
-
|
|
170
|
-
if (t(this, o).onloadeddata = null, t(this, o).onload = null, t(this, o).onerror = null, t(this, l).set("loaded", !1), t(this, l).set("error", !1), t(this, l).set("loading", !1), e) {
|
|
171
|
-
const s = this.hasAttribute("keep-source-parameters");
|
|
172
|
-
t(this, l).set("loading", !0);
|
|
173
|
-
const d = s ? e.url : e.name + e.extension;
|
|
174
|
-
this.consumeSource(d), !t(this, f) && !t(this, E) && P.setTotal(t(this, w), 1), t(this, o).onloadeddata = () => {
|
|
175
|
-
t(this, T).call(this);
|
|
176
|
-
}, t(this, o).onload = () => {
|
|
177
|
-
t(this, T).call(this);
|
|
178
|
-
}, t(this, o).onerror = () => {
|
|
179
|
-
t(this, B).call(this, d);
|
|
180
|
-
};
|
|
181
|
-
} else
|
|
182
|
-
this.consumeSource(null);
|
|
183
|
-
}, z = new WeakMap(), T = new WeakMap(), B = new WeakMap();
|
|
99
|
+
E = new WeakMap(), R = new WeakMap();
|
|
184
100
|
export {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
X as SourceSet
|
|
101
|
+
O as Source,
|
|
102
|
+
G as SourceManager,
|
|
103
|
+
P as SourceSet
|
|
189
104
|
};
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),C=require("../browser-CpzFX2xg.cjs"),f=require("../coordinates-D8Np3cPD.cjs"),h=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),u=require("../object-HBC5QlzO.cjs"),b=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),d=require("../string-DhgS_iFl.cjs"),g=require("../layout-8ryRAMGJ.cjs"),r=require("../polyfills-Caa6z-Ay.cjs"),O=require("../style-At6aDoqG.cjs");function w(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function x(e,t){const n=e.length;t=t%n;const i=new Array(n);for(let s=0;s<n;s++){const o=(s+t)%n;i[o]=e[s]}return i}function B(e,t=2){if(!+e)return"0 Bytes";const n=1024,i=t<0?0:t,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,o)).toFixed(i))} ${s[o]}`}function P(e,t){const n=e.measureText(t),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function T(e){return Math.floor(e)+.5}function Q(e,t,n,i,s,o){let c=e/t,m=n/i,l=0,p=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,c>m?(l=i,p=i*c):(p=n,l=n/c),[(n-p)*s,(i-l)*o,p,l]}function D(e,t,n,i,s,o){let c=e/t,m=n/i,l=0,p=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,c>m?(p=n,l=n/c):(l=i,p=i*c),[(n-p)*s,(i-l)*o,p,l]}function R(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function v(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function E(e,t){const n=e.styleMap.get(t);if(n){const i=n.toString();return i.startsWith("var")?E(e,i.slice(4,-1)):i}}function A(...e){const t={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&e.forEach(s=>{const o=E(i,s);o&&(t[s]=o)})})}),e.forEach(n=>{t[n]||console.warn(`variable named ${n} not found`)}),t}function q(e){const t=window.atob(e);return decodeURIComponent(window.escape(t))}function z(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function S(e){let t="";for(const n in e){const i=e[n];typeof i=="object"?(t+=`${n} {`,t+=S(i),t+="}"):t+=`${d.camelToKebab(n)}: ${i};`}return t}function M(e){if(C.isBrowser){const t=new CSSStyleSheet;return t.replaceSync(S(e)),t}return null}function $(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function k(e,t=""){t=t.endsWith("/")?t.slice(0,-1):t,e=e.replace(t,""),e.startsWith("/")&&(e=e.slice(1));const n=e.split("#"),i=n[0].split("?"),s=i[0].startsWith("/")?i[0]:"/"+i[0],o=t+s,c=i==null?void 0:i[1],m=n==null?void 0:n[1];return{leaf:s,pathname:o,parameters:c,hash:m}}function N(e="/"){return e.endsWith("/")||(e+="/"),e.startsWith("/")||(e+="/"),e}function j(e,t,n,i){const s=n||location.search,o=i?i.startsWith("#")?i:"#"+i:"",c=s?s.startsWith("?")?s:"?"+s:"",m=`${t}${o}${c}`;e==="push"?history.pushState(null,"",m):e==="replace"&&history.replaceState(null,"",m)}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=C.isBrowser;exports.getPointerPosition=f.getPointerPosition;exports.normalize=f.normalize;exports.screenToCartesian=f.screenToCartesian;exports.findParentElement=h.findParentElement;exports.findScrollParentElement=h.findScrollParentElement;exports.getAllParentElements=h.getAllParentElements;exports.getElement=h.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.createJSONAndSave=u.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=u.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=u.dispatchSizeChangeEvent;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.debounce=b.debounce;exports.throttle=b.throttle;exports.setupDrag=I.setupDrag;exports.camelToKebab=d.camelToKebab;exports.capitalize=d.capitalize;exports.generateId=d.generateId;exports.isUppercase=d.isUppercase;exports.kebabToCamel=d.kebabToCamel;exports.snakeToDotted=d.snakeToDotted;exports.toPascalCase=d.toPascalCase;exports.uncapitalize=d.uncapitalize;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=r.calculateDistance;exports.calculateDistanceWithRadius=r.calculateDistanceWithRadius;exports.clamp=r.clamp;exports.damp=r.damp;exports.lerp=r.lerp;exports.mapRange=r.mapRange;exports.nullishCoalescing=r.nullishCoalescing;exports.preciseNumber=r.preciseNumber;exports.round=r.round;exports.roundNumberTo=r.roundNumberTo;exports.smootherstep=r.smootherstep;exports.smoothstep=r.smoothstep;exports.step=r.step;exports.toStep=r.toStep;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=j;exports.contain=D;exports.cover=Q;exports.createStylesheet=M;exports.decode=z;exports.dotCircleCollision=v;exports.dotRectCollision=R;exports.encode=q;exports.fixPosition=T;exports.formatBytes=B;exports.getRootVariables=A;exports.insert=w;exports.measureText=P;exports.normalizeBase=N;exports.shiftArray=x;exports.splitPath=k;exports.styleToString=S;exports.wait=$;
|