aptechka 0.57.0 → 0.57.1

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.
@@ -1 +1 @@
1
- "use strict";var G=s=>{throw TypeError(s)};var N=(s,r,e)=>r.has(s)||G("Cannot "+e);var t=(s,r,e)=>(N(s,r,"read from private field"),e?e.call(s):r.get(s)),i=(s,r,e)=>r.has(s)?G("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),a=(s,r,e,n)=>(N(s,r,"write to private field"),n?n.call(s,e):r.set(s,e),e),b=(s,r,e)=>(N(s,r,"access private method"),e);var J=(s,r,e)=>new Promise((n,l)=>{var c=C=>{try{z(e.next(C))}catch(F){l(F)}},M=C=>{try{z(e.throw(C))}catch(F){l(F)}},z=C=>C.done?n(C.value):Promise.resolve(C.value).then(c,M);z((e=e.apply(s,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../index-Cqw2NKev.cjs"),$=require("../dom-JBOkFLTh.cjs"),H=require("../css-property/index.cjs"),U=require("../events-KVanG9sR.cjs"),V=require("../gestures-C7gbKx11.cjs"),W=require("../number-DyefJ5a1.cjs");var v,p,g,x,o,u,h,O,q,w,D,A,_,j;class T extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,v,new H.CSSProperty(this,"--autoplay",!1));i(this,p,new H.CSSProperty(this,"--swipe","x"));i(this,g);i(this,x,!1);i(this,o,[]);i(this,u,0);i(this,w,e=>{a(this,x,e.isIntersecting),t(this,x)?b(this,h,q).call(this):clearInterval(t(this,g))});i(this,D,()=>{clearInterval(t(this,g)),t(this,x)&&a(this,g,setInterval(t(this,_),parseFloat(t(this,v).current||"0")*1e3))});i(this,_,()=>{b(this,h,A).call(this,t(this,u)+1)});i(this,j,e=>{if(!t(this,p).current)return;let n=0;V.setupDrag(l=>{const c=e.x-l.x,M=e.y-l.y;t(this,p).current==="x"?Math.abs(c)>Math.abs(M)&&(n=Math.sign(c)):t(this,p).current==="y"&&Math.abs(M)>Math.abs(c)&&(n=Math.sign(M))},()=>{this.shift(n)})})}get counter(){return t(this,u)}get itemElements(){return t(this,o)}addItem(e){t(this,o).push(e),b(this,h,O).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(b(this,h,A).call(this,e),b(this,h,q).call(this))}shift(e){this.set(t(this,u)+e)}connectedCallback(){var e;a(this,o,[...this.querySelectorAll(`[data-billboard-item="${this.id||""}"]`)]),(e=t(this,o)[0])==null||e.classList.add("current"),b(this,h,O).call(this),t(this,v).subscribe(n=>{n.current?(k.intersector.subscribe(this,t(this,w)),b(this,h,q).call(this)):(a(this,x,!0),k.intersector.unsubscribe(t(this,w)),clearInterval(t(this,g)),b(this,h,A).call(this,0))}),t(this,v).observe(),t(this,p).observe(),this.addEventListener("pointerdown",t(this,j))}disconnectedCallback(){t(this,v).unobserve(),t(this,p).unobserve(),k.intersector.unsubscribe(t(this,w)),clearInterval(t(this,g))}}v=new WeakMap,p=new WeakMap,g=new WeakMap,x=new WeakMap,o=new WeakMap,u=new WeakMap,h=new WeakSet,O=function(){t(this,o).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},q=function(){t(this,v).current!==!1&&t(this,D).call(this)},w=new WeakMap,D=new WeakMap,A=function(e){a(this,u,W.loopNumber(e,t(this,o).length)),t(this,o).forEach((n,l)=>{l===t(this,u)?n.classList.add("current"):n.classList.remove("current")}),U.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,u)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},_=new WeakMap,j=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",T);var d,S,m,P,y;class K extends HTMLElement{constructor(){super(...arguments);i(this,d,null);i(this,S,null);i(this,m,[]);i(this,P,e=>{const n=e.currentTarget,l=t(this,m).findIndex(c=>c===n);l>=0&&t(this,d).set(l)});i(this,y,()=>{t(this,m).forEach((e,n)=>{n===t(this,d).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return J(this,null,function*(){var e;if(a(this,d,$.findParentElement(this,T)),t(this,d)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){const n=t(this,d).itemElements.length;a(this,S,document.createElement("div"));for(let l=0;l<n;l++){const c=document.createElement("button");t(this,m).push(c),t(this,S).appendChild(c)}this.appendChild(t(this,S)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,P))}),(e=t(this,d))==null||e.addEventListener("billboardChange",t(this,y)),t(this,y).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(n=>{n.removeEventListener("click",t(this,P))}),(e=t(this,d))==null||e.removeEventListener("billboardChange",t(this,y)),this.innerHTML="",a(this,m,[])}}d=new WeakMap,S=new WeakMap,m=new WeakMap,P=new WeakMap,y=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",K);var E,f,L;class Q extends HTMLElement{constructor(){super();i(this,E,new H.CSSProperty(this,"--index",0));i(this,f,null);i(this,L,()=>{var e;t(this,E).current===((e=t(this,f))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,f)&&(!this.handleClick||this.handleClick(e))&&t(this,f).set(t(this,E).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,f,$.findParentElement(this,T)),(e=t(this,f))==null||e.addEventListener("billboardChange",t(this,L)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,L).call(this)}),t(this,E).subscribe(t(this,L)),t(this,E).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,E).unsubscribe(t(this,L)),t(this,E).unobserve(),(e=t(this,f))==null||e.removeEventListener("billboardChange",t(this,L))}}E=new WeakMap,f=new WeakMap,L=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",Q);var B,I;class R extends HTMLElement{constructor(){super();i(this,B,new H.CSSProperty(this,"--step",1));i(this,I,null);this.addEventListener("click",e=>{t(this,I)&&(!this.handleClick||this.handleClick(e))&&t(this,I).shift(t(this,B).current)})}connectedCallback(){this.tabIndex=0,a(this,I,$.findParentElement(this,T)),t(this,B).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,B).unobserve()}}B=new WeakMap,I=new WeakMap;k.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",R);exports.BillboardBulletsElement=K;exports.BillboardElement=T;exports.BillboardSetButtonElement=Q;exports.BillboardStepButtonElement=R;
1
+ "use strict";var J=s=>{throw TypeError(s)};var O=(s,r,e)=>r.has(s)||J("Cannot "+e);var t=(s,r,e)=>(O(s,r,"read from private field"),e?e.call(s):r.get(s)),n=(s,r,e)=>r.has(s)?J("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),a=(s,r,e,i)=>(O(s,r,"write to private field"),i?i.call(s,e):r.set(s,e),e),b=(s,r,e)=>(O(s,r,"access private method"),e);var K=(s,r,e)=>new Promise((i,l)=>{var d=C=>{try{F(e.next(C))}catch(N){l(N)}},M=C=>{try{F(e.throw(C))}catch(N){l(N)}},F=C=>C.done?i(C.value):Promise.resolve(C.value).then(d,M);F((e=e.apply(s,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../index-Cqw2NKev.cjs"),G=require("../dom-JBOkFLTh.cjs"),P=require("../css-property/index.cjs"),V=require("../events-KVanG9sR.cjs"),W=require("../gestures-C7gbKx11.cjs"),X=require("../math-GDWEqu7y.cjs"),Y=require("../number-DyefJ5a1.cjs");var D,p,v,L,x,o,c,h,$,A,k,_,H,j,z;class T extends HTMLElement{constructor(){super(...arguments);n(this,h);n(this,D,new P.CSSProperty(this,"--loop",!0));n(this,p,new P.CSSProperty(this,"--autoplay",!1));n(this,v,new P.CSSProperty(this,"--swipe","x"));n(this,L);n(this,x,!1);n(this,o,[]);n(this,c,0);n(this,k,e=>{a(this,x,e.isIntersecting),t(this,x)?b(this,h,A).call(this):clearInterval(t(this,L))});n(this,_,()=>{clearInterval(t(this,L)),t(this,x)&&a(this,L,setInterval(t(this,j),parseFloat(t(this,p).current||"0")*1e3))});n(this,j,()=>{b(this,h,H).call(this,t(this,c)+1)});n(this,z,e=>{if(!t(this,v).current)return;let i=0;W.setupDrag(l=>{const d=e.x-l.x,M=e.y-l.y;t(this,v).current==="x"?Math.abs(d)>Math.abs(M)&&(i=Math.sign(d)):t(this,v).current==="y"&&Math.abs(M)>Math.abs(d)&&(i=Math.sign(M))},()=>{this.shift(i)})})}get counter(){return t(this,c)}get itemElements(){return t(this,o)}addItem(e){t(this,o).push(e),b(this,h,$).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(b(this,h,H).call(this,e),b(this,h,A).call(this))}shift(e){this.set(t(this,c)+e)}connectedCallback(){var e;a(this,o,[...this.querySelectorAll(`[data-billboard-item="${this.id||""}"]`)]),(e=t(this,o)[0])==null||e.classList.add("current"),b(this,h,$).call(this),t(this,p).subscribe(i=>{i.current?(S.intersector.subscribe(this,t(this,k)),b(this,h,A).call(this)):(a(this,x,!0),S.intersector.unsubscribe(t(this,k)),clearInterval(t(this,L)),b(this,h,H).call(this,0))}),t(this,p).observe(),t(this,v).observe(),this.addEventListener("pointerdown",t(this,z))}disconnectedCallback(){t(this,p).unobserve(),t(this,v).unobserve(),S.intersector.unsubscribe(t(this,k)),clearInterval(t(this,L))}}D=new WeakMap,p=new WeakMap,v=new WeakMap,L=new WeakMap,x=new WeakMap,o=new WeakMap,c=new WeakMap,h=new WeakSet,$=function(){t(this,o).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},A=function(){t(this,p).current!==!1&&t(this,_).call(this)},k=new WeakMap,_=new WeakMap,H=function(e){t(this,D).current?a(this,c,Y.loopNumber(e,t(this,o).length)):a(this,c,X.clamp(e,0,t(this,o).length-1)),t(this,o).forEach((i,l)=>{i.classList.remove("current","previous","next"),l===t(this,c)?i.classList.add("current"):l<t(this,c)?i.classList.add("previous"):l>t(this,c)&&i.classList.add("next")}),V.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,c)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},j=new WeakMap,z=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",T);var u,w,m,q,y;class Q extends HTMLElement{constructor(){super(...arguments);n(this,u,null);n(this,w,null);n(this,m,[]);n(this,q,e=>{const i=e.currentTarget,l=t(this,m).findIndex(d=>d===i);l>=0&&t(this,u).set(l)});n(this,y,()=>{t(this,m).forEach((e,i)=>{i===t(this,u).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return K(this,null,function*(){var e;if(a(this,u,G.findParentElement(this,T)),t(this,u)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){const i=t(this,u).itemElements.length;a(this,w,document.createElement("div"));for(let l=0;l<i;l++){const d=document.createElement("button");t(this,m).push(d),t(this,w).appendChild(d)}this.appendChild(t(this,w)),t(this,m).forEach(l=>{l.addEventListener("click",t(this,q))}),(e=t(this,u))==null||e.addEventListener("billboardChange",t(this,y)),t(this,y).call(this)}})}disconnectedCallback(){var e;t(this,m).forEach(i=>{i.removeEventListener("click",t(this,q))}),(e=t(this,u))==null||e.removeEventListener("billboardChange",t(this,y)),this.innerHTML="",a(this,m,[])}}u=new WeakMap,w=new WeakMap,m=new WeakMap,q=new WeakMap,y=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",Q);var f,E,g;class R extends HTMLElement{constructor(){super();n(this,f,new P.CSSProperty(this,"--index",0));n(this,E,null);n(this,g,()=>{var e;t(this,f).current===((e=t(this,E))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,E)&&(!this.handleClick||this.handleClick(e))&&t(this,E).set(t(this,f).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,E,G.findParentElement(this,T)),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,g)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,g).call(this)}),t(this,f).subscribe(t(this,g)),t(this,f).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,f).unsubscribe(t(this,g)),t(this,f).unobserve(),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,g))}}f=new WeakMap,E=new WeakMap,g=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",R);var B,I;class U extends HTMLElement{constructor(){super();n(this,B,new P.CSSProperty(this,"--step",1));n(this,I,null);this.addEventListener("click",e=>{t(this,I)&&(!this.handleClick||this.handleClick(e))&&t(this,I).shift(t(this,B).current)})}connectedCallback(){this.tabIndex=0,a(this,I,G.findParentElement(this,T)),t(this,B).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,B).unobserve()}}B=new WeakMap,I=new WeakMap;S.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",U);exports.BillboardBulletsElement=Q;exports.BillboardElement=T;exports.BillboardSetButtonElement=R;exports.BillboardStepButtonElement=U;
@@ -1,82 +1,84 @@
1
- var O = (s) => {
1
+ var Q = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var $ = (s, l, e) => l.has(s) || O("Cannot " + e);
5
- var t = (s, l, e) => ($(s, l, "read from private field"), e ? e.call(s) : l.get(s)), i = (s, l, e) => l.has(s) ? O("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(s) : l.set(s, e), a = (s, l, e, n) => ($(s, l, "write to private field"), n ? n.call(s, e) : l.set(s, e), e), b = (s, l, e) => ($(s, l, "access private method"), e);
6
- var Q = (s, l, e) => new Promise((n, r) => {
7
- var c = (C) => {
4
+ var j = (s, l, e) => l.has(s) || Q("Cannot " + e);
5
+ var t = (s, l, e) => (j(s, l, "read from private field"), e ? e.call(s) : l.get(s)), n = (s, l, e) => l.has(s) ? Q("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(s) : l.set(s, e), a = (s, l, e, i) => (j(s, l, "write to private field"), i ? i.call(s, e) : l.set(s, e), e), u = (s, l, e) => (j(s, l, "access private method"), e);
6
+ var R = (s, l, e) => new Promise((i, r) => {
7
+ var d = (C) => {
8
8
  try {
9
- F(e.next(C));
10
- } catch (N) {
11
- r(N);
9
+ N(e.next(C));
10
+ } catch ($) {
11
+ r($);
12
12
  }
13
13
  }, B = (C) => {
14
14
  try {
15
- F(e.throw(C));
16
- } catch (N) {
17
- r(N);
15
+ N(e.throw(C));
16
+ } catch ($) {
17
+ r($);
18
18
  }
19
- }, F = (C) => C.done ? n(C.value) : Promise.resolve(C.value).then(c, B);
20
- F((e = e.apply(s, l)).next());
19
+ }, N = (C) => C.done ? i(C.value) : Promise.resolve(C.value).then(d, B);
20
+ N((e = e.apply(s, l)).next());
21
21
  });
22
- import { a as j, i as J } from "../index-euf5anj6.js";
23
- import { b as K } from "../dom-CVWzyXPH.js";
24
- import { CSSProperty as H } from "../css-property/index.js";
25
- import { d as R } from "../events-CsVF98U6.js";
26
- import { s as U } from "../gestures-CcXV6fCp.js";
27
- import { l as V } from "../number-CbdpfO3u.js";
28
- var p, v, L, k, o, u, h, G, T, x, D, A, P, q;
29
- class z extends HTMLElement {
22
+ import { a as G, i as K } from "../index-euf5anj6.js";
23
+ import { b as O } from "../dom-CVWzyXPH.js";
24
+ import { CSSProperty as S } from "../css-property/index.js";
25
+ import { d as U } from "../events-CsVF98U6.js";
26
+ import { s as V } from "../gestures-CcXV6fCp.js";
27
+ import { c as W } from "../math-BOBiC4TN.js";
28
+ import { l as X } from "../number-CbdpfO3u.js";
29
+ var D, E, v, L, x, o, c, h, J, A, k, P, H, q, z;
30
+ class F extends HTMLElement {
30
31
  constructor() {
31
32
  super(...arguments);
32
- i(this, h);
33
- i(this, p, new H(this, "--autoplay", !1));
34
- i(this, v, new H(this, "--swipe", "x"));
35
- i(this, L);
36
- i(this, k, !1);
37
- i(this, o, []);
38
- i(this, u, 0);
39
- i(this, x, (e) => {
40
- a(this, k, e.isIntersecting), t(this, k) ? b(this, h, T).call(this) : clearInterval(t(this, L));
33
+ n(this, h);
34
+ n(this, D, new S(this, "--loop", !0));
35
+ n(this, E, new S(this, "--autoplay", !1));
36
+ n(this, v, new S(this, "--swipe", "x"));
37
+ n(this, L);
38
+ n(this, x, !1);
39
+ n(this, o, []);
40
+ n(this, c, 0);
41
+ n(this, k, (e) => {
42
+ a(this, x, e.isIntersecting), t(this, x) ? u(this, h, A).call(this) : clearInterval(t(this, L));
41
43
  });
42
- i(this, D, () => {
43
- clearInterval(t(this, L)), t(this, k) && a(this, L, setInterval(
44
- t(this, P),
45
- parseFloat(t(this, p).current || "0") * 1e3
44
+ n(this, P, () => {
45
+ clearInterval(t(this, L)), t(this, x) && a(this, L, setInterval(
46
+ t(this, q),
47
+ parseFloat(t(this, E).current || "0") * 1e3
46
48
  ));
47
49
  });
48
- i(this, P, () => {
49
- b(this, h, A).call(this, t(this, u) + 1);
50
+ n(this, q, () => {
51
+ u(this, h, H).call(this, t(this, c) + 1);
50
52
  });
51
- i(this, q, (e) => {
53
+ n(this, z, (e) => {
52
54
  if (!t(this, v).current)
53
55
  return;
54
- let n = 0;
55
- U(
56
+ let i = 0;
57
+ V(
56
58
  (r) => {
57
- const c = e.x - r.x, B = e.y - r.y;
58
- t(this, v).current === "x" ? Math.abs(c) > Math.abs(B) && (n = Math.sign(c)) : t(this, v).current === "y" && Math.abs(B) > Math.abs(c) && (n = Math.sign(B));
59
+ const d = e.x - r.x, B = e.y - r.y;
60
+ t(this, v).current === "x" ? Math.abs(d) > Math.abs(B) && (i = Math.sign(d)) : t(this, v).current === "y" && Math.abs(B) > Math.abs(d) && (i = Math.sign(B));
59
61
  },
60
62
  () => {
61
- this.shift(n);
63
+ this.shift(i);
62
64
  }
63
65
  );
64
66
  });
65
67
  }
66
68
  get counter() {
67
- return t(this, u);
69
+ return t(this, c);
68
70
  }
69
71
  get itemElements() {
70
72
  return t(this, o);
71
73
  }
72
74
  addItem(e) {
73
- t(this, o).push(e), b(this, h, G).call(this);
75
+ t(this, o).push(e), u(this, h, J).call(this);
74
76
  }
75
77
  set(e) {
76
- (!this.handleSet || this.handleSet(e)) && (b(this, h, A).call(this, e), b(this, h, T).call(this));
78
+ (!this.handleSet || this.handleSet(e)) && (u(this, h, H).call(this, e), u(this, h, A).call(this));
77
79
  }
78
80
  shift(e) {
79
- this.set(t(this, u) + e);
81
+ this.set(t(this, c) + e);
80
82
  }
81
83
  connectedCallback() {
82
84
  var e;
@@ -84,60 +86,60 @@ class z extends HTMLElement {
84
86
  ...this.querySelectorAll(
85
87
  `[data-billboard-item="${this.id || ""}"]`
86
88
  )
87
- ]), (e = t(this, o)[0]) == null || e.classList.add("current"), b(this, h, G).call(this), t(this, p).subscribe((n) => {
88
- n.current ? (j.subscribe(this, t(this, x)), b(this, h, T).call(this)) : (a(this, k, !0), j.unsubscribe(t(this, x)), clearInterval(t(this, L)), b(this, h, A).call(this, 0));
89
- }), t(this, p).observe(), t(this, v).observe(), this.addEventListener("pointerdown", t(this, q));
89
+ ]), (e = t(this, o)[0]) == null || e.classList.add("current"), u(this, h, J).call(this), t(this, E).subscribe((i) => {
90
+ i.current ? (G.subscribe(this, t(this, k)), u(this, h, A).call(this)) : (a(this, x, !0), G.unsubscribe(t(this, k)), clearInterval(t(this, L)), u(this, h, H).call(this, 0));
91
+ }), t(this, E).observe(), t(this, v).observe(), this.addEventListener("pointerdown", t(this, z));
90
92
  }
91
93
  disconnectedCallback() {
92
- t(this, p).unobserve(), t(this, v).unobserve(), j.unsubscribe(t(this, x)), clearInterval(t(this, L));
94
+ t(this, E).unobserve(), t(this, v).unobserve(), G.unsubscribe(t(this, k)), clearInterval(t(this, L));
93
95
  }
94
96
  }
95
- p = new WeakMap(), v = new WeakMap(), L = new WeakMap(), k = new WeakMap(), o = new WeakMap(), u = new WeakMap(), h = new WeakSet(), G = function() {
97
+ D = new WeakMap(), E = new WeakMap(), v = new WeakMap(), L = new WeakMap(), x = new WeakMap(), o = new WeakMap(), c = new WeakMap(), h = new WeakSet(), J = function() {
96
98
  t(this, o).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
97
- }, T = function() {
98
- t(this, p).current !== !1 && t(this, D).call(this);
99
- }, x = new WeakMap(), D = new WeakMap(), A = function(e) {
100
- a(this, u, V(e, t(this, o).length)), t(this, o).forEach((n, r) => {
101
- r === t(this, u) ? n.classList.add("current") : n.classList.remove("current");
102
- }), R(this, "billboardChange", {
99
+ }, A = function() {
100
+ t(this, E).current !== !1 && t(this, P).call(this);
101
+ }, k = new WeakMap(), P = new WeakMap(), H = function(e) {
102
+ t(this, D).current ? a(this, c, X(e, t(this, o).length)) : a(this, c, W(e, 0, t(this, o).length - 1)), t(this, o).forEach((i, r) => {
103
+ i.classList.remove("current", "previous", "next"), r === t(this, c) ? i.classList.add("current") : r < t(this, c) ? i.classList.add("previous") : r > t(this, c) && i.classList.add("next");
104
+ }), U(this, "billboardChange", {
103
105
  detail: {
104
- counter: t(this, u)
106
+ counter: t(this, c)
105
107
  }
106
108
  }), setTimeout(() => {
107
109
  window.dispatchEvent(new Event("resize"));
108
110
  }, 0);
109
- }, P = new WeakMap(), q = new WeakMap();
110
- customElements.get("e-billboard") || customElements.define("e-billboard", z);
111
- var d, w, m, S, I;
112
- class W extends HTMLElement {
111
+ }, q = new WeakMap(), z = new WeakMap();
112
+ customElements.get("e-billboard") || customElements.define("e-billboard", F);
113
+ var b, w, m, T, I;
114
+ class Y extends HTMLElement {
113
115
  constructor() {
114
116
  super(...arguments);
115
- i(this, d, null);
116
- i(this, w, null);
117
- i(this, m, []);
118
- i(this, S, (e) => {
119
- const n = e.currentTarget, r = t(this, m).findIndex((c) => c === n);
120
- r >= 0 && t(this, d).set(r);
117
+ n(this, b, null);
118
+ n(this, w, null);
119
+ n(this, m, []);
120
+ n(this, T, (e) => {
121
+ const i = e.currentTarget, r = t(this, m).findIndex((d) => d === i);
122
+ r >= 0 && t(this, b).set(r);
121
123
  });
122
- i(this, I, () => {
123
- t(this, m).forEach((e, n) => {
124
- n === t(this, d).counter ? e.classList.add("current") : e.classList.remove("current");
124
+ n(this, I, () => {
125
+ t(this, m).forEach((e, i) => {
126
+ i === t(this, b).counter ? e.classList.add("current") : e.classList.remove("current");
125
127
  });
126
128
  });
127
129
  }
128
130
  connectedCallback() {
129
- return Q(this, null, function* () {
131
+ return R(this, null, function* () {
130
132
  var e;
131
- if (a(this, d, K(this, z)), t(this, d) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
132
- const n = t(this, d).itemElements.length;
133
+ if (a(this, b, O(this, F)), t(this, b) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
134
+ const i = t(this, b).itemElements.length;
133
135
  a(this, w, document.createElement("div"));
134
- for (let r = 0; r < n; r++) {
135
- const c = document.createElement("button");
136
- t(this, m).push(c), t(this, w).appendChild(c);
136
+ for (let r = 0; r < i; r++) {
137
+ const d = document.createElement("button");
138
+ t(this, m).push(d), t(this, w).appendChild(d);
137
139
  }
138
140
  this.appendChild(t(this, w)), t(this, m).forEach((r) => {
139
- r.addEventListener("click", t(this, S));
140
- }), (e = t(this, d)) == null || e.addEventListener(
141
+ r.addEventListener("click", t(this, T));
142
+ }), (e = t(this, b)) == null || e.addEventListener(
141
143
  "billboardChange",
142
144
  t(this, I)
143
145
  ), t(this, I).call(this);
@@ -146,33 +148,33 @@ class W extends HTMLElement {
146
148
  }
147
149
  disconnectedCallback() {
148
150
  var e;
149
- t(this, m).forEach((n) => {
150
- n.removeEventListener("click", t(this, S));
151
- }), (e = t(this, d)) == null || e.removeEventListener(
151
+ t(this, m).forEach((i) => {
152
+ i.removeEventListener("click", t(this, T));
153
+ }), (e = t(this, b)) == null || e.removeEventListener(
152
154
  "billboardChange",
153
155
  t(this, I)
154
156
  ), this.innerHTML = "", a(this, m, []);
155
157
  }
156
158
  }
157
- d = new WeakMap(), w = new WeakMap(), m = new WeakMap(), S = new WeakMap(), I = new WeakMap();
158
- J && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", W);
159
- var f, E, g;
160
- class X extends HTMLElement {
159
+ b = new WeakMap(), w = new WeakMap(), m = new WeakMap(), T = new WeakMap(), I = new WeakMap();
160
+ K && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", Y);
161
+ var f, p, g;
162
+ class Z extends HTMLElement {
161
163
  constructor() {
162
164
  super();
163
- i(this, f, new H(this, "--index", 0));
164
- i(this, E, null);
165
- i(this, g, () => {
165
+ n(this, f, new S(this, "--index", 0));
166
+ n(this, p, null);
167
+ n(this, g, () => {
166
168
  var e;
167
- t(this, f).current === ((e = t(this, E)) == null ? void 0 : e.counter) ? this.classList.add("current") : this.classList.remove("current");
169
+ t(this, f).current === ((e = t(this, p)) == null ? void 0 : e.counter) ? this.classList.add("current") : this.classList.remove("current");
168
170
  });
169
171
  this.addEventListener("click", (e) => {
170
- t(this, E) && (!this.handleClick || this.handleClick(e)) && t(this, E).set(t(this, f).current);
172
+ t(this, p) && (!this.handleClick || this.handleClick(e)) && t(this, p).set(t(this, f).current);
171
173
  });
172
174
  }
173
175
  connectedCallback() {
174
176
  var e;
175
- this.tabIndex = 0, a(this, E, K(this, z)), (e = t(this, E)) == null || e.addEventListener(
177
+ this.tabIndex = 0, a(this, p, O(this, F)), (e = t(this, p)) == null || e.addEventListener(
176
178
  "billboardChange",
177
179
  t(this, g)
178
180
  ), customElements.whenDefined("e-billboard").then(() => {
@@ -181,36 +183,36 @@ class X extends HTMLElement {
181
183
  }
182
184
  disconnectedCallback() {
183
185
  var e;
184
- this.removeAttribute("tabindex"), t(this, f).unsubscribe(t(this, g)), t(this, f).unobserve(), (e = t(this, E)) == null || e.removeEventListener(
186
+ this.removeAttribute("tabindex"), t(this, f).unsubscribe(t(this, g)), t(this, f).unobserve(), (e = t(this, p)) == null || e.removeEventListener(
185
187
  "billboardChange",
186
188
  t(this, g)
187
189
  );
188
190
  }
189
191
  }
190
- f = new WeakMap(), E = new WeakMap(), g = new WeakMap();
191
- J && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", X);
192
+ f = new WeakMap(), p = new WeakMap(), g = new WeakMap();
193
+ K && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", Z);
192
194
  var y, M;
193
- class Y extends HTMLElement {
195
+ class _ extends HTMLElement {
194
196
  constructor() {
195
197
  super();
196
- i(this, y, new H(this, "--step", 1));
197
- i(this, M, null);
198
+ n(this, y, new S(this, "--step", 1));
199
+ n(this, M, null);
198
200
  this.addEventListener("click", (e) => {
199
201
  t(this, M) && (!this.handleClick || this.handleClick(e)) && t(this, M).shift(t(this, y).current);
200
202
  });
201
203
  }
202
204
  connectedCallback() {
203
- this.tabIndex = 0, a(this, M, K(this, z)), t(this, y).observe();
205
+ this.tabIndex = 0, a(this, M, O(this, F)), t(this, y).observe();
204
206
  }
205
207
  disconnectedCallback() {
206
208
  this.removeAttribute("tabindex"), t(this, y).unobserve();
207
209
  }
208
210
  }
209
211
  y = new WeakMap(), M = new WeakMap();
210
- J && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", Y);
212
+ K && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", _);
211
213
  export {
212
- W as BillboardBulletsElement,
213
- z as BillboardElement,
214
- X as BillboardSetButtonElement,
215
- Y as BillboardStepButtonElement
214
+ Y as BillboardBulletsElement,
215
+ F as BillboardElement,
216
+ Z as BillboardSetButtonElement,
217
+ _ as BillboardStepButtonElement
216
218
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.57.0",
3
+ "version": "0.57.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"