aptechka 0.69.8 → 0.69.10

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.
@@ -16,11 +16,11 @@ export declare class BillboardElement extends HTMLElement {
16
16
  #private;
17
17
  handleSet: ((number: number) => boolean) | undefined;
18
18
  get counter(): number;
19
- get rawCounter(): number;
20
19
  get loop(): CSSProperty<boolean>;
21
20
  get autoplay(): CSSProperty<string | false>;
22
21
  get autoplayDuration(): number;
23
22
  get swipe(): CSSProperty<false | Axes2D>;
23
+ get lengthOffset(): CSSProperty<number>;
24
24
  get items(): BillboardItem[];
25
25
  get groups(): Map<string, BillboardItem[]>;
26
26
  get length(): number;
@@ -1 +1 @@
1
- "use strict";var nt=h=>{throw TypeError(h)};var st=(h,r,e)=>r.has(h)||nt("Cannot "+e);var t=(h,r,e)=>(st(h,r,"read from private field"),e?e.call(h):r.get(h)),s=(h,r,e)=>r.has(h)?nt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),l=(h,r,e,i)=>(st(h,r,"write to private field"),i?i.call(h,e):r.set(h,e),e),c=(h,r,e)=>(st(h,r,"access private method"),e);var H=(h,r,e)=>new Promise((i,n)=>{var a=A=>{try{tt(e.next(A))}catch(et){n(et)}},y=A=>{try{tt(e.throw(A))}catch(et){n(et)}},tt=A=>A.done?i(A.value):Promise.resolve(A.value).then(a,y);tt((e=e.apply(h,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../index-DekP7OZe.cjs"),rt=require("../custom-elements-Dh4TWRDJ.cjs"),Z=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const $=require("../css-property/index.cjs"),pt=require("../events-KVanG9sR.cjs"),Et=require("../gestures-C7gbKx11.cjs"),gt=require("../math-GDWEqu7y.cjs"),ht=require("../number-ChAm68cm.cjs");var m,B,Q,f,at,ot,ct,it;class lt{constructor(r,e){s(this,f);s(this,m);s(this,B,null);s(this,Q,!1);this.element=r,l(this,m,e)}destroy(){c(this,f,it).call(this)}updateClasses(r){const e=r===t(this,m).counter;t(this,Q)&&!e?this.element.classList.add("was-current"):this.element.classList.remove("was-current"),c(this,f,ct).call(this),c(this,f,it).call(this),r===t(this,m).counter?c(this,f,at).call(this):r<t(this,m).counter?this.element.classList.add("previous"):this.element.classList.add("next"),c(this,f,ot).call(this,r)}}m=new WeakMap,B=new WeakMap,Q=new WeakMap,f=new WeakSet,at=function(){l(this,Q,!0),this.element.classList.add("current"),l(this,B,requestAnimationFrame(()=>{this.element.classList.add("current-active")}))},ot=function(r){r===ht.loopNumber(t(this,m).counter-1,t(this,m).length)?this.element.classList.add("previous-sibling"):r===(t(this,m).counter+1)%t(this,m).length&&this.element.classList.add("next-sibling")},ct=function(){this.element.classList.remove("current","previous","next","previous-sibling","next-sibling","current-active")},it=function(){t(this,B)&&(cancelAnimationFrame(t(this,B)),l(this,B,null))};var z,M,L,C,S,I,T,p,o,R,b,P,d,ut,V,F,W,K,X,Y;class J extends HTMLElement{constructor(){super(...arguments);s(this,d);s(this,z,new $.CSSProperty(this,"--resize",!0));s(this,M,new $.CSSProperty(this,"--loop",!0));s(this,L,new $.CSSProperty(this,"--autoplay",!1));s(this,C,new $.CSSProperty(this,"--swipe","x"));s(this,S);s(this,I,!1);s(this,T,[]);s(this,p,new Map);s(this,o,-1);s(this,R,-1);s(this,b,0);s(this,P,[]);s(this,F,e=>{l(this,I,e.isIntersecting),t(this,I)?c(this,d,V).call(this):clearInterval(t(this,S))});s(this,W,()=>{clearInterval(t(this,S)),t(this,I)&&l(this,S,setInterval(t(this,X),this.autoplayDuration))});s(this,X,()=>{c(this,d,K).call(this,t(this,o)+1)});s(this,Y,e=>{if(!t(this,C).current)return;let i=0;Et.setupDrag(n=>{const a=e.x-n.x,y=e.y-n.y;t(this,C).current==="x"?Math.abs(a)>Math.abs(y)&&Math.abs(a)>10&&(i=Math.sign(a)):t(this,C).current==="y"&&Math.abs(y)>Math.abs(a)&&Math.abs(y)>10&&(i=Math.sign(y))},()=>{i&&this.shift(i)})})}get counter(){return t(this,o)}get rawCounter(){return t(this,R)}get loop(){return t(this,M)}get autoplay(){return t(this,L)}get autoplayDuration(){return parseFloat(t(this,L).current||"0")*1e3}get swipe(){return t(this,C)}get items(){return t(this,T)}get groups(){return t(this,p)}get length(){return t(this,b)}addItem(e){const i=new lt(e,this);t(this,T).push(i);const n=e.getAttribute("data-billboard-item-group")||"default";let a=t(this,p).get(n);a||(a=[],t(this,p).set(n,a)),a.push(i),c(this,d,ut).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(c(this,d,K).call(this,e),c(this,d,V).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)].forEach(i=>{this.addItem(i)}),t(this,p).forEach(i=>{var n;(n=i[0])==null||n.element.classList.add("current")}),t(this,L).subscribe(i=>{i.current?(D.intersector.subscribe(this,t(this,F)),c(this,d,V).call(this)):(l(this,I,!0),D.intersector.unsubscribe(t(this,F)),clearInterval(t(this,S)),c(this,d,K).call(this,0))}),t(this,L).observe(),t(this,C).observe(),t(this,M).observe(),t(this,z).observe(),c(this,d,K).call(this,0),this.addEventListener("pointerdown",t(this,Y))}disconnectedCallback(){t(this,L).unobserve(),t(this,C).unobserve(),t(this,M).unobserve(),t(this,z).unobserve(),t(this,T).forEach(e=>e.destroy()),l(this,T,[]),t(this,p).clear(),D.intersector.unsubscribe(t(this,F)),clearInterval(t(this,S)),t(this,P).forEach(e=>{clearTimeout(e)})}}z=new WeakMap,M=new WeakMap,L=new WeakMap,C=new WeakMap,S=new WeakMap,I=new WeakMap,T=new WeakMap,p=new WeakMap,o=new WeakMap,R=new WeakMap,b=new WeakMap,P=new WeakMap,d=new WeakSet,ut=function(){l(this,b,0),t(this,p).forEach(e=>{e.length>t(this,b)&&l(this,b,e.length)})},V=function(){t(this,L).current!==!1&&t(this,W).call(this)},F=new WeakMap,W=new WeakMap,K=function(){return H(this,arguments,function*(e=t(this,o)){const i=t(this,o);t(this,M).current?l(this,o,ht.loopNumber(e,t(this,b))):l(this,o,gt.clamp(e,0,t(this,b)-1)),l(this,R,e),i!==t(this,o)&&(t(this,P).forEach(n=>{clearTimeout(n)}),this.classList.remove("forward","backward","next-round","prev-round"),t(this,o)-i>=0?this.classList.add("forward"):t(this,o)-i<0&&this.classList.add("backward"),t(this,p).forEach(n=>{n.forEach((a,y)=>{a.updateClasses(y)})}),this.classList.toggle("has-length",t(this,b)>1),this.classList.toggle("start",t(this,o)===0),this.classList.toggle("end",t(this,o)===t(this,b)-1),this.style.setProperty("--counter",t(this,o).toString()),this.style.setProperty("--sections",t(this,b).toString()),pt.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),t(this,z).current&&t(this,P).push(setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)),t(this,P).push(setTimeout(()=>{this.classList.remove("next-round","prev-round")},10)))})},X=new WeakMap,Y=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",J);var E,N,g,U,_;class dt extends HTMLElement{constructor(){super(...arguments);s(this,E,null);s(this,N,null);s(this,g,[]);s(this,U,e=>{const i=e.currentTarget,n=t(this,g).findIndex(a=>a===i);n>=0&&t(this,E).set(n)});s(this,_,()=>{t(this,g).forEach((e,i)=>{i===t(this,E).counter?e.classList.add("current"):e.classList.remove("current")})})}get buttonElements(){return t(this,g)}connectedCallback(){return H(this,null,function*(){var e;if(yield rt.whenDefined("e-billboard"),l(this,E,Z.findParentElement(this,J)),t(this,E)&&this.isConnected){this.innerHTML="";const i=t(this,E).length;l(this,N,document.createElement("div"));for(let n=0;n<i;n++){const a=document.createElement("button");a.setAttribute("aria-label",`Go to item ${n+1}`),t(this,g).push(a),t(this,N).appendChild(a)}this.appendChild(t(this,N)),t(this,g).forEach(n=>{n.addEventListener("click",t(this,U))}),(e=t(this,E))==null||e.addEventListener("billboardChange",t(this,_)),t(this,_).call(this)}})}disconnectedCallback(){var e;t(this,g).forEach(i=>{i.removeEventListener("click",t(this,U))}),(e=t(this,E))==null||e.removeEventListener("billboardChange",t(this,_)),this.innerHTML="",l(this,g,[])}}E=new WeakMap,N=new WeakMap,g=new WeakMap,U=new WeakMap,_=new WeakMap;D.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",dt);var q,j;class bt extends HTMLElement{constructor(){super(...arguments);s(this,q,null);s(this,j,()=>{var n;const e=(((n=t(this,q))==null?void 0:n.counter)||0)+1,i=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(i,"0")})}connectedCallback(){return H(this,null,function*(){var e;yield rt.whenDefined("e-billboard"),l(this,q,Z.findParentElement(this,J)),(e=t(this,q))==null||e.addEventListener("billboardChange",t(this,j)),t(this,j).call(this)})}disconnectedCallback(){var e;(e=t(this,q))==null||e.removeEventListener("billboardChange",t(this,j))}}q=new WeakMap,j=new WeakMap;D.isBrowser&&!customElements.get("e-billboard-counter")&&customElements.define("e-billboard-counter",bt);var G,w,v,k;class mt extends HTMLElement{constructor(){super();s(this,G,null);s(this,w,new $.CSSProperty(this,"--index",0));s(this,v,null);s(this,k,()=>{t(this,G).updateClasses(t(this,w).current)});this.addEventListener("click",e=>{t(this,v)&&(!this.handleClick||this.handleClick(e))&&t(this,v).set(t(this,w).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return H(this,null,function*(){yield rt.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),l(this,v,Z.findParentElement(this,J)),t(this,v)&&(l(this,G,new lt(this,t(this,v))),t(this,v).addEventListener("billboardChange",t(this,k)),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,v))==null||e.removeEventListener("billboardChange",t(this,k)),t(this,G).destroy()}}G=new WeakMap,w=new WeakMap,v=new WeakMap,k=new WeakMap;D.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",mt);var x,u,O;class ft extends HTMLElement{constructor(){super();s(this,x,new $.CSSProperty(this,"--step",1));s(this,u,null);s(this,O,()=>{t(this,u)&&(!t(this,u).loop.current&&(t(this,u).counter===0&&t(this,x).current<=0||t(this,u).counter===t(this,u).length-1&&t(this,x).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,x).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return H(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,x).observe(),this.tabIndex=0,l(this,u,Z.findParentElement(this,J)),(e=t(this,u))==null||e.addEventListener("billboardChange",t(this,O)),setTimeout(()=>{t(this,O).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,x).unobserve(),(e=t(this,u))==null||e.removeEventListener("billboardChange",t(this,O))}}x=new WeakMap,u=new WeakMap,O=new WeakMap;D.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",ft);exports.BillboardBulletsElement=dt;exports.BillboardCounterElement=bt;exports.BillboardElement=J;exports.BillboardSetButtonElement=mt;exports.BillboardStepButtonElement=ft;
1
+ "use strict";var ht=h=>{throw TypeError(h)};var st=(h,r,e)=>r.has(h)||ht("Cannot "+e);var t=(h,r,e)=>(st(h,r,"read from private field"),e?e.call(h):r.get(h)),s=(h,r,e)=>r.has(h)?ht("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(h):r.set(h,e),l=(h,r,e,i)=>(st(h,r,"write to private field"),i?i.call(h,e):r.set(h,e),e),c=(h,r,e)=>(st(h,r,"access private method"),e);var z=(h,r,e)=>new Promise((i,n)=>{var a=B=>{try{tt(e.next(B))}catch(et){n(et)}},y=B=>{try{tt(e.throw(B))}catch(et){n(et)}},tt=B=>B.done?i(B.value):Promise.resolve(B.value).then(a,y);tt((e=e.apply(h,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../index-DekP7OZe.cjs"),nt=require("../custom-elements-Dh4TWRDJ.cjs"),Z=require("../dom-JBOkFLTh.cjs");require("construct-style-sheets-polyfill");const M=require("../css-property/index.cjs"),pt=require("../events-KVanG9sR.cjs"),gt=require("../gestures-C7gbKx11.cjs"),Et=require("../math-GDWEqu7y.cjs"),lt=require("../number-ChAm68cm.cjs");var m,I,R,f,ot,ct,ut,it;class at{constructor(r,e){s(this,f);s(this,m);s(this,I,null);s(this,R,!1);this.element=r,l(this,m,e)}destroy(){c(this,f,it).call(this)}updateClasses(r){const e=r===t(this,m).counter;t(this,R)&&!e?this.element.classList.add("was-current"):this.element.classList.remove("was-current"),c(this,f,ut).call(this),c(this,f,it).call(this),r===t(this,m).counter?c(this,f,ot).call(this):r<t(this,m).counter?this.element.classList.add("previous"):this.element.classList.add("next"),c(this,f,ct).call(this,r)}}m=new WeakMap,I=new WeakMap,R=new WeakMap,f=new WeakSet,ot=function(){l(this,R,!0),this.element.classList.add("current"),l(this,I,requestAnimationFrame(()=>{this.element.classList.add("current-active")}))},ct=function(r){r===lt.loopNumber(t(this,m).counter-1,t(this,m).length)?this.element.classList.add("previous-sibling"):r===(t(this,m).counter+1)%t(this,m).length&&this.element.classList.add("next-sibling")},ut=function(){this.element.classList.remove("current","previous","next","previous-sibling","next-sibling","current-active")},it=function(){t(this,I)&&(cancelAnimationFrame(t(this,I)),l(this,I,null))};var F,P,L,C,S,k,T,q,p,o,d,D,u,rt,V,N,W,Q,X,Y;class K extends HTMLElement{constructor(){super(...arguments);s(this,u);s(this,F,new M.CSSProperty(this,"--resize",!0));s(this,P,new M.CSSProperty(this,"--loop",!0));s(this,L,new M.CSSProperty(this,"--autoplay",!1));s(this,C,new M.CSSProperty(this,"--swipe","x"));s(this,S,new M.CSSProperty(this,"--length-offset",0));s(this,k);s(this,T,!1);s(this,q,[]);s(this,p,new Map);s(this,o,-1);s(this,d,0);s(this,D,[]);s(this,N,e=>{l(this,T,e.isIntersecting),t(this,T)?c(this,u,V).call(this):clearInterval(t(this,k))});s(this,W,()=>{clearInterval(t(this,k)),t(this,T)&&l(this,k,setInterval(t(this,X),this.autoplayDuration))});s(this,X,()=>{c(this,u,Q).call(this,t(this,o)+1)});s(this,Y,e=>{if(!t(this,C).current)return;let i=0;gt.setupDrag(n=>{const a=e.x-n.x,y=e.y-n.y;t(this,C).current==="x"?Math.abs(a)>Math.abs(y)&&Math.abs(a)>10&&(i=Math.sign(a)):t(this,C).current==="y"&&Math.abs(y)>Math.abs(a)&&Math.abs(y)>10&&(i=Math.sign(y))},()=>{i&&this.shift(i)})})}get counter(){return t(this,o)}get loop(){return t(this,P)}get autoplay(){return t(this,L)}get autoplayDuration(){return parseFloat(t(this,L).current||"0")*1e3}get swipe(){return t(this,C)}get lengthOffset(){return t(this,S)}get items(){return t(this,q)}get groups(){return t(this,p)}get length(){return t(this,d)}addItem(e){const i=new at(e,this);t(this,q).push(i);const n=e.getAttribute("data-billboard-item-group")||"default";let a=t(this,p).get(n);a||(a=[],t(this,p).set(n,a)),a.push(i),c(this,u,rt).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(c(this,u,Q).call(this,e),c(this,u,V).call(this))}shift(e){this.set(t(this,o)+e)}connectedCallback(){[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)].forEach(i=>{this.addItem(i)}),t(this,p).forEach(i=>{var n;(n=i[0])==null||n.element.classList.add("current")}),t(this,L).subscribe(i=>{i.current?($.intersector.subscribe(this,t(this,N)),c(this,u,V).call(this)):(l(this,T,!0),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),c(this,u,Q).call(this,0))}),t(this,S).subscribe(()=>{c(this,u,rt).call(this)}),t(this,L).observe(),t(this,C).observe(),t(this,S).observe(),t(this,P).observe(),t(this,F).observe(),c(this,u,Q).call(this,0),this.addEventListener("pointerdown",t(this,Y))}disconnectedCallback(){t(this,L).unobserve(),t(this,C).unobserve(),t(this,S).unobserve(),t(this,P).unobserve(),t(this,F).unobserve(),t(this,q).forEach(e=>e.destroy()),l(this,q,[]),t(this,p).clear(),$.intersector.unsubscribe(t(this,N)),clearInterval(t(this,k)),t(this,D).forEach(e=>{clearTimeout(e)})}}F=new WeakMap,P=new WeakMap,L=new WeakMap,C=new WeakMap,S=new WeakMap,k=new WeakMap,T=new WeakMap,q=new WeakMap,p=new WeakMap,o=new WeakMap,d=new WeakMap,D=new WeakMap,u=new WeakSet,rt=function(){l(this,d,0),t(this,p).forEach(e=>{e.length>t(this,d)&&l(this,d,e.length)}),l(this,d,t(this,d)+t(this,S).current)},V=function(){t(this,L).current!==!1&&t(this,W).call(this)},N=new WeakMap,W=new WeakMap,Q=function(){return z(this,arguments,function*(e=t(this,o)){const i=t(this,o);t(this,P).current?l(this,o,lt.loopNumber(e,t(this,d))):l(this,o,Et.clamp(e,0,t(this,d)-1)),i!==t(this,o)&&(t(this,D).forEach(n=>{clearTimeout(n)}),this.classList.remove("forward","backward","next-round","prev-round"),t(this,o)-i>=0?this.classList.add("forward"):t(this,o)-i<0&&this.classList.add("backward"),t(this,p).forEach(n=>{n.forEach((a,y)=>{a.updateClasses(y)})}),this.classList.toggle("has-length",t(this,d)>1),this.classList.toggle("start",t(this,o)===0),this.classList.toggle("end",t(this,o)===t(this,d)-1),this.style.setProperty("--counter",t(this,o).toString()),this.style.setProperty("--sections",t(this,d).toString()),pt.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,o)}}),t(this,F).current&&t(this,D).push(setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)),t(this,D).push(setTimeout(()=>{this.classList.remove("next-round","prev-round")},10)))})},X=new WeakMap,Y=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",K);var g,O,E,U,_;class dt extends HTMLElement{constructor(){super(...arguments);s(this,g,null);s(this,O,null);s(this,E,[]);s(this,U,e=>{const i=e.currentTarget,n=t(this,E).findIndex(a=>a===i);n>=0&&t(this,g).set(n)});s(this,_,()=>{t(this,E).forEach((e,i)=>{i===t(this,g).counter?e.classList.add("current"):e.classList.remove("current")})})}get buttonElements(){return t(this,E)}connectedCallback(){return z(this,null,function*(){var e;if(yield nt.whenDefined("e-billboard"),l(this,g,Z.findParentElement(this,K)),t(this,g)&&this.isConnected){this.innerHTML="";const i=t(this,g).length;l(this,O,document.createElement("div"));for(let n=0;n<i;n++){const a=document.createElement("button");a.setAttribute("aria-label",`Go to item ${n+1}`),t(this,E).push(a),t(this,O).appendChild(a)}this.appendChild(t(this,O)),t(this,E).forEach(n=>{n.addEventListener("click",t(this,U))}),(e=t(this,g))==null||e.addEventListener("billboardChange",t(this,_)),t(this,_).call(this)}})}disconnectedCallback(){var e;t(this,E).forEach(i=>{i.removeEventListener("click",t(this,U))}),(e=t(this,g))==null||e.removeEventListener("billboardChange",t(this,_)),this.innerHTML="",l(this,E,[])}}g=new WeakMap,O=new WeakMap,E=new WeakMap,U=new WeakMap,_=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",dt);var H,j;class bt extends HTMLElement{constructor(){super(...arguments);s(this,H,null);s(this,j,()=>{var n;const e=(((n=t(this,H))==null?void 0:n.counter)||0)+1,i=parseInt(this.getAttribute("pad")||"0");this.textContent=e.toString().padStart(i,"0")})}connectedCallback(){return z(this,null,function*(){var e;yield nt.whenDefined("e-billboard"),l(this,H,Z.findParentElement(this,K)),(e=t(this,H))==null||e.addEventListener("billboardChange",t(this,j)),t(this,j).call(this)})}disconnectedCallback(){var e;(e=t(this,H))==null||e.removeEventListener("billboardChange",t(this,j))}}H=new WeakMap,j=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-counter")&&customElements.define("e-billboard-counter",bt);var G,w,v,x;class mt extends HTMLElement{constructor(){super();s(this,G,null);s(this,w,new M.CSSProperty(this,"--index",0));s(this,v,null);s(this,x,()=>{t(this,G).updateClasses(t(this,w).current)});this.addEventListener("click",e=>{t(this,v)&&(!this.handleClick||this.handleClick(e))&&t(this,v).set(t(this,w).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(this,null,function*(){yield nt.whenDefined("e-billboard"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button"),l(this,v,Z.findParentElement(this,K)),t(this,v)&&(l(this,G,new at(this,t(this,v))),t(this,v).addEventListener("billboardChange",t(this,x)),t(this,x).call(this),t(this,w).subscribe(t(this,x)),t(this,w).observe())})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,w).unsubscribe(t(this,x)),t(this,w).unobserve(),(e=t(this,v))==null||e.removeEventListener("billboardChange",t(this,x)),t(this,G).destroy()}}G=new WeakMap,w=new WeakMap,v=new WeakMap,x=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",mt);var A,b,J;class ft extends HTMLElement{constructor(){super();s(this,A,new M.CSSProperty(this,"--step",1));s(this,b,null);s(this,J,()=>{t(this,b)&&(!t(this,b).loop.current&&(t(this,b).counter===0&&t(this,A).current<=0||t(this,b).counter===t(this,b).length-1&&t(this,A).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,b)&&(!this.handleClick||this.handleClick(e))&&t(this,b).shift(t(this,A).current)}),this.addEventListener("keydown",e=>{e.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(e.preventDefault(),this.click())})}connectedCallback(){return z(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,A).observe(),this.tabIndex=0,l(this,b,Z.findParentElement(this,K)),(e=t(this,b))==null||e.addEventListener("billboardChange",t(this,J)),setTimeout(()=>{t(this,J).call(this)},0)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),this.removeAttribute("role"),t(this,A).unobserve(),(e=t(this,b))==null||e.removeEventListener("billboardChange",t(this,J))}}A=new WeakMap,b=new WeakMap,J=new WeakMap;$.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",ft);exports.BillboardBulletsElement=dt;exports.BillboardCounterElement=bt;exports.BillboardElement=K;exports.BillboardSetButtonElement=mt;exports.BillboardStepButtonElement=ft;
@@ -1,57 +1,57 @@
1
- var ht = (h) => {
1
+ var lt = (h) => {
2
2
  throw TypeError(h);
3
3
  };
4
- var st = (h, r, e) => r.has(h) || ht("Cannot " + e);
5
- var t = (h, r, e) => (st(h, r, "read from private field"), e ? e.call(h) : r.get(h)), s = (h, r, e) => r.has(h) ? ht("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), l = (h, r, e, i) => (st(h, r, "write to private field"), i ? i.call(h, e) : r.set(h, e), e), c = (h, r, e) => (st(h, r, "access private method"), e);
6
- var P = (h, r, e) => new Promise((i, n) => {
7
- var a = (M) => {
4
+ var st = (h, n, e) => n.has(h) || lt("Cannot " + e);
5
+ var t = (h, n, e) => (st(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? lt("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), l = (h, n, e, i) => (st(h, n, "write to private field"), i ? i.call(h, e) : n.set(h, e), e), c = (h, n, e) => (st(h, n, "access private method"), e);
6
+ var F = (h, n, e) => new Promise((i, r) => {
7
+ var a = (I) => {
8
8
  try {
9
- tt(e.next(M));
9
+ tt(e.next(I));
10
10
  } catch (et) {
11
- n(et);
11
+ r(et);
12
12
  }
13
- }, y = (M) => {
13
+ }, y = (I) => {
14
14
  try {
15
- tt(e.throw(M));
15
+ tt(e.throw(I));
16
16
  } catch (et) {
17
- n(et);
17
+ r(et);
18
18
  }
19
- }, tt = (M) => M.done ? i(M.value) : Promise.resolve(M.value).then(a, y);
20
- tt((e = e.apply(h, r)).next());
19
+ }, tt = (I) => I.done ? i(I.value) : Promise.resolve(I.value).then(a, y);
20
+ tt((e = e.apply(h, n)).next());
21
21
  });
22
22
  import { a as it, i as Z } from "../index-Bv9zgfdb.js";
23
- import { w as nt } from "../custom-elements-DBnCK7Zx.js";
23
+ import { w as ht } from "../custom-elements-DBnCK7Zx.js";
24
24
  import { b as _ } from "../dom-CVWzyXPH.js";
25
25
  import "construct-style-sheets-polyfill";
26
- import { CSSProperty as z } from "../css-property/index.js";
26
+ import { CSSProperty as S } from "../css-property/index.js";
27
27
  import { d as bt } from "../events-CsVF98U6.js";
28
28
  import { s as mt } from "../gestures-CcXV6fCp.js";
29
29
  import { c as ft } from "../math-BOBiC4TN.js";
30
- import { l as lt } from "../number-CumqY64S.js";
31
- var m, I, O, f, ot, ct, dt, rt;
32
- class at {
33
- constructor(r, e) {
30
+ import { l as at } from "../number-CumqY64S.js";
31
+ var m, T, Q, f, ct, dt, ut, nt;
32
+ class ot {
33
+ constructor(n, e) {
34
34
  s(this, f);
35
35
  s(this, m);
36
- s(this, I, null);
37
- s(this, O, !1);
38
- this.element = r, l(this, m, e);
36
+ s(this, T, null);
37
+ s(this, Q, !1);
38
+ this.element = n, l(this, m, e);
39
39
  }
40
40
  destroy() {
41
- c(this, f, rt).call(this);
41
+ c(this, f, nt).call(this);
42
42
  }
43
- updateClasses(r) {
44
- const e = r === t(this, m).counter;
45
- t(this, O) && !e ? this.element.classList.add("was-current") : this.element.classList.remove("was-current"), c(this, f, dt).call(this), c(this, f, rt).call(this), r === t(this, m).counter ? c(this, f, ot).call(this) : r < t(this, m).counter ? this.element.classList.add("previous") : this.element.classList.add("next"), c(this, f, ct).call(this, r);
43
+ updateClasses(n) {
44
+ const e = n === t(this, m).counter;
45
+ t(this, Q) && !e ? this.element.classList.add("was-current") : this.element.classList.remove("was-current"), c(this, f, ut).call(this), c(this, f, nt).call(this), n === t(this, m).counter ? c(this, f, ct).call(this) : n < t(this, m).counter ? this.element.classList.add("previous") : this.element.classList.add("next"), c(this, f, dt).call(this, n);
46
46
  }
47
47
  }
48
- m = new WeakMap(), I = new WeakMap(), O = new WeakMap(), f = new WeakSet(), ot = function() {
49
- l(this, O, !0), this.element.classList.add("current"), l(this, I, requestAnimationFrame(() => {
48
+ m = new WeakMap(), T = new WeakMap(), Q = new WeakMap(), f = new WeakSet(), ct = function() {
49
+ l(this, Q, !0), this.element.classList.add("current"), l(this, T, requestAnimationFrame(() => {
50
50
  this.element.classList.add("current-active");
51
51
  }));
52
- }, ct = function(r) {
53
- r === lt(t(this, m).counter - 1, t(this, m).length) ? this.element.classList.add("previous-sibling") : r === (t(this, m).counter + 1) % t(this, m).length && this.element.classList.add("next-sibling");
54
- }, dt = function() {
52
+ }, dt = function(n) {
53
+ n === at(t(this, m).counter - 1, t(this, m).length) ? this.element.classList.add("previous-sibling") : n === (t(this, m).counter + 1) % t(this, m).length && this.element.classList.add("next-sibling");
54
+ }, ut = function() {
55
55
  this.element.classList.remove(
56
56
  "current",
57
57
  "previous",
@@ -60,42 +60,42 @@ m = new WeakMap(), I = new WeakMap(), O = new WeakMap(), f = new WeakSet(), ot =
60
60
  "next-sibling",
61
61
  "current-active"
62
62
  );
63
- }, rt = function() {
64
- t(this, I) && (cancelAnimationFrame(t(this, I)), l(this, I, null));
63
+ }, nt = function() {
64
+ t(this, T) && (cancelAnimationFrame(t(this, T)), l(this, T, null));
65
65
  };
66
- var F, S, L, C, k, T, B, p, o, Q, b, D, u, ut, V, $, W, K, X, Y;
66
+ var $, B, L, C, k, x, D, H, p, o, u, P, d, rt, V, q, W, K, X, Y;
67
67
  class U extends HTMLElement {
68
68
  constructor() {
69
69
  super(...arguments);
70
- s(this, u);
71
- s(this, F, new z(this, "--resize", !0));
72
- s(this, S, new z(this, "--loop", !0));
73
- s(this, L, new z(this, "--autoplay", !1));
74
- s(this, C, new z(this, "--swipe", "x"));
75
- s(this, k);
76
- s(this, T, !1);
77
- s(this, B, []);
70
+ s(this, d);
71
+ s(this, $, new S(this, "--resize", !0));
72
+ s(this, B, new S(this, "--loop", !0));
73
+ s(this, L, new S(this, "--autoplay", !1));
74
+ s(this, C, new S(this, "--swipe", "x"));
75
+ s(this, k, new S(this, "--length-offset", 0));
76
+ s(this, x);
77
+ s(this, D, !1);
78
+ s(this, H, []);
78
79
  s(this, p, /* @__PURE__ */ new Map());
79
80
  s(this, o, -1);
80
- s(this, Q, -1);
81
- s(this, b, 0);
82
- s(this, D, []);
83
- s(this, $, (e) => {
84
- l(this, T, e.isIntersecting), t(this, T) ? c(this, u, V).call(this) : clearInterval(t(this, k));
81
+ s(this, u, 0);
82
+ s(this, P, []);
83
+ s(this, q, (e) => {
84
+ l(this, D, e.isIntersecting), t(this, D) ? c(this, d, V).call(this) : clearInterval(t(this, x));
85
85
  });
86
86
  s(this, W, () => {
87
- clearInterval(t(this, k)), t(this, T) && l(this, k, setInterval(t(this, X), this.autoplayDuration));
87
+ clearInterval(t(this, x)), t(this, D) && l(this, x, setInterval(t(this, X), this.autoplayDuration));
88
88
  });
89
89
  s(this, X, () => {
90
- c(this, u, K).call(this, t(this, o) + 1);
90
+ c(this, d, K).call(this, t(this, o) + 1);
91
91
  });
92
92
  s(this, Y, (e) => {
93
93
  if (!t(this, C).current)
94
94
  return;
95
95
  let i = 0;
96
96
  mt(
97
- (n) => {
98
- const a = e.x - n.x, y = e.y - n.y;
97
+ (r) => {
98
+ const a = e.x - r.x, y = e.y - r.y;
99
99
  t(this, C).current === "x" ? Math.abs(a) > Math.abs(y) && Math.abs(a) > 10 && (i = Math.sign(a)) : t(this, C).current === "y" && Math.abs(y) > Math.abs(a) && Math.abs(y) > 10 && (i = Math.sign(y));
100
100
  },
101
101
  () => {
@@ -107,11 +107,8 @@ class U extends HTMLElement {
107
107
  get counter() {
108
108
  return t(this, o);
109
109
  }
110
- get rawCounter() {
111
- return t(this, Q);
112
- }
113
110
  get loop() {
114
- return t(this, S);
111
+ return t(this, B);
115
112
  }
116
113
  get autoplay() {
117
114
  return t(this, L);
@@ -122,24 +119,27 @@ class U extends HTMLElement {
122
119
  get swipe() {
123
120
  return t(this, C);
124
121
  }
122
+ get lengthOffset() {
123
+ return t(this, k);
124
+ }
125
125
  get items() {
126
- return t(this, B);
126
+ return t(this, H);
127
127
  }
128
128
  get groups() {
129
129
  return t(this, p);
130
130
  }
131
131
  get length() {
132
- return t(this, b);
132
+ return t(this, u);
133
133
  }
134
134
  addItem(e) {
135
- const i = new at(e, this);
136
- t(this, B).push(i);
137
- const n = e.getAttribute("data-billboard-item-group") || "default";
138
- let a = t(this, p).get(n);
139
- a || (a = [], t(this, p).set(n, a)), a.push(i), c(this, u, ut).call(this);
135
+ const i = new ot(e, this);
136
+ t(this, H).push(i);
137
+ const r = e.getAttribute("data-billboard-item-group") || "default";
138
+ let a = t(this, p).get(r);
139
+ a || (a = [], t(this, p).set(r, a)), a.push(i), c(this, d, rt).call(this);
140
140
  }
141
141
  set(e) {
142
- (!this.handleSet || this.handleSet(e)) && (c(this, u, K).call(this, e), c(this, u, V).call(this));
142
+ (!this.handleSet || this.handleSet(e)) && (c(this, d, K).call(this, e), c(this, d, V).call(this));
143
143
  }
144
144
  shift(e) {
145
145
  this.set(t(this, o) + e);
@@ -152,42 +152,44 @@ class U extends HTMLElement {
152
152
  ].forEach((i) => {
153
153
  this.addItem(i);
154
154
  }), t(this, p).forEach((i) => {
155
- var n;
156
- (n = i[0]) == null || n.element.classList.add("current");
155
+ var r;
156
+ (r = i[0]) == null || r.element.classList.add("current");
157
157
  }), t(this, L).subscribe((i) => {
158
- i.current ? (it.subscribe(this, t(this, $)), c(this, u, V).call(this)) : (l(this, T, !0), it.unsubscribe(t(this, $)), clearInterval(t(this, k)), c(this, u, K).call(this, 0));
159
- }), t(this, L).observe(), t(this, C).observe(), t(this, S).observe(), t(this, F).observe(), c(this, u, K).call(this, 0), this.addEventListener("pointerdown", t(this, Y));
158
+ i.current ? (it.subscribe(this, t(this, q)), c(this, d, V).call(this)) : (l(this, D, !0), it.unsubscribe(t(this, q)), clearInterval(t(this, x)), c(this, d, K).call(this, 0));
159
+ }), t(this, k).subscribe(() => {
160
+ c(this, d, rt).call(this);
161
+ }), t(this, L).observe(), t(this, C).observe(), t(this, k).observe(), t(this, B).observe(), t(this, $).observe(), c(this, d, K).call(this, 0), this.addEventListener("pointerdown", t(this, Y));
160
162
  }
161
163
  disconnectedCallback() {
162
- t(this, L).unobserve(), t(this, C).unobserve(), t(this, S).unobserve(), t(this, F).unobserve(), t(this, B).forEach((e) => e.destroy()), l(this, B, []), t(this, p).clear(), it.unsubscribe(t(this, $)), clearInterval(t(this, k)), t(this, D).forEach((e) => {
164
+ t(this, L).unobserve(), t(this, C).unobserve(), t(this, k).unobserve(), t(this, B).unobserve(), t(this, $).unobserve(), t(this, H).forEach((e) => e.destroy()), l(this, H, []), t(this, p).clear(), it.unsubscribe(t(this, q)), clearInterval(t(this, x)), t(this, P).forEach((e) => {
163
165
  clearTimeout(e);
164
166
  });
165
167
  }
166
168
  }
167
- F = new WeakMap(), S = new WeakMap(), L = new WeakMap(), C = new WeakMap(), k = new WeakMap(), T = new WeakMap(), B = new WeakMap(), p = new WeakMap(), o = new WeakMap(), Q = new WeakMap(), b = new WeakMap(), D = new WeakMap(), u = new WeakSet(), ut = function() {
168
- l(this, b, 0), t(this, p).forEach((e) => {
169
- e.length > t(this, b) && l(this, b, e.length);
170
- });
169
+ $ = new WeakMap(), B = new WeakMap(), L = new WeakMap(), C = new WeakMap(), k = new WeakMap(), x = new WeakMap(), D = new WeakMap(), H = new WeakMap(), p = new WeakMap(), o = new WeakMap(), u = new WeakMap(), P = new WeakMap(), d = new WeakSet(), rt = function() {
170
+ l(this, u, 0), t(this, p).forEach((e) => {
171
+ e.length > t(this, u) && l(this, u, e.length);
172
+ }), l(this, u, t(this, u) + t(this, k).current);
171
173
  }, V = function() {
172
174
  t(this, L).current !== !1 && t(this, W).call(this);
173
- }, $ = new WeakMap(), W = new WeakMap(), K = function() {
174
- return P(this, arguments, function* (e = t(this, o)) {
175
+ }, q = new WeakMap(), W = new WeakMap(), K = function() {
176
+ return F(this, arguments, function* (e = t(this, o)) {
175
177
  const i = t(this, o);
176
- t(this, S).current ? l(this, o, lt(e, t(this, b))) : l(this, o, ft(e, 0, t(this, b) - 1)), l(this, Q, e), i !== t(this, o) && (t(this, D).forEach((n) => {
177
- clearTimeout(n);
178
- }), this.classList.remove("forward", "backward", "next-round", "prev-round"), t(this, o) - i >= 0 ? this.classList.add("forward") : t(this, o) - i < 0 && this.classList.add("backward"), t(this, p).forEach((n) => {
179
- n.forEach((a, y) => {
178
+ t(this, B).current ? l(this, o, at(e, t(this, u))) : l(this, o, ft(e, 0, t(this, u) - 1)), i !== t(this, o) && (t(this, P).forEach((r) => {
179
+ clearTimeout(r);
180
+ }), this.classList.remove("forward", "backward", "next-round", "prev-round"), t(this, o) - i >= 0 ? this.classList.add("forward") : t(this, o) - i < 0 && this.classList.add("backward"), t(this, p).forEach((r) => {
181
+ r.forEach((a, y) => {
180
182
  a.updateClasses(y);
181
183
  });
182
- }), this.classList.toggle("has-length", t(this, b) > 1), this.classList.toggle("start", t(this, o) === 0), this.classList.toggle("end", t(this, o) === t(this, b) - 1), this.style.setProperty("--counter", t(this, o).toString()), this.style.setProperty("--sections", t(this, b).toString()), bt(this, "billboardChange", {
184
+ }), this.classList.toggle("has-length", t(this, u) > 1), this.classList.toggle("start", t(this, o) === 0), this.classList.toggle("end", t(this, o) === t(this, u) - 1), this.style.setProperty("--counter", t(this, o).toString()), this.style.setProperty("--sections", t(this, u).toString()), bt(this, "billboardChange", {
183
185
  detail: {
184
186
  counter: t(this, o)
185
187
  }
186
- }), t(this, F).current && t(this, D).push(
188
+ }), t(this, $).current && t(this, P).push(
187
189
  setTimeout(() => {
188
190
  window.dispatchEvent(new Event("resize"));
189
191
  }, 0)
190
- ), t(this, D).push(
192
+ ), t(this, P).push(
191
193
  setTimeout(() => {
192
194
  this.classList.remove("next-round", "prev-round");
193
195
  }, 10)
@@ -195,73 +197,73 @@ F = new WeakMap(), S = new WeakMap(), L = new WeakMap(), C = new WeakMap(), k =
195
197
  });
196
198
  }, X = new WeakMap(), Y = new WeakMap();
197
199
  customElements.get("e-billboard") || customElements.define("e-billboard", U);
198
- var g, q, E, R, N;
200
+ var g, N, v, R, O;
199
201
  class pt extends HTMLElement {
200
202
  constructor() {
201
203
  super(...arguments);
202
204
  s(this, g, null);
203
- s(this, q, null);
204
- s(this, E, []);
205
+ s(this, N, null);
206
+ s(this, v, []);
205
207
  s(this, R, (e) => {
206
- const i = e.currentTarget, n = t(this, E).findIndex((a) => a === i);
207
- n >= 0 && t(this, g).set(n);
208
+ const i = e.currentTarget, r = t(this, v).findIndex((a) => a === i);
209
+ r >= 0 && t(this, g).set(r);
208
210
  });
209
- s(this, N, () => {
210
- t(this, E).forEach((e, i) => {
211
+ s(this, O, () => {
212
+ t(this, v).forEach((e, i) => {
211
213
  i === t(this, g).counter ? e.classList.add("current") : e.classList.remove("current");
212
214
  });
213
215
  });
214
216
  }
215
217
  get buttonElements() {
216
- return t(this, E);
218
+ return t(this, v);
217
219
  }
218
220
  connectedCallback() {
219
- return P(this, null, function* () {
221
+ return F(this, null, function* () {
220
222
  var e;
221
- if (yield nt("e-billboard"), l(this, g, _(this, U)), t(this, g) && this.isConnected) {
223
+ if (yield ht("e-billboard"), l(this, g, _(this, U)), t(this, g) && this.isConnected) {
222
224
  this.innerHTML = "";
223
225
  const i = t(this, g).length;
224
- l(this, q, document.createElement("div"));
225
- for (let n = 0; n < i; n++) {
226
+ l(this, N, document.createElement("div"));
227
+ for (let r = 0; r < i; r++) {
226
228
  const a = document.createElement("button");
227
- a.setAttribute("aria-label", `Go to item ${n + 1}`), t(this, E).push(a), t(this, q).appendChild(a);
229
+ a.setAttribute("aria-label", `Go to item ${r + 1}`), t(this, v).push(a), t(this, N).appendChild(a);
228
230
  }
229
- this.appendChild(t(this, q)), t(this, E).forEach((n) => {
230
- n.addEventListener("click", t(this, R));
231
+ this.appendChild(t(this, N)), t(this, v).forEach((r) => {
232
+ r.addEventListener("click", t(this, R));
231
233
  }), (e = t(this, g)) == null || e.addEventListener(
232
234
  "billboardChange",
233
- t(this, N)
234
- ), t(this, N).call(this);
235
+ t(this, O)
236
+ ), t(this, O).call(this);
235
237
  }
236
238
  });
237
239
  }
238
240
  disconnectedCallback() {
239
241
  var e;
240
- t(this, E).forEach((i) => {
242
+ t(this, v).forEach((i) => {
241
243
  i.removeEventListener("click", t(this, R));
242
244
  }), (e = t(this, g)) == null || e.removeEventListener(
243
245
  "billboardChange",
244
- t(this, N)
245
- ), this.innerHTML = "", l(this, E, []);
246
+ t(this, O)
247
+ ), this.innerHTML = "", l(this, v, []);
246
248
  }
247
249
  }
248
- g = new WeakMap(), q = new WeakMap(), E = new WeakMap(), R = new WeakMap(), N = new WeakMap();
250
+ g = new WeakMap(), N = new WeakMap(), v = new WeakMap(), R = new WeakMap(), O = new WeakMap();
249
251
  Z && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", pt);
250
- var H, G;
252
+ var z, G;
251
253
  class gt extends HTMLElement {
252
254
  constructor() {
253
255
  super(...arguments);
254
- s(this, H, null);
256
+ s(this, z, null);
255
257
  s(this, G, () => {
256
- var n;
257
- const e = (((n = t(this, H)) == null ? void 0 : n.counter) || 0) + 1, i = parseInt(this.getAttribute("pad") || "0");
258
+ var r;
259
+ const e = (((r = t(this, z)) == null ? void 0 : r.counter) || 0) + 1, i = parseInt(this.getAttribute("pad") || "0");
258
260
  this.textContent = e.toString().padStart(i, "0");
259
261
  });
260
262
  }
261
263
  connectedCallback() {
262
- return P(this, null, function* () {
264
+ return F(this, null, function* () {
263
265
  var e;
264
- yield nt("e-billboard"), l(this, H, _(this, U)), (e = t(this, H)) == null || e.addEventListener(
266
+ yield ht("e-billboard"), l(this, z, _(this, U)), (e = t(this, z)) == null || e.addEventListener(
265
267
  "billboardChange",
266
268
  t(this, G)
267
269
  ), t(this, G).call(this);
@@ -269,67 +271,67 @@ class gt extends HTMLElement {
269
271
  }
270
272
  disconnectedCallback() {
271
273
  var e;
272
- (e = t(this, H)) == null || e.removeEventListener(
274
+ (e = t(this, z)) == null || e.removeEventListener(
273
275
  "billboardChange",
274
276
  t(this, G)
275
277
  );
276
278
  }
277
279
  }
278
- H = new WeakMap(), G = new WeakMap();
280
+ z = new WeakMap(), G = new WeakMap();
279
281
  Z && !customElements.get("e-billboard-counter") && customElements.define("e-billboard-counter", gt);
280
- var j, w, v, x;
281
- class Et extends HTMLElement {
282
+ var j, w, E, A;
283
+ class vt extends HTMLElement {
282
284
  constructor() {
283
285
  super();
284
286
  s(this, j, null);
285
- s(this, w, new z(this, "--index", 0));
286
- s(this, v, null);
287
- s(this, x, () => {
287
+ s(this, w, new S(this, "--index", 0));
288
+ s(this, E, null);
289
+ s(this, A, () => {
288
290
  t(this, j).updateClasses(t(this, w).current);
289
291
  });
290
292
  this.addEventListener("click", (e) => {
291
- t(this, v) && (!this.handleClick || this.handleClick(e)) && t(this, v).set(t(this, w).current);
293
+ t(this, E) && (!this.handleClick || this.handleClick(e)) && t(this, E).set(t(this, w).current);
292
294
  }), this.addEventListener("keydown", (e) => {
293
295
  e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
294
296
  });
295
297
  }
296
298
  connectedCallback() {
297
- return P(this, null, function* () {
298
- yield nt("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), l(this, v, _(this, U)), t(this, v) && (l(this, j, new at(this, t(this, v))), t(this, v).addEventListener(
299
+ return F(this, null, function* () {
300
+ yield ht("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), l(this, E, _(this, U)), t(this, E) && (l(this, j, new ot(this, t(this, E))), t(this, E).addEventListener(
299
301
  "billboardChange",
300
- t(this, x)
301
- ), t(this, x).call(this), t(this, w).subscribe(t(this, x)), t(this, w).observe());
302
+ t(this, A)
303
+ ), t(this, A).call(this), t(this, w).subscribe(t(this, A)), t(this, w).observe());
302
304
  });
303
305
  }
304
306
  disconnectedCallback() {
305
307
  var e;
306
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, w).unsubscribe(t(this, x)), t(this, w).unobserve(), (e = t(this, v)) == null || e.removeEventListener(
308
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, w).unsubscribe(t(this, A)), t(this, w).unobserve(), (e = t(this, E)) == null || e.removeEventListener(
307
309
  "billboardChange",
308
- t(this, x)
310
+ t(this, A)
309
311
  ), t(this, j).destroy();
310
312
  }
311
313
  }
312
- j = new WeakMap(), w = new WeakMap(), v = new WeakMap(), x = new WeakMap();
313
- Z && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", Et);
314
- var A, d, J;
315
- class vt extends HTMLElement {
314
+ j = new WeakMap(), w = new WeakMap(), E = new WeakMap(), A = new WeakMap();
315
+ Z && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", vt);
316
+ var M, b, J;
317
+ class Et extends HTMLElement {
316
318
  constructor() {
317
319
  super();
318
- s(this, A, new z(this, "--step", 1));
319
- s(this, d, null);
320
+ s(this, M, new S(this, "--step", 1));
321
+ s(this, b, null);
320
322
  s(this, J, () => {
321
- t(this, d) && (!t(this, d).loop.current && (t(this, d).counter === 0 && t(this, A).current <= 0 || t(this, d).counter === t(this, d).length - 1 && t(this, A).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
323
+ t(this, b) && (!t(this, b).loop.current && (t(this, b).counter === 0 && t(this, M).current <= 0 || t(this, b).counter === t(this, b).length - 1 && t(this, M).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
322
324
  });
323
325
  this.addEventListener("click", (e) => {
324
- t(this, d) && (!this.handleClick || this.handleClick(e)) && t(this, d).shift(t(this, A).current);
326
+ t(this, b) && (!this.handleClick || this.handleClick(e)) && t(this, b).shift(t(this, M).current);
325
327
  }), this.addEventListener("keydown", (e) => {
326
328
  e.code === "Space" && !this.hasAttribute("keydown-disabled") && (e.preventDefault(), this.click());
327
329
  });
328
330
  }
329
331
  connectedCallback() {
330
- return P(this, null, function* () {
332
+ return F(this, null, function* () {
331
333
  var e;
332
- yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, A).observe(), this.tabIndex = 0, l(this, d, _(this, U)), (e = t(this, d)) == null || e.addEventListener(
334
+ yield customElements.whenDefined("e-billboard"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, M).observe(), this.tabIndex = 0, l(this, b, _(this, U)), (e = t(this, b)) == null || e.addEventListener(
333
335
  "billboardChange",
334
336
  t(this, J)
335
337
  ), setTimeout(() => {
@@ -339,18 +341,18 @@ class vt extends HTMLElement {
339
341
  }
340
342
  disconnectedCallback() {
341
343
  var e;
342
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, A).unobserve(), (e = t(this, d)) == null || e.removeEventListener(
344
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, M).unobserve(), (e = t(this, b)) == null || e.removeEventListener(
343
345
  "billboardChange",
344
346
  t(this, J)
345
347
  );
346
348
  }
347
349
  }
348
- A = new WeakMap(), d = new WeakMap(), J = new WeakMap();
349
- Z && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", vt);
350
+ M = new WeakMap(), b = new WeakMap(), J = new WeakMap();
351
+ Z && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", Et);
350
352
  export {
351
353
  pt as BillboardBulletsElement,
352
354
  gt as BillboardCounterElement,
353
355
  U as BillboardElement,
354
- Et as BillboardSetButtonElement,
355
- vt as BillboardStepButtonElement
356
+ vt as BillboardSetButtonElement,
357
+ Et as BillboardStepButtonElement
356
358
  };
@@ -12,6 +12,9 @@ export interface MorphNavigationEntry {
12
12
  path: string;
13
13
  submorph?: Array<string>;
14
14
  }
15
+ export interface MorphCompleteEntry extends MorphNavigationEntry {
16
+ document: Document;
17
+ }
15
18
  export interface MorphChildrenActionEntry {
16
19
  morphElement: HTMLElement;
17
20
  path: string;
@@ -38,7 +41,7 @@ export interface MorphScrollDetail {
38
41
  export interface MorphEvents {
39
42
  morphNavigation: CustomEvent<MorphNavigationEntry>;
40
43
  morphStart: CustomEvent<MorphNavigationEntry>;
41
- morphComplete: CustomEvent<MorphNavigationEntry>;
44
+ morphComplete: CustomEvent<MorphCompleteEntry>;
42
45
  morphNewChildrenAdded: CustomEvent<MorphChildrenActionEntry>;
43
46
  morphOldChildrenRemoved: CustomEvent<MorphChildrenActionEntry>;
44
47
  morphScroll: CustomEvent<MorphScrollDetail>;