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.
- package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
- package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
- package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
- package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
- package/lib/Store-CDb6RMce.cjs +1 -0
- package/lib/Store-OTdcl6SX.js +134 -0
- package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
- package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
- package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
- package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +13 -13
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +36 -39
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +3 -3
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +4 -4
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +848 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/index.cjs +8 -1
- package/lib/en3/index.js +372 -4
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/intersector/index.js +7 -7
- package/lib/jss-CjccJC-K.js +21 -0
- package/lib/jss-GJLvaNfT.cjs +1 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/layout-box/index.js +14 -14
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1337 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +3 -3
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +68 -76
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +577 -610
- package/lib/scroll-entries/index.js +15 -15
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +1 -1
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +154 -62
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +71 -37
- package/lib/ticker/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +67 -65
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +7 -72
- package/lib/Composed-C_4slJQ6.cjs +0 -1
- package/lib/Composed-CfWa-69I.js +0 -31
- package/lib/Derived-BIBU-y7Z.cjs +0 -1
- package/lib/Derived-Vo_RsJfi.js +0 -23
- package/lib/SourceManager-B6wZpXUZ.js +0 -104
- package/lib/SourceManager-CfHcGLUa.cjs +0 -1
- package/lib/Store-C46i0nvr.js +0 -137
- package/lib/Store-npaZHvX4.cjs +0 -1
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createStylesheet-COAZH1Mw.js +0 -8
- package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/en3/helpers/index.cjs +0 -1
- package/lib/en3/helpers/index.js +0 -1870
- package/lib/en3/libs/index.cjs +0 -1
- package/lib/en3/libs/index.js +0 -200
- package/lib/en3/loaders/index.cjs +0 -1
- package/lib/en3/loaders/index.js +0 -1742
- package/lib/en3/misc/index.cjs +0 -10
- package/lib/en3/misc/index.js +0 -110
- package/lib/en3/utils/index.cjs +0 -1
- package/lib/en3/utils/index.js +0 -20
- package/lib/en3-C1fLmsjs.cjs +0 -8
- package/lib/en3-x-Ki30MY.js +0 -344
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BuAuBz2_.cjs +0 -9
- package/lib/index-CenF0JbH.js +0 -261
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/tags-6_ETuR75.cjs +0 -1
- package/lib/tags-BL3kQp9o.js +0 -833
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
- package/lib/traverseMaterials-mGC2_FkG.js +0 -29
- package/lib/tweaker/index.cjs +0 -10
- 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
|
|
5
|
-
var e = (s, t, r) => (
|
|
6
|
-
import { Notifier as
|
|
7
|
-
import {
|
|
8
|
-
var h, i,
|
|
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,
|
|
13
|
+
l(this, a, new g());
|
|
14
14
|
}
|
|
15
15
|
get notifier() {
|
|
16
|
-
return e(this,
|
|
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,
|
|
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,
|
|
26
|
+
e(this, i).delete(t), e(this, h).delete(t), e(this, a).notify();
|
|
27
27
|
}
|
|
28
|
-
update(t, r,
|
|
28
|
+
update(t, r, o) {
|
|
29
29
|
const n = e(this, i).get(t);
|
|
30
|
-
n.axis = r, n.value =
|
|
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)),
|
|
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) &&
|
|
42
|
-
}),
|
|
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(),
|
|
45
|
+
h = new WeakMap(), i = new WeakMap(), a = new WeakMap();
|
|
46
46
|
const w = new p();
|
|
47
47
|
export {
|
|
48
48
|
w as scrollEntries
|
package/lib/sequence/index.cjs
CHANGED
|
@@ -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-
|
|
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;
|
package/lib/sequence/index.js
CHANGED
|
@@ -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-
|
|
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";
|
package/lib/slicer/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
-
`:
|
|
4
|
+
`:e(this,h).innerHTML=`
|
|
5
5
|
<span class="value">${t.text}</span>
|
|
6
|
-
`,
|
|
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
|
-
`:
|
|
9
|
+
`:e(this,c).innerHTML=`
|
|
10
10
|
<span class="value">${t.text}</span>
|
|
11
|
-
`}get index(){return
|
|
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=" ",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;
|
package/lib/slicer/index.js
CHANGED
|
@@ -1,143 +1,112 @@
|
|
|
1
|
-
var
|
|
1
|
+
var E = (n) => {
|
|
2
2
|
throw TypeError(n);
|
|
3
3
|
};
|
|
4
|
-
var L = (n, t,
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
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,
|
|
10
|
+
l(this, o);
|
|
12
11
|
l(this, u);
|
|
13
|
-
i(this, y, t.index), i(this,
|
|
14
|
-
index: t.lettersAcc +
|
|
15
|
-
text:
|
|
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
|
-
}))),
|
|
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
|
-
` :
|
|
19
|
+
` : e(this, o).innerHTML = `
|
|
21
20
|
<span class="value">${t.text}</span>
|
|
22
|
-
`,
|
|
21
|
+
`, e(this, o).classList.add("word");
|
|
23
22
|
}
|
|
24
23
|
get index() {
|
|
25
|
-
return
|
|
24
|
+
return e(this, y);
|
|
26
25
|
}
|
|
27
26
|
get element() {
|
|
28
|
-
return
|
|
27
|
+
return e(this, o);
|
|
29
28
|
}
|
|
30
29
|
get letters() {
|
|
31
|
-
return
|
|
30
|
+
return e(this, u);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
y = new WeakMap(),
|
|
35
|
-
var
|
|
36
|
-
class
|
|
33
|
+
y = new WeakMap(), o = new WeakMap(), u = new WeakMap();
|
|
34
|
+
var a, c;
|
|
35
|
+
class A {
|
|
37
36
|
constructor(t) {
|
|
38
|
-
l(this,
|
|
39
|
-
l(this,
|
|
40
|
-
i(this,
|
|
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
|
-
` :
|
|
42
|
+
` : e(this, c).innerHTML = `
|
|
44
43
|
<span class="value">${t.text}</span>
|
|
45
44
|
`;
|
|
46
45
|
}
|
|
47
46
|
get index() {
|
|
48
|
-
return
|
|
47
|
+
return e(this, a);
|
|
49
48
|
}
|
|
50
49
|
get element() {
|
|
51
|
-
return
|
|
50
|
+
return e(this, c);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
var g, r, x, C,
|
|
56
|
-
class
|
|
57
|
-
constructor(
|
|
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,
|
|
64
|
-
i(this, C, (
|
|
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
|
|
66
|
+
return e(this, r);
|
|
68
67
|
}
|
|
69
68
|
get lettersArray() {
|
|
70
|
-
return
|
|
69
|
+
return e(this, x);
|
|
71
70
|
}
|
|
72
71
|
get originalText() {
|
|
73
|
-
return
|
|
72
|
+
return e(this, g);
|
|
74
73
|
}
|
|
75
74
|
connectedCallback() {
|
|
76
|
-
var
|
|
77
|
-
i(this, g, ((
|
|
78
|
-
let
|
|
79
|
-
i(this, r,
|
|
80
|
-
const
|
|
81
|
-
index:
|
|
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:
|
|
85
|
-
letterConstructor:
|
|
83
|
+
lettersAcc: s,
|
|
84
|
+
letterConstructor: e(this, f),
|
|
86
85
|
clone: this.hasAttribute("clone")
|
|
87
86
|
});
|
|
88
|
-
return
|
|
89
|
-
})), this.hasAttribute("index") && (
|
|
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
|
-
}),
|
|
90
|
+
}), e(this, x).forEach((h) => {
|
|
92
91
|
h.element.style.setProperty(
|
|
93
92
|
"--letter-index",
|
|
94
93
|
h.index.toString()
|
|
95
94
|
);
|
|
96
|
-
})),
|
|
97
|
-
if (this.appendChild(h.element),
|
|
98
|
-
const
|
|
99
|
-
|
|
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 = " ", this.appendChild(p);
|
|
100
99
|
}
|
|
101
|
-
}), this.style.setProperty("--words-length",
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
b as Word
|
|
109
|
+
A as Letter,
|
|
110
|
+
H as SlicerElement,
|
|
111
|
+
T as Word
|
|
143
112
|
};
|
package/lib/source/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
-
`,
|
|
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;
|
package/lib/source/index.js
CHANGED
|
@@ -1,97 +1,189 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var K = (h) => {
|
|
2
|
+
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var t = (
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
class
|
|
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,
|
|
18
|
-
a(this,
|
|
19
|
-
a(this,
|
|
20
|
-
a(this,
|
|
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,
|
|
23
|
-
a(this,
|
|
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,
|
|
30
|
-
a(this,
|
|
31
|
-
const
|
|
32
|
-
t(this,
|
|
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,
|
|
35
|
-
t(this,
|
|
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,
|
|
38
|
-
t(this,
|
|
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
|
-
|
|
41
|
-
t(this,
|
|
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,
|
|
137
|
+
return t(this, o);
|
|
46
138
|
}
|
|
47
139
|
get sourceManager() {
|
|
48
|
-
return t(this,
|
|
140
|
+
return t(this, m);
|
|
49
141
|
}
|
|
50
142
|
get status() {
|
|
51
|
-
return t(this,
|
|
143
|
+
return t(this, l);
|
|
52
144
|
}
|
|
53
145
|
get isLazy() {
|
|
54
|
-
return t(this,
|
|
146
|
+
return t(this, f);
|
|
55
147
|
}
|
|
56
148
|
connectedCallback() {
|
|
57
|
-
const
|
|
58
|
-
|
|
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,
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
|
|
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,
|
|
68
|
-
srcset:
|
|
69
|
-
})),
|
|
70
|
-
(!t(this,
|
|
71
|
-
}), t(this,
|
|
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,
|
|
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
|
-
|
|
78
|
-
if (t(this,
|
|
79
|
-
const
|
|
80
|
-
t(this,
|
|
81
|
-
const
|
|
82
|
-
this.consumeSource(
|
|
83
|
-
t(this,
|
|
84
|
-
}, t(this,
|
|
85
|
-
t(this,
|
|
86
|
-
}, t(this,
|
|
87
|
-
t(this,
|
|
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
|
-
},
|
|
183
|
+
}, z = new WeakMap(), T = new WeakMap(), B = new WeakMap();
|
|
92
184
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
185
|
+
W as Source,
|
|
186
|
+
ct as SourceElement,
|
|
187
|
+
Y as SourceManager,
|
|
188
|
+
X as SourceSet
|
|
97
189
|
};
|