aptechka 0.13.1 → 0.15.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 (113) hide show
  1. package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
  2. package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
  3. package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
  4. package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
  5. package/lib/Store-CDb6RMce.cjs +1 -0
  6. package/lib/Store-OTdcl6SX.js +134 -0
  7. package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
  8. package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
  9. package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
  10. package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +13 -13
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +36 -39
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +1 -1
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +4 -4
  23. package/lib/dev/index.cjs +1 -1
  24. package/lib/dev/index.js +1 -1
  25. package/lib/device/index.cjs +1 -1
  26. package/lib/device/index.js +1 -1
  27. package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
  28. package/lib/element-constructor/index.cjs +1 -1
  29. package/lib/element-constructor/index.js +848 -122
  30. package/lib/element-resizer/index.js +8 -8
  31. package/lib/en3/index.cjs +8 -1
  32. package/lib/en3/index.js +372 -4
  33. package/lib/file-BEr-o55N.js +31 -0
  34. package/lib/file-C9BbxzVU.cjs +1 -0
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +1 -1
  37. package/lib/intersector/index.js +7 -7
  38. package/lib/jss-CjccJC-K.js +21 -0
  39. package/lib/jss-GJLvaNfT.cjs +1 -0
  40. package/lib/ladder/index.cjs +1 -1
  41. package/lib/ladder/index.js +1 -1
  42. package/lib/layout-box/index.js +14 -14
  43. package/lib/media/index.cjs +1 -1
  44. package/lib/media/index.js +1 -1
  45. package/lib/need_redo_tweaker/index.cjs +18 -0
  46. package/lib/need_redo_tweaker/index.js +1337 -0
  47. package/lib/pointer/index.cjs +1 -1
  48. package/lib/pointer/index.js +3 -3
  49. package/lib/popover/index.cjs +1 -1
  50. package/lib/popover/index.js +68 -76
  51. package/lib/scroll/index.cjs +1 -1
  52. package/lib/scroll/index.js +577 -610
  53. package/lib/scroll-entries/index.js +15 -15
  54. package/lib/sequence/index.cjs +1 -1
  55. package/lib/sequence/index.js +1 -1
  56. package/lib/slicer/index.cjs +5 -5
  57. package/lib/slicer/index.js +55 -86
  58. package/lib/source/index.cjs +2 -2
  59. package/lib/source/index.js +154 -62
  60. package/lib/store/index.cjs +1 -1
  61. package/lib/store/index.js +71 -37
  62. package/lib/ticker/index.js +1 -1
  63. package/lib/utils/index.cjs +1 -1
  64. package/lib/utils/index.js +67 -65
  65. package/lib/video/index.cjs +1 -1
  66. package/lib/video/index.js +1 -1
  67. package/package.json +7 -72
  68. package/lib/Composed-C_4slJQ6.cjs +0 -1
  69. package/lib/Composed-CfWa-69I.js +0 -31
  70. package/lib/Derived-BIBU-y7Z.cjs +0 -1
  71. package/lib/Derived-Vo_RsJfi.js +0 -23
  72. package/lib/SourceManager-B6wZpXUZ.js +0 -104
  73. package/lib/SourceManager-CfHcGLUa.cjs +0 -1
  74. package/lib/Store-C46i0nvr.js +0 -137
  75. package/lib/Store-npaZHvX4.cjs +0 -1
  76. package/lib/accordion/index.cjs +0 -1
  77. package/lib/accordion/index.js +0 -167
  78. package/lib/checkbox/index.cjs +0 -1
  79. package/lib/checkbox/index.js +0 -112
  80. package/lib/createStylesheet-COAZH1Mw.js +0 -8
  81. package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
  82. package/lib/createTheme-CHnsCgAr.js +0 -15
  83. package/lib/createTheme-Cfaw9UmV.cjs +0 -1
  84. package/lib/en3/helpers/index.cjs +0 -1
  85. package/lib/en3/helpers/index.js +0 -1870
  86. package/lib/en3/libs/index.cjs +0 -1
  87. package/lib/en3/libs/index.js +0 -200
  88. package/lib/en3/loaders/index.cjs +0 -1
  89. package/lib/en3/loaders/index.js +0 -1742
  90. package/lib/en3/misc/index.cjs +0 -10
  91. package/lib/en3/misc/index.js +0 -110
  92. package/lib/en3/utils/index.cjs +0 -1
  93. package/lib/en3/utils/index.js +0 -20
  94. package/lib/en3-C1fLmsjs.cjs +0 -8
  95. package/lib/en3-x-Ki30MY.js +0 -344
  96. package/lib/events-BGwqaxVW.cjs +0 -1
  97. package/lib/events-CJTUMSLU.js +0 -20
  98. package/lib/file-EevnUtRj.cjs +0 -1
  99. package/lib/file-lxi_oXJf.js +0 -13
  100. package/lib/index-BuAuBz2_.cjs +0 -9
  101. package/lib/index-CenF0JbH.js +0 -261
  102. package/lib/modal/index.cjs +0 -1
  103. package/lib/modal/index.js +0 -133
  104. package/lib/select/index.cjs +0 -1
  105. package/lib/select/index.js +0 -7
  106. package/lib/tags-6_ETuR75.cjs +0 -1
  107. package/lib/tags-BL3kQp9o.js +0 -833
  108. package/lib/theme/index.cjs +0 -1
  109. package/lib/theme/index.js +0 -25
  110. package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
  111. package/lib/traverseMaterials-mGC2_FkG.js +0 -29
  112. package/lib/tweaker/index.cjs +0 -10
  113. package/lib/tweaker/index.js +0 -989
@@ -1,33 +1,33 @@
1
1
  var f = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var g = (s, t, r) => t.has(s) || f("Cannot " + r);
5
- var e = (s, t, r) => (g(s, t, "read from private field"), r ? r.call(s) : t.get(s)), l = (s, t, r) => t.has(s) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, r);
6
- import { Notifier as u } from "../notifier/index.js";
7
- import { g as c } from "../dom-P5QbAASX.js";
8
- var h, i, o;
4
+ var u = (s, t, r) => t.has(s) || f("Cannot " + r);
5
+ var e = (s, t, r) => (u(s, t, "read from private field"), r ? r.call(s) : t.get(s)), l = (s, t, r) => t.has(s) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, r);
6
+ import { Notifier as g } from "../notifier/index.js";
7
+ import { a as c } from "../dom-0S_WDL4g.js";
8
+ var h, i, a;
9
9
  class p {
10
10
  constructor() {
11
11
  l(this, h, /* @__PURE__ */ new Set());
12
12
  l(this, i, /* @__PURE__ */ new WeakMap());
13
- l(this, o, new u());
13
+ l(this, a, new g());
14
14
  }
15
15
  get notifier() {
16
- return e(this, o);
16
+ return e(this, a);
17
17
  }
18
18
  register(t) {
19
19
  e(this, i).set(t, {
20
20
  axis: "y",
21
21
  value: 0,
22
22
  element: t
23
- }), e(this, h).add(t), e(this, o).notify();
23
+ }), e(this, h).add(t), e(this, a).notify();
24
24
  }
25
25
  unregister(t) {
26
- e(this, i).delete(t), e(this, h).delete(t), e(this, o).notify();
26
+ e(this, i).delete(t), e(this, h).delete(t), e(this, a).notify();
27
27
  }
28
- update(t, r, a) {
28
+ update(t, r, o) {
29
29
  const n = e(this, i).get(t);
30
- n.axis = r, n.value = a;
30
+ n.axis = r, n.value = o;
31
31
  }
32
32
  hasEntry(t) {
33
33
  return e(this, i).has(t);
@@ -36,13 +36,13 @@ class p {
36
36
  return e(this, i).get(t);
37
37
  }
38
38
  getAll(t) {
39
- const r = c(t).filter((n) => e(this, h).has(n)), a = [];
39
+ const r = c(t).filter((n) => e(this, h).has(n)), o = [];
40
40
  return r.forEach((n) => {
41
- e(this, i).has(n) && a.push(e(this, i).get(n));
42
- }), a;
41
+ e(this, i).has(n) && o.push(e(this, i).get(n));
42
+ }), o;
43
43
  }
44
44
  }
45
- h = new WeakMap(), i = new WeakMap(), o = new WeakMap();
45
+ h = new WeakMap(), i = new WeakMap(), a = new WeakMap();
46
46
  const w = new p();
47
47
  export {
48
48
  w as scrollEntries
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../canvas/index.cjs"),P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs");require("../window-resizer/index.cjs");require("../Store-npaZHvX4.cjs");const H=require("../browser-CpzFX2xg.cjs"),z=require("../canvas-CU5Xjahf.cjs"),M=require("../source/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,m,d,g,E,p,a,v;class k extends M.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,m,new P.CSSProperty(this,"--offset-x",.5));c(this,d,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});H.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new B.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",k);exports.SequenceElement=k;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../canvas/index.cjs"),P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs");require("../window-resizer/index.cjs");require("../Store-CDb6RMce.cjs");const H=require("../browser-CpzFX2xg.cjs"),z=require("../canvas-CU5Xjahf.cjs"),M=require("../source/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,m,d,g,E,p,a,v;class k extends M.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,m,new P.CSSProperty(this,"--offset-x",.5));c(this,d,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});H.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new B.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",k);exports.SequenceElement=k;
@@ -23,7 +23,7 @@ import { CanvasElement as z } from "../canvas/index.js";
23
23
  import { CSSProperty as I } from "../css-property/index.js";
24
24
  import { elementResizer as k } from "../element-resizer/index.js";
25
25
  import "../window-resizer/index.js";
26
- import "../Store-C46i0nvr.js";
26
+ import "../Store-OTdcl6SX.js";
27
27
  import { i as B } from "../browser-0zX67oeU.js";
28
28
  import { c as H, a as W } from "../canvas-DeZ0SLUJ.js";
29
29
  import { SourceElement as A } from "../source/index.js";
@@ -1,11 +1,11 @@
1
- "use strict";var M=n=>{throw TypeError(n)};var T=(n,t,e)=>t.has(n)||M("Cannot "+e);var s=(n,t,e)=>(T(n,t,"read from private field"),e?e.call(n):t.get(n)),l=(n,t,e)=>t.has(n)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),i=(n,t,e,o)=>(T(n,t,"write to private field"),o?o.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../string-DhgS_iFl.cjs");var p,h,u;class b{constructor(t){l(this,p);l(this,h);l(this,u);i(this,p,t.index),i(this,h,document.createElement("span")),i(this,u,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(i(this,u,t.text.split("").map((e,o)=>new t.letterConstructor({index:t.lettersAcc+o,text:e,clone:t.clone}))),s(this,h).append(...s(this,u).map(e=>e.element))):t.clone?s(this,h).innerHTML=`
1
+ "use strict";var L=n=>{throw TypeError(n)};var w=(n,t,s)=>t.has(n)||L("Cannot "+s);var e=(n,t,s)=>(w(n,t,"read from private field"),s?s.call(n):t.get(n)),l=(n,t,s)=>t.has(n)?L("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),i=(n,t,s,d)=>(w(n,t,"write to private field"),d?d.call(n,s):t.set(n,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var a,h,u;class T{constructor(t){l(this,a);l(this,h);l(this,u);i(this,a,t.index),i(this,h,document.createElement("span")),i(this,u,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(i(this,u,t.text.split("").map((s,d)=>new t.letterConstructor({index:t.lettersAcc+d,text:s,clone:t.clone}))),e(this,h).append(...e(this,u).map(s=>s.element))):t.clone?e(this,h).innerHTML=`
2
2
  <span class="original">${t.text}</span>
3
3
  <span class="clone" aria-hidden>${t.text}</span>
4
- `:s(this,h).innerHTML=`
4
+ `:e(this,h).innerHTML=`
5
5
  <span class="value">${t.text}</span>
6
- `,s(this,h).classList.add("word")}get index(){return s(this,p)}get element(){return s(this,h)}get letters(){return s(this,u)}}p=new WeakMap,h=new WeakMap,u=new WeakMap;var f,d;class L{constructor(t){l(this,f);l(this,d);i(this,f,t.index),i(this,d,document.createElement("span")),s(this,d).classList.add("letter"),t.clone?s(this,d).innerHTML=`
6
+ `,e(this,h).classList.add("word")}get index(){return e(this,a)}get element(){return e(this,h)}get letters(){return e(this,u)}}a=new WeakMap,h=new WeakMap,u=new WeakMap;var p,c;class b{constructor(t){l(this,p);l(this,c);i(this,p,t.index),i(this,c,document.createElement("span")),e(this,c).classList.add("letter"),t.clone?e(this,c).innerHTML=`
7
7
  <span class="original">${t.text}</span>
8
8
  <span class="clone" aria-hidden>${t.text}</span>
9
- `:s(this,d).innerHTML=`
9
+ `:e(this,c).innerHTML=`
10
10
  <span class="value">${t.text}</span>
11
- `}get index(){return s(this,f)}get element(){return s(this,d)}}f=new WeakMap,d=new WeakMap;var g,r,x,E,C;class w extends HTMLElement{constructor(e){super();l(this,g,"");l(this,r,[]);l(this,x,[]);l(this,E);l(this,C);i(this,E,(e==null?void 0:e.wordConstructor)||b),i(this,C,(e==null?void 0:e.letterConstructor)||L)}get wordsArray(){return s(this,r)}get lettersArray(){return s(this,x)}get originalText(){return s(this,g)}connectedCallback(){var o;i(this,g,((o=this.textContent)==null?void 0:o.trim())||""),this.innerHTML="";let e=0;i(this,r,s(this,g).replace(/ +/g," ").split(" ").map((c,m)=>{const a=new(s(this,E))({index:m,text:c,letters:this.hasAttribute("letters"),lettersAcc:e,letterConstructor:s(this,C),clone:this.hasAttribute("clone")});return e+=a.letters.length,s(this,x).push(...a.letters),a})),this.hasAttribute("index")&&(s(this,r).forEach(c=>{c.element.style.setProperty("--word-index",c.index.toString())}),s(this,x).forEach(c=>{c.element.style.setProperty("--letter-index",c.index.toString())})),s(this,r).forEach((c,m)=>{if(this.appendChild(c.element),m!==s(this,r).length-1){const a=document.createElement("span");a.innerHTML="&nbsp;",this.appendChild(a)}}),this.style.setProperty("--words-length",s(this,r).length.toString()),this.style.setProperty("--letters-length",s(this,x).length.toString())}disconnectedCallback(){i(this,r,[]),this.textContent=s(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}}g=new WeakMap,r=new WeakMap,x=new WeakMap,E=new WeakMap,C=new WeakMap;customElements.get("e-slicer")||customElements.define("e-slicer",w);var y;class v extends L{constructor(e){super(e);l(this,y);i(this,y,S.generateId(2+Math.floor(Math.random()*15),"abcdefghijklmnopqrstuvwxyz0123456789#!%$^&*+=?")+e.text),this.play(0)}play(e){const o=Math.floor(e*(s(this,y).length-1));this.element.textContent=s(this,y)[o]}}y=new WeakMap;class A extends w{constructor(){super({letterConstructor:v})}play(t){this.lettersArray.forEach(e=>{e.play(t)})}}customElements.get("e-decoder")||customElements.define("e-decoder",A);exports.DecoderElement=A;exports.Letter=L;exports.SlicerElement=w;exports.Word=b;
11
+ `}get index(){return e(this,p)}get element(){return e(this,c)}}p=new WeakMap,c=new WeakMap;var g,r,x,C,f;class A extends HTMLElement{constructor(s){super();l(this,g,"");l(this,r,[]);l(this,x,[]);l(this,C);l(this,f);i(this,C,(s==null?void 0:s.wordConstructor)||T),i(this,f,(s==null?void 0:s.letterConstructor)||b)}get wordsArray(){return e(this,r)}get lettersArray(){return e(this,x)}get originalText(){return e(this,g)}connectedCallback(){var d;i(this,g,((d=this.textContent)==null?void 0:d.trim())||""),this.innerHTML="";let s=0;i(this,r,e(this,g).replace(/ +/g," ").split(" ").map((o,E)=>{const y=new(e(this,C))({index:E,text:o,letters:this.hasAttribute("letters"),lettersAcc:s,letterConstructor:e(this,f),clone:this.hasAttribute("clone")});return s+=y.letters.length,e(this,x).push(...y.letters),y})),this.hasAttribute("index")&&(e(this,r).forEach(o=>{o.element.style.setProperty("--word-index",o.index.toString())}),e(this,x).forEach(o=>{o.element.style.setProperty("--letter-index",o.index.toString())})),e(this,r).forEach((o,E)=>{if(this.appendChild(o.element),E!==e(this,r).length-1){const y=document.createElement("span");y.innerHTML="&nbsp;",this.appendChild(y)}}),this.style.setProperty("--words-length",e(this,r).length.toString()),this.style.setProperty("--letters-length",e(this,x).length.toString())}disconnectedCallback(){i(this,r,[]),this.textContent=e(this,g),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")}}g=new WeakMap,r=new WeakMap,x=new WeakMap,C=new WeakMap,f=new WeakMap;customElements.get("e-slicer")||customElements.define("e-slicer",A);exports.Letter=b;exports.SlicerElement=A;exports.Word=T;
@@ -1,143 +1,112 @@
1
- var w = (n) => {
1
+ var E = (n) => {
2
2
  throw TypeError(n);
3
3
  };
4
- var L = (n, t, e) => t.has(n) || w("Cannot " + e);
5
- var s = (n, t, e) => (L(n, t, "read from private field"), e ? e.call(n) : t.get(n)), l = (n, t, e) => t.has(n) ? w("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), i = (n, t, e, o) => (L(n, t, "write to private field"), o ? o.call(n, e) : t.set(n, e), e);
6
- import { g as T } from "../string-f0Dnk0L1.js";
7
- var y, c, u;
8
- class b {
4
+ var L = (n, t, s) => t.has(n) || E("Cannot " + s);
5
+ var e = (n, t, s) => (L(n, t, "read from private field"), s ? s.call(n) : t.get(n)), l = (n, t, s) => t.has(n) ? E("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), i = (n, t, s, d) => (L(n, t, "write to private field"), d ? d.call(n, s) : t.set(n, s), s);
6
+ var y, o, u;
7
+ class T {
9
8
  constructor(t) {
10
9
  l(this, y);
11
- l(this, c);
10
+ l(this, o);
12
11
  l(this, u);
13
- i(this, y, t.index), i(this, c, document.createElement("span")), i(this, u, []), t.letters && t.letterConstructor && t.lettersAcc !== void 0 ? (i(this, u, t.text.split("").map((e, o) => new t.letterConstructor({
14
- index: t.lettersAcc + o,
15
- text: e,
12
+ i(this, y, t.index), i(this, o, document.createElement("span")), i(this, u, []), t.letters && t.letterConstructor && t.lettersAcc !== void 0 ? (i(this, u, t.text.split("").map((s, d) => new t.letterConstructor({
13
+ index: t.lettersAcc + d,
14
+ text: s,
16
15
  clone: t.clone
17
- }))), s(this, c).append(...s(this, u).map((e) => e.element))) : t.clone ? s(this, c).innerHTML = `
16
+ }))), e(this, o).append(...e(this, u).map((s) => s.element))) : t.clone ? e(this, o).innerHTML = `
18
17
  <span class="original">${t.text}</span>
19
18
  <span class="clone" aria-hidden>${t.text}</span>
20
- ` : s(this, c).innerHTML = `
19
+ ` : e(this, o).innerHTML = `
21
20
  <span class="value">${t.text}</span>
22
- `, s(this, c).classList.add("word");
21
+ `, e(this, o).classList.add("word");
23
22
  }
24
23
  get index() {
25
- return s(this, y);
24
+ return e(this, y);
26
25
  }
27
26
  get element() {
28
- return s(this, c);
27
+ return e(this, o);
29
28
  }
30
29
  get letters() {
31
- return s(this, u);
30
+ return e(this, u);
32
31
  }
33
32
  }
34
- y = new WeakMap(), c = new WeakMap(), u = new WeakMap();
35
- var f, d;
36
- class M {
33
+ y = new WeakMap(), o = new WeakMap(), u = new WeakMap();
34
+ var a, c;
35
+ class A {
37
36
  constructor(t) {
38
- l(this, f);
39
- l(this, d);
40
- i(this, f, t.index), i(this, d, document.createElement("span")), s(this, d).classList.add("letter"), t.clone ? s(this, d).innerHTML = `
37
+ l(this, a);
38
+ l(this, c);
39
+ i(this, a, t.index), i(this, c, document.createElement("span")), e(this, c).classList.add("letter"), t.clone ? e(this, c).innerHTML = `
41
40
  <span class="original">${t.text}</span>
42
41
  <span class="clone" aria-hidden>${t.text}</span>
43
- ` : s(this, d).innerHTML = `
42
+ ` : e(this, c).innerHTML = `
44
43
  <span class="value">${t.text}</span>
45
44
  `;
46
45
  }
47
46
  get index() {
48
- return s(this, f);
47
+ return e(this, a);
49
48
  }
50
49
  get element() {
51
- return s(this, d);
50
+ return e(this, c);
52
51
  }
53
52
  }
54
- f = new WeakMap(), d = new WeakMap();
55
- var g, r, x, C, E;
56
- class A extends HTMLElement {
57
- constructor(e) {
53
+ a = new WeakMap(), c = new WeakMap();
54
+ var g, r, x, C, f;
55
+ class H extends HTMLElement {
56
+ constructor(s) {
58
57
  super();
59
58
  l(this, g, "");
60
59
  l(this, r, []);
61
60
  l(this, x, []);
62
61
  l(this, C);
63
- l(this, E);
64
- i(this, C, (e == null ? void 0 : e.wordConstructor) || b), i(this, E, (e == null ? void 0 : e.letterConstructor) || M);
62
+ l(this, f);
63
+ i(this, C, (s == null ? void 0 : s.wordConstructor) || T), i(this, f, (s == null ? void 0 : s.letterConstructor) || A);
65
64
  }
66
65
  get wordsArray() {
67
- return s(this, r);
66
+ return e(this, r);
68
67
  }
69
68
  get lettersArray() {
70
- return s(this, x);
69
+ return e(this, x);
71
70
  }
72
71
  get originalText() {
73
- return s(this, g);
72
+ return e(this, g);
74
73
  }
75
74
  connectedCallback() {
76
- var o;
77
- i(this, g, ((o = this.textContent) == null ? void 0 : o.trim()) || ""), this.innerHTML = "";
78
- let e = 0;
79
- i(this, r, s(this, g).replace(/ +/g, " ").split(" ").map((h, m) => {
80
- const a = new (s(this, C))({
81
- index: m,
75
+ var d;
76
+ i(this, g, ((d = this.textContent) == null ? void 0 : d.trim()) || ""), this.innerHTML = "";
77
+ let s = 0;
78
+ i(this, r, e(this, g).replace(/ +/g, " ").split(" ").map((h, w) => {
79
+ const p = new (e(this, C))({
80
+ index: w,
82
81
  text: h,
83
82
  letters: this.hasAttribute("letters"),
84
- lettersAcc: e,
85
- letterConstructor: s(this, E),
83
+ lettersAcc: s,
84
+ letterConstructor: e(this, f),
86
85
  clone: this.hasAttribute("clone")
87
86
  });
88
- return e += a.letters.length, s(this, x).push(...a.letters), a;
89
- })), this.hasAttribute("index") && (s(this, r).forEach((h) => {
87
+ return s += p.letters.length, e(this, x).push(...p.letters), p;
88
+ })), this.hasAttribute("index") && (e(this, r).forEach((h) => {
90
89
  h.element.style.setProperty("--word-index", h.index.toString());
91
- }), s(this, x).forEach((h) => {
90
+ }), e(this, x).forEach((h) => {
92
91
  h.element.style.setProperty(
93
92
  "--letter-index",
94
93
  h.index.toString()
95
94
  );
96
- })), s(this, r).forEach((h, m) => {
97
- if (this.appendChild(h.element), m !== s(this, r).length - 1) {
98
- const a = document.createElement("span");
99
- a.innerHTML = "&nbsp;", this.appendChild(a);
95
+ })), e(this, r).forEach((h, w) => {
96
+ if (this.appendChild(h.element), w !== e(this, r).length - 1) {
97
+ const p = document.createElement("span");
98
+ p.innerHTML = "&nbsp;", this.appendChild(p);
100
99
  }
101
- }), this.style.setProperty("--words-length", s(this, r).length.toString()), this.style.setProperty("--letters-length", s(this, x).length.toString());
100
+ }), this.style.setProperty("--words-length", e(this, r).length.toString()), this.style.setProperty("--letters-length", e(this, x).length.toString());
102
101
  }
103
102
  disconnectedCallback() {
104
- i(this, r, []), this.textContent = s(this, g), this.style.removeProperty("--words-length"), this.style.removeProperty("--letters-length");
105
- }
106
- }
107
- g = new WeakMap(), r = new WeakMap(), x = new WeakMap(), C = new WeakMap(), E = new WeakMap();
108
- customElements.get("e-slicer") || customElements.define("e-slicer", A);
109
- var p;
110
- class H extends M {
111
- constructor(e) {
112
- super(e);
113
- l(this, p);
114
- i(this, p, T(
115
- 2 + Math.floor(Math.random() * 15),
116
- "abcdefghijklmnopqrstuvwxyz0123456789#!%$^&*+=?"
117
- ) + e.text), this.play(0);
118
- }
119
- play(e) {
120
- const o = Math.floor(e * (s(this, p).length - 1));
121
- this.element.textContent = s(this, p)[o];
122
- }
123
- }
124
- p = new WeakMap();
125
- class $ extends A {
126
- constructor() {
127
- super({
128
- letterConstructor: H
129
- });
130
- }
131
- play(t) {
132
- this.lettersArray.forEach((e) => {
133
- e.play(t);
134
- });
103
+ i(this, r, []), this.textContent = e(this, g), this.style.removeProperty("--words-length"), this.style.removeProperty("--letters-length");
135
104
  }
136
105
  }
137
- customElements.get("e-decoder") || customElements.define("e-decoder", $);
106
+ g = new WeakMap(), r = new WeakMap(), x = new WeakMap(), C = new WeakMap(), f = new WeakMap();
107
+ customElements.get("e-slicer") || customElements.define("e-slicer", H);
138
108
  export {
139
- $ as DecoderElement,
140
- M as Letter,
141
- A as SlicerElement,
142
- b as Word
109
+ A as Letter,
110
+ H as SlicerElement,
111
+ T as Word
143
112
  };
@@ -1,5 +1,5 @@
1
- "use strict";var k=i=>{throw TypeError(i)};var y=(i,r,t)=>r.has(i)||k("Cannot "+t);var e=(i,r,t)=>(y(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>r.has(i)?k("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,t),u=(i,r,t,o)=>(y(i,r,"write to private field"),o?o.call(i,t):r.set(i,t),t),p=(i,r,t)=>(y(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../SourceManager-CfHcGLUa.cjs"),w=require("../loading/index.cjs"),A=require("../class-linked-status/index.cjs"),q=require("../browser-CpzFX2xg.cjs"),x=require("../string-DhgS_iFl.cjs");let T=0;var h,s,c,f,l,d,n,g,m,v,E,b,L;class z extends HTMLElement{constructor(){super();a(this,m);a(this,h,null);a(this,s,null);a(this,c,!1);a(this,f,!1);a(this,l,!1);a(this,d,"");a(this,n,new A.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1}));a(this,g,null);a(this,E,t=>{const o=t[0];e(this,l)&&(!e(this,f)||this.hasAttribute("reload-source"))&&o.isIntersecting&&(e(this,h).current&&e(this,h).current!==e(this,h).previous&&p(this,m,v).call(this,e(this,h).current),u(this,f,!0)),o.isIntersecting?this.dispatchEvent(new CustomEvent("sourceCapture")):(this.hasAttribute("reload-source")&&p(this,m,v).call(this,void 0),this.dispatchEvent(new CustomEvent("sourceRelease")))});a(this,b,()=>{e(this,n).set("loaded",!0),e(this,n).set("error",!1),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setLoaded(e(this,d),1),u(this,c,!0)});a(this,L,t=>{e(this,n).set("loaded",!1),e(this,n).set("error",!0),e(this,n).set("loading",!1),!e(this,l)&&!e(this,c)&&w.loading.setError(e(this,d),t),u(this,c,!0)});q.isBrowser&&(u(this,d,`source-consumer-${++T}`),u(this,g,new IntersectionObserver(e(this,E))))}get consumerElement(){return e(this,s)}get sourceManager(){return e(this,h)}get status(){return e(this,n)}get isLazy(){return e(this,l)}connectedCallback(){const t=this.getAttribute("srcset");t&&(u(this,s,this.createConsumer()),e(this,s).style.cssText=`
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
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
5
- `,e(this,s).classList.add("source-consumer"),Array.from(this.attributes).forEach(o=>{if(o.name!=="srcset"){const S=o.nodeValue||"",M=x.kebabToCamel(o.name);M in e(this,s)&&(e(this,s)[M]=S||!0)}}),this.appendChild(e(this,s)),u(this,h,new C.SourceManager({srcset:t})),u(this,l,this.hasAttribute("lazy")),e(this,h).subscribe(o=>{(!e(this,l)||e(this,l)&&e(this,f))&&p(this,m,v).call(this,o.current)}),e(this,g).observe(this),e(this,h).connect())}disconnectedCallback(){e(this,g).disconnect(),e(this,h).close(),e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,s).remove(),e(this,n).reset()}}h=new WeakMap,s=new WeakMap,c=new WeakMap,f=new WeakMap,l=new WeakMap,d=new WeakMap,n=new WeakMap,g=new WeakMap,m=new WeakSet,v=function(t){if(e(this,s).onloadeddata=null,e(this,s).onload=null,e(this,s).onerror=null,e(this,n).set("loaded",!1),e(this,n).set("error",!1),e(this,n).set("loading",!1),t){const o=this.hasAttribute("keep-source-parameters");e(this,n).set("loading",!0);const S=o?t.url:t.name+t.extension;this.consumeSource(S),!e(this,l)&&!e(this,c)&&w.loading.setTotal(e(this,d),1),e(this,s).onloadeddata=()=>{e(this,b).call(this)},e(this,s).onload=()=>{e(this,b).call(this)},e(this,s).onerror=()=>{e(this,L).call(this,S)}}else this.consumeSource(null)},E=new WeakMap,b=new WeakMap,L=new WeakMap;exports.Source=C.Source;exports.SourceManager=C.SourceManager;exports.SourceSet=C.SourceSet;exports.SourceElement=z;
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,97 +1,189 @@
1
- var y = (i) => {
2
- throw TypeError(i);
1
+ var K = (h) => {
2
+ throw TypeError(h);
3
3
  };
4
- var L = (i, r, s) => r.has(i) || y("Cannot " + s);
5
- var t = (i, r, s) => (L(i, r, "read from private field"), s ? s.call(i) : r.get(i)), a = (i, r, s) => r.has(i) ? y("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, s), u = (i, r, s, n) => (L(i, r, "write to private field"), n ? n.call(i, s) : r.set(i, s), s), v = (i, r, s) => (L(i, r, "access private method"), s);
6
- import { S as A } from "../SourceManager-B6wZpXUZ.js";
7
- import { a as $, b as j } from "../SourceManager-B6wZpXUZ.js";
8
- import { loading as k } from "../loading/index.js";
9
- import { ClassLinkedStatus as x } from "../class-linked-status/index.js";
10
- import { i as M } from "../browser-0zX67oeU.js";
11
- import { k as T } from "../string-f0Dnk0L1.js";
12
- let z = 0;
13
- var h, e, c, f, l, d, o, m, p, S, C, g, E;
14
- class P extends HTMLElement {
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]);
32
+ }
33
+ get url() {
34
+ return t(this, M);
35
+ }
36
+ get name() {
37
+ return t(this, A);
38
+ }
39
+ get density() {
40
+ return t(this, I);
41
+ }
42
+ get query() {
43
+ return t(this, g);
44
+ }
45
+ get extension() {
46
+ return t(this, R);
47
+ }
48
+ get queryType() {
49
+ return t(this, y);
50
+ }
51
+ get queryValue() {
52
+ return t(this, u);
53
+ }
54
+ }
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]);
65
+ });
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]);
69
+ });
70
+ }
71
+ get mediaBuckets() {
72
+ return t(this, b);
73
+ }
74
+ }
75
+ b = new WeakMap();
76
+ var S, v;
77
+ class Y extends U {
78
+ constructor(e) {
79
+ 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);
85
+ });
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;
90
+ });
91
+ i(this, S, new X(e.srcset));
92
+ }
93
+ close() {
94
+ super.close(), this.disconnect();
95
+ }
96
+ connect() {
97
+ N.subscribe(t(this, v), Q.SOURCE_MANAGER);
98
+ }
99
+ 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 {
15
107
  constructor() {
16
108
  super();
17
- a(this, p);
18
- a(this, h, null);
19
- a(this, e, null);
20
- a(this, c, !1);
109
+ a(this, L);
110
+ a(this, m, null);
111
+ a(this, o, null);
112
+ a(this, E, !1);
113
+ a(this, k, !1);
21
114
  a(this, f, !1);
22
- a(this, l, !1);
23
- a(this, d, "");
24
- a(this, o, new x(this, {
115
+ a(this, w, "");
116
+ a(this, l, new Z(this, {
25
117
  loading: !1,
26
118
  loaded: !1,
27
119
  error: !1
28
120
  }));
29
- a(this, m, null);
30
- a(this, C, (s) => {
31
- const n = s[0];
32
- t(this, l) && (!t(this, f) || this.hasAttribute("reload-source")) && n.isIntersecting && (t(this, h).current && t(this, h).current !== t(this, h).previous && v(this, p, S).call(this, t(this, h).current), u(this, f, !0)), n.isIntersecting ? this.dispatchEvent(new CustomEvent("sourceCapture")) : (this.hasAttribute("reload-source") && v(this, p, S).call(this, void 0), this.dispatchEvent(new CustomEvent("sourceRelease")));
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")));
33
125
  });
34
- a(this, g, () => {
35
- t(this, o).set("loaded", !0), t(this, o).set("error", !1), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && k.setLoaded(t(this, d), 1), u(this, c, !0);
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);
36
128
  });
37
- a(this, E, (s) => {
38
- t(this, o).set("loaded", !1), t(this, o).set("error", !0), t(this, o).set("loading", !1), !t(this, l) && !t(this, c) && k.setError(t(this, d), s), u(this, c, !0);
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);
39
131
  });
40
- M && (u(this, d, `source-consumer-${++z}`), u(this, m, new IntersectionObserver(
41
- t(this, C)
132
+ j && (i(this, w, `source-consumer-${++tt}`), i(this, C, new IntersectionObserver(
133
+ t(this, z)
42
134
  )));
43
135
  }
44
136
  get consumerElement() {
45
- return t(this, e);
137
+ return t(this, o);
46
138
  }
47
139
  get sourceManager() {
48
- return t(this, h);
140
+ return t(this, m);
49
141
  }
50
142
  get status() {
51
- return t(this, o);
143
+ return t(this, l);
52
144
  }
53
145
  get isLazy() {
54
- return t(this, l);
146
+ return t(this, f);
55
147
  }
56
148
  connectedCallback() {
57
- const s = this.getAttribute("srcset");
58
- s && (u(this, e, this.createConsumer()), t(this, e).style.cssText = `
149
+ const e = this.getAttribute("srcset");
150
+ e && (i(this, o, this.createConsumer()), t(this, o).style.cssText = `
59
151
  display: block;
60
152
  width: 100%;
61
153
  height: 100%;
62
- `, t(this, e).classList.add("source-consumer"), Array.from(this.attributes).forEach((n) => {
63
- if (n.name !== "srcset") {
64
- const b = n.nodeValue || "", w = T(n.name);
65
- w in t(this, e) && (t(this, e)[w] = b || !0);
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);
66
158
  }
67
- }), this.appendChild(t(this, e)), u(this, h, new A({
68
- srcset: s
69
- })), u(this, l, this.hasAttribute("lazy")), t(this, h).subscribe((n) => {
70
- (!t(this, l) || t(this, l) && t(this, f)) && v(this, p, S).call(this, n.current);
71
- }), t(this, m).observe(this), t(this, h).connect());
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());
72
164
  }
73
165
  disconnectedCallback() {
74
- t(this, m).disconnect(), t(this, h).close(), t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, e).remove(), t(this, o).reset();
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();
75
167
  }
76
168
  }
77
- h = new WeakMap(), e = new WeakMap(), c = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), o = new WeakMap(), m = new WeakMap(), p = new WeakSet(), S = function(s) {
78
- if (t(this, e).onloadeddata = null, t(this, e).onload = null, t(this, e).onerror = null, t(this, o).set("loaded", !1), t(this, o).set("error", !1), t(this, o).set("loading", !1), s) {
79
- const n = this.hasAttribute("keep-source-parameters");
80
- t(this, o).set("loading", !0);
81
- const b = n ? s.url : s.name + s.extension;
82
- this.consumeSource(b), !t(this, l) && !t(this, c) && k.setTotal(t(this, d), 1), t(this, e).onloadeddata = () => {
83
- t(this, g).call(this);
84
- }, t(this, e).onload = () => {
85
- t(this, g).call(this);
86
- }, t(this, e).onerror = () => {
87
- t(this, E).call(this, b);
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);
88
180
  };
89
181
  } else
90
182
  this.consumeSource(null);
91
- }, C = new WeakMap(), g = new WeakMap(), E = new WeakMap();
183
+ }, z = new WeakMap(), T = new WeakMap(), B = new WeakMap();
92
184
  export {
93
- $ as Source,
94
- P as SourceElement,
95
- A as SourceManager,
96
- j as SourceSet
185
+ W as Source,
186
+ ct as SourceElement,
187
+ Y as SourceManager,
188
+ X as SourceSet
97
189
  };