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.
Files changed (60) hide show
  1. package/lib/{Animation-w6BLTCum.js → Animation-CuR3fbKl.js} +3 -4
  2. package/lib/Animation-Dt4Kc5VA.cjs +1 -0
  3. package/lib/Damped-C236fv4v.cjs +1 -0
  4. package/lib/{Damped-DEHDEq-b.js → Damped-OSAezqOR.js} +16 -17
  5. package/lib/Tweened-B7zGiekd.cjs +1 -0
  6. package/lib/Tweened-DfDr-AYv.js +43 -0
  7. package/lib/animation/index.cjs +1 -1
  8. package/lib/animation/index.js +3 -3
  9. package/lib/controls/index.cjs +1 -1
  10. package/lib/controls/index.js +2 -2
  11. package/lib/need_redo_tweaker/index.cjs +3 -3
  12. package/lib/need_redo_tweaker/index.js +1 -2
  13. package/lib/pointer/index.cjs +1 -1
  14. package/lib/pointer/index.js +2 -2
  15. package/lib/polyfills-AItxku8u.js +76 -0
  16. package/lib/polyfills-Caa6z-Ay.cjs +1 -0
  17. package/lib/source/index.cjs +1 -5
  18. package/lib/source/index.d.ts +0 -1
  19. package/lib/source/index.js +67 -152
  20. package/lib/utils/index.cjs +1 -1
  21. package/lib/utils/index.js +168 -127
  22. package/package.json +1 -41
  23. package/lib/Animation-DI864E0i.cjs +0 -1
  24. package/lib/Damped-ipnDc0iX.cjs +0 -1
  25. package/lib/Tweened-B1TfANfR.cjs +0 -1
  26. package/lib/Tweened-C52xXDLY.js +0 -44
  27. package/lib/canvas/index.cjs +0 -1
  28. package/lib/canvas/index.d.ts +0 -34
  29. package/lib/canvas/index.js +0 -108
  30. package/lib/canvas-CU5Xjahf.cjs +0 -1
  31. package/lib/canvas-DeZ0SLUJ.js +0 -34
  32. package/lib/image/index.cjs +0 -1
  33. package/lib/image/index.d.ts +0 -10
  34. package/lib/image/index.js +0 -15
  35. package/lib/jss-CjccJC-K.js +0 -21
  36. package/lib/jss-GJLvaNfT.cjs +0 -1
  37. package/lib/math-BOBiC4TN.js +0 -45
  38. package/lib/math-GDWEqu7y.cjs +0 -1
  39. package/lib/polyfills-CM4SCDTt.cjs +0 -1
  40. package/lib/polyfills-X6KXuHg-.js +0 -33
  41. package/lib/scroll/ScrollBulletButtonsElement.d.ts +0 -11
  42. package/lib/scroll/ScrollButtonElement.d.ts +0 -5
  43. package/lib/scroll/ScrollElement.d.ts +0 -81
  44. package/lib/scroll/ScrollSection.d.ts +0 -22
  45. package/lib/scroll/ScrollSegmentElement.d.ts +0 -62
  46. package/lib/scroll/ScrollSetButtonElement.d.ts +0 -9
  47. package/lib/scroll/ScrollStepButtonElement.d.ts +0 -9
  48. package/lib/scroll/ScrollUserElement.d.ts +0 -6
  49. package/lib/scroll/ScrollbarElement.d.ts +0 -13
  50. package/lib/scroll/index.cjs +0 -1
  51. package/lib/scroll/index.d.ts +0 -6
  52. package/lib/scroll/index.js +0 -1098
  53. package/lib/sequence/index.cjs +0 -1
  54. package/lib/sequence/index.d.ts +0 -20
  55. package/lib/sequence/index.js +0 -158
  56. package/lib/source/SourceElement.d.ts +0 -24
  57. package/lib/test/starting-style/index.d.ts +0 -1
  58. package/lib/video/index.cjs +0 -1
  59. package/lib/video/index.d.ts +0 -21
  60. package/lib/video/index.js +0 -55
@@ -1,5 +1 @@
1
- "use strict";var G=o=>{throw TypeError(o)};var $=(o,r,e)=>r.has(o)||G("Cannot "+e);var t=(o,r,e)=>($(o,r,"read from private field"),e?e.call(o):r.get(o)),a=(o,r,e)=>r.has(o)?G("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),i=(o,r,e,s)=>($(o,r,"write to private field"),s?s.call(o,e):r.set(o,e),e),V=(o,r,e)=>($(o,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../order/index.cjs"),K=require("../window-resizer/index.cjs"),J=require("../Store-CDb6RMce.cjs"),B=require("../loading/index.cjs"),W=require("../class-linked-status/index.cjs"),X=require("../browser-CpzFX2xg.cjs"),Y=require("../string-DhgS_iFl.cjs");var R,k,C,g,l,x,v;class N{constructor(r){a(this,R);a(this,k);a(this,C);a(this,g);a(this,l);a(this,x);a(this,v);i(this,R,r);const e=r.indexOf("?");e>=0&&(r=r.slice(0,e));const s=r.split(".");i(this,k,s[0]);const d=/\d+x/g,c=s.find(p=>p.match(d));i(this,C,c?parseInt(c):1);const E=/\d+max/g,P=/\d+min/g,n=/\d+mar/g,y=/\d+mir/g,H=s.find(p=>p.match(E)),D=s.find(p=>p.match(P)),j=s.find(p=>p.match(n)),F=s.find(p=>p.match(y));j?(i(this,l,parseInt(j)),i(this,x,"max"),i(this,g,`(max-aspect-ratio: ${t(this,l)})`)):F?(i(this,l,parseInt(F)),i(this,x,"max"),i(this,g,`(min-aspect-ratio: ${t(this,l)})`)):H?(i(this,l,parseInt(H)),i(this,x,"max"),i(this,g,`(max-width: ${t(this,l)}px)`)):D?(i(this,l,parseInt(D)),i(this,g,`(min-width: ${t(this,l)}px)`),i(this,x,"min")):(i(this,l,0),i(this,g,`(min-width: ${t(this,l)}px)`),i(this,x,"min")),i(this,v,"."+s[s.length-1])}get url(){return t(this,R)}get name(){return t(this,k)}get density(){return t(this,C)}get query(){return t(this,g)}get extension(){return t(this,v)}get queryType(){return t(this,x)}get queryValue(){return t(this,l)}}R=new WeakMap,k=new WeakMap,C=new WeakMap,g=new WeakMap,l=new WeakMap,x=new WeakMap,v=new WeakMap;var b;class Q{constructor(r){a(this,b);i(this,b,new Map);const e=typeof r=="string"?r.trim().split(",").map(n=>n.trim()).filter(n=>!!n):r,s=[];e.forEach(n=>{const y=new N(n);s.push([y.query,y])});const d=s.filter(n=>n[1].queryType.includes("max")).sort((n,y)=>y[1].queryValue-n[1].queryValue),c=s.filter(n=>n[1].queryType.includes("min")&&n[1].queryValue!==0).sort((n,y)=>n[1].queryValue-y[1].queryValue),E=s.filter(n=>n[0]==="(min-width: 0px)");(E?[...E,...d,...c]:[...d,...c]).forEach(n=>{t(this,b).has(n[0])||t(this,b).set(n[0],[]),t(this,b).get(n[0]).push(n[1])})}get mediaBuckets(){return t(this,b)}}b=new WeakMap;var A,I;class U extends J.Store{constructor(e){super(void 0);a(this,A);a(this,I,()=>{let e;t(this,A).mediaBuckets.forEach((c,E)=>{matchMedia(E).matches&&(e=c)});let s,d=0;e==null||e.forEach(c=>{c.density>d&&c.density<=Math.max(devicePixelRatio,1)&&(d=c.density,s=c)}),e!=null&&e.length&&!s&&(s=e[0]),this.current=s});i(this,A,new Q(e.srcset))}close(){super.close(),this.disconnect()}connect(){K.windowResizer.subscribe(t(this,I),Z.RESIZE_ORDER.SOURCE_MANAGER)}disconnect(){K.windowResizer.unsubscribe(t(this,I))}}A=new WeakMap,I=new WeakMap;let tt=0;var m,h,q,S,f,w,u,M,L,z,O,T,_;class et extends HTMLElement{constructor(){super();a(this,L);a(this,m,null);a(this,h,null);a(this,q,!1);a(this,S,!1);a(this,f,!1);a(this,w,"");a(this,u,new W.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,M,null);a(this,O,e=>{const s=e[0];t(this,f)&&(!t(this,S)||this.hasAttribute("reload-source"))&&s.isIntersecting&&(t(this,m).current&&t(this,m).current!==t(this,m).previous&&V(this,L,z).call(this,t(this,m).current),i(this,S,!0)),s.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):(this.hasAttribute("reload-source")&&V(this,L,z).call(this,void 0),this.dispatchEvent(new CustomEvent("sourceRelease")))});a(this,T,()=>{t(this,u).set("loaded",!0),t(this,u).set("error",!1),t(this,u).set("loading",!1),!t(this,f)&&!t(this,q)&&B.loading.setLoaded(t(this,w),1),i(this,q,!0)});a(this,_,e=>{t(this,u).set("loaded",!1),t(this,u).set("error",!0),t(this,u).set("loading",!1),!t(this,f)&&!t(this,q)&&B.loading.setError(t(this,w),e),i(this,q,!0)});X.isBrowser&&(i(this,w,`source-consumer-${++tt}`),i(this,M,new IntersectionObserver(t(this,O))))}get consumerElement(){return t(this,h)}get sourceManager(){return t(this,m)}get status(){return t(this,u)}get isLazy(){return t(this,f)}connectedCallback(){const e=this.getAttribute("srcset");e&&(i(this,h,this.createConsumer()),t(this,h).style.cssText=`
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;
@@ -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';
@@ -1,189 +1,104 @@
1
- var K = (h) => {
2
- throw TypeError(h);
1
+ var k = (a) => {
2
+ throw TypeError(a);
3
3
  };
4
- var O = (h, r, e) => r.has(h) || K("Cannot " + e);
5
- var t = (h, r, e) => (O(h, r, "read from private field"), e ? e.call(h) : r.get(h)), a = (h, r, e) => r.has(h) ? K("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, s) => (O(h, r, "write to private field"), s ? s.call(h, e) : r.set(h, e), e), V = (h, r, e) => (O(h, r, "access private method"), e);
6
- import { RESIZE_ORDER as Q } from "../order/index.js";
7
- import { windowResizer as N } from "../window-resizer/index.js";
8
- import { S as U } from "../Store-OTdcl6SX.js";
9
- import { loading as P } from "../loading/index.js";
10
- import { ClassLinkedStatus as Z } from "../class-linked-status/index.js";
11
- import { i as j } from "../browser-0zX67oeU.js";
12
- import { k as J } from "../string-f0Dnk0L1.js";
13
- var M, A, I, g, u, y, R;
14
- class W {
15
- constructor(r) {
16
- a(this, M);
17
- a(this, A);
18
- a(this, I);
19
- a(this, g);
20
- a(this, u);
21
- a(this, y);
22
- a(this, R);
23
- i(this, M, r);
24
- const e = r.indexOf("?");
25
- e >= 0 && (r = r.slice(0, e));
26
- const s = r.split(".");
27
- i(this, A, s[0]);
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 t(this, M);
30
+ return r(this, y);
35
31
  }
36
32
  get name() {
37
- return t(this, A);
33
+ return r(this, g);
38
34
  }
39
35
  get density() {
40
- return t(this, I);
36
+ return r(this, q);
41
37
  }
42
38
  get query() {
43
- return t(this, g);
39
+ return r(this, u);
44
40
  }
45
41
  get extension() {
46
- return t(this, R);
42
+ return r(this, w);
47
43
  }
48
44
  get queryType() {
49
- return t(this, y);
45
+ return r(this, d);
50
46
  }
51
47
  get queryValue() {
52
- return t(this, u);
48
+ return r(this, c);
53
49
  }
54
50
  }
55
- M = new WeakMap(), A = new WeakMap(), I = new WeakMap(), g = new WeakMap(), u = new WeakMap(), y = new WeakMap(), R = new WeakMap();
56
- var b;
57
- class X {
58
- constructor(r) {
59
- a(this, b);
60
- i(this, b, /* @__PURE__ */ new Map());
61
- const e = typeof r == "string" ? r.trim().split(",").map((n) => n.trim()).filter((n) => !!n) : r, s = [];
62
- e.forEach((n) => {
63
- const x = new W(n);
64
- s.push([x.query, x]);
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 d = s.filter((n) => n[1].queryType.includes("max")).sort((n, x) => x[1].queryValue - n[1].queryValue), c = s.filter((n) => n[1].queryType.includes("min") && n[1].queryValue !== 0).sort((n, x) => n[1].queryValue - x[1].queryValue), q = s.filter((n) => n[0] === "(min-width: 0px)");
67
- (q ? [...q, ...d, ...c] : [...d, ...c]).forEach((n) => {
68
- t(this, b).has(n[0]) || t(this, b).set(n[0], []), t(this, b).get(n[0]).push(n[1]);
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 t(this, b);
68
+ return r(this, l);
73
69
  }
74
70
  }
75
- b = new WeakMap();
76
- var S, v;
77
- class Y extends U {
78
- constructor(e) {
71
+ l = new WeakMap();
72
+ var E, R;
73
+ class G extends T {
74
+ constructor(t) {
79
75
  super(void 0);
80
- a(this, S);
81
- a(this, v, () => {
82
- let e;
83
- t(this, S).mediaBuckets.forEach((c, q) => {
84
- matchMedia(q).matches && (e = c);
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 s, d = 0;
87
- e == null || e.forEach((c) => {
88
- c.density > d && c.density <= Math.max(devicePixelRatio, 1) && (d = c.density, s = c);
89
- }), e != null && e.length && !s && (s = e[0]), this.current = s;
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, S, new X(e.srcset));
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
- N.subscribe(t(this, v), Q.SOURCE_MANAGER);
93
+ B.subscribe(r(this, R), S.SOURCE_MANAGER);
98
94
  }
99
95
  disconnect() {
100
- N.unsubscribe(t(this, v));
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
- m = new WeakMap(), o = new WeakMap(), E = new WeakMap(), k = new WeakMap(), f = new WeakMap(), w = new WeakMap(), l = new WeakMap(), C = new WeakMap(), L = new WeakSet(), $ = function(e) {
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
- W as Source,
186
- ct as SourceElement,
187
- Y as SourceManager,
188
- X as SourceSet
101
+ O as Source,
102
+ G as SourceManager,
103
+ P as SourceSet
189
104
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),p=require("../canvas-CU5Xjahf.cjs"),h=require("../coordinates-D8Np3cPD.cjs"),m=require("../dom-JBOkFLTh.cjs"),o=require("../easings-DsS5-Kqc.cjs"),a=require("../object-HBC5QlzO.cjs"),S=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),g=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),c=require("../string-DhgS_iFl.cjs"),b=require("../style-At6aDoqG.cjs");function T(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function P(e,t){const n=e.length;t=t%n;const s=new Array(n);for(let i=0;i<n;i++){const r=(i+t)%n;s[r]=e[i]}return s}function w(e,t=2){if(!+e)return"0 Bytes";const n=1024,s=t<0?0:t,i=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,r)).toFixed(s))} ${i[r]}`}function x(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function B(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function y(e,t){const n=e.styleMap.get(t);if(n){const s=n.toString();return s.startsWith("var")?y(e,s.slice(4,-1)):s}}function Q(...e){const t={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&e.forEach(i=>{const r=y(s,i);r&&(t[i]=r)})})}),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 D(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function v(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function A(e,t=""){t=t.endsWith("/")?t.slice(0,-1):t,e=e.replace(t,""),e.startsWith("/")&&(e=e.slice(1));const n=e.split("#"),s=n[0].split("?"),i=s[0].startsWith("/")?s[0]:"/"+s[0],r=t+i,f=s==null?void 0:s[1],l=n==null?void 0:n[1];return{leaf:i,pathname:r,parameters:f,hash:l}}function z(e="/"){return e.endsWith("/")||(e+="/"),e.startsWith("/")||(e+="/"),e}function R(e,t,n,s){const i=n||location.search,r=s?s.startsWith("#")?s:"#"+s:"",f=i?i.startsWith("?")?i:"?"+i:"",l=`${t}${r}${f}`;e==="push"?history.pushState(null,"",l):e==="replace"&&history.replaceState(null,"",l)}exports.parseAttribute=C.parseAttribute;exports.parseAttributeValue=C.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=p.contain;exports.cover=p.cover;exports.fixPosition=p.fixPosition;exports.measureText=p.measureText;exports.getPointerPosition=h.getPointerPosition;exports.normalize=h.normalize;exports.screenToCartesian=h.screenToCartesian;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=o.easeInCubic;exports.easeInExpo=o.easeInExpo;exports.easeInOutCubic=o.easeInOutCubic;exports.easeInOutExpo=o.easeInOutExpo;exports.easeInOutQuad=o.easeInOutQuad;exports.easeInOutQuart=o.easeInOutQuart;exports.easeInOutQuint=o.easeInOutQuint;exports.easeInQuad=o.easeInQuad;exports.easeInQuart=o.easeInQuart;exports.easeInQuint=o.easeInQuint;exports.easeOutCubic=o.easeOutCubic;exports.easeOutExpo=o.easeOutExpo;exports.easeOutQuad=o.easeOutQuad;exports.easeOutQuart=o.easeOutQuart;exports.easeOutQuint=o.easeOutQuint;exports.linear=o.linear;exports.cloneDeep=a.cloneDeep;exports.compareObjects=a.compareObjects;exports.createJSONAndSave=a.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=a.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=a.dispatchSizeChangeEvent;exports.isESClass=a.isESClass;exports.isNullish=a.isNullish;exports.isObject=a.isObject;exports.mergeDeep=a.mergeDeep;exports.mixin=a.mixin;exports.omit=a.omit;exports.pick=a.pick;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=I.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=b.getElementTransitionDurationMS;exports.getElementTransitionDurationS=b.getElementTransitionDurationS;exports.changeHistory=R;exports.decode=D;exports.dotCircleCollision=B;exports.dotRectCollision=x;exports.encode=q;exports.formatBytes=w;exports.getRootVariables=Q;exports.insert=T;exports.normalizeBase=z;exports.shiftArray=P;exports.splitPath=A;exports.wait=v;
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=$;