aptechka 0.61.2 → 0.61.3

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