aptechka 0.65.4 → 0.65.6
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/{DragControls-DNwpgJ9b.js → DragControls-DGDUw6bM.js} +2 -2
- package/lib/{Tweened-CtbUoAvI.js → Tweened-_pF0zXXN.js} +1 -1
- package/lib/animation/index.js +1 -1
- package/lib/billboard/BillboardBulletsElement.d.ts +1 -0
- package/lib/billboard/BillboardElement.d.ts +1 -0
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +71 -65
- package/lib/controls/index.js +1 -1
- package/lib/custom-elements-DBnCK7Zx.js +24 -0
- package/lib/custom-elements-Dh4TWRDJ.cjs +1 -0
- package/lib/{easings-DngMp9IN.js → easings-BEmRlrDd.js} +14 -14
- package/lib/scroll/index.js +3 -3
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.d.ts +1 -0
- package/lib/ticker/index.js +85 -82
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +149 -169
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import { g as Z } from "./dom-CVWzyXPH.js";
|
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
9
9
|
import { ticker as D } from "./ticker/index.js";
|
|
10
10
|
import "./Store-0BVty6AZ.js";
|
|
11
|
-
import { a as ee } from "./easings-
|
|
12
|
-
import { T as te } from "./Tweened-
|
|
11
|
+
import { a as ee } from "./easings-BEmRlrDd.js";
|
|
12
|
+
import { T as te } from "./Tweened-_pF0zXXN.js";
|
|
13
13
|
import { s as ie } from "./gestures-CcXV6fCp.js";
|
|
14
14
|
import { p as se } from "./number-CbdpfO3u.js";
|
|
15
15
|
import { TICK_ORDER as he } from "./order/index.js";
|
|
@@ -15,7 +15,7 @@ var c = (a, r, e) => r in a ? O(a, r, { enumerable: !0, configurable: !0, writab
|
|
|
15
15
|
}, g = (a, r) => b(a, x(r));
|
|
16
16
|
var A = (a, r, e) => r.has(a) || f("Cannot " + e);
|
|
17
17
|
var s = (a, r, e) => (A(a, r, "read from private field"), e ? e.call(a) : r.get(a)), n = (a, r, e) => r.has(a) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), u = (a, r, e, i) => (A(a, r, "write to private field"), i ? i.call(a, e) : r.set(a, e), e);
|
|
18
|
-
import { l as h, e as T } from "./easings-
|
|
18
|
+
import { l as h, e as T } from "./easings-BEmRlrDd.js";
|
|
19
19
|
import { c as q } from "./math-BOBiC4TN.js";
|
|
20
20
|
import { p as w } from "./number-CbdpfO3u.js";
|
|
21
21
|
import { n as z } from "./polyfills-DJrTJQky.js";
|
package/lib/animation/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export declare class BillboardElement extends HTMLElement {
|
|
|
11
11
|
get counter(): number;
|
|
12
12
|
get loop(): CSSProperty<boolean>;
|
|
13
13
|
get autoplay(): CSSProperty<string | false>;
|
|
14
|
+
get autoplayDuration(): number;
|
|
14
15
|
get swipe(): CSSProperty<false | Axes2D>;
|
|
15
16
|
get itemElements(): HTMLElement[];
|
|
16
17
|
get groups(): Map<string, HTMLElement[]>;
|
package/lib/billboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=n=>{throw TypeError(n)};var Q=(n,l,e)=>l.has(n)||W("Cannot "+e);var t=(n,l,e)=>(Q(n,l,"read from private field"),e?e.call(n):l.get(n)),i=(n,l,e)=>l.has(n)?W("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,e),c=(n,l,e,s)=>(Q(n,l,"write to private field"),s?s.call(n,e):l.set(n,e),e),d=(n,l,e)=>(Q(n,l,"access private method"),e);var F=(n,l,e)=>new Promise((s,r)=>{var o=
|
|
1
|
+
"use strict";var W=n=>{throw TypeError(n)};var Q=(n,l,e)=>l.has(n)||W("Cannot "+e);var t=(n,l,e)=>(Q(n,l,"read from private field"),e?e.call(n):l.get(n)),i=(n,l,e)=>l.has(n)?W("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,e),c=(n,l,e,s)=>(Q(n,l,"write to private field"),s?s.call(n,e):l.set(n,e),e),d=(n,l,e)=>(Q(n,l,"access private method"),e);var F=(n,l,e)=>new Promise((s,r)=>{var o=v=>{try{x(e.next(v))}catch(z){r(z)}},f=v=>{try{x(e.throw(v))}catch(z){r(z)}},x=v=>v.done?s(v.value):Promise.resolve(v.value).then(o,f);x((e=e.apply(n,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../index-DekP7OZe.cjs"),et=require("../custom-elements-Dh4TWRDJ.cjs"),V=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const P=require("../css-property/index.cjs"),st=require("../events-KVanG9sR.cjs"),it=require("../gestures-C7gbKx11.cjs"),rt=require("../math-GDWEqu7y.cjs"),X=require("../number-DyefJ5a1.cjs");var T,A,E,L,C,B,N,m,h,b,a,R,G,q,O,U,M,J,K;class j extends HTMLElement{constructor(){super(...arguments);i(this,a);i(this,T,new P.CSSProperty(this,"--resize",!0));i(this,A,new P.CSSProperty(this,"--loop",!0));i(this,E,new P.CSSProperty(this,"--autoplay",!1));i(this,L,new P.CSSProperty(this,"--swipe","x"));i(this,C);i(this,B,!1);i(this,N,[]);i(this,m,new Map);i(this,h,0);i(this,b,0);i(this,q,e=>{c(this,B,e.isIntersecting),t(this,B)?d(this,a,G).call(this):clearInterval(t(this,C))});i(this,O,()=>{clearInterval(t(this,C)),t(this,B)&&c(this,C,setInterval(t(this,J),this.autoplayDuration))});i(this,J,()=>{d(this,a,M).call(this,t(this,h)+1)});i(this,K,e=>{if(!t(this,L).current)return;let s=0;it.setupDrag(r=>{const o=e.x-r.x,f=e.y-r.y;t(this,L).current==="x"?Math.abs(o)>Math.abs(f)&&Math.abs(o)>10&&(s=Math.sign(o)):t(this,L).current==="y"&&Math.abs(f)>Math.abs(o)&&Math.abs(f)>10&&(s=Math.sign(f))},()=>{s&&this.shift(s)})})}get counter(){return t(this,h)}get loop(){return t(this,A)}get autoplay(){return t(this,E)}get autoplayDuration(){return parseFloat(t(this,E).current||"0")*1e3}get swipe(){return t(this,L)}get itemElements(){return t(this,N)}get groups(){return t(this,m)}get length(){return t(this,b)}addItem(e){d(this,a,R).call(this,e),d(this,a,M).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(d(this,a,M).call(this,e),d(this,a,G).call(this))}shift(e){this.set(t(this,h)+e)}connectedCallback(){[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)].forEach(s=>{d(this,a,R).call(this,s)}),t(this,m).forEach(s=>{var r;(r=s[0])==null||r.classList.add("current")}),t(this,E).subscribe(s=>{s.current?(I.intersector.subscribe(this,t(this,q)),d(this,a,G).call(this)):(c(this,B,!0),I.intersector.unsubscribe(t(this,q)),clearInterval(t(this,C)),d(this,a,M).call(this,0))}),t(this,E).observe(),t(this,L).observe(),t(this,A).observe(),t(this,T).observe(),d(this,a,M).call(this,0),this.addEventListener("pointerdown",t(this,K))}disconnectedCallback(){t(this,E).unobserve(),t(this,L).unobserve(),t(this,A).unobserve(),t(this,T).unobserve(),t(this,m).clear(),I.intersector.unsubscribe(t(this,q)),clearInterval(t(this,C))}}T=new WeakMap,A=new WeakMap,E=new WeakMap,L=new WeakMap,C=new WeakMap,B=new WeakMap,N=new WeakMap,m=new WeakMap,h=new WeakMap,b=new WeakMap,a=new WeakSet,R=function(e){t(this,N).push(e);const s=e.getAttribute("data-billboard-item-group")||"default";let r=t(this,m).get(s);r||(r=[],t(this,m).set(s,r)),r.push(e),c(this,b,0),t(this,m).forEach(o=>{o.length>t(this,b)&&c(this,b,o.length)})},G=function(){t(this,E).current!==!1&&t(this,O).call(this)},q=new WeakMap,O=new WeakMap,U=function(e,s){e.classList.remove("current","previous","next","previous-sibling","next-sibling"),s===t(this,h)?e.classList.add("current"):s<t(this,h)?e.classList.add("previous"):s>t(this,h)&&e.classList.add("next"),s===X.loopNumber(t(this,h)-1,this.length)?e.classList.add("previous-sibling"):s===(t(this,h)+1)%this.length&&e.classList.add("next-sibling")},M=function(){return F(this,arguments,function*(e=t(this,h)){const s=t(this,h);t(this,A).current?c(this,h,X.loopNumber(e,t(this,b))):c(this,h,rt.clamp(e,0,t(this,b)-1)),this.classList.remove("forward","backward","next-round","prev-round"),t(this,h)-s>=0?this.classList.add("forward"):t(this,h)-s<0&&this.classList.add("backward");let r=[];t(this,m).forEach(o=>{o.forEach((f,x)=>{const v=f.classList.contains("visited");x===t(this,h)&&!v?(f.classList.add("visited"),r.push(new Promise(z=>{setTimeout(()=>{d(this,a,U).call(this,f,x),z()},10)}))):d(this,a,U).call(this,f,x)})}),r.length&&(yield Promise.all(r)),this.classList.toggle("has-length",t(this,b)>1),this.classList.toggle("start",t(this,h)===0),this.classList.toggle("end",t(this,h)===t(this,b)-1),this.style.setProperty("--counter",t(this,h).toString()),this.style.setProperty("--sections",t(this,b).toString()),t(this,h)!==s&&(st.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,h)}}),t(this,T).current&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)),setTimeout(()=>{this.classList.remove("next-round","prev-round")},10)})},J=new WeakMap,K=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",j);var p,D,g,_,H;class Y extends HTMLElement{constructor(){super(...arguments);i(this,p,null);i(this,D,null);i(this,g,[]);i(this,_,e=>{const s=e.currentTarget,r=t(this,g).findIndex(o=>o===s);r>=0&&t(this,p).set(r)});i(this,H,()=>{t(this,g).forEach((e,s)=>{s===t(this,p).counter?e.classList.add("current"):e.classList.remove("current")})})}get buttonElements(){return t(this,g)}connectedCallback(){return F(this,null,function*(){var e;if(yield et.whenDefined("e-billboard"),c(this,p,V.findParentElement(this,j)),t(this,p)&&this.isConnected){this.innerHTML="";const s=t(this,p).length;c(this,D,document.createElement("div"));for(let r=0;r<s;r++){const o=document.createElement("button");o.setAttribute("aria-label",`Go to item ${r+1}`),t(this,g).push(o),t(this,D).appendChild(o)}this.appendChild(t(this,D)),t(this,g).forEach(r=>{r.addEventListener("click",t(this,_))}),(e=t(this,p))==null||e.addEventListener("billboardChange",t(this,H)),t(this,H).call(this)}})}disconnectedCallback(){var e;t(this,g).forEach(s=>{s.removeEventListener("click",t(this,_))}),(e=t(this,p))==null||e.removeEventListener("billboardChange",t(this,H)),this.innerHTML="",c(this,g,[])}}p=new WeakMap,D=new WeakMap,g=new WeakMap,_=new WeakMap,H=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Y);var w,y,k;class Z extends HTMLElement{constructor(){super();i(this,w,new P.CSSProperty(this,"--index",0));i(this,y,null);i(this,k,()=>{var e;t(this,w).current===((e=t(this,y))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,y)&&(!this.handleClick||this.handleClick(e))&&t(this,y).set(t(this,w).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){var e;this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),c(this,y,V.findParentElement(this,j)),(e=t(this,y))==null||e.addEventListener("billboardChange",t(this,k)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,k).call(this)}),t(this,w).subscribe(t(this,k)),t(this,w).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,w).unsubscribe(t(this,k)),t(this,w).unobserve(),(e=t(this,y))==null||e.removeEventListener("billboardChange",t(this,k))}}w=new WeakMap,y=new WeakMap,k=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",Z);var S,u,$;class tt extends HTMLElement{constructor(){super();i(this,S,new P.CSSProperty(this,"--step",1));i(this,u,null);i(this,$,()=>{t(this,u)&&(!t(this,u).loop.current&&(t(this,u).counter===0&&t(this,S).current<=0||t(this,u).counter===t(this,u).length-1&&t(this,S).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,u)&&(!this.handleClick||this.handleClick(e))&&t(this,u).shift(t(this,S).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return F(this,null,function*(){var e;yield customElements.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),t(this,S).observe(),this.tabIndex=0,c(this,u,V.findParentElement(this,j)),(e=t(this,u))==null||e.addEventListener("billboardChange",t(this,$)),setTimeout(()=>{t(this,$).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,S).unobserve(),(e=t(this,u))==null||e.removeEventListener("billboardChange",t(this,$))}}S=new WeakMap,u=new WeakMap,$=new WeakMap;I.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",tt);exports.BillboardBulletsElement=Y;exports.BillboardElement=j;exports.BillboardSetButtonElement=Z;exports.BillboardStepButtonElement=tt;
|
package/lib/billboard/index.js
CHANGED
|
@@ -4,64 +4,62 @@ var Y = (n) => {
|
|
|
4
4
|
var Q = (n, l, e) => l.has(n) || Y("Cannot " + e);
|
|
5
5
|
var t = (n, l, e) => (Q(n, l, "read from private field"), e ? e.call(n) : l.get(n)), i = (n, l, e) => l.has(n) ? Y("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(n) : l.set(n, e), c = (n, l, e, s) => (Q(n, l, "write to private field"), s ? s.call(n, e) : l.set(n, e), e), d = (n, l, e) => (Q(n, l, "access private method"), e);
|
|
6
6
|
var F = (n, l, e) => new Promise((s, r) => {
|
|
7
|
-
var o = (
|
|
7
|
+
var o = (v) => {
|
|
8
8
|
try {
|
|
9
|
-
A(e.next(
|
|
9
|
+
A(e.next(v));
|
|
10
10
|
} catch ($) {
|
|
11
11
|
r($);
|
|
12
12
|
}
|
|
13
|
-
}, f = (
|
|
13
|
+
}, f = (v) => {
|
|
14
14
|
try {
|
|
15
|
-
A(e.throw(
|
|
15
|
+
A(e.throw(v));
|
|
16
16
|
} catch ($) {
|
|
17
17
|
r($);
|
|
18
18
|
}
|
|
19
|
-
}, A = (
|
|
19
|
+
}, A = (v) => v.done ? s(v.value) : Promise.resolve(v.value).then(o, f);
|
|
20
20
|
A((e = e.apply(n, l)).next());
|
|
21
21
|
});
|
|
22
22
|
import { a as R, i as W } from "../index-Bv9zgfdb.js";
|
|
23
|
+
import { w as _ } from "../custom-elements-DBnCK7Zx.js";
|
|
23
24
|
import { b as X } from "../dom-CVWzyXPH.js";
|
|
24
25
|
import "construct-style-sheets-polyfill";
|
|
25
26
|
import { CSSProperty as T } from "../css-property/index.js";
|
|
26
|
-
import { d as
|
|
27
|
-
import { s as
|
|
28
|
-
import { c as
|
|
27
|
+
import { d as tt } from "../events-CsVF98U6.js";
|
|
28
|
+
import { s as et } from "../gestures-CcXV6fCp.js";
|
|
29
|
+
import { c as st } from "../math-BOBiC4TN.js";
|
|
29
30
|
import { l as Z } from "../number-CbdpfO3u.js";
|
|
30
|
-
var
|
|
31
|
+
var D, M, E, L, C, I, N, m, h, b, a, U, G, B, j, V, S, J, K;
|
|
31
32
|
class O extends HTMLElement {
|
|
32
33
|
constructor() {
|
|
33
34
|
super(...arguments);
|
|
34
35
|
i(this, a);
|
|
35
|
-
i(this,
|
|
36
|
+
i(this, D, new T(this, "--resize", !0));
|
|
36
37
|
i(this, M, new T(this, "--loop", !0));
|
|
37
|
-
i(this,
|
|
38
|
-
i(this,
|
|
38
|
+
i(this, E, new T(this, "--autoplay", !1));
|
|
39
|
+
i(this, L, new T(this, "--swipe", "x"));
|
|
39
40
|
i(this, C);
|
|
40
41
|
i(this, I, !1);
|
|
41
42
|
i(this, N, []);
|
|
42
43
|
i(this, m, /* @__PURE__ */ new Map());
|
|
43
44
|
i(this, h, 0);
|
|
44
|
-
i(this,
|
|
45
|
-
i(this,
|
|
45
|
+
i(this, b, 0);
|
|
46
|
+
i(this, B, (e) => {
|
|
46
47
|
c(this, I, e.isIntersecting), t(this, I) ? d(this, a, G).call(this) : clearInterval(t(this, C));
|
|
47
48
|
});
|
|
48
49
|
i(this, j, () => {
|
|
49
|
-
clearInterval(t(this, C)), t(this, I) && c(this, C, setInterval(
|
|
50
|
-
t(this, J),
|
|
51
|
-
parseFloat(t(this, v).current || "0") * 1e3
|
|
52
|
-
));
|
|
50
|
+
clearInterval(t(this, C)), t(this, I) && c(this, C, setInterval(t(this, J), this.autoplayDuration));
|
|
53
51
|
});
|
|
54
52
|
i(this, J, () => {
|
|
55
53
|
d(this, a, S).call(this, t(this, h) + 1);
|
|
56
54
|
});
|
|
57
55
|
i(this, K, (e) => {
|
|
58
|
-
if (!t(this,
|
|
56
|
+
if (!t(this, L).current)
|
|
59
57
|
return;
|
|
60
58
|
let s = 0;
|
|
61
|
-
|
|
59
|
+
et(
|
|
62
60
|
(r) => {
|
|
63
61
|
const o = e.x - r.x, f = e.y - r.y;
|
|
64
|
-
t(this,
|
|
62
|
+
t(this, L).current === "x" ? Math.abs(o) > Math.abs(f) && Math.abs(o) > 10 && (s = Math.sign(o)) : t(this, L).current === "y" && Math.abs(f) > Math.abs(o) && Math.abs(f) > 10 && (s = Math.sign(f));
|
|
65
63
|
},
|
|
66
64
|
() => {
|
|
67
65
|
s && this.shift(s);
|
|
@@ -76,10 +74,13 @@ class O extends HTMLElement {
|
|
|
76
74
|
return t(this, M);
|
|
77
75
|
}
|
|
78
76
|
get autoplay() {
|
|
79
|
-
return t(this,
|
|
77
|
+
return t(this, E);
|
|
78
|
+
}
|
|
79
|
+
get autoplayDuration() {
|
|
80
|
+
return parseFloat(t(this, E).current || "0") * 1e3;
|
|
80
81
|
}
|
|
81
82
|
get swipe() {
|
|
82
|
-
return t(this,
|
|
83
|
+
return t(this, L);
|
|
83
84
|
}
|
|
84
85
|
get itemElements() {
|
|
85
86
|
return t(this, N);
|
|
@@ -88,7 +89,7 @@ class O extends HTMLElement {
|
|
|
88
89
|
return t(this, m);
|
|
89
90
|
}
|
|
90
91
|
get length() {
|
|
91
|
-
return t(this,
|
|
92
|
+
return t(this, b);
|
|
92
93
|
}
|
|
93
94
|
addItem(e) {
|
|
94
95
|
d(this, a, U).call(this, e), d(this, a, S).call(this);
|
|
@@ -109,24 +110,24 @@ class O extends HTMLElement {
|
|
|
109
110
|
}), t(this, m).forEach((s) => {
|
|
110
111
|
var r;
|
|
111
112
|
(r = s[0]) == null || r.classList.add("current");
|
|
112
|
-
}), t(this,
|
|
113
|
-
s.current ? (R.subscribe(this, t(this,
|
|
114
|
-
}), t(this,
|
|
113
|
+
}), t(this, E).subscribe((s) => {
|
|
114
|
+
s.current ? (R.subscribe(this, t(this, B)), d(this, a, G).call(this)) : (c(this, I, !0), R.unsubscribe(t(this, B)), clearInterval(t(this, C)), d(this, a, S).call(this, 0));
|
|
115
|
+
}), t(this, E).observe(), t(this, L).observe(), t(this, M).observe(), t(this, D).observe(), d(this, a, S).call(this, 0), this.addEventListener("pointerdown", t(this, K));
|
|
115
116
|
}
|
|
116
117
|
disconnectedCallback() {
|
|
117
|
-
t(this,
|
|
118
|
+
t(this, E).unobserve(), t(this, L).unobserve(), t(this, M).unobserve(), t(this, D).unobserve(), t(this, m).clear(), R.unsubscribe(t(this, B)), clearInterval(t(this, C));
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
+
D = new WeakMap(), M = new WeakMap(), E = new WeakMap(), L = new WeakMap(), C = new WeakMap(), I = new WeakMap(), N = new WeakMap(), m = new WeakMap(), h = new WeakMap(), b = new WeakMap(), a = new WeakSet(), U = function(e) {
|
|
121
122
|
t(this, N).push(e);
|
|
122
123
|
const s = e.getAttribute("data-billboard-item-group") || "default";
|
|
123
124
|
let r = t(this, m).get(s);
|
|
124
|
-
r || (r = [], t(this, m).set(s, r)), r.push(e), c(this,
|
|
125
|
-
o.length > t(this,
|
|
125
|
+
r || (r = [], t(this, m).set(s, r)), r.push(e), c(this, b, 0), t(this, m).forEach((o) => {
|
|
126
|
+
o.length > t(this, b) && c(this, b, o.length);
|
|
126
127
|
});
|
|
127
128
|
}, G = function() {
|
|
128
|
-
t(this,
|
|
129
|
-
},
|
|
129
|
+
t(this, E).current !== !1 && t(this, j).call(this);
|
|
130
|
+
}, B = new WeakMap(), j = new WeakMap(), V = function(e, s) {
|
|
130
131
|
e.classList.remove(
|
|
131
132
|
"current",
|
|
132
133
|
"previous",
|
|
@@ -137,12 +138,12 @@ B = new WeakMap(), M = new WeakMap(), v = new WeakMap(), E = new WeakMap(), C =
|
|
|
137
138
|
}, S = function() {
|
|
138
139
|
return F(this, arguments, function* (e = t(this, h)) {
|
|
139
140
|
const s = t(this, h);
|
|
140
|
-
t(this, M).current ? c(this, h, Z(e, t(this,
|
|
141
|
+
t(this, M).current ? c(this, h, Z(e, t(this, b))) : c(this, h, st(e, 0, t(this, b) - 1)), this.classList.remove("forward", "backward", "next-round", "prev-round"), t(this, h) - s >= 0 ? this.classList.add("forward") : t(this, h) - s < 0 && this.classList.add("backward");
|
|
141
142
|
let r = [];
|
|
142
143
|
t(this, m).forEach((o) => {
|
|
143
144
|
o.forEach((f, A) => {
|
|
144
|
-
const
|
|
145
|
-
A === t(this, h) && !
|
|
145
|
+
const v = f.classList.contains("visited");
|
|
146
|
+
A === t(this, h) && !v ? (f.classList.add("visited"), r.push(
|
|
146
147
|
new Promise(($) => {
|
|
147
148
|
setTimeout(() => {
|
|
148
149
|
d(this, a, V).call(this, f, A), $();
|
|
@@ -150,45 +151,50 @@ B = new WeakMap(), M = new WeakMap(), v = new WeakMap(), E = new WeakMap(), C =
|
|
|
150
151
|
})
|
|
151
152
|
)) : d(this, a, V).call(this, f, A);
|
|
152
153
|
});
|
|
153
|
-
}), r.length && (yield Promise.all(r)), this.classList.toggle("has-length", t(this,
|
|
154
|
+
}), r.length && (yield Promise.all(r)), this.classList.toggle("has-length", t(this, b) > 1), this.classList.toggle("start", t(this, h) === 0), this.classList.toggle("end", t(this, h) === t(this, b) - 1), this.style.setProperty("--counter", t(this, h).toString()), this.style.setProperty("--sections", t(this, b).toString()), t(this, h) !== s && (tt(this, "billboardChange", {
|
|
154
155
|
detail: {
|
|
155
156
|
counter: t(this, h)
|
|
156
157
|
}
|
|
157
|
-
}), t(this,
|
|
158
|
+
}), t(this, D).current && setTimeout(() => {
|
|
158
159
|
window.dispatchEvent(new Event("resize"));
|
|
159
|
-
}, 0))
|
|
160
|
+
}, 0)), setTimeout(() => {
|
|
161
|
+
this.classList.remove("next-round", "prev-round");
|
|
162
|
+
}, 10);
|
|
160
163
|
});
|
|
161
164
|
}, J = new WeakMap(), K = new WeakMap();
|
|
162
165
|
customElements.get("e-billboard") || customElements.define("e-billboard", O);
|
|
163
|
-
var p, H,
|
|
164
|
-
class
|
|
166
|
+
var p, H, g, q, P;
|
|
167
|
+
class it extends HTMLElement {
|
|
165
168
|
constructor() {
|
|
166
169
|
super(...arguments);
|
|
167
170
|
i(this, p, null);
|
|
168
171
|
i(this, H, null);
|
|
169
|
-
i(this,
|
|
172
|
+
i(this, g, []);
|
|
170
173
|
i(this, q, (e) => {
|
|
171
|
-
const s = e.currentTarget, r = t(this,
|
|
174
|
+
const s = e.currentTarget, r = t(this, g).findIndex((o) => o === s);
|
|
172
175
|
r >= 0 && t(this, p).set(r);
|
|
173
176
|
});
|
|
174
177
|
i(this, P, () => {
|
|
175
|
-
t(this,
|
|
178
|
+
t(this, g).forEach((e, s) => {
|
|
176
179
|
s === t(this, p).counter ? e.classList.add("current") : e.classList.remove("current");
|
|
177
180
|
});
|
|
178
181
|
});
|
|
179
182
|
}
|
|
183
|
+
get buttonElements() {
|
|
184
|
+
return t(this, g);
|
|
185
|
+
}
|
|
180
186
|
connectedCallback() {
|
|
181
187
|
return F(this, null, function* () {
|
|
182
188
|
var e;
|
|
183
|
-
if (c(this, p, X(this, O)), t(this, p) &&
|
|
189
|
+
if (yield _("e-billboard"), c(this, p, X(this, O)), t(this, p) && this.isConnected) {
|
|
184
190
|
this.innerHTML = "";
|
|
185
191
|
const s = t(this, p).length;
|
|
186
192
|
c(this, H, document.createElement("div"));
|
|
187
193
|
for (let r = 0; r < s; r++) {
|
|
188
194
|
const o = document.createElement("button");
|
|
189
|
-
o.setAttribute("aria-label", `Go to item ${r + 1}`), t(this,
|
|
195
|
+
o.setAttribute("aria-label", `Go to item ${r + 1}`), t(this, g).push(o), t(this, H).appendChild(o);
|
|
190
196
|
}
|
|
191
|
-
this.appendChild(t(this, H)), t(this,
|
|
197
|
+
this.appendChild(t(this, H)), t(this, g).forEach((r) => {
|
|
192
198
|
r.addEventListener("click", t(this, q));
|
|
193
199
|
}), (e = t(this, p)) == null || e.addEventListener(
|
|
194
200
|
"billboardChange",
|
|
@@ -199,18 +205,18 @@ class st extends HTMLElement {
|
|
|
199
205
|
}
|
|
200
206
|
disconnectedCallback() {
|
|
201
207
|
var e;
|
|
202
|
-
t(this,
|
|
208
|
+
t(this, g).forEach((s) => {
|
|
203
209
|
s.removeEventListener("click", t(this, q));
|
|
204
210
|
}), (e = t(this, p)) == null || e.removeEventListener(
|
|
205
211
|
"billboardChange",
|
|
206
212
|
t(this, P)
|
|
207
|
-
), this.innerHTML = "", c(this,
|
|
213
|
+
), this.innerHTML = "", c(this, g, []);
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
|
-
p = new WeakMap(), H = new WeakMap(),
|
|
211
|
-
W && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets",
|
|
216
|
+
p = new WeakMap(), H = new WeakMap(), g = new WeakMap(), q = new WeakMap(), P = new WeakMap();
|
|
217
|
+
W && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", it);
|
|
212
218
|
var w, k, x;
|
|
213
|
-
class
|
|
219
|
+
class rt extends HTMLElement {
|
|
214
220
|
constructor() {
|
|
215
221
|
super();
|
|
216
222
|
i(this, w, new T(this, "--index", 0));
|
|
@@ -243,18 +249,18 @@ class it extends HTMLElement {
|
|
|
243
249
|
}
|
|
244
250
|
}
|
|
245
251
|
w = new WeakMap(), k = new WeakMap(), x = new WeakMap();
|
|
246
|
-
W && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button",
|
|
247
|
-
var y,
|
|
248
|
-
class
|
|
252
|
+
W && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", rt);
|
|
253
|
+
var y, u, z;
|
|
254
|
+
class nt extends HTMLElement {
|
|
249
255
|
constructor() {
|
|
250
256
|
super();
|
|
251
257
|
i(this, y, new T(this, "--step", 1));
|
|
252
|
-
i(this,
|
|
258
|
+
i(this, u, null);
|
|
253
259
|
i(this, z, () => {
|
|
254
|
-
t(this,
|
|
260
|
+
t(this, u) && (!t(this, u).loop.current && (t(this, u).counter === 0 && t(this, y).current <= 0 || t(this, u).counter === t(this, u).length - 1 && t(this, y).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
|
|
255
261
|
});
|
|
256
262
|
this.addEventListener("click", (e) => {
|
|
257
|
-
t(this,
|
|
263
|
+
t(this, u) && (!this.handleClick || this.handleClick(e)) && t(this, u).shift(t(this, y).current);
|
|
258
264
|
}), this.addEventListener("keydown", (e) => {
|
|
259
265
|
e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
|
|
260
266
|
});
|
|
@@ -262,7 +268,7 @@ class rt extends HTMLElement {
|
|
|
262
268
|
connectedCallback() {
|
|
263
269
|
return F(this, null, function* () {
|
|
264
270
|
var e;
|
|
265
|
-
yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, y).observe(), this.tabIndex = 0, c(this,
|
|
271
|
+
yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, y).observe(), this.tabIndex = 0, c(this, u, X(this, O)), (e = t(this, u)) == null || e.addEventListener(
|
|
266
272
|
"billboardChange",
|
|
267
273
|
t(this, z)
|
|
268
274
|
), setTimeout(() => {
|
|
@@ -272,17 +278,17 @@ class rt extends HTMLElement {
|
|
|
272
278
|
}
|
|
273
279
|
disconnectedCallback() {
|
|
274
280
|
var e;
|
|
275
|
-
this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, y).unobserve(), (e = t(this,
|
|
281
|
+
this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, y).unobserve(), (e = t(this, u)) == null || e.removeEventListener(
|
|
276
282
|
"billboardChange",
|
|
277
283
|
t(this, z)
|
|
278
284
|
);
|
|
279
285
|
}
|
|
280
286
|
}
|
|
281
|
-
y = new WeakMap(),
|
|
282
|
-
W && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button",
|
|
287
|
+
y = new WeakMap(), u = new WeakMap(), z = new WeakMap();
|
|
288
|
+
W && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", nt);
|
|
283
289
|
export {
|
|
284
|
-
|
|
290
|
+
it as BillboardBulletsElement,
|
|
285
291
|
O as BillboardElement,
|
|
286
|
-
|
|
287
|
-
|
|
292
|
+
rt as BillboardSetButtonElement,
|
|
293
|
+
nt as BillboardStepButtonElement
|
|
288
294
|
};
|
package/lib/controls/index.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var o = (a, t, n) => new Promise((r, m) => {
|
|
2
|
+
var w = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
i(n.next(e));
|
|
5
|
+
} catch (s) {
|
|
6
|
+
m(s);
|
|
7
|
+
}
|
|
8
|
+
}, c = (e) => {
|
|
9
|
+
try {
|
|
10
|
+
i(n.throw(e));
|
|
11
|
+
} catch (s) {
|
|
12
|
+
m(s);
|
|
13
|
+
}
|
|
14
|
+
}, i = (e) => e.done ? r(e.value) : Promise.resolve(e.value).then(w, c);
|
|
15
|
+
i((n = n.apply(a, t)).next());
|
|
16
|
+
});
|
|
17
|
+
function l(...a) {
|
|
18
|
+
return o(this, null, function* () {
|
|
19
|
+
return yield Promise.all(a.map((t) => customElements.whenDefined(t)));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
l as w
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var f=(i,t,n)=>new Promise((m,c)=>{var r=e=>{try{s(n.next(e))}catch(a){c(a)}},u=e=>{try{s(n.throw(e))}catch(a){c(a)}},s=e=>e.done?m(e.value):Promise.resolve(e.value).then(r,u);s((n=n.apply(i,t)).next())});function w(...i){return f(this,null,function*(){return yield Promise.all(i.map(t=>customElements.whenDefined(t)))})}exports.whenDefined=w;
|
|
@@ -19,20 +19,20 @@ const n = (e) => e, s = (e) => e * e, a = (e) => e * (2 - e), r = (e) => e < 0.5
|
|
|
19
19
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
20
20
|
export {
|
|
21
21
|
s as a,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
a as b,
|
|
23
|
+
r as c,
|
|
24
|
+
u as d,
|
|
25
25
|
x as e,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
o as f,
|
|
27
|
+
c as g,
|
|
28
|
+
O as h,
|
|
29
|
+
i,
|
|
30
|
+
I as j,
|
|
31
|
+
Q as k,
|
|
32
32
|
n as l,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
p,
|
|
37
|
-
|
|
33
|
+
b as m,
|
|
34
|
+
l as n,
|
|
35
|
+
p as o,
|
|
36
|
+
d as p,
|
|
37
|
+
g as q
|
|
38
38
|
};
|
package/lib/scroll/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var Ke = (u, n, e) => new Promise((i, r) => {
|
|
|
32
32
|
});
|
|
33
33
|
import { S as ns } from "../Store-0BVty6AZ.js";
|
|
34
34
|
import { i as D } from "../index-Bv9zgfdb.js";
|
|
35
|
-
import {
|
|
35
|
+
import { q as hs } from "../easings-BEmRlrDd.js";
|
|
36
36
|
import { i as os } from "../element-CGVl1jA-.js";
|
|
37
37
|
import { d as oe } from "../events-CsVF98U6.js";
|
|
38
38
|
import { d as Ae } from "../function-C10DGppn.js";
|
|
@@ -43,8 +43,8 @@ import { c as je } from "../stylesheet-DpnWNVyD.js";
|
|
|
43
43
|
import "../ticker/index.js";
|
|
44
44
|
import { TICK_ORDER as as, RESIZE_ORDER as De } from "../order/index.js";
|
|
45
45
|
import { D as us } from "../Damped-YrqW5V4w.js";
|
|
46
|
-
import { T as ds } from "../Tweened-
|
|
47
|
-
import { W as bs, K as ps, D as fs, A as ms } from "../DragControls-
|
|
46
|
+
import { T as ds } from "../Tweened-_pF0zXXN.js";
|
|
47
|
+
import { W as bs, K as ps, D as fs, A as ms } from "../DragControls-DGDUw6bM.js";
|
|
48
48
|
import { windowResizer as Wt } from "../window-resizer/index.js";
|
|
49
49
|
import { scrollEntries as Ct } from "../scroll-entries/index.js";
|
|
50
50
|
import { cssUnitParser as Ze } from "../css-unit-parser/index.js";
|
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var I=h=>{throw TypeError(h)};var B=(h,e,s)=>e.has(h)||I("Cannot "+s);var i=(h,e,s)=>(B(h,e,"read from private field"),s?s.call(h):e.get(h)),r=(h,e,s)=>e.has(h)?I("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,s),t=(h,e,s,n)=>(B(h,e,"write to private field"),n?n.call(h,s):e.set(h,s),s),E=(h,e,s)=>(B(h,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../index-DekP7OZe.cjs"),j=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");var g,u,v,k,b,m,w,l,d,y,A;class C{constructor(e,s){r(this,g);r(this,u);r(this,v);r(this,k,0);r(this,b,0);r(this,m,0);r(this,w,0);r(this,l,0);r(this,d,!1);r(this,y,null);r(this,A,e=>{const s=e[0];t(this,d,s.isIntersecting),i(this,d)&&t(this,w,i(this,k))});if(t(this,g,e),t(this,u,s==null?void 0:s.maxFPS),t(this,v,(s==null?void 0:s.order)||0),s!=null&&s.culling&&L.isBrowser){const n=j.getElement(s.culling);n&&(t(this,y,new IntersectionObserver(i(this,A))),i(this,y).observe(n))}else t(this,d,!0)}get callback(){return i(this,g)}get order(){return i(this,v)}sync(e){t(this,b,e-i(this,l))}tick(e){if(t(this,k,e),t(this,l,Math.max(0,e-i(this,b))),i(this,m)||t(this,m,e),i(this,u))if(i(this,l)>=1e3/i(this,u))t(this,b,e-i(this,l)%i(this,u));else return;else t(this,b,e);i(this,d)&&i(this,g).call(this,{timeBetweenFrames:i(this,l),timestamp:e,subscribeTimestamp:i(this,m),timeElapsedSinceSubscription:e-i(this,m),timeElapsedSinceIntersection:e-i(this,w)})}destroy(){var e;(e=i(this,y))==null||e.disconnect()}}g=new WeakMap,u=new WeakMap,v=new WeakMap,k=new WeakMap,b=new WeakMap,m=new WeakMap,w=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,A=new WeakMap;var T,f,a,F,c,o,P,x,S,q;class O{constructor(){r(this,o);r(this,T,0);r(this,f,0);r(this,a);r(this,F,!1);r(this,c,[]);r(this,S,e=>{if(i(this,F)){t(this,F,!1),t(this,T,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,S))),t(this,f,e-i(this,T));for(const s of i(this,c))s.tick(i(this,f))});r(this,q,()=>{document.hidden&&t(this,F,!0)});L.isBrowser&&document.addEventListener("visibilitychange",i(this,q))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new C(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((M,V)=>M.order-V.order))}return E(this,o,P).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||E(this,o,x).call(this))}destroy(){L.isBrowser&&(E(this,o,x).call(this),document.removeEventListener("visibilitychange",i(this,q)))}}T=new WeakMap,f=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,o=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,S)))},x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},S=new WeakMap,q=new WeakMap;const D=new O;exports.Ticker=O;exports.ticker=D;
|
package/lib/ticker/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface TickerCallbackEntry {
|
|
|
4
4
|
subscribeTimestamp: number;
|
|
5
5
|
timeBetweenFrames: number;
|
|
6
6
|
timeElapsedSinceSubscription: number;
|
|
7
|
+
timeElapsedSinceIntersection: number;
|
|
7
8
|
}
|
|
8
9
|
export type TickerCallback = (entry: TickerCallbackEntry) => void;
|
|
9
10
|
export interface TickerAddOptions {
|
package/lib/ticker/index.js
CHANGED
|
@@ -1,120 +1,123 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var B = (h) => {
|
|
2
|
+
throw TypeError(h);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { i as
|
|
7
|
-
import { g as
|
|
4
|
+
var x = (h, s, e) => s.has(h) || B("Cannot " + e);
|
|
5
|
+
var i = (h, s, e) => (x(h, s, "read from private field"), e ? e.call(h) : s.get(h)), r = (h, s, e) => s.has(h) ? B("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(h) : s.set(h, e), t = (h, s, e, n) => (x(h, s, "write to private field"), n ? n.call(h, e) : s.set(h, e), e), A = (h, s, e) => (x(h, s, "access private method"), e);
|
|
6
|
+
import { i as I } from "../index-Bv9zgfdb.js";
|
|
7
|
+
import { g as C } from "../dom-CVWzyXPH.js";
|
|
8
8
|
import "construct-style-sheets-polyfill";
|
|
9
|
-
var
|
|
10
|
-
class
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
var g, m, v, k, u, b, w, l, f, F, L;
|
|
10
|
+
class D {
|
|
11
|
+
constructor(s, e) {
|
|
12
|
+
r(this, g);
|
|
13
|
+
r(this, m);
|
|
14
|
+
r(this, v);
|
|
15
|
+
r(this, k, 0);
|
|
16
|
+
r(this, u, 0);
|
|
17
|
+
r(this, b, 0);
|
|
18
|
+
r(this, w, 0);
|
|
19
|
+
r(this, l, 0);
|
|
20
|
+
r(this, f, !1);
|
|
21
|
+
r(this, F, null);
|
|
22
|
+
r(this, L, (s) => {
|
|
23
|
+
const e = s[0];
|
|
24
|
+
t(this, f, e.isIntersecting), i(this, f) && t(this, w, i(this, k));
|
|
23
25
|
});
|
|
24
|
-
if (t(this,
|
|
25
|
-
const n =
|
|
26
|
+
if (t(this, g, s), t(this, m, e == null ? void 0 : e.maxFPS), t(this, v, (e == null ? void 0 : e.order) || 0), e != null && e.culling && I) {
|
|
27
|
+
const n = C(e.culling);
|
|
26
28
|
n && (t(this, F, new IntersectionObserver(
|
|
27
|
-
|
|
28
|
-
)),
|
|
29
|
+
i(this, L)
|
|
30
|
+
)), i(this, F).observe(n));
|
|
29
31
|
} else
|
|
30
|
-
t(this,
|
|
32
|
+
t(this, f, !0);
|
|
31
33
|
}
|
|
32
34
|
get callback() {
|
|
33
|
-
return
|
|
35
|
+
return i(this, g);
|
|
34
36
|
}
|
|
35
37
|
get order() {
|
|
36
|
-
return
|
|
38
|
+
return i(this, v);
|
|
37
39
|
}
|
|
38
|
-
sync(
|
|
39
|
-
t(this, u,
|
|
40
|
+
sync(s) {
|
|
41
|
+
t(this, u, s - i(this, l));
|
|
40
42
|
}
|
|
41
|
-
tick(
|
|
42
|
-
if (t(this, l, Math.max(0,
|
|
43
|
-
if (
|
|
44
|
-
t(this, u,
|
|
43
|
+
tick(s) {
|
|
44
|
+
if (t(this, k, s), t(this, l, Math.max(0, s - i(this, u))), i(this, b) || t(this, b, s), i(this, m))
|
|
45
|
+
if (i(this, l) >= 1e3 / i(this, m))
|
|
46
|
+
t(this, u, s - i(this, l) % i(this, m));
|
|
45
47
|
else
|
|
46
48
|
return;
|
|
47
49
|
else
|
|
48
|
-
t(this, u,
|
|
49
|
-
|
|
50
|
-
timeBetweenFrames:
|
|
51
|
-
timestamp:
|
|
52
|
-
subscribeTimestamp:
|
|
53
|
-
timeElapsedSinceSubscription:
|
|
50
|
+
t(this, u, s);
|
|
51
|
+
i(this, f) && i(this, g).call(this, {
|
|
52
|
+
timeBetweenFrames: i(this, l),
|
|
53
|
+
timestamp: s,
|
|
54
|
+
subscribeTimestamp: i(this, b),
|
|
55
|
+
timeElapsedSinceSubscription: s - i(this, b),
|
|
56
|
+
timeElapsedSinceIntersection: s - i(this, w)
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
destroy() {
|
|
57
|
-
var
|
|
58
|
-
(
|
|
60
|
+
var s;
|
|
61
|
+
(s = i(this, F)) == null || s.disconnect();
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
class
|
|
64
|
+
g = new WeakMap(), m = new WeakMap(), v = new WeakMap(), k = new WeakMap(), u = new WeakMap(), b = new WeakMap(), w = new WeakMap(), l = new WeakMap(), f = new WeakMap(), F = new WeakMap(), L = new WeakMap();
|
|
65
|
+
var T, d, a, y, c, o, O, q, E, S;
|
|
66
|
+
class H {
|
|
64
67
|
constructor() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
t(this, y, !1), t(this,
|
|
74
|
-
for (const
|
|
75
|
-
|
|
68
|
+
r(this, o);
|
|
69
|
+
r(this, T, 0);
|
|
70
|
+
r(this, d, 0);
|
|
71
|
+
r(this, a);
|
|
72
|
+
r(this, y, !1);
|
|
73
|
+
r(this, c, []);
|
|
74
|
+
r(this, E, (s) => {
|
|
75
|
+
if (i(this, y)) {
|
|
76
|
+
t(this, y, !1), t(this, T, s - i(this, d));
|
|
77
|
+
for (const e of i(this, c))
|
|
78
|
+
e.sync(i(this, d));
|
|
76
79
|
}
|
|
77
|
-
t(this, a, requestAnimationFrame(
|
|
78
|
-
for (const
|
|
79
|
-
|
|
80
|
+
t(this, a, requestAnimationFrame(i(this, E))), t(this, d, s - i(this, T));
|
|
81
|
+
for (const e of i(this, c))
|
|
82
|
+
e.tick(i(this, d));
|
|
80
83
|
});
|
|
81
|
-
|
|
84
|
+
r(this, S, () => {
|
|
82
85
|
document.hidden && t(this, y, !0);
|
|
83
86
|
});
|
|
84
|
-
|
|
87
|
+
I && document.addEventListener(
|
|
85
88
|
"visibilitychange",
|
|
86
|
-
|
|
89
|
+
i(this, S)
|
|
87
90
|
);
|
|
88
91
|
}
|
|
89
|
-
subscribe(
|
|
90
|
-
if (!
|
|
91
|
-
const n = new
|
|
92
|
-
n.sync(performance.now()),
|
|
92
|
+
subscribe(s, e) {
|
|
93
|
+
if (!i(this, c).find((n) => n.callback === s)) {
|
|
94
|
+
const n = new D(s, e);
|
|
95
|
+
n.sync(performance.now()), i(this, c).push(n), t(this, c, i(this, c).sort((P, V) => P.order - V.order));
|
|
93
96
|
}
|
|
94
|
-
return A(this,
|
|
97
|
+
return A(this, o, O).call(this), () => this.unsubscribe(s);
|
|
95
98
|
}
|
|
96
|
-
unsubscribe(
|
|
97
|
-
const
|
|
98
|
-
(n) => n.callback ===
|
|
99
|
+
unsubscribe(s) {
|
|
100
|
+
const e = i(this, c).filter(
|
|
101
|
+
(n) => n.callback === s
|
|
99
102
|
);
|
|
100
|
-
|
|
101
|
-
(n) => n.callback !==
|
|
102
|
-
)),
|
|
103
|
+
e.length && (e.forEach((n) => n.destroy()), t(this, c, i(this, c).filter(
|
|
104
|
+
(n) => n.callback !== s
|
|
105
|
+
)), i(this, c).length || A(this, o, q).call(this));
|
|
103
106
|
}
|
|
104
107
|
destroy() {
|
|
105
|
-
|
|
108
|
+
I && (A(this, o, q).call(this), document.removeEventListener(
|
|
106
109
|
"visibilitychange",
|
|
107
|
-
|
|
110
|
+
i(this, S)
|
|
108
111
|
));
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
const
|
|
114
|
+
T = new WeakMap(), d = new WeakMap(), a = new WeakMap(), y = new WeakMap(), c = new WeakMap(), o = new WeakSet(), O = function() {
|
|
115
|
+
i(this, c).length && !i(this, a) && t(this, a, requestAnimationFrame(i(this, E)));
|
|
116
|
+
}, q = function() {
|
|
117
|
+
i(this, a) && (cancelAnimationFrame(i(this, a)), t(this, a, void 0));
|
|
118
|
+
}, E = new WeakMap(), S = new WeakMap();
|
|
119
|
+
const J = new H();
|
|
117
120
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
H as Ticker,
|
|
122
|
+
J as ticker
|
|
120
123
|
};
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),E=require("../index-DekP7OZe.cjs"),b=require("../canvas-CU5Xjahf.cjs"),C=require("../coordinates-D8Np3cPD.cjs"),D=require("../custom-elements-Dh4TWRDJ.cjs"),g=require("../dom-JBOkFLTh.cjs"),s=require("../easings-GegIwET5.cjs"),Q=require("../element-yhcBhsho.cjs"),A=require("../events-KVanG9sR.cjs"),O=require("../file-DSpfWdd9.cjs"),T=require("../function-MthRj-GJ.cjs"),B=require("../gestures-C7gbKx11.cjs"),S=require("../stylesheet-HWF2a3nr.cjs"),h=require("../layout-Ctc2p3uz.cjs"),a=require("../math-GDWEqu7y.cjs"),m=require("../number-DyefJ5a1.cjs"),c=require("../object-CCiXnER2.cjs"),v=require("../polyfills-Df4r-ETT.cjs"),P=require("../scroll-CIdNtj3G.cjs"),l=require("../string-DUXXtU8v.cjs"),q=require("../style-At6aDoqG.cjs"),f=require("../url-lnBE_6yf.cjs");function R(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function N(t,e){const n=t.length;e=e%n;const o=new Array(n);for(let r=0;r<n;r++){const i=(r+e)%n;o[i]=t[r]}return o}function z(t,e=2){if(!+t)return"0 Bytes";const n=1024,o=e<0?0:e,r=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,i)).toFixed(o))} ${r[i]}`}function j(t){if(navigator.clipboard)navigator.clipboard.writeText(t).then(()=>{console.log("Text copied to clipboard successfully!")}).catch(e=>{console.error("Failed to copy text to clipboard:",e)});else{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.top="0",e.style.left="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")?console.log("Text copied to clipboard successfully!"):console.error("Failed to copy text to clipboard.")}catch(n){console.error("Failed to copy text to clipboard:",n)}document.body.removeChild(e)}}function M(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function V(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function k(t,e){let n=!1;const{x:o,y:r}=t;for(let i=0,u=e.length-1;i<e.length;u=i++){const p=e[i].x,d=e[i].y,y=e[u].x,I=e[u].y;d>r!=I>r&&o<(y-p)*(r-d)/(I-d)+p&&(n=!n)}return n}function w(t,e){const n=t.style.getPropertyValue(e);if(n){const o=n.toString();return o.startsWith("var")?w(t,o.slice(4,-1)):o}}function F(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(o=>{o instanceof CSSStyleRule&&o.selectorText===":root"&&t.forEach(r=>{const i=w(o,r);i&&(e[r]=i)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function $(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function H(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}const U=/^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/,K=/^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;function W(t){let e,n;return K.test(t)?(e=`mailto:${t.trim()}`,n="email"):U.test(t)&&(e=`tel:${t.replace(/[^0-9\\.\\+]+/g,"")}`,n="phone"),{href:e,type:n,contact:t}}function Z(t,e){if(t){const o=t.content.cloneNode(!0).firstElementChild;return o&&(e==null||e(o)),o}return null}function J(t,e,n,o){let r,i=!1,u=0;const p=()=>{clearInterval(r),o!=null&&o.restartCounter&&(u=0),i&&(r=setInterval(()=>{n(u++)},e))},d=E.intersector.subscribe(t,y=>{i=y.isIntersecting,p()});return()=>{d(),clearInterval(r)}}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=b.contain;exports.cover=b.cover;exports.fixPosition=b.fixPosition;exports.measureText=b.measureText;exports.getPointerPosition=C.getPointerPosition;exports.normalize=C.normalize;exports.screenToCartesian=C.screenToCartesian;exports.whenDefined=D.whenDefined;exports.findParentElement=g.findParentElement;exports.findScrollParentElement=g.findScrollParentElement;exports.getAllParentElements=g.getAllParentElements;exports.getElement=g.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.isElementVisible=Q.isElementVisible;exports.dispatchEvent=A.dispatchEvent;exports.createJSONAndSave=O.createJSONAndSave;exports.downloadURI=O.downloadURI;exports.debounce=T.debounce;exports.throttle=T.throttle;exports.setupDrag=B.setupDrag;exports.createStylesheet=S.createStylesheet;exports.styleToString=S.styleToString;exports.getCumulativeOffsetLeft=h.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=h.getCumulativeOffsetTop;exports.getCumulativePosition=h.getCumulativePosition;exports.getStickyOffset=h.getStickyOffset;exports.calculateDistance=a.calculateDistance;exports.calculateDistanceWithRadius=a.calculateDistanceWithRadius;exports.clamp=a.clamp;exports.damp=a.damp;exports.lerp=a.lerp;exports.mapRange=a.mapRange;exports.round=a.round;exports.smootherstep=a.smootherstep;exports.smoothstep=a.smoothstep;exports.step=a.step;exports.beautifyNumber=m.beautifyNumber;exports.loopNumber=m.loopNumber;exports.preciseNumber=m.preciseNumber;exports.roundNumberTo=m.roundNumberTo;exports.toStep=m.toStep;exports.cloneDeep=c.cloneDeep;exports.compareObjects=c.compareObjects;exports.isESClass=c.isESClass;exports.isNullish=c.isNullish;exports.isObject=c.isObject;exports.mergeDeep=c.mergeDeep;exports.mixin=c.mixin;exports.omit=c.omit;exports.pick=c.pick;exports.nullishCoalescing=v.nullishCoalescing;exports.requestIdleCallback=v.requestIdleCallback;exports.scrollToElement=P.scrollToElement;exports.wait=P.wait;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.declension=l.declension;exports.decodeHtmlEntities=l.decodeHtmlEntities;exports.generateId=l.generateId;exports.isUppercase=l.isUppercase;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=q.getElementTransitionDurationMS;exports.getElementTransitionDurationS=q.getElementTransitionDurationS;exports.changeHistory=f.changeHistory;exports.normalizeBase=f.normalizeBase;exports.parseSearchParameters=f.parseSearchParameters;exports.splitPath=f.splitPath;exports.updateSearchParameter=f.updateSearchParameter;exports.cloneTemplateContent=Z;exports.copyTextToClipboard=j;exports.decode=H;exports.dotCircleCollision=V;exports.dotPolygonCollision=k;exports.dotRectCollision=M;exports.encode=$;exports.formatBytes=z;exports.getRootVariables=F;exports.insert=R;exports.setIntervalOnIntersection=J;exports.shiftArray=N;exports.tryCreateHrefFromContact=W;
|
package/lib/utils/index.js
CHANGED
|
@@ -1,45 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
import {
|
|
18
|
-
import { a as m } from "../
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { g as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
import { d as ye } from "../events-CsVF98U6.js";
|
|
26
|
-
import { c as Ie, d as we } from "../file-GHShUlue.js";
|
|
27
|
-
import { d as ve, t as Se } from "../function-C10DGppn.js";
|
|
28
|
-
import { s as Oe } from "../gestures-CcXV6fCp.js";
|
|
29
|
-
import { c as Be, s as Ae } from "../stylesheet-DpnWNVyD.js";
|
|
30
|
-
import { g as De, a as Qe, c as je, b as ze } from "../layout-BSMtwCga.js";
|
|
31
|
-
import { e as Ne, f as $e, c as Fe, d as Ve, l as ke, m as Ue, r as qe, b as He, a as Ze, s as Ke } from "../math-BOBiC4TN.js";
|
|
32
|
-
import { b as Ge, l as Je, p as Le, r as Ye, t as Xe } from "../number-CbdpfO3u.js";
|
|
33
|
-
import { c as et, d as tt, i as st, b as at, a as ot, m as rt, e as nt, o as it, p as ct } from "../object-D6MVWB4l.js";
|
|
34
|
-
import { n as ut, r as ft } from "../polyfills-DJrTJQky.js";
|
|
35
|
-
import { s as mt, w as pt } from "../scroll-DNGJVxa2.js";
|
|
36
|
-
import { c as ht, a as bt, b as gt, d as yt, g as Ct, i as It, k as wt, s as Et, t as vt, u as St } from "../string-BlMQbe8b.js";
|
|
37
|
-
import { g as Ot, a as Pt } from "../style-j2TwriJ_.js";
|
|
38
|
-
import { c as At, n as Rt, p as Dt, s as Qt, u as jt } from "../url-Cc-RVfii.js";
|
|
39
|
-
function y(t, e, ...s) {
|
|
1
|
+
import { a as D, p as Q } from "../attributes-69we3byR.js";
|
|
2
|
+
import { a as d } from "../index-Bv9zgfdb.js";
|
|
3
|
+
import { i as z } from "../index-Bv9zgfdb.js";
|
|
4
|
+
import { a as N, c as $, f as F, m as V } from "../canvas-DeZ0SLUJ.js";
|
|
5
|
+
import { g as U, n as q, s as H } from "../coordinates-CgdGoSYs.js";
|
|
6
|
+
import { w as K } from "../custom-elements-DBnCK7Zx.js";
|
|
7
|
+
import { b as G, f as J, a as L, g as Y } from "../dom-CVWzyXPH.js";
|
|
8
|
+
import { d as _, o as ee, g as te, q as se, c as ae, j as oe, n as re, a as ne, h as ie, k as ce, f as le, p as ue, b as fe, i as de, m as me, l as pe } from "../easings-BEmRlrDd.js";
|
|
9
|
+
import { i as he } from "../element-CGVl1jA-.js";
|
|
10
|
+
import { d as ge } from "../events-CsVF98U6.js";
|
|
11
|
+
import { c as Ce, d as Ie } from "../file-GHShUlue.js";
|
|
12
|
+
import { d as ve, t as Ee } from "../function-C10DGppn.js";
|
|
13
|
+
import { s as Te } from "../gestures-CcXV6fCp.js";
|
|
14
|
+
import { c as Pe, s as Be } from "../stylesheet-DpnWNVyD.js";
|
|
15
|
+
import { g as Re, a as De, c as Qe, b as je } from "../layout-BSMtwCga.js";
|
|
16
|
+
import { e as Me, f as Ne, c as $e, d as Fe, l as Ve, m as ke, r as Ue, b as qe, a as He, s as Ze } from "../math-BOBiC4TN.js";
|
|
17
|
+
import { b as We, l as Ge, p as Je, r as Le, t as Ye } from "../number-CbdpfO3u.js";
|
|
18
|
+
import { c as _e, d as et, i as tt, b as st, a as at, m as ot, e as rt, o as nt, p as it } from "../object-D6MVWB4l.js";
|
|
19
|
+
import { n as lt, r as ut } from "../polyfills-DJrTJQky.js";
|
|
20
|
+
import { s as dt, w as mt } from "../scroll-DNGJVxa2.js";
|
|
21
|
+
import { c as xt, a as ht, b as bt, d as gt, g as yt, i as Ct, k as It, s as wt, t as vt, u as Et } from "../string-BlMQbe8b.js";
|
|
22
|
+
import { g as Tt, a as Ot } from "../style-j2TwriJ_.js";
|
|
23
|
+
import { c as Bt, n as At, p as Rt, s as Dt, u as Qt } from "../url-Cc-RVfii.js";
|
|
24
|
+
function b(t, e, ...s) {
|
|
40
25
|
return [...t.slice(0, e), ...s, ...t.slice(e)];
|
|
41
26
|
}
|
|
42
|
-
function
|
|
27
|
+
function g(t, e) {
|
|
43
28
|
const s = t.length;
|
|
44
29
|
e = e % s;
|
|
45
30
|
const a = new Array(s);
|
|
@@ -49,7 +34,7 @@ function C(t, e) {
|
|
|
49
34
|
}
|
|
50
35
|
return a;
|
|
51
36
|
}
|
|
52
|
-
function
|
|
37
|
+
function y(t, e = 2) {
|
|
53
38
|
if (!+t) return "0 Bytes";
|
|
54
39
|
const s = 1024, a = e < 0 ? 0 : e, o = [
|
|
55
40
|
"Bytes",
|
|
@@ -64,7 +49,7 @@ function I(t, e = 2) {
|
|
|
64
49
|
], r = Math.floor(Math.log(t) / Math.log(s));
|
|
65
50
|
return `${parseFloat((t / Math.pow(s, r)).toFixed(a))} ${o[r]}`;
|
|
66
51
|
}
|
|
67
|
-
function
|
|
52
|
+
function C(t) {
|
|
68
53
|
if (navigator.clipboard)
|
|
69
54
|
navigator.clipboard.writeText(t).then(() => {
|
|
70
55
|
console.log("Text copied to clipboard successfully!");
|
|
@@ -82,34 +67,34 @@ function w(t) {
|
|
|
82
67
|
document.body.removeChild(e);
|
|
83
68
|
}
|
|
84
69
|
}
|
|
85
|
-
function
|
|
70
|
+
function I(t, e) {
|
|
86
71
|
return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
|
|
87
72
|
}
|
|
88
|
-
function
|
|
73
|
+
function w(t, e) {
|
|
89
74
|
return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
|
|
90
75
|
}
|
|
91
|
-
function
|
|
76
|
+
function v(t, e) {
|
|
92
77
|
let s = !1;
|
|
93
78
|
const { x: a, y: o } = t;
|
|
94
|
-
for (let r = 0,
|
|
95
|
-
const c = e[r].x,
|
|
96
|
-
|
|
79
|
+
for (let r = 0, n = e.length - 1; r < e.length; n = r++) {
|
|
80
|
+
const c = e[r].x, i = e[r].y, l = e[n].x, u = e[n].y;
|
|
81
|
+
i > o != u > o && a < (l - c) * (o - i) / (u - i) + c && (s = !s);
|
|
97
82
|
}
|
|
98
83
|
return s;
|
|
99
84
|
}
|
|
100
|
-
function
|
|
85
|
+
function f(t, e) {
|
|
101
86
|
const s = t.style.getPropertyValue(e);
|
|
102
87
|
if (s) {
|
|
103
88
|
const a = s.toString();
|
|
104
|
-
return a.startsWith("var") ?
|
|
89
|
+
return a.startsWith("var") ? f(t, a.slice(4, -1)) : a;
|
|
105
90
|
}
|
|
106
91
|
}
|
|
107
|
-
function
|
|
92
|
+
function E(...t) {
|
|
108
93
|
const e = {};
|
|
109
94
|
return Array.from(document.styleSheets).forEach((s) => {
|
|
110
95
|
Array.from(s.cssRules).forEach((a) => {
|
|
111
96
|
a instanceof CSSStyleRule && a.selectorText === ":root" && t.forEach((o) => {
|
|
112
|
-
const r =
|
|
97
|
+
const r = f(a, o);
|
|
113
98
|
r && (e[o] = r);
|
|
114
99
|
});
|
|
115
100
|
});
|
|
@@ -117,145 +102,140 @@ function T(...t) {
|
|
|
117
102
|
e[s] || console.warn(`variable named ${s} not found`);
|
|
118
103
|
}), e;
|
|
119
104
|
}
|
|
120
|
-
function
|
|
121
|
-
return f(this, null, function* () {
|
|
122
|
-
return yield Promise.all(t.map((e) => customElements.whenDefined(e)));
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
function P(t) {
|
|
105
|
+
function S(t) {
|
|
126
106
|
const e = window.atob(t);
|
|
127
107
|
return decodeURIComponent(window.escape(e));
|
|
128
108
|
}
|
|
129
|
-
function
|
|
109
|
+
function T(t) {
|
|
130
110
|
const e = window.unescape(encodeURIComponent(t));
|
|
131
111
|
return window.btoa(e);
|
|
132
112
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
113
|
+
const m = /^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/, p = /^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;
|
|
114
|
+
function O(t) {
|
|
135
115
|
let e, s;
|
|
136
|
-
return
|
|
116
|
+
return p.test(t) ? (e = `mailto:${t.trim()}`, s = "email") : m.test(t) && (e = `tel:${t.replace(/[^0-9\\.\\+]+/g, "")}`, s = "phone"), { href: e, type: s, contact: t };
|
|
137
117
|
}
|
|
138
|
-
function
|
|
118
|
+
function P(t, e) {
|
|
139
119
|
if (t) {
|
|
140
120
|
const a = t.content.cloneNode(!0).firstElementChild;
|
|
141
121
|
return a && (e == null || e(a)), a;
|
|
142
122
|
}
|
|
143
123
|
return null;
|
|
144
124
|
}
|
|
145
|
-
function
|
|
146
|
-
let o, r = !1,
|
|
125
|
+
function B(t, e, s, a) {
|
|
126
|
+
let o, r = !1, n = 0;
|
|
147
127
|
const c = () => {
|
|
148
|
-
clearInterval(o), a != null && a.restartCounter && (
|
|
149
|
-
s(
|
|
128
|
+
clearInterval(o), a != null && a.restartCounter && (n = 0), r && (o = setInterval(() => {
|
|
129
|
+
s(n++);
|
|
150
130
|
}, e));
|
|
151
|
-
},
|
|
131
|
+
}, i = d.subscribe(t, (l) => {
|
|
152
132
|
r = l.isIntersecting, c();
|
|
153
133
|
});
|
|
154
134
|
return () => {
|
|
155
|
-
|
|
135
|
+
i(), clearInterval(o);
|
|
156
136
|
};
|
|
157
137
|
}
|
|
158
138
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
139
|
+
We as beautifyNumber,
|
|
140
|
+
Me as calculateDistance,
|
|
141
|
+
Ne as calculateDistanceWithRadius,
|
|
142
|
+
xt as camelToKebab,
|
|
143
|
+
ht as capitalize,
|
|
144
|
+
Bt as changeHistory,
|
|
145
|
+
$e as clamp,
|
|
146
|
+
_e as cloneDeep,
|
|
147
|
+
P as cloneTemplateContent,
|
|
148
|
+
et as compareObjects,
|
|
149
|
+
N as contain,
|
|
150
|
+
C as copyTextToClipboard,
|
|
151
|
+
$ as cover,
|
|
152
|
+
Ce as createJSONAndSave,
|
|
153
|
+
Pe as createStylesheet,
|
|
154
|
+
Fe as damp,
|
|
175
155
|
ve as debounce,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
156
|
+
bt as declension,
|
|
157
|
+
T as decode,
|
|
158
|
+
gt as decodeHtmlEntities,
|
|
159
|
+
ge as dispatchEvent,
|
|
160
|
+
w as dotCircleCollision,
|
|
161
|
+
v as dotPolygonCollision,
|
|
162
|
+
I as dotRectCollision,
|
|
163
|
+
Ie as downloadURI,
|
|
164
|
+
_ as easeInCubic,
|
|
165
|
+
ee as easeInExpo,
|
|
166
|
+
te as easeInOutCubic,
|
|
167
|
+
se as easeInOutExpo,
|
|
168
|
+
ae as easeInOutQuad,
|
|
169
|
+
oe as easeInOutQuart,
|
|
170
|
+
re as easeInOutQuint,
|
|
171
|
+
ne as easeInQuad,
|
|
172
|
+
ie as easeInQuart,
|
|
173
|
+
ce as easeInQuint,
|
|
174
|
+
le as easeOutCubic,
|
|
175
|
+
ue as easeOutExpo,
|
|
176
|
+
fe as easeOutQuad,
|
|
177
|
+
de as easeOutQuart,
|
|
178
|
+
me as easeOutQuint,
|
|
179
|
+
S as encode,
|
|
180
|
+
G as findParentElement,
|
|
181
|
+
J as findScrollParentElement,
|
|
182
|
+
F as fixPosition,
|
|
183
|
+
y as formatBytes,
|
|
184
|
+
yt as generateId,
|
|
185
|
+
L as getAllParentElements,
|
|
186
|
+
Re as getCumulativeOffsetLeft,
|
|
187
|
+
De as getCumulativeOffsetTop,
|
|
188
|
+
Qe as getCumulativePosition,
|
|
189
|
+
Y as getElement,
|
|
190
|
+
Tt as getElementTransitionDurationMS,
|
|
191
|
+
Ot as getElementTransitionDurationS,
|
|
192
|
+
U as getPointerPosition,
|
|
193
|
+
E as getRootVariables,
|
|
194
|
+
je as getStickyOffset,
|
|
195
|
+
b as insert,
|
|
196
|
+
z as isBrowser,
|
|
197
|
+
tt as isESClass,
|
|
198
|
+
he as isElementVisible,
|
|
199
|
+
st as isNullish,
|
|
200
|
+
at as isObject,
|
|
201
|
+
Ct as isUppercase,
|
|
202
|
+
It as kebabToCamel,
|
|
203
|
+
Ve as lerp,
|
|
204
|
+
pe as linear,
|
|
205
|
+
Ge as loopNumber,
|
|
206
|
+
ke as mapRange,
|
|
207
|
+
V as measureText,
|
|
208
|
+
ot as mergeDeep,
|
|
209
|
+
rt as mixin,
|
|
210
|
+
q as normalize,
|
|
211
|
+
At as normalizeBase,
|
|
212
|
+
lt as nullishCoalescing,
|
|
213
|
+
nt as omit,
|
|
214
|
+
D as parseAttribute,
|
|
215
|
+
Q as parseAttributeValue,
|
|
216
|
+
Rt as parseSearchParameters,
|
|
217
|
+
it as pick,
|
|
218
|
+
Je as preciseNumber,
|
|
219
|
+
ut as requestIdleCallback,
|
|
220
|
+
Ue as round,
|
|
221
|
+
Le as roundNumberTo,
|
|
222
|
+
H as screenToCartesian,
|
|
223
|
+
dt as scrollToElement,
|
|
224
|
+
B as setIntervalOnIntersection,
|
|
225
|
+
Te as setupDrag,
|
|
226
|
+
g as shiftArray,
|
|
227
|
+
qe as smootherstep,
|
|
228
|
+
He as smoothstep,
|
|
229
|
+
wt as snakeToDotted,
|
|
230
|
+
Dt as splitPath,
|
|
231
|
+
Ze as step,
|
|
232
|
+
Be as styleToString,
|
|
233
|
+
Ee as throttle,
|
|
254
234
|
vt as toPascalCase,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
235
|
+
Ye as toStep,
|
|
236
|
+
O as tryCreateHrefFromContact,
|
|
237
|
+
Et as uncapitalize,
|
|
238
|
+
Qt as updateSearchParameter,
|
|
239
|
+
mt as wait,
|
|
240
|
+
K as whenDefined
|
|
261
241
|
};
|