aptechka 0.4.29 → 0.4.30

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 $=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>($(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},n=(i,e,s,r)=>($(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s);var q=(i,e,s)=>($(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../css-unit-parser/index.cjs"),F=require("../ladder/index.cjs"),N=require("../order/index.cjs"),G=require("../scroll-entries/index.cjs"),Q=require("../ticker/index.cjs"),j=require("../browser-CpzFX2xg.cjs"),tt=require("../dom-JBOkFLTh.cjs"),O=require("../layout-8ryRAMGJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const et=require("../element-resizer/index.cjs"),st=require("../window-resizer/index.cjs");function it(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),r=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),Y=Math.atan2(i.m32,i.m33),H=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),K=Math.atan2(i.m21,i.m11),u=i.m41,C=i.m42*-1,R=i.m43;return{scaleX:e,scaleY:s,scaleZ:r,rotationX:Y,rotationY:H,rotationZ:K,translationX:u,translationY:C,translationZ:R}}var c,f,p,M,Z,L,x,w,B,y,_,P,S,d,v,T,X,A,z,g,m,a,l,o,b,W,J,V,ht,D,nt,I,rt,E,k,U;class St{constructor(e,s){h(this,W);h(this,V);h(this,D);h(this,I);h(this,c,null);h(this,f,null);h(this,p,[]);h(this,M,"auto");h(this,Z,"top");h(this,L,!1);h(this,x,!0);h(this,w,!0);h(this,B,!0);h(this,y,0);h(this,_,0);h(this,P,0);h(this,S,0);h(this,d,0);h(this,v,0);h(this,T,0);h(this,X,0);h(this,A,0);h(this,z,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,m,{x:1,y:1,z:1});h(this,a,new F.Ladder({x:0,y:0,z:0}));h(this,l,new F.Ladder({x:0,y:0,z:0}));h(this,o,new F.Ladder({x:0,y:0,z:0}));h(this,b,new Map);h(this,E,()=>{j.isBrowser&&q(this,D,nt).call(this)});h(this,k,()=>{q(this,I,rt).call(this),q(this,W,J).call(this)});h(this,U,()=>{const e=G.scrollEntries.getAll(this.element);t(this,b).forEach((s,r)=>{e.includes(r)||(this.deleteScrollStep(s),t(this,b).delete(r))}),e.forEach(s=>{if(!t(this,b).has(s)){const r=()=>s;t(this,b).set(s,r),this.setScrollStep(r)}})});j.isBrowser&&(n(this,c,tt.getElement(e)||document.body),n(this,f,tt.getElement(s==null?void 0:s.containerElement)||document.body),n(this,M,(s==null?void 0:s.scrollAxis)||"auto"),n(this,Z,(s==null?void 0:s.frontSide)||"top"),n(this,L,(s==null?void 0:s.cartesian)||!1),n(this,x,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),n(this,w,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),n(this,B,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),t(this,o).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}),G.scrollEntries.notifier.subscribe(t(this,U)),Q.ticker.subscribe(t(this,k),{order:N.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),et.elementResizer.subscribe(this.element,t(this,E)),st.windowResizer.subscribe(t(this,E),N.RESIZE_ORDER.LAYOUT_BOX))}get element(){return t(this,c)}get containerElement(){return t(this,f)}get position(){return t(this,l).current}get rotation(){return t(this,a).current}get scale(){return t(this,o).current}get left(){return t(this,d)}get top(){return t(this,S)}get front(){return t(this,v)}get width(){return t(this,y)}get height(){return t(this,_)}get depth(){return t(this,P)}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,a).bind(e.rotation),e.scale&&t(this,o).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,a).unbind(e.rotation),e.scale&&t(this,o).unbind(e.scale)}setScrollStep(e){return t(this,p).includes(e)||t(this,p).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){n(this,p,t(this,p).filter(s=>s!==e))}destroy(){Q.ticker.unsubscribe(t(this,k)),et.elementResizer.unsubscribe(t(this,E)),st.windowResizer.unsubscribe(t(this,E)),G.scrollEntries.notifier.unsubscribe(t(this,U)),t(this,b).clear(),t(this,l).close(),t(this,a).close(),t(this,o).close()}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,a).setStep(...e)}getRotationStep(...e){return t(this,a).getStepValue(...e)}setScaleStep(...e){t(this,o).setStep(...e)}getScaleStep(...e){return t(this,o).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,a).deleteStep(...e)}deleteScaleStep(...e){t(this,o).deleteStep(...e)}}c=new WeakMap,f=new WeakMap,p=new WeakMap,M=new WeakMap,Z=new WeakMap,L=new WeakMap,x=new WeakMap,w=new WeakMap,B=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,S=new WeakMap,d=new WeakMap,v=new WeakMap,T=new WeakMap,X=new WeakMap,A=new WeakMap,z=new WeakMap,g=new WeakMap,m=new WeakMap,a=new WeakMap,l=new WeakMap,o=new WeakMap,b=new WeakMap,W=new WeakSet,J=function(){t(this,o).calculate(),t(this,l).calculate(),t(this,a).calculate()},V=new WeakSet,ht=function(){t(this,o).setStep("_size","+",{x:t(this,x)?t(this,y):1,y:t(this,x)?t(this,_):1,z:t(this,x)?t(this,P):1});const e=t(this,w)?t(this,T):0,s=t(this,w)?t(this,X):0,r=t(this,w)?t(this,A):0;t(this,l).setStep("_position","+",{x:e,y:s,z:r}),t(this,B)?(t(this,o).setStep("_scale","*",{x:t(this,m).x,y:t(this,m).y,z:t(this,m).z}),t(this,l).setStep("_translation","+",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,a).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}))},D=new WeakSet,nt=function(){const e=getComputedStyle(t(this,c));n(this,y,Math.max(t(this,c).clientWidth,1)),n(this,_,Math.max(t(this,c).clientHeight,1)),n(this,P,Math.max(ut.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=O.getCumulativeOffsetLeft(t(this,f)),r=O.getCumulativeOffsetTop(t(this,f)),Y=t(this,f).clientWidth,H=t(this,f).clientHeight;if(n(this,d,O.getCumulativeOffsetLeft(t(this,c))-s),n(this,S,O.getCumulativeOffsetTop(t(this,c))-r),t(this,M)==="z"){const C=t(this,d)/Y,R=t(this,S)/H;n(this,d,(C-Math.floor(C))*Y),n(this,S,(R-Math.floor(R))*H),t(this,Z)==="left"?n(this,v,O.getCumulativeOffsetLeft(t(this,c))-s-t(this,d)):n(this,v,O.getCumulativeOffsetTop(t(this,c))-r-t(this,S))}if(n(this,d,t(this,d)+t(this,c).clientLeft),n(this,S,t(this,S)+t(this,c).clientTop),t(this,L)){const C=Math.round(Y/2),R=Math.round(H/2),lt=t(this,y)?Math.round(t(this,y)/2):0,ot=t(this,_)?Math.round(t(this,_)/2):0,ct=t(this,d)-C+lt,at=(t(this,S)-R+ot)*-1;n(this,T,ct),n(this,X,at)}else n(this,T,t(this,d)),n(this,X,t(this,S));n(this,A,t(this,v)*-1);const K=new WebKitCSSMatrix(e.transform),u=it(K);t(this,z).x=u.translationX,t(this,z).y=u.translationY,t(this,z).z=u.translationZ,t(this,m).x=u.scaleX,t(this,m).y=u.scaleY,t(this,m).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,q(this,V,ht).call(this),q(this,W,J).call(this)},I=new WeakSet,rt=function(){for(let e=0;e<t(this,p).length;e++){const s=t(this,p)[e]();let r=s.axis;t(this,M)!=="auto"&&(r=t(this,M)),t(this,l).setStep(`_scroll_${e}`,"+",{[r]:s.value*(r==="x"?-1:t(this,L)?1:-1)})}},E=new WeakMap,k=new WeakMap,U=new WeakMap;exports.LayoutBox=St;exports.decomposeCSSMatrix=it;
1
+ "use strict";var $=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>($(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},n=(i,e,s,r)=>($(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s);var q=(i,e,s)=>($(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../css-unit-parser/index.cjs"),F=require("../ladder/index.cjs"),N=require("../order/index.cjs"),G=require("../scroll-entries/index.cjs"),Q=require("../ticker/index.cjs"),j=require("../browser-CpzFX2xg.cjs"),tt=require("../dom-JBOkFLTh.cjs"),O=require("../layout-8ryRAMGJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const et=require("../element-resizer/index.cjs"),st=require("../window-resizer/index.cjs");function it(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),r=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),H=Math.atan2(i.m32,i.m33),Z=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),K=Math.atan2(i.m21,i.m11),u=i.m41,C=i.m42*-1,R=i.m43;return{scaleX:e,scaleY:s,scaleZ:r,rotationX:H,rotationY:Z,rotationZ:K,translationX:u,translationY:C,translationZ:R}}var c,f,p,M,B,L,x,w,A,y,_,P,S,d,v,T,X,W,z,g,m,a,l,o,b,k,J,V,ht,D,nt,I,rt,E,U,Y;class St{constructor(e,s){h(this,k);h(this,V);h(this,D);h(this,I);h(this,c,null);h(this,f,null);h(this,p,[]);h(this,M,"auto");h(this,B,"top");h(this,L,!1);h(this,x,!0);h(this,w,!0);h(this,A,!0);h(this,y,0);h(this,_,0);h(this,P,0);h(this,S,0);h(this,d,0);h(this,v,0);h(this,T,0);h(this,X,0);h(this,W,0);h(this,z,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,m,{x:1,y:1,z:1});h(this,a,new F.Ladder({x:0,y:0,z:0}));h(this,l,new F.Ladder({x:0,y:0,z:0}));h(this,o,new F.Ladder({x:0,y:0,z:0}));h(this,b,new Map);h(this,E,()=>{j.isBrowser&&q(this,D,nt).call(this)});h(this,U,()=>{q(this,I,rt).call(this),q(this,k,J).call(this)});h(this,Y,()=>{const e=G.scrollEntries.getAll(this.element);t(this,b).forEach((s,r)=>{e.includes(r)||(this.deleteScrollStep(s),t(this,b).delete(r))}),e.forEach(s=>{if(!t(this,b).has(s)){const r=()=>s;t(this,b).set(s,r),this.setScrollStep(r)}})});j.isBrowser&&(n(this,c,tt.getElement(e)||document.body),n(this,f,tt.getElement(s==null?void 0:s.containerElement)||document.body),n(this,M,(s==null?void 0:s.scrollAxis)||"auto"),n(this,B,(s==null?void 0:s.frontSide)||"top"),n(this,L,(s==null?void 0:s.cartesian)||!1),n(this,x,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),n(this,w,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),n(this,A,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),t(this,o).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}),G.scrollEntries.notifier.subscribe(t(this,Y)),t(this,Y).call(this),Q.ticker.subscribe(t(this,U),{order:N.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),et.elementResizer.subscribe(this.element,t(this,E)),st.windowResizer.subscribe(t(this,E),N.RESIZE_ORDER.LAYOUT_BOX))}get element(){return t(this,c)}get containerElement(){return t(this,f)}get position(){return t(this,l).current}get rotation(){return t(this,a).current}get scale(){return t(this,o).current}get left(){return t(this,d)}get top(){return t(this,S)}get front(){return t(this,v)}get width(){return t(this,y)}get height(){return t(this,_)}get depth(){return t(this,P)}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,a).bind(e.rotation),e.scale&&t(this,o).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,a).unbind(e.rotation),e.scale&&t(this,o).unbind(e.scale)}setScrollStep(e){return t(this,p).includes(e)||t(this,p).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){n(this,p,t(this,p).filter(s=>s!==e))}destroy(){Q.ticker.unsubscribe(t(this,U)),et.elementResizer.unsubscribe(t(this,E)),st.windowResizer.unsubscribe(t(this,E)),G.scrollEntries.notifier.unsubscribe(t(this,Y)),t(this,b).clear(),t(this,l).close(),t(this,a).close(),t(this,o).close()}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,a).setStep(...e)}getRotationStep(...e){return t(this,a).getStepValue(...e)}setScaleStep(...e){t(this,o).setStep(...e)}getScaleStep(...e){return t(this,o).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,a).deleteStep(...e)}deleteScaleStep(...e){t(this,o).deleteStep(...e)}}c=new WeakMap,f=new WeakMap,p=new WeakMap,M=new WeakMap,B=new WeakMap,L=new WeakMap,x=new WeakMap,w=new WeakMap,A=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,S=new WeakMap,d=new WeakMap,v=new WeakMap,T=new WeakMap,X=new WeakMap,W=new WeakMap,z=new WeakMap,g=new WeakMap,m=new WeakMap,a=new WeakMap,l=new WeakMap,o=new WeakMap,b=new WeakMap,k=new WeakSet,J=function(){t(this,o).calculate(),t(this,l).calculate(),t(this,a).calculate()},V=new WeakSet,ht=function(){t(this,o).setStep("_size","+",{x:t(this,x)?t(this,y):1,y:t(this,x)?t(this,_):1,z:t(this,x)?t(this,P):1});const e=t(this,w)?t(this,T):0,s=t(this,w)?t(this,X):0,r=t(this,w)?t(this,W):0;t(this,l).setStep("_position","+",{x:e,y:s,z:r}),t(this,A)?(t(this,o).setStep("_scale","*",{x:t(this,m).x,y:t(this,m).y,z:t(this,m).z}),t(this,l).setStep("_translation","+",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,a).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}))},D=new WeakSet,nt=function(){const e=getComputedStyle(t(this,c));n(this,y,Math.max(t(this,c).clientWidth,1)),n(this,_,Math.max(t(this,c).clientHeight,1)),n(this,P,Math.max(ut.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=O.getCumulativeOffsetLeft(t(this,f)),r=O.getCumulativeOffsetTop(t(this,f)),H=t(this,f).clientWidth,Z=t(this,f).clientHeight;if(n(this,d,O.getCumulativeOffsetLeft(t(this,c))-s),n(this,S,O.getCumulativeOffsetTop(t(this,c))-r),t(this,M)==="z"){const C=t(this,d)/H,R=t(this,S)/Z;n(this,d,(C-Math.floor(C))*H),n(this,S,(R-Math.floor(R))*Z),t(this,B)==="left"?n(this,v,O.getCumulativeOffsetLeft(t(this,c))-s-t(this,d)):n(this,v,O.getCumulativeOffsetTop(t(this,c))-r-t(this,S))}if(n(this,d,t(this,d)+t(this,c).clientLeft),n(this,S,t(this,S)+t(this,c).clientTop),t(this,L)){const C=Math.round(H/2),R=Math.round(Z/2),lt=t(this,y)?Math.round(t(this,y)/2):0,ot=t(this,_)?Math.round(t(this,_)/2):0,ct=t(this,d)-C+lt,at=(t(this,S)-R+ot)*-1;n(this,T,ct),n(this,X,at)}else n(this,T,t(this,d)),n(this,X,t(this,S));n(this,W,t(this,v)*-1);const K=new WebKitCSSMatrix(e.transform),u=it(K);t(this,z).x=u.translationX,t(this,z).y=u.translationY,t(this,z).z=u.translationZ,t(this,m).x=u.scaleX,t(this,m).y=u.scaleY,t(this,m).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,q(this,V,ht).call(this),q(this,k,J).call(this)},I=new WeakSet,rt=function(){for(let e=0;e<t(this,p).length;e++){const s=t(this,p)[e]();let r=s.axis;t(this,M)!=="auto"&&(r=t(this,M)),t(this,l).setStep(`_scroll_${e}`,"+",{[r]:s.value*(r==="x"?-1:t(this,L)?1:-1)})}},E=new WeakMap,U=new WeakMap,Y=new WeakMap;exports.LayoutBox=St;exports.decomposeCSSMatrix=it;
@@ -26,7 +26,7 @@ function dt(i) {
26
26
  i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
27
27
  ), r = Math.sqrt(
28
28
  i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
29
- ), H = Math.atan2(i.m32, i.m33), T = Math.atan2(
29
+ ), T = Math.atan2(i.m32, i.m33), Z = Math.atan2(
30
30
  -i.m31,
31
31
  Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
32
32
  ), I = Math.atan2(i.m21, i.m11), u = i.m41, R = i.m42 * -1, C = i.m43;
@@ -34,18 +34,18 @@ function dt(i) {
34
34
  scaleX: s,
35
35
  scaleY: e,
36
36
  scaleZ: r,
37
- rotationX: H,
38
- rotationY: T,
37
+ rotationX: T,
38
+ rotationY: Z,
39
39
  rotationZ: I,
40
40
  translationX: u,
41
41
  translationY: R,
42
42
  translationZ: C
43
43
  };
44
44
  }
45
- var a, f, p, _, Z, P, x, E, A, y, M, L, S, d, v, X, Y, W, m, z, g, c, l, o, b, q, N, D, it, U, ht, k, nt, w, B, V;
45
+ var a, f, p, _, A, P, x, E, W, y, M, L, S, d, v, X, Y, q, m, z, g, c, l, o, b, B, N, D, it, U, ht, k, nt, w, V, H;
46
46
  class wt {
47
47
  constructor(s, e) {
48
- h(this, q);
48
+ h(this, B);
49
49
  h(this, D);
50
50
  h(this, U);
51
51
  h(this, k);
@@ -53,11 +53,11 @@ class wt {
53
53
  h(this, f, null);
54
54
  h(this, p, []);
55
55
  h(this, _, "auto");
56
- h(this, Z, "top");
56
+ h(this, A, "top");
57
57
  h(this, P, !1);
58
58
  h(this, x, !0);
59
59
  h(this, E, !0);
60
- h(this, A, !0);
60
+ h(this, W, !0);
61
61
  h(this, y, 0);
62
62
  h(this, M, 0);
63
63
  h(this, L, 0);
@@ -66,7 +66,7 @@ class wt {
66
66
  h(this, v, 0);
67
67
  h(this, X, 0);
68
68
  h(this, Y, 0);
69
- h(this, W, 0);
69
+ h(this, q, 0);
70
70
  h(this, m, { x: 0, y: 0, z: 0 });
71
71
  h(this, z, { x: 0, y: 0, z: 0 });
72
72
  h(this, g, { x: 1, y: 1, z: 1 });
@@ -77,10 +77,10 @@ class wt {
77
77
  h(this, w, () => {
78
78
  j && O(this, U, ht).call(this);
79
79
  });
80
- h(this, B, () => {
81
- O(this, k, nt).call(this), O(this, q, N).call(this);
82
- });
83
80
  h(this, V, () => {
81
+ O(this, k, nt).call(this), O(this, B, N).call(this);
82
+ });
83
+ h(this, H, () => {
84
84
  const s = F.getAll(this.element);
85
85
  t(this, b).forEach((e, r) => {
86
86
  s.includes(r) || (this.deleteScrollStep(e), t(this, b).delete(r));
@@ -91,7 +91,7 @@ class wt {
91
91
  }
92
92
  });
93
93
  });
94
- j && (n(this, a, tt(s) || document.body), n(this, f, tt(e == null ? void 0 : e.containerElement) || document.body), n(this, _, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, Z, (e == null ? void 0 : e.frontSide) || "top"), n(this, P, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, E, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, A, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
94
+ j && (n(this, a, tt(s) || document.body), n(this, f, tt(e == null ? void 0 : e.containerElement) || document.body), n(this, _, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, A, (e == null ? void 0 : e.frontSide) || "top"), n(this, P, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, E, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, W, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
95
95
  x: 1,
96
96
  y: 1,
97
97
  z: 1
@@ -111,7 +111,7 @@ class wt {
111
111
  x: 0,
112
112
  y: 0,
113
113
  z: 0
114
- }), F.notifier.subscribe(t(this, V)), Q.subscribe(t(this, B), {
114
+ }), F.notifier.subscribe(t(this, H)), t(this, H).call(this), Q.subscribe(t(this, V), {
115
115
  order: ut.LAYOUT_BOX,
116
116
  culling: e != null && e.culling ? this.element : void 0
117
117
  }), st.subscribe(this.element, t(this, w)), et.subscribe(t(this, w), St.LAYOUT_BOX));
@@ -164,7 +164,7 @@ class wt {
164
164
  ));
165
165
  }
166
166
  destroy() {
167
- Q.unsubscribe(t(this, B)), st.unsubscribe(t(this, w)), et.unsubscribe(t(this, w)), F.notifier.unsubscribe(t(this, V)), t(this, b).clear(), t(this, l).close(), t(this, c).close(), t(this, o).close();
167
+ Q.unsubscribe(t(this, V)), st.unsubscribe(t(this, w)), et.unsubscribe(t(this, w)), F.notifier.unsubscribe(t(this, H)), t(this, b).clear(), t(this, l).close(), t(this, c).close(), t(this, o).close();
168
168
  }
169
169
  setPositionStep(...s) {
170
170
  t(this, l).setStep(...s);
@@ -194,7 +194,7 @@ class wt {
194
194
  t(this, o).deleteStep(...s);
195
195
  }
196
196
  }
197
- a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), P = new WeakMap(), x = new WeakMap(), E = new WeakMap(), A = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), v = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), m = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), l = new WeakMap(), o = new WeakMap(), b = new WeakMap(), q = new WeakSet(), N = function() {
197
+ a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), A = new WeakMap(), P = new WeakMap(), x = new WeakMap(), E = new WeakMap(), W = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), v = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), q = new WeakMap(), m = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), l = new WeakMap(), o = new WeakMap(), b = new WeakMap(), B = new WeakSet(), N = function() {
198
198
  t(this, o).calculate(), t(this, l).calculate(), t(this, c).calculate();
199
199
  }, D = new WeakSet(), it = function() {
200
200
  t(this, o).setStep("_size", "+", {
@@ -202,12 +202,12 @@ a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z =
202
202
  y: t(this, x) ? t(this, M) : 1,
203
203
  z: t(this, x) ? t(this, L) : 1
204
204
  });
205
- const s = t(this, E) ? t(this, X) : 0, e = t(this, E) ? t(this, Y) : 0, r = t(this, E) ? t(this, W) : 0;
205
+ const s = t(this, E) ? t(this, X) : 0, e = t(this, E) ? t(this, Y) : 0, r = t(this, E) ? t(this, q) : 0;
206
206
  t(this, l).setStep("_position", "+", {
207
207
  x: s,
208
208
  y: e,
209
209
  z: r
210
- }), t(this, A) ? (t(this, o).setStep("_scale", "*", {
210
+ }), t(this, W) ? (t(this, o).setStep("_scale", "*", {
211
211
  x: t(this, g).x,
212
212
  y: t(this, g).y,
213
213
  z: t(this, g).z
@@ -238,19 +238,19 @@ a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z =
238
238
  ct.parse(s.getPropertyValue("--depth") || "0px"),
239
239
  1
240
240
  ));
241
- const e = G(t(this, f)), r = J(t(this, f)), H = t(this, f).clientWidth, T = t(this, f).clientHeight;
241
+ const e = G(t(this, f)), r = J(t(this, f)), T = t(this, f).clientWidth, Z = t(this, f).clientHeight;
242
242
  if (n(this, d, G(t(this, a)) - e), n(this, S, J(t(this, a)) - r), t(this, _) === "z") {
243
- const R = t(this, d) / H, C = t(this, S) / T;
244
- n(this, d, (R - Math.floor(R)) * H), n(this, S, (C - Math.floor(C)) * T), t(this, Z) === "left" ? n(this, v, G(t(this, a)) - e - t(this, d)) : n(this, v, J(t(this, a)) - r - t(this, S));
243
+ const R = t(this, d) / T, C = t(this, S) / Z;
244
+ n(this, d, (R - Math.floor(R)) * T), n(this, S, (C - Math.floor(C)) * Z), t(this, A) === "left" ? n(this, v, G(t(this, a)) - e - t(this, d)) : n(this, v, J(t(this, a)) - r - t(this, S));
245
245
  }
246
246
  if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, P)) {
247
- const R = Math.round(H / 2), C = Math.round(T / 2), rt = t(this, y) ? Math.round(t(this, y) / 2) : 0, lt = t(this, M) ? Math.round(t(this, M) / 2) : 0, ot = t(this, d) - R + rt, at = (t(this, S) - C + lt) * -1;
247
+ const R = Math.round(T / 2), C = Math.round(Z / 2), rt = t(this, y) ? Math.round(t(this, y) / 2) : 0, lt = t(this, M) ? Math.round(t(this, M) / 2) : 0, ot = t(this, d) - R + rt, at = (t(this, S) - C + lt) * -1;
248
248
  n(this, X, ot), n(this, Y, at);
249
249
  } else
250
250
  n(this, X, t(this, d)), n(this, Y, t(this, S));
251
- n(this, W, t(this, v) * -1);
251
+ n(this, q, t(this, v) * -1);
252
252
  const I = new WebKitCSSMatrix(s.transform), u = dt(I);
253
- t(this, m).x = u.translationX, t(this, m).y = u.translationY, t(this, m).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, O(this, D, it).call(this), O(this, q, N).call(this);
253
+ t(this, m).x = u.translationX, t(this, m).y = u.translationY, t(this, m).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, O(this, D, it).call(this), O(this, B, N).call(this);
254
254
  }, k = new WeakSet(), nt = function() {
255
255
  for (let s = 0; s < t(this, p).length; s++) {
256
256
  const e = t(this, p)[s]();
@@ -259,7 +259,7 @@ a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z =
259
259
  [r]: e.value * (r === "x" ? -1 : t(this, P) ? 1 : -1)
260
260
  });
261
261
  }
262
- }, w = new WeakMap(), B = new WeakMap(), V = new WeakMap();
262
+ }, w = new WeakMap(), V = new WeakMap(), H = new WeakMap();
263
263
  export {
264
264
  wt as LayoutBox,
265
265
  dt as decomposeCSSMatrix
@@ -1 +1 @@
1
- "use strict";var fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),z=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},D=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ds=require("../Damped-B0G_t-pw.cjs"),rs=require("../browser-CpzFX2xg.cjs"),wt=require("../layout-8ryRAMGJ.cjs"),Yt=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const _t=require("../Store-BQGNOHlY.cjs"),Fs=require("../Derived-BZtlW0bB.cjs");require("../ticker/index.cjs");const _e=require("../controls/index.cjs"),bt=require("../custom-element/index.cjs"),Ie=require("../order/index.cjs"),ie=require("../window-resizer/index.cjs"),Tt=require("../scroll-entries/index.cjs"),I=require("../tags-CueX-JLX.cjs"),ns=require("../createStylesheet-C8aQQ4hd.cjs"),Ss=require("../css-unit-parser/index.cjs"),p=require("../css-property/index.cjs"),Rs=require("../Viewport-_WllZTJ0.cjs"),Ts=require("../gestures-DHLrn6Q8.cjs"),ds=require("../theme/index.cjs"),vs=require("../element-resizer/index.cjs"),qs=require("../dom-JBOkFLTh.cjs"),ws=require("../function-MthRj-GJ.cjs");var Bs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Is=(r,e,i,n)=>{for(var h=n>1?void 0:n?As(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Bs(e,i,h),h},hs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(hs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},b=(r,e,i,n)=>(hs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(hs(r,e,"access private method"),i),d,F,it,Q,rt,yt,Pt,Z,T,Bt,At,It,Ht,he,at,Gt,Et,Ut,Nt,m,Te,u,ye,Pe,M,_,B,X,$t,pt,O,E,oe,kt,re,ne,jt,ve,Dt,te,qe,os,Be,as,Ee,Ue,ke,Ne,st,He,Ze,bs,ae,We,Me,Ke,ge,Ae,Je,Cs,w,P,Rt,tt,gt;class Hs{constructor(e,i){z(this,w,void 0);z(this,P,void 0);z(this,Rt,0);z(this,tt,0);z(this,gt,null);D(this,w,e),D(this,P,i),Tt.scrollEntries.register(o(this,w))}get size(){return o(this,Rt)}get position(){return o(this,tt)}destroy(){Tt.scrollEntries.unregister(o(this,w)),o(this,w).style.transform="",this.mark(null)}setSize(e){e?(o(this,w).style.setProperty("--size",e+"px"),o(this,P).axisCSSProperty.current==="x"?(o(this,w).style.width=e+"px",o(this,w).style.height=""):(o(this,w).style.height=e+"px",o(this,w).style.width="")):(o(this,w).style.width="",o(this,w).style.height="",o(this,w).style.removeProperty("--size"))}resize(){D(this,Rt,o(this,P).vertical?o(this,w).offsetHeight:o(this,w).offsetWidth),D(this,tt,o(this,P).vertical?wt.getCumulativeOffsetTop(o(this,w)):wt.getCumulativeOffsetLeft(o(this,w))),D(this,tt,o(this,tt)-o(this,P).contentPosition)}transform(){let e=0;const i=o(this,P).viewportSize*o(this,P).sectionDistanceScaleCSSProperty.current;o(this,P).infiniteCSSProperty.current&&o(this,P).overscroll&&o(this,tt)+o(this,Rt)<o(this,P).currentScrollValue&&(e=o(this,P).distance*-1-o(this,P).gap),Tt.scrollEntries.update(o(this,w),o(this,P).axisCSSProperty.current,e);const n=o(this,P).currentScrollValue+e,h=o(this,tt)-o(this,P).viewportSize-i,c=o(this,tt)+o(this,Rt)+i,f=Yt.clamp(n,h,c);o(this,P).vertical?o(this,w).style.transform=`translate3d(0px, ${f*-1}px, 0px)`:o(this,w).style.transform=`translate3d(${f*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,w).classList.remove(o(this,gt)),e&&o(this,w).classList.add(e),D(this,gt,e),o(this,w).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}w=new WeakMap,P=new WeakMap,Rt=new WeakMap,tt=new WeakMap,gt=new WeakMap;const Gs=ns.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends bt.CustomElement{constructor(){super(),l(this,jt),l(this,Dt),l(this,qe),l(this,Be),l(this,Ee),l(this,ke),l(this,Ze),l(this,Me),l(this,ge),l(this,Je),l(this,d,null),l(this,F,new p.CSSProperty(this,"--axis","y")),l(this,it,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,Q,new p.CSSProperty(this,"--split",!1)),l(this,rt,new p.CSSProperty(this,"--sectional",!1)),l(this,yt,new p.CSSProperty(this,"--auto-size",!1)),l(this,Pt,new p.CSSProperty(this,"--wheel-max-delta",!1)),l(this,Z,new p.CSSProperty(this,"--sections-in-view",1)),l(this,T,new p.CSSProperty(this,"--infinite",!1)),l(this,Bt,new p.CSSProperty(this,"--damping",20)),l(this,At,new p.CSSProperty(this,"--mass",0)),l(this,It,new p.CSSProperty(this,"--stiffness",0)),l(this,Ht,new p.CSSProperty(this,"--mouse-drag",!1)),l(this,he,new p.CSSProperty(this,"--section-distance-scale",.5)),l(this,at,new p.CSSProperty(this,"--autoplay",0)),l(this,Gt,new p.CSSProperty(this,"--autoplay-pause-duration",0)),l(this,Et,new p.CSSProperty(this,"--autoplay-user-direction",!1)),l(this,Ut,new p.CSSProperty(this,"--disabled",!1)),l(this,Nt,new p.CSSProperty(this,"--hibernated",!1)),l(this,m,null),l(this,Te,null),l(this,u,[]),l(this,ye,0),l(this,Pe,0),l(this,M,0),l(this,_,0),l(this,B,0),l(this,X,null),l(this,$t,null),l(this,pt,null),l(this,O,null),l(this,E,new _t.Store(0)),l(this,oe,0),l(this,kt,0),l(this,re,!0),l(this,ne,!0),l(this,st,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,_)||0,i=t(this,E).current;if(b(this,ye,this.vertical?wt.getCumulativeOffsetTop(this):wt.getCumulativeOffsetLeft(this)),b(this,Pe,this.vertical?wt.getCumulativeOffsetTop(t(this,m)):wt.getCumulativeOffsetLeft(t(this,m))),b(this,M,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?b(this,B,Ss.cssUnitParser.parse(getComputedStyle(t(this,m)).rowGap)):b(this,B,Ss.cssUnitParser.parse(getComputedStyle(t(this,m)).columnGap)),t(this,yt).current&&t(this,u).length){const n=t(this,Z).current,h=(t(this,M)-t(this,B)*(n-1))/n;t(this,u).forEach(c=>{c.setSize(h)})}else t(this,u).forEach(n=>{n.setSize()});if(t(this,u).forEach(n=>{n.resize()}),t(this,it).current){b(this,_,t(this,M)*t(this,it).current);const n=t(this,_)+t(this,M);this.vertical?(t(this,m).style.width=n+"px",t(this,m).style.height="100%"):(t(this,m).style.height=n+"px",t(this,m).style.width="100%")}else this.vertical?(t(this,m).style.width="100%",t(this,m).style.height="max-content",b(this,_,t(this,m).offsetHeight-t(this,M))):(t(this,m).style.width="max-content",t(this,m).style.height="100%",b(this,_,t(this,m).offsetWidth-t(this,M)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);b(this,_,t(this,_)+h),t(this,d).max=t(this,_)}if(t(this,T).current&&t(this,u).length){const n=t(this,u)[t(this,u).length-1],h=n.position+n.size-t(this,M),c=t(this,_)-h;b(this,kt,n.position+n.size+c)}else b(this,kt,t(this,_));if(t(this,rt).current&&t(this,u).length){const n=t(this,u)[i];t(this,d).set(n.position,!0)}else t(this,d).set(e*t(this,_),!0)}),l(this,He,()=>{const e=this.currentScrollValue;if(b(this,oe,Math.max(0,e-t(this,_))),t(this,u).length){let i=0;for(let n=0;n<t(this,u).length;n++){const h=t(this,u)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,E).current=i}else this.vertical?t(this,m).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Tt.scrollEntries.update(this,t(this,F).current,e)}),l(this,ae,(e,i)=>{t(this,O).pauseAndContinue(t(this,Gt).current),t(this,Et).current&&(t(this,O).direction=Math.sign(i)||1),t(this,We).call(this,e,i)}),l(this,We,(e,i)=>{if(!(e==="drag"&&!Rs.device.isMobile&&!t(this,Ht).current))if(t(this,rt).current){const n=Math.sign(i);t(this,u).length?this.shiftSections(n):t(this,d).shift(n*t(this,M))}else t(this,d).shift(i)}),rs.isBrowser&&(b(this,d,new Ds.Damped(0,{damping:.01,min:0,order:Ie.TICK_ORDER.SCROLL})),this.openShadow(Gs),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>b(this,Te,e)})],style:{flexDirection:new Fs.Derived(t(this,F),e=>e==="x"?"row":"column")},ref:e=>b(this,m,e)})]}),b(this,X,new _e.WheelControls({element:t(this,m)})),t(this,X).changeEvent.subscribe(t(this,ae)),b(this,$t,new _e.KeyboardControls({element:t(this,m)})),t(this,$t).changeEvent.subscribe(t(this,ae)),b(this,pt,new _e.DragControls({element:t(this,m)})),t(this,pt).changeEvent.subscribe(t(this,ae)),b(this,O,new _e.AutoplayControls),t(this,O).changeEvent.subscribe(t(this,We)),t(this,F).subscribe(({current:e})=>{t(this,m).style.flexDirection=e==="x"?"row":"column",t(this,X).axis=t(this,Pt).current?"max":e,t(this,$t).dimension=e==="x"?"width":"height",t(this,pt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,st).call(this)}),t(this,Pt).subscribe(e=>{t(this,X).axis=e.current?"max":t(this,F).current}),t(this,it).subscribe(()=>{this.isConnected&&t(this,st).call(this)}),t(this,Q).subscribe(({current:e})=>{this.isConnected&&(e?C(this,jt,ve).call(this):C(this,Dt,te).call(this))}),t(this,rt).subscribe(e=>{t(this,X).debounce=e.current,t(this,pt).swipe=e.current,t(this,O).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,u).length?C(this,jt,ve).call(this):!e.current&&e.previous&&t(this,u).length&&C(this,Dt,te).call(this))}),t(this,yt).subscribe(e=>{this.isConnected&&(t(this,st).call(this),e.current&&!e.previous&&!t(this,u).length?C(this,jt,ve).call(this):!e.current&&e.previous&&t(this,u).length&&C(this,Dt,te).call(this))}),t(this,Z).subscribe(e=>{this.isConnected&&(t(this,st).call(this),C(this,ge,Ae).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,u).length||(t(this,Q).current=!0)),t(this,u).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(b(this,oe,0),t(this,d).max=t(this,_),t(this,d).min=0)}),t(this,Bt).subscribe(e=>{t(this,d).damping=e.current}),t(this,At).subscribe(e=>{t(this,d).mass=e.current}),t(this,It).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?C(this,qe,os).call(this):!e.current&&e.previous&&C(this,Be,as).call(this)}),t(this,Nt).subscribe(e=>{e.current&&!e.previous?C(this,Ee,Ue).call(this):!e.current&&e.previous&&C(this,ke,Ne).call(this)}),t(this,at).subscribe(e=>{t(this,O).speed=e.current,e.current&&!e.previous?t(this,O).connect():!e.current&&e.previous&&t(this,O).disconnect()}),t(this,Et).subscribe(e=>{e.current||(t(this,O).direction=1)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,E).subscribe(e=>{t(this,u).length&&C(this,ge,Ae).call(this)}))}get axisCSSProperty(){return t(this,F)}get pagesCSSProperty(){return t(this,it)}get splitCSSProperty(){return t(this,Q)}get sectionalCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Pt)}get sectionsInViewCSSProperty(){return t(this,Z)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Bt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,It)}get mouseDragCSSProperty(){return t(this,Ht)}get sectionDistanceScaleCSSProperty(){return t(this,he)}get autoplayCSSProperty(){return t(this,at)}get autoplayPauseDurationCSSProperty(){return t(this,Gt)}get autoplayUserDirectionCSSProperty(){return t(this,Et)}get disabledCSSProperty(){return t(this,Ut)}get hibernatedCSSProperty(){return t(this,Nt)}get currentScrollValue(){return C(this,Me,Ke).call(this,"current")}get targetScrollValue(){return C(this,Me,Ke).call(this,"target")}get contentElement(){return t(this,m)}get sections(){return t(this,u)}get position(){return t(this,ye)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,M)}get scrollSize(){return t(this,_)}get gap(){return t(this,B)}get counter(){return t(this,E)}get limit(){return t(this,u).length-t(this,Z).current}get distance(){return t(this,kt)}get infiniteDistance(){return t(this,T).current?t(this,kt)+t(this,B):t(this,kt)}get overscroll(){return t(this,oe)}get vertical(){return t(this,F).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return t(this,d).speed}get direction(){return t(this,d).direction}get isRunning(){return t(this,d).isRunning}get scrollWidth(){return t(this,F).current==="y"?0:t(this,d).length}get scrollHeight(){return t(this,F).current==="x"?0:t(this,d).length}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,u).length)return;const n=t(this,E).current;C(this,Ze,bs).call(this,e);const h=t(this,u)[n],c=t(this,u)[t(this,E).current];if(h&&c){let f=0;const Ce=C(this,Je,Cs).call(this),$s=Ce?this.targetScrollValue-Ce.position:0;t(this,T).current?t(this,E).current===0&&n===t(this,u).length-1?f=t(this,_)+t(this,M)-h.position+t(this,B):t(this,E).current===t(this,u).length-1&&n===0?f=c.position-(t(this,_)+t(this,M)+t(this,B)):f=c.position-h.position:f=c.position-h.position,t(this,d).shift(f-$s,i==="instant")}}shiftSections(e,i="smooth"){t(this,u).length&&this.scrollToSection(t(this,E).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,i==="instant")}connectedCallback(){t(this,F).observe(),t(this,it).observe(),t(this,Q).observe(),t(this,rt).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Z).observe(),t(this,T).observe(),t(this,Bt).observe(),t(this,At).observe(),t(this,It).observe(),t(this,Ht).observe(),t(this,he).observe(),t(this,at).observe(),t(this,at).observe(),t(this,Gt).observe(),t(this,Et).observe(),t(this,Ut).observe(),t(this,Nt).observe(),C(this,ke,Ne).call(this)}disconnectedCallback(){t(this,F).unobserve(),t(this,it).unobserve(),t(this,Q).unobserve(),t(this,rt).unobserve(),t(this,yt).unobserve(),t(this,Pt).unobserve(),t(this,Z).unobserve(),t(this,T).unobserve(),t(this,Bt).unobserve(),t(this,At).unobserve(),t(this,It).unobserve(),t(this,Ht).unobserve(),t(this,he).unobserve(),t(this,at).unobserve(),t(this,Gt).unobserve(),t(this,Et).unobserve(),t(this,Ut).unobserve(),t(this,Nt).unobserve(),C(this,Ee,Ue).call(this)}};d=new WeakMap;F=new WeakMap;it=new WeakMap;Q=new WeakMap;rt=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Z=new WeakMap;T=new WeakMap;Bt=new WeakMap;At=new WeakMap;It=new WeakMap;Ht=new WeakMap;he=new WeakMap;at=new WeakMap;Gt=new WeakMap;Et=new WeakMap;Ut=new WeakMap;Nt=new WeakMap;m=new WeakMap;Te=new WeakMap;u=new WeakMap;ye=new WeakMap;Pe=new WeakMap;M=new WeakMap;_=new WeakMap;B=new WeakMap;X=new WeakMap;$t=new WeakMap;pt=new WeakMap;O=new WeakMap;E=new WeakMap;oe=new WeakMap;kt=new WeakMap;re=new WeakMap;ne=new WeakMap;jt=new WeakSet;ve=function(){C(this,Dt,te).call(this),t(this,Te).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,u).push(new Hs(r,this))}),t(this,m).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,st).call(this),C(this,ge,Ae).call(this)};Dt=new WeakSet;te=function(){t(this,u).forEach(r=>{r.destroy()}),b(this,u,[]),t(this,E).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};qe=new WeakSet;os=function(){t(this,re)||(b(this,re,!0),t(this,d).unsubscribe(t(this,He)),t(this,d).unlistenAnimationFrame(),t(this,X).disconnect(),t(this,$t).disconnect(),t(this,pt).disconnect(),t(this,O).disconnect())};Be=new WeakSet;as=function(){t(this,re)&&(b(this,re,!1),t(this,d).subscribe(t(this,He)),t(this,X).connect(),t(this,$t).connect(),t(this,pt).connect(),t(this,at).current&&t(this,O).connect())};Ee=new WeakSet;Ue=function(){t(this,ne)||(b(this,ne,!0),ie.windowResizer.unsubscribe(t(this,st)),t(this,d).reset(),C(this,qe,os).call(this),t(this,m).style.transform="",t(this,Q).current&&C(this,Dt,te).call(this),Tt.scrollEntries.unregister(this))};ke=new WeakSet;Ne=function(){t(this,ne)&&(b(this,ne,!1),t(this,Q).current&&C(this,jt,ve).call(this),Tt.scrollEntries.register(this),ie.windowResizer.subscribe(t(this,st),Ie.RESIZE_ORDER.SCROLL),C(this,Be,as).call(this))};st=new WeakMap;He=new WeakMap;Ze=new WeakSet;bs=function(r){t(this,T).current?(t(this,E).current=r%t(this,u).length,t(this,E).current=t(this,E).current<0?t(this,u).length+t(this,E).current:t(this,E).current):t(this,E).current=Yt.clamp(r,0,this.limit)};ae=new WeakMap;We=new WeakMap;Me=new WeakSet;Ke=function(r="current"){if(t(this,T).current&&t(this,u).length){const e=t(this,d)[r]%(t(this,_)+t(this,M)+t(this,B));return e<0?t(this,_)+e+t(this,M)+t(this,B):e}else return t(this,d)[r]};ge=new WeakSet;Ae=function(){if(t(this,u).length){const r=t(this,E).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end"),t(this,u).forEach((e,i)=>{const n=r-this.limit-1,h=r+t(this,Z).current,c=this.sections.length-h;i>=r&&i<h||i<=n?e.mark("current"):i>=h&&i<h+c/2||i<=n+t(this,Z).current?e.mark("next"):e.mark("previous")})}};Je=new WeakSet;Cs=function(){let r=null,e=1/0;for(let i=0;i<t(this,u).length;i++){const n=Math.abs(t(this,u)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,u)[r]:null};exports.ScrollElement=Is([bt.define("e-scroll")],exports.ScrollElement);var me;class Ge extends bt.CustomElement{constructor(){super(...arguments);z(this,me,null)}get scrollElement(){return o(this,me)}connectedCallback(){const i=qs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?D(this,me,i):console.error(this,"e-scroll not found")}}me=new WeakMap;var Us=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,Zs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ns(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Us(e,i,h),h},_s=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},S=(r,e,i)=>(_s(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Ct=(r,e,i,n)=>(_s(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),le,R,nt,ht,ce,ue,Zt,xe,Le,Ve;const Ks=ns.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:ds.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:ds.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Ge{constructor(){super(),N(this,le,null),N(this,R,null),N(this,nt,!1),N(this,ht,0),N(this,ce,0),N(this,ue,0),N(this,Zt,()=>{Ct(this,nt,this.offsetWidth>this.offsetHeight);const e=S(this,nt)?this.offsetWidth:this.offsetHeight;Ct(this,ht,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Ct(this,ht,Math.max(S(this,ht),30)),S(this,nt)?(S(this,R).style.width=S(this,ht)+"px",S(this,R).style.height="100%"):(S(this,R).style.width="100%",S(this,R).style.height=S(this,ht)+"px"),Ct(this,ce,e-S(this,ht)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,xe,()=>{Ct(this,ue,this.scrollElement.currentProgress*S(this,ce)),S(this,nt)?S(this,R).style.transform=`translate3d(${S(this,ue)}px, 0px, 0px)`:S(this,R).style.transform=`translate3d(0px, ${S(this,ue)}px, 0px)`}),N(this,Le,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,Ve,e=>{document.documentElement.classList.add("grabbing"),Ts.setupDrag(h=>{const c=S(this,nt)?h.x:h.y,f=this.scrollElement.distance/S(this,ce),Ce=(c-n)*f;this.scrollElement.setPosition(i+Ce)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=S(this,nt)?e.x:e.y}),rs.isBrowser&&(this.openShadow(Ks),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Ct(this,le,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return S(this,R)}connectedCallback(){super.connectedCallback();const e=S(this,le).assignedElements()[0]||S(this,le).firstElementChild;Ct(this,R,e),S(this,R).addEventListener("pointerdown",S(this,Ve)),ie.windowResizer.subscribe(S(this,Zt),Ie.RESIZE_ORDER.SCROLL+1),vs.elementResizer.subscribe(this,S(this,Zt)),this.scrollElement.onScroll(S(this,xe)),this.scrollElement.axisCSSProperty.subscribe(S(this,Le))}disconnectedCallback(){S(this,R).removeEventListener("pointerdown",S(this,Ve)),ie.windowResizer.unsubscribe(S(this,Zt)),vs.elementResizer.unsubscribe(S(this,Zt)),this.scrollElement.offScroll(S(this,xe)),this.scrollElement.axisCSSProperty.unsubscribe(S(this,Le))}};le=new WeakMap;R=new WeakMap;nt=new WeakMap;ht=new WeakMap;ce=new WeakMap;ue=new WeakMap;Zt=new WeakMap;xe=new WeakMap;Le=new WeakMap;Ve=new WeakMap;exports.ScrollbarElement=Zs([bt.define("e-scrollbar")],exports.ScrollbarElement);const Js=ns.createStylesheet({button:{all:"inherit"}});class ys extends Ge{constructor(){super(),this.openShadow(Js),rs.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Qs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Ys=(r,e,i,n)=>{for(var h=n>1?void 0:n?Xs(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Qs(e,i,h),h};exports.ScrollSetButtonElement=class extends ys{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Ys([bt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var js=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,ei=(r,e,i,n)=>{for(var h=n>1?void 0:n?ti(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&js(e,i,h),h};exports.ScrollStepButtonElement=class extends ys{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ei([bt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,e,i,n)=>{for(var h=n>1?void 0:n?ii(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&si(e,i,h),h},Ps=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},qt=(r,e,i)=>(Ps(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},ms=(r,e,i,n)=>(Ps(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Wt,pe,et,mt,ee,we,be,se;class ni{constructor(e,i,n){z(this,et,void 0);z(this,mt,void 0);z(this,ee,void 0);z(this,we,void 0);z(this,be,()=>{o(this,mt).scrollToSection(o(this,ee),o(this,we))});z(this,se,()=>{o(this,et).classList.toggle("current",o(this,mt).counter.current===o(this,ee))});D(this,et,document.createElement("button")),D(this,mt,e),D(this,we,n),D(this,ee,i),o(this,et).addEventListener("click",o(this,be)),o(this,mt).counter.subscribe(o(this,se)),o(this,se).call(this)}get element(){return o(this,et)}destroy(){o(this,et).removeEventListener("click",o(this,be)),o(this,mt).counter.unsubscribe(o(this,se)),o(this,et).remove()}}et=new WeakMap,mt=new WeakMap,ee=new WeakMap,we=new WeakMap,be=new WeakMap,se=new WeakMap;exports.ScrollBulletButtonsElement=class extends Ge{constructor(){super(...arguments),gs(this,Wt,[]),gs(this,pe,ws.debounce(()=>{qt(this,Wt).forEach(e=>e.destroy()),ms(this,Wt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new ni(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),qt(this,Wt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",qt(this,pe)),qt(this,pe).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",qt(this,pe)),qt(this,Wt).forEach(e=>e.destroy()),ms(this,Wt,[])}};Wt=new WeakMap;pe=new WeakMap;exports.ScrollBulletButtonsElement=ri([bt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var hi=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(r,e,i,n)=>{for(var h=n>1?void 0:n?oi(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&hi(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},v=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),y=(r,e,i)=>(ls(r,e,"access private method"),i),Kt,Mt,xt,Lt,Vt,$,H,G,U,Ot,L,ft,St,lt,ct,ut,Jt,fe,x,J,K,dt,vt,Y,ze,g,Qt,Xt,Oe,A,j,V,W,q,Se,Ft,k,$e,Qe,cs,Es,Xe,ks,Ye,Ws,je,Ms,ts,xs,es,Ls,ss,Vs,De,de,ot,zt,us,zs,ps,Os,Fe,is,Re;exports.ScrollSegmentElement=class extends Ge{constructor(){super(...arguments),a(this,$e),a(this,cs),a(this,Xe),a(this,Ye),a(this,je),a(this,ts),a(this,es),a(this,ss),a(this,ot),a(this,us),a(this,ps),a(this,Fe),a(this,Kt,new p.CSSProperty(this,"--target","")),a(this,Mt,new p.CSSProperty(this,"--disabled",!1)),a(this,xt,new p.CSSProperty(this,"--distance-offset",0)),a(this,Lt,new p.CSSProperty(this,"--start-offset",0)),a(this,Vt,new p.CSSProperty(this,"--capture-once",!1)),a(this,$,new p.CSSProperty(this,"--captured","")),a(this,H,new p.CSSProperty(this,"--released","")),a(this,G,new p.CSSProperty(this,"--captured-from-start","")),a(this,U,new p.CSSProperty(this,"--captured-from-finish","")),a(this,Ot,new p.CSSProperty(this,"--released-from-start","")),a(this,L,new p.CSSProperty(this,"--released-from-finish","")),a(this,ft,new p.CSSProperty(this,"--passed-var","")),a(this,St,new p.CSSProperty(this,"--progress-var","")),a(this,lt,new p.CSSProperty(this,"--distance-var","")),a(this,ct,new p.CSSProperty(this,"--start-var","")),a(this,ut,new p.CSSProperty(this,"--finish-var","")),a(this,Jt,new p.CSSProperty(this,"--smoothstep",!1)),a(this,fe,new p.CSSProperty(this,"--smootherstep",!1)),a(this,x,new _t.Store(!1)),a(this,J,new _t.Store(!1)),a(this,K,new _t.Store(!1)),a(this,dt,new _t.Store(!1)),a(this,vt,new _t.Store(!1)),a(this,Y,new _t.Store(!1)),a(this,ze,[]),a(this,g,this),a(this,Qt,0),a(this,Xt,0),a(this,Oe,0),a(this,A,0),a(this,j,0),a(this,V,0),a(this,W,0),a(this,q,0),a(this,Se,!1),a(this,Ft,!1),a(this,k,!0),a(this,De,()=>{s(this,k)||(this.resize(),s(this,de).call(this))}),a(this,de,()=>{!s(this,k)&&s(this,Se)&&this.tick()}),a(this,Re,ws.debounce(()=>{const e=Tt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),v(this,ze,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,xt)}get startOffsetCSSProperty(){return s(this,Lt)}get captureOnceCSSProperty(){return s(this,Vt)}get capturedCSSProperty(){return s(this,$)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Ot)}get releasedFromFinishCSSProperty(){return s(this,L)}get passedVarCSSProperty(){return s(this,ft)}get progressVarCSSProperty(){return s(this,St)}get distanceVarCSSProperty(){return s(this,lt)}get startVarCSSProperty(){return s(this,ct)}get finishVarCSSProperty(){return s(this,ut)}get smoothstepCSSProperty(){return s(this,Jt)}get smootherstepCSSProperty(){return s(this,fe)}get disabledCSSProperty(){return s(this,Mt)}get targetCSSProperty(){return s(this,Kt)}get isCaptured(){return s(this,x)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,K)}get isReleasedFromStart(){return s(this,dt)}get isCapturedFromFinish(){return s(this,vt)}get isReleasedFromFinish(){return s(this,Y)}get directionPosition(){return s(this,Qt)}get directionSize(){return s(this,Xt)}get passed(){return s(this,A)}get progress(){return s(this,j)}get start(){return s(this,V)}get finish(){return s(this,q)}get distance(){return s(this,W)}get isCapturedOnce(){return s(this,Ft)}get isDisabled(){return s(this,k)}resize(){v(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),v(this,Qt,this.scrollElement.vertical?wt.getCumulativeOffsetTop(this,this.scrollElement):wt.getCumulativeOffsetLeft(this,this.scrollElement)),v(this,V,this.getStart()),v(this,W,this.getDistance()),v(this,V,s(this,V)+s(this,Lt).current),v(this,W,s(this,W)+s(this,xt).current),v(this,q,s(this,V)+s(this,W)),this.scrollElement.currentScrollValue>s(this,q)&&!s(this,x).current&&!s(this,J).current&&(s(this,x).current=!0),this.setVar(s(this,ct).current,s(this,V)),this.setVar(s(this,ut).current,s(this,q)),this.setVar(s(this,lt).current,s(this,W)),v(this,Se,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,ze).forEach(n=>{e+=n.value}),v(this,A,this.updateValue(e-s(this,V),0,s(this,W))||0),v(this,j,s(this,A)/s(this,W)||0);const i=Math.round(e);s(this,x).current&&(i>s(this,V)?s(this,K).current||y(this,je,Ms).call(this):s(this,K).current&&!s(this,dt).current&&y(this,es,Ls).call(this),i<s(this,q)?s(this,Y).current&&!s(this,vt).current&&y(this,ts,xs).call(this):s(this,K).current&&!s(this,Y).current&&y(this,ss,Vs).call(this)),i>s(this,V)&&i<s(this,q)?(y(this,$e,Qe).call(this),s(this,x).current||y(this,Xe,ks).call(this)):s(this,x).current&&(v(this,A,Yt.step(s(this,W)/2,s(this,A),0,s(this,W))),v(this,j,s(this,A)/s(this,W)),y(this,$e,Qe).call(this),y(this,Ye,Ws).call(this)),s(this,Ft)&&s(this,Vt).current&&(s(this,$).current&&s(this,g).classList.add(s(this,$).current),v(this,k,!0))}disable(){this.style.cssText="",v(this,Qt,0),v(this,Xt,0),v(this,A,0),v(this,j,0),v(this,V,0),v(this,W,0),v(this,q,0),v(this,Se,!1),s(this,x).current=!1,s(this,J).current=!1,s(this,K).current=!1,s(this,dt).current=!1,s(this,vt).current=!1,s(this,Y).current=!1,v(this,Ft,!1),v(this,k,!0),y(this,Fe,is).call(this)}enable(){v(this,k,!1)}connectedCallback(){super.connectedCallback(),s(this,Kt).observe(),s(this,Mt).observe(),s(this,xt).observe(),s(this,Lt).observe(),s(this,Vt).observe(),s(this,$).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Ot).observe(),s(this,L).observe(),s(this,ft).observe(),s(this,St).observe(),s(this,lt).observe(),s(this,ct).observe(),s(this,ut).observe(),s(this,Jt).observe(),s(this,fe).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,Re)),s(this,Re).call(this),s(this,Mt).current||this.enable(),s(this,Kt).subscribe(i=>{i.previous&&y(this,Fe,is).call(this),i.current?i.current==="parent"?v(this,g,this.parentElement||this):v(this,g,document.querySelector(i.current)||this):v(this,g,this)}),s(this,Mt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Lt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,xt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,$).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,G).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,U).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,H).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,Ot).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,L).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,Vt).subscribe(i=>{s(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ft).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),s(this,St).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,j)))}),s(this,ct).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,V)))}),s(this,ut).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,q)))}),s(this,lt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,W)))}),ie.windowResizer.subscribe(s(this,De),Ie.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,de)),e=!0}disconnectedCallback(){ie.windowResizer.unsubscribe(s(this,De)),this.scrollElement.offScroll(s(this,de)),s(this,Kt).close(),s(this,Mt).close(),s(this,xt).close(),s(this,Lt).close(),s(this,Vt).close(),s(this,$).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Ot).close(),s(this,L).close(),s(this,ft).close(),s(this,St).close(),s(this,lt).close(),s(this,ct).close(),s(this,ut).close(),s(this,Jt).close(),s(this,fe).close(),s(this,x).close(),s(this,J).close(),s(this,K).close(),s(this,dt).close(),s(this,vt).close(),s(this,Y).close(),this.disable()}removeVar(e){e&&s(this,g).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,g).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?Yt.smootherstep(e,i,n)*n:s(this,Jt).current?Yt.smoothstep(e,i,n)*n:Yt.clamp(e,i,n)}getDistance(){return s(this,Xt)+s(this,Oe)}getStart(){return s(this,Qt)-s(this,Oe)}};Kt=new WeakMap;Mt=new WeakMap;xt=new WeakMap;Lt=new WeakMap;Vt=new WeakMap;$=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Ot=new WeakMap;L=new WeakMap;ft=new WeakMap;St=new WeakMap;lt=new WeakMap;ct=new WeakMap;ut=new WeakMap;Jt=new WeakMap;fe=new WeakMap;x=new WeakMap;J=new WeakMap;K=new WeakMap;dt=new WeakMap;vt=new WeakMap;Y=new WeakMap;ze=new WeakMap;g=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;Oe=new WeakMap;A=new WeakMap;j=new WeakMap;V=new WeakMap;W=new WeakMap;q=new WeakMap;Se=new WeakMap;Ft=new WeakMap;k=new WeakMap;$e=new WeakSet;Qe=function(){y(this,cs,Es).call(this),this.setVar(s(this,ft).current,s(this,A)),this.setVar(s(this,St).current,s(this,j))};cs=new WeakSet;Es=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:s(this,W),start:s(this,V),finish:s(this,q),passed:s(this,A),progress:s(this,j)}}))};Xe=new WeakSet;ks=function(){s(this,x).current=!0,s(this,J).current=!1,v(this,Ft,!0),s(this,H).current&&s(this,g).classList.remove(s(this,H).current),s(this,L).current&&s(this,g).classList.remove(s(this,L).current),s(this,L).current&&s(this,g).classList.remove(s(this,L).current),s(this,$).current&&s(this,g).classList.add(s(this,$).current)};Ye=new WeakSet;Ws=function(){s(this,J).current=!0,s(this,x).current=!1,v(this,Ft,!0),s(this,$).current&&s(this,g).classList.remove(s(this,$).current),s(this,G).current&&s(this,g).classList.remove(s(this,G).current),s(this,U).current&&s(this,g).classList.remove(s(this,U).current),s(this,H).current&&s(this,g).classList.add(s(this,H).current)};je=new WeakSet;Ms=function(){s(this,x).current=!0,s(this,K).current=!0,s(this,dt).current=!1,s(this,G).current&&s(this,g).classList.add(s(this,G).current)};ts=new WeakSet;xs=function(){s(this,x).current=!0,s(this,vt).current=!0,s(this,Y).current=!1,s(this,U).current&&s(this,g).classList.add(s(this,U).current)};es=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,dt).current=!0,s(this,K).current=!1,s(this,L).current&&s(this,g).classList.add(s(this,L).current)};ss=new WeakSet;Vs=function(){s(this,J).current=!0,s(this,Y).current=!0,s(this,vt).current=!1,s(this,L).current&&s(this,g).classList.add(s(this,L).current)};De=new WeakMap;de=new WeakMap;ot=new WeakSet;zt=function(r){if(s(this,k)){r.previous&&s(this,g).classList.remove(r.previous),r.current&&s(this,g).classList.remove(r.current);return}r.current&&s(this,x).current?(r.previous&&s(this,g).classList.remove(r.previous),s(this,g).classList.add(r.current)):!r.current&&r.previous&&s(this,g).classList.remove(r.previous)};us=new WeakSet;zs=function(...r){r.forEach(e=>{e&&s(this,g).classList.remove(e)})};ps=new WeakSet;Os=function(...r){r.forEach(e=>{e&&s(this,g).style.removeProperty(`--${e}`)})};Fe=new WeakSet;is=function(){y(this,us,zs).call(this,s(this,$).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Ot).current,s(this,L).current),y(this,ps,Os).call(this,s(this,ft).current,s(this,St).current,s(this,lt).current,s(this,ct).current,s(this,ut).current)};Re=new WeakMap;exports.ScrollSegmentElement=ai([bt.define("e-scroll-segment")],exports.ScrollSegmentElement);
1
+ "use strict";var fs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var o=(r,e,i)=>(fs(r,e,"read from private field"),i?i.call(r):e.get(r)),z=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},D=(r,e,i,n)=>(fs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ds=require("../Damped-B0G_t-pw.cjs"),rs=require("../browser-CpzFX2xg.cjs"),wt=require("../layout-8ryRAMGJ.cjs"),Yt=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const _t=require("../Store-BQGNOHlY.cjs"),Fs=require("../Derived-BZtlW0bB.cjs");require("../ticker/index.cjs");const _e=require("../controls/index.cjs"),bt=require("../custom-element/index.cjs"),Ie=require("../order/index.cjs"),ie=require("../window-resizer/index.cjs"),Tt=require("../scroll-entries/index.cjs"),I=require("../tags-CueX-JLX.cjs"),ns=require("../createStylesheet-C8aQQ4hd.cjs"),Ss=require("../css-unit-parser/index.cjs"),p=require("../css-property/index.cjs"),Rs=require("../Viewport-_WllZTJ0.cjs"),Ts=require("../gestures-DHLrn6Q8.cjs"),ds=require("../theme/index.cjs"),vs=require("../element-resizer/index.cjs"),qs=require("../dom-JBOkFLTh.cjs"),ws=require("../function-MthRj-GJ.cjs");var Bs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,Is=(r,e,i,n)=>{for(var h=n>1?void 0:n?As(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Bs(e,i,h),h},hs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(hs(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},b=(r,e,i,n)=>(hs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(hs(r,e,"access private method"),i),d,F,it,Q,rt,yt,Pt,Z,T,Bt,At,It,Ht,he,at,Gt,Et,Ut,Nt,m,Te,u,ye,Pe,M,_,B,X,$t,pt,O,E,oe,kt,re,ne,jt,ve,Dt,te,qe,os,Be,as,Ee,Ue,ke,Ne,st,He,Ze,bs,ae,We,Me,Ke,ge,Ae,Je,Cs,w,P,Rt,tt,gt;class Hs{constructor(e,i){z(this,w,void 0);z(this,P,void 0);z(this,Rt,0);z(this,tt,0);z(this,gt,null);D(this,w,e),D(this,P,i),Tt.scrollEntries.register(o(this,w))}get size(){return o(this,Rt)}get position(){return o(this,tt)}destroy(){Tt.scrollEntries.unregister(o(this,w)),o(this,w).style.transform="",this.mark(null)}setSize(e){e?(o(this,w).style.setProperty("--size",e+"px"),o(this,P).axisCSSProperty.current==="x"?(o(this,w).style.width=e+"px",o(this,w).style.height=""):(o(this,w).style.height=e+"px",o(this,w).style.width="")):(o(this,w).style.width="",o(this,w).style.height="",o(this,w).style.removeProperty("--size"))}resize(){D(this,Rt,o(this,P).vertical?o(this,w).offsetHeight:o(this,w).offsetWidth),D(this,tt,o(this,P).vertical?wt.getCumulativeOffsetTop(o(this,w)):wt.getCumulativeOffsetLeft(o(this,w))),D(this,tt,o(this,tt)-o(this,P).contentPosition)}transform(){let e=0;const i=o(this,P).viewportSize*o(this,P).sectionDistanceScaleCSSProperty.current;o(this,P).infiniteCSSProperty.current&&o(this,P).overscroll&&o(this,tt)+o(this,Rt)<o(this,P).currentScrollValue&&(e=o(this,P).distance*-1-o(this,P).gap),Tt.scrollEntries.update(o(this,w),o(this,P).axisCSSProperty.current,e);const n=o(this,P).currentScrollValue+e,h=o(this,tt)-o(this,P).viewportSize-i,c=o(this,tt)+o(this,Rt)+i,f=Yt.clamp(n,h,c);o(this,P).vertical?o(this,w).style.transform=`translate3d(0px, ${f*-1}px, 0px)`:o(this,w).style.transform=`translate3d(${f*-1}px, 0px, 0px)`}mark(e){o(this,gt)!==e&&(o(this,gt)&&o(this,w).classList.remove(o(this,gt)),e&&o(this,w).classList.add(e),D(this,gt,e),o(this,w).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:o(this,gt)}})))}}w=new WeakMap,P=new WeakMap,Rt=new WeakMap,tt=new WeakMap,gt=new WeakMap;const Gs=ns.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends bt.CustomElement{constructor(){super(),l(this,jt),l(this,Dt),l(this,qe),l(this,Be),l(this,Ee),l(this,ke),l(this,Ze),l(this,Me),l(this,ge),l(this,Je),l(this,d,null),l(this,F,new p.CSSProperty(this,"--axis","y")),l(this,it,new p.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,Q,new p.CSSProperty(this,"--split",!1)),l(this,rt,new p.CSSProperty(this,"--sectional",!1)),l(this,yt,new p.CSSProperty(this,"--auto-size",!1)),l(this,Pt,new p.CSSProperty(this,"--wheel-max-delta",!1)),l(this,Z,new p.CSSProperty(this,"--sections-in-view",1)),l(this,T,new p.CSSProperty(this,"--infinite",!1)),l(this,Bt,new p.CSSProperty(this,"--damping",20)),l(this,At,new p.CSSProperty(this,"--mass",0)),l(this,It,new p.CSSProperty(this,"--stiffness",0)),l(this,Ht,new p.CSSProperty(this,"--mouse-drag",!1)),l(this,he,new p.CSSProperty(this,"--section-distance-scale",.5)),l(this,at,new p.CSSProperty(this,"--autoplay",0)),l(this,Gt,new p.CSSProperty(this,"--autoplay-pause-duration",0)),l(this,Et,new p.CSSProperty(this,"--autoplay-user-direction",!1)),l(this,Ut,new p.CSSProperty(this,"--disabled",!1)),l(this,Nt,new p.CSSProperty(this,"--hibernated",!1)),l(this,m,null),l(this,Te,null),l(this,u,[]),l(this,ye,0),l(this,Pe,0),l(this,M,0),l(this,_,0),l(this,B,0),l(this,X,null),l(this,$t,null),l(this,pt,null),l(this,O,null),l(this,E,new _t.Store(0)),l(this,oe,0),l(this,kt,0),l(this,re,!0),l(this,ne,!0),l(this,st,()=>{t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,_)||0,i=t(this,E).current;if(b(this,ye,this.vertical?wt.getCumulativeOffsetTop(this):wt.getCumulativeOffsetLeft(this)),b(this,Pe,this.vertical?wt.getCumulativeOffsetTop(t(this,m)):wt.getCumulativeOffsetLeft(t(this,m))),b(this,M,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?b(this,B,Ss.cssUnitParser.parse(getComputedStyle(t(this,m)).rowGap)):b(this,B,Ss.cssUnitParser.parse(getComputedStyle(t(this,m)).columnGap)),t(this,yt).current&&t(this,u).length){const n=t(this,Z).current,h=(t(this,M)-t(this,B)*(n-1))/n;t(this,u).forEach(c=>{c.setSize(h)})}else t(this,u).forEach(n=>{n.setSize()});if(t(this,u).forEach(n=>{n.resize()}),t(this,it).current){b(this,_,t(this,M)*t(this,it).current);const n=t(this,_)+t(this,M);this.vertical?(t(this,m).style.width=n+"px",t(this,m).style.height="100%"):(t(this,m).style.height=n+"px",t(this,m).style.width="100%")}else this.vertical?(t(this,m).style.width="100%",t(this,m).style.height="max-content",b(this,_,t(this,m).offsetHeight-t(this,M))):(t(this,m).style.width="max-content",t(this,m).style.height="100%",b(this,_,t(this,m).offsetWidth-t(this,M)));if(!t(this,T).current){const n=getComputedStyle(this),h=this.vertical?parseFloat(n.paddingBlockStart)+parseFloat(n.paddingBlockEnd):parseFloat(n.paddingInlineStart)+parseFloat(n.paddingInlineEnd);b(this,_,t(this,_)+h),t(this,d).max=t(this,_)}if(t(this,T).current&&t(this,u).length){const n=t(this,u)[t(this,u).length-1],h=n.position+n.size-t(this,M),c=t(this,_)-h;b(this,kt,n.position+n.size+c)}else b(this,kt,t(this,_));if(t(this,rt).current&&t(this,u).length){const n=t(this,u)[i];t(this,d).set(n.position,!0)}else t(this,d).set(e*t(this,_),!0)}),l(this,He,()=>{const e=this.currentScrollValue;if(b(this,oe,Math.max(0,e-t(this,_))),t(this,u).length){let i=0;for(let n=0;n<t(this,u).length;n++){const h=t(this,u)[n];h.transform(),this.targetScrollValue+h.size/2>=h.position&&(i=n)}t(this,E).current=i}else this.vertical?t(this,m).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,m).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Tt.scrollEntries.update(this,t(this,F).current,e)}),l(this,ae,(e,i)=>{t(this,O).pauseAndContinue(t(this,Gt).current),t(this,Et).current&&(t(this,O).direction=Math.sign(i)||1),t(this,We).call(this,e,i)}),l(this,We,(e,i)=>{if(!(e==="drag"&&!Rs.device.isMobile&&!t(this,Ht).current))if(t(this,rt).current){const n=Math.sign(i);t(this,u).length?this.shiftSections(n):t(this,d).shift(n*t(this,M))}else t(this,d).shift(i)}),rs.isBrowser&&(b(this,d,new Ds.Damped(0,{damping:.01,min:0,order:Ie.TICK_ORDER.SCROLL})),this.openShadow(Gs),I.element(this,{tabIndex:0,children:[I.div({class:"static",children:[I.slot({name:"static"})]}),I.div({class:"content",children:[I.slot({ref:e=>b(this,Te,e)})],style:{flexDirection:new Fs.Derived(t(this,F),e=>e==="x"?"row":"column")},ref:e=>b(this,m,e)})]}),b(this,X,new _e.WheelControls({element:t(this,m)})),t(this,X).changeEvent.subscribe(t(this,ae)),b(this,$t,new _e.KeyboardControls({element:t(this,m)})),t(this,$t).changeEvent.subscribe(t(this,ae)),b(this,pt,new _e.DragControls({element:t(this,m)})),t(this,pt).changeEvent.subscribe(t(this,ae)),b(this,O,new _e.AutoplayControls),t(this,O).changeEvent.subscribe(t(this,We)),t(this,F).subscribe(({current:e})=>{t(this,m).style.flexDirection=e==="x"?"row":"column",t(this,X).axis=t(this,Pt).current?"max":e,t(this,$t).dimension=e==="x"?"width":"height",t(this,pt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,st).call(this)}),t(this,Pt).subscribe(e=>{t(this,X).axis=e.current?"max":t(this,F).current}),t(this,it).subscribe(()=>{this.isConnected&&t(this,st).call(this)}),t(this,Q).subscribe(({current:e})=>{this.isConnected&&(e?C(this,jt,ve).call(this):C(this,Dt,te).call(this))}),t(this,rt).subscribe(e=>{t(this,X).debounce=e.current,t(this,pt).swipe=e.current,t(this,O).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,u).length?C(this,jt,ve).call(this):!e.current&&e.previous&&t(this,u).length&&C(this,Dt,te).call(this))}),t(this,yt).subscribe(e=>{this.isConnected&&(t(this,st).call(this),e.current&&!e.previous&&!t(this,u).length?C(this,jt,ve).call(this):!e.current&&e.previous&&t(this,u).length&&C(this,Dt,te).call(this))}),t(this,Z).subscribe(e=>{this.isConnected&&(t(this,st).call(this),C(this,ge,Ae).call(this))}),t(this,T).subscribe(e=>{e.current?(this.isConnected&&(t(this,u).length||(t(this,Q).current=!0)),t(this,u).length&&(t(this,d).max=1/0,t(this,d).min=-1/0)):(b(this,oe,0),t(this,d).max=t(this,_),t(this,d).min=0)}),t(this,Bt).subscribe(e=>{t(this,d).damping=e.current}),t(this,At).subscribe(e=>{t(this,d).mass=e.current}),t(this,It).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?C(this,qe,os).call(this):!e.current&&e.previous&&C(this,Be,as).call(this)}),t(this,Nt).subscribe(e=>{e.current&&!e.previous?C(this,Ee,Ue).call(this):!e.current&&e.previous&&C(this,ke,Ne).call(this)}),t(this,at).subscribe(e=>{t(this,O).speed=e.current,e.current&&!e.previous?t(this,O).connect():!e.current&&e.previous&&t(this,O).disconnect()}),t(this,Et).subscribe(e=>{e.current||(t(this,O).direction=1)}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,E).subscribe(e=>{t(this,u).length&&C(this,ge,Ae).call(this)}))}get axisCSSProperty(){return t(this,F)}get pagesCSSProperty(){return t(this,it)}get splitCSSProperty(){return t(this,Q)}get sectionalCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,yt)}get wheelMaxDeltaCSSProperty(){return t(this,Pt)}get sectionsInViewCSSProperty(){return t(this,Z)}get infiniteCSSProperty(){return t(this,T)}get dampingCSSProperty(){return t(this,Bt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,It)}get mouseDragCSSProperty(){return t(this,Ht)}get sectionDistanceScaleCSSProperty(){return t(this,he)}get autoplayCSSProperty(){return t(this,at)}get autoplayPauseDurationCSSProperty(){return t(this,Gt)}get autoplayUserDirectionCSSProperty(){return t(this,Et)}get disabledCSSProperty(){return t(this,Ut)}get hibernatedCSSProperty(){return t(this,Nt)}get currentScrollValue(){return C(this,Me,Ke).call(this,"current")}get targetScrollValue(){return C(this,Me,Ke).call(this,"target")}get contentElement(){return t(this,m)}get sections(){return t(this,u)}get position(){return t(this,ye)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,M)}get scrollSize(){return t(this,_)}get gap(){return t(this,B)}get counter(){return t(this,E)}get limit(){return t(this,u).length-t(this,Z).current}get distance(){return t(this,kt)}get infiniteDistance(){return t(this,T).current?t(this,kt)+t(this,B):t(this,kt)}get overscroll(){return t(this,oe)}get vertical(){return t(this,F).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return t(this,d).speed}get direction(){return t(this,d).direction}get isRunning(){return t(this,d).isRunning}get scrollWidth(){return t(this,F).current==="y"?0:t(this,d).length}get scrollHeight(){return t(this,F).current==="x"?0:t(this,d).length}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!t(this,u).length)return;const n=t(this,E).current;C(this,Ze,bs).call(this,e);const h=t(this,u)[n],c=t(this,u)[t(this,E).current];if(h&&c){let f=0;const Ce=C(this,Je,Cs).call(this),$s=Ce?this.targetScrollValue-Ce.position:0;t(this,T).current?t(this,E).current===0&&n===t(this,u).length-1?f=t(this,_)+t(this,M)-h.position+t(this,B):t(this,E).current===t(this,u).length-1&&n===0?f=c.position-(t(this,_)+t(this,M)+t(this,B)):f=c.position-h.position:f=c.position-h.position,t(this,d).shift(f-$s,i==="instant")}}shiftSections(e,i="smooth"){t(this,u).length&&this.scrollToSection(t(this,E).current+e,i)}setPosition(e,i="smooth"){t(this,d).set(e,i==="instant")}connectedCallback(){t(this,F).observe(),t(this,it).observe(),t(this,Q).observe(),t(this,rt).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Z).observe(),t(this,T).observe(),t(this,Bt).observe(),t(this,At).observe(),t(this,It).observe(),t(this,Ht).observe(),t(this,he).observe(),t(this,at).observe(),t(this,at).observe(),t(this,Gt).observe(),t(this,Et).observe(),t(this,Ut).observe(),t(this,Nt).observe(),C(this,ke,Ne).call(this)}disconnectedCallback(){t(this,F).unobserve(),t(this,it).unobserve(),t(this,Q).unobserve(),t(this,rt).unobserve(),t(this,yt).unobserve(),t(this,Pt).unobserve(),t(this,Z).unobserve(),t(this,T).unobserve(),t(this,Bt).unobserve(),t(this,At).unobserve(),t(this,It).unobserve(),t(this,Ht).unobserve(),t(this,he).unobserve(),t(this,at).unobserve(),t(this,Gt).unobserve(),t(this,Et).unobserve(),t(this,Ut).unobserve(),t(this,Nt).unobserve(),C(this,Ee,Ue).call(this)}};d=new WeakMap;F=new WeakMap;it=new WeakMap;Q=new WeakMap;rt=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Z=new WeakMap;T=new WeakMap;Bt=new WeakMap;At=new WeakMap;It=new WeakMap;Ht=new WeakMap;he=new WeakMap;at=new WeakMap;Gt=new WeakMap;Et=new WeakMap;Ut=new WeakMap;Nt=new WeakMap;m=new WeakMap;Te=new WeakMap;u=new WeakMap;ye=new WeakMap;Pe=new WeakMap;M=new WeakMap;_=new WeakMap;B=new WeakMap;X=new WeakMap;$t=new WeakMap;pt=new WeakMap;O=new WeakMap;E=new WeakMap;oe=new WeakMap;kt=new WeakMap;re=new WeakMap;ne=new WeakMap;jt=new WeakSet;ve=function(){C(this,Dt,te).call(this),t(this,Te).assignedElements().forEach(r=>{r instanceof HTMLElement&&t(this,u).push(new Hs(r,this))}),t(this,m).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,st).call(this),C(this,ge,Ae).call(this)};Dt=new WeakSet;te=function(){t(this,u).forEach(r=>{r.destroy()}),b(this,u,[]),t(this,E).current=0,t(this,d).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};qe=new WeakSet;os=function(){t(this,re)||(b(this,re,!0),t(this,d).unsubscribe(t(this,He)),t(this,d).unlistenAnimationFrame(),t(this,X).disconnect(),t(this,$t).disconnect(),t(this,pt).disconnect(),t(this,O).disconnect())};Be=new WeakSet;as=function(){t(this,re)&&(b(this,re,!1),t(this,d).subscribe(t(this,He)),t(this,X).connect(),t(this,$t).connect(),t(this,pt).connect(),t(this,at).current&&t(this,O).connect())};Ee=new WeakSet;Ue=function(){t(this,ne)||(b(this,ne,!0),ie.windowResizer.unsubscribe(t(this,st)),t(this,d).reset(),C(this,qe,os).call(this),t(this,m).style.transform="",t(this,Q).current&&C(this,Dt,te).call(this),Tt.scrollEntries.unregister(this))};ke=new WeakSet;Ne=function(){t(this,ne)&&(b(this,ne,!1),t(this,Q).current&&C(this,jt,ve).call(this),Tt.scrollEntries.register(this),ie.windowResizer.subscribe(t(this,st),Ie.RESIZE_ORDER.SCROLL),C(this,Be,as).call(this))};st=new WeakMap;He=new WeakMap;Ze=new WeakSet;bs=function(r){t(this,T).current?(t(this,E).current=r%t(this,u).length,t(this,E).current=t(this,E).current<0?t(this,u).length+t(this,E).current:t(this,E).current):t(this,E).current=Yt.clamp(r,0,this.limit)};ae=new WeakMap;We=new WeakMap;Me=new WeakSet;Ke=function(r="current"){if(t(this,T).current&&t(this,u).length){const e=t(this,d)[r]%(t(this,_)+t(this,M)+t(this,B));return e<0?t(this,_)+e+t(this,M)+t(this,B):e}else return t(this,d)[r]};ge=new WeakSet;Ae=function(){if(t(this,u).length){const r=t(this,E).current;r===0?this.classList.add("start"):this.classList.remove("start"),r===this.limit?this.classList.add("end"):this.classList.remove("end"),t(this,u).forEach((e,i)=>{const n=r-this.limit-1,h=r+t(this,Z).current,c=this.sections.length-h;i>=r&&i<h||i<=n?e.mark("current"):i>=h&&i<h+c/2||i<=n+t(this,Z).current?e.mark("next"):e.mark("previous")})}};Je=new WeakSet;Cs=function(){let r=null,e=1/0;for(let i=0;i<t(this,u).length;i++){const n=Math.abs(t(this,u)[i].position-this.targetScrollValue);n<e&&(e=n,r=i)}return r!==null?t(this,u)[r]:null};exports.ScrollElement=Is([bt.define("e-scroll")],exports.ScrollElement);var me;class Ge extends bt.CustomElement{constructor(){super(...arguments);z(this,me,null)}get scrollElement(){return o(this,me)}connectedCallback(){const i=qs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?D(this,me,i):console.error(this,"e-scroll not found")}}me=new WeakMap;var Us=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,Zs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ns(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Us(e,i,h),h},_s=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},S=(r,e,i)=>(_s(r,e,"read from private field"),i?i.call(r):e.get(r)),N=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},Ct=(r,e,i,n)=>(_s(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),le,R,nt,ht,ce,ue,Zt,xe,Le,Ve;const Ks=ns.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:ds.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:ds.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Ge{constructor(){super(),N(this,le,null),N(this,R,null),N(this,nt,!1),N(this,ht,0),N(this,ce,0),N(this,ue,0),N(this,Zt,()=>{Ct(this,nt,this.offsetWidth>this.offsetHeight);const e=S(this,nt)?this.offsetWidth:this.offsetHeight;Ct(this,ht,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),Ct(this,ht,Math.max(S(this,ht),30)),S(this,nt)?(S(this,R).style.width=S(this,ht)+"px",S(this,R).style.height="100%"):(S(this,R).style.width="100%",S(this,R).style.height=S(this,ht)+"px"),Ct(this,ce,e-S(this,ht)),this.scrollElement.scrollSize||(this.style.display="none")}),N(this,xe,()=>{Ct(this,ue,this.scrollElement.currentProgress*S(this,ce)),S(this,nt)?S(this,R).style.transform=`translate3d(${S(this,ue)}px, 0px, 0px)`:S(this,R).style.transform=`translate3d(0px, ${S(this,ue)}px, 0px)`}),N(this,Le,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)}),N(this,Ve,e=>{document.documentElement.classList.add("grabbing"),Ts.setupDrag(h=>{const c=S(this,nt)?h.x:h.y,f=this.scrollElement.distance/S(this,ce),Ce=(c-n)*f;this.scrollElement.setPosition(i+Ce)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.targetScrollValue,n=S(this,nt)?e.x:e.y}),rs.isBrowser&&(this.openShadow(Ks),I.element(this,{slot:"static","drag-dead-zone":"",children:[I.slot({ref:e=>Ct(this,le,e),children:I.div({class:"default-thumb"})})]}))}get thumbElement(){return S(this,R)}connectedCallback(){super.connectedCallback();const e=S(this,le).assignedElements()[0]||S(this,le).firstElementChild;Ct(this,R,e),S(this,R).addEventListener("pointerdown",S(this,Ve)),ie.windowResizer.subscribe(S(this,Zt),Ie.RESIZE_ORDER.SCROLL+1),vs.elementResizer.subscribe(this,S(this,Zt)),this.scrollElement.onScroll(S(this,xe)),this.scrollElement.axisCSSProperty.subscribe(S(this,Le))}disconnectedCallback(){S(this,R).removeEventListener("pointerdown",S(this,Ve)),ie.windowResizer.unsubscribe(S(this,Zt)),vs.elementResizer.unsubscribe(S(this,Zt)),this.scrollElement.offScroll(S(this,xe)),this.scrollElement.axisCSSProperty.unsubscribe(S(this,Le))}};le=new WeakMap;R=new WeakMap;nt=new WeakMap;ht=new WeakMap;ce=new WeakMap;ue=new WeakMap;Zt=new WeakMap;xe=new WeakMap;Le=new WeakMap;Ve=new WeakMap;exports.ScrollbarElement=Zs([bt.define("e-scrollbar")],exports.ScrollbarElement);const Js=ns.createStylesheet({button:{all:"inherit"}});class ys extends Ge{constructor(){super(),this.openShadow(Js),rs.isBrowser&&I.element(this,{children:[I.button({onClick:()=>{this.handleClick()},children:[I.slot()]})]})}}var Qs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,Ys=(r,e,i,n)=>{for(var h=n>1?void 0:n?Xs(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&Qs(e,i,h),h};exports.ScrollSetButtonElement=class extends ys{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Ys([bt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var js=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,ei=(r,e,i,n)=>{for(var h=n>1?void 0:n?ti(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&js(e,i,h),h};exports.ScrollStepButtonElement=class extends ys{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=ei([bt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(r,e,i,n)=>{for(var h=n>1?void 0:n?ii(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&si(e,i,h),h},Ps=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},qt=(r,e,i)=>(Ps(r,e,"read from private field"),i?i.call(r):e.get(r)),gs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},ms=(r,e,i,n)=>(Ps(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Wt,pe,et,mt,ee,we,be,se;class ni{constructor(e,i,n){z(this,et,void 0);z(this,mt,void 0);z(this,ee,void 0);z(this,we,void 0);z(this,be,()=>{o(this,mt).scrollToSection(o(this,ee),o(this,we))});z(this,se,()=>{o(this,et).classList.toggle("current",o(this,mt).counter.current===o(this,ee))});D(this,et,document.createElement("button")),D(this,mt,e),D(this,we,n),D(this,ee,i),o(this,et).addEventListener("click",o(this,be)),o(this,mt).counter.subscribe(o(this,se)),o(this,se).call(this)}get element(){return o(this,et)}destroy(){o(this,et).removeEventListener("click",o(this,be)),o(this,mt).counter.unsubscribe(o(this,se)),o(this,et).remove()}}et=new WeakMap,mt=new WeakMap,ee=new WeakMap,we=new WeakMap,be=new WeakMap,se=new WeakMap;exports.ScrollBulletButtonsElement=class extends Ge{constructor(){super(...arguments),gs(this,Wt,[]),gs(this,pe,ws.debounce(()=>{qt(this,Wt).forEach(e=>e.destroy()),ms(this,Wt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new ni(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),qt(this,Wt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",qt(this,pe)),qt(this,pe).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",qt(this,pe)),qt(this,Wt).forEach(e=>e.destroy()),ms(this,Wt,[])}};Wt=new WeakMap;pe=new WeakMap;exports.ScrollBulletButtonsElement=ri([bt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var hi=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ai=(r,e,i,n)=>{for(var h=n>1?void 0:n?oi(e,i):e,c=r.length-1,f;c>=0;c--)(f=r[c])&&(h=(n?f(e,i,h):f(h))||h);return n&&h&&hi(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},v=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),y=(r,e,i)=>(ls(r,e,"access private method"),i),Kt,Mt,xt,Lt,Vt,$,H,G,U,Ot,L,ft,St,lt,ct,ut,Jt,fe,x,J,K,dt,vt,Y,ze,g,Qt,Xt,Oe,A,j,V,W,q,Se,Ft,k,$e,Qe,cs,Es,Xe,ks,Ye,Ws,je,Ms,ts,xs,es,Ls,ss,Vs,De,de,ot,zt,us,zs,ps,Os,Fe,is,Re;exports.ScrollSegmentElement=class extends Ge{constructor(){super(...arguments),a(this,$e),a(this,cs),a(this,Xe),a(this,Ye),a(this,je),a(this,ts),a(this,es),a(this,ss),a(this,ot),a(this,us),a(this,ps),a(this,Fe),a(this,Kt,new p.CSSProperty(this,"--target","")),a(this,Mt,new p.CSSProperty(this,"--disabled",!1)),a(this,xt,new p.CSSProperty(this,"--distance-offset",0)),a(this,Lt,new p.CSSProperty(this,"--start-offset",0)),a(this,Vt,new p.CSSProperty(this,"--capture-once",!1)),a(this,$,new p.CSSProperty(this,"--captured","")),a(this,H,new p.CSSProperty(this,"--released","")),a(this,G,new p.CSSProperty(this,"--captured-from-start","")),a(this,U,new p.CSSProperty(this,"--captured-from-finish","")),a(this,Ot,new p.CSSProperty(this,"--released-from-start","")),a(this,L,new p.CSSProperty(this,"--released-from-finish","")),a(this,ft,new p.CSSProperty(this,"--passed-var","")),a(this,St,new p.CSSProperty(this,"--progress-var","")),a(this,lt,new p.CSSProperty(this,"--distance-var","")),a(this,ct,new p.CSSProperty(this,"--start-var","")),a(this,ut,new p.CSSProperty(this,"--finish-var","")),a(this,Jt,new p.CSSProperty(this,"--smoothstep",!1)),a(this,fe,new p.CSSProperty(this,"--smootherstep",!1)),a(this,x,new _t.Store(!1)),a(this,J,new _t.Store(!1)),a(this,K,new _t.Store(!1)),a(this,dt,new _t.Store(!1)),a(this,vt,new _t.Store(!1)),a(this,Y,new _t.Store(!1)),a(this,ze,[]),a(this,g,this),a(this,Qt,0),a(this,Xt,0),a(this,Oe,0),a(this,A,0),a(this,j,0),a(this,V,0),a(this,W,0),a(this,q,0),a(this,Se,!1),a(this,Ft,!1),a(this,k,!0),a(this,De,()=>{s(this,k)||(this.resize(),s(this,de).call(this))}),a(this,de,()=>{!s(this,k)&&s(this,Se)&&this.tick()}),a(this,Re,ws.debounce(()=>{const e=Tt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),v(this,ze,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return s(this,xt)}get startOffsetCSSProperty(){return s(this,Lt)}get captureOnceCSSProperty(){return s(this,Vt)}get capturedCSSProperty(){return s(this,$)}get releasedCSSProperty(){return s(this,H)}get capturedFromStartCSSProperty(){return s(this,G)}get capturedFromFinishCSSProperty(){return s(this,U)}get releasedFromStartCSSProperty(){return s(this,Ot)}get releasedFromFinishCSSProperty(){return s(this,L)}get passedVarCSSProperty(){return s(this,ft)}get progressVarCSSProperty(){return s(this,St)}get distanceVarCSSProperty(){return s(this,lt)}get startVarCSSProperty(){return s(this,ct)}get finishVarCSSProperty(){return s(this,ut)}get smoothstepCSSProperty(){return s(this,Jt)}get smootherstepCSSProperty(){return s(this,fe)}get disabledCSSProperty(){return s(this,Mt)}get targetCSSProperty(){return s(this,Kt)}get isCaptured(){return s(this,x)}get isReleased(){return s(this,J)}get isCapturedFromStart(){return s(this,K)}get isReleasedFromStart(){return s(this,dt)}get isCapturedFromFinish(){return s(this,vt)}get isReleasedFromFinish(){return s(this,Y)}get directionPosition(){return s(this,Qt)}get directionSize(){return s(this,Xt)}get passed(){return s(this,A)}get progress(){return s(this,j)}get start(){return s(this,V)}get finish(){return s(this,q)}get distance(){return s(this,W)}get isCapturedOnce(){return s(this,Ft)}get isDisabled(){return s(this,k)}resize(){v(this,Xt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),v(this,Qt,this.scrollElement.vertical?wt.getCumulativeOffsetTop(this,this.scrollElement):wt.getCumulativeOffsetLeft(this,this.scrollElement)),v(this,V,this.getStart()),v(this,W,this.getDistance()),v(this,V,s(this,V)+s(this,Lt).current),v(this,W,s(this,W)+s(this,xt).current),v(this,q,s(this,V)+s(this,W)),this.scrollElement.currentScrollValue>s(this,q)&&!s(this,x).current&&!s(this,J).current&&(s(this,x).current=!0),this.setVar(s(this,ct).current,s(this,V)),this.setVar(s(this,ut).current,s(this,q)),this.setVar(s(this,lt).current,s(this,W)),v(this,Se,!0)}tick(){let e=this.scrollElement.currentScrollValue;s(this,ze).forEach(n=>{e+=n.value}),v(this,A,this.updateValue(e-s(this,V),0,s(this,W))||0),v(this,j,s(this,A)/s(this,W)||0);const i=Math.round(e);s(this,x).current&&(i>s(this,V)?s(this,K).current||y(this,je,Ms).call(this):s(this,K).current&&!s(this,dt).current&&y(this,es,Ls).call(this),i<s(this,q)?s(this,Y).current&&!s(this,vt).current&&y(this,ts,xs).call(this):s(this,K).current&&!s(this,Y).current&&y(this,ss,Vs).call(this)),i>s(this,V)&&i<s(this,q)?(y(this,$e,Qe).call(this),s(this,x).current||y(this,Xe,ks).call(this)):s(this,x).current&&(v(this,A,Yt.step(s(this,W)/2,s(this,A),0,s(this,W))),v(this,j,s(this,A)/s(this,W)),y(this,$e,Qe).call(this),y(this,Ye,Ws).call(this)),s(this,Ft)&&s(this,Vt).current&&(s(this,$).current&&s(this,g).classList.add(s(this,$).current),v(this,k,!0))}disable(){this.style.cssText="",v(this,Qt,0),v(this,Xt,0),v(this,A,0),v(this,j,0),v(this,V,0),v(this,W,0),v(this,q,0),v(this,Se,!1),s(this,x).current=!1,s(this,J).current=!1,s(this,K).current=!1,s(this,dt).current=!1,s(this,vt).current=!1,s(this,Y).current=!1,v(this,Ft,!1),v(this,k,!0),y(this,Fe,is).call(this)}enable(){v(this,k,!1)}connectedCallback(){super.connectedCallback(),s(this,Kt).observe(),s(this,Mt).observe(),s(this,xt).observe(),s(this,Lt).observe(),s(this,Vt).observe(),s(this,$).observe(),s(this,H).observe(),s(this,G).observe(),s(this,U).observe(),s(this,Ot).observe(),s(this,L).observe(),s(this,ft).observe(),s(this,St).observe(),s(this,lt).observe(),s(this,ct).observe(),s(this,ut).observe(),s(this,Jt).observe(),s(this,fe).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",s(this,Re)),s(this,Re).call(this),s(this,Mt).current||this.enable(),s(this,Kt).subscribe(i=>{i.previous&&y(this,Fe,is).call(this),i.current?i.current==="parent"?v(this,g,this.parentElement||this):v(this,g,document.querySelector(i.current)||this):v(this,g,this)}),s(this,Mt).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,Lt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,xt).subscribe(()=>{e&&!s(this,k)&&this.resize()}),s(this,$).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,G).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,U).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,H).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,Ot).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,L).subscribe(i=>{y(this,ot,zt).call(this,i)}),s(this,Vt).subscribe(i=>{s(this,k)||!i.current&&i.previous&&(this.resize(),this.enable())}),s(this,ft).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),s(this,St).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,j)))}),s(this,ct).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,V)))}),s(this,ut).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,q)))}),s(this,lt).subscribe(i=>{s(this,k)||(this.removeVar(i.previous),this.setVar(i.current,s(this,W)))}),ie.windowResizer.subscribe(s(this,De),Ie.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(s(this,de)),e=!0}disconnectedCallback(){ie.windowResizer.unsubscribe(s(this,De)),this.scrollElement.offScroll(s(this,de)),s(this,Kt).close(),s(this,Mt).close(),s(this,xt).close(),s(this,Lt).close(),s(this,Vt).close(),s(this,$).close(),s(this,H).close(),s(this,G).close(),s(this,U).close(),s(this,Ot).close(),s(this,L).close(),s(this,ft).close(),s(this,St).close(),s(this,lt).close(),s(this,ct).close(),s(this,ut).close(),s(this,Jt).close(),s(this,fe).close(),s(this,x).close(),s(this,J).close(),s(this,K).close(),s(this,dt).close(),s(this,vt).close(),s(this,Y).close(),this.disable()}removeVar(e){e&&s(this,g).style.removeProperty(`--${e}`)}setVar(e,i){e&&s(this,g).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?Yt.smootherstep(e,i,n)*n:s(this,Jt).current?Yt.smoothstep(e,i,n)*n:Yt.clamp(e,i,n)}getDistance(){return s(this,Xt)+s(this,Oe)}getStart(){return s(this,Qt)-s(this,Oe)}};Kt=new WeakMap;Mt=new WeakMap;xt=new WeakMap;Lt=new WeakMap;Vt=new WeakMap;$=new WeakMap;H=new WeakMap;G=new WeakMap;U=new WeakMap;Ot=new WeakMap;L=new WeakMap;ft=new WeakMap;St=new WeakMap;lt=new WeakMap;ct=new WeakMap;ut=new WeakMap;Jt=new WeakMap;fe=new WeakMap;x=new WeakMap;J=new WeakMap;K=new WeakMap;dt=new WeakMap;vt=new WeakMap;Y=new WeakMap;ze=new WeakMap;g=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;Oe=new WeakMap;A=new WeakMap;j=new WeakMap;V=new WeakMap;W=new WeakMap;q=new WeakMap;Se=new WeakMap;Ft=new WeakMap;k=new WeakMap;$e=new WeakSet;Qe=function(){y(this,cs,Es).call(this),this.setVar(s(this,ft).current,s(this,A)),this.setVar(s(this,St).current,s(this,j))};cs=new WeakSet;Es=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:s(this,W),start:s(this,V),finish:s(this,q),passed:s(this,A),progress:s(this,j)}}))};Xe=new WeakSet;ks=function(){s(this,x).current=!0,s(this,J).current=!1,v(this,Ft,!0),s(this,H).current&&s(this,g).classList.remove(s(this,H).current),s(this,L).current&&s(this,g).classList.remove(s(this,L).current),s(this,L).current&&s(this,g).classList.remove(s(this,L).current),s(this,$).current&&s(this,g).classList.add(s(this,$).current)};Ye=new WeakSet;Ws=function(){s(this,J).current=!0,s(this,x).current=!1,v(this,Ft,!0),s(this,$).current&&s(this,g).classList.remove(s(this,$).current),s(this,G).current&&s(this,g).classList.remove(s(this,G).current),s(this,U).current&&s(this,g).classList.remove(s(this,U).current),s(this,H).current&&s(this,g).classList.add(s(this,H).current)};je=new WeakSet;Ms=function(){s(this,x).current=!0,s(this,K).current=!0,s(this,dt).current=!1,s(this,G).current&&s(this,g).classList.add(s(this,G).current)};ts=new WeakSet;xs=function(){s(this,x).current=!0,s(this,vt).current=!0,s(this,Y).current=!1,s(this,U).current&&s(this,g).classList.add(s(this,U).current)};es=new WeakSet;Ls=function(){s(this,J).current=!0,s(this,dt).current=!0,s(this,K).current=!1,s(this,L).current&&s(this,g).classList.add(s(this,L).current)};ss=new WeakSet;Vs=function(){s(this,J).current=!0,s(this,Y).current=!0,s(this,vt).current=!1,s(this,L).current&&s(this,g).classList.add(s(this,L).current)};De=new WeakMap;de=new WeakMap;ot=new WeakSet;zt=function(r){if(s(this,k)){r.previous&&s(this,g).classList.remove(r.previous),r.current&&s(this,g).classList.remove(r.current);return}r.current&&s(this,x).current?(r.previous&&s(this,g).classList.remove(r.previous),s(this,g).classList.add(r.current)):!r.current&&r.previous&&s(this,g).classList.remove(r.previous)};us=new WeakSet;zs=function(...r){r.forEach(e=>{e&&s(this,g).classList.remove(e)})};ps=new WeakSet;Os=function(...r){r.forEach(e=>{e&&s(this,g).style.removeProperty(`--${e}`)})};Fe=new WeakSet;is=function(){y(this,us,zs).call(this,s(this,$).current,s(this,G).current,s(this,U).current,s(this,H).current,s(this,Ot).current,s(this,L).current),y(this,ps,Os).call(this,s(this,ft).current,s(this,St).current,s(this,lt).current,s(this,ct).current,s(this,ut).current)};Re=new WeakMap;exports.ScrollSegmentElement=ai([bt.define("e-scroll-segment")],exports.ScrollSegmentElement);
@@ -112,7 +112,8 @@ const ai = as({
112
112
  display: "flex",
113
113
  width: "100%",
114
114
  height: "100%",
115
- gap: "var(--gap, 0px)"
115
+ gap: "var(--gap, 0px)",
116
+ willChange: "var(--will-change, transform)"
116
117
  },
117
118
  ':host([hibernated="true"]) .content': {
118
119
  display: "contents"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.4.29",
3
+ "version": "0.4.30",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"